diff --git a/Makefile b/Makefile index 6fff1139..2740cd86 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ build-protos: > protoc --proto_path=proto --go_out=proto/go --go_opt=paths=source_relative \ --go-grpc_out=proto/go --go-grpc_opt=paths=source_relative proto/*.proto > cd proto/rust -> cargo build +> cargo build --release .PHONY: build-protos ## build-sdk: build rust sdk diff --git a/README.md b/README.md index 171985bd..c9e0fa9a 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,12 @@ It's purpose is to run short term jobs such as: code linters, build tools, tests ## Features: -- Deploy it as a single static binary. -- Write your pipelines in a programming language you're familar with. (**Go** or **Rust** for now). +- Deploy Gofer as a single static binary, manage Gofer through the included command line interface. +- Write your pipelines in a programming language you're familar with; stop cobbling together unfamiliar yaml. (**Go** or **Rust** for now). +- Test and run your pipelines locally; No more "commit it and see" testing. - Pluggable: Write your own triggers, shared tasks, and more in any language (through GRPC). - DAG(Directed Acyclic Graph) support. -- Reliability tooling: A/B test, version, and canary new pipelines. +- Reliability tooling: Version, Blue/Green deploy, and canary deploy updated versions of your pipelines. - Bring your own everything! Secret store, object store, container scheduler. Gofer has the interfaces to support all of them. ## Demo: diff --git a/TODO.md b/TODO.md index 1e93beff..2bb5a38a 100644 --- a/TODO.md +++ b/TODO.md @@ -4,6 +4,11 @@ We need a common way to alert on a PR or something that a task has succeeded or failed or similar. +### Canaried pipelines + +- With versioned pipelines we now need the ability for Gofer to roll out your pipeline for you and watch telemetry on it. +- We need to add "update methods" to pipeline settings which will control the manner in which we roll out updates. Runs will need to include which version of the pipeline has run + ### API - Write/Ensure proper validation for all endpoints. @@ -37,14 +42,15 @@ We need a common way to alert on a PR or something that a task has succeeded or ### Common Tasks -- It would be nice to create a common task with some basic "the user wants to do something when this condition - happens". What is the best way to do this? - - If pipeline fails 3 runs in a row. - - If pipeline failure rate ever dives below certain percentage. - - If total time of a run exceeds a given duration. - - When a run finishes. - - When a run fails. - - If a particular task run fails or succeeds. +Eventually we will need to create some common tasks that are based around alerting. It would be nice to send the user +a notification around one or more of the following events should the user want it: + +- If pipeline fails 3 runs in a row. +- If pipeline failure rate ever dives below certain percentage. +- If total time of a run exceeds a given duration. +- When a run finishes. +- When a run fails. +- If a particular task run fails or succeeds. ### CLI @@ -61,6 +67,7 @@ We need a common way to alert on a PR or something that a task has succeeded or - Create an init function for both rust and golang(simply just prompts you for your language) and then creates a new default vanilla pipeline. (similar to the old "config init" command) - Inspiration for CLI design: https://github.com/bensadeh/circumflex - Look into bubble tea for some interactions. +- A diff command might be awesome. ### Scheduler @@ -141,24 +148,63 @@ We need a common way to alert on a PR or something that a task has succeeded or These are prefixed with `gofer_plugin_config_{var}` - Gofer then passes them another set of env vars from the user's own config. These are prefixed with `gofer_plugin_param_{var}` +- Write better documentation on how to spin Gofer up locally so you can test out your pipeline. ### On the floor +- Triggers need to be removed from pipeline configuration. They should instead be set up globally for the pipeline + by the user through the command line. This is because they are fairly in-elastic. If we were canarying a pipeline + how do we determine which pipeline triggers go to which versions of the pipeline. This is almost impossible. + Treating triggers as global things actually makes all the code so much easier to work with. - Create a container for custom use that has gofer-cli already packed in and possibly allows +- Think about making a new task type that you can pass commands to that automatically uses the gofer container. So users can get zero to code ultra-fast. - Fixing Pipeline updates and rolling out versioned pipelines. - - Gofer needs versioned pipelines as a first step into supporting the possibility of canarying pipelines. - - We need to make a user settable limit for pipeline versions. Delete older versions. - - Several things need to get done - 1. We need to figure out how to support versioned pipelines in the context of the database and data models. We'll probably need to change schema quite a bit. - 2. Clean up how trigger sub/un-subs work. Hitting the upgrade endpoint for your pipeline should return immediately and update the pipeline's status to updating. - - (We'll probably need to add statues to pipeline [Ready, Updating]) - - During this "updating" time Gofer will remove triggers and subscribe triggers as necessary. - - If this process fails Gofer will rollback to old trigger state. - - If this fails Gofer will mark the pipeline as paused(or better) for a specific reason. - - Clients of the API will kick off the update by passing the proto as usual and then listen for pipeline updates which can then be relayed to the user. - - Once the pipeline finishes updating the pipeline will switch back to Ready state but the API will not - autoswitch back to active. - 3. We need to add "update methods" to pipeline settings which will control the manner in which we roll out updates. Runs will need to include which version of the pipeline has run + - During this "updating" time Gofer will remove triggers and subscribe triggers as necessary. + - If this process fails Gofer will rollback to old trigger state. + - If this fails Gofer will mark the pipeline as disabled(or better) for a specific reason(note a pipeline error here). + - Clients of the API will kick off the update by passing the proto as usual and then listen for pipeline updates which can then be relayed to the user via events. + - In the event of a rollback, when we mark a pipeline as active after it has been deprecated, we should clear the deprecation timestamp. + - We can use this deprecation timestamp to find the oldest version. + - We need the ability for the user to trigger a pipeline rollback(with and option to return to a non-new version) + - The Cli should give the user the ability to roll forward and backward by simply specifying version number. + - We can do this by splitting the actions into two. We have two endpoints: + - Register pipeline + - Deploy pipeline + - This allows us to separate the two in a way that makes it much like long-running jobs. We first upload the new version + then we control how we deploy the new version. + - Errors only occur without the user knowledge at this step so it makes sense. + - This also gives us the chance to rewrite the startup for pipelines. Instead of Gofer trying to best try reconnect + pipelines to their triggers now we can launch a deployment for each pipeline and then compartmentalize the stuff that + happens there. This gives the user a nice interface to understand pipeline failures in relation to Gofer. + - Deployments should have types: The type we're currently doing is immediate cutover. + - We need to redo restoreTriggerSubscriptions with the new tao of what a trigger is. + - Update the CLI to work with all of this. - Clean up both github triggers and add a github common task. - common task we can throw in there as a parallel task a the start of each pipeline. It will consume github commit, inform github of the pipeline pending and then query gofer to see when the run has ended. When the run ends the task will then inform github that the run has finished with a particular state. -- Think about making a new task type that you can pass commands to that automatically uses the gofer container. So users can get zero to code ultra-fast. +- We need to clean up the storage layer. There is way too much that we're doing on our own and it's prone to mistakes. + Mostly when we convert the struct right before inserting it into the database. + - We need to move to three layers of models: Proto -> Internal -> Storage. + - When we need to execute a transaction we can create a WithTx that takes a callback. We can have the things we need to wrap into transactions in that callback + and then we wont need to do weird nil things. + - get rid of FromProtos and hide the models package. It's a domain level package so it should not be shown anyway. The only interface will be protos. +- When we fail a trigger during deployment we should give a better error currently we give general. +- We might want to think about wrapping Pipeline, so we can treat it like an object more. This would enable us to + perform a lot of actions straightforwardly and have it all work out in the backend. For example, unsubscribing a trigger + for a pipeline would save things to the database naturally, publish the event, etc and we get that consistent behavior + no matter what. +- Think more about event naming, right now the naming is kinda weird because we're trying events to the objects that we normally + work with like pipelines and runs. Maybe that grouping should be in documentation only? Including it in the name can make for + awkward confusing names. + - For instance: EventStartedDeployPipeline instead of EventStartedPipelineDeploy +- To support, spreading traffic to different versions of pipeline, we can first check if this pipeline has a deployment + if that deployment is going out then the deployment has a type. We then take those versions of the deployment and + share traffic based on that type. +- pipeline_trriger_status: state/status should be subscribed, disabled, failed. disabled means it's still subscribed, but any events will be ignored. +- For To and From functions in the API remove the errors. They are all must functions for ease of use. + - Write tests for all these functions also. +- Go back and remove all panics that aren't data related. +- The api layer needs a package that wraps the storage package and makes it easier to use. +- CLI: pipeline[register, list, get] and trigger[subscribe, unsubscribe] files need work. +- Update pipeline getting started documentation, triggers are handled differently now. +- If CLI detects this is the first time we've pushed to thsi pipeline we then need to automatically deploy it. +- THe CLI should also comment that now is the time to add triggers. diff --git a/containers/triggers/cron/main.go b/containers/triggers/cron/main.go index e34a3c48..90a65a76 100644 --- a/containers/triggers/cron/main.go +++ b/containers/triggers/cron/main.go @@ -19,15 +19,21 @@ const ParameterExpression = "expression" var checkInterval = time.Minute type subscription struct { - pipelineTriggerLabel string - pipeline string namespace string + pipeline string + pipelineTriggerLabel string timeframe avail.Timeframe } +type subscriptionID struct { + namespace string + pipeline string + pipelineTriggerLabel string +} + type trigger struct { events chan *proto.TriggerWatchResponse - subscriptions []subscription + subscriptions map[subscriptionID]*subscription } func newTrigger() *trigger { @@ -66,15 +72,30 @@ func (t *trigger) Subscribe(ctx context.Context, request *proto.TriggerSubscribe return nil, fmt.Errorf("could not parse expression: %q", err) } + subID := subscriptionID{ + request.NamespaceId, + request.PipelineId, + request.PipelineTriggerLabel, + } + + // It is perfectly possible for Gofer to attempt to subscribe an already subscribed pipeline. In this case, + // we can simply ignore the request. + _, exists = t.subscriptions[subID] + if exists { + log.Debug().Str("namespace_id", request.NamespaceId).Str("trigger_label", request.PipelineTriggerLabel). + Str("pipeline_id", request.PipelineId).Msg("pipeline already subscribed; ignoring request") + return &proto.TriggerSubscribeResponse{}, nil + } + // While it might result in a faster check to start a goroutine for each subscription the interval // for most of these expressions should be on the order of minutes. So one event loop checking the // result for all of them should still result in no missed checks. - t.subscriptions = append(t.subscriptions, subscription{ - pipelineTriggerLabel: request.PipelineTriggerLabel, - pipeline: request.PipelineId, + t.subscriptions[subID] = &subscription{ namespace: request.NamespaceId, + pipeline: request.PipelineId, + pipelineTriggerLabel: request.PipelineTriggerLabel, timeframe: timeframe, - }) + } log.Debug().Str("trigger_label", request.PipelineTriggerLabel).Str("pipeline_id", request.PipelineId). Str("namespace_id", request.NamespaceId).Msg("subscribed pipeline") @@ -82,15 +103,14 @@ func (t *trigger) Subscribe(ctx context.Context, request *proto.TriggerSubscribe } func (t *trigger) Unsubscribe(ctx context.Context, request *proto.TriggerUnsubscribeRequest) (*proto.TriggerUnsubscribeResponse, error) { - for index, subscription := range t.subscriptions { - if subscription.pipelineTriggerLabel == request.PipelineTriggerLabel && - subscription.namespace == request.NamespaceId && - subscription.pipeline == request.PipelineId { - t.subscriptions = append(t.subscriptions[:index], t.subscriptions[index+1:]...) - return &proto.TriggerUnsubscribeResponse{}, nil - } + subID := subscriptionID{ + namespace: request.NamespaceId, + pipeline: request.PipelineId, + pipelineTriggerLabel: request.PipelineTriggerLabel, } + delete(t.subscriptions, subID) + log.Debug().Str("trigger_label", request.PipelineTriggerLabel).Str("pipeline_id", request.PipelineId). Str("namespace_id", request.NamespaceId).Msg("unsubscribed pipeline") return &proto.TriggerUnsubscribeResponse{}, nil diff --git a/containers/triggers/interval/main.go b/containers/triggers/interval/main.go index e4fd8a9d..3956a691 100644 --- a/containers/triggers/interval/main.go +++ b/containers/triggers/interval/main.go @@ -55,9 +55,9 @@ const ( // This structure is to keep details about those subscriptions so that we may perform the triggers duties on those // pipeline subscriptions. type subscription struct { - pipelineTriggerLabel string - pipeline string namespace string + pipeline string + pipelineTriggerLabel string quit context.CancelFunc } @@ -66,9 +66,9 @@ type subscription struct { // of this unique key. That is because, when relevant triggers should be expected that pipelines might // want to subscribe more than once. type subscriptionID struct { - pipelineTriggerLabel string - pipeline string namespace string + pipeline string + pipelineTriggerLabel string } // Trigger is a structure that every Gofer trigger should have. It is essentially the God struct. It contains @@ -124,7 +124,8 @@ func newTrigger() (*trigger, error) { // startInterval is the main logic of what enables the interval trigger to work. Each pipeline that is subscribed runs // this function which simply waits for the set duration and then pushes a "WatchResponse" event into the trigger's main channel. -func (t *trigger) startInterval(ctx context.Context, pipeline, namespace, pipelineTriggerLabel string, duration time.Duration) { +func (t *trigger) startInterval(ctx context.Context, namespace, pipeline string, pipelineTriggerLabel string, duration time.Duration, +) { for { select { case <-ctx.Done(): @@ -165,16 +166,33 @@ func (t *trigger) Subscribe(ctx context.Context, request *proto.TriggerSubscribe return nil, fmt.Errorf("durations cannot be less than %s", t.minDuration) } - subctx, quit := context.WithCancel(t.parentContext) - t.subscriptions[subscriptionID{ - request.PipelineTriggerLabel, - request.PipelineId, + subID := subscriptionID{ request.NamespaceId, - }] = &subscription{request.PipelineTriggerLabel, request.NamespaceId, request.PipelineId, quit} + request.PipelineId, + request.PipelineTriggerLabel, + } - go t.startInterval(subctx, request.PipelineId, request.NamespaceId, request.PipelineTriggerLabel, duration) + // It is perfectly possible for Gofer to attempt to subscribe an already subscribed pipeline. In this case, + // we can simply ignore the request. + _, exists = t.subscriptions[subID] + if exists { + log.Debug().Str("namespace_id", request.NamespaceId).Str("trigger_label", request.PipelineTriggerLabel). + Str("pipeline_id", request.PipelineId).Msg("pipeline already subscribed; ignoring request") + return &proto.TriggerSubscribeResponse{}, nil + } - log.Debug().Str("namespace_id", request.NamespaceId).Str("trigger_label", request.PipelineTriggerLabel).Str("pipeline_id", request.PipelineId).Msg("subscribed pipeline") + subctx, quit := context.WithCancel(t.parentContext) + t.subscriptions[subID] = &subscription{ + namespace: request.NamespaceId, + pipeline: request.PipelineId, + pipelineTriggerLabel: request.PipelineTriggerLabel, + quit: quit, + } + + go t.startInterval(subctx, request.NamespaceId, request.PipelineId, request.PipelineTriggerLabel, duration) + + log.Debug().Str("namespace_id", request.NamespaceId).Str("trigger_label", request.PipelineTriggerLabel). + Str("pipeline_id", request.PipelineId).Msg("subscribed pipeline") return &proto.TriggerSubscribeResponse{}, nil } @@ -194,21 +212,24 @@ func (t *trigger) Watch(ctx context.Context, request *proto.TriggerWatchRequest) // previously subscribed. func (t *trigger) Unsubscribe(ctx context.Context, request *proto.TriggerUnsubscribeRequest) (*proto.TriggerUnsubscribeResponse, error) { subscription, exists := t.subscriptions[subscriptionID{ - pipelineTriggerLabel: request.PipelineTriggerLabel, - pipeline: request.PipelineId, namespace: request.NamespaceId, + pipeline: request.PipelineId, + pipelineTriggerLabel: request.PipelineTriggerLabel, }] + + // It is perfectly possible for Gofer to attempt to unsubscribe an already unsubscribed pipeline. In this case, + // we can simply ignore the request. if !exists { - return &proto.TriggerUnsubscribeResponse{}, - fmt.Errorf("could not find subscription for trigger %s pipeline %s namespace %s", - request.PipelineTriggerLabel, request.PipelineId, request.NamespaceId) + log.Debug().Str("namespace_id", request.NamespaceId).Str("trigger_label", request.PipelineTriggerLabel). + Str("pipeline_id", request.PipelineId).Msg("no subscription found for pipeline") + return &proto.TriggerUnsubscribeResponse{}, nil } subscription.quit() delete(t.subscriptions, subscriptionID{ - pipelineTriggerLabel: request.PipelineTriggerLabel, - pipeline: request.PipelineId, namespace: request.NamespaceId, + pipeline: request.PipelineId, + pipelineTriggerLabel: request.PipelineTriggerLabel, }) return &proto.TriggerUnsubscribeResponse{}, nil } diff --git a/documentation/src/ref/triggers/README.md b/documentation/src/ref/triggers/README.md index f323c664..568ee5cd 100644 --- a/documentation/src/ref/triggers/README.md +++ b/documentation/src/ref/triggers/README.md @@ -15,7 +15,7 @@ You can [create](#how-to-add-new-triggers) your own triggers, but Gofer provides Triggers must first be installed by Gofer administrators before they can be used. They can be installed by the CLI. For more information on how to install a specific trigger run: ```bash -gofer triggers install -h +gofer trigger install -h ``` ## How do I configure a Trigger? diff --git a/examplePipelines/go/trigger/go.mod b/examplePipelines/go/trigger/go.mod deleted file mode 100644 index c9faae20..00000000 --- a/examplePipelines/go/trigger/go.mod +++ /dev/null @@ -1,15 +0,0 @@ -module github.com/clintjedwards/gofer/examplePipelines/go/trigger - -go 1.19 - -require github.com/clintjedwards/gofer v0.4.1 - -require ( - github.com/golang/protobuf v1.5.2 // indirect - golang.org/x/net v0.2.0 // indirect - golang.org/x/sys v0.2.0 // indirect - golang.org/x/text v0.4.0 // indirect - google.golang.org/genproto v0.0.0-20221111202108-142d8a6fa32e // indirect - google.golang.org/grpc v1.50.1 // indirect - google.golang.org/protobuf v1.28.1 // indirect -) diff --git a/examplePipelines/go/trigger/go.sum b/examplePipelines/go/trigger/go.sum deleted file mode 100644 index 2ab2af14..00000000 --- a/examplePipelines/go/trigger/go.sum +++ /dev/null @@ -1,34 +0,0 @@ -github.com/clintjedwards/gofer v0.2.0-alpha h1:+dpMveOOmTM5asDknmDANUFCLaAL04GMlEpbsx4QXTE= -github.com/clintjedwards/gofer v0.2.0-alpha/go.mod h1:m8b+ga7iv32wCMZajyKohJ1Eg6mkUO4nCLIX2ddQwLw= -github.com/clintjedwards/gofer v0.4.1 h1:rM3f1nj2qOBgf7qVOM1GFrEfK0nWyWZ5g8lOu9uST2Q= -github.com/clintjedwards/gofer v0.4.1/go.mod h1:YwYwxo0Gon+MTsR+ZBPWak+YKeWscxhFcPbXQzY2/bo= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -golang.org/x/net v0.0.0-20220927171203-f486391704dc h1:FxpXZdoBqT8RjqTy6i1E8nXHhW21wK7ptQ/EPIGxzPQ= -golang.org/x/net v0.0.0-20220927171203-f486391704dc/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI= -golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20220927151529-dcaddaf36704 h1:H1AcWFV69NFCMeBJ8nVLtv8uHZZ5Ozcgoq012hHEFuU= -google.golang.org/genproto v0.0.0-20220927151529-dcaddaf36704/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221111202108-142d8a6fa32e h1:azcyH5lGzGy7pkLCbhPe0KkKxsM7c6UA/FZIXImKE7M= -google.golang.org/genproto v0.0.0-20221111202108-142d8a6fa32e/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/examplePipelines/go/trigger/main.go b/examplePipelines/go/trigger/main.go deleted file mode 100644 index b904e2bc..00000000 --- a/examplePipelines/go/trigger/main.go +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "log" - - sdk "github.com/clintjedwards/gofer/sdk/go/config" -) - -func main() { - err := sdk.NewPipeline("trigger", "Trigger Pipeline"). - Description("This pipeline shows off the various features of a simple Gofer pipeline. Triggers, Tasks, and " + - "dependency graphs are all tools that can be wielded to create as complicated pipelines as need be."). - Triggers( - *sdk.NewTrigger("interval", "every_one_minute").Setting("every", "1m"), - ).Tasks( - sdk.NewCustomTask("simple_task", "ubuntu:latest"). - Description("This task simply prints our hello-world message and exists!"). - Command("echo", "Hello from Gofer!"), - ).Finish() - if err != nil { - log.Fatal(err) - } -} diff --git a/go.mod b/go.mod index d9564707..7c367f55 100644 --- a/go.mod +++ b/go.mod @@ -24,11 +24,11 @@ require ( github.com/improbable-eng/grpc-web v0.15.0 github.com/jmoiron/sqlx v1.3.5 github.com/kelseyhightower/envconfig v1.4.0 - github.com/mattn/go-sqlite3 v1.14.15 + github.com/mattn/go-sqlite3 v1.14.16 github.com/nxadm/tail v1.4.8 github.com/olekukonko/tablewriter v0.0.5 github.com/rs/zerolog v1.28.0 - github.com/spf13/cobra v1.5.0 + github.com/spf13/cobra v1.6.1 golang.org/x/text v0.3.7 google.golang.org/grpc v1.49.0 google.golang.org/protobuf v1.28.1 @@ -46,10 +46,14 @@ require ( github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.11.7 // indirect + github.com/kr/text v0.2.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect + github.com/lib/pq v1.10.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect @@ -63,12 +67,13 @@ require ( github.com/rs/cors v1.7.0 // indirect github.com/sirupsen/logrus v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/testify v1.8.0 // indirect github.com/theckman/yacspin v0.13.12 // indirect github.com/zclconf/go-cty v1.8.0 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect - golang.org/x/tools v0.1.12 // indirect + golang.org/x/tools v0.1.13-0.20220804200503-81c7dc4e4efa // indirect google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gotest.tools/v3 v3.3.0 // indirect diff --git a/go.sum b/go.sum index b1a422b1..e18023b1 100644 --- a/go.sum +++ b/go.sum @@ -57,6 +57,7 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -177,8 +178,9 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= @@ -211,8 +213,9 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= @@ -223,8 +226,9 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -242,8 +246,9 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= @@ -251,8 +256,9 @@ github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhR github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= @@ -270,8 +276,8 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= -github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -289,8 +295,9 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -390,8 +397,8 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9 github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -401,11 +408,14 @@ github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3 github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/theckman/yacspin v0.13.12 h1:CdZ57+n0U6JMuh2xqjnjRq5Haj6v1ner2djtLQRzJr4= github.com/theckman/yacspin v0.13.12/go.mod h1:Rd2+oG2LmQi5f3zC3yeZAOl245z8QOvrH4OPOJNZxLg= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -560,8 +570,8 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.1.13-0.20220804200503-81c7dc4e4efa h1:uKcci2q7Qtp6nMTC/AAvfNUAldFtJuHWV9/5QWiypts= +golang.org/x/tools v0.1.13-0.20220804200503-81c7dc4e4efa/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 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= @@ -628,12 +638,12 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= diff --git a/go.work b/go.work index 3f489a18..aec3c706 100644 --- a/go.work +++ b/go.work @@ -12,7 +12,6 @@ use ( ./examplePipelines/go/objects ./examplePipelines/go/secrets ./examplePipelines/go/simple - ./examplePipelines/go/trigger ./examplePipelines/go/script ./examplePipelines/go/commonTask ) diff --git a/go.work.sum b/go.work.sum index a3165aea..9cf1a6a4 100644 --- a/go.work.sum +++ b/go.work.sum @@ -256,6 +256,7 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= @@ -307,8 +308,6 @@ github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= @@ -318,7 +317,6 @@ github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWV github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/opencontainers/image-spec v1.1.0-rc1 h1:lfG+OTa7V8PD3PKvkocSG9KAcA9MANqJn53m31Fvwkc= github.com/opencontainers/image-spec v1.1.0-rc1/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= @@ -427,6 +425,7 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -523,6 +522,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= diff --git a/internal/api/api.go b/internal/api/api.go index eb34cd07..a52844df 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -17,12 +17,12 @@ import ( "github.com/clintjedwards/gofer/internal/config" "github.com/clintjedwards/gofer/internal/eventbus" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/objectStore" "github.com/clintjedwards/gofer/internal/scheduler" "github.com/clintjedwards/gofer/internal/secretStore" "github.com/clintjedwards/gofer/internal/storage" "github.com/clintjedwards/gofer/internal/syncmap" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/gorilla/handlers" "github.com/gorilla/mux" @@ -293,7 +293,7 @@ func (api *API) installBaseTriggers() error { return nil } - registeredTriggers, err := api.db.ListTriggerRegistrations(0, 0) + registeredTriggers, err := api.db.ListGlobalTriggerRegistrations(api.db, 0, 0) if err != nil { return err } @@ -318,7 +318,7 @@ func (api *API) installBaseTriggers() error { Image: "ghcr.io/clintjedwards/gofer/triggers/cron:latest", }) - err := api.db.InsertTriggerRegistration(®istration) + err := api.db.InsertGlobalTriggerRegistration(api.db, registration.ToStorage()) if err != nil { if !errors.Is(err, storage.ErrEntityExists) { return err @@ -336,7 +336,7 @@ func (api *API) installBaseTriggers() error { Image: "ghcr.io/clintjedwards/gofer/triggers/interval:latest", }) - err := api.db.InsertTriggerRegistration(®istration) + err := api.db.InsertGlobalTriggerRegistration(api.db, registration.ToStorage()) if err != nil { if !errors.Is(err, storage.ErrEntityExists) { return err @@ -353,7 +353,7 @@ func (api *API) installBaseTriggers() error { // Gofer starts with a default namespace that all users have access to. func (api *API) createDefaultNamespace() error { namespace := models.NewNamespace(namespaceDefaultID, namespaceDefaultName, "default namespace") - err := api.db.InsertNamespace(namespace) + err := api.db.InsertNamespace(api.db, namespace.ToStorage()) if err != nil { if errors.Is(err, storage.ErrEntityExists) { return nil @@ -466,23 +466,54 @@ func (api *API) findOrphans() { // -> update logs with new logs. // - If the scheduler has no record of this container ever running then assume the state is unknown. func (api *API) repairOrphanRun(namespaceID, pipelineID string, runID int64) error { - pipeline, err := api.db.GetPipeline(nil, namespaceID, pipelineID) + metadataRaw, err := api.db.GetPipelineMetadata(api.db, namespaceID, pipelineID) if err != nil { return err } - run, err := api.db.GetRun(namespaceID, pipelineID, runID) + var metadata models.PipelineMetadata + metadata.FromStorage(&metadataRaw) + + latestConfigRaw, err := api.db.GetCurrentPipelineConfig(api.db, namespaceID, pipelineID) + if err != nil { + return err + } + + commonTasksRaw, err := api.db.ListPipelineCommonTaskSettings(api.db, namespaceID, pipelineID, latestConfigRaw.Version) if err != nil { return err } - taskRuns, err := api.db.ListTaskRuns(0, 0, namespaceID, pipelineID, runID) + customTasksRaw, err := api.db.ListPipelineCustomTasks(api.db, namespaceID, pipelineID, latestConfigRaw.Version) if err != nil { return err } + var latestConfig models.PipelineConfig + latestConfig.FromStorage(&latestConfigRaw, &commonTasksRaw, &customTasksRaw) + + runRaw, err := api.db.GetPipelineRun(api.db, namespaceID, pipelineID, runID) + if err != nil { + return err + } + + var run models.Run + run.FromStorage(&runRaw) + + taskRunsRaw, err := api.db.ListPipelineTaskRuns(api.db, 0, 0, namespaceID, pipelineID, runID) + if err != nil { + return err + } + + var taskRuns []models.TaskRun + for _, taskRunRaw := range taskRunsRaw { + var taskRun models.TaskRun + taskRun.FromStorage(&taskRunRaw) + taskRuns = append(taskRuns, taskRun) + } + // In order to manage the orphaned run we will create a new state machine and make it part of that. - runStateMachine := api.newRunStateMachine(&pipeline, &run) + runStateMachine := api.newRunStateMachine(&metadata, &latestConfig, &run) // For each run we also need to evaluate the individual task runs. for _, taskrun := range taskRuns { diff --git a/internal/api/auth.go b/internal/api/auth.go index 0181670a..9c2f2985 100644 --- a/internal/api/auth.go +++ b/internal/api/auth.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" grpc_auth "github.com/grpc-ecosystem/go-grpc-middleware/auth" "github.com/rs/zerolog/log" "google.golang.org/grpc" @@ -51,10 +51,14 @@ func (api *API) createNewAPIToken() (token string, hash string) { func (api *API) getAPIToken(token string) (*models.Token, error) { hash := getHash(token) - tokenDetails, err := api.db.GetToken(hash) + tokenDetailsRaw, err := api.db.GetToken(api.db, hash) if err != nil { return nil, err } + + var tokenDetails models.Token + tokenDetails.FromStorage(&tokenDetailsRaw) + return &tokenDetails, nil } diff --git a/internal/api/commonTaskHandlers.go b/internal/api/commonTaskHandlers.go index 8bba0a59..22de5629 100644 --- a/internal/api/commonTaskHandlers.go +++ b/internal/api/commonTaskHandlers.go @@ -7,9 +7,9 @@ import ( "fmt" "strings" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/scheduler" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/rs/zerolog/log" @@ -110,7 +110,7 @@ func (api *API) InstallCommonTask(ctx context.Context, request *proto.InstallCom registration := models.CommonTaskRegistration{} registration.FromInstallCommonTaskRequest(request) - err := api.db.InsertCommonTaskRegistration(®istration) + err := api.db.InsertCommonTaskRegistration(api.db, registration.ToStorage()) if err != nil { if errors.Is(err, storage.ErrEntityExists) { return &proto.InstallCommonTaskResponse{}, status.Errorf(codes.AlreadyExists, "common task is %s already installed", request.Name) @@ -138,7 +138,7 @@ func (api *API) InstallCommonTask(ctx context.Context, request *proto.InstallCom func (api *API) UninstallCommonTask(ctx context.Context, request *proto.UninstallCommonTaskRequest) (*proto.UninstallCommonTaskResponse, error) { api.commonTasks.Delete(request.Name) - err := api.db.DeleteCommonTaskRegistration(request.Name) + err := api.db.DeleteCommonTaskRegistration(api.db, request.Name) if err != nil { log.Error().Err(err).Msg("could not delete common task registration") return &proto.UninstallCommonTaskResponse{}, status.Errorf(codes.Internal, "could not delete common task registration: %v", err) @@ -154,8 +154,8 @@ func (api *API) UninstallCommonTask(ctx context.Context, request *proto.Uninstal } func (api *API) EnableCommonTask(ctx context.Context, request *proto.EnableCommonTaskRequest) (*proto.EnableCommonTaskResponse, error) { - err := api.db.UpdateCommonTaskRegistration(request.Name, storage.UpdatableCommonTaskRegistrationFields{ - Status: ptr(models.CommonTaskStatusEnabled), + err := api.db.UpdateCommonTaskRegistration(api.db, request.Name, storage.UpdatableCommonTaskRegistrationFields{ + Status: ptr(string(models.CommonTaskStatusEnabled)), }) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { @@ -167,8 +167,8 @@ func (api *API) EnableCommonTask(ctx context.Context, request *proto.EnableCommo err = api.commonTasks.Swap(request.Name, func(value *models.CommonTaskRegistration, exists bool) (*models.CommonTaskRegistration, error) { if !exists { - _ = api.db.UpdateCommonTaskRegistration(request.Name, storage.UpdatableCommonTaskRegistrationFields{ - Status: ptr(models.CommonTaskStatusDisabled), + _ = api.db.UpdateCommonTaskRegistration(api.db, request.Name, storage.UpdatableCommonTaskRegistrationFields{ + Status: ptr(string(models.CommonTaskStatusDisabled)), }) return nil, fmt.Errorf("common task %q not found", request.Name) @@ -185,8 +185,8 @@ func (api *API) EnableCommonTask(ctx context.Context, request *proto.EnableCommo } func (api *API) DisableCommonTask(ctx context.Context, request *proto.DisableCommonTaskRequest) (*proto.DisableCommonTaskResponse, error) { - err := api.db.UpdateCommonTaskRegistration(request.Name, storage.UpdatableCommonTaskRegistrationFields{ - Status: ptr(models.CommonTaskStatusDisabled), + err := api.db.UpdateCommonTaskRegistration(api.db, request.Name, storage.UpdatableCommonTaskRegistrationFields{ + Status: ptr(string(models.CommonTaskStatusDisabled)), }) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { @@ -198,8 +198,8 @@ func (api *API) DisableCommonTask(ctx context.Context, request *proto.DisableCom err = api.commonTasks.Swap(request.Name, func(value *models.CommonTaskRegistration, exists bool) (*models.CommonTaskRegistration, error) { if !exists { - _ = api.db.UpdateCommonTaskRegistration(request.Name, storage.UpdatableCommonTaskRegistrationFields{ - Status: ptr(models.CommonTaskStatusEnabled), + _ = api.db.UpdateCommonTaskRegistration(api.db, request.Name, storage.UpdatableCommonTaskRegistrationFields{ + Status: ptr(string(models.CommonTaskStatusEnabled)), }) return nil, fmt.Errorf("common task %q not found", request.Name) diff --git a/internal/api/commonTasks.go b/internal/api/commonTasks.go index 55786f83..ce147e25 100644 --- a/internal/api/commonTasks.go +++ b/internal/api/commonTasks.go @@ -1,24 +1,20 @@ package api import ( - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" "github.com/rs/zerolog/log" ) func (api *API) restoreRegisteredCommonTasks() error { - registeredCommonTasks, err := api.db.ListCommonTaskRegistrations(0, 0) + registeredCommonTasks, err := api.db.ListCommonTaskRegistrations(api.db, 0, 0) if err != nil { return err } - for _, commonTask := range registeredCommonTasks { - api.commonTasks.Set(commonTask.Name, &models.CommonTaskRegistration{ - Name: commonTask.Name, - Image: commonTask.Image, - RegistryAuth: commonTask.RegistryAuth, - Variables: commonTask.Variables, - Documentation: commonTask.Documentation, - }) + for _, commonTaskRaw := range registeredCommonTasks { + var commonTask models.CommonTaskRegistration + commonTask.FromStorage(&commonTaskRaw) + api.commonTasks.Set(commonTask.Name, &commonTask) log.Info().Str("name", commonTask.Name).Msg("restored common task registration") } diff --git a/internal/api/deploymentsHandlers.go b/internal/api/deploymentsHandlers.go new file mode 100644 index 00000000..810217c3 --- /dev/null +++ b/internal/api/deploymentsHandlers.go @@ -0,0 +1,69 @@ +package api + +import ( + "context" + "errors" + + "github.com/clintjedwards/gofer/internal/models" + "github.com/clintjedwards/gofer/internal/storage" + proto "github.com/clintjedwards/gofer/proto/go" + + "github.com/rs/zerolog/log" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (api *API) GetDeployment(ctx context.Context, request *proto.GetDeploymentRequest) (*proto.GetDeploymentResponse, error) { + namespace, err := api.resolveNamespace(ctx, request.NamespaceId) + if err != nil { + return &proto.GetDeploymentResponse{}, + status.Errorf(codes.FailedPrecondition, "error retrieving namespace %q; %v", request.NamespaceId, err.Error()) + } + + request.NamespaceId = namespace + + deploymentRaw, err := api.db.GetPipelineDeployment(api.db, request.NamespaceId, request.PipelineId, request.Id) + if err != nil { + if errors.Is(err, storage.ErrEntityNotFound) { + return &proto.GetDeploymentResponse{}, status.Error(codes.FailedPrecondition, "deployment not found") + } + log.Error().Err(err).Int64("Deployment", request.Id).Msg("could not get deployment") + return &proto.GetDeploymentResponse{}, status.Error(codes.Internal, "failed to retrieve deployment from database") + } + + var deployment models.Deployment + deployment.FromStorage(&deploymentRaw) + + return &proto.GetDeploymentResponse{Deployment: deployment.ToProto()}, nil +} + +func (api *API) ListDeployments(ctx context.Context, request *proto.ListDeploymentsRequest) (*proto.ListDeploymentsResponse, error) { + if request.PipelineId == "" { + return &proto.ListDeploymentsResponse{}, status.Error(codes.FailedPrecondition, "id required") + } + + namespace, err := api.resolveNamespace(ctx, request.NamespaceId) + if err != nil { + return &proto.ListDeploymentsResponse{}, + status.Errorf(codes.FailedPrecondition, "error retrieving namespace %q; %v", request.NamespaceId, err.Error()) + } + + request.NamespaceId = namespace + + deployments, err := api.db.ListPipelineDeployments(api.db, int(request.Offset), int(request.Limit), request.NamespaceId, request.PipelineId) + if err != nil { + log.Error().Err(err).Msg("could not get deployments") + return &proto.ListDeploymentsResponse{}, status.Error(codes.Internal, "failed to retrieve deployments from database") + } + + protoDeployments := []*proto.Deployment{} + for _, deploymentRaw := range deployments { + var deployment models.Deployment + deployment.FromStorage(&deploymentRaw) + protoDeployments = append(protoDeployments, deployment.ToProto()) + } + + return &proto.ListDeploymentsResponse{ + Deployments: protoDeployments, + }, nil +} diff --git a/internal/api/eventsHandlers.go b/internal/api/eventsHandlers.go index e7a7c29c..56808cfe 100644 --- a/internal/api/eventsHandlers.go +++ b/internal/api/eventsHandlers.go @@ -5,7 +5,7 @@ import ( "errors" "github.com/clintjedwards/gofer/internal/eventbus" - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/rs/zerolog/log" diff --git a/internal/api/namespaces.go b/internal/api/namespaces.go index af947fbc..7e4775fd 100644 --- a/internal/api/namespaces.go +++ b/internal/api/namespaces.go @@ -53,7 +53,7 @@ func (api *API) resolveNamespace(ctx context.Context, intendedNamespace string) } } - _, err := api.db.GetNamespace(intendedNamespace) + _, err := api.db.GetNamespace(api.db, intendedNamespace) if err != nil { return "", err } diff --git a/internal/api/namespacesHandlers.go b/internal/api/namespacesHandlers.go index b44e644f..5e3b8f2b 100644 --- a/internal/api/namespacesHandlers.go +++ b/internal/api/namespacesHandlers.go @@ -6,8 +6,8 @@ import ( "strings" "time" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/rs/zerolog/log" @@ -20,7 +20,7 @@ func (api *API) GetNamespace(ctx context.Context, request *proto.GetNamespaceReq return &proto.GetNamespaceResponse{}, status.Error(codes.FailedPrecondition, "id required") } - namespace, err := api.db.GetNamespace(request.Id) + namespaceRaw, err := api.db.GetNamespace(api.db, request.Id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.GetNamespaceResponse{}, status.Error(codes.FailedPrecondition, "namespace not found") @@ -29,18 +29,23 @@ func (api *API) GetNamespace(ctx context.Context, request *proto.GetNamespaceReq return &proto.GetNamespaceResponse{}, status.Error(codes.Internal, "failed to retrieve namespace from database") } + var namespace models.Namespace + namespace.FromStorage(&namespaceRaw) + return &proto.GetNamespaceResponse{Namespace: namespace.ToProto()}, nil } func (api *API) ListNamespaces(ctx context.Context, request *proto.ListNamespacesRequest) (*proto.ListNamespacesResponse, error) { - namespaces, err := api.db.ListNamespaces(int(request.Offset), int(request.Limit)) + namespaces, err := api.db.ListNamespaces(api.db, int(request.Offset), int(request.Limit)) if err != nil { log.Error().Err(err).Msg("could not get namespaces") return &proto.ListNamespacesResponse{}, status.Error(codes.Internal, "failed to retrieve namespaces from database") } protoNamespaces := []*proto.Namespace{} - for _, namespace := range namespaces { + for _, namespaceRaw := range namespaces { + var namespace models.Namespace + namespace.FromStorage(&namespaceRaw) protoNamespaces = append(protoNamespaces, namespace.ToProto()) } @@ -71,7 +76,7 @@ func (api *API) CreateNamespace(ctx context.Context, request *proto.CreateNamesp newNamespace := models.NewNamespace(request.Id, request.Name, request.Description) - err := api.db.InsertNamespace(newNamespace) + err := api.db.InsertNamespace(api.db, newNamespace.ToStorage()) if err != nil { if errors.Is(err, storage.ErrEntityExists) { return &proto.CreateNamespaceResponse{}, @@ -100,7 +105,7 @@ func (api *API) UpdateNamespace(ctx context.Context, request *proto.UpdateNamesp return &proto.UpdateNamespaceResponse{}, status.Error(codes.FailedPrecondition, "id required") } - err := api.db.UpdateNamespace(request.Id, storage.UpdatableNamespaceFields{ + err := api.db.UpdateNamespace(api.db, request.Id, storage.UpdatableNamespaceFields{ Name: &request.Name, Description: &request.Description, Modified: ptr(time.Now().UnixMilli()), @@ -125,7 +130,7 @@ func (api *API) DeleteNamespace(ctx context.Context, request *proto.DeleteNamesp return &proto.DeleteNamespaceResponse{}, status.Error(codes.FailedPrecondition, "id required") } - err := api.db.DeleteNamespace(request.Id) + err := api.db.DeleteNamespace(api.db, request.Id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.DeleteNamespaceResponse{}, status.Error(codes.FailedPrecondition, "could not find namespace") diff --git a/internal/api/objectStore.go b/internal/api/objectStore.go index 31d0c76e..73d79121 100644 --- a/internal/api/objectStore.go +++ b/internal/api/objectStore.go @@ -3,22 +3,28 @@ package api import ( "strings" - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" + "github.com/clintjedwards/gofer/internal/storage" "github.com/rs/zerolog/log" ) // addPipelineObject adds an object to the pipeline specific object registry. // If this registry is at the limit it removes the least recently added pipeline object and // puts the new item on top. -func (api *API) addPipelineObject(namespace, pipeline, key string, content []byte, force bool) (string, error) { - objectKeys, err := api.db.ListObjectStorePipelineKeys(namespace, pipeline) +func (api *API) addPipelineObject(namespace, pipeline string, key string, content []byte, force bool) (string, error) { + objectKeys, err := api.db.ListObjectStorePipelineKeys(api.db, namespace, pipeline) if err != nil { return "", err } newObjectKey := models.NewObjectStoreKey(key) - err = api.db.InsertObjectStorePipelineKey(namespace, pipeline, newObjectKey) + err = api.db.InsertObjectStorePipelineKey(api.db, &storage.ObjectStorePipelineKey{ + Namespace: namespace, + Pipeline: pipeline, + Key: newObjectKey.Key, + Created: newObjectKey.Created, + }) if err != nil { return "", err } diff --git a/internal/api/objectStoreHandlers.go b/internal/api/objectStoreHandlers.go index 87cbae60..da982b66 100644 --- a/internal/api/objectStoreHandlers.go +++ b/internal/api/objectStoreHandlers.go @@ -5,9 +5,9 @@ import ( "errors" "fmt" + "github.com/clintjedwards/gofer/internal/models" objectstore "github.com/clintjedwards/gofer/internal/objectStore" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "google.golang.org/grpc/codes" @@ -27,13 +27,16 @@ func (api *API) ListPipelineObjects(ctx context.Context, request *proto.ListPipe return &proto.ListPipelineObjectsResponse{}, status.Error(codes.PermissionDenied, "access denied") } - keys, err := api.db.ListObjectStorePipelineKeys(request.NamespaceId, request.PipelineId) + keys, err := api.db.ListObjectStorePipelineKeys(api.db, request.NamespaceId, request.PipelineId) if err != nil { return &proto.ListPipelineObjectsResponse{}, err } var protoKeys []*proto.ObjectStoreKey - for _, key := range keys { + for _, keyRaw := range keys { + var key models.ObjectStoreKey + key.Key = keyRaw.Key + key.Created = keyRaw.Created protoKeys = append(protoKeys, key.ToProto()) } @@ -78,8 +81,8 @@ func (api *API) PutPipelineObject(ctx context.Context, request *proto.PutPipelin return &proto.PutPipelineObjectResponse{}, status.Error(codes.PermissionDenied, "access denied") } - evictedObject, err := api.addPipelineObject(request.NamespaceId, - request.PipelineId, request.Key, request.Content, request.Force) + evictedObject, err := api.addPipelineObject(request.NamespaceId, request.PipelineId, request.Key, + request.Content, request.Force) if err != nil { if errors.Is(err, objectstore.ErrEntityExists) { return &proto.PutPipelineObjectResponse{}, status.Error(codes.FailedPrecondition, @@ -129,13 +132,16 @@ func (api *API) ListRunObjects(ctx context.Context, request *proto.ListRunObject return &proto.ListRunObjectsResponse{}, status.Error(codes.PermissionDenied, "access denied") } - keys, err := api.db.ListObjectStoreRunKeys(request.NamespaceId, request.PipelineId, request.RunId) + keys, err := api.db.ListObjectStoreRunKeys(api.db, request.NamespaceId, request.PipelineId, request.RunId) if err != nil { return &proto.ListRunObjectsResponse{}, err } var protoKeys []*proto.ObjectStoreKey - for _, key := range keys { + for _, keyRaw := range keys { + var key models.ObjectStoreKey + key.Key = keyRaw.Key + key.Created = keyRaw.Created protoKeys = append(protoKeys, key.ToProto()) } @@ -182,7 +188,13 @@ func (api *API) PutRunObject(ctx context.Context, request *proto.PutRunObjectReq newObjectKey := models.NewObjectStoreKey(request.Key) - err = api.db.InsertObjectStoreRunKey(request.NamespaceId, request.PipelineId, request.RunId, newObjectKey) + err = api.db.InsertObjectStoreRunKey(api.db, &storage.ObjectStoreRunKey{ + Namespace: namespace, + Pipeline: request.PipelineId, + Run: request.RunId, + Key: newObjectKey.Key, + Created: newObjectKey.Created, + }) if err != nil { if errors.Is(err, storage.ErrEntityExists) { return &proto.PutRunObjectResponse{}, diff --git a/internal/api/pipelineConfigsHandler.go b/internal/api/pipelineConfigsHandler.go new file mode 100644 index 00000000..11ed9b5a --- /dev/null +++ b/internal/api/pipelineConfigsHandler.go @@ -0,0 +1,225 @@ +package api + +import ( + "context" + "errors" + + "github.com/clintjedwards/gofer/internal/models" + "github.com/clintjedwards/gofer/internal/storage" + proto "github.com/clintjedwards/gofer/proto/go" + "github.com/jmoiron/sqlx" + "github.com/rs/zerolog/log" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (api *API) RegisterPipelineConfig(ctx context.Context, request *proto.RegisterPipelineConfigRequest) (*proto.RegisterPipelineConfigResponse, error) { + namespace, err := api.resolveNamespace(ctx, request.NamespaceId) + if err != nil { + return nil, status.Errorf(codes.FailedPrecondition, "error retrieving namespace %q; %v", request.NamespaceId, err.Error()) + } + + request.NamespaceId = namespace + + if request.PipelineConfig == nil { + return nil, status.Error(codes.FailedPrecondition, "pipeline configuration required but not found") + } + + if !hasAccess(ctx, request.NamespaceId) { + return nil, status.Error(codes.PermissionDenied, "access denied") + } + + var metadata *models.PipelineMetadata + var config *models.PipelineConfig + + err = storage.InsideTx(api.db.DB, func(tx *sqlx.Tx) error { + metadata = models.NewPipelineMetadata(request.NamespaceId, request.PipelineConfig.Id, request.Disable) + + // First check if the pipeline already exists, if it doesn't we'll register it for the user automatically. + err = api.db.InsertPipelineMetadata(tx, metadata.ToStorage()) + if err != nil { + if !errors.Is(err, storage.ErrEntityExists) { + log.Error().Err(err).Msg("could not insert pipeline") + return err + } + } + + var latestVersion int64 + + latestConfig, err := api.db.GetCurrentPipelineConfig(tx, request.NamespaceId, request.PipelineConfig.Id) + if err != nil { + if !errors.Is(err, storage.ErrEntityNotFound) { + return err + } + } else { + latestVersion = latestConfig.Version + } + + config = models.NewPipelineConfig(request.NamespaceId, request.PipelineConfig.Id, latestVersion+1, request.PipelineConfig) + mainConfig, commonTaskConfigs, customTaskConfigs := config.ToStorage() + + err = api.db.InsertPipelineConfig(tx, mainConfig) + if err != nil { + return err + } + + for _, commonTaskConfig := range commonTaskConfigs { + err = api.db.InsertPipelineCommonTaskSettings(tx, commonTaskConfig) + if err != nil { + return err + } + } + + for _, customTaskConfig := range customTaskConfigs { + err = api.db.InsertPipelineCustomTask(tx, customTaskConfig) + if err != nil { + return err + } + } + + return nil + }) + if err != nil { + log.Error().Err(err).Msg("could not register pipeline due to database error") + return nil, status.Errorf(codes.Internal, "could not register pipeline %v", err) + } + + if config.Version == 1 { + go api.events.Publish(models.EventRegisteredPipeline{ + NamespaceID: metadata.Namespace, + PipelineID: metadata.ID, + }) + } + + go api.events.Publish(models.EventRegisteredPipelineConfig{ + NamespaceID: metadata.Namespace, + PipelineID: metadata.ID, + Version: config.Version, + }) + + return &proto.RegisterPipelineConfigResponse{ + Pipeline: &proto.Pipeline{ + Metadata: metadata.ToProto(), + Config: config.ToProto(), + }, + }, nil +} + +func (api *API) ListPipelineConfigs(ctx context.Context, request *proto.ListPipelineConfigsRequest) ( + *proto.ListPipelineConfigsResponse, error, +) { + namespace, err := api.resolveNamespace(ctx, request.NamespaceId) + if err != nil { + return &proto.ListPipelineConfigsResponse{}, + status.Errorf(codes.FailedPrecondition, "error retrieving namespace %q; %v", request.NamespaceId, err.Error()) + } + + request.NamespaceId = namespace + + configsRaw, err := api.db.ListPipelineConfigs(api.db, int(request.Offset), int(request.Limit), + request.NamespaceId, request.PipelineId) + if err != nil { + log.Error().Err(err).Msg("could not get configs") + return &proto.ListPipelineConfigsResponse{}, status.Error(codes.Internal, "failed to retrieve configs from database") + } + + protoConfigs := []*proto.PipelineConfig{} + for _, configRaw := range configsRaw { + + commonTasks, err := api.db.ListPipelineCommonTaskSettings(api.db, request.NamespaceId, request.PipelineId, configRaw.Version) + if err != nil { + log.Error().Err(err).Msg("could not get configs") + return &proto.ListPipelineConfigsResponse{}, status.Error(codes.Internal, "failed to retrieve configs from database") + } + + customTasks, err := api.db.ListPipelineCustomTasks(api.db, request.NamespaceId, request.PipelineId, configRaw.Version) + if err != nil { + log.Error().Err(err).Msg("could not get configs") + return &proto.ListPipelineConfigsResponse{}, status.Error(codes.Internal, "failed to retrieve configs from database") + } + + var config models.PipelineConfig + config.FromStorage(&configRaw, &commonTasks, &customTasks) + protoConfigs = append(protoConfigs, config.ToProto()) + } + + return &proto.ListPipelineConfigsResponse{ + Configs: protoConfigs, + }, nil +} + +func (api *API) GetPipelineConfig(ctx context.Context, request *proto.GetPipelineConfigRequest) ( + *proto.GetPipelineConfigResponse, error, +) { + if request.PipelineId == "" { + return &proto.GetPipelineConfigResponse{}, status.Error(codes.FailedPrecondition, "pipeline id required") + } + + namespace, err := api.resolveNamespace(ctx, request.NamespaceId) + if err != nil { + return &proto.GetPipelineConfigResponse{}, + status.Errorf(codes.FailedPrecondition, "error retrieving namespace %q; %v", request.NamespaceId, err.Error()) + } + + request.NamespaceId = namespace + + configRaw, err := api.db.GetPipelineConfig(api.db, request.NamespaceId, request.PipelineId, request.Version) + if err != nil { + log.Error().Err(err).Msg("could not get config") + return &proto.GetPipelineConfigResponse{}, status.Error(codes.Internal, "failed to retrieve config from database") + } + + commonTasks, err := api.db.ListPipelineCommonTaskSettings(api.db, request.NamespaceId, request.PipelineId, request.Version) + if err != nil { + log.Error().Err(err).Msg("could not get config") + return &proto.GetPipelineConfigResponse{}, status.Error(codes.Internal, "failed to retrieve config from database") + } + + customTasks, err := api.db.ListPipelineCustomTasks(api.db, request.NamespaceId, request.PipelineId, request.Version) + if err != nil { + log.Error().Err(err).Msg("could not get config") + return &proto.GetPipelineConfigResponse{}, status.Error(codes.Internal, "failed to retrieve config from database") + } + + var config models.PipelineConfig + config.FromStorage(&configRaw, &commonTasks, &customTasks) + + return &proto.GetPipelineConfigResponse{Config: config.ToProto()}, nil +} + +func (api *API) DeletePipelineConfig(ctx context.Context, request *proto.DeletePipelineConfigRequest) ( + *proto.DeletePipelineConfigResponse, error, +) { + if request.PipelineId == "" { + return &proto.DeletePipelineConfigResponse{}, status.Error(codes.FailedPrecondition, "id required") + } + + namespace, err := api.resolveNamespace(ctx, request.NamespaceId) + if err != nil { + return &proto.DeletePipelineConfigResponse{}, + status.Errorf(codes.FailedPrecondition, "error retrieving namespace %q; %v", request.NamespaceId, err.Error()) + } + + request.NamespaceId = namespace + + if !hasAccess(ctx, request.NamespaceId) { + return &proto.DeletePipelineConfigResponse{}, status.Error(codes.PermissionDenied, "access denied") + } + + err = api.db.DeletePipelineConfig(api.db, request.NamespaceId, request.PipelineId, request.Version) + if err != nil { + if errors.Is(err, storage.ErrEntityNotFound) { + return &proto.DeletePipelineConfigResponse{}, status.Error(codes.FailedPrecondition, "config not found") + } + log.Error().Err(err).Msg("could not get config") + return &proto.DeletePipelineConfigResponse{}, status.Error(codes.Internal, "failed to retrieve config from database") + } + + go api.events.Publish(models.EventDeletedPipelineConfig{ + NamespaceID: request.NamespaceId, + PipelineID: request.PipelineId, + Version: request.Version, + }) + + return &proto.DeletePipelineConfigResponse{}, nil +} diff --git a/internal/api/pipelines.go b/internal/api/pipelines.go index 7ad0cc0f..b94c6080 100644 --- a/internal/api/pipelines.go +++ b/internal/api/pipelines.go @@ -3,43 +3,18 @@ package api import ( "context" "fmt" + "time" - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" + "github.com/clintjedwards/gofer/internal/storage" proto "github.com/clintjedwards/gofer/proto/go" + "github.com/jmoiron/sqlx" "github.com/rs/zerolog/log" "google.golang.org/grpc/metadata" ) -// validateConfigTriggers makes sure the triggers in a potential trigger config exists within the currently registered -// API triggers. -func (api *API) configTriggersIsValid(triggers map[string]models.PipelineTriggerSettings) error { - for _, potentialTrigger := range triggers { - _, exists := api.triggers.Get(potentialTrigger.Name) - if !exists { - return fmt.Errorf("could not find trigger %q in gofer registered triggers: %w", potentialTrigger.Name, - ErrTriggerNotFound) - } - } - - return nil -} - -// unsubscribeTriggers removes passed triggers from a particular pipeline object. -// The trigger map is "label" -> "name" -func (api *API) unsubscribeTriggers(namespace, pipeline string, trigger map[string]string) error { - for label, name := range trigger { - err := api.unsubscribeTrigger(namespace, pipeline, name, label) - if err != nil { - log.Error().Err(err).Msg("could not unsubscribe trigger") - continue - } - } - - return nil -} - // unsubscribeTrigger contacts the trigger and remove the pipeline subscription. -func (api *API) unsubscribeTrigger(namespace, pipeline, name, label string) error { +func (api *API) unsubscribeTrigger(namespace, pipeline string, name, label string) error { trigger, exists := api.triggers.Get(name) if !exists { return fmt.Errorf("could not find trigger name %q in registered trigger list", name) @@ -73,25 +48,6 @@ func (api *API) unsubscribeTrigger(namespace, pipeline, name, label string) erro return nil } -// subscribeTriggers takes a list of triggers for a particular pipeline and attempts to subscribe them all. -// It will return an error if one of the subscription processes fails but it will always -// return a list of trigger names that have been successfully subscribed. -// This returned list can be used to rollback subscriptions if need be. -func (api *API) subscribeTriggers(namespace, pipeline string, configs []models.PipelineTriggerSettings) ([]models.PipelineTriggerSettings, error) { - successfulSubscriptions := []models.PipelineTriggerSettings{} - - for _, config := range configs { - err := api.subscribeTrigger(namespace, pipeline, &config) - if err != nil { - return successfulSubscriptions, fmt.Errorf("could not subscribe to trigger %q (%q)", config.Name, config.Label) - } - - successfulSubscriptions = append(successfulSubscriptions, config) - } - - return successfulSubscriptions, nil -} - // subscribeTrigger takes a pipeline config requested trigger and communicates with the trigger container // in order appropriately make sure the trigger is aware for the pipeline. func (api *API) subscribeTrigger(namespace, pipeline string, config *models.PipelineTriggerSettings) error { @@ -136,14 +92,14 @@ func (api *API) subscribeTrigger(namespace, pipeline string, config *models.Pipe // collectAllPipelines attempts to return a single list of all pipelines within the gofer service. // Useful for functions where we must operate globally. -func (api *API) collectAllPipelines() ([]models.Pipeline, error) { - allNamespaces := []models.Namespace{} +func (api *API) collectAllPipelines() ([]storage.PipelineMetadata, error) { + allNamespaces := []storage.Namespace{} offset := 0 for { - namespaces, err := api.db.ListNamespaces(offset, 0) + namespaces, err := api.db.ListNamespaces(api.db, offset, 0) if err != nil { - return []models.Pipeline{}, fmt.Errorf("could not get all namespaces; %w", err) + return []storage.PipelineMetadata{}, fmt.Errorf("could not get all namespaces; %w", err) } if len(namespaces) == 0 { @@ -154,14 +110,14 @@ func (api *API) collectAllPipelines() ([]models.Pipeline, error) { offset += 100 } - allPipelines := []models.Pipeline{} + allPipelines := []storage.PipelineMetadata{} for _, namespace := range allNamespaces { offset := 0 for { - pipelines, err := api.db.ListPipelines(offset, 0, namespace.ID) + pipelines, err := api.db.ListPipelineMetadata(api.db, offset, 0, namespace.ID) if err != nil { - return []models.Pipeline{}, fmt.Errorf("could not get all pipelines; %w", err) + return []storage.PipelineMetadata{}, fmt.Errorf("could not get all pipelines; %w", err) } if len(pipelines) == 0 { @@ -175,3 +131,74 @@ func (api *API) collectAllPipelines() ([]models.Pipeline, error) { return allPipelines, nil } + +func (api *API) disablePipeline(pipeline *models.PipelineMetadata) error { + if pipeline.State == models.PipelineStateDisabled { + return nil + } + + err := api.db.UpdatePipelineMetadata(api.db, pipeline.Namespace, pipeline.ID, storage.UpdatablePipelineMetadataFields{ + State: ptr(string(models.PipelineStateDisabled)), + Modified: ptr(time.Now().UnixMilli()), + }) + if err != nil { + return err + } + + go api.events.Publish(models.EventDisabledPipeline{ + NamespaceID: pipeline.Namespace, + PipelineID: pipeline.ID, + }) + + return nil +} + +// Return pipeline object from DB. Passing -1 as the version gets the latest version. +func (api *API) getPipelineFromDB(namespace, id string, version int64) (*models.Pipeline, error) { + var metadata models.PipelineMetadata + var config models.PipelineConfig + + err := storage.InsideTx(api.db.DB, func(tx *sqlx.Tx) error { + if version < 0 { + latestConfig, err := api.db.GetCurrentPipelineConfig(tx, namespace, id) + if err != nil { + return err + } + + version = latestConfig.Version + } + + configRaw, err := api.db.GetPipelineConfig(tx, namespace, id, version) + if err != nil { + return err + } + + commonTasksRaw, err := api.db.ListPipelineCommonTaskSettings(tx, namespace, id, version) + if err != nil { + return err + } + + customTasksRaw, err := api.db.ListPipelineCustomTasks(tx, namespace, id, version) + if err != nil { + return err + } + + metadataRaw, err := api.db.GetPipelineMetadata(tx, namespace, id) + if err != nil { + return err + } + + config.FromStorage(&configRaw, &commonTasksRaw, &customTasksRaw) + metadata.FromStorage(&metadataRaw) + + return nil + }) + if err != nil { + return nil, err + } + + return &models.Pipeline{ + Metadata: metadata, + Config: config, + }, nil +} diff --git a/internal/api/pipelinesHandlers.go b/internal/api/pipelinesHandlers.go index 86454153..de12e877 100644 --- a/internal/api/pipelinesHandlers.go +++ b/internal/api/pipelinesHandlers.go @@ -3,11 +3,13 @@ package api import ( "context" "errors" + "fmt" "time" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" + "github.com/jmoiron/sqlx" "github.com/rs/zerolog/log" "google.golang.org/grpc/codes" @@ -27,7 +29,7 @@ func (api *API) GetPipeline(ctx context.Context, request *proto.GetPipelineReque request.NamespaceId = namespace - pipeline, err := api.db.GetPipeline(nil, request.NamespaceId, request.Id) + pipeline, err := api.getPipelineFromDB(request.NamespaceId, request.Id, request.Version) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.GetPipelineResponse{}, status.Error(codes.FailedPrecondition, "pipeline not found") @@ -36,7 +38,12 @@ func (api *API) GetPipeline(ctx context.Context, request *proto.GetPipelineReque return &proto.GetPipelineResponse{}, status.Error(codes.Internal, "failed to retrieve pipeline from database") } - return &proto.GetPipelineResponse{Pipeline: pipeline.ToProto()}, nil + response := &proto.Pipeline{ + Metadata: pipeline.Metadata.ToProto(), + Config: pipeline.Config.ToProto(), + } + + return &proto.GetPipelineResponse{Pipeline: response}, nil } func (api *API) DisablePipeline(ctx context.Context, request *proto.DisablePipelineRequest) (*proto.DisablePipelineResponse, error) { @@ -56,7 +63,7 @@ func (api *API) DisablePipeline(ctx context.Context, request *proto.DisablePipel return &proto.DisablePipelineResponse{}, status.Error(codes.PermissionDenied, "access denied") } - currentPipeline, err := api.db.GetPipeline(nil, request.NamespaceId, request.Id) + metadataRaw, err := api.db.GetPipelineMetadata(api.db, request.NamespaceId, request.Id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.DisablePipelineResponse{}, status.Errorf(codes.NotFound, "pipeline %q not found", request.Id) @@ -65,27 +72,18 @@ func (api *API) DisablePipeline(ctx context.Context, request *proto.DisablePipel return &proto.DisablePipelineResponse{}, status.Errorf(codes.Internal, "could not get pipeline %q", request.Id) } - if currentPipeline.State == models.PipelineStateDisabled { - return &proto.DisablePipelineResponse{}, nil - } + var metadata models.PipelineMetadata + metadata.FromStorage(&metadataRaw) - err = api.db.UpdatePipeline(request.NamespaceId, request.Id, storage.UpdatablePipelineFields{ - State: ptr(models.PipelineStateDisabled), - Modified: ptr(time.Now().UnixMilli()), - }) + err = api.disablePipeline(&metadata) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { - return &proto.DisablePipelineResponse{}, status.Errorf(codes.NotFound, "pipeline %q not found", request.Id) + return nil, status.Errorf(codes.NotFound, "pipeline %q not found", request.Id) } log.Error().Err(err).Str("id", request.Id).Msg("could not save updated pipeline to storage") - return &proto.DisablePipelineResponse{}, status.Errorf(codes.Internal, "could not save updated pipeline %q", request.Id) + return nil, status.Errorf(codes.Internal, "could not save updated pipeline %q", request.Id) } - go api.events.Publish(models.EventDisabledPipeline{ - NamespaceID: request.NamespaceId, - PipelineID: request.Id, - }) - return &proto.DisablePipelineResponse{}, nil } @@ -106,7 +104,7 @@ func (api *API) EnablePipeline(ctx context.Context, request *proto.EnablePipelin return &proto.EnablePipelineResponse{}, status.Error(codes.PermissionDenied, "access denied") } - currentPipeline, err := api.db.GetPipeline(nil, request.NamespaceId, request.Id) + metadataRaw, err := api.db.GetPipelineMetadata(api.db, request.NamespaceId, request.Id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.EnablePipelineResponse{}, status.Errorf(codes.NotFound, "pipeline %q not found", request.Id) @@ -115,12 +113,15 @@ func (api *API) EnablePipeline(ctx context.Context, request *proto.EnablePipelin return &proto.EnablePipelineResponse{}, status.Errorf(codes.Internal, "could not get pipeline %q", request.Id) } - if currentPipeline.State == models.PipelineStateActive { + var metadata models.PipelineMetadata + metadata.FromStorage(&metadataRaw) + + if metadata.State == models.PipelineStateActive { return &proto.EnablePipelineResponse{}, nil } - err = api.db.UpdatePipeline(request.NamespaceId, request.Id, storage.UpdatablePipelineFields{ - State: ptr(models.PipelineStateActive), + err = api.db.UpdatePipelineMetadata(api.db, request.NamespaceId, request.Id, storage.UpdatablePipelineMetadataFields{ + State: ptr(string(models.PipelineStateActive)), Modified: ptr(time.Now().UnixMilli()), }) if err != nil { @@ -149,15 +150,17 @@ func (api *API) ListPipelines(ctx context.Context, request *proto.ListPipelinesR request.NamespaceId = namespace - pipelines, err := api.db.ListPipelines(int(request.Offset), int(request.Limit), request.NamespaceId) + metadataRaw, err := api.db.ListPipelineMetadata(api.db, int(request.Offset), int(request.Limit), request.NamespaceId) if err != nil { log.Error().Err(err).Msg("could not get pipelines") return &proto.ListPipelinesResponse{}, status.Error(codes.Internal, "failed to retrieve pipelines from database") } - protoPipelines := []*proto.Pipeline{} - for _, pipeline := range pipelines { - protoPipelines = append(protoPipelines, pipeline.ToProto()) + protoPipelines := []*proto.PipelineMetadata{} + for _, pipeline := range metadataRaw { + var metadata models.PipelineMetadata + metadata.FromStorage(&pipeline) + protoPipelines = append(protoPipelines, metadata.ToProto()) } return &proto.ListPipelinesResponse{ @@ -165,154 +168,155 @@ func (api *API) ListPipelines(ctx context.Context, request *proto.ListPipelinesR }, nil } -func (api *API) CreatePipeline(ctx context.Context, request *proto.CreatePipelineRequest) (*proto.CreatePipelineResponse, error) { +func (api *API) DeployPipeline(ctx context.Context, request *proto.DeployPipelineRequest) (*proto.DeployPipelineResponse, error) { namespace, err := api.resolveNamespace(ctx, request.NamespaceId) if err != nil { - return &proto.CreatePipelineResponse{}, - status.Errorf(codes.FailedPrecondition, "error retrieving namespace %q; %v", request.NamespaceId, err.Error()) + return nil, status.Errorf(codes.FailedPrecondition, "error retrieving namespace %q; %v", request.NamespaceId, err.Error()) } request.NamespaceId = namespace - if request.PipelineConfig == nil { - return &proto.CreatePipelineResponse{}, - status.Error(codes.FailedPrecondition, "pipeline configuration required but not found") + if request.Id == "" { + return nil, status.Error(codes.FailedPrecondition, "pipeline id required but not found") } if !hasAccess(ctx, request.NamespaceId) { - return &proto.CreatePipelineResponse{}, status.Error(codes.PermissionDenied, "access denied") + return nil, status.Error(codes.PermissionDenied, "access denied") } - newPipeline := models.NewPipeline(request.NamespaceId, request.PipelineConfig) + var startVersion int64 + var endVersion int64 + var deploymentID int64 - err = api.configTriggersIsValid(newPipeline.Triggers) - if err != nil { - return &proto.CreatePipelineResponse{}, - status.Error(codes.FailedPrecondition, err.Error()) - } - - err = api.db.InsertPipeline(newPipeline) - if err != nil { - if errors.Is(err, storage.ErrEntityExists) { - return &proto.CreatePipelineResponse{}, - status.Error(codes.AlreadyExists, "pipeline already exists") + // Step 1: Insert the new deployment + err = storage.InsideTx(api.db.DB, func(tx *sqlx.Tx) error { + // Check that there are no currently running deployments + deployments, err := api.db.ListRunningPipelineDeployments(tx, 0, 1, request.NamespaceId, request.Id) + if err != nil { + return err } - log.Error().Err(err).Msg("could not insert pipeline") - - return &proto.CreatePipelineResponse{}, - status.Error(codes.Internal, "could not insert pipeline") - } - - triggers := []models.PipelineTriggerSettings{} - for _, value := range newPipeline.Triggers { - triggers = append(triggers, value) - } + if len(deployments) != 0 { + log.Error().Str("namespace", request.NamespaceId).Str("pipeline", request.Id). + Int("total_deployments", len(deployments)).Msgf("deployment failure; deployment is already in progress") + return fmt.Errorf("deployment failure; deployment is already in progress") + } - successfulSubscriptions, err := api.subscribeTriggers(newPipeline.Namespace, newPipeline.ID, triggers) - if err != nil { - // Rollback successful subscriptions - triggersToUnsubscribe := map[string]string{} - for _, subscription := range successfulSubscriptions { - triggersToUnsubscribe[subscription.Label] = subscription.Name + // Get the latest configuration so we can get the latest version number that is live. + latestConfigs, err := api.db.ListLivePipelineConfigs(tx, 0, 1, request.NamespaceId, request.Id) + if err != nil { + return err } - _ = api.unsubscribeTriggers(newPipeline.Namespace, newPipeline.ID, triggersToUnsubscribe) - storageErr := api.db.DeletePipeline(newPipeline.Namespace, newPipeline.ID) - if storageErr != nil { - log.Error().Err(err).Msg("could not delete pipeline while trying to rollback subscriptions") + if len(latestConfigs) != 1 { + log.Error().Str("namespace", request.NamespaceId).Str("pipeline", request.Id). + Interface("latest_configs", latestConfigs). + Msgf("deployment failure; found two live configurations where they should be only one") + return fmt.Errorf("deployment failed; found more than one live configuration during start of deploy") } - return &proto.CreatePipelineResponse{}, - status.Errorf(codes.FailedPrecondition, "could not successfully register all subscriptions; %v", err) - } - go api.events.Publish(models.EventCreatedPipeline{ - NamespaceID: newPipeline.Namespace, - PipelineID: newPipeline.ID, - }) + var latestVersion int64 - return &proto.CreatePipelineResponse{ - Pipeline: newPipeline.ToProto(), - }, nil -} + if len(latestConfigs) > 1 { + latestVersion = latestConfigs[0].Version + } -func (api *API) UpdatePipeline(ctx context.Context, request *proto.UpdatePipelineRequest) (*proto.UpdatePipelineResponse, error) { - namespace, err := api.resolveNamespace(ctx, request.NamespaceId) - if err != nil { - return &proto.UpdatePipelineResponse{}, - status.Errorf(codes.FailedPrecondition, "error retrieving namespace %q; %v", request.NamespaceId, err.Error()) - } + // Finally get the latest deployment so we can increment the ID by one. + latestDeployments, err := api.db.ListPipelineDeployments(tx, 0, 1, request.NamespaceId, request.Id) + if err != nil { + return err + } - request.NamespaceId = namespace + var latestDeploymentID int64 - if !hasAccess(ctx, request.NamespaceId) { - return &proto.UpdatePipelineResponse{}, status.Error(codes.PermissionDenied, "access denied") - } + if len(latestDeployments) > 1 { + latestDeploymentID = latestDeployments[0].ID + } - if request.PipelineConfig == nil { - return &proto.UpdatePipelineResponse{}, status.Error(codes.FailedPrecondition, "content required") - } + startVersion = latestVersion + endVersion = request.Version + deploymentID = latestDeploymentID + 1 - updatedPipeline := models.NewPipeline(request.NamespaceId, request.PipelineConfig) - // TODO(clintjedwards): We need a validate here. + deployment := models.NewDeployment(request.NamespaceId, request.Id, deploymentID, startVersion, endVersion) - triggers := []models.PipelineTriggerSettings{} - for _, value := range updatedPipeline.Triggers { - triggers = append(triggers, value) - } + err = api.db.InsertPipelineDeployment(tx, deployment.ToStorage()) + if err != nil { + if errors.Is(err, storage.ErrEntityExists) { + return status.Error(codes.AlreadyExists, "deployment already exists") + } - currentPipeline, err := api.db.GetPipeline(nil, request.NamespaceId, updatedPipeline.ID) - if err != nil { - if errors.Is(err, storage.ErrEntityNotFound) { - return &proto.UpdatePipelineResponse{}, status.Error(codes.FailedPrecondition, "pipeline not found") + log.Error().Err(err).Msg("could not insert deployment") + return status.Error(codes.Internal, "could not insert deployment") } - log.Error().Err(err).Msg("could not get pipeline") - return &proto.UpdatePipelineResponse{}, status.Error(codes.Internal, "failed to retrieve pipeline from database") - } - oldTriggers := map[string]string{} - for _, trigger := range currentPipeline.Triggers { - oldTriggers[trigger.Label] = trigger.Name - } - - err = api.unsubscribeTriggers(request.NamespaceId, updatedPipeline.ID, oldTriggers) + return nil + }) if err != nil { - log.Error().Err(err).Str("pipeline", currentPipeline.ID).Msg("could not unsubscribe triggers") - return &proto.UpdatePipelineResponse{}, status.Error(codes.Internal, "could not unsubscribe triggers") + return nil, err } - successfulSubscriptions, err := api.subscribeTriggers(updatedPipeline.Namespace, updatedPipeline.ID, triggers) - if err != nil { - // Rollback successful subscriptions - triggersToUnsubscribe := map[string]string{} - for _, subscription := range successfulSubscriptions { - triggersToUnsubscribe[subscription.Label] = subscription.Name + // Step 2: Officially start the deployment. + go api.events.Publish(models.EventStartedDeployPipeline{ + NamespaceID: request.NamespaceId, + PipelineID: request.Id, + StartVersion: startVersion, + EndVersion: endVersion, + }) + + // Step 3: We mark the new pipeline config as Live and Active, signifying that it is ready to take traffic. + // If this wasn't a same version upgrade. We mark the old pipeline config as Deprecated and Disabled. + // TODO(clintjedwards): Eventually this will become a more intricate function which will allow for more + // complex deployment types. + + err = storage.InsideTx(api.db.DB, func(tx *sqlx.Tx) error { + err = api.db.UpdatePipelineConfig(tx, request.NamespaceId, request.Id, endVersion, + storage.UpdatablePipelineConfigFields{ + State: ptr(string(models.PipelineConfigStateLive)), + Deprecated: ptr(int64(0)), + }) + if err != nil { + if errors.Is(err, storage.ErrEntityNotFound) { + return status.Errorf(codes.NotFound, "pipeline %q not found", request.Id) + } + log.Error().Err(err).Str("namespace", request.NamespaceId). + Str("pipeline", request.Id).Int64("deployment", deploymentID). + Msg("could not save updated pipeline to storage during deployment") + return status.Errorf(codes.Internal, "could not save updated pipeline %q", request.Id) } - _ = api.unsubscribeTriggers(updatedPipeline.Namespace, updatedPipeline.ID, triggersToUnsubscribe) - storageErr := api.db.DeletePipeline(updatedPipeline.Namespace, updatedPipeline.ID) - if storageErr != nil { - log.Error().Err(err).Msg("could not delete pipeline while trying to rollback subscriptions") + if startVersion != endVersion { + err = api.db.UpdatePipelineConfig(tx, request.NamespaceId, request.Id, startVersion, + storage.UpdatablePipelineConfigFields{ + State: ptr(string(models.PipelineConfigStateDeprecated)), + Deprecated: ptr(time.Now().UnixMilli()), + }) + if err != nil { + if errors.Is(err, storage.ErrEntityNotFound) { + return status.Errorf(codes.NotFound, "pipeline %q not found", request.Id) + } + log.Error().Err(err).Str("namespace", request.NamespaceId). + Str("pipeline", request.Id).Int64("deployment", deploymentID). + Msg("could not save updated pipeline to storage during deployment") + return status.Errorf(codes.Internal, "could not save updated pipeline %q", request.Id) + } } - return &proto.UpdatePipelineResponse{}, - status.Errorf(codes.FailedPrecondition, "could not successfully register all subscriptions; %v", err) - } - err = api.db.UpdatePipeline(request.NamespaceId, updatedPipeline.ID, storage.UpdatablePipelineFields{ - Name: &updatedPipeline.Name, - Description: &updatedPipeline.Description, - Parallelism: &updatedPipeline.Parallelism, - Modified: ptr(time.Now().UnixMilli()), - Tasks: &updatedPipeline.CustomTasks, - Triggers: &updatedPipeline.Triggers, - CommonTasks: &updatedPipeline.CommonTasks, + return nil }) if err != nil { - return nil, err + return nil, status.Errorf(codes.Internal, "could not finished deployment: %v", err) } - return &proto.UpdatePipelineResponse{ - Pipeline: updatedPipeline.ToProto(), + // Lastly: We're done. So now we just need to complete the deployment. + go api.events.Publish(models.EventCompletedDeployPipeline{ + NamespaceID: request.NamespaceId, + PipelineID: request.Id, + StartVersion: startVersion, + EndVersion: endVersion, + }) + + return &proto.DeployPipelineResponse{ + DeploymentId: deploymentID, }, nil } @@ -333,26 +337,7 @@ func (api *API) DeletePipeline(ctx context.Context, request *proto.DeletePipelin return &proto.DeletePipelineResponse{}, status.Error(codes.PermissionDenied, "access denied") } - pipeline, err := api.db.GetPipeline(nil, request.NamespaceId, request.Id) - if err != nil { - if errors.Is(err, storage.ErrEntityNotFound) { - return &proto.DeletePipelineResponse{}, status.Error(codes.FailedPrecondition, "pipeline not found") - } - log.Error().Err(err).Msg("could not get pipeline") - return &proto.DeletePipelineResponse{}, status.Error(codes.Internal, "failed to retrieve pipeline from database") - } - - triggers := map[string]string{} - for _, triggerSetting := range pipeline.Triggers { - triggers[triggerSetting.Label] = triggerSetting.Name - } - - err = api.unsubscribeTriggers(pipeline.Namespace, pipeline.ID, triggers) - if err != nil { - log.Error().Err(err).Interface("pipeline", pipeline).Msg("could not unsubscribe all triggers from pipeline") - } - - err = api.db.DeletePipeline(request.NamespaceId, request.Id) + err = api.db.DeletePipelineMetadata(api.db, request.NamespaceId, request.Id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.DeletePipelineResponse{}, status.Error(codes.FailedPrecondition, "pipeline not found") @@ -362,8 +347,8 @@ func (api *API) DeletePipeline(ctx context.Context, request *proto.DeletePipelin } go api.events.Publish(models.EventDeletedPipeline{ - NamespaceID: pipeline.Namespace, - PipelineID: pipeline.ID, + NamespaceID: request.NamespaceId, + PipelineID: request.Id, }) return &proto.DeletePipelineResponse{}, nil diff --git a/internal/api/runStateMachine.go b/internal/api/runStateMachine.go index 06f7893b..67396ebc 100644 --- a/internal/api/runStateMachine.go +++ b/internal/api/runStateMachine.go @@ -2,34 +2,37 @@ package api import ( "bufio" + "encoding/json" "fmt" "os" "sync/atomic" "time" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/scheduler" "github.com/clintjedwards/gofer/internal/storage" "github.com/clintjedwards/gofer/internal/syncmap" - "github.com/clintjedwards/gofer/models" "github.com/rs/zerolog/log" ) // Used to keep track of a run as it progresses through the necessary states. type RunStateMachine struct { API *API - Pipeline *models.Pipeline + Pipeline *models.PipelineMetadata + Config *models.PipelineConfig Run *models.Run TaskRuns syncmap.Syncmap[string, models.TaskRun] StopRuns *atomic.Bool // Used to stop the progression of a run } -func (api *API) newRunStateMachine(pipeline *models.Pipeline, run *models.Run) *RunStateMachine { +func (api *API) newRunStateMachine(pipeline *models.PipelineMetadata, config *models.PipelineConfig, run *models.Run) *RunStateMachine { var stopRuns atomic.Bool stopRuns.Store(false) return &RunStateMachine{ API: api, Pipeline: pipeline, + Config: config, Run: run, TaskRuns: syncmap.New[string, models.TaskRun](), StopRuns: &stopRuns, @@ -47,16 +50,21 @@ func (r *RunStateMachine) setTaskRunFinished(id string, code *int64, taskRun.State = models.TaskRunStateComplete taskRun.Status = status + reasonJSON, err := json.Marshal(reason) + if err != nil { + return err + } r.TaskRuns.Set(id, taskRun) - err := r.API.db.UpdateTaskRun(&taskRun, storage.UpdatableTaskRunFields{ - ExitCode: code, - Status: &status, - State: ptr(models.TaskRunStateComplete), - Ended: ptr(time.Now().UnixMilli()), - StatusReason: reason, - }) + err = r.API.db.UpdatePipelineTaskRun(r.API.db, taskRun.Namespace, taskRun.Pipeline, taskRun.Run, taskRun.ID, + storage.UpdatablePipelineTaskRunFields{ + ExitCode: code, + Status: ptr(string(status)), + State: ptr(string(models.TaskRunStateComplete)), + Ended: ptr(time.Now().UnixMilli()), + StatusReason: ptr(string(reasonJSON)), + }) if err != nil { return err } @@ -73,10 +81,15 @@ func (r *RunStateMachine) setTaskRunFinished(id string, code *int64, } func (r *RunStateMachine) setRunFinished(status models.RunStatus, reason *models.RunStatusReason) error { - err := r.API.db.UpdateRun(r.Pipeline.Namespace, r.Pipeline.ID, r.Run.ID, storage.UpdatableRunFields{ - State: ptr(models.RunStateComplete), - Status: &status, - StatusReason: reason, + reasonJSON, err := json.Marshal(reason) + if err != nil { + return err + } + + err = r.API.db.UpdatePipelineRun(r.API.db, r.Pipeline.Namespace, r.Pipeline.ID, r.Run.ID, storage.UpdatablePipelineRunFields{ + State: ptr(string(models.RunStateComplete)), + Status: ptr(string(status)), + StatusReason: ptr(string(reasonJSON)), Ended: ptr(time.Now().UnixMilli()), }) if err != nil { @@ -94,9 +107,10 @@ func (r *RunStateMachine) setRunFinished(status models.RunStatus, reason *models } func (r *RunStateMachine) setTaskRunState(taskRun models.TaskRun, state models.TaskRunState) error { - err := r.API.db.UpdateTaskRun(&taskRun, storage.UpdatableTaskRunFields{ - State: &state, - }) + err := r.API.db.UpdatePipelineTaskRun(r.API.db, r.Pipeline.Namespace, r.Pipeline.ID, r.Run.ID, taskRun.ID, + storage.UpdatablePipelineTaskRunFields{ + State: ptr(string(state)), + }) if err != nil { return err } @@ -118,14 +132,14 @@ func (r *RunStateMachine) createAutoInjectToken() { // Check we actually need to do this createToken := false - for _, task := range r.Pipeline.CustomTasks { + for _, task := range r.Config.CustomTasks { if task.InjectAPIToken { createToken = true break } } - for _, task := range r.Pipeline.CommonTasks { + for _, task := range r.Config.CommonTasks { if task.InjectAPIToken { createToken = true break @@ -138,7 +152,7 @@ func (r *RunStateMachine) createAutoInjectToken() { "description": "This token was automatically created by Gofer API at the user's request. Visit https://clintjedwards.com/gofer/ref/pipeline_configuration/index.html#auto-inject-api-tokens to learn more.", }, time.Hour*48) - err := r.API.db.InsertToken(newToken) + err := r.API.db.InsertToken(r.API.db, newToken.ToStorage()) if err != nil { log.Error().Err(err).Msg("could not save token to storage") } @@ -161,12 +175,12 @@ func (r *RunStateMachine) executeTaskTree() { r.createAutoInjectToken() // Launch a new task run for each task found. - for _, task := range r.Pipeline.CustomTasks { + for _, task := range r.Config.CustomTasks { task := task go r.launchTaskRun(&task, true) } - for _, taskSettings := range r.Pipeline.CommonTasks { + for _, taskSettings := range r.Config.CommonTasks { // We create a half filled model of common task so that // we can pass it to the next step where it will get fully filled in. // We only do this because the next step already has the facilities to handle @@ -199,7 +213,7 @@ func (r *RunStateMachine) parentTaskFinished(dependencies *map[string]models.Req } func (r *RunStateMachine) parallelismLimitExceeded() bool { - limit := r.Pipeline.Parallelism + limit := r.Config.Parallelism if limit == 0 && r.API.config.RunParallelismLimit == 0 { return false @@ -213,14 +227,16 @@ func (r *RunStateMachine) parallelismLimitExceeded() bool { return false } - runs, err := r.API.db.ListRuns(nil, 0, 0, r.Pipeline.Namespace, r.Pipeline.ID) + runsRaw, err := r.API.db.ListPipelineRuns(r.API.db, 0, 0, r.Pipeline.Namespace, r.Pipeline.ID) if err != nil { return true } var runsInProgress int64 - for _, run := range runs { + for _, runRaw := range runsRaw { + var run models.Run + run.FromStorage(&runRaw) if run.State != models.RunStateComplete { runsInProgress++ } @@ -272,8 +288,8 @@ func (r *RunStateMachine) taskDependenciesSatisfied(dependencies *map[string]mod // Monitors all task run statuses and determines the final run status based on all // finished task runs. It will block until all task runs have finished. func (r *RunStateMachine) waitRunFinish() { - err := r.API.db.UpdateRun(r.Pipeline.Namespace, r.Pipeline.ID, r.Run.ID, storage.UpdatableRunFields{ - State: ptr(models.RunStateRunning), + err := r.API.db.UpdatePipelineRun(r.API.db, r.Pipeline.Namespace, r.Pipeline.ID, r.Run.ID, storage.UpdatablePipelineRunFields{ + State: ptr(string(models.RunStateRunning)), }) if err != nil { log.Error().Err(err).Msg("storage error occurred while waiting for run to finish") @@ -282,7 +298,7 @@ func (r *RunStateMachine) waitRunFinish() { // If the task run map hasn't had all the entries com in we should wait until it does. for { - if len(r.TaskRuns.Keys()) != len(r.Pipeline.CustomTasks)+len(r.Pipeline.CommonTasks) { + if len(r.TaskRuns.Keys()) != len(r.Config.CustomTasks)+len(r.Config.CommonTasks) { time.Sleep(time.Millisecond * 500) continue } @@ -465,7 +481,7 @@ func (r *RunStateMachine) handleRunObjectExpiry() { limit := r.API.config.ObjectStore.RunObjectExpiry // We ask for the limit of runs plus one extra - runs, err := r.API.db.ListRuns(nil, 0, limit+1, r.Pipeline.Namespace, r.Pipeline.ID) + runs, err := r.API.db.ListPipelineRuns(r.API.db, 0, limit+1, r.Pipeline.Namespace, r.Pipeline.ID) if err != nil { log.Error().Err(err).Msg("could not get runs for run expiry processing; db error") return @@ -480,24 +496,30 @@ func (r *RunStateMachine) handleRunObjectExpiry() { return } - expiredRun := runs[len(runs)-1] + expiredRunRaw := runs[len(runs)-1] + var expiredRun models.Run + expiredRun.FromStorage(&expiredRunRaw) // If the run is still in progress wait for it to be done for expiredRun.State != models.RunStateComplete { time.Sleep(time.Second) - expiredRun, err = r.API.db.GetRun(r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID) + expiredRunRaw, err = r.API.db.GetPipelineRun(r.API.db, r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID) if err != nil { log.Error().Err(err).Msg("could not get runs for run expiry processing; db error") return } + + var tmpExpiredRun models.Run + tmpExpiredRun.FromStorage(&expiredRunRaw) + expiredRun = tmpExpiredRun } if expiredRun.StoreObjectsExpired { return } - objectKeys, err := r.API.db.ListObjectStoreRunKeys(r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID) + objectKeys, err := r.API.db.ListObjectStoreRunKeys(r.API.db, r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID) if err != nil { log.Error().Err(err).Msg("could not get runs for run expiry processing; db error") return @@ -512,16 +534,17 @@ func (r *RunStateMachine) handleRunObjectExpiry() { } // Delete it from the run's records - err = r.API.db.DeleteObjectStoreRunKey(r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID, key.Key) + err = r.API.db.DeleteObjectStoreRunKey(r.API.db, r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID, key.Key) if err != nil { log.Error().Err(err).Msg("could not delete run object for run expiry processing; db error") continue } } - err = r.API.db.UpdateRun(r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID, storage.UpdatableRunFields{ - StoreObjectsExpired: ptr(true), - }) + err = r.API.db.UpdatePipelineRun(r.API.db, r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID, + storage.UpdatablePipelineRunFields{ + StoreObjectsExpired: ptr(true), + }) if err != nil { log.Error().Err(err).Msg("could not get runs for run expiry processing; db error") return @@ -538,7 +561,7 @@ func (r *RunStateMachine) handleRunLogExpiry() { limit := r.API.config.TaskRunLogExpiry // We ask for the limit of runs plus one extra - runs, err := r.API.db.ListRuns(nil, 0, limit+1, r.Pipeline.Namespace, r.Pipeline.ID) + runs, err := r.API.db.ListPipelineRuns(r.API.db, 0, limit+1, r.Pipeline.Namespace, r.Pipeline.ID) if err != nil { log.Error().Err(err).Msg("could not get runs for run log expiry processing; db error") return @@ -553,17 +576,23 @@ func (r *RunStateMachine) handleRunLogExpiry() { return } - expiredRun := runs[len(runs)-1] + expiredRunRaw := runs[len(runs)-1] + var expiredRun models.Run + expiredRun.FromStorage(&expiredRunRaw) // If the run is still in progress wait for it to be done for expiredRun.State != models.RunStateComplete { time.Sleep(time.Second) - expiredRun, err = r.API.db.GetRun(r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID) + expiredRunRaw, err = r.API.db.GetPipelineRun(r.API.db, r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID) if err != nil { log.Error().Err(err).Msg("could not get runs for run log expiry processing; db error") return } + + var tmpExpiredRun models.Run + tmpExpiredRun.FromStorage(&expiredRunRaw) + expiredRun = tmpExpiredRun } var taskRuns []models.TaskRun @@ -571,12 +600,18 @@ func (r *RunStateMachine) handleRunLogExpiry() { // If the task runs are in progress we wait for it to be done. outerLoop: for { - taskRuns, err = r.API.db.ListTaskRuns(0, 0, r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID) + taskRunsRaw, err := r.API.db.ListPipelineTaskRuns(r.API.db, 0, 0, r.Pipeline.Namespace, r.Pipeline.ID, expiredRun.ID) if err != nil { log.Error().Err(err).Msg("could not get task runs for run log expiry processing; db error") return } + for _, taskRunRaw := range taskRunsRaw { + var taskRun models.TaskRun + taskRun.FromStorage(&taskRunRaw) + taskRuns = append(taskRuns, taskRun) + } + for _, taskRun := range taskRuns { if taskRun.State != models.TaskRunStateComplete { time.Sleep(time.Millisecond * 500) @@ -602,10 +637,11 @@ outerLoop: log.Debug().Err(err).Msg("could not remove task run log file") } - err = r.API.db.UpdateTaskRun(&taskRun, storage.UpdatableTaskRunFields{ - LogsExpired: ptr(true), - LogsRemoved: ptr(true), - }) + err = r.API.db.UpdatePipelineTaskRun(r.API.db, taskRun.Namespace, taskRun.Pipeline, taskRun.Run, taskRun.ID, + storage.UpdatablePipelineTaskRunFields{ + LogsExpired: ptr(true), + LogsRemoved: ptr(true), + }) if err != nil { log.Error().Err(err).Msg("could not update task run state; db error") continue @@ -629,11 +665,11 @@ func (r *RunStateMachine) launchTaskRun(task models.Task, register bool) { if isCommonTask { registration, exists := r.API.commonTasks.Get(commonTask.Settings.Name) if !exists { - newTaskRun := models.NewTaskRun(r.Pipeline.Namespace, r.Pipeline.ID, r.Run.ID, task) + newTaskRun := models.NewTaskRun(r.Pipeline.Namespace, r.Pipeline.ID, r.Config.Version, r.Run.ID, task) r.TaskRuns.Set(newTaskRun.ID, *newTaskRun) - err := r.API.db.InsertTaskRun(newTaskRun) + err := r.API.db.InsertPipelineTaskRun(r.API.db, newTaskRun.ToStorage()) if err != nil { log.Error().Err(err).Msg("could not register task run; db error") return @@ -659,12 +695,12 @@ func (r *RunStateMachine) launchTaskRun(task models.Task, register bool) { } // Start by created a new task run and saving it to the state machine and disk. - newTaskRun := models.NewTaskRun(r.Pipeline.Namespace, r.Pipeline.ID, r.Run.ID, task) + newTaskRun := models.NewTaskRun(r.Pipeline.Namespace, r.Pipeline.ID, r.Config.Version, r.Run.ID, task) r.TaskRuns.Set(newTaskRun.ID, *newTaskRun) if register { - err := r.API.db.InsertTaskRun(newTaskRun) + err := r.API.db.InsertPipelineTaskRun(r.API.db, newTaskRun.ToStorage()) if err != nil { log.Error().Err(err).Msg("could not register task run; db error") return @@ -681,10 +717,17 @@ func (r *RunStateMachine) launchTaskRun(task models.Task, register bool) { envVars := combineVariables(r.Run, task) + envVarsJSON, err := json.Marshal(envVars) + if err != nil { + log.Error().Err(err).Msg("could not register task run; db error") + return + } + // Determine the task run's final variable set and pass them in. - err := r.API.db.UpdateTaskRun(newTaskRun, storage.UpdatableTaskRunFields{ - Variables: &envVars, - }) + err = r.API.db.UpdatePipelineTaskRun(r.API.db, newTaskRun.Namespace, newTaskRun.Pipeline, newTaskRun.Run, newTaskRun.ID, + storage.UpdatablePipelineTaskRunFields{ + Variables: ptr(string(envVarsJSON)), + }) if err != nil { log.Error().Err(err).Msg("could not launch task run; db error") return @@ -766,10 +809,11 @@ func (r *RunStateMachine) launchTaskRun(task models.Task, register bool) { return } - err = r.API.db.UpdateTaskRun(newTaskRun, storage.UpdatableTaskRunFields{ - State: ptr(models.TaskRunStateRunning), - Started: ptr(time.Now().UnixMilli()), - }) + err = r.API.db.UpdatePipelineTaskRun(r.API.db, newTaskRun.Namespace, newTaskRun.Pipeline, newTaskRun.Run, newTaskRun.ID, + storage.UpdatablePipelineTaskRunFields{ + State: ptr(string(models.TaskRunStateRunning)), + Started: ptr(time.Now().UnixMilli()), + }) if err != nil { log.Error().Err(err).Msg("could not launch task run; db error") return diff --git a/internal/api/runs.go b/internal/api/runs.go index 11b9608d..779ee9bd 100644 --- a/internal/api/runs.go +++ b/internal/api/runs.go @@ -1,6 +1,7 @@ package api import ( + "encoding/json" "errors" "fmt" "strconv" @@ -8,9 +9,9 @@ import ( "sync" "time" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/scheduler" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" "github.com/rs/zerolog/log" ) @@ -265,7 +266,7 @@ func (api *API) interpolateVars(namespace, pipeline string, run *int64, variable // It then waits until the goroutine monitoring run health gets to the correct state. // This causes the function to block for a bit, while it waits for the correct run status. func (api *API) cancelRun(run *models.Run, description string, force bool) error { - taskRuns, err := api.db.ListTaskRuns(0, 0, run.Namespace, run.Pipeline, run.ID) + taskRunsRaw, err := api.db.ListPipelineTaskRuns(api.db, 0, 0, run.Namespace, run.Pipeline, run.ID) if err != nil { return err } @@ -273,7 +274,10 @@ func (api *API) cancelRun(run *models.Run, description string, force bool) error // Because of how state updates work we need to wait for the run to be settled by // the goroutine that controls this before we update the description. for { - for _, taskrun := range taskRuns { + for _, taskrunRaw := range taskRunsRaw { + var taskrun models.TaskRun + taskrun.FromStorage(&taskrunRaw) + if taskrun.State != models.TaskRunStateRunning { continue } @@ -281,19 +285,26 @@ func (api *API) cancelRun(run *models.Run, description string, force bool) error err := api.cancelTaskRun(&taskrun, force) if err != nil { if errors.Is(err, scheduler.ErrNoSuchContainer) { - err := api.db.UpdateTaskRun(&taskrun, storage.UpdatableTaskRunFields{ - Status: ptr(models.TaskRunStatusFailed), - State: ptr(models.TaskRunStateComplete), - Ended: ptr(time.Now().UnixMilli()), - StatusReason: &models.TaskRunStatusReason{ - Reason: models.TaskRunStatusReasonKindOrphaned, - Description: "Scheduler could not find task run when queried.", - }, + + statusReason, err := json.Marshal(models.TaskRunStatusReason{ + Reason: models.TaskRunStatusReasonKindOrphaned, + Description: "Scheduler could not find task run when queried.", }) if err != nil { return err } + err = api.db.UpdatePipelineTaskRun(api.db, taskrun.Namespace, taskrun.Pipeline, taskrun.Run, + taskrun.ID, storage.UpdatablePipelineTaskRunFields{ + Status: ptr(string(models.TaskRunStatusFailed)), + State: ptr(string(models.TaskRunStateComplete)), + Ended: ptr(time.Now().UnixMilli()), + StatusReason: ptr(string(statusReason)), + }) + if err != nil { + return err + } + go api.events.Publish(models.EventCompletedTaskRun{ NamespaceID: taskrun.Namespace, PipelineID: taskrun.Pipeline, @@ -307,11 +318,14 @@ func (api *API) cancelRun(run *models.Run, description string, force bool) error } } - run, err := api.db.GetRun(run.Namespace, run.Pipeline, run.ID) + runRaw, err := api.db.GetPipelineRun(api.db, run.Namespace, run.Pipeline, run.ID) if err != nil { return err } + var run models.Run + run.FromStorage(&runRaw) + if run.State != models.RunStateComplete { time.Sleep(time.Second * 1) continue @@ -323,13 +337,16 @@ func (api *API) cancelRun(run *models.Run, description string, force bool) error } if run.Status == models.RunStatusCancelled { - statusReason := &models.RunStatusReason{ + statusReason, err := json.Marshal(&models.RunStatusReason{ Reason: models.RunStatusReasonKindUserCancelled, Description: description, + }) + if err != nil { + return err } - err = api.db.UpdateRun(run.Namespace, run.Pipeline, run.ID, storage.UpdatableRunFields{ - StatusReason: statusReason, + err = api.db.UpdatePipelineRun(api.db, run.Namespace, run.Pipeline, run.ID, storage.UpdatablePipelineRunFields{ + StatusReason: ptr(string(statusReason)), }) if err != nil { return err @@ -393,13 +410,16 @@ func (api *API) cancelAllRuns(namespaceID, pipelineID, description string, force inProgressRuns := []*models.Run{} for inProgressRun := range inProgressRunMap { - run, err := api.db.GetRun(inProgressRun.namespace, inProgressRun.pipeline, inProgressRun.run) + runRaw, err := api.db.GetPipelineRun(api.db, inProgressRun.namespace, inProgressRun.pipeline, inProgressRun.run) if err != nil { log.Error().Err(err).Str("namespace", inProgressRun.namespace).Str("pipeline", inProgressRun.pipeline). Int64("run", inProgressRun.run).Msg("could not retrieve run from database") continue } + var run models.Run + run.FromStorage(&runRaw) + inProgressRuns = append(inProgressRuns, &run) } @@ -422,12 +442,15 @@ func (api *API) cancelAllRuns(namespaceID, pipelineID, description string, force defer wg.Done() _ = api.cancelRun(run, description, force) for { - run, err := api.db.GetRun(run.Namespace, run.Pipeline, run.ID) + runRaw, err := api.db.GetPipelineRun(api.db, run.Namespace, run.Pipeline, run.ID) if err != nil { time.Sleep(time.Second * 3) continue } + var run models.Run + run.FromStorage(&runRaw) + if run.State == models.RunStateComplete { return } diff --git a/internal/api/runsHandlers.go b/internal/api/runsHandlers.go index eff84605..d15cb4a7 100644 --- a/internal/api/runsHandlers.go +++ b/internal/api/runsHandlers.go @@ -5,9 +5,10 @@ import ( "errors" "time" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" + "github.com/jmoiron/sqlx" "github.com/rs/zerolog/log" "google.golang.org/grpc/codes" @@ -23,7 +24,7 @@ func (api *API) GetRun(ctx context.Context, request *proto.GetRunRequest) (*prot request.NamespaceId = namespace - run, err := api.db.GetRun(request.NamespaceId, request.PipelineId, request.Id) + runRaw, err := api.db.GetPipelineRun(api.db, request.NamespaceId, request.PipelineId, request.Id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.GetRunResponse{}, status.Error(codes.FailedPrecondition, "run not found") @@ -32,6 +33,9 @@ func (api *API) GetRun(ctx context.Context, request *proto.GetRunRequest) (*prot return &proto.GetRunResponse{}, status.Error(codes.Internal, "failed to retrieve run from database") } + var run models.Run + run.FromStorage(&runRaw) + return &proto.GetRunResponse{Run: run.ToProto()}, nil } @@ -48,14 +52,18 @@ func (api *API) ListRuns(ctx context.Context, request *proto.ListRunsRequest) (* request.NamespaceId = namespace - runs, err := api.db.ListRuns(nil, int(request.Offset), int(request.Limit), request.NamespaceId, request.PipelineId) + runsRaw, err := api.db.ListPipelineRuns(api.db, int(request.Offset), int(request.Limit), request.NamespaceId, request.PipelineId) if err != nil { log.Error().Err(err).Msg("could not get runs") return &proto.ListRunsResponse{}, status.Error(codes.Internal, "failed to retrieve runs from database") } protoRuns := []*proto.Run{} - for _, run := range runs { + for _, runRaw := range runsRaw { + + var run models.Run + run.FromStorage(&runRaw) + protoRuns = append(protoRuns, run.ToProto()) } @@ -85,37 +93,85 @@ func (api *API) StartRun(ctx context.Context, request *proto.StartRunRequest) (* return &proto.StartRunResponse{}, status.Error(codes.FailedPrecondition, "api is not accepting new events at this time") } - pipeline, err := api.db.GetPipeline(nil, request.NamespaceId, request.PipelineId) - if err != nil { - if errors.Is(err, storage.ErrEntityNotFound) { - return &proto.StartRunResponse{}, status.Error(codes.FailedPrecondition, "pipeline not found") + var newRunID int64 + var pipeline models.PipelineMetadata + var newRun *models.Run + var latestConfig models.PipelineConfig + + err = storage.InsideTx(api.db.DB, func(tx *sqlx.Tx) error { + pipelineRaw, err := api.db.GetPipelineMetadata(tx, request.NamespaceId, request.PipelineId) + if err != nil { + if errors.Is(err, storage.ErrEntityNotFound) { + return err + } + return err } - return &proto.StartRunResponse{}, status.Error(codes.Internal, "pipeline does not exist") - } - if pipeline.State != models.PipelineStateActive { - return &proto.StartRunResponse{}, status.Error(codes.FailedPrecondition, "could not create run; pipeline is not active") - } + pipeline.FromStorage(&pipelineRaw) - // Create the new run and retrieve it's ID. - newRun := models.NewRun(request.NamespaceId, request.PipelineId, models.TriggerInfo{ - Name: "manual", - Label: "api", - }, convertVarsToSlice(request.Variables, models.VariableSourceRunOptions)) + if pipeline.State != models.PipelineStateActive { + return err + } - runID, err := api.db.InsertRun(newRun) + latestConfigs, err := api.db.ListLivePipelineConfigs(tx, 0, 1, request.NamespaceId, pipeline.ID) + if err != nil { + return err + } + + var latestVersion int64 + + if len(latestConfigs) > 1 { + latestVersion = latestConfigs[0].Version + + commonTasks, err := api.db.ListPipelineCommonTaskSettings(tx, request.NamespaceId, pipeline.ID, latestVersion) + if err != nil { + return err + } + + customTasks, err := api.db.ListPipelineCustomTasks(tx, request.NamespaceId, pipeline.ID, latestVersion) + if err != nil { + return err + } + + latestConfig.FromStorage(&latestConfigs[0], &commonTasks, &customTasks) + } + + latestRun, err := api.db.ListPipelineRuns(api.db, 0, 1, request.NamespaceId, pipeline.ID) + if err != nil { + return err + } + + var latestRunID int64 + + if len(latestRun) > 1 { + latestRunID = latestRun[0].ID + } + + newRunID = latestRunID + 1 + + // Create the new run and retrieve it's ID. + newRun = models.NewRun(request.NamespaceId, request.PipelineId, latestVersion, newRunID, models.TriggerInfo{ + Name: "manual", + Label: "api", + }, convertVarsToSlice(request.Variables, models.VariableSourceRunOptions)) + + err = api.db.InsertPipelineRun(api.db, newRun.ToStorage()) + if err != nil { + log.Error().Err(err).Msg("could not insert pipeline into db") + return err + } + + return nil + }) if err != nil { - log.Error().Err(err).Msg("could not insert pipeline into db") - return &proto.StartRunResponse{}, status.Error(codes.Internal, "internal database error") + return &proto.StartRunResponse{}, status.Error(codes.Internal, "could not start pipeline run") } - newRun.ID = runID - // Publish that the run has started go api.events.Publish(models.EventStartedRun{ NamespaceID: request.NamespaceId, PipelineID: request.PipelineId, - RunID: runID, + RunID: newRunID, }) // Publish a fake trigger event for the manual run @@ -130,7 +186,7 @@ func (api *API) StartRun(ctx context.Context, request *proto.StartRunRequest) (* }, }) - runStateMachine := api.newRunStateMachine(&pipeline, newRun) + runStateMachine := api.newRunStateMachine(&pipeline, &latestConfig, newRun) // Make sure the pipeline is ready for a new run. for runStateMachine.parallelismLimitExceeded() { @@ -166,7 +222,7 @@ func (api *API) RetryRun(ctx context.Context, request *proto.RetryRunRequest) (* return &proto.RetryRunResponse{}, status.Error(codes.FailedPrecondition, "run id required") } - run, err := api.db.GetRun(request.NamespaceId, request.PipelineId, request.RunId) + runRaw, err := api.db.GetPipelineRun(api.db, request.NamespaceId, request.PipelineId, request.RunId) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.RetryRunResponse{}, status.Errorf(codes.FailedPrecondition, @@ -177,6 +233,9 @@ func (api *API) RetryRun(ctx context.Context, request *proto.RetryRunRequest) (* "failed to retrieve run %d from database", request.RunId) } + var run models.Run + run.FromStorage(&runRaw) + variables := map[string]string{} for _, variable := range run.Variables { variables[variable.Key] = variable.Value @@ -217,7 +276,7 @@ func (api *API) CancelRun(ctx context.Context, request *proto.CancelRunRequest) return &proto.CancelRunResponse{}, status.Error(codes.FailedPrecondition, "run id required") } - run, err := api.db.GetRun(request.NamespaceId, request.PipelineId, request.RunId) + runRaw, err := api.db.GetPipelineRun(api.db, request.NamespaceId, request.PipelineId, request.RunId) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.CancelRunResponse{}, status.Errorf(codes.FailedPrecondition, "run %d not found", request.RunId) @@ -226,6 +285,9 @@ func (api *API) CancelRun(ctx context.Context, request *proto.CancelRunRequest) return &proto.CancelRunResponse{}, status.Errorf(codes.Internal, "failed to retrieve run %d from database", request.RunId) } + var run models.Run + run.FromStorage(&runRaw) + err = api.cancelRun(&run, "Run has been cancelled via API", request.Force) if err != nil { return &proto.CancelRunResponse{}, status.Errorf(codes.Internal, "could not cancel run: %v", err) diff --git a/internal/api/secretStoreHandlers.go b/internal/api/secretStoreHandlers.go index 088ae7c4..74f3d093 100644 --- a/internal/api/secretStoreHandlers.go +++ b/internal/api/secretStoreHandlers.go @@ -4,9 +4,9 @@ import ( "context" "errors" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/secretStore" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "google.golang.org/grpc/codes" @@ -30,7 +30,7 @@ func (api *API) GetPipelineSecret(ctx context.Context, request *proto.GetPipelin return &proto.GetPipelineSecretResponse{}, status.Error(codes.PermissionDenied, "access denied") } - metadata, err := api.db.GetSecretStorePipelineKey(request.NamespaceId, request.PipelineId, request.Key) + metadata, err := api.db.GetSecretStorePipelineKey(api.db, request.NamespaceId, request.PipelineId, request.Key) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.GetPipelineSecretResponse{}, status.Error(codes.FailedPrecondition, "key not found") @@ -50,8 +50,12 @@ func (api *API) GetPipelineSecret(ctx context.Context, request *proto.GetPipelin } } + var key models.SecretStoreKey + key.Key = metadata.Key + key.Created = metadata.Created + return &proto.GetPipelineSecretResponse{ - Metadata: metadata.ToProto(), + Metadata: key.ToProto(), Secret: secret, }, nil } @@ -69,13 +73,16 @@ func (api *API) ListPipelineSecrets(ctx context.Context, request *proto.ListPipe return &proto.ListPipelineSecretsResponse{}, status.Error(codes.PermissionDenied, "access denied") } - keys, err := api.db.ListSecretStorePipelineKeys(request.NamespaceId, request.PipelineId) + keys, err := api.db.ListSecretStorePipelineKeys(api.db, request.NamespaceId, request.PipelineId) if err != nil { return &proto.ListPipelineSecretsResponse{}, err } var protoKeys []*proto.SecretStoreKey - for _, key := range keys { + for _, keyRaw := range keys { + var key models.SecretStoreKey + key.Key = keyRaw.Key + key.Created = keyRaw.Created protoKeys = append(protoKeys, key.ToProto()) } @@ -103,7 +110,12 @@ func (api *API) PutPipelineSecret(ctx context.Context, request *proto.PutPipelin newSecretKey := models.NewSecretStoreKey(request.Key) - err = api.db.InsertSecretStorePipelineKey(request.NamespaceId, request.PipelineId, newSecretKey, request.Force) + err = api.db.InsertSecretStorePipelineKey(api.db, &storage.SecretStorePipelineKey{ + Namespace: request.NamespaceId, + Pipeline: request.PipelineId, + Key: newSecretKey.Key, + Created: newSecretKey.Created, + }, request.Force) if err != nil { if errors.Is(err, storage.ErrEntityExists) { return &proto.PutPipelineSecretResponse{}, @@ -130,7 +142,9 @@ func (api *API) PutPipelineSecret(ctx context.Context, request *proto.PutPipelin }, nil } -func (api *API) DeletePipelineSecret(ctx context.Context, request *proto.DeletePipelineSecretRequest) (*proto.DeletePipelineSecretResponse, error) { +func (api *API) DeletePipelineSecret(ctx context.Context, request *proto.DeletePipelineSecretRequest) ( + *proto.DeletePipelineSecretResponse, error, +) { namespace, err := api.resolveNamespace(ctx, request.NamespaceId) if err != nil { return &proto.DeletePipelineSecretResponse{}, @@ -147,7 +161,7 @@ func (api *API) DeletePipelineSecret(ctx context.Context, request *proto.DeleteP return &proto.DeletePipelineSecretResponse{}, status.Error(codes.PermissionDenied, "access denied") } - err = api.db.DeleteSecretStorePipelineKey(request.NamespaceId, request.PipelineId, request.Key) + err = api.db.DeleteSecretStorePipelineKey(api.db, request.NamespaceId, request.PipelineId, request.Key) if err != nil { return &proto.DeletePipelineSecretResponse{}, err } @@ -169,7 +183,7 @@ func (api *API) GetGlobalSecret(ctx context.Context, request *proto.GetGlobalSec return &proto.GetGlobalSecretResponse{}, status.Error(codes.FailedPrecondition, "key cannot be empty") } - metadata, err := api.db.GetSecretStoreGlobalKey(request.Key) + metadata, err := api.db.GetSecretStoreGlobalKey(api.db, request.Key) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.GetGlobalSecretResponse{}, status.Error(codes.FailedPrecondition, "key not found") @@ -189,8 +203,12 @@ func (api *API) GetGlobalSecret(ctx context.Context, request *proto.GetGlobalSec } } + var key models.SecretStoreKey + key.Key = metadata.Key + key.Created = metadata.Created + return &proto.GetGlobalSecretResponse{ - Metadata: metadata.ToProto(), + Metadata: key.ToProto(), Secret: secret, }, nil } @@ -200,13 +218,16 @@ func (api *API) ListGlobalSecrets(ctx context.Context, request *proto.ListGlobal return nil, status.Error(codes.PermissionDenied, "management token required for this action") } - keys, err := api.db.ListSecretStoreGlobalKeys() + keys, err := api.db.ListSecretStoreGlobalKeys(api.db) if err != nil { return &proto.ListGlobalSecretsResponse{}, err } var protoKeys []*proto.SecretStoreKey - for _, key := range keys { + for _, keyRaw := range keys { + var key models.SecretStoreKey + key.Key = keyRaw.Key + key.Created = keyRaw.Created protoKeys = append(protoKeys, key.ToProto()) } @@ -226,7 +247,10 @@ func (api *API) PutGlobalSecret(ctx context.Context, request *proto.PutGlobalSec newSecretKey := models.NewSecretStoreKey(request.Key) - err := api.db.InsertSecretStoreGlobalKey(newSecretKey, request.Force) + err := api.db.InsertSecretStoreGlobalKey(api.db, &storage.SecretStoreGlobalKey{ + Key: newSecretKey.Key, + Created: newSecretKey.Created, + }, request.Force) if err != nil { if errors.Is(err, storage.ErrEntityExists) { return &proto.PutGlobalSecretResponse{}, @@ -262,7 +286,7 @@ func (api *API) DeleteGlobalSecret(ctx context.Context, request *proto.DeleteGlo return nil, status.Error(codes.FailedPrecondition, "key cannot be empty") } - err := api.db.DeleteSecretStoreGlobalKey(request.Key) + err := api.db.DeleteSecretStoreGlobalKey(api.db, request.Key) if err != nil { return &proto.DeleteGlobalSecretResponse{}, err } diff --git a/internal/api/serviceHandlers.go b/internal/api/serviceHandlers.go index 0a1d60ca..843b4544 100644 --- a/internal/api/serviceHandlers.go +++ b/internal/api/serviceHandlers.go @@ -6,8 +6,8 @@ import ( "strings" "time" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/rs/zerolog/log" @@ -80,7 +80,7 @@ func (api *API) CreateToken(ctx context.Context, request *proto.CreateTokenReque token, hash := api.createNewAPIToken() for _, namespace := range request.Namespaces { - _, err := api.db.GetNamespace(namespace) + _, err := api.db.GetNamespace(api.db, namespace) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.CreateTokenResponse{}, @@ -99,7 +99,7 @@ func (api *API) CreateToken(ctx context.Context, request *proto.CreateTokenReque newToken := models.NewToken(hash, kind, request.Namespaces, request.Metadata, expires) - err = api.db.InsertToken(newToken) + err = api.db.InsertToken(api.db, newToken.ToStorage()) if err != nil { log.Error().Err(err).Msg("could not save token to storage") return &proto.CreateTokenResponse{}, status.Errorf(codes.Internal, "could not save token to storage: %v", err) @@ -127,12 +127,19 @@ func (api *API) ListTokens(ctx context.Context, request *proto.ListTokensRequest tokenList := []*proto.Token{} - tokens, err := api.db.ListTokens(0, 0) + tokensRaw, err := api.db.ListTokens(api.db, 0, 0) if err != nil { log.Error().Err(err).Msg("could not get token") return &proto.ListTokensResponse{}, status.Error(codes.Internal, "failed to retrieve token from database") } + var tokens []models.Token + for _, tokenRaw := range tokensRaw { + var token models.Token + token.FromStorage(&tokenRaw) + tokens = append(tokens, token) + } + for _, token := range tokens { // If the token has namespaces AND the token does not contain the targeted namespace skip it. if len(token.Namespaces) != 0 && !contains(token.Namespaces, request.Namespace) { @@ -159,7 +166,7 @@ func (api *API) GetToken(ctx context.Context, request *proto.GetTokenRequest) (* } hash := getHash(request.Token) - token, err := api.db.GetToken(hash) + tokenRaw, err := api.db.GetToken(api.db, hash) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.GetTokenResponse{}, status.Error(codes.FailedPrecondition, "token not found") @@ -168,6 +175,9 @@ func (api *API) GetToken(ctx context.Context, request *proto.GetTokenRequest) (* return &proto.GetTokenResponse{}, status.Error(codes.Internal, "failed to retrieve token from database") } + var token models.Token + token.FromStorage(&tokenRaw) + return &proto.GetTokenResponse{ Details: token.ToProto(), }, nil @@ -183,7 +193,7 @@ func (api *API) EnableToken(ctx context.Context, request *proto.EnableTokenReque } hash := getHash(request.Token) - err := api.db.EnableToken(hash) + err := api.db.EnableToken(api.db, hash) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.EnableTokenResponse{}, status.Error(codes.NotFound, "token not found") @@ -205,7 +215,7 @@ func (api *API) DisableToken(ctx context.Context, request *proto.DisableTokenReq } hash := getHash(request.Token) - err := api.db.DisableToken(hash) + err := api.db.DisableToken(api.db, hash) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.DisableTokenResponse{}, status.Error(codes.NotFound, "token not found") @@ -227,7 +237,7 @@ func (api *API) DeleteToken(ctx context.Context, request *proto.DeleteTokenReque } hash := getHash(request.Token) - err := api.db.DeleteToken(hash) + err := api.db.DeleteToken(api.db, hash) if err != nil { log.Error().Err(err).Msg("could not save token to storage") return &proto.DeleteTokenResponse{}, status.Errorf(codes.Internal, "could not save token to storage: %v", err) @@ -237,7 +247,7 @@ func (api *API) DeleteToken(ctx context.Context, request *proto.DeleteTokenReque } func (api *API) BootstrapToken(ctx context.Context, request *proto.BootstrapTokenRequest) (*proto.BootstrapTokenResponse, error) { - tokens, err := api.db.ListTokens(0, 1) + tokens, err := api.db.ListTokens(api.db, 0, 1) if err != nil { log.Error().Err(err).Msg("could not save token to storage") return &proto.BootstrapTokenResponse{}, status.Errorf(codes.Internal, "could not create bootstrap token: %v", err) @@ -252,7 +262,7 @@ func (api *API) BootstrapToken(ctx context.Context, request *proto.BootstrapToke "bootstrap_token": "true", }, time.Hour*876600) - err = api.db.InsertToken(newToken) + err = api.db.InsertToken(api.db, newToken.ToStorage()) if err != nil { log.Error().Err(err).Msg("could not save token to storage") return &proto.BootstrapTokenResponse{}, status.Errorf(codes.Internal, "could not save token to storage: %v", err) diff --git a/internal/api/taskRun.go b/internal/api/taskRun.go index 86312264..641cfd68 100644 --- a/internal/api/taskRun.go +++ b/internal/api/taskRun.go @@ -3,8 +3,8 @@ package api import ( "time" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/scheduler" - "github.com/clintjedwards/gofer/models" ) // cancelTaskRun calls upon the scheduler to terminate a specific container. The urgency of this request is diff --git a/internal/api/taskRunHandlers.go b/internal/api/taskRunHandlers.go index a2bf5142..b317e5fd 100644 --- a/internal/api/taskRunHandlers.go +++ b/internal/api/taskRunHandlers.go @@ -5,8 +5,8 @@ import ( "errors" "os" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/nxadm/tail" @@ -28,7 +28,7 @@ func (api *API) GetTaskRun(ctx context.Context, request *proto.GetTaskRunRequest request.NamespaceId = namespace - taskRun, err := api.db.GetTaskRun(request.NamespaceId, request.PipelineId, request.RunId, request.Id) + taskRunRaw, err := api.db.GetPipelineTaskRun(api.db, request.NamespaceId, request.PipelineId, request.RunId, request.Id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.GetTaskRunResponse{}, status.Error(codes.FailedPrecondition, "task run not found") @@ -37,6 +37,9 @@ func (api *API) GetTaskRun(ctx context.Context, request *proto.GetTaskRunRequest return &proto.GetTaskRunResponse{}, status.Error(codes.Internal, "failed to retrieve task run from database") } + var taskRun models.TaskRun + taskRun.FromStorage(&taskRunRaw) + return &proto.GetTaskRunResponse{TaskRun: taskRun.ToProto()}, nil } @@ -53,14 +56,16 @@ func (api *API) ListTaskRuns(ctx context.Context, request *proto.ListTaskRunsReq request.NamespaceId = namespace - taskRuns, err := api.db.ListTaskRuns(0, 0, request.NamespaceId, request.PipelineId, request.RunId) + taskRunsRaw, err := api.db.ListPipelineTaskRuns(api.db, 0, 0, request.NamespaceId, request.PipelineId, request.RunId) if err != nil { log.Error().Err(err).Msg("could not get task runs") return &proto.ListTaskRunsResponse{}, status.Error(codes.Internal, "failed to retrieve runs from database") } protoTaskRuns := []*proto.TaskRun{} - for _, taskRun := range taskRuns { + for _, taskRunRaw := range taskRunsRaw { + var taskRun models.TaskRun + taskRun.FromStorage(&taskRunRaw) protoTaskRuns = append(protoTaskRuns, taskRun.ToProto()) } @@ -94,7 +99,7 @@ func (api *API) CancelTaskRun(ctx context.Context, request *proto.CancelTaskRunR return &proto.CancelTaskRunResponse{}, status.Error(codes.PermissionDenied, "access denied") } - taskRun, err := api.db.GetTaskRun(request.NamespaceId, request.PipelineId, request.RunId, request.Id) + taskRunRaw, err := api.db.GetPipelineTaskRun(api.db, request.NamespaceId, request.PipelineId, request.RunId, request.Id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.CancelTaskRunResponse{}, status.Error(codes.FailedPrecondition, "task run not found") @@ -103,6 +108,9 @@ func (api *API) CancelTaskRun(ctx context.Context, request *proto.CancelTaskRunR return &proto.CancelTaskRunResponse{}, status.Error(codes.Internal, "failed to retrieve task run from database") } + var taskRun models.TaskRun + taskRun.FromStorage(&taskRunRaw) + err = api.cancelTaskRun(&taskRun, request.Force) if err != nil { return &proto.CancelTaskRunResponse{}, status.Error(codes.Internal, "could not cancel container") @@ -131,7 +139,7 @@ func (api *API) GetTaskRunLogs(request *proto.GetTaskRunLogsRequest, stream prot request.NamespaceId = namespace - taskRun, err := api.db.GetTaskRun(request.NamespaceId, request.PipelineId, request.RunId, request.Id) + taskRun, err := api.db.GetPipelineTaskRun(api.db, request.NamespaceId, request.PipelineId, request.RunId, request.Id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return status.Error(codes.FailedPrecondition, "task run not found") @@ -218,7 +226,7 @@ func (api *API) DeleteTaskRunLogs(ctx context.Context, request *proto.DeleteTask return &proto.DeleteTaskRunLogsResponse{}, status.Error(codes.PermissionDenied, "access denied") } - taskRun, err := api.db.GetTaskRun(request.NamespaceId, request.PipelineId, request.RunId, request.Id) + taskRunRaw, err := api.db.GetPipelineTaskRun(api.db, request.NamespaceId, request.PipelineId, request.RunId, request.Id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.DeleteTaskRunLogsResponse{}, status.Error(codes.FailedPrecondition, "task run not found") @@ -227,6 +235,9 @@ func (api *API) DeleteTaskRunLogs(ctx context.Context, request *proto.DeleteTask return &proto.DeleteTaskRunLogsResponse{}, status.Error(codes.Internal, "failed to retrieve task run from database") } + var taskRun models.TaskRun + taskRun.FromStorage(&taskRunRaw) + if taskRun.State != models.TaskRunStateComplete { return &proto.DeleteTaskRunLogsResponse{}, status.Error(codes.FailedPrecondition, "can not delete logs for a task currently in progress") } @@ -241,9 +252,10 @@ func (api *API) DeleteTaskRunLogs(ctx context.Context, request *proto.DeleteTask return &proto.DeleteTaskRunLogsResponse{}, status.Errorf(codes.Internal, "could not remove task run log file: %v", err) } - err = api.db.UpdateTaskRun(&taskRun, storage.UpdatableTaskRunFields{ - LogsRemoved: ptr(true), - }) + err = api.db.UpdatePipelineTaskRun(api.db, taskRun.Namespace, taskRun.Pipeline, taskRun.Run, taskRun.ID, + storage.UpdatablePipelineTaskRunFields{ + LogsRemoved: ptr(true), + }) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return &proto.DeleteTaskRunLogsResponse{}, status.Error(codes.FailedPrecondition, "task run not found") diff --git a/internal/api/triggers.go b/internal/api/triggers.go index 03eac364..683a888b 100644 --- a/internal/api/triggers.go +++ b/internal/api/triggers.go @@ -3,15 +3,17 @@ package api import ( "bufio" "context" + "encoding/json" "errors" "fmt" "os" "time" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/scheduler" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" + "github.com/jmoiron/sqlx" "github.com/rs/zerolog/log" "google.golang.org/grpc/codes" @@ -146,12 +148,14 @@ func (api *API) startTriggers() error { return err } - registeredTriggers, err := api.db.ListTriggerRegistrations(0, 0) + registeredTriggers, err := api.db.ListGlobalTriggerRegistrations(api.db, 0, 0) if err != nil { return err } - for _, trigger := range registeredTriggers { + for _, triggerRaw := range registeredTriggers { + var trigger models.TriggerRegistration + trigger.FromStorage(&triggerRaw) err := api.startTrigger(trigger, string(cert), string(key)) if err != nil { return err @@ -196,19 +200,32 @@ func (api *API) restoreTriggerSubscriptions() error { } for _, pipeline := range pipelines { - for label, subscription := range pipeline.Triggers { + triggerSubscriptions, err := api.db.ListPipelineTriggerSubscriptions(api.db, pipeline.Namespace, pipeline.ID) + if err != nil { + return fmt.Errorf("could not restore trigger subscriptions; %w", err) + } + + for _, subscriptionRaw := range triggerSubscriptions { + var subscription models.PipelineTriggerSubscription + subscription.FromStorage(&subscriptionRaw) + trigger, exists := api.triggers.Get(subscription.Name) if !exists { - storageErr := api.db.UpdatePipeline(pipeline.Namespace, pipeline.ID, storage.UpdatablePipelineFields{ - State: ptr(models.PipelineStateDisabled), - Errors: &[]models.PipelineError{ - { - Kind: models.PipelineErrorKindTriggerSubscriptionFailure, - Description: fmt.Sprintf("Could not restore trigger subscription for trigger %s(%s); Trigger does not exist in Gofer's registered triggers.", - label, trigger.Registration.Name), - }, - }, - }) + statusReason := models.TriggerSubscriptionStatusReason{ + Reason: models.TriggerSubscriptionStatusReasonTriggerNotFound, + Description: "Could not find trigger while attempting to restore subscription", + } + + statusReasonJSON, err := json.Marshal(&statusReason) + if err != nil { + panic(err) + } + + storageErr := api.db.UpdatePipelineTriggerSubscription(api.db, pipeline.Namespace, pipeline.ID, + subscription.Name, subscription.Label, storage.UpdateablePipelineTriggerSubscriptionFields{ + Status: ptr(string(models.TriggerSubscriptionStatusError)), + StatusReason: ptr(string(statusReasonJSON)), + }) if storageErr != nil { log.Error().Err(storageErr).Msg("could not update pipeline") } @@ -230,16 +247,21 @@ func (api *API) restoreTriggerSubscriptions() error { convertedSettings := convertVarsToSlice(subscription.Settings, models.VariableSourcePipelineConfig) config, err := api.interpolateVars(pipeline.Namespace, pipeline.ID, nil, convertedSettings) if err != nil { - storageErr := api.db.UpdatePipeline(pipeline.Namespace, pipeline.ID, storage.UpdatablePipelineFields{ - State: ptr(models.PipelineStateDisabled), - Errors: &[]models.PipelineError{ - { - Kind: models.PipelineErrorKindTriggerSubscriptionFailure, - Description: fmt.Sprintf("Could not restore trigger subscription for trigger %s(%s); Could not find appropriate secret in secret store for key.", - label, trigger.Registration.Name), - }, - }, - }) + statusReason := models.TriggerSubscriptionStatusReason{ + Reason: models.TriggerSubscriptionStatusReasonTriggerSubscriptionFailed, + Description: fmt.Sprintf("Could not properly pass settings during subscription: %v", err), + } + + statusReasonJSON, err := json.Marshal(&statusReason) + if err != nil { + panic(err) + } + + storageErr := api.db.UpdatePipelineTriggerSubscription(api.db, pipeline.Namespace, pipeline.ID, + subscription.Name, subscription.Label, storage.UpdateablePipelineTriggerSubscriptionFields{ + Status: ptr(string(models.TriggerSubscriptionStatusError)), + StatusReason: ptr(string(statusReasonJSON)), + }) if storageErr != nil { log.Error().Err(storageErr).Msg("could not update pipeline") } @@ -252,21 +274,26 @@ func (api *API) restoreTriggerSubscriptions() error { ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer "+string(*trigger.Key)) _, err = client.Subscribe(ctx, &proto.TriggerSubscribeRequest{ NamespaceId: pipeline.Namespace, - PipelineTriggerLabel: label, + PipelineTriggerLabel: subscription.Label, PipelineId: pipeline.ID, Config: convertVarsToMap(config), }) if err != nil { - storageErr := api.db.UpdatePipeline(pipeline.Namespace, pipeline.ID, storage.UpdatablePipelineFields{ - State: ptr(models.PipelineStateDisabled), - Errors: &[]models.PipelineError{ - { - Kind: models.PipelineErrorKindTriggerSubscriptionFailure, - Description: fmt.Sprintf("Could not restore trigger subscription for trigger %s(%s); Could not subscribe to trigger %v.", - label, trigger.Registration.Name, err), - }, - }, - }) + statusReason := models.TriggerSubscriptionStatusReason{ + Reason: models.TriggerSubscriptionStatusReasonTriggerSubscriptionFailed, + Description: fmt.Sprintf("Could not properly subscribe to trigger: %v", err), + } + + statusReasonJSON, err := json.Marshal(&statusReason) + if err != nil { + panic(err) + } + + storageErr := api.db.UpdatePipelineTriggerSubscription(api.db, pipeline.Namespace, pipeline.ID, + subscription.Name, subscription.Label, storage.UpdateablePipelineTriggerSubscriptionFields{ + Status: ptr(string(models.TriggerSubscriptionStatusError)), + StatusReason: ptr(string(statusReasonJSON)), + }) if storageErr != nil { log.Error().Err(storageErr).Msg("could not update pipeline") } @@ -390,65 +417,94 @@ func (api *API) processTriggerEvent(event *models.EventFiredTriggerEvent) { return } - pipeline, err := api.db.GetPipeline(nil, event.NamespaceID, event.PipelineID) - if err != nil { - if errors.Is(err, storage.ErrEntityNotFound) { - log.Error().Err(err).Msg("Pipeline not found") + var pipeline *models.Pipeline + var newRun *models.Run + + err := storage.InsideTx(api.db.DB, func(tx *sqlx.Tx) error { + fullPipeline, err := api.getPipelineFromDB(event.NamespaceID, event.PipelineID, -1) + if err != nil { + if errors.Is(err, storage.ErrEntityNotFound) { + log.Error().Err(err).Msg("Pipeline not found") + api.resolveFiredTriggerEvent(event, models.TriggerResult{ + Details: "Could not process trigger event; pipeline not found.", + Status: models.TriggerResultStateFailure, + }, map[string]string{}) + return err + } + api.resolveFiredTriggerEvent(event, models.TriggerResult{ - Details: "Could not process trigger event; pipeline not found.", + Details: fmt.Sprintf("Internal error; %v", err), Status: models.TriggerResultStateFailure, }, map[string]string{}) - return + log.Error().Err(err).Msg("could not process trigger event") + return err } - api.resolveFiredTriggerEvent(event, models.TriggerResult{ - Details: fmt.Sprintf("Internal error; %v", err), - Status: models.TriggerResultStateFailure, - }, map[string]string{}) - log.Error().Err(err).Msg("could not process trigger event") - return - } + pipeline = fullPipeline - triggerSubscription, exists := pipeline.Triggers[event.Label] - if !exists { - log.Error().Str("trigger_label", event.Label). - Msg("could not process trigger event; could not find trigger label within pipeline") - api.resolveFiredTriggerEvent(event, models.TriggerResult{ - Details: "Trigger subscription no longer found in pipeline config.", - Status: models.TriggerResultStateFailure, - }, map[string]string{}) - return - } + triggerSubscriptionRaw, err := api.db.GetPipelineTriggerSubscription(tx, + event.NamespaceID, event.PipelineID, event.Name, event.Label) + if err != nil { + if errors.Is(err, storage.ErrEntityNotFound) { + log.Error().Err(err).Msg("Trigger not found") + api.resolveFiredTriggerEvent(event, models.TriggerResult{ + Details: "Trigger subscription not found in pipeline config.", + Status: models.TriggerResultStateFailure, + }, map[string]string{}) + return err + } - if pipeline.State != models.PipelineStateActive { - log.Debug().Str("trigger_label", event.Label). - Msg("skipped trigger event; pipeline is not active.") - api.resolveFiredTriggerEvent(event, models.TriggerResult{ - Details: "Pipeline is not active", - Status: models.TriggerResultStateSkipped, - }, map[string]string{}) - return - } + log.Error().Str("trigger_label", event.Label). + Msg("could not process trigger event; could not find trigger label within pipeline") + } + + if fullPipeline.Metadata.State != models.PipelineStateActive { + log.Debug().Str("trigger_label", event.Label).Str("namespace", event.NamespaceID). + Str("pipeline", event.PipelineID).Int64("pipeline_version", fullPipeline.Config.Version). + Msg("skipped trigger event; pipeline is not active.") + api.resolveFiredTriggerEvent(event, models.TriggerResult{ + Details: "Pipeline is not active", + Status: models.TriggerResultStateSkipped, + }, map[string]string{}) + return err + } + + latestRun, err := api.db.ListPipelineRuns(tx, 0, 1, fullPipeline.Metadata.Namespace, fullPipeline.Metadata.ID) + if err != nil { + return err + } + + var latestRunID int64 + + if len(latestRun) > 1 { + latestRunID = latestRun[0].ID + } - // Create the new run and retrieve it's ID. - newRun := models.NewRun(pipeline.Namespace, pipeline.ID, models.TriggerInfo{ - Name: triggerSubscription.Name, - Label: triggerSubscription.Label, - }, convertVarsToSlice(event.Metadata, models.VariableSourceTrigger)) + newRunID := latestRunID + 1 + + // Create the new run and retrieve it's ID. + newRun = models.NewRun(fullPipeline.Metadata.Namespace, fullPipeline.Metadata.ID, fullPipeline.Config.Version, newRunID, models.TriggerInfo{ + Name: triggerSubscriptionRaw.Name, + Label: triggerSubscriptionRaw.Label, + }, convertVarsToSlice(event.Metadata, models.VariableSourceTrigger)) + + err = api.db.InsertPipelineRun(tx, newRun.ToStorage()) + if err != nil { + log.Error().Err(err).Msg("could not insert run into db") + api.resolveFiredTriggerEvent(event, models.TriggerResult{ + Details: fmt.Sprintf("Internal error; %v", err), + Status: models.TriggerResultStateFailure, + }, map[string]string{}) + return err + } - runID, err := api.db.InsertRun(newRun) + return nil + }) if err != nil { - log.Error().Err(err).Msg("could not insert run into db") - api.resolveFiredTriggerEvent(event, models.TriggerResult{ - Details: fmt.Sprintf("Internal error; %v", err), - Status: models.TriggerResultStateFailure, - }, map[string]string{}) return } - newRun.ID = runID - - runStateMachine := api.newRunStateMachine(&pipeline, newRun) + runStateMachine := api.newRunStateMachine(&pipeline.Metadata, &pipeline.Config, newRun) // Make sure the pipeline is ready for a new run. for runStateMachine.parallelismLimitExceeded() { diff --git a/internal/api/triggersHandlers.go b/internal/api/triggersHandlers.go index 8568b27b..eb8f666a 100644 --- a/internal/api/triggersHandlers.go +++ b/internal/api/triggersHandlers.go @@ -7,9 +7,9 @@ import ( "fmt" "strings" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/scheduler" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/rs/zerolog/log" @@ -168,7 +168,7 @@ func (api *API) InstallTrigger(ctx context.Context, request *proto.InstallTrigge return &proto.InstallTriggerResponse{}, status.Errorf(codes.Internal, "could not start trigger; %v", err) } - err = api.db.InsertTriggerRegistration(®istration) + err = api.db.InsertGlobalTriggerRegistration(api.db, registration.ToStorage()) if err != nil { if errors.Is(err, storage.ErrEntityExists) { return &proto.InstallTriggerResponse{}, status.Errorf(codes.AlreadyExists, "trigger is %s already installed", request.Name) @@ -196,7 +196,7 @@ func (api *API) UninstallTrigger(ctx context.Context, request *proto.UninstallTr api.triggers.Delete(request.Name) - err := api.db.DeleteTriggerRegistration(request.Name) + err := api.db.DeleteGlobalTriggerRegistration(api.db, request.Name) if err != nil { return &proto.UninstallTriggerResponse{}, status.Error(codes.Internal, "error deleting trigger registration") } @@ -219,8 +219,8 @@ func (api *API) EnableTrigger(ctx context.Context, request *proto.EnableTriggerR return nil, status.Error(codes.FailedPrecondition, "name required") } - err := api.db.UpdateTriggerRegistration(request.Name, storage.UpdatableTriggerRegistrationFields{ - Status: ptr(models.TriggerStatusEnabled), + err := api.db.UpdateGlobalTriggerRegistration(api.db, request.Name, storage.UpdatableGlobalTriggerRegistrationFields{ + Status: ptr(string(models.TriggerStatusEnabled)), }) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { @@ -232,8 +232,8 @@ func (api *API) EnableTrigger(ctx context.Context, request *proto.EnableTriggerR err = api.triggers.Swap(request.Name, func(value *models.Trigger, exists bool) (*models.Trigger, error) { if !exists { - _ = api.db.UpdateTriggerRegistration(request.Name, storage.UpdatableTriggerRegistrationFields{ - Status: ptr(models.TriggerStatusDisabled), + _ = api.db.UpdateGlobalTriggerRegistration(api.db, request.Name, storage.UpdatableGlobalTriggerRegistrationFields{ + Status: ptr(string(models.TriggerStatusDisabled)), }) return nil, fmt.Errorf("trigger %q not found", request.Name) @@ -258,8 +258,8 @@ func (api *API) DisableTrigger(ctx context.Context, request *proto.DisableTrigge return nil, status.Error(codes.FailedPrecondition, "name required") } - err := api.db.UpdateTriggerRegistration(request.Name, storage.UpdatableTriggerRegistrationFields{ - Status: ptr(models.TriggerStatusDisabled), + err := api.db.UpdateGlobalTriggerRegistration(api.db, request.Name, storage.UpdatableGlobalTriggerRegistrationFields{ + Status: ptr(string(models.TriggerStatusDisabled)), }) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { @@ -271,8 +271,8 @@ func (api *API) DisableTrigger(ctx context.Context, request *proto.DisableTrigge err = api.triggers.Swap(request.Name, func(value *models.Trigger, exists bool) (*models.Trigger, error) { if !exists { - _ = api.db.UpdateTriggerRegistration(request.Name, storage.UpdatableTriggerRegistrationFields{ - Status: ptr(models.TriggerStatusEnabled), + _ = api.db.UpdateGlobalTriggerRegistration(api.db, request.Name, storage.UpdatableGlobalTriggerRegistrationFields{ + Status: ptr(string(models.TriggerStatusEnabled)), }) return nil, fmt.Errorf("trigger %q not found", request.Name) diff --git a/internal/cli/commonTask/commonTaskGet.go b/internal/cli/commonTask/commonTaskGet.go index 1c31cfd2..3f0f221f 100644 --- a/internal/cli/commonTask/commonTaskGet.go +++ b/internal/cli/commonTask/commonTaskGet.go @@ -55,7 +55,7 @@ func commonTaskGet(_ *cobra.Command, args []string) error { cl.State.Fmt.Println(formatCommonTaskInfo(commontaskInfo{ Name: color.YellowString(resp.CommonTask.Name), Image: resp.CommonTask.Image, - Status: cliformat.ColorizeCommonTaskStatus(cliformat.NormalizeEnumValue(resp.CommonTask.Status.String(), "Unknown")), + Status: cliformat.ColorizeCommonTaskRegistrationStatus(cliformat.NormalizeEnumValue(resp.CommonTask.Status.String(), "Unknown")), Documentation: resp.CommonTask.Documentation, })) cl.State.Fmt.Finish() diff --git a/internal/cli/commonTask/commonTaskList.go b/internal/cli/commonTask/commonTaskList.go index 218c7bb4..1025be9c 100644 --- a/internal/cli/commonTask/commonTaskList.go +++ b/internal/cli/commonTask/commonTaskList.go @@ -51,7 +51,7 @@ func commontaskList(_ *cobra.Command, _ []string) error { data = append(data, []string{ commonTask.Name, commonTask.Image, - cliformat.ColorizeCommonTaskStatus(cliformat.NormalizeEnumValue(commonTask.Status.String(), "Unknown")), + cliformat.ColorizeCommonTaskRegistrationStatus(cliformat.NormalizeEnumValue(commonTask.Status.String(), "Unknown")), commonTask.Documentation, }) } diff --git a/internal/cli/format/format.go b/internal/cli/format/format.go index f450fcca..98a0dd1e 100644 --- a/internal/cli/format/format.go +++ b/internal/cli/format/format.go @@ -6,7 +6,7 @@ import ( "text/tabwriter" "time" - "github.com/clintjedwards/gofer/models" + proto "github.com/clintjedwards/gofer/proto/go" "github.com/dustin/go-humanize" "github.com/fatih/color" @@ -86,13 +86,13 @@ func Duration(start, end int64) string { return "~" + duration.String() } -func ColorizePipelineState(state string) string { +func ColorizePipelineMetadataState(state string) string { switch strings.ToUpper(state) { - case string(models.PipelineStateUnknown): + case string(proto.PipelineMetadata_PIPELINE_STATE_UNKNOWN): return color.YellowString(state) - case string(models.PipelineStateActive): + case string(proto.PipelineMetadata_ACTIVE): return color.GreenString(state) - case string(models.PipelineStateDisabled): + case string(proto.PipelineMetadata_DISABLED): return color.YellowString(state) default: return state @@ -101,13 +101,13 @@ func ColorizePipelineState(state string) string { func ColorizeRunState(state string) string { switch strings.ToUpper(state) { - case string(models.RunStateUnknown): + case string(proto.Run_RUN_STATE_UNKNOWN): return color.YellowString(state) - case string(models.RunStatePending): + case string(proto.Run_PENDING): return color.YellowString(state) - case string(models.RunStateRunning): + case string(proto.Run_RUNNING): return color.YellowString(state) - case string(models.RunStateComplete): + case string(proto.Run_COMPLETE): return color.GreenString(state) default: return state @@ -116,13 +116,13 @@ func ColorizeRunState(state string) string { func ColorizeRunStatus(status string) string { switch strings.ToUpper(status) { - case string(models.RunStatusUnknown): + case string(proto.Run_RUN_STATUS_UNKNOWN): return color.YellowString(status) - case string(models.RunStatusSuccessful): + case string(proto.Run_SUCCESSFUL): return color.GreenString(status) - case string(models.RunStatusFailed): + case string(proto.Run_FAILED): return color.RedString(status) - case string(models.RunStatusCancelled): + case string(proto.Run_CANCELLED): return status default: return status @@ -131,15 +131,15 @@ func ColorizeRunStatus(status string) string { func ColorizeTaskRunState(state string) string { switch strings.ToUpper(state) { - case string(models.TaskRunStateUnknown): + case string(proto.TaskRun_UNKNOWN_STATE): return color.YellowString(state) - case string(models.TaskRunStateProcessing): + case string(proto.TaskRun_PROCESSING): return color.YellowString(state) - case string(models.TaskRunStateWaiting): + case string(proto.TaskRun_WAITING): return color.YellowString(state) - case string(models.TaskRunStateRunning): + case string(proto.TaskRun_RUNNING): return color.YellowString(state) - case string(models.TaskRunStateComplete): + case string(proto.TaskRun_COMPLETE): return color.GreenString(state) default: return state @@ -148,15 +148,15 @@ func ColorizeTaskRunState(state string) string { func ColorizeTaskRunStatus(status string) string { switch strings.ToUpper(status) { - case string(models.TaskRunStatusUnknown): + case string(proto.TaskRun_UNKNOWN_STATUS): return color.YellowString(status) - case string(models.TaskRunStatusSuccessful): + case string(proto.TaskRun_SUCCESSFUL): return color.GreenString(status) - case string(models.TaskRunStatusFailed): + case string(proto.TaskRun_FAILED): return color.RedString(status) - case string(models.TaskRunStatusCancelled): + case string(proto.TaskRun_CANCELLED): return status - case string(models.TaskRunStatusSkipped): + case string(proto.TaskRun_SKIPPED): return status default: return status @@ -165,13 +165,13 @@ func ColorizeTaskRunStatus(status string) string { func ColorizeTriggerState(state string) string { switch strings.ToUpper(state) { - case string(models.TriggerStateUnknown): + case string(proto.Trigger_UNKNOWN_STATE): return color.YellowString(state) - case string(models.TriggerStateProcessing): + case string(proto.Trigger_PROCESSING): return color.YellowString(state) - case string(models.TriggerStateRunning): + case string(proto.Trigger_RUNNING): return color.GreenString(state) - case string(models.TriggerStateExited): + case string(proto.Trigger_EXITED): return color.RedString(state) default: return state @@ -180,24 +180,24 @@ func ColorizeTriggerState(state string) string { func ColorizeTriggerStatus(status string) string { switch strings.ToUpper(status) { - case string(models.TriggerStatusUnknown): + case string(proto.Trigger_UNKNOWN_STATUS): return color.YellowString(status) - case string(models.TriggerStatusEnabled): + case string(proto.Trigger_ENABLED): return color.GreenString(status) - case string(models.TriggerStatusDisabled): + case string(proto.Trigger_DISABLED): return color.YellowString(status) default: return status } } -func ColorizeCommonTaskStatus(status string) string { +func ColorizeCommonTaskRegistrationStatus(status string) string { switch strings.ToUpper(status) { - case string(models.CommonTaskStatusUnknown): + case string(proto.CommonTaskRegistration_UNKNOWN): return color.YellowString(status) - case string(models.CommonTaskStatusEnabled): + case string(proto.CommonTaskRegistration_ENABLED): return color.GreenString(status) - case string(models.CommonTaskStatusDisabled): + case string(proto.CommonTaskRegistration_DISABLED): return color.YellowString(status) default: return status @@ -212,14 +212,14 @@ func SliceJoin(slice []string, msg string) string { return strings.Join(slice, ", ") } -func Health(states []models.RunStatus, emoji bool) string { +func Health(states []proto.Run_RunStatus, emoji bool) string { failed := 0 passed := 0 for _, state := range states { switch state { - case models.RunStatusFailed: + case proto.Run_FAILED: failed++ - case models.RunStatusUnknown: + case proto.Run_RUN_STATUS_UNKNOWN: failed++ default: passed++ @@ -249,7 +249,7 @@ func Health(states []models.RunStatus, emoji bool) string { return color.GreenString(healthString + "Good") } -func Dependencies(dependencies map[string]models.RequiredParentStatus) []string { +func Dependencies(dependencies map[string]proto.CustomTask_RequiredParentStatus) []string { result := []string{} any := []string{} successful := []string{} @@ -257,13 +257,13 @@ func Dependencies(dependencies map[string]models.RequiredParentStatus) []string for name, state := range dependencies { switch state { - case models.RequiredParentStatusAny: + case proto.CustomTask_ANY: any = append(any, name) - case models.RequiredParentStatusSuccess: + case proto.CustomTask_SUCCESS: successful = append(successful, name) - case models.RequiredParentStatusFailure: + case proto.CustomTask_FAILURE: failure = append(failure, name) - case models.RequiredParentStatusUnknown: + case proto.CustomTask_REQUIRED_PARENT_STATUS_UNKNOWN: } } diff --git a/internal/cli/namespace/namespaceGet.go b/internal/cli/namespace/namespaceGet.go index 66580370..804589c4 100644 --- a/internal/cli/namespace/namespaceGet.go +++ b/internal/cli/namespace/namespaceGet.go @@ -8,7 +8,6 @@ import ( "github.com/clintjedwards/gofer/internal/cli/cl" cliformat "github.com/clintjedwards/gofer/internal/cli/format" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/fatih/color" @@ -53,10 +52,7 @@ func namespaceGet(_ *cobra.Command, args []string) error { return err } - namespace := models.Namespace{} - namespace.FromProto(resp.Namespace) - - output, err := formatNamespace(&namespace, cl.State.Config.Detail) + output, err := formatNamespace(resp.Namespace, cl.State.Config.Detail) if err != nil { cl.State.Fmt.PrintErr(fmt.Sprintf("could not render namespace: %v", err)) cl.State.Fmt.Finish() @@ -76,9 +72,9 @@ type data struct { Deleted string } -func formatNamespace(namespace *models.Namespace, detail bool) (string, error) { +func formatNamespace(namespace *proto.Namespace, detail bool) (string, error) { data := data{ - ID: color.BlueString(namespace.ID), + ID: color.BlueString(namespace.Id), Name: namespace.Name, Description: namespace.Description, Created: cliformat.UnixMilli(namespace.Created, "Never", detail), diff --git a/internal/cli/pipeline/config/config.go b/internal/cli/pipeline/config/config.go new file mode 100644 index 00000000..bf8f87cd --- /dev/null +++ b/internal/cli/pipeline/config/config.go @@ -0,0 +1,11 @@ +package config + +import ( + "github.com/spf13/cobra" +) + +var CmdConfig = &cobra.Command{ + Use: "config", + Short: "Manage pipeline configs", + Long: `Manage pipeline configurations.`, +} diff --git a/internal/cli/pipeline/pipelineGet.go b/internal/cli/pipeline/pipelineGet.go index 2229f4b8..a10b0d3a 100644 --- a/internal/cli/pipeline/pipelineGet.go +++ b/internal/cli/pipeline/pipelineGet.go @@ -1,22 +1,16 @@ package pipeline import ( - "bytes" "context" "encoding/json" "fmt" "io" - "sort" - "strconv" "strings" - "text/template" "github.com/clintjedwards/gofer/internal/cli/cl" - "github.com/clintjedwards/gofer/internal/cli/format" - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" proto "github.com/clintjedwards/gofer/proto/go" - "github.com/fatih/color" "github.com/spf13/cobra" "google.golang.org/grpc/metadata" ) @@ -49,7 +43,7 @@ func pipelineGet(_ *cobra.Command, args []string) error { md := metadata.Pairs("Authorization", "Bearer "+cl.State.Config.Token) ctx := metadata.NewOutgoingContext(context.Background(), md) - resp, err := client.GetPipeline(ctx, &proto.GetPipelineRequest{ + _, err = client.GetPipeline(ctx, &proto.GetPipelineRequest{ NamespaceId: cl.State.Config.Namespace, Id: id, }) @@ -59,15 +53,14 @@ func pipelineGet(_ *cobra.Command, args []string) error { return err } - pipeline := models.Pipeline{} - pipeline.FromProto(resp.Pipeline) + // output, err := formatPipeline(ctx, client, &resp.Pipeline, cl.State.Config.Detail) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("could not render pipeline: %v", err)) + // cl.State.Fmt.Finish() + // return err + // } - output, err := formatPipeline(ctx, client, &pipeline, cl.State.Config.Detail) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not render pipeline: %v", err)) - cl.State.Fmt.Finish() - return err - } + output := "" cl.State.Fmt.Println(output) cl.State.Fmt.Finish() @@ -163,118 +156,118 @@ func formatStatePrefix(state models.RunState) string { return "Lasted" } -func formatPipeline(ctx context.Context, client proto.GoferClient, pipeline *models.Pipeline, detail bool) (string, error) { - recentRuns := recentRuns(ctx, client, pipeline.Namespace, pipeline.ID, 5) - recentRunList := [][]string{} - recentRunHealth := []models.RunStatus{} - for _, run := range recentRuns { - recentRunList = append(recentRunList, []string{ - color.BlueString("• Run #" + strconv.Itoa(int(run.ID))), - fmt.Sprintf("%s by %s %s", format.UnixMilli(run.Started, "Not yet", detail), color.CyanString(run.Trigger.Label), color.YellowString(run.Trigger.Name)), - fmt.Sprintf("%s %s", formatStatePrefix(run.State), format.Duration(run.Started, run.Ended)), - format.ColorizeRunState(format.NormalizeEnumValue(run.State, "Unknown")), - format.ColorizeRunStatus(format.NormalizeEnumValue(run.Status, "Unknown")), - }) - - recentRunHealth = append(recentRunHealth, run.Status) - } - - recentRunsTable := format.GenerateGenericTable(recentRunList, "", 4) - - triggerDataList := []triggerData{} - for _, trigger := range pipeline.Triggers { - recentEvents, err := recentEvents(client, pipeline.Namespace, pipeline.ID, trigger.Label, 5) - if err != nil { - return "", fmt.Errorf("could not get event data: %v", err) - } - - eventDataList := [][]string{} - for _, event := range recentEvents { - details := "" - evtDetail, ok := event.Details.(models.EventResolvedTriggerEvent) - if ok { - details = evtDetail.Result.Details - } - - eventDataList = append(eventDataList, []string{ - format.UnixMilli(event.Emitted, "Never", detail), details, - }) - } - - eventDataTable := format.GenerateGenericTable(eventDataList, "|", 7) - - triggerDataList = append(triggerDataList, triggerData{ - Label: color.BlueString(trigger.Label), - Name: color.YellowString(trigger.Name), - Events: eventDataTable, - Settings: trigger.Settings, - }) - } - - sort.Slice(triggerDataList, func(i, j int) bool { return triggerDataList[i].Label < triggerDataList[j].Label }) - - tasks := []taskData{} - for _, task := range pipeline.CustomTasks { - tasks = append(tasks, taskData{ - Name: color.BlueString(task.ID), - DependsOn: format.Dependencies(task.DependsOn), - NumItems: len(task.DependsOn), // This is purely for sorting purposes - }) - } - - sort.Slice(tasks, func(i, j int) bool { return tasks[i].NumItems < tasks[j].NumItems }) - - var lastRunTime int64 - if len(recentRuns) != 0 { - lastRun := recentRuns[len(recentRuns)-1] - lastRunTime = lastRun.Ended - } - - data := data{ - ID: color.BlueString(pipeline.ID), - Name: pipeline.Name, - State: format.ColorizePipelineState(format.NormalizeEnumValue(pipeline.State, "Unknown")), - Description: pipeline.Description, - RecentRuns: recentRunsTable, - Triggers: triggerDataList, - Health: format.Health(recentRunHealth, true), - Tasks: tasks, - Created: format.UnixMilli(pipeline.Created, "Never", detail), - LastRun: format.UnixMilli(lastRunTime, "Never", detail), - } - - const formatTmpl = `[{{.ID}}] {{.Name}} :: {{.State}} - - {{.Description}} - {{- if .RecentRuns}} - 📦 Recent Runs -{{.RecentRuns}} - {{- end }} - {{- if .Tasks }} - 🗒 Tasks: - {{- range $task := .Tasks}} - • {{ $task.Name }} - {{- if $task.DependsOn -}} - {{- range $dependant := $task.DependsOn }} - - {{ $dependant }} - {{- end -}} - {{- end -}} - {{- end -}} - {{- end}} - - {{- if .Triggers }} - - 🗘 Attached Triggers: - {{- range $trigger := .Triggers}} - ⟳ {{ $trigger.Label }} ({{ $trigger.Name }}) {{if $trigger.Events }}recent events:{{- end }} -{{ $trigger.Events }} - {{- end -}} - {{- end}} - -Created {{.Created}} | Last Run {{.LastRun}} | Health {{.Health}}` - - var tpl bytes.Buffer - t := template.Must(template.New("tmp").Parse(formatTmpl)) - _ = t.Execute(&tpl, data) - return tpl.String(), nil -} +// func formatPipeline(ctx context.Context, client proto.GoferClient, pipeline *proto.Pipeline, triggers []proto.PipelineTriggerSubscriptions, detail bool) (string, error) { +// recentRuns := recentRuns(ctx, client, pipeline.Metadata.Namespace, pipeline.Metadata.Id, 5) +// recentRunList := [][]string{} +// recentRunHealth := []models.RunStatus{} +// for _, run := range recentRuns { +// recentRunList = append(recentRunList, []string{ +// color.BlueString("• Run #" + strconv.Itoa(int(run.ID))), +// fmt.Sprintf("%s by %s %s", format.UnixMilli(run.Started, "Not yet", detail), color.CyanString(run.Trigger.Label), color.YellowString(run.Trigger.Name)), +// fmt.Sprintf("%s %s", formatStatePrefix(run.State), format.Duration(run.Started, run.Ended)), +// format.ColorizeRunState(format.NormalizeEnumValue(run.State, "Unknown")), +// format.ColorizeRunStatus(format.NormalizeEnumValue(run.Status, "Unknown")), +// }) + +// recentRunHealth = append(recentRunHealth, run.Status) +// } + +// recentRunsTable := format.GenerateGenericTable(recentRunList, "", 4) + +// triggerDataList := []triggerData{} +// for _, trigger := range pipeline.Triggers { +// recentEvents, err := recentEvents(client, pipeline.Namespace, pipeline.ID, trigger.Label, 5) +// if err != nil { +// return "", fmt.Errorf("could not get event data: %v", err) +// } + +// eventDataList := [][]string{} +// for _, event := range recentEvents { +// details := "" +// evtDetail, ok := event.Details.(models.EventResolvedTriggerEvent) +// if ok { +// details = evtDetail.Result.Details +// } + +// eventDataList = append(eventDataList, []string{ +// format.UnixMilli(event.Emitted, "Never", detail), details, +// }) +// } + +// eventDataTable := format.GenerateGenericTable(eventDataList, "|", 7) + +// triggerDataList = append(triggerDataList, triggerData{ +// Label: color.BlueString(trigger.Label), +// Name: color.YellowString(trigger.Name), +// Events: eventDataTable, +// Settings: trigger.Settings, +// }) +// } + +// sort.Slice(triggerDataList, func(i, j int) bool { return triggerDataList[i].Label < triggerDataList[j].Label }) + +// tasks := []taskData{} +// for _, task := range pipeline.CustomTasks { +// tasks = append(tasks, taskData{ +// Name: color.BlueString(task.ID), +// DependsOn: format.Dependencies(task.DependsOn), +// NumItems: len(task.DependsOn), // This is purely for sorting purposes +// }) +// } + +// sort.Slice(tasks, func(i, j int) bool { return tasks[i].NumItems < tasks[j].NumItems }) + +// var lastRunTime int64 +// if len(recentRuns) != 0 { +// lastRun := recentRuns[len(recentRuns)-1] +// lastRunTime = lastRun.Ended +// } + +// data := data{ +// ID: color.BlueString(pipeline.ID), +// Name: pipeline.Name, +// State: format.ColorizePipelineState(format.NormalizeEnumValue(pipeline.State, "Unknown")), +// Description: pipeline.Description, +// RecentRuns: recentRunsTable, +// Triggers: triggerDataList, +// Health: format.Health(recentRunHealth, true), +// Tasks: tasks, +// Created: format.UnixMilli(pipeline.Created, "Never", detail), +// LastRun: format.UnixMilli(lastRunTime, "Never", detail), +// } + +// const formatTmpl = `[{{.ID}}] {{.Name}} :: {{.State}} + +// {{.Description}} +// {{- if .RecentRuns}} +// 📦 Recent Runs +// {{.RecentRuns}} +// {{- end }} +// {{- if .Tasks }} +// 🗒 Tasks: +// {{- range $task := .Tasks}} +// • {{ $task.Name }} +// {{- if $task.DependsOn -}} +// {{- range $dependant := $task.DependsOn }} +// - {{ $dependant }} +// {{- end -}} +// {{- end -}} +// {{- end -}} +// {{- end}} + +// {{- if .Triggers }} + +// 🗘 Attached Triggers: +// {{- range $trigger := .Triggers}} +// ⟳ {{ $trigger.Label }} ({{ $trigger.Name }}) {{if $trigger.Events }}recent events:{{- end }} +// {{ $trigger.Events }} +// {{- end -}} +// {{- end}} + +// Created {{.Created}} | Last Run {{.LastRun}} | Health {{.Health}}` + +// var tpl bytes.Buffer +// t := template.Must(template.New("tmp").Parse(formatTmpl)) +// _ = t.Execute(&tpl, data) +// return tpl.String(), nil +// } diff --git a/internal/cli/pipeline/pipelineList.go b/internal/cli/pipeline/pipelineList.go index 7593c2bc..09d99c7a 100644 --- a/internal/cli/pipeline/pipelineList.go +++ b/internal/cli/pipeline/pipelineList.go @@ -7,7 +7,6 @@ import ( "github.com/clintjedwards/gofer/internal/cli/cl" cliFmt "github.com/clintjedwards/gofer/internal/cli/format" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/olekukonko/tablewriter" @@ -74,12 +73,9 @@ func pipelineList(cmd *cobra.Command, _ []string) error { } data := [][]string{} - for _, pipelineProto := range resp.Pipelines { - pipeline := models.Pipeline{} - pipeline.FromProto(pipelineProto) - - recentRuns := recentRuns(ctx, client, pipeline.Namespace, pipeline.ID, 5) - recentRunsHealth := []models.RunStatus{} + for _, pipeline := range resp.Pipelines { + recentRuns := recentRuns(ctx, client, pipeline.Namespace, pipeline.Id, 5) + recentRunsHealth := []proto.Run_RunStatus{} for _, run := range recentRuns { recentRunsHealth = append(recentRunsHealth, run.Status) } @@ -91,9 +87,8 @@ func pipelineList(cmd *cobra.Command, _ []string) error { } data = append(data, []string{ - pipeline.ID, - pipeline.Name, - cliFmt.ColorizePipelineState(cliFmt.NormalizeEnumValue(pipeline.State, "Unknown")), + pipeline.Id, + cliFmt.ColorizePipelineMetadataState(cliFmt.NormalizeEnumValue(pipeline.State.String(), "Unknown")), cliFmt.Health(recentRunsHealth, false), cliFmt.UnixMilli(pipeline.Created, "Never", cl.State.Config.Detail), cliFmt.UnixMilli(lastRunTime, "None", cl.State.Config.Detail), @@ -108,7 +103,7 @@ func pipelineList(cmd *cobra.Command, _ []string) error { return nil } -func recentRuns(ctx context.Context, client proto.GoferClient, namespace, pipeline string, limit int64) []models.Run { +func recentRuns(ctx context.Context, client proto.GoferClient, namespace, pipeline string, limit int64) []*proto.Run { resp, err := client.ListRuns(ctx, &proto.ListRunsRequest{ Offset: 0, Limit: limit, @@ -120,22 +115,14 @@ func recentRuns(ctx context.Context, client proto.GoferClient, namespace, pipeli return nil } - runs := []models.Run{} - - for _, protoRun := range resp.Runs { - run := models.Run{} - run.FromProto(protoRun) - runs = append(runs, run) - } - - return runs + return resp.Runs } func formatTable(data [][]string, color bool) string { tableString := &strings.Builder{} table := tablewriter.NewWriter(tableString) - table.SetHeader([]string{"ID", "Name", "State", "Health", "Created", "Last Run"}) + table.SetHeader([]string{"ID", "State", "Health", "Created", "Last Run"}) table.SetAlignment(tablewriter.ALIGN_LEFT) table.SetHeaderAlignment(tablewriter.ALIGN_LEFT) table.SetHeaderLine(true) @@ -153,7 +140,6 @@ func formatTable(data [][]string, color bool) string { tablewriter.Color(tablewriter.FgBlueColor), tablewriter.Color(tablewriter.FgBlueColor), tablewriter.Color(tablewriter.FgBlueColor), - tablewriter.Color(tablewriter.FgBlueColor), ) table.SetColumnColor( tablewriter.Color(tablewriter.FgYellowColor), @@ -161,7 +147,6 @@ func formatTable(data [][]string, color bool) string { tablewriter.Color(0), tablewriter.Color(0), tablewriter.Color(0), - tablewriter.Color(0), ) } diff --git a/internal/cli/pipeline/pipelineCreate.go b/internal/cli/pipeline/pipelineRegister.go similarity index 72% rename from internal/cli/pipeline/pipelineCreate.go rename to internal/cli/pipeline/pipelineRegister.go index 16a0ae8d..20d7a9ea 100644 --- a/internal/cli/pipeline/pipelineCreate.go +++ b/internal/cli/pipeline/pipelineRegister.go @@ -15,29 +15,31 @@ import ( "github.com/clintjedwards/gofer/internal/cli/cl" proto "github.com/clintjedwards/gofer/proto/go" "github.com/clintjedwards/polyfmt" - "google.golang.org/grpc/metadata" - pb "google.golang.org/protobuf/proto" - "github.com/fatih/color" "github.com/spf13/cobra" + "google.golang.org/grpc/metadata" + pb "google.golang.org/protobuf/proto" ) -var cmdPipelinesCreate = &cobra.Command{ - Use: "create ", - Short: "Create a new pipeline", - Long: `Create a new pipeline. +var cmdPipelineRegister = &cobra.Command{ + Use: "register ", + Short: "Register a new pipeline configuration", + Long: `Register a new pipeline configuration. + +If pipeline does not exist this will create a new one. -Updating a pipeline requires a pipeline configuration file. You can find documentation on how to -manage your pipeline configuration file +Requires a pipeline configuration file. You can find documentation on how to +create/manage your pipeline configuration file [here](https://clintjedwards.com/gofer/ref/pipeline_configuration/index.html).`, - Example: `$ gofer pipeline create ./example_pipelines/rust/simple -$ gofer pipeline create ./example_pipelines/go/simple`, - RunE: pipelineCreate, + Example: `$ gofer pipeline register ./example_pipelines/rust/simple +$ gofer pipeline register ./example_pipelines/go/simple`, + RunE: pipelineRegister, Args: cobra.ExactArgs(1), } func init() { - CmdPipeline.AddCommand(cmdPipelinesCreate) + cmdPipelineRegister.Flags().BoolP("disable", "d", false, "set the pipeline as disabled upon registration") + CmdPipeline.AddCommand(cmdPipelineRegister) } func detectLanguage(path string) (configLanguage, error) { @@ -100,10 +102,17 @@ func rustCmdString(path string) string { return fmt.Sprintf("cargo run --manifest-path %s/Cargo.toml", path) } -func pipelineCreate(_ *cobra.Command, args []string) error { +func pipelineRegister(cmd *cobra.Command, args []string) error { path := args[0] - cl.State.Fmt.Print("Creating pipeline") + cl.State.Fmt.Print("Registering pipeline") + + disable, err := cmd.Flags().GetBool("disable") + if err != nil { + cl.State.Fmt.PrintErr(err) + cl.State.Fmt.Finish() + return err + } absolutePath, err := filepath.Abs(path) if err != nil { @@ -119,16 +128,16 @@ func pipelineCreate(_ *cobra.Command, args []string) error { return err } - var cmd *exec.Cmd + var execCmd *exec.Cmd switch language { case configLanguageGolang: - cmd = golangBuildCmd(absolutePath) + execCmd = golangBuildCmd(absolutePath) case configLanguageRust: - cmd = rustBuildCmd(absolutePath) + execCmd = rustBuildCmd(absolutePath) } - stderr, err := cmd.StderrPipe() + stderr, err := execCmd.StderrPipe() if err != nil { cl.State.Fmt.PrintErr(fmt.Sprintf("could not read output from cmd; %v", err)) cl.State.Fmt.Finish() @@ -136,7 +145,7 @@ func pipelineCreate(_ *cobra.Command, args []string) error { } outputBuffer := bytes.NewBuffer([]byte{}) - cmd.Stdout = outputBuffer + execCmd.Stdout = outputBuffer // By default the diagnostic output for a program should probably write to stderr. // We will assume (maybe naively) this is the case for both the go compiler and the rust @@ -166,7 +175,7 @@ func pipelineCreate(_ *cobra.Command, args []string) error { close(lines) }() - err = cmd.Run() + err = execCmd.Run() if err != nil { cl.State.Fmt.PrintErr("Could not successfully build target pipeline; Examine partial error output below:\n...") @@ -213,7 +222,7 @@ func pipelineCreate(_ *cobra.Command, args []string) error { return err } - pipelineConfig := proto.PipelineConfig{} + pipelineConfig := proto.UserPipelineConfig{} err = pb.Unmarshal(output, &pipelineConfig) if err != nil { @@ -236,24 +245,31 @@ func pipelineCreate(_ *cobra.Command, args []string) error { md := metadata.Pairs("Authorization", "Bearer "+cl.State.Config.Token) ctx := metadata.NewOutgoingContext(context.Background(), md) - resp, err := client.CreatePipeline(ctx, &proto.CreatePipelineRequest{ + resp, err := client.RegisterPipelineConfig(ctx, &proto.RegisterPipelineConfigRequest{ NamespaceId: cl.State.Config.Namespace, PipelineConfig: &pipelineConfig, + Disable: disable, }) if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not create pipeline: %v", err)) + cl.State.Fmt.PrintErr(fmt.Sprintf("could not register pipeline configuration: %v", err)) cl.State.Fmt.Finish() return err } - printCreateSuccess(resp.Pipeline) + pipelineSuccessText := "Registered pipeline config" + + if resp.Pipeline.Config.Version == 1 { + pipelineSuccessText = "Registered new pipeline" + } + + printRegisterSuccess(pipelineSuccessText, resp.Pipeline) return nil } -func printCreateSuccess(pipeline *proto.Pipeline) { - cl.State.Fmt.PrintSuccess(fmt.Sprintf("Created pipeline: [%s] %q", color.BlueString(pipeline.Id), pipeline.Name)) - cl.State.Fmt.Println(fmt.Sprintf("\n View details of your new pipeline: %s", color.YellowString("gofer pipeline get %s", pipeline.Id))) - cl.State.Fmt.Println(fmt.Sprintf(" Start a new run: %s", color.YellowString("gofer run start %s", pipeline.Id))) +func printRegisterSuccess(successText string, pipeline *proto.Pipeline) { + cl.State.Fmt.PrintSuccess(fmt.Sprintf("%s: [%s] %q %s", successText, color.BlueString(pipeline.Metadata.Id), pipeline.Config.Name, color.MagentaString("v%d", pipeline.Config.Version))) + cl.State.Fmt.Println(fmt.Sprintf("\n View details of your pipeline: %s", color.YellowString("gofer pipeline get %s", pipeline.Metadata.Id))) + cl.State.Fmt.Println(fmt.Sprintf(" Start a new run: %s", color.YellowString("gofer run start %s", pipeline.Metadata.Id))) cl.State.Fmt.Finish() } diff --git a/internal/cli/pipeline/pipelineUpdate.go b/internal/cli/pipeline/pipelineUpdate.go index 79aa80c0..0146fbeb 100644 --- a/internal/cli/pipeline/pipelineUpdate.go +++ b/internal/cli/pipeline/pipelineUpdate.go @@ -1,24 +1,7 @@ package pipeline import ( - "bufio" - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "os/exec" - "path/filepath" - "strings" - "time" - - "github.com/clintjedwards/gofer/internal/cli/cl" - proto "github.com/clintjedwards/gofer/proto/go" - "github.com/clintjedwards/polyfmt" - "github.com/fatih/color" - "github.com/spf13/cobra" - "google.golang.org/grpc/metadata" ) var cmdPipelineUpdate = &cobra.Command{ @@ -39,228 +22,228 @@ func init() { } func pipelineUpdate(cmd *cobra.Command, args []string) error { - id := args[0] - path := args[1] - force, err := cmd.Flags().GetBool("force") - if err != nil { - fmt.Println(err) - return err - } - - gracefully, err := cmd.Flags().GetBool("graceful-stop") - if err != nil { - fmt.Println(err) - return err - } - - cl.State.Fmt.Print("Updating pipeline") - - conn, err := cl.State.Connect() - if err != nil { - cl.State.Fmt.PrintErr(err) - cl.State.Fmt.Finish() - return err - } - - client := proto.NewGoferClient(conn) - - cl.State.Fmt.Print("Disabling pipeline") - - md := metadata.Pairs("Authorization", "Bearer "+cl.State.Config.Token) - ctx := metadata.NewOutgoingContext(context.Background(), md) - _, err = client.DisablePipeline(ctx, &proto.DisablePipelineRequest{ - NamespaceId: cl.State.Config.Namespace, - Id: id, - }) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not disable pipeline: %v", err)) - cl.State.Fmt.Finish() - return err - } - - cl.State.Fmt.PrintSuccess("Disabled pipeline") - - if force { - cl.State.Fmt.Print("Force cancelling pipeline runs") - - _, err = client.CancelAllRuns(ctx, &proto.CancelAllRunsRequest{PipelineId: id, Force: true}) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not force cancel pipeline: %v", err)) - cl.State.Fmt.Finish() - return err - } - } - - if gracefully { - cl.State.Fmt.Print("Cancelling pipeline runs") - - _, err = client.CancelAllRuns(ctx, &proto.CancelAllRunsRequest{PipelineId: id, Force: false}) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not gracefully cancel pipeline: %v", err)) - cl.State.Fmt.Finish() - return err - } - } - - cl.State.Fmt.Print("Waiting for in-progress runs to stop") - for { - resp, err := client.ListRuns(ctx, &proto.ListRunsRequest{PipelineId: id, Offset: 0, Limit: 20}) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not get run list for pipeline: %v", err)) - time.Sleep(time.Second * 3) - continue - } - - hasRunningJob := false - for _, run := range resp.Runs { - if run.State != proto.Run_COMPLETE { - hasRunningJob = true - } - } - - if hasRunningJob { - time.Sleep(time.Second * 5) - continue - } - - break - } - - cl.State.Fmt.PrintSuccess("Checked for runs in-progress") - - cl.State.Fmt.Print("Updating pipeline") - - absolutePath, err := filepath.Abs(path) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not find absolute path for given path %q; %v", path, err)) - cl.State.Fmt.Finish() - return err - } - - language, err := detectLanguage(absolutePath) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not determine language for %q; %v", path, err)) - cl.State.Fmt.Finish() - return err - } - - var buildCmd *exec.Cmd - - switch language { - case configLanguageGolang: - buildCmd = golangBuildCmd(absolutePath) - case configLanguageRust: - buildCmd = rustBuildCmd(absolutePath) - } - - stderr, err := buildCmd.StderrPipe() - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not read output from cmd; %v", err)) - cl.State.Fmt.Finish() - return err - } - outputBuffer := bytes.NewBuffer([]byte{}) - buildCmd.Stdout = outputBuffer - - scanner := bufio.NewScanner(stderr) - lines := make(chan string, 2000) - - go func() { - for scanner.Scan() { - line := scanner.Text() - line = strings.TrimSpace(line) - lines <- line // Put the line into the lines buffer before truncating it. - - // Truncate the line so that it fits better in small command lines. - if len(line) > 80 { - line = line[:80] - } - cl.State.Fmt.Print(fmt.Sprintf("Building config: %s", line), polyfmt.Pretty) - } - close(lines) - }() - - err = buildCmd.Run() - if err != nil { - cl.State.Fmt.PrintErr("Could not successfully build target pipeline; Examine partial error output below:\n...") - - linesList := []string{} - - for line := range lines { - linesList = append(linesList, line) - } - - if len(linesList) == 0 { - lines <- "No output found for this pipeline build" - } - - if len(linesList) > 15 { - linesList = linesList[:15] - } - - for _, line := range linesList { - cl.State.Fmt.Println(fmt.Sprintf(" %s", line)) - } - - switch language { - case configLanguageRust: - cl.State.Fmt.Println(fmt.Sprintf("...\nView full error output: %s", color.CyanString(rustCmdString(path)))) - case configLanguageGolang: - cl.State.Fmt.Println(fmt.Sprintf("...\nView full error output: %s", color.CyanString(golangCmdString(path)))) - } - cl.State.Fmt.Finish() - return err - } - - cl.State.Fmt.Print("Parsing pipeline config") - - output, err := io.ReadAll(outputBuffer) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("Could not parse pipeline config; %v", err)) - cl.State.Fmt.Finish() - return err - } - - if len(output) == 0 { - cl.State.Fmt.PrintErr("No lines found in output") - cl.State.Fmt.Finish() - return err - } - - pipelineConfig := proto.PipelineConfig{} - - err = json.Unmarshal([]byte(output), &pipelineConfig) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("Could not parse pipeline config; %v", err)) - cl.State.Fmt.Finish() - return err - } - - resp, err := client.UpdatePipeline(ctx, &proto.UpdatePipelineRequest{ - NamespaceId: cl.State.Config.Namespace, - PipelineConfig: &pipelineConfig, - }) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not update pipeline: %v", err)) - cl.State.Fmt.Finish() - return err - } - - cl.State.Fmt.PrintSuccess(fmt.Sprintf("Updated pipeline: [%s] %q", resp.Pipeline.Id, resp.Pipeline.Name)) - - cl.State.Fmt.Print("Enabling pipeline") - - _, err = client.EnablePipeline(ctx, &proto.EnablePipelineRequest{ - Id: id, - }) - if err != nil { - cl.State.Fmt.PrintErr(fmt.Sprintf("could not enable pipeline: %v", err)) - cl.State.Fmt.Finish() - return err - } - - cl.State.Fmt.PrintSuccess("Enabled pipeline") - cl.State.Fmt.Finish() + // id := args[0] + // path := args[1] + // force, err := cmd.Flags().GetBool("force") + // if err != nil { + // fmt.Println(err) + // return err + // } + + // gracefully, err := cmd.Flags().GetBool("graceful-stop") + // if err != nil { + // fmt.Println(err) + // return err + // } + + // cl.State.Fmt.Print("Updating pipeline") + + // conn, err := cl.State.Connect() + // if err != nil { + // cl.State.Fmt.PrintErr(err) + // cl.State.Fmt.Finish() + // return err + // } + + // client := proto.NewGoferClient(conn) + + // cl.State.Fmt.Print("Disabling pipeline") + + // md := metadata.Pairs("Authorization", "Bearer "+cl.State.Config.Token) + // ctx := metadata.NewOutgoingContext(context.Background(), md) + // _, err = client.DisablePipeline(ctx, &proto.DisablePipelineRequest{ + // NamespaceId: cl.State.Config.Namespace, + // Id: id, + // }) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("could not disable pipeline: %v", err)) + // cl.State.Fmt.Finish() + // return err + // } + + // cl.State.Fmt.PrintSuccess("Disabled pipeline") + + // if force { + // cl.State.Fmt.Print("Force cancelling pipeline runs") + + // _, err = client.CancelAllRuns(ctx, &proto.CancelAllRunsRequest{PipelineId: id, Force: true}) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("could not force cancel pipeline: %v", err)) + // cl.State.Fmt.Finish() + // return err + // } + // } + + // if gracefully { + // cl.State.Fmt.Print("Cancelling pipeline runs") + + // _, err = client.CancelAllRuns(ctx, &proto.CancelAllRunsRequest{PipelineId: id, Force: false}) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("could not gracefully cancel pipeline: %v", err)) + // cl.State.Fmt.Finish() + // return err + // } + // } + + // cl.State.Fmt.Print("Waiting for in-progress runs to stop") + // for { + // resp, err := client.ListRuns(ctx, &proto.ListRunsRequest{PipelineId: id, Offset: 0, Limit: 20}) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("could not get run list for pipeline: %v", err)) + // time.Sleep(time.Second * 3) + // continue + // } + + // hasRunningJob := false + // for _, run := range resp.Runs { + // if run.State != proto.Run_COMPLETE { + // hasRunningJob = true + // } + // } + + // if hasRunningJob { + // time.Sleep(time.Second * 5) + // continue + // } + + // break + // } + + // cl.State.Fmt.PrintSuccess("Checked for runs in-progress") + + // cl.State.Fmt.Print("Updating pipeline") + + // absolutePath, err := filepath.Abs(path) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("could not find absolute path for given path %q; %v", path, err)) + // cl.State.Fmt.Finish() + // return err + // } + + // language, err := detectLanguage(absolutePath) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("could not determine language for %q; %v", path, err)) + // cl.State.Fmt.Finish() + // return err + // } + + // var buildCmd *exec.Cmd + + // switch language { + // case configLanguageGolang: + // buildCmd = golangBuildCmd(absolutePath) + // case configLanguageRust: + // buildCmd = rustBuildCmd(absolutePath) + // } + + // stderr, err := buildCmd.StderrPipe() + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("could not read output from cmd; %v", err)) + // cl.State.Fmt.Finish() + // return err + // } + // outputBuffer := bytes.NewBuffer([]byte{}) + // buildCmd.Stdout = outputBuffer + + // scanner := bufio.NewScanner(stderr) + // lines := make(chan string, 2000) + + // go func() { + // for scanner.Scan() { + // line := scanner.Text() + // line = strings.TrimSpace(line) + // lines <- line // Put the line into the lines buffer before truncating it. + + // // Truncate the line so that it fits better in small command lines. + // if len(line) > 80 { + // line = line[:80] + // } + // cl.State.Fmt.Print(fmt.Sprintf("Building config: %s", line), polyfmt.Pretty) + // } + // close(lines) + // }() + + // err = buildCmd.Run() + // if err != nil { + // cl.State.Fmt.PrintErr("Could not successfully build target pipeline; Examine partial error output below:\n...") + + // linesList := []string{} + + // for line := range lines { + // linesList = append(linesList, line) + // } + + // if len(linesList) == 0 { + // lines <- "No output found for this pipeline build" + // } + + // if len(linesList) > 15 { + // linesList = linesList[:15] + // } + + // for _, line := range linesList { + // cl.State.Fmt.Println(fmt.Sprintf(" %s", line)) + // } + + // switch language { + // case configLanguageRust: + // cl.State.Fmt.Println(fmt.Sprintf("...\nView full error output: %s", color.CyanString(rustCmdString(path)))) + // case configLanguageGolang: + // cl.State.Fmt.Println(fmt.Sprintf("...\nView full error output: %s", color.CyanString(golangCmdString(path)))) + // } + // cl.State.Fmt.Finish() + // return err + // } + + // cl.State.Fmt.Print("Parsing pipeline config") + + // output, err := io.ReadAll(outputBuffer) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("Could not parse pipeline config; %v", err)) + // cl.State.Fmt.Finish() + // return err + // } + + // if len(output) == 0 { + // cl.State.Fmt.PrintErr("No lines found in output") + // cl.State.Fmt.Finish() + // return err + // } + + // pipelineConfig := proto.PipelineConfig{} + + // err = json.Unmarshal([]byte(output), &pipelineConfig) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("Could not parse pipeline config; %v", err)) + // cl.State.Fmt.Finish() + // return err + // } + + // resp, err := client.UpdatePipeline(ctx, &proto.UpdatePipelineRequest{ + // NamespaceId: cl.State.Config.Namespace, + // PipelineConfig: &pipelineConfig, + // }) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("could not update pipeline: %v", err)) + // cl.State.Fmt.Finish() + // return err + // } + + // cl.State.Fmt.PrintSuccess(fmt.Sprintf("Updated pipeline: [%s] %q", resp.Pipeline.Id, resp.Pipeline.Name)) + + // cl.State.Fmt.Print("Enabling pipeline") + + // _, err = client.EnablePipeline(ctx, &proto.EnablePipelineRequest{ + // Id: id, + // }) + // if err != nil { + // cl.State.Fmt.PrintErr(fmt.Sprintf("could not enable pipeline: %v", err)) + // cl.State.Fmt.Finish() + // return err + // } + + // cl.State.Fmt.PrintSuccess("Enabled pipeline") + // cl.State.Fmt.Finish() return nil } diff --git a/internal/cli/root.go b/internal/cli/root.go index 46ef7b03..d510cd22 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -8,15 +8,9 @@ import ( "strings" "github.com/clintjedwards/gofer/internal/cli/cl" - "github.com/clintjedwards/gofer/internal/cli/commonTask" - "github.com/clintjedwards/gofer/internal/cli/event" "github.com/clintjedwards/gofer/internal/cli/namespace" "github.com/clintjedwards/gofer/internal/cli/pipeline" - "github.com/clintjedwards/gofer/internal/cli/run" - "github.com/clintjedwards/gofer/internal/cli/secret" "github.com/clintjedwards/gofer/internal/cli/service" - "github.com/clintjedwards/gofer/internal/cli/taskrun" - "github.com/clintjedwards/gofer/internal/cli/trigger" "github.com/spf13/cobra" ) @@ -44,13 +38,13 @@ func init() { RootCmd.SetVersionTemplate(humanizeVersion(appVersion)) RootCmd.AddCommand(service.CmdService) RootCmd.AddCommand(pipeline.CmdPipeline) - RootCmd.AddCommand(run.CmdRun) - RootCmd.AddCommand(taskrun.CmdTaskRun) - RootCmd.AddCommand(trigger.CmdTrigger) RootCmd.AddCommand(namespace.CmdNamespace) - RootCmd.AddCommand(secret.CmdSecret) - RootCmd.AddCommand(event.CmdEvent) - RootCmd.AddCommand(commonTask.CmdCommonTask) + // RootCmd.AddCommand(run.CmdRun) + // RootCmd.AddCommand(taskrun.CmdTaskRun) + // RootCmd.AddCommand(trigger.CmdTrigger) + // RootCmd.AddCommand(secret.CmdSecret) + // RootCmd.AddCommand(event.CmdEvent) + // RootCmd.AddCommand(commonTask.CmdCommonTask) RootCmd.PersistentFlags().String("config", "", "configuration file path") RootCmd.PersistentFlags().Bool("detail", false, "show extra detail for some commands (ex. Exact time instead of humanized)") diff --git a/internal/cli/run/runGet.go b/internal/cli/run/runGet.go index 51430db8..d8d0bbfe 100644 --- a/internal/cli/run/runGet.go +++ b/internal/cli/run/runGet.go @@ -9,7 +9,7 @@ import ( "github.com/clintjedwards/gofer/internal/cli/cl" "github.com/clintjedwards/gofer/internal/cli/format" - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/fatih/color" diff --git a/internal/cli/run/runList.go b/internal/cli/run/runList.go index e44d6b57..13c37b34 100644 --- a/internal/cli/run/runList.go +++ b/internal/cli/run/runList.go @@ -8,7 +8,7 @@ import ( "github.com/clintjedwards/gofer/internal/cli/cl" cliformat "github.com/clintjedwards/gofer/internal/cli/format" - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/fatih/color" diff --git a/internal/cli/service/sampleConfig.hcl b/internal/cli/service/sampleConfig.hcl index 345b1571..f0b4b164 100644 --- a/internal/cli/service/sampleConfig.hcl +++ b/internal/cli/service/sampleConfig.hcl @@ -1,10 +1,11 @@ // Gofer Service configuration file is used as an alternative to providing the server configurations via envvars. // You can find an explanation of these configuration variables and where to put this file so the server can read this -// file in the documenation: https://clintjedwards.com/gofer/ref/pipeline_configuration/index.html +// file in the documenation: https://clintjedwards.com/gofer/ref/server_configuration/index.html dev_mode = false event_log_retention = "4380h" event_prune_interval = "3h" ignore_pipeline_run_events = false +pipeline_version_limit = 5 log_level = "info" task_run_log_expiry = 50 task_run_logs_dir = "/tmp" diff --git a/internal/cli/service/tokens/tokensGet.go b/internal/cli/service/tokens/tokensGet.go index 2bec3150..a3fa63d2 100644 --- a/internal/cli/service/tokens/tokensGet.go +++ b/internal/cli/service/tokens/tokensGet.go @@ -8,7 +8,6 @@ import ( "github.com/clintjedwards/gofer/internal/cli/cl" "github.com/clintjedwards/gofer/internal/cli/format" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/fatih/color" @@ -66,10 +65,7 @@ func tokensGet(_ *cobra.Command, _ []string) error { return err } - token := models.Token{} - token.FromProto(resp.Details) - - output, err := formatToken(&token, cl.State.Config.Detail) + output, err := formatToken(resp.Details, cl.State.Config.Detail) if err != nil { cl.State.Fmt.PrintErr(fmt.Sprintf("could not render token: %v", err)) cl.State.Fmt.Finish() @@ -81,7 +77,7 @@ func tokensGet(_ *cobra.Command, _ []string) error { return nil } -func formatToken(token *models.Token, detail bool) (string, error) { +func formatToken(token *proto.Token, detail bool) (string, error) { active := color.GreenString("Enabled") if token.Disabled { active = color.RedString("Disabled") diff --git a/internal/cli/service/tokens/tokensList.go b/internal/cli/service/tokens/tokensList.go index 33b291a5..ef277e68 100644 --- a/internal/cli/service/tokens/tokensList.go +++ b/internal/cli/service/tokens/tokensList.go @@ -6,7 +6,6 @@ import ( "strings" "github.com/clintjedwards/gofer/internal/cli/cl" - "github.com/clintjedwards/gofer/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/fatih/color" "github.com/olekukonko/tablewriter" @@ -63,9 +62,7 @@ func tokensList(_ *cobra.Command, _ []string) error { } data := [][]string{} - for _, protoToken := range resp.Tokens { - token := models.Token{} - token.FromProto(protoToken) + for _, token := range resp.Tokens { active := color.GreenString("Active") if token.Disabled { active = color.RedString("Disabled") diff --git a/internal/cli/taskrun/taskrunGet.go b/internal/cli/taskrun/taskrunGet.go index fb72f2e4..96d56d4e 100644 --- a/internal/cli/taskrun/taskrunGet.go +++ b/internal/cli/taskrun/taskrunGet.go @@ -10,7 +10,7 @@ import ( "github.com/clintjedwards/gofer/internal/cli/cl" "github.com/clintjedwards/gofer/internal/cli/format" - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" proto "github.com/clintjedwards/gofer/proto/go" "golang.org/x/text/cases" "golang.org/x/text/language" diff --git a/internal/cli/taskrun/taskrunList.go b/internal/cli/taskrun/taskrunList.go index f264b588..96f1a363 100644 --- a/internal/cli/taskrun/taskrunList.go +++ b/internal/cli/taskrun/taskrunList.go @@ -8,7 +8,7 @@ import ( "github.com/clintjedwards/gofer/internal/cli/cl" cliformat "github.com/clintjedwards/gofer/internal/cli/format" - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" proto "github.com/clintjedwards/gofer/proto/go" "github.com/fatih/color" diff --git a/internal/cli/trigger/triggerSubscribe.go b/internal/cli/trigger/triggerSubscribe.go new file mode 100644 index 00000000..dee4fe7a --- /dev/null +++ b/internal/cli/trigger/triggerSubscribe.go @@ -0,0 +1 @@ +package trigger diff --git a/internal/cli/trigger/triggerUnsubscribe.go b/internal/cli/trigger/triggerUnsubscribe.go new file mode 100644 index 00000000..dee4fe7a --- /dev/null +++ b/internal/cli/trigger/triggerUnsubscribe.go @@ -0,0 +1 @@ +package trigger diff --git a/internal/config/api.go b/internal/config/api.go index 712eafcc..02850b10 100644 --- a/internal/config/api.go +++ b/internal/config/api.go @@ -18,9 +18,14 @@ type API struct { // Controls the ability to trigger runs. This setting can be toggled while the server is running. IgnorePipelineRunEvents bool `split_words:"true" hcl:"ignore_pipeline_run_events,optional"` - /// The limit automatically imposed if the pipeline does not define a limit. 0 is unlimited. + // The limit automatically imposed if the pipeline does not define a limit. 0 is unlimited. RunParallelismLimit int `split_words:"true" hcl:"run_parallelism_limit,optional"` + // How many total versions of an individual pipelines to keep. + // The oldest version of a pipeline over this limit gets deleted. + // 0 means don't delete versions. + PipelineVersionLimit int `split_words:"true" hcl:"pipeline_version_limit,optional"` + // Controls how long Gofer will hold onto events before discarding them. This is important factor in disk space // and memory footprint. // @@ -72,6 +77,7 @@ func DefaultAPIConfig() *API { DevMode: false, IgnorePipelineRunEvents: false, RunParallelismLimit: 200, + PipelineVersionLimit: 5, EventLogRetention: mustParseDuration("4380h"), // 4380 hours is roughly 6 months. EventPruneInterval: mustParseDuration("3h"), LogLevel: "debug", diff --git a/internal/config/api_test.go b/internal/config/api_test.go index f3968548..5e61b81a 100644 --- a/internal/config/api_test.go +++ b/internal/config/api_test.go @@ -20,6 +20,7 @@ func TestAPISampleFromFile(t *testing.T) { expected := API{ DevMode: false, IgnorePipelineRunEvents: false, + PipelineVersionLimit: 5, EventLogRetention: time.Hour * 4380, EventLogRetentionHCL: "4380h", EventPruneInterval: time.Hour * 3, @@ -116,6 +117,7 @@ func TestAPISampleOverwriteWithEnvs(t *testing.T) { expected := API{ DevMode: false, IgnorePipelineRunEvents: false, + PipelineVersionLimit: 5, EventLogRetention: time.Hour * 4380, EventLogRetentionHCL: "4380h", EventPruneInterval: time.Hour * 3, diff --git a/internal/eventbus/eventbus.go b/internal/eventbus/eventbus.go index 8d5cd8b3..533ffd9e 100644 --- a/internal/eventbus/eventbus.go +++ b/internal/eventbus/eventbus.go @@ -7,8 +7,8 @@ import ( "sync" "time" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" "github.com/rs/zerolog/log" ) @@ -116,7 +116,7 @@ func (eb *EventBus) Unsubscribe(sub Subscription) { func (eb *EventBus) Publish(evt models.EventKindDetails) int64 { event := models.NewEvent(evt) - id, err := eb.storage.InsertEvent(event) + id, err := eb.storage.InsertEvent(eb.storage, event.ToStorage()) if err != nil { log.Error().Err(err).Msg("could not add event to storage") } @@ -162,7 +162,7 @@ func (eb *EventBus) GetAll(reverse bool) <-chan models.Event { offset := 0 for { - eventList, err := eb.storage.ListEvents(offset, 10, reverse) + eventList, err := eb.storage.ListEvents(eb.storage, offset, 10, reverse) if err != nil { log.Error().Err(err).Msg("could not get events") close(events) @@ -174,7 +174,10 @@ func (eb *EventBus) GetAll(reverse bool) <-chan models.Event { return } - for _, event := range eventList { + for _, rawEvent := range eventList { + event := models.Event{} + event.FromStorage(&rawEvent) + events <- event } @@ -187,7 +190,7 @@ func (eb *EventBus) GetAll(reverse bool) <-chan models.Event { // Get returns a single event by id. Returns a eventbus.ErrEventNotFound if the event could not be located. func (eb *EventBus) Get(id int64) (models.Event, error) { - event, err := eb.storage.GetEvent(id) + rawEvent, err := eb.storage.GetEvent(eb.storage, id) if err != nil { if errors.Is(err, storage.ErrEntityNotFound) { return models.Event{}, ErrEventNotFound @@ -195,6 +198,9 @@ func (eb *EventBus) Get(id int64) (models.Event, error) { return models.Event{}, err } + event := models.Event{} + event.FromStorage(&rawEvent) + return event, nil } @@ -204,19 +210,22 @@ func (eb *EventBus) pruneEvents() { totalPruned := 0 for { - events, err := eb.storage.ListEvents(offset, 50, false) + events, err := eb.storage.ListEvents(eb.storage, offset, 50, false) if err != nil { log.Error().Err(err).Msg("could not get events from storage") return } - for _, event := range events { + for _, rawEvent := range events { + event := models.Event{} + event.FromStorage(&rawEvent) + if isPastCutDate(event, eb.retention) { log.Debug().Int64("event_id", event.ID).Dur("retention", eb.retention). Int64("emitted", event.Emitted). Int64("current_time", time.Now().UnixMilli()).Msg("removed event past retention") totalPruned++ - err := eb.storage.DeleteEvent(event.ID) + err := eb.storage.DeleteEvent(eb.storage, event.ID) if err != nil { log.Error().Err(err).Msg("could not delete event") return diff --git a/internal/eventbus/eventbus_test.go b/internal/eventbus/eventbus_test.go index cdfd80b9..c8e88e66 100644 --- a/internal/eventbus/eventbus_test.go +++ b/internal/eventbus/eventbus_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" + "github.com/clintjedwards/gofer/internal/models" "github.com/clintjedwards/gofer/internal/storage" - "github.com/clintjedwards/gofer/models" ) func tempFile() string { @@ -117,55 +117,55 @@ func TestUnsubscribe(t *testing.T) { } } -// func TestGetAll(t *testing.T) { -// path := tempFile() -// db, err := storage.New(path, 200) -// if err != nil { -// t.Fatal(err) -// } -// defer os.Remove(path) - -// eb, err := New(db, time.Second*5, time.Minute*5) -// if err != nil { -// t.Fatal(err) -// } - -// firstEventID := eb.Publish(models.EventCreatedNamespace{ -// NamespaceID: "test_namespace_1", -// }) -// secondEventID := eb.Publish(models.EventCreatedNamespace{ -// NamespaceID: "test_namespace_2", -// }) -// thirdEventID := eb.Publish(models.EventCreatedNamespace{ -// NamespaceID: "test_namespace_3", -// }) -// eb.Publish(models.EventCreatedNamespace{ -// NamespaceID: "test_namespace_4", -// }) -// eb.Publish(models.EventCreatedNamespace{ -// NamespaceID: "test_namespace_5", -// }) - -// events := eb.GetAll(false) -// event1 := <-events -// event2 := <-events -// event3 := <-events - -// if event1.ID != firstEventID { -// t.Errorf("published event id and new event id do no match; published %d; new %d", -// event1.ID, firstEventID) -// } - -// if event2.ID != secondEventID { -// t.Errorf("published event id and new event id do no match; published %d; new %d", -// event2.ID, secondEventID) -// } - -// if event3.ID != thirdEventID { -// t.Errorf("published event id and new event id do no match; published %d; new %d", -// event3.ID, thirdEventID) -// } -// } +func TestGetAll(t *testing.T) { + path := tempFile() + db, err := storage.New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + eb, err := New(db, time.Second*5, time.Minute*5) + if err != nil { + t.Fatal(err) + } + + firstEventID := eb.Publish(models.EventCreatedNamespace{ + NamespaceID: "test_namespace_1", + }) + secondEventID := eb.Publish(models.EventCreatedNamespace{ + NamespaceID: "test_namespace_2", + }) + thirdEventID := eb.Publish(models.EventCreatedNamespace{ + NamespaceID: "test_namespace_3", + }) + eb.Publish(models.EventCreatedNamespace{ + NamespaceID: "test_namespace_4", + }) + eb.Publish(models.EventCreatedNamespace{ + NamespaceID: "test_namespace_5", + }) + + events := eb.GetAll(false) + event1 := <-events + event2 := <-events + event3 := <-events + + if event1.ID != firstEventID { + t.Errorf("published event id and new event id do no match; published %d; new %d", + event1.ID, firstEventID) + } + + if event2.ID != secondEventID { + t.Errorf("published event id and new event id do no match; published %d; new %d", + event2.ID, secondEventID) + } + + if event3.ID != thirdEventID { + t.Errorf("published event id and new event id do no match; published %d; new %d", + event3.ID, thirdEventID) + } +} func TestGetAllOffset(t *testing.T) { path := tempFile() diff --git a/models/commonTask.go b/internal/models/commonTask.go similarity index 76% rename from models/commonTask.go rename to internal/models/commonTask.go index a8eaed46..4b74b93c 100644 --- a/models/commonTask.go +++ b/internal/models/commonTask.go @@ -1,11 +1,14 @@ package models import ( + "encoding/json" "fmt" "strings" "time" + "github.com/clintjedwards/gofer/internal/storage" proto "github.com/clintjedwards/gofer/proto/go" + "github.com/rs/zerolog/log" ) type CommonTaskStatus string @@ -88,17 +91,6 @@ func (t *CommonTask) ToProto() *proto.CommonTask { } } -func (t *CommonTask) FromProto(pb *proto.CommonTask) { - var registration CommonTaskRegistration - registration.FromProto(pb.Registration) - - var settings PipelineCommonTaskSettings - settings.FromProto(pb.Settings) - - t.Settings = settings - t.Registration = registration -} - // When installing a new common task, we allow the common task installer to pass a bunch of settings that // allow us to go get that common task on future startups. type CommonTaskRegistration struct { @@ -137,29 +129,56 @@ func (c *CommonTaskRegistration) ToProto() *proto.CommonTaskRegistration { } } -func (c *CommonTaskRegistration) FromProto(proto *proto.CommonTaskRegistration) { - variables := []Variable{} - for _, variable := range proto.Variables { - vari := Variable{} - vari.FromProto(variable) - variables = append(variables, vari) +func (c *CommonTaskRegistration) ToStorage() *storage.CommonTaskRegistration { + ctr := &storage.CommonTaskRegistration{ + Name: c.Name, + Image: c.Image, + RegistryAuth: "", + Variables: "", + Created: c.Created, + Status: string(c.Status), + Documentation: c.Documentation, } - var registryAuth *RegistryAuth - if proto.User != "" { - registryAuth = &RegistryAuth{ - User: proto.User, - Pass: proto.Pass, + if c.RegistryAuth != nil { + registryAuth, err := json.Marshal(c.RegistryAuth) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") } + + ctr.RegistryAuth = string(registryAuth) } - c.Name = proto.Name - c.Image = proto.Image - c.RegistryAuth = registryAuth + variables, err := json.Marshal(c.Variables) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + ctr.Variables = string(variables) + + return ctr +} + +func (c *CommonTaskRegistration) FromStorage(storage *storage.CommonTaskRegistration) { + var registryAuth RegistryAuth + err := json.Unmarshal([]byte(storage.RegistryAuth), ®istryAuth) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + variables := []Variable{} + err = json.Unmarshal([]byte(storage.Variables), &variables) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + c.Name = storage.Name + c.Image = storage.Image + c.RegistryAuth = ®istryAuth c.Variables = variables c.Created = time.Now().UnixMilli() - c.Status = CommonTaskStatusEnabled - c.Documentation = proto.Documentation + c.Status = CommonTaskStatus(storage.Status) + c.Documentation = storage.Documentation } func (c *CommonTaskRegistration) FromInstallCommonTaskRequest(proto *proto.InstallCommonTaskRequest) { diff --git a/models/customTask.go b/internal/models/customTask.go similarity index 63% rename from models/customTask.go rename to internal/models/customTask.go index 00794822..2d37c496 100644 --- a/models/customTask.go +++ b/internal/models/customTask.go @@ -1,9 +1,12 @@ package models import ( + "encoding/json" "strings" + "github.com/clintjedwards/gofer/internal/storage" proto "github.com/clintjedwards/gofer/proto/go" + "github.com/rs/zerolog/log" ) type RequiredParentStatus string @@ -118,26 +121,31 @@ func (r *CustomTask) ToProto() *proto.CustomTask { } } -func (r *CustomTask) FromProto(t *proto.CustomTask) { +func (r *CustomTask) FromProtoCustomTaskConfig(t *proto.UserCustomTaskConfig) { dependsOn := map[string]RequiredParentStatus{} - for id, status := range t.DependsOn { - dependsOn[id] = RequiredParentStatus(status.String()) + for key, value := range t.DependsOn { + dependsOn[key] = RequiredParentStatus(value.String()) } variables := []Variable{} - for _, v := range t.Variables { - variable := Variable{} - variable.FromProto(v) - variables = append(variables, variable) + for key, value := range t.Variables { + variables = append(variables, Variable{ + Key: key, + Value: value, + Source: VariableSourcePipelineConfig, + }) } + var regAuth *RegistryAuth + regAuth.FromProto(t.RegistryAuth) + var entrypoint *[]string - if len(t.Entrypoint) != 0 { + if len(t.Entrypoint) > 0 { entrypoint = &t.Entrypoint } var command *[]string - if len(t.Command) != 0 { + if len(t.Command) > 0 { command = &t.Command } @@ -151,40 +159,97 @@ func (r *CustomTask) FromProto(t *proto.CustomTask) { r.InjectAPIToken = t.InjectApiToken } -func (r *CustomTask) FromProtoCustomTaskConfig(t *proto.CustomTaskConfig) { - dependsOn := map[string]RequiredParentStatus{} - for key, value := range t.DependsOn { - dependsOn[key] = RequiredParentStatus(value.String()) - } +func (r *CustomTask) FromStorage(t *storage.PipelineCustomTask) { + var regAuth *RegistryAuth + regAuth.FromStorage(t.RegistryAuth) - variables := []Variable{} - for key, value := range t.Variables { - variables = append(variables, Variable{ - Key: key, - Value: value, - Source: VariableSourcePipelineConfig, - }) + var dependsOn map[string]RequiredParentStatus + + err := json.Unmarshal([]byte(t.DependsOn), &dependsOn) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") } - var regAuth *RegistryAuth - regAuth.FromProto(t.RegistryAuth) + var variables []Variable + + err = json.Unmarshal([]byte(t.Variables), &variables) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } var entrypoint *[]string - if len(t.Entrypoint) > 0 { - entrypoint = &t.Entrypoint + + if t.Entrypoint != "" { + err = json.Unmarshal([]byte(t.Entrypoint), entrypoint) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } } var command *[]string - if len(t.Command) > 0 { - command = &t.Command + + if t.Command != "" { + err = json.Unmarshal([]byte(t.Command), command) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } } - r.ID = t.Id + r.ID = t.ID r.Description = t.Description r.Image = t.Image + r.RegistryAuth = regAuth r.DependsOn = dependsOn r.Variables = variables r.Entrypoint = entrypoint r.Command = command - r.InjectAPIToken = t.InjectApiToken + r.InjectAPIToken = t.InjectAPIToken +} + +func (r *CustomTask) ToStorage(namespace, pipeline string, version int64) *storage.PipelineCustomTask { + var regAuth string + if r.RegistryAuth != nil { + regAuth = r.RegistryAuth.ToStorage() + } + + dependsOn, err := json.Marshal(r.DependsOn) + if err != nil { + log.Fatal().Err(err).Msg("error in translating to storage") + } + + variables, err := json.Marshal(r.Variables) + if err != nil { + log.Fatal().Err(err).Msg("error in translating to storage") + } + + var entrypoint []byte + if r.Entrypoint != nil { + entrypoint, err = json.Marshal(r.Entrypoint) + if err != nil { + log.Fatal().Err(err).Msg("error in translating to storage") + } + } + + var command []byte + if r.Command != nil { + command, err = json.Marshal(r.DependsOn) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + } + + return &storage.PipelineCustomTask{ + Namespace: namespace, + Pipeline: pipeline, + PipelineConfigVersion: version, + ID: r.ID, + Description: r.Description, + Image: r.Image, + RegistryAuth: regAuth, + DependsOn: string(dependsOn), + Variables: string(variables), + Entrypoint: string(entrypoint), + Command: string(command), + InjectAPIToken: r.InjectAPIToken, + } } diff --git a/internal/models/deployment.go b/internal/models/deployment.go new file mode 100644 index 00000000..2a1d63b3 --- /dev/null +++ b/internal/models/deployment.go @@ -0,0 +1,170 @@ +package models + +import ( + "encoding/json" + "time" + + "github.com/clintjedwards/gofer/internal/storage" + proto "github.com/clintjedwards/gofer/proto/go" + "github.com/rs/zerolog/log" +) + +type DeploymentState string + +const ( + DeploymentStateUnknown DeploymentState = "UNKNOWN" // The state of the run is unknown. + DeploymentStateRunning DeploymentState = "RUNNING" + DeploymentStateComplete DeploymentState = "COMPLETE" +) + +type DeploymentStatus string + +const ( + // Could not determine current state of the status. Should only be in this state if + // the deployment has not yet completed. + DeploymentStatusUnknown DeploymentStatus = "UNKNOWN" + DeploymentStatusFailed DeploymentStatus = "FAILED" + DeploymentStatusSuccessful DeploymentStatus = "SUCCESSFUL" +) + +type DeploymentStatusReasonKind string + +const ( + // Gofer has no idea how the deployment got into this state. + DeploymentStatusReasonUnknown DeploymentStatusReasonKind = "UNKNOWN" + // TODO(clintjedwards): Replace this with a more details error later. + DeploymentStatusReasonTriggerGeneral DeploymentStatusReasonKind = "TRIGGER_GENERAL_FAILURE" + // While executing the deployment Gofer could not find one or more triggers in the config. + DeploymentStatusReasonTriggerNotFound DeploymentStatusReasonKind = "TRIGGER_NOT_FOUND" + // While executing the deployment the trigger did not accept one or more of the passed trigger configs. + DeploymentStatusReasonTriggerConfigInvalid DeploymentStatusReasonKind = "TRIGGER_CONFIG_INVALID" +) + +type DeploymentStatusReason struct { + // The specific type of deployment failure. Good for documentation about what it might be. + Reason DeploymentStatusReasonKind `json:"kind"` + Description string `json:"description"` // The description of why the run might have failed. +} + +func (r *DeploymentStatusReason) ToProto() *proto.DeploymentStatusReason { + return &proto.DeploymentStatusReason{ + Reason: proto.DeploymentStatusReason_DeploymentStatusReasonKind(proto.DeploymentStatusReason_DeploymentStatusReasonKind_value[string(r.Reason)]), + Description: r.Description, + } +} + +// A deployment represents a transition between pipeline versions. +type Deployment struct { + Namespace string `json:"namespace"` // Unique ID of namespace. + Pipeline string `json:"pipeline"` // The unique ID of the related pipeline. + ID int64 `json:"id"` // Unique identifier for deployment + StartVersion int64 `json:"start_version"` // What version of the pipeline is being deprecated. + EndVersion int64 `json:"end_version"` // What version of the pipeline are we moving to. + Started int64 `json:"started"` // Time of run start in epoch milli. + Ended int64 `json:"ended"` // Time of run finish in epoch milli. + State DeploymentState `json:"state"` // The current state of the run. + Status DeploymentStatus `json:"status"` // The current status of the run. + StatusReason *DeploymentStatusReason `json:"status_reason"` // Contains more information about a run's current status. + Logs []Event `json:"logs"` // An ordered event stream of what happened during the deployment. +} + +func NewDeployment(namespace, pipeline string, id, startVersion, endVersion int64) *Deployment { + return &Deployment{ + Namespace: namespace, + Pipeline: pipeline, + ID: id, + StartVersion: startVersion, + EndVersion: endVersion, + Started: time.Now().UnixMilli(), + Ended: 0, + State: DeploymentStateRunning, + Status: DeploymentStatusUnknown, + StatusReason: nil, + Logs: []Event{}, + } +} + +func (d *Deployment) ToProto() *proto.Deployment { + var statusReason *proto.DeploymentStatusReason + if d.StatusReason != nil { + statusReason = d.StatusReason.ToProto() + } + + events := []*proto.Event{} + for _, event := range d.Logs { + evt, _ := event.ToProto() + events = append(events, evt) + } + + return &proto.Deployment{ + Namespace: d.Namespace, + Pipeline: d.Pipeline, + Id: d.ID, + StartVersion: d.StartVersion, + EndVersion: d.EndVersion, + Started: d.Started, + Ended: d.Ended, + State: proto.Deployment_DeploymentState(proto.Deployment_DeploymentState_value[string(d.State)]), + Status: proto.Deployment_DeploymentStatus(proto.Deployment_DeploymentStatus_value[string(d.Status)]), + StatusReason: statusReason, + Logs: events, + } +} + +func (d *Deployment) ToStorage() *storage.PipelineDeployment { + statusReason, err := json.Marshal(d.StatusReason) + if err != nil { + log.Fatal().Err(err).Msg("could not marshal ToStorage for deployment") + } + + events := []*storage.Event{} + for _, event := range d.Logs { + evt := event.ToStorage() + events = append(events, evt) + } + + logs, err := json.Marshal(events) + if err != nil { + log.Fatal().Err(err).Msg("could not marshal ToStorage for deployment") + } + + return &storage.PipelineDeployment{ + Namespace: d.Namespace, + Pipeline: d.Pipeline, + ID: d.ID, + StartVersion: d.StartVersion, + EndVersion: d.EndVersion, + Started: d.Started, + Ended: d.Ended, + State: string(d.State), + Status: string(d.Status), + StatusReason: string(statusReason), + Logs: string(logs), + } +} + +func (d *Deployment) FromStorage(storage *storage.PipelineDeployment) { + var statusReason DeploymentStatusReason + err := json.Unmarshal([]byte(storage.StatusReason), &statusReason) + if err != nil { + log.Fatal().Err(err).Msg("could not marshal ToStorage for deployment") + } + + var logs []Event + err = json.Unmarshal([]byte(storage.Logs), &logs) + if err != nil { + log.Fatal().Err(err).Msg("could not marshal ToStorage for deployment") + } + + d.Namespace = storage.Namespace + d.Pipeline = storage.Pipeline + d.ID = storage.ID + d.StartVersion = storage.StartVersion + d.EndVersion = storage.EndVersion + d.Started = storage.Started + d.Ended = storage.Ended + d.State = DeploymentState(storage.State) + d.Status = DeploymentStatus(storage.Status) + d.StatusReason = &statusReason + d.Logs = logs +} diff --git a/models/events.go b/internal/models/events.go similarity index 67% rename from models/events.go rename to internal/models/events.go index e24ffaf5..aa5cd915 100644 --- a/models/events.go +++ b/internal/models/events.go @@ -4,7 +4,9 @@ import ( "encoding/json" "time" + "github.com/clintjedwards/gofer/internal/storage" proto "github.com/clintjedwards/gofer/proto/go" + "github.com/rs/zerolog/log" ) // Make sure to keep changes to these enums in lockstep with EventKindMap @@ -19,10 +21,19 @@ const ( EventKindCreatedNamespace EventKind = "CREATED_NAMESPACE" EventKindDeletedNamespace EventKind = "DELETED_NAMESPACE" - EventKindDisabledPipeline EventKind = "DISABLED_PIPELINE" - EventKindEnabledPipeline EventKind = "ENABLED_PIPELINE" - EventKindCreatedPipeline EventKind = "CREATED_PIPELINE" - EventKindDeletedPipeline EventKind = "DELETED_PIPELINE" + EventKindDisabledPipeline EventKind = "DISABLED_PIPELINE" + EventKindEnabledPipeline EventKind = "ENABLED_PIPELINE" + EventKindRegisteredPipeline EventKind = "REGISTERED_PIPELINE" + EventKindStartedDeployPipeline EventKind = "STARTED_DEPLOY_PIPELINE" + EventKindCompletedDeployPipeline EventKind = "COMPLETED_DEPLOY_PIPELINE" + EventKindCompletedTriggerSubscriptionPipeline EventKind = "COMPLETED_TRIGGER_SUBSCRIPTION_PIPELINE" + EventKindFailedTriggerSubscriptionPipeline EventKind = "FAILED_TRIGGER_SUBSCRIPTION_PIPELINE" + EventKindCompletedTriggerSubscriptionRemovalPipeline EventKind = "COMPLETED_TRIGGER_SUBSCRIPTION_REMOVAL_PIPELINE" + EventKindFailedTriggerSubscriptionRemovalPipeline EventKind = "FAILED_TRIGGER_SUBSCRIPTION_REMOVAL_PIPELINE" + EventKindDeletedPipeline EventKind = "DELETED_PIPELINE" + + EventKindRegisteredPipelineConfig EventKind = "REGISTERED_PIPELINE_CONFIG" + EventKindDeletedPipelineConfig EventKind = "DELETED_PIPELINE_CONFIG" EventKindStartedRun EventKind = "STARTED_RUN" EventKindCompletedRun EventKind = "COMPLETED_RUN" @@ -87,13 +98,45 @@ func (e EventEnabledPipeline) Kind() EventKind { return EventKindEnabledPipeline } -type EventCreatedPipeline struct { +type EventRegisteredPipeline struct { NamespaceID string `json:"namespace_id"` PipelineID string `json:"pipeline_id"` } -func (e EventCreatedPipeline) Kind() EventKind { - return EventKindCreatedPipeline +func (e EventRegisteredPipeline) Kind() EventKind { + return EventKindRegisteredPipeline +} + +type EventRegisteredPipelineConfig struct { + NamespaceID string `json:"namespace_id"` + PipelineID string `json:"pipeline_id"` + Version int64 `json:"version"` +} + +func (e EventRegisteredPipelineConfig) Kind() EventKind { + return EventKindRegisteredPipelineConfig +} + +type EventStartedDeployPipeline struct { + NamespaceID string `json:"namespace_id"` + PipelineID string `json:"pipeline_id"` + StartVersion int64 `json:"start_version"` + EndVersion int64 `json:"end_version"` +} + +func (e EventStartedDeployPipeline) Kind() EventKind { + return EventKindStartedDeployPipeline +} + +type EventCompletedDeployPipeline struct { + NamespaceID string `json:"namespace_id"` + PipelineID string `json:"pipeline_id"` + StartVersion int64 `json:"start_version"` + EndVersion int64 `json:"end_version"` +} + +func (e EventCompletedDeployPipeline) Kind() EventKind { + return EventKindCompletedDeployPipeline } type EventDeletedPipeline struct { @@ -105,6 +148,61 @@ func (e EventDeletedPipeline) Kind() EventKind { return EventKindDeletedPipeline } +type EventDeletedPipelineConfig struct { + NamespaceID string `json:"namespace_id"` + PipelineID string `json:"pipeline_id"` + Version int64 `json:"version"` +} + +func (e EventDeletedPipelineConfig) Kind() EventKind { + return EventKindDeletedPipelineConfig +} + +type EventCompletedTriggerSubscriptionPipeline struct { + NamespaceID string `json:"namespace_id"` + PipelineID string `json:"pipeline_id"` + Version int64 `json:"version"` + Label string `json:"label"` + Name string `json:"name"` +} + +func (e EventCompletedTriggerSubscriptionPipeline) Kind() EventKind { + return EventKindCompletedTriggerSubscriptionPipeline +} + +type EventFailedTriggerSubscriptionPipeline struct { + NamespaceID string `json:"namespace_id"` + PipelineID string `json:"pipeline_id"` + Label string `json:"label"` + Name string `json:"name"` +} + +func (e EventFailedTriggerSubscriptionPipeline) Kind() EventKind { + return EventKindFailedTriggerSubscriptionPipeline +} + +type EventCompletedTriggerSubscriptionRemovalPipeline struct { + NamespaceID string `json:"namespace_id"` + PipelineID string `json:"pipeline_id"` + Label string `json:"label"` + Name string `json:"name"` +} + +func (e EventCompletedTriggerSubscriptionRemovalPipeline) Kind() EventKind { + return EventKindCompletedTriggerSubscriptionRemovalPipeline +} + +type EventFailedTriggerSubscriptionRemovalPipeline struct { + NamespaceID string `json:"namespace_id"` + PipelineID string `json:"pipeline_id"` + Label string `json:"label"` + Name string `json:"name"` +} + +func (e EventFailedTriggerSubscriptionRemovalPipeline) Kind() EventKind { + return EventKindFailedTriggerSubscriptionRemovalPipeline +} + type EventStartedRun struct { NamespaceID string `json:"namespace_id"` PipelineID string `json:"pipeline_id"` @@ -296,10 +394,19 @@ var EventKindMap = map[EventKind]EventKindDetails{ EventKindCreatedNamespace: &EventCreatedNamespace{}, EventKindDeletedNamespace: &EventDeletedNamespace{}, - EventKindDisabledPipeline: &EventDisabledPipeline{}, - EventKindEnabledPipeline: &EventEnabledPipeline{}, - EventKindCreatedPipeline: &EventCreatedPipeline{}, - EventKindDeletedPipeline: &EventDeletedPipeline{}, + EventKindDisabledPipeline: &EventDisabledPipeline{}, + EventKindEnabledPipeline: &EventEnabledPipeline{}, + EventKindRegisteredPipeline: &EventRegisteredPipeline{}, + EventKindStartedDeployPipeline: &EventStartedDeployPipeline{}, + EventKindCompletedDeployPipeline: &EventCompletedDeployPipeline{}, + EventKindCompletedTriggerSubscriptionPipeline: &EventCompletedTriggerSubscriptionPipeline{}, + EventKindFailedTriggerSubscriptionPipeline: &EventFailedTriggerSubscriptionPipeline{}, + EventKindCompletedTriggerSubscriptionRemovalPipeline: &EventCompletedTriggerSubscriptionRemovalPipeline{}, + EventKindFailedTriggerSubscriptionRemovalPipeline: &EventFailedTriggerSubscriptionRemovalPipeline{}, + EventKindDeletedPipeline: &EventDeletedPipeline{}, + + EventKindRegisteredPipelineConfig: &EventRegisteredPipelineConfig{}, + EventKindDeletedPipelineConfig: &EventDeletedPipelineConfig{}, EventKindStartedRun: &EventStartedRun{}, EventKindCompletedRun: &EventCompletedRun{}, @@ -357,6 +464,34 @@ func (e *Event) ToProto() (*proto.Event, error) { }, nil } +func (e *Event) ToStorage() *storage.Event { + details, err := json.Marshal(e.Details) + if err != nil { + log.Fatal().Err(err).Msg("could not (un)marshal from storage") + } + + return &storage.Event{ + ID: e.ID, + Kind: string(e.Kind), + Details: string(details), + Emitted: e.Emitted, + } +} + +func (e *Event) FromStorage(evt *storage.Event) { + detail := EventKindMap[EventKind(evt.Kind)] + + err := json.Unmarshal([]byte(evt.Details), &detail) + if err != nil { + log.Fatal().Err(err).Msg("could not (un)marshal from storage") + } + + e.ID = evt.ID + e.Kind = EventKind(evt.Kind) + e.Details = detail + e.Emitted = evt.Emitted +} + // TriggerResultState is a description of what has happened as a result of a 'trigger event' being resolved. // Normally when a trigger fires, it passes down some information to the Gofer handler on how a pipeline might // be executed. This execution detail might contain some extra information on why or, particularly, why not @@ -392,8 +527,3 @@ func (t *TriggerResult) ToProto() *proto.TriggerResult { Details: t.Details, } } - -func (t *TriggerResult) FromProto(p *proto.TriggerResult) { - t.Details = p.Details - t.Status = TriggerResultStatus(p.Status.String()) -} diff --git a/internal/models/models.go b/internal/models/models.go new file mode 100644 index 00000000..8ae17f85 --- /dev/null +++ b/internal/models/models.go @@ -0,0 +1,125 @@ +// Package models contains the core objects(otherwise called the domain models) needed by Gofer internally. +// +// This package exists to provide easy to use in-memory objects for concepts Gofer has to work with. +// For example, the concept of a Pipeline might make sense to the database as 3-4 different +// models/structs containing different components that a pipeline might be made out of, but to the API a pipeline might +// be easier represented as one single entity containing all those different parts. This might make it easier +// to pass around and work with in general. +// +// The next question that might be asked is why separate these models at all? Why not have one struct that we ride +// all the way to the top? The answer to that is the separation of domain models from DB models and in general any +// other model that has a contract with something else is usually a good thing. This loose coupling enables a lot of +// good practices as the code base gets more complex overtime. Two examples: +// 1. We may want to use simplier names for our database naming in order to save space, but more descriptive names +// for our domain layer. +// 2. We may want to change something in our database layer and might not want to go through the trouble of having +// to also change the API contract with outside users. Changes on that level can be extremely expensive in terms +// of engineering time/complexcity etc. +// +// You can read more about this here: https://threedots.tech/post/common-anti-patterns-in-go-web-applications/ +// +// Because this package contains the domain models, it effectively acts as the middle package between the +// internal storage layer and the external protobuf layer. The general flow goes like this: +// +// Protobuf from API calls <-> models internally <-> backend storage. +// +// Something to keep in mind when making changes to this package: +// +// This package can be somewhat brittle as Go does not alert on missing struct fields and converting things to +// proto/storage is done manually. The combination of these two things means that unfortunately these models +// may connect to other models in ways that might not be obvious and changes to them might break things +// in ways that are hard to set up testing for. Testing would need to heavily use reflection to prevent +// breakages and for now I don't have the time. The real solution would probably be something involving code +// generation, but I don't have a good answer for that either. +package models + +import ( + "encoding/json" + + proto "github.com/clintjedwards/gofer/proto/go" + "github.com/rs/zerolog/log" +) + +type VariableSource string + +const ( + VariableSourceUnknown VariableSource = "UNKNOWN" + VariableSourcePipelineConfig VariableSource = "PIPELINE_CONFIG" + VariableSourceSystem VariableSource = "SYSTEM" + VariableSourceRunOptions VariableSource = "RUN_OPTIONS" + VariableSourceTrigger VariableSource = "TRIGGER" +) + +// A variable is a key value pair that is used either in a run or task level. +// The variable is inserted as an environment variable to an eventual task run. +// It can be owned by different parts of the system which control where +// the potentially sensitive variables might show up. +type Variable struct { + Key string `json:"key"` + Value string `json:"value"` + Source VariableSource `json:"source"` // Where the variable originated from +} + +func (v *Variable) ToProto() *proto.Variable { + return &proto.Variable{ + Key: v.Key, + Value: v.Value, + Source: string(v.Source), + } +} + +func (v *Variable) FromProto(proto *proto.Variable) { + v.Key = proto.Key + v.Value = proto.Value + v.Source = VariableSource(proto.Source) +} + +type RegistryAuth struct { + User string `json:"user"` + Pass string `json:"pass"` +} + +func (t *RegistryAuth) ToProto() *proto.RegistryAuth { + if t == nil { + return nil + } + + return &proto.RegistryAuth{ + User: t.User, + Pass: t.Pass, + } +} + +func (t *RegistryAuth) FromProto(pb *proto.RegistryAuth) { + if pb == nil { + return + } + + if t == nil { + t = &RegistryAuth{} + } + + t.User = pb.User + t.Pass = pb.Pass +} + +func (t *RegistryAuth) FromStorage(jsonStr string) { + var registryAuth RegistryAuth + + err := json.Unmarshal([]byte(jsonStr), ®istryAuth) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + t.User = registryAuth.User + t.Pass = registryAuth.Pass +} + +func (t *RegistryAuth) ToStorage() string { + jsonStr, err := json.Marshal(t) + if err != nil { + log.Fatal().Err(err).Msg("error in translating to storage") + } + + return string(jsonStr) +} diff --git a/models/namespace.go b/internal/models/namespace.go similarity index 72% rename from models/namespace.go rename to internal/models/namespace.go index 546bab73..f9cbf53c 100644 --- a/models/namespace.go +++ b/internal/models/namespace.go @@ -3,6 +3,7 @@ package models import ( "time" + "github.com/clintjedwards/gofer/internal/storage" proto "github.com/clintjedwards/gofer/proto/go" ) @@ -38,10 +39,20 @@ func (n *Namespace) ToProto() *proto.Namespace { } } -func (n *Namespace) FromProto(proto *proto.Namespace) { - n.ID = proto.Id - n.Name = proto.Name - n.Description = proto.Description - n.Created = proto.Created - n.Modified = proto.Modified +func (n *Namespace) ToStorage() *storage.Namespace { + return &storage.Namespace{ + ID: n.ID, + Name: n.Name, + Description: n.Description, + Created: n.Created, + Modified: n.Modified, + } +} + +func (n *Namespace) FromStorage(sn *storage.Namespace) { + n.ID = sn.ID + n.Name = sn.Name + n.Description = sn.Description + n.Created = sn.Created + n.Modified = sn.Modified } diff --git a/models/objectStore.go b/internal/models/objectStore.go similarity index 100% rename from models/objectStore.go rename to internal/models/objectStore.go diff --git a/internal/models/pipeline.go b/internal/models/pipeline.go new file mode 100644 index 00000000..f73081a9 --- /dev/null +++ b/internal/models/pipeline.go @@ -0,0 +1,346 @@ +package models + +import ( + "encoding/json" + "time" + + "github.com/clintjedwards/gofer/internal/storage" + proto "github.com/clintjedwards/gofer/proto/go" + "github.com/rs/zerolog/log" +) + +// A collection of logically grouped tasks. A task is a unit of work wrapped in a docker container. +// Pipeline is a secondary level unit being contained within namespaces and containing runs. +type Pipeline struct { + Metadata PipelineMetadata + Config PipelineConfig +} + +type PipelineState string + +const ( + PipelineStateUnknown PipelineState = "UNKNOWN" + PipelineStateActive PipelineState = "ACTIVE" + PipelineStateDisabled PipelineState = "DISABLED" +) + +// Details about the pipeline itself, not including the configuration that the user can change. +// All these values are changed by the system or never changed at all. This sits in contrast to +// the config which the user can change freely. +type PipelineMetadata struct { + Namespace string `json:"namespace"` // The namespace this pipeline belongs to. + ID string `json:"id"` // Unique identifier; user defined. + // Controls how many runs can be active at any single time. 0 indicates unbounded with respect to bounds + // enforced by Gofer. + Created int64 `json:"created"` // Time pipeline was created in epoch milliseconds. + Modified int64 `json:"modified"` // Time pipeline was updated to a new version in epoch milliseconds. + // The current running state of the pipeline. This is used to determine if the pipeline should continue to process + // runs or not and properly convey that to the user. + State PipelineState `json:"state"` +} + +func NewPipelineMetadata(namespace, id string, disable bool) *PipelineMetadata { + state := PipelineStateActive + if disable { + state = PipelineStateDisabled + } + + newPipelineMetadata := &PipelineMetadata{ + Namespace: namespace, + ID: id, + Created: time.Now().UnixMilli(), + Modified: time.Now().UnixMilli(), + State: state, + } + + return newPipelineMetadata +} + +func (p *PipelineMetadata) ToStorage() *storage.PipelineMetadata { + return &storage.PipelineMetadata{ + Namespace: p.Namespace, + ID: p.ID, + Created: p.Created, + Modified: p.Modified, + State: string(p.State), + } +} + +func (p *PipelineMetadata) FromStorage(sp *storage.PipelineMetadata) { + p.Namespace = sp.Namespace + p.ID = sp.ID + p.Created = sp.Created + p.Modified = sp.Modified + p.State = PipelineState(sp.State) +} + +func (p *PipelineMetadata) ToProto() *proto.PipelineMetadata { + return &proto.PipelineMetadata{ + Namespace: p.Namespace, + Id: p.ID, + Created: p.Created, + Modified: p.Modified, + State: proto.PipelineMetadata_PipelineState(proto.PipelineMetadata_PipelineState_value[string(p.State)]), + } +} + +type PipelineConfigState string + +const ( + PipelineConfigStateUnknown PipelineConfigState = "UNKNOWN" + PipelineConfigStateUnreleased PipelineConfigState = "UNRELEASED" // Has never been deployed. + PipelineConfigStateLive PipelineConfigState = "LIVE" // Currently deployed. + PipelineConfigStateDeprecated PipelineConfigState = "DEPRECATED" // Has previously been deployed and is now defunct. +) + +// A representation of the user's configuration settings for a particular pipeline. +type PipelineConfig struct { + Namespace string `json:"namespace"` + Pipeline string `json:"pipeline"` + Version int64 `json:"version"` + Parallelism int64 `json:"parallelism"` + Name string `json:"name"` // Name refers to a human readable pipeline name. + Description string `json:"description"` // Description of pipeline's purpose and other details. + // Map for quickly finding user created pipeline tasks; assists with DAG generation. + CustomTasks map[string]CustomTask `json:"custom_tasks"` + // Map for quickly finding gofer provided pipeline tasks; assists with DAG generation. + CommonTasks map[string]PipelineCommonTaskSettings `json:"common_tasks"` + // The current running state of the pipeline. This is used to determine if the pipeline should continue to process + // runs or not and properly convey that to the user. + State PipelineConfigState `json:"state"` + Registered int64 `json:"registered"` + // If the pipeline's state is "deprecated" we note the time it was so we know which is the oldest defunct version. + Deprecated int64 `json:"deprecated"` +} + +func NewPipelineConfig(namespace, pipeline string, version int64, pb *proto.UserPipelineConfig) *PipelineConfig { + customTasks := map[string]CustomTask{} + commonTasks := map[string]PipelineCommonTaskSettings{} + + for _, task := range pb.Tasks { + switch t := task.Task.(type) { + case *proto.UserPipelineTaskConfig_CustomTask: + ct := CustomTask{} + ct.FromProtoCustomTaskConfig(t.CustomTask) + customTasks[t.CustomTask.Id] = ct + case *proto.UserPipelineTaskConfig_CommonTask: + ct := PipelineCommonTaskSettings{} + ct.FromProtoCommonTaskConfig(t.CommonTask) + commonTasks[ct.Label] = ct + } + } + + return &PipelineConfig{ + Namespace: namespace, + Pipeline: pipeline, + Version: version, + Parallelism: pb.Parallelism, + Name: pb.Name, + Description: pb.Description, + CustomTasks: customTasks, + CommonTasks: commonTasks, + State: PipelineConfigStateUnreleased, + Registered: time.Now().UnixMilli(), + Deprecated: 0, + } +} + +func (pc *PipelineConfig) ToStorage() (*storage.PipelineConfig, []*storage.PipelineCommonTaskSettings, []*storage.PipelineCustomTask) { + pipelineConfig := &storage.PipelineConfig{ + Namespace: pc.Namespace, + Pipeline: pc.Pipeline, + Version: pc.Version, + Parallelism: pc.Parallelism, + Name: pc.Name, + Description: pc.Description, + Registered: pc.Registered, + Deprecated: pc.Deprecated, + State: string(pc.State), + } + + commonTaskSettings := []*storage.PipelineCommonTaskSettings{} + + for _, commonTaskSetting := range pc.CommonTasks { + commonTaskSettings = append(commonTaskSettings, commonTaskSetting.ToStorage(pc.Namespace, pc.Pipeline, pc.Version)) + } + + customTasks := []*storage.PipelineCustomTask{} + + for _, customTask := range pc.CustomTasks { + customTasks = append(customTasks, customTask.ToStorage(pc.Namespace, pc.Pipeline, pc.Version)) + } + + return pipelineConfig, commonTaskSettings, customTasks +} + +func (pc *PipelineConfig) FromStorage(spc *storage.PipelineConfig, + spcts *[]storage.PipelineCommonTaskSettings, spct *[]storage.PipelineCustomTask, +) { + customTasks := map[string]CustomTask{} + + for _, customTask := range *spct { + var ct CustomTask + ct.FromStorage(&customTask) + customTasks[customTask.ID] = ct + } + + commonTasks := map[string]PipelineCommonTaskSettings{} + + for _, commonTask := range *spcts { + var ct PipelineCommonTaskSettings + ct.FromStorage(&commonTask) + commonTasks[commonTask.Label] = ct + } + + pc.Namespace = spc.Namespace + pc.Pipeline = spc.Pipeline + pc.Version = spc.Version + pc.Parallelism = spc.Parallelism + pc.Name = spc.Name + pc.Description = spc.Description + pc.CustomTasks = customTasks + pc.CommonTasks = commonTasks + pc.State = PipelineConfigState(spc.State) + pc.Registered = spc.Registered + pc.Deprecated = spc.Deprecated +} + +func (pc *PipelineConfig) ToProto() *proto.PipelineConfig { + customTasks := map[string]*proto.CustomTask{} + commonTasks := map[string]*proto.PipelineCommonTaskSettings{} + + for _, customTask := range pc.CustomTasks { + protoCustomTask := customTask.ToProto() + customTasks[protoCustomTask.Id] = protoCustomTask + } + + for _, commonTask := range pc.CommonTasks { + protoCommonTask := commonTask.ToProto() + commonTasks[protoCommonTask.Label] = protoCommonTask + } + + return &proto.PipelineConfig{ + Namespace: pc.Namespace, + Pipeline: pc.Pipeline, + Version: pc.Version, + Parallelism: pc.Parallelism, + Name: pc.Name, + Description: pc.Description, + CustomTasks: customTasks, + CommonTasks: commonTasks, + State: proto.PipelineConfig_PipelineConfigState(proto.PipelineConfig_PipelineConfigState_value[string(pc.State)]), + Registered: pc.Registered, + Deprecated: pc.Deprecated, + } +} + +// Every time a pipeline attempts to subscribe to a trigger, it passes certain +// values back to that trigger for certain functionality. Since triggers keep no +// permanent state, these settings are kept here so that when triggers are restarted +// they can be restored with proper settings. +type PipelineTriggerSettings struct { + Name string // A global unique identifier. + // A user defined identifier for the trigger so that a pipeline with multiple triggers can be differentiated. + Label string + Settings map[string]string +} + +func (t *PipelineTriggerSettings) ToProto() *proto.PipelineTriggerSettings { + return &proto.PipelineTriggerSettings{ + Name: t.Name, + Label: t.Label, + Settings: t.Settings, + } +} + +type PipelineCommonTaskSettings struct { + Name string `json:"name"` // A global unique identifier for a specific type of common task. + // A user defined identifier for the common_task so that a pipeline with multiple common_tasks can be differentiated. + Label string `json:"label"` + Description string `json:"description"` + DependsOn map[string]RequiredParentStatus `json:"depends_on"` + Settings map[string]string `json:"settings"` + + // Allows users to tell gofer to auto-create and inject API Token into task. If this setting is found, Gofer creates + // an API key for the run (stored in the user's secret store) and then injects it for this run under the + // environment variables "GOFER_API_TOKEN". This key is automatically cleaned up when Gofer attempts to clean up + // the Run's objects. + InjectAPIToken bool `json:"inject_api_token"` +} + +func (t *PipelineCommonTaskSettings) ToProto() *proto.PipelineCommonTaskSettings { + dependsOn := map[string]proto.PipelineCommonTaskSettings_RequiredParentStatus{} + for key, value := range t.DependsOn { + dependsOn[key] = proto.PipelineCommonTaskSettings_RequiredParentStatus(proto.PipelineCommonTaskSettings_RequiredParentStatus_value[string(value)]) + } + + return &proto.PipelineCommonTaskSettings{ + Name: t.Name, + Label: t.Label, + Description: t.Description, + DependsOn: dependsOn, + Settings: t.Settings, + InjectApiToken: t.InjectAPIToken, + } +} + +func (t *PipelineCommonTaskSettings) FromProtoCommonTaskConfig(p *proto.UserCommonTaskConfig) { + dependsOn := map[string]RequiredParentStatus{} + for id, status := range p.DependsOn { + dependsOn[id] = RequiredParentStatus(status.String()) + } + + t.Name = p.Name + t.Label = p.Label + t.Description = p.Description + t.DependsOn = dependsOn + t.Settings = p.Settings + t.InjectAPIToken = p.InjectApiToken +} + +func (t *PipelineCommonTaskSettings) FromStorage(p *storage.PipelineCommonTaskSettings) { + var dependsOn map[string]RequiredParentStatus + + err := json.Unmarshal([]byte(p.DependsOn), &dependsOn) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + var settings map[string]string + + err = json.Unmarshal([]byte(p.Settings), &settings) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + t.Name = p.Name + t.Label = p.Label + t.Description = p.Description + t.DependsOn = dependsOn + t.Settings = settings + t.InjectAPIToken = p.InjectAPIToken +} + +func (t *PipelineCommonTaskSettings) ToStorage(namespace, pipeline string, version int64) *storage.PipelineCommonTaskSettings { + dependsOn, err := json.Marshal(t.DependsOn) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + settings, err := json.Marshal(t.Settings) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + return &storage.PipelineCommonTaskSettings{ + Namespace: namespace, + Pipeline: pipeline, + PipelineConfigVersion: version, + Name: t.Name, + Label: t.Label, + Description: t.Description, + DependsOn: string(dependsOn), + Settings: string(settings), + InjectAPIToken: t.InjectAPIToken, + } +} diff --git a/models/run.go b/internal/models/run.go similarity index 71% rename from models/run.go rename to internal/models/run.go index 3f210d5c..5bacaff7 100644 --- a/models/run.go +++ b/internal/models/run.go @@ -1,9 +1,12 @@ package models import ( + "encoding/json" "time" + "github.com/clintjedwards/gofer/internal/storage" proto "github.com/clintjedwards/gofer/proto/go" + "github.com/rs/zerolog/log" ) type RunState string @@ -47,6 +50,18 @@ const ( RunStatusReasonKindAdminCancelled RunStatusReasonKind = "ADMIN_CANCELLED" ) +type RunStatusReason struct { + Reason RunStatusReasonKind `json:"kind"` // The specific type of run failure. Good for documentation about what it might be. + Description string `json:"description"` // The description of why the run might have failed. +} + +func (r *RunStatusReason) ToProto() *proto.RunStatusReason { + return &proto.RunStatusReason{ + Reason: proto.RunStatusReason_RunStatusReasonKind(proto.RunStatusReason_RunStatusReasonKind_value[string(r.Reason)]), + Description: r.Description, + } +} + // Information about which trigger was responsible for the run's execution. type TriggerInfo struct { Name string // The trigger kind responsible for starting the run. @@ -62,16 +77,12 @@ func (t *TriggerInfo) ToProto() *proto.Run_RunTriggerInfo { } } -func (t *TriggerInfo) FromProto(proto *proto.Run_RunTriggerInfo) { - t.Name = proto.Name - t.Label = proto.Label -} - // A run is one or more tasks being executed on behalf of some trigger. // Run is a third level unit containing tasks and being contained in a pipeline. type Run struct { Namespace string `json:"namespace"` // Unique ID of namespace. Pipeline string `json:"pipeline"` // The unique ID of the related pipeline. + Version int64 `json:"version"` // Which version of the pipeline did this run occur. ID int64 `json:"id"` // UniqueID of a run. Auto-incrementing and cannot be zero. Started int64 `json:"started"` // Time of run start in epoch milli. Ended int64 `json:"ended"` // Time of run finish in epoch milli. @@ -83,28 +94,12 @@ type Run struct { StoreObjectsExpired bool `json:"store_objects_expired"` // Tracks whether objects for this run have expired already. } -type RunStatusReason struct { - Reason RunStatusReasonKind `json:"kind"` // The specific type of run failure. Good for documentation about what it might be. - Description string `json:"description"` // The description of why the run might have failed. -} - -func (r *RunStatusReason) ToProto() *proto.RunStatusReason { - return &proto.RunStatusReason{ - Reason: proto.RunStatusReason_RunStatusReasonKind(proto.RunStatusReason_RunStatusReasonKind_value[string(r.Reason)]), - Description: r.Description, - } -} - -func (r *RunStatusReason) FromProto(proto *proto.RunStatusReason) { - r.Reason = RunStatusReasonKind(proto.Reason.String()) - r.Description = proto.Description -} - -func NewRun(namespace, pipeline string, trigger TriggerInfo, variables []Variable) *Run { +func NewRun(namespace, pipeline string, version, id int64, trigger TriggerInfo, variables []Variable) *Run { return &Run{ Namespace: namespace, Pipeline: pipeline, - ID: 0, + Version: version, + ID: id, Started: time.Now().UnixMilli(), Ended: 0, State: RunStatePending, @@ -130,6 +125,7 @@ func (r *Run) ToProto() *proto.Run { return &proto.Run{ Namespace: r.Namespace, Pipeline: r.Pipeline, + Version: r.Version, Id: r.ID, Started: r.Started, Ended: r.Ended, @@ -142,33 +138,67 @@ func (r *Run) ToProto() *proto.Run { } } -func (r *Run) FromProto(proto *proto.Run) { - var statusReason *RunStatusReason - if proto.StatusReason != nil { - sr := &RunStatusReason{} - sr.FromProto(proto.StatusReason) - statusReason = sr +func (r *Run) ToStorage() *storage.PipelineRun { + statusReason, err := json.Marshal(r.StatusReason) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") } - trigger := TriggerInfo{} - trigger.FromProto(proto.Trigger) + trigger, err := json.Marshal(r.Trigger) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + variables, err := json.Marshal(r.Variables) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + return &storage.PipelineRun{ + Namespace: r.Namespace, + Pipeline: r.Pipeline, + PipelineConfigVersion: r.Version, + ID: r.ID, + Started: r.Started, + Ended: r.Ended, + State: string(r.State), + Status: string(r.Status), + StatusReason: string(statusReason), + Trigger: string(trigger), + Variables: string(variables), + StoreObjectsExpired: r.StoreObjectsExpired, + } +} + +func (r *Run) FromStorage(storage *storage.PipelineRun) { + var statusReason RunStatusReason + err := json.Unmarshal([]byte(storage.StatusReason), &statusReason) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + var trigger TriggerInfo + err = json.Unmarshal([]byte(storage.Trigger), &trigger) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } - variables := []Variable{} - for _, variable := range proto.Variables { - vari := Variable{} - vari.FromProto(variable) - variables = append(variables, vari) + var variables []Variable + err = json.Unmarshal([]byte(storage.Variables), &variables) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") } - r.Namespace = proto.Namespace - r.Pipeline = proto.Pipeline - r.ID = proto.Id - r.Started = proto.Started - r.Ended = proto.Ended - r.State = RunState(proto.State.String()) - r.Status = RunStatus(proto.Status.String()) - r.StatusReason = statusReason + r.Namespace = storage.Namespace + r.Pipeline = storage.Pipeline + r.Version = storage.PipelineConfigVersion + r.ID = storage.ID + r.Started = storage.Started + r.Ended = storage.Ended + r.State = RunState(storage.State) + r.Status = RunStatus(storage.Status) + r.StatusReason = &statusReason r.Trigger = trigger r.Variables = variables - r.StoreObjectsExpired = proto.StoreObjectsExpired + r.StoreObjectsExpired = storage.StoreObjectsExpired } diff --git a/models/secretStore.go b/internal/models/secretStore.go similarity index 100% rename from models/secretStore.go rename to internal/models/secretStore.go diff --git a/models/task.go b/internal/models/task.go similarity index 100% rename from models/task.go rename to internal/models/task.go diff --git a/models/taskRun.go b/internal/models/taskRun.go similarity index 70% rename from models/taskRun.go rename to internal/models/taskRun.go index 4c5bf568..2503b14a 100644 --- a/models/taskRun.go +++ b/internal/models/taskRun.go @@ -1,9 +1,12 @@ package models import ( + "encoding/json" "time" + "github.com/clintjedwards/gofer/internal/storage" proto "github.com/clintjedwards/gofer/proto/go" + "github.com/rs/zerolog/log" ) type TaskRunState string @@ -44,6 +47,7 @@ const ( type TaskRun struct { Namespace string `json:"namespace"` // Unique identifier for namespace. Pipeline string `json:"pipeline"` // Unique pipeline ID of task run. + Version int64 `json:"version"` // Which version of the pipeline did this task run occur in. Run int64 `json:"run"` // Unique run ID of task run; sequential. ID string `json:"id"` // Unique ID for task run; taken from the taskID. Created int64 `json:"created"` // Time of task run creation in epoch milliseconds. @@ -72,15 +76,11 @@ func (t *TaskRunStatusReason) ToProto() *proto.TaskRunStatusReason { } } -func (t *TaskRunStatusReason) FromProto(proto *proto.TaskRunStatusReason) { - t.Reason = TaskRunStatusReasonKind(proto.Reason.String()) - t.Description = proto.Description -} - -func NewTaskRun(namespace, pipeline string, run int64, task Task) *TaskRun { +func NewTaskRun(namespace, pipeline string, version, run int64, task Task) *TaskRun { return &TaskRun{ Namespace: namespace, Pipeline: pipeline, + Version: version, Run: run, ID: task.GetID(), Created: time.Now().UnixMilli(), @@ -116,6 +116,7 @@ func (r *TaskRun) ToProto() *proto.TaskRun { protoTaskRun := &proto.TaskRun{ Namespace: r.Namespace, Pipeline: r.Pipeline, + Version: r.Version, Run: r.Run, Id: r.ID, Created: r.Created, @@ -144,49 +145,82 @@ func (r *TaskRun) ToProto() *proto.TaskRun { return protoTaskRun } -func (r *TaskRun) FromProto(pb *proto.TaskRun) { - var statusReason *TaskRunStatusReason - if pb.StatusReason != nil { - sr := &TaskRunStatusReason{} - sr.FromProto(pb.StatusReason) - statusReason = sr +func (r *TaskRun) ToStorage() *storage.PipelineTaskRun { + statusReason, err := json.Marshal(r.StatusReason) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + task, err := json.Marshal(r.Task) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + variables, err := json.Marshal(r.Variables) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + var exitcode int64 = 999 + if r.ExitCode != nil { + exitcode = *r.ExitCode + } + + taskRun := &storage.PipelineTaskRun{ + Namespace: r.Namespace, + Pipeline: r.Pipeline, + Run: r.Run, + ID: r.ID, + Task: string(task), + Created: r.Created, + Started: r.Started, + Ended: r.Ended, + ExitCode: exitcode, + LogsExpired: r.LogsExpired, + LogsRemoved: r.LogsRemoved, + State: string(r.State), + Status: string(r.Status), + StatusReason: string(statusReason), + Variables: string(variables), } - variables := []Variable{} - for _, variable := range pb.Variables { - vari := Variable{} - vari.FromProto(variable) - variables = append(variables, vari) + return taskRun +} + +func (r *TaskRun) FromStorage(storage *storage.PipelineTaskRun) { + var statusReason TaskRunStatusReason + err := json.Unmarshal([]byte(storage.StatusReason), &statusReason) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") } var task Task + err = json.Unmarshal([]byte(storage.Task), &task) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } - switch t := pb.Task.(type) { - case *proto.TaskRun_CommonTask: - commonTask := &CommonTask{} - commonTask.FromProto(t.CommonTask) - task = commonTask - case *proto.TaskRun_CustomTask: - customTask := &CustomTask{} - customTask.FromProto(t.CustomTask) - task = customTask + var variables []Variable + err = json.Unmarshal([]byte(storage.Variables), &variables) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") } - r.Namespace = pb.Namespace - r.Pipeline = pb.Pipeline - r.Run = pb.Run - r.ID = pb.Id - r.Created = pb.Created - r.Started = pb.Started - r.Ended = pb.Ended - r.ExitCode = Ptr(pb.ExitCode) - r.StatusReason = statusReason - r.LogsExpired = pb.LogsExpired - r.LogsRemoved = pb.LogsRemoved - r.State = TaskRunState(pb.State.String()) - r.Status = TaskRunStatus(pb.Status.String()) - r.Variables = variables + r.Namespace = storage.Namespace + r.Pipeline = storage.Pipeline + r.Run = storage.Run + r.ID = storage.ID r.Task = task + r.Created = storage.Created + r.Started = storage.Started + r.Ended = storage.Ended + r.ExitCode = Ptr(storage.ExitCode) + r.LogsExpired = storage.LogsExpired + r.LogsRemoved = storage.LogsRemoved + r.State = TaskRunState(storage.State) + r.Status = TaskRunStatus(storage.Status) + r.StatusReason = &statusReason + r.Variables = variables } func Ptr[T any](v T) *T { diff --git a/models/token.go b/internal/models/token.go similarity index 58% rename from models/token.go rename to internal/models/token.go index 08bf210c..81edf032 100644 --- a/models/token.go +++ b/internal/models/token.go @@ -1,9 +1,12 @@ package models import ( + "encoding/json" "time" + "github.com/clintjedwards/gofer/internal/storage" proto "github.com/clintjedwards/gofer/proto/go" + "github.com/rs/zerolog/log" ) type TokenKind string @@ -51,11 +54,46 @@ func (t *Token) ToProto() *proto.Token { } } -func (t *Token) FromProto(proto *proto.Token) { - t.Created = proto.Created - t.Kind = TokenKind(proto.Kind.String()) - t.Namespaces = proto.Namespaces - t.Metadata = proto.Metadata - t.Expires = proto.Expires - t.Disabled = proto.Disabled +func (t *Token) ToStorage() *storage.Token { + namespaces, err := json.Marshal(t.Namespaces) + if err != nil { + log.Fatal().Err(err).Msg("error in translating to storage") + } + + metadata, err := json.Marshal(t.Metadata) + if err != nil { + log.Fatal().Err(err).Msg("error in translating to storage") + } + + return &storage.Token{ + Hash: t.Hash, + Created: t.Created, + Kind: string(t.Kind), + Namespaces: string(namespaces), + Metadata: string(metadata), + Expires: t.Expires, + Disabled: t.Disabled, + } +} + +func (t *Token) FromStorage(s *storage.Token) { + var namespaces []string + err := json.Unmarshal([]byte(s.Namespaces), &namespaces) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + var metadata map[string]string + err = json.Unmarshal([]byte(s.Metadata), &metadata) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + t.Hash = s.Hash + t.Created = s.Created + t.Kind = TokenKind(s.Kind) + t.Namespaces = namespaces + t.Metadata = metadata + t.Expires = s.Expires + t.Disabled = s.Disabled } diff --git a/internal/models/trigger.go b/internal/models/trigger.go new file mode 100644 index 00000000..1f49c8cc --- /dev/null +++ b/internal/models/trigger.go @@ -0,0 +1,231 @@ +package models + +import ( + "encoding/json" + "time" + + "github.com/clintjedwards/gofer/internal/storage" + proto "github.com/clintjedwards/gofer/proto/go" + "github.com/rs/zerolog/log" +) + +type TriggerState string + +const ( + TriggerStateUnknown TriggerState = "UNKNOWN" // Unknown state, can be in this state because of an error. + TriggerStateProcessing TriggerState = "PROCESSING" // Pre-scheduling validation and prep. + TriggerStateRunning TriggerState = "RUNNING" // Currently running as reported by scheduler. + TriggerStateExited TriggerState = "EXITED" // Trigger has exited; usually because of an error. +) + +type TriggerStatus string + +const ( + TriggerStatusUnknown TriggerStatus = "UNKNOWN" // Cannot determine status of Trigger, should never be in this status. + TriggerStatusEnabled TriggerStatus = "ENABLED" // Installed and able to be used by pipelines. + /// Not available to be used by pipelines, either through lack of installation or + /// being disabled by an admin. + TriggerStatusDisabled TriggerStatus = "DISABLED" +) + +type Trigger struct { + Registration TriggerRegistration `json:"registration"` + + // URL is the network address used to communicate with the trigger by the main process. + URL string `json:"url"` + Started int64 `json:"started"` // The start time of the trigger in epoch milliseconds. + State TriggerState `json:"state"` + Documentation string `json:"documentation"` // The documentation link for this specific trigger. + // Key is a trigger's authentication key used to validate requests from the Gofer main service. + // On every request the Gofer service passes this key so that it is impossible for other service to contact + // and manipulate triggers directly. + Key *string `json:"-"` +} + +func (t *Trigger) ToProto() *proto.Trigger { + return &proto.Trigger{ + Name: t.Registration.Name, + Image: t.Registration.Image, + Url: t.URL, + Started: t.Started, + State: proto.Trigger_TriggerState(proto.Trigger_TriggerState_value[string(t.State)]), + Status: proto.Trigger_TriggerStatus(proto.Trigger_TriggerStatus_value[string(t.Registration.Status)]), + Documentation: t.Documentation, + } +} + +// When installing a new trigger, we allow the trigger installer to pass a bunch of settings that +// allow us to go get that trigger on future startups. +type TriggerRegistration struct { + Name string `json:"name"` + Image string `json:"image"` + RegistryAuth *RegistryAuth `json:"registry_auth"` + Variables []Variable `json:"variables"` + Created int64 `json:"created"` + Status TriggerStatus `json:"status"` +} + +func (c *TriggerRegistration) FromInstallTriggerRequest(proto *proto.InstallTriggerRequest) { + variables := []Variable{} + for key, value := range proto.Variables { + variables = append(variables, Variable{ + Key: key, + Value: value, + Source: VariableSourceSystem, + }) + } + + var registryAuth *RegistryAuth + if proto.User != "" { + registryAuth = &RegistryAuth{ + User: proto.User, + Pass: proto.Pass, + } + } + + c.Name = proto.Name + c.Image = proto.Image + c.RegistryAuth = registryAuth + c.Variables = variables + c.Created = time.Now().UnixMilli() + c.Status = TriggerStatusEnabled +} + +func (c *TriggerRegistration) ToStorage() *storage.GlobalTriggerRegistration { + var registryAuth string + + if c.RegistryAuth != nil { + output, err := json.Marshal(c.RegistryAuth) + if err != nil { + log.Fatal().Err(err).Msg("could not (un)marshal from storage") + } + + registryAuth = string(output) + } + + var variables string + + output, err := json.Marshal(c.Variables) + if err != nil { + log.Fatal().Err(err).Msg("could not (un)marshal from storage") + } + + variables = string(output) + + storage := &storage.GlobalTriggerRegistration{ + Name: c.Name, + Image: c.Image, + RegistryAuth: registryAuth, + Variables: variables, + Created: c.Created, + Status: string(c.Status), + } + return storage +} + +func (c *TriggerRegistration) FromStorage(tr *storage.GlobalTriggerRegistration) { + var registryAuth RegistryAuth + + if tr.RegistryAuth != "" { + err := json.Unmarshal([]byte(tr.RegistryAuth), ®istryAuth) + if err != nil { + log.Fatal().Err(err).Msg("could not (un)marshal from storage") + } + } + + var variables []Variable + + if tr.Variables != "" { + err := json.Unmarshal([]byte(tr.Variables), &variables) + if err != nil { + log.Fatal().Err(err).Msg("could not (un)marshal from storage") + } + } + + c.Name = tr.Name + c.Image = tr.Image + c.RegistryAuth = ®istryAuth + c.Variables = variables + c.Created = tr.Created + c.Status = TriggerStatus(tr.Status) +} + +type TriggerSubscriptionStatus string + +const ( + TriggerSubscriptionStatusUnknown TriggerSubscriptionStatus = "UNKNOWN" + // Subscription is successfully connected and active. + TriggerSubscriptionStatusActive TriggerSubscriptionStatus = "ACTIVE" + // Subscription is not connected and inactive due to error. + TriggerSubscriptionStatusError TriggerSubscriptionStatus = "ERROR" + // Subscription is connected, but inactive due to user or operator request. + TriggerSubscriptionStatusDisabled TriggerSubscriptionStatus = "DISABLED" +) + +type TriggerSubscriptionStatusReasonKind string + +const ( + TriggerSubscriptionStatusReasonUnknown TriggerSubscriptionStatusReasonKind = "UNKNOWN" + TriggerSubscriptionStatusReasonTriggerNotFound TriggerSubscriptionStatusReasonKind = "TRIGGER_NOT_FOUND" + TriggerSubscriptionStatusReasonTriggerSubscriptionFailed TriggerSubscriptionStatusReasonKind = "TRIGGER_SUBSCRIPTION_FAILED" +) + +type TriggerSubscriptionStatusReason struct { + // The specific type of subscription failure. Good for documentation about what it might be. + Reason TriggerSubscriptionStatusReasonKind `json:"kind"` + Description string `json:"description"` // The description of why the run might have failed. +} + +type PipelineTriggerSubscription struct { + Namespace string + Pipeline string + Name string + Label string + Settings map[string]string + Status TriggerSubscriptionStatus + StatusReason TriggerSubscriptionStatusReason +} + +func (ts *PipelineTriggerSubscription) ToStorage() *storage.PipelineTriggerSubscription { + statusReason, err := json.Marshal(ts.StatusReason) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + settings, err := json.Marshal(ts.Settings) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + return &storage.PipelineTriggerSubscription{ + Namespace: ts.Namespace, + Pipeline: ts.Pipeline, + Name: ts.Name, + Label: ts.Label, + Settings: string(settings), + Status: string(ts.Status), + StatusReason: string(statusReason), + } +} + +func (ts *PipelineTriggerSubscription) FromStorage(storage *storage.PipelineTriggerSubscription) { + var statusReason TriggerSubscriptionStatusReason + err := json.Unmarshal([]byte(storage.StatusReason), &statusReason) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + var settings map[string]string + err = json.Unmarshal([]byte(storage.Settings), &settings) + if err != nil { + log.Fatal().Err(err).Msg("error in translating from storage") + } + + ts.Namespace = storage.Namespace + ts.Pipeline = storage.Pipeline + ts.Name = storage.Name + ts.Label = storage.Label + ts.Settings = settings + ts.Status = TriggerSubscriptionStatus(storage.Status) + ts.StatusReason = statusReason +} diff --git a/internal/scheduler/scheduler.go b/internal/scheduler/scheduler.go index 30bf6cec..1e5b7823 100644 --- a/internal/scheduler/scheduler.go +++ b/internal/scheduler/scheduler.go @@ -7,7 +7,7 @@ import ( "io" "time" - "github.com/clintjedwards/gofer/models" + "github.com/clintjedwards/gofer/internal/models" ) type EngineType string diff --git a/internal/storage/commonTasks.go b/internal/storage/commonTasks.go deleted file mode 100644 index 070372c9..00000000 --- a/internal/storage/commonTasks.go +++ /dev/null @@ -1,223 +0,0 @@ -package storage - -import ( - "database/sql" - "encoding/json" - "errors" - "fmt" - "strings" - - qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" -) - -type UpdatableCommonTaskRegistrationFields struct { - Image *string - RegistryAuth *models.RegistryAuth - Variables *map[string]string - Status *models.CommonTaskStatus - Documentation *string -} - -func (db *DB) ListCommonTaskRegistrations(offset, limit int) ([]models.CommonTaskRegistration, error) { - if limit == 0 || limit > db.maxResultsLimit { - limit = db.maxResultsLimit - } - - rows, err := qb.Select("name", "image", "registry_auth", "variables", "created", "status", "documentation"). - From("common_task_registrations"). - Limit(uint64(limit)). - Offset(uint64(offset)).RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - commonTaskRegistrations := []models.CommonTaskRegistration{} - - for rows.Next() { - commonTaskRegistration := models.CommonTaskRegistration{} - - var name string - var image string - var registryAuthJSON sql.NullString - var variablesJSON string - var created int64 - var status models.CommonTaskStatus - var documentation string - - err = rows.Scan(&name, &image, ®istryAuthJSON, &variablesJSON, &created, &status, &documentation) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - var registryAuth *models.RegistryAuth - if registryAuthJSON.Valid { - registryAuth = &models.RegistryAuth{} - err := json.Unmarshal([]byte(registryAuthJSON.String), registryAuth) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - variables := []models.Variable{} - err = json.Unmarshal([]byte(variablesJSON), &variables) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - commonTaskRegistration.Name = name - commonTaskRegistration.Image = image - commonTaskRegistration.RegistryAuth = registryAuth - commonTaskRegistration.Variables = variables - commonTaskRegistration.Created = created - commonTaskRegistration.Status = status - commonTaskRegistration.Documentation = documentation - - commonTaskRegistrations = append(commonTaskRegistrations, commonTaskRegistration) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return commonTaskRegistrations, nil -} - -func (db *DB) InsertCommonTaskRegistration(tr *models.CommonTaskRegistration) error { - variablesJSON, err := json.Marshal(tr.Variables) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - var registryAuthJSON *string - if tr.RegistryAuth != nil { - tmpJSON, err := json.Marshal(tr.RegistryAuth) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - registryAuthJSON = ptr(string(tmpJSON)) - } - - _, err = qb.Insert("common_task_registrations").Columns("name", "image", "registry_auth", "variables", "created", - "status", "documentation").Values(tr.Name, tr.Image, registryAuthJSON, string(variablesJSON), tr.Created, tr.Status, tr.Documentation).RunWith(db).Exec() - if err != nil { - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return ErrEntityExists - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func (db *DB) GetCommonTaskRegistration(name string) (models.CommonTaskRegistration, error) { - row := qb.Select("name", "image", "registry_auth", "variables", "created", "status", "documentation"). - From("common_task_registrations").Where(qb.Eq{"name": name}).RunWith(db).QueryRow() - - commonTaskRegistration := models.CommonTaskRegistration{} - - var nameStr string - var image string - var registryAuthJSON sql.NullString - var variablesJSON string - var created int64 - var status models.CommonTaskStatus - var documentation string - - err := row.Scan(&nameStr, &image, ®istryAuthJSON, &variablesJSON, &created, &status, &documentation) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return models.CommonTaskRegistration{}, ErrEntityNotFound - } - - return models.CommonTaskRegistration{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - var registryAuth *models.RegistryAuth - if registryAuthJSON.Valid { - registryAuth = &models.RegistryAuth{} - err := json.Unmarshal([]byte(registryAuthJSON.String), registryAuth) - if err != nil { - return models.CommonTaskRegistration{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - variables := []models.Variable{} - err = json.Unmarshal([]byte(variablesJSON), &variables) - if err != nil { - return models.CommonTaskRegistration{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - commonTaskRegistration.Name = name - commonTaskRegistration.Image = image - commonTaskRegistration.RegistryAuth = registryAuth - commonTaskRegistration.Variables = variables - commonTaskRegistration.Created = created - commonTaskRegistration.Status = status - commonTaskRegistration.Documentation = documentation - - return commonTaskRegistration, nil -} - -func (db *DB) UpdateCommonTaskRegistration(name string, fields UpdatableCommonTaskRegistrationFields) error { - query := qb.Update("common_task_registrations") - - if fields.Image != nil { - query = query.Set("image", fields.Image) - } - - if fields.RegistryAuth != nil { - registryAuth, err := json.Marshal(fields.RegistryAuth) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - query = query.Set("registry_auth", registryAuth) - } - - if fields.Variables != nil { - variables, err := json.Marshal(fields.Variables) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - query = query.Set("variables", variables) - } - - if fields.Status != nil { - query = query.Set("status", fields.Status) - } - - if fields.Documentation != nil { - query = query.Set("documentation", fields.Documentation) - } - - _, err := query.Where(qb.Eq{"name": name}).RunWith(db).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return ErrEntityNotFound - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func (db *DB) DeleteCommonTaskRegistration(name string) error { - _, err := qb.Delete("common_task_registrations").Where(qb.Eq{"name": name}).RunWith(db).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} diff --git a/internal/storage/events.go b/internal/storage/events.go index 2b1973f2..7b15e5c6 100644 --- a/internal/storage/events.go +++ b/internal/storage/events.go @@ -2,18 +2,23 @@ package storage import ( "database/sql" - "encoding/json" "errors" "fmt" "strings" qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" ) -// Return all events; limited to 200 rows in any one response. +type Event struct { + ID int64 + Kind string + Details string + Emitted int64 +} + +// Return all events. // The reverse parameter allows the sorting the events in reverse chronological order (newest event first). -func (db *DB) ListEvents(offset, limit int, reverse bool) ([]models.Event, error) { +func (db *DB) ListEvents(conn Queryable, offset, limit int, reverse bool) ([]Event, error) { if limit == 0 || limit > db.maxResultsLimit { limit = db.maxResultsLimit } @@ -23,56 +28,14 @@ func (db *DB) ListEvents(offset, limit int, reverse bool) ([]models.Event, error orderByStr = "id DESC" } - rows, err := qb.Select("id", "kind", "details", "emitted").From("events"). + query, args := qb.Select("id", "kind", "details", "emitted").From("events"). OrderBy(orderByStr). Limit(uint64(limit)). - Offset(uint64(offset)).RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - events := []models.Event{} - - for rows.Next() { - event := models.Event{} - - var id int64 - var kind string - var detailsJSON string - var emitted int64 - - err = rows.Scan(&id, &kind, &detailsJSON, &emitted) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } + Offset(uint64(offset)). + MustSql() - // TODO(clintjedwards): There is a known data race condition here that is safe - // but the go data race detector will squawk. What happens is the interface - // object below gets read in and passed to the calling function. - // That function will usually then pass that reference to other functions - // and then at some point read. This is technically a data race since the memory - // is access in a read/write fashion in two separate threads, but not an issue - // for us since we only do one read/write cycle and that write can only occur - // before any reads. - details := models.EventKindMap[models.EventKind(kind)] - err := json.Unmarshal([]byte(detailsJSON), &details) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - event.ID = id - event.Kind = models.EventKind(kind) - event.Details = details - event.Emitted = emitted - - events = append(events, event) - } - err = rows.Err() + events := []Event{} + err := conn.Select(&events, query, args...) if err != nil { return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } @@ -80,14 +43,9 @@ func (db *DB) ListEvents(offset, limit int, reverse bool) ([]models.Event, error return events, nil } -func (db *DB) InsertEvent(event *models.Event) (int64, error) { - detailsJSON, err := json.Marshal(event.Details) - if err != nil { - return 0, fmt.Errorf("database error occurred; could not encode object; %v", err) - } - +func (db *DB) InsertEvent(conn Queryable, event *Event) (int64, error) { result, err := qb.Insert("events").Columns("kind", "details", "emitted"). - Values(event.Kind, string(detailsJSON), event.Emitted).RunWith(db).Exec() + Values(event.Kind, event.Details, event.Emitted).RunWith(conn).Exec() if err != nil { if strings.Contains(err.Error(), "UNIQUE constraint failed") { return 0, ErrEntityExists @@ -99,41 +57,25 @@ func (db *DB) InsertEvent(event *models.Event) (int64, error) { return result.LastInsertId() } -func (db *DB) GetEvent(id int64) (models.Event, error) { - row := qb.Select("id", "kind", "details", "emitted").From("events").Where(qb.Eq{"id": id}).RunWith(db).QueryRow() +func (db *DB) GetEvent(conn Queryable, id int64) (Event, error) { + query, args := qb.Select("id", "kind", "details", "emitted"). + From("events").Where(qb.Eq{"id": id}).MustSql() - var eventID int64 - var kind string - var detailsJSON string - var emitted int64 - - err := row.Scan(&eventID, &kind, &detailsJSON, &emitted) + event := Event{} + err := conn.Get(&event, query, args...) if err != nil { if errors.Is(err, sql.ErrNoRows) { - return models.Event{}, ErrEntityNotFound + return Event{}, ErrEntityNotFound } - return models.Event{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - details := models.EventKindMap[models.EventKind(kind)] - err = json.Unmarshal([]byte(detailsJSON), &details) - if err != nil { - return models.Event{}, fmt.Errorf("database error occurred; could not decode object; %v", err) + return Event{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } - retrievedEvent := models.Event{} - - retrievedEvent.ID = eventID - retrievedEvent.Kind = models.EventKind(kind) - retrievedEvent.Details = details - retrievedEvent.Emitted = emitted - - return retrievedEvent, nil + return event, nil } -func (db *DB) DeleteEvent(id int64) error { - _, err := qb.Delete("events").Where(qb.Eq{"id": id}).RunWith(db).Exec() +func (db *DB) DeleteEvent(conn Queryable, id int64) error { + _, err := qb.Delete("events").Where(qb.Eq{"id": id}).RunWith(conn).Exec() if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil diff --git a/internal/storage/events_test.go b/internal/storage/events_test.go new file mode 100644 index 00000000..62aecf4b --- /dev/null +++ b/internal/storage/events_test.go @@ -0,0 +1,56 @@ +package storage + +import ( + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDEvents(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + event := Event{ + Kind: "Kind", + Details: "Some detail", + Emitted: 0, + } + + id, err := db.InsertEvent(db, &event) + if err != nil { + t.Fatal(err) + } + + if id != 1 { + t.Errorf("ID failed to auto-increment. expected id %d; got id %d", 1, id) + } + + event.ID = 1 + + events, err := db.ListEvents(db, 0, 0, false) + if err != nil { + t.Fatal(err) + } + + if len(events) != 1 { + t.Errorf("expected 1 element in list found %d", len(events)) + } + + if diff := cmp.Diff(event, events[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + event, err = db.GetEvent(db, 1) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(event, event); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } +} diff --git a/internal/storage/globalCommonTaskRegistrations.go b/internal/storage/globalCommonTaskRegistrations.go new file mode 100644 index 00000000..70395653 --- /dev/null +++ b/internal/storage/globalCommonTaskRegistrations.go @@ -0,0 +1,128 @@ +package storage + +import ( + "database/sql" + "errors" + "fmt" + "strings" + + qb "github.com/Masterminds/squirrel" +) + +type CommonTaskRegistration struct { + Name string + Image string + RegistryAuth string `db:"registry_auth"` + Variables string + Created int64 + Status string + Documentation string +} + +type UpdatableCommonTaskRegistrationFields struct { + Image *string + RegistryAuth *string + Variables *string + Status *string + Documentation *string +} + +func (db *DB) ListCommonTaskRegistrations(conn Queryable, offset, limit int) ([]CommonTaskRegistration, error) { + if limit == 0 || limit > db.maxResultsLimit { + limit = db.maxResultsLimit + } + + query, args := qb.Select("name", "image", "registry_auth", "variables", "created", "status", "documentation"). + From("global_common_task_registrations"). + Limit(uint64(limit)). + Offset(uint64(offset)).MustSql() + + tasks := []CommonTaskRegistration{} + err := conn.Select(&tasks, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return tasks, nil +} + +func (db *DB) InsertCommonTaskRegistration(conn Queryable, tr *CommonTaskRegistration) error { + _, err := qb.Insert("global_common_task_registrations"). + Columns("name", "image", "registry_auth", "variables", "created", "status", "documentation"). + Values(tr.Name, tr.Image, tr.RegistryAuth, tr.Variables, tr.Created, tr.Status, tr.Documentation). + RunWith(conn).Exec() + if err != nil { + if strings.Contains(err.Error(), "UNIQUE constraint failed") { + return ErrEntityExists + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) GetCommonTaskRegistration(conn Queryable, name string) (CommonTaskRegistration, error) { + query, args := qb.Select("name", "image", "registry_auth", "variables", "created", "status", "documentation"). + From("global_common_task_registrations").Where(qb.Eq{"name": name}).MustSql() + + task := CommonTaskRegistration{} + err := conn.Get(&task, query, args...) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return CommonTaskRegistration{}, ErrEntityNotFound + } + + return CommonTaskRegistration{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return task, nil +} + +func (db *DB) UpdateCommonTaskRegistration(conn Queryable, name string, fields UpdatableCommonTaskRegistrationFields) error { + query := qb.Update("global_common_task_registrations") + + if fields.Image != nil { + query = query.Set("image", fields.Image) + } + + if fields.RegistryAuth != nil { + query = query.Set("registry_auth", fields.RegistryAuth) + } + + if fields.Variables != nil { + query = query.Set("variables", fields.Variables) + } + + if fields.Status != nil { + query = query.Set("status", fields.Status) + } + + if fields.Documentation != nil { + query = query.Set("documentation", fields.Documentation) + } + + _, err := query.Where(qb.Eq{"name": name}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return ErrEntityNotFound + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) DeleteCommonTaskRegistration(conn Queryable, name string) error { + _, err := qb.Delete("common_task_registrations").Where(qb.Eq{"name": name}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return nil + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} diff --git a/internal/storage/globalCommonTaskRegistrations_test.go b/internal/storage/globalCommonTaskRegistrations_test.go new file mode 100644 index 00000000..abfa21b2 --- /dev/null +++ b/internal/storage/globalCommonTaskRegistrations_test.go @@ -0,0 +1,54 @@ +package storage + +import ( + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDCommonTaskRegistrations(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + reg := CommonTaskRegistration{ + Name: "test_registration", + Image: "test_image", + RegistryAuth: "test_reg", + Variables: "test_vars", + Created: 0, + Status: "ACTIVE", + Documentation: "some link here", + } + + err = db.InsertCommonTaskRegistration(db, ®) + if err != nil { + t.Fatal(err) + } + + regs, err := db.ListCommonTaskRegistrations(db, 0, 0) + if err != nil { + t.Fatal(err) + } + + if len(regs) != 1 { + t.Errorf("expected 1 element in list found %d", len(regs)) + } + + if diff := cmp.Diff(reg, regs[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedTask, err := db.GetCommonTaskRegistration(db, "test_registration") + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(reg, fetchedTask); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } +} diff --git a/internal/storage/globalTriggerRegistrations.go b/internal/storage/globalTriggerRegistrations.go new file mode 100644 index 00000000..48ad4e5a --- /dev/null +++ b/internal/storage/globalTriggerRegistrations.go @@ -0,0 +1,120 @@ +package storage + +import ( + "database/sql" + "errors" + "fmt" + "strings" + + qb "github.com/Masterminds/squirrel" +) + +type GlobalTriggerRegistration struct { + Name string + Image string + RegistryAuth string `db:"registry_auth"` + Variables string + Created int64 + Status string +} + +type UpdatableGlobalTriggerRegistrationFields struct { + Image *string + RegistryAuth *string + Variables *string + Status *string +} + +func (db *DB) ListGlobalTriggerRegistrations(conn Queryable, offset, limit int) ([]GlobalTriggerRegistration, error) { + if limit == 0 || limit > db.maxResultsLimit { + limit = db.maxResultsLimit + } + + query, args := qb.Select("name", "image", "registry_auth", "variables", "created", "status"). + From("global_trigger_registrations"). + Limit(uint64(limit)). + Offset(uint64(offset)).MustSql() + + regs := []GlobalTriggerRegistration{} + err := conn.Select(®s, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return regs, nil +} + +func (db *DB) InsertGlobalTriggerRegistration(conn Queryable, tr *GlobalTriggerRegistration) error { + _, err := qb.Insert("global_trigger_registrations").Columns("name", "image", "registry_auth", "variables", "created", + "status").Values(tr.Name, tr.Image, tr.RegistryAuth, tr.Variables, tr.Created, tr.Status).RunWith(conn).Exec() + if err != nil { + if strings.Contains(err.Error(), "UNIQUE constraint failed") { + return ErrEntityExists + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) GetGlobalTriggerRegistration(conn Queryable, name string) (GlobalTriggerRegistration, error) { + query, args := qb.Select("name", "image", "registry_auth", "variables", "created", "status"). + From("global_trigger_registrations").Where(qb.Eq{"name": name}).MustSql() + + reg := GlobalTriggerRegistration{} + err := conn.Get(®, query, args...) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return GlobalTriggerRegistration{}, ErrEntityNotFound + } + + return GlobalTriggerRegistration{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return reg, nil +} + +func (db *DB) UpdateGlobalTriggerRegistration(conn Queryable, name string, fields UpdatableGlobalTriggerRegistrationFields) error { + query := qb.Update("global_trigger_registrations") + + if fields.Image != nil { + query = query.Set("image", fields.Image) + } + + if fields.RegistryAuth != nil { + query = query.Set("registry_auth", fields.RegistryAuth) + } + + if fields.Variables != nil { + query = query.Set("variables", fields.Variables) + } + + if fields.Status != nil { + query = query.Set("status", fields.Status) + } + + _, err := query.Where(qb.Eq{"name": name}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return ErrEntityNotFound + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) DeleteGlobalTriggerRegistration(conn Queryable, name string) error { + _, err := qb.Delete("global_trigger_registrations").Where(qb.Eq{"name": name}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return nil + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} diff --git a/internal/storage/globalTriggerRegistrations_test.go b/internal/storage/globalTriggerRegistrations_test.go new file mode 100644 index 00000000..0d08b5c5 --- /dev/null +++ b/internal/storage/globalTriggerRegistrations_test.go @@ -0,0 +1,53 @@ +package storage + +import ( + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDGlobalTriggerRegistrations(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + reg := GlobalTriggerRegistration{ + Name: "test_registration", + Image: "test_image", + RegistryAuth: "test_reg", + Variables: "test_vars", + Created: 0, + Status: "ACTIVE", + } + + err = db.InsertGlobalTriggerRegistration(db, ®) + if err != nil { + t.Fatal(err) + } + + regs, err := db.ListGlobalTriggerRegistrations(db, 0, 0) + if err != nil { + t.Fatal(err) + } + + if len(regs) != 1 { + t.Errorf("expected 1 element in list found %d", len(regs)) + } + + if diff := cmp.Diff(reg, regs[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedTask, err := db.GetGlobalTriggerRegistration(db, "test_registration") + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(reg, fetchedTask); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } +} diff --git a/internal/storage/migrations/0_init.sql b/internal/storage/migrations/0_init.sql index 0d777ffa..6a617810 100644 --- a/internal/storage/migrations/0_init.sql +++ b/internal/storage/migrations/0_init.sql @@ -7,95 +7,130 @@ CREATE TABLE IF NOT EXISTS namespaces ( PRIMARY KEY (id) ) STRICT; -CREATE TABLE IF NOT EXISTS pipelines ( +CREATE TABLE IF NOT EXISTS pipeline_metadata ( namespace TEXT NOT NULL, id TEXT NOT NULL, - name TEXT NOT NULL, - description TEXT NOT NULL, - parallelism INTEGER NOT NULL, created INTEGER NOT NULL, modified INTEGER NOT NULL, state TEXT NOT NULL, - errors TEXT NOT NULL, FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, PRIMARY KEY (namespace, id) ) STRICT; -CREATE INDEX idx_created_pipelines ON pipelines (created); +CREATE INDEX idx_created_pipeline_metadata ON pipeline_metadata (created); -CREATE TABLE IF NOT EXISTS pipeline_trigger_settings ( - namespace TEXT NOT NULL, - pipeline TEXT NOT NULL, - name TEXT NOT NULL, - label TEXT NOT NULL, - settings TEXT, +CREATE TABLE IF NOT EXISTS pipeline_configs ( + namespace TEXT NOT NULL, + pipeline TEXT NOT NULL, + version INTEGER NOT NULL, + parallelism INTEGER NOT NULL, + name TEXT NOT NULL, + description TEXT NOT NULL, + registered INTEGER NOT NULL, + deprecated INTEGER NOT NULL, + state TEXT NOT NULL, + FOREIGN KEY (namespace, pipeline) REFERENCES pipeline_metadata(namespace, id) ON DELETE CASCADE, + PRIMARY KEY (namespace, pipeline, version) +) STRICT; + +CREATE TABLE IF NOT EXISTS pipeline_deployments ( + namespace TEXT NOT NULL, + pipeline TEXT NOT NULL, + id INTEGER NOT NULL, + start_version INTEGER NOT NULL, + end_version INTEGER NOT NULL, + started INTEGER NOT NULL, + ended INTEGER NOT NULL, + state TEXT NOT NULL, + status TEXT NOT NULL, + status_reason TEXT NOT NULL, + logs TEXT NOT NULL, FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, - FOREIGN KEY (namespace, pipeline) REFERENCES pipelines(namespace, id) ON DELETE CASCADE, - PRIMARY KEY (namespace, pipeline, label) + FOREIGN KEY (namespace, pipeline) REFERENCES pipeline_metadata(namespace, id) ON DELETE CASCADE, + PRIMARY KEY (namespace, pipeline, id) ) STRICT; -CREATE TABLE IF NOT EXISTS pipeline_common_task_settings ( +CREATE TABLE IF NOT EXISTS pipeline_trigger_subscriptions ( namespace TEXT NOT NULL, pipeline TEXT NOT NULL, name TEXT NOT NULL, label TEXT NOT NULL, - settings TEXT, - inject_api_token INTEGER CHECK (inject_api_token IN (0, 1)), - FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, - FOREIGN KEY (namespace, pipeline) REFERENCES pipelines(namespace, id) ON DELETE CASCADE, - PRIMARY KEY (namespace, pipeline, label) -) STRICT; - -CREATE TABLE IF NOT EXISTS runs ( - namespace TEXT NOT NULL, - pipeline TEXT NOT NULL, - id INTEGER NOT NULL, - started INTEGER NOT NULL, - ended INTEGER NOT NULL, - state TEXT NOT NULL, - status TEXT NOT NULL, - status_reason TEXT, - trigger TEXT NOT NULL, - variables TEXT NOT NULL, - store_objects_expired INTEGER NOT NULL CHECK (store_objects_expired IN (0, 1)), + settings TEXT NOT NULL, + status TEXT NOT NULL, + status_reason TEXT NOT NULL, FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, - FOREIGN KEY (namespace, pipeline) REFERENCES pipelines(namespace, id) ON DELETE CASCADE, - PRIMARY KEY (namespace, pipeline, id) + FOREIGN KEY (namespace, pipeline) REFERENCES pipeline_metadata(namespace, id) ON DELETE CASCADE, + PRIMARY KEY (namespace, pipeline, name, label) ) STRICT; -CREATE INDEX idx_runs_started ON runs (started); +CREATE TABLE IF NOT EXISTS pipeline_common_task_settings ( + namespace TEXT NOT NULL, + pipeline TEXT NOT NULL, + pipeline_config_version INTEGER NOT NULL, + name TEXT NOT NULL, + label TEXT NOT NULL, + description TEXT NOT NULL, + depends_on TEXT NOT NULL, + settings TEXT NOT NULL, + inject_api_token INTEGER NOT NULL CHECK (inject_api_token IN (0, 1)), + FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline) REFERENCES pipeline_metadata(namespace, id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline, pipeline_config_version) REFERENCES pipeline_configs(namespace, pipeline, version) ON DELETE CASCADE, + PRIMARY KEY (namespace, pipeline, pipeline_config_version, label) +) STRICT; -CREATE TABLE IF NOT EXISTS custom_tasks ( - namespace TEXT NOT NULL, - pipeline TEXT NOT NULL, - id TEXT NOT NULL, - description TEXT, - image TEXT NOT NULL, - registry_auth TEXT, - depends_on TEXT NOT NULL, - variables TEXT NOT NULL, - entrypoint TEXT, - command TEXT, - inject_api_token INTEGER CHECK (inject_api_token IN (0, 1)), +CREATE TABLE IF NOT EXISTS pipeline_runs ( + namespace TEXT NOT NULL, + pipeline TEXT NOT NULL, + pipeline_config_version INTEGER NOT NULL, + id INTEGER NOT NULL, + started INTEGER NOT NULL, + ended INTEGER NOT NULL, + state TEXT NOT NULL, + status TEXT NOT NULL, + status_reason TEXT NOT NULL, + trigger TEXT NOT NULL, + variables TEXT NOT NULL, + store_objects_expired INTEGER NOT NULL CHECK (store_objects_expired IN (0, 1)), FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, - FOREIGN KEY (namespace, pipeline) REFERENCES pipelines(namespace, id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline) REFERENCES pipeline_metadata(namespace, id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline, pipeline_config_version) REFERENCES pipeline_configs(namespace, pipeline, version), PRIMARY KEY (namespace, pipeline, id) ) STRICT; -CREATE TABLE IF NOT EXISTS trigger_registrations ( +CREATE TABLE IF NOT EXISTS pipeline_custom_tasks ( + namespace TEXT NOT NULL, + pipeline TEXT NOT NULL, + pipeline_config_version INTEGER NOT NULL, + id TEXT NOT NULL, + description TEXT NOT NULL, + image TEXT NOT NULL, + registry_auth TEXT NOT NULL, + depends_on TEXT NOT NULL, + variables TEXT NOT NULL, + entrypoint TEXT NOT NULL, + command TEXT NOT NULL, + inject_api_token INTEGER NOT NULL CHECK (inject_api_token IN (0, 1)), + FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline) REFERENCES pipeline_metadata(namespace, id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline, pipeline_config_version) REFERENCES pipeline_configs(namespace, pipeline, version) ON DELETE CASCADE, + PRIMARY KEY (namespace, pipeline, pipeline_config_version, id) +) STRICT; + +CREATE TABLE IF NOT EXISTS global_trigger_registrations ( name TEXT NOT NULL, image TEXT NOT NULL, - registry_auth TEXT, + registry_auth TEXT NOT NULL, variables TEXT NOT NULL, created INTEGER NOT NULL, status TEXT NOT NULL, PRIMARY KEY (name) ) STRICT; -CREATE TABLE IF NOT EXISTS common_task_registrations ( +CREATE TABLE IF NOT EXISTS global_common_task_registrations ( name TEXT NOT NULL, image TEXT NOT NULL, - registry_auth TEXT, + registry_auth TEXT NOT NULL, variables TEXT NOT NULL, created INTEGER NOT NULL, status TEXT NOT NULL, @@ -104,52 +139,52 @@ CREATE TABLE IF NOT EXISTS common_task_registrations ( ) STRICT; CREATE TABLE IF NOT EXISTS object_store_pipeline_keys( - namespace TEXT NOT NULL, - pipeline TEXT NOT NULL, - key TEXT NOT NULL, - created INTEGER NOT NULL, + namespace TEXT NOT NULL, + pipeline TEXT NOT NULL, + key TEXT NOT NULL, + created INTEGER NOT NULL, FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, - FOREIGN KEY (namespace, pipeline) REFERENCES pipelines(namespace, id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline) REFERENCES pipeline_metadata(namespace, id) ON DELETE CASCADE, PRIMARY KEY (namespace, pipeline, key) ) STRICT; CREATE INDEX idx_object_pipeline_keys_created ON object_store_pipeline_keys (created); CREATE TABLE IF NOT EXISTS object_store_run_keys( - namespace TEXT NOT NULL, - pipeline TEXT NOT NULL, + namespace TEXT NOT NULL, + pipeline TEXT NOT NULL, run INTEGER NOT NULL, - key TEXT NOT NULL, + key TEXT NOT NULL, created INTEGER NOT NULL, FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, - FOREIGN KEY (namespace, pipeline) REFERENCES pipelines(namespace, id) ON DELETE CASCADE, - FOREIGN KEY (namespace, pipeline, run) REFERENCES runs(namespace, pipeline, id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline) REFERENCES pipeline_metadata(namespace, id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline, run) REFERENCES pipeline_runs(namespace, pipeline, id) ON DELETE CASCADE, PRIMARY KEY (namespace, pipeline, run, key) ) STRICT; CREATE INDEX idx_object_run_keys_created ON object_store_run_keys (created); CREATE TABLE IF NOT EXISTS secret_store_pipeline_keys( - namespace TEXT NOT NULL, - pipeline TEXT NOT NULL, - key TEXT NOT NULL, + namespace TEXT NOT NULL, + pipeline TEXT NOT NULL, + key TEXT NOT NULL, created INTEGER NOT NULL, FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, - FOREIGN KEY (namespace, pipeline) REFERENCES pipelines(namespace, id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline) REFERENCES pipeline_metadata(namespace, id) ON DELETE CASCADE, PRIMARY KEY (namespace, pipeline, key) ) STRICT; CREATE INDEX idx_secret_pipeline_keys_created ON secret_store_pipeline_keys (created); CREATE TABLE IF NOT EXISTS secret_store_global_keys( - key TEXT NOT NULL, + key TEXT NOT NULL, created INTEGER NOT NULL, PRIMARY KEY (key) ) STRICT; CREATE INDEX idx_secret_global_keys_created ON secret_store_global_keys (created); -CREATE TABLE IF NOT EXISTS task_runs ( +CREATE TABLE IF NOT EXISTS pipeline_task_runs ( namespace TEXT NOT NULL, pipeline TEXT NOT NULL, run INTEGER NOT NULL, @@ -158,34 +193,35 @@ CREATE TABLE IF NOT EXISTS task_runs ( created INTEGER NOT NULL, started INTEGER NOT NULL, ended INTEGER NOT NULL, - exit_code INTEGER, + exit_code INTEGER NOT NULL, logs_expired INTEGER NOT NULL CHECK (logs_expired IN (0, 1)), logs_removed INTEGER NOT NULL CHECK (logs_removed IN (0, 1)), state TEXT NOT NULL, status TEXT NOT NULL, - status_reason TEXT, - variables TEXT NOT NULL, + status_reason TEXT NOT NULL, + variables TEXT NOT NULL, FOREIGN KEY (namespace) REFERENCES namespaces(id) ON DELETE CASCADE, - FOREIGN KEY (namespace, pipeline) REFERENCES pipelines(namespace, id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline) REFERENCES pipeline_metadata(namespace, id) ON DELETE CASCADE, + FOREIGN KEY (namespace, pipeline, run) REFERENCES pipeline_runs(namespace, pipeline, id) ON DELETE CASCADE, PRIMARY KEY (namespace, pipeline, run, id) ) STRICT; -CREATE INDEX idx_taskruns_started ON task_runs (started); +CREATE INDEX idx_taskruns_started ON pipeline_task_runs (started); CREATE TABLE IF NOT EXISTS events ( id INTEGER PRIMARY KEY AUTOINCREMENT, - kind TEXT NOT NULL, - details TEXT NOT NULL, + kind TEXT NOT NULL, + details TEXT NOT NULL, emitted INTEGER NOT NULL ) STRICT; CREATE TABLE IF NOT EXISTS tokens ( - hash TEXT NOT NULL, + hash TEXT NOT NULL, created INTEGER NOT NULL, - kind TEXT NOT NULL, - namespaces TEXT NOT NULL, - metadata TEXT, - expires TEXT NOT NULL, + kind TEXT NOT NULL, + namespaces TEXT NOT NULL, + metadata TEXT NOT NULL, + expires INTEGER NOT NULL, disabled INTEGER NOT NULL CHECK (disabled IN (0, 1)), PRIMARY KEY (hash) ) STRICT; diff --git a/internal/storage/namespaces.go b/internal/storage/namespaces.go index 13f0b65e..93e22bcb 100644 --- a/internal/storage/namespaces.go +++ b/internal/storage/namespaces.go @@ -7,55 +7,32 @@ import ( "strings" qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" ) +type Namespace struct { + ID string + Name string + Description string + Created int64 + Modified int64 +} + type UpdatableNamespaceFields struct { Name *string Description *string Modified *int64 } -func (db *DB) ListNamespaces(offset, limit int) ([]models.Namespace, error) { +func (db *DB) ListNamespaces(conn Queryable, offset, limit int) ([]Namespace, error) { if limit == 0 || limit > db.maxResultsLimit { limit = db.maxResultsLimit } - rows, err := qb.Select("id", "name", "description", "created", "modified"). - From("namespaces").OrderBy("id").Limit(uint64(limit)).Offset(uint64(offset)).RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() + query, args := qb.Select("id", "name", "description", "created", "modified"). + From("namespaces").OrderBy("id").Limit(uint64(limit)).Offset(uint64(offset)).MustSql() - namespaces := []models.Namespace{} - - for rows.Next() { - var id string - var name string - var description string - var created int64 - var modified int64 - - err = rows.Scan(&id, &name, &description, &created, &modified) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - namespaces = append(namespaces, models.Namespace{ - ID: id, - Name: name, - Description: description, - Created: created, - Modified: modified, - }) - - } - err = rows.Err() + namespaces := []Namespace{} + err := conn.Select(&namespaces, query, args...) if err != nil { return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } @@ -63,10 +40,10 @@ func (db *DB) ListNamespaces(offset, limit int) ([]models.Namespace, error) { return namespaces, nil } -func (db *DB) InsertNamespace(namespace *models.Namespace) error { +func (db *DB) InsertNamespace(conn Queryable, namespace *Namespace) error { _, err := qb.Insert("namespaces").Columns("id", "name", "description", "created", "modified").Values( namespace.ID, namespace.Name, namespace.Description, namespace.Created, namespace.Modified, - ).RunWith(db).Exec() + ).RunWith(conn).Exec() if err != nil { if strings.Contains(err.Error(), "UNIQUE constraint failed") { return ErrEntityExists @@ -78,33 +55,24 @@ func (db *DB) InsertNamespace(namespace *models.Namespace) error { return nil } -func (db *DB) GetNamespace(id string) (models.Namespace, error) { - row := qb.Select("id", "name", "description", "created", "modified"). - From("namespaces").Where(qb.Eq{"id": id}).RunWith(db).QueryRow() +func (db *DB) GetNamespace(conn Queryable, id string) (Namespace, error) { + query, args := qb.Select("id", "name", "description", "created", "modified"). + From("namespaces").Where(qb.Eq{"id": id}).MustSql() - var name string - var description string - var created int64 - var modified int64 - err := row.Scan(&id, &name, &description, &created, &modified) + namespace := Namespace{} + err := conn.Get(&namespace, query, args...) if err != nil { if errors.Is(err, sql.ErrNoRows) { - return models.Namespace{}, ErrEntityNotFound + return Namespace{}, ErrEntityNotFound } - return models.Namespace{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + return Namespace{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } - return models.Namespace{ - ID: id, - Name: name, - Description: description, - Created: created, - Modified: modified, - }, nil + return namespace, nil } -func (db *DB) UpdateNamespace(id string, fields UpdatableNamespaceFields) error { +func (db *DB) UpdateNamespace(conn Queryable, id string, fields UpdatableNamespaceFields) error { query := qb.Update("namespaces") if fields.Name != nil { @@ -119,9 +87,9 @@ func (db *DB) UpdateNamespace(id string, fields UpdatableNamespaceFields) error query = query.Set("modified", fields.Modified) } - _, err := query.RunWith(db).Exec() + _, err := query.Where(qb.Eq{"id": id}).RunWith(conn).Exec() if err != nil { - if strings.Contains(err.Error(), "no rows in result set") { + if errors.Is(err, sql.ErrNoRows) { return ErrEntityNotFound } @@ -131,8 +99,8 @@ func (db *DB) UpdateNamespace(id string, fields UpdatableNamespaceFields) error return nil } -func (db *DB) DeleteNamespace(id string) error { - _, err := qb.Delete("namespaces").Where(qb.Eq{"id": id}).RunWith(db).Exec() +func (db *DB) DeleteNamespace(conn Queryable, id string) error { + _, err := qb.Delete("namespaces").Where(qb.Eq{"id": id}).RunWith(conn).Exec() if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil diff --git a/internal/storage/namespaces_test.go b/internal/storage/namespaces_test.go new file mode 100644 index 00000000..56b5e92e --- /dev/null +++ b/internal/storage/namespaces_test.go @@ -0,0 +1,85 @@ +package storage + +import ( + "errors" + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDNamespaces(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + namespaces, err := db.ListNamespaces(db, 0, 0) + if err != nil { + t.Fatal(err) + } + + if len(namespaces) != 1 { + t.Errorf("expected 1 element in list found %d", len(namespaces)) + } + + if diff := cmp.Diff(namespace, namespaces[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedNamespace, err := db.GetNamespace(db, namespace.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(namespace, fetchedNamespace); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + namespace.Name = "Updated Namespace" + namespace.Description = "updated namespace" + namespace.Modified = 1 + + err = db.UpdateNamespace(db, namespace.ID, UpdatableNamespaceFields{ + Name: &namespace.Name, + Description: &namespace.Description, + Modified: &namespace.Modified, + }) + if err != nil { + t.Fatal(err) + } + + fetchedNamespace, err = db.GetNamespace(db, namespace.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(namespace, fetchedNamespace); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + err = db.DeleteNamespace(db, namespace.ID) + if err != nil { + t.Fatal(err) + } + + _, err = db.GetNamespace(db, namespace.ID) + if !errors.Is(err, ErrEntityNotFound) { + t.Fatal("expected error Not Found; found alternate error") + } +} diff --git a/internal/storage/objectStorePipelineKeys.go b/internal/storage/objectStorePipelineKeys.go index ee449141..4413fe9b 100644 --- a/internal/storage/objectStorePipelineKeys.go +++ b/internal/storage/objectStorePipelineKeys.go @@ -7,51 +7,33 @@ import ( "strings" qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" ) -func (db *DB) ListObjectStorePipelineKeys(namespace, pipeline string) ([]models.ObjectStoreKey, error) { - rows, err := qb.Select("key", "created"). +type ObjectStorePipelineKey struct { + Namespace string + Pipeline string + Key string + Created int64 +} + +func (db *DB) ListObjectStorePipelineKeys(conn Queryable, namespace, pipeline string) ([]ObjectStorePipelineKey, error) { + query, args := qb.Select("namespace", "pipeline", "key", "created"). From("object_store_pipeline_keys"). OrderBy("created ASC"). // oldest first - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}).RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - pipelineKeys := []models.ObjectStoreKey{} + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}).MustSql() - for rows.Next() { - var key string - var created int64 - - err = rows.Scan(&key, &created) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - pipelineKeys = append(pipelineKeys, models.ObjectStoreKey{ - Key: key, - Created: created, - }) - - } - err = rows.Err() + keys := []ObjectStorePipelineKey{} + err := conn.Select(&keys, query, args...) if err != nil { return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } - return pipelineKeys, nil + return keys, nil } -func (db *DB) InsertObjectStorePipelineKey(namespace, pipeline string, objectKey *models.ObjectStoreKey) error { +func (db *DB) InsertObjectStorePipelineKey(conn Queryable, objectKey *ObjectStorePipelineKey) error { _, err := qb.Insert("object_store_pipeline_keys").Columns("namespace", "pipeline", "key", "created").Values( - namespace, pipeline, objectKey.Key, objectKey.Created).RunWith(db).Exec() + objectKey.Namespace, objectKey.Pipeline, objectKey.Key, objectKey.Created).RunWith(conn).Exec() if err != nil { if strings.Contains(err.Error(), "UNIQUE constraint failed") { return ErrEntityExists @@ -63,8 +45,9 @@ func (db *DB) InsertObjectStorePipelineKey(namespace, pipeline string, objectKey return nil } -func (db *DB) DeleteObjectStorePipelineKey(namespace, pipeline string, key string) error { - _, err := qb.Delete("object_store_pipeline_keys").Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "key": key}).RunWith(db).Exec() +func (db *DB) DeleteObjectStorePipelineKey(conn Queryable, namespace, pipeline, key string) error { + _, err := qb.Delete("object_store_pipeline_keys"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "key": key}).RunWith(conn).Exec() if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil diff --git a/internal/storage/objectStorePipelineKeys_test.go b/internal/storage/objectStorePipelineKeys_test.go new file mode 100644 index 00000000..14773f55 --- /dev/null +++ b/internal/storage/objectStorePipelineKeys_test.go @@ -0,0 +1,68 @@ +package storage + +import ( + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDObjectStorePipelineKeys(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + key := ObjectStorePipelineKey{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Key: "test_key", + Created: 0, + } + + err = db.InsertObjectStorePipelineKey(db, &key) + if err != nil { + t.Fatal(err) + } + + keys, err := db.ListObjectStorePipelineKeys(db, "test_namespace", "test_pipeline") + if err != nil { + t.Fatal(err) + } + + if len(keys) != 1 { + t.Errorf("expected 1 element in list found %d", len(keys)) + } + + if diff := cmp.Diff(key, keys[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } +} diff --git a/internal/storage/objectStoreRunKeys.go b/internal/storage/objectStoreRunKeys.go index 404c43d6..90c6c5b8 100644 --- a/internal/storage/objectStoreRunKeys.go +++ b/internal/storage/objectStoreRunKeys.go @@ -7,51 +7,36 @@ import ( "strings" qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" ) -func (db *DB) ListObjectStoreRunKeys(namespace, pipeline string, run int64) ([]models.ObjectStoreKey, error) { - rows, err := qb.Select("key", "created"). +type ObjectStoreRunKey struct { + Namespace string + Pipeline string + Run int64 + Key string + Created int64 +} + +func (db *DB) ListObjectStoreRunKeys(conn Queryable, namespace, pipeline string, run int64) ([]ObjectStoreRunKey, error) { + query, args := qb.Select("namespace", "pipeline", "run", "key", "created"). From("object_store_run_keys"). OrderBy("created ASC"). // oldest first - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "run": run}).RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - runKeys := []models.ObjectStoreKey{} + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "run": run}).MustSql() - for rows.Next() { - var key string - var created int64 - - err = rows.Scan(&key, &created) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - runKeys = append(runKeys, models.ObjectStoreKey{ - Key: key, - Created: created, - }) - - } - err = rows.Err() + keys := []ObjectStoreRunKey{} + err := conn.Select(&keys, query, args...) if err != nil { return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } - return runKeys, nil + return keys, nil } -func (db *DB) InsertObjectStoreRunKey(namespace, pipeline string, run int64, objectKey *models.ObjectStoreKey) error { - _, err := qb.Insert("object_store_run_keys").Columns("namespace", "pipeline", "run", "key", "created").Values( - namespace, pipeline, run, objectKey.Key, objectKey.Created).RunWith(db).Exec() +func (db *DB) InsertObjectStoreRunKey(conn Queryable, objectKey *ObjectStoreRunKey) error { + _, err := qb.Insert("object_store_run_keys"). + Columns("namespace", "pipeline", "run", "key", "created").Values( + objectKey.Namespace, objectKey.Pipeline, objectKey.Run, objectKey.Key, objectKey.Created). + RunWith(conn).Exec() if err != nil { if strings.Contains(err.Error(), "UNIQUE constraint failed") { return ErrEntityExists @@ -63,9 +48,9 @@ func (db *DB) InsertObjectStoreRunKey(namespace, pipeline string, run int64, obj return nil } -func (db *DB) DeleteObjectStoreRunKey(namespace, pipeline string, run int64, key string) error { +func (db *DB) DeleteObjectStoreRunKey(conn Queryable, namespace, pipeline string, run int64, key string) error { _, err := qb.Delete("object_store_run_keys"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "run": run, "key": key}).RunWith(db).Exec() + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "run": run, "key": key}).RunWith(conn).Exec() if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil diff --git a/internal/storage/objectStoreRunKeys_test.go b/internal/storage/objectStoreRunKeys_test.go new file mode 100644 index 00000000..2f3c8cf7 --- /dev/null +++ b/internal/storage/objectStoreRunKeys_test.go @@ -0,0 +1,103 @@ +package storage + +import ( + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDObjectStoreRunKeys(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + config := PipelineConfig{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Version: 0, + Registered: 0, + Deprecated: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineConfig(db, &config) + if err != nil { + t.Fatal(err) + } + + run := PipelineRun{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + PipelineConfigVersion: 0, + ID: 1, + Started: 0, + Ended: 0, + State: "STATE_STRING", + Status: "STATUS_STRING", + StatusReason: "STATUS_REASON_STRING", + Trigger: "TRIGGER_STRING", + Variables: "VARIABLES_STRING", + StoreObjectsExpired: false, + } + + err = db.InsertPipelineRun(db, &run) + if err != nil { + t.Fatal(err) + } + + key := ObjectStoreRunKey{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Run: 1, + Key: "test_key", + Created: 0, + } + + err = db.InsertObjectStoreRunKey(db, &key) + if err != nil { + t.Fatal(err) + } + + keys, err := db.ListObjectStoreRunKeys(db, "test_namespace", "test_pipeline", 1) + if err != nil { + t.Fatal(err) + } + + if len(keys) != 1 { + t.Errorf("expected 1 element in list found %d", len(keys)) + } + + if diff := cmp.Diff(key, keys[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } +} diff --git a/internal/storage/pipelineCommonTaskSettings.go b/internal/storage/pipelineCommonTaskSettings.go new file mode 100644 index 00000000..5923a10e --- /dev/null +++ b/internal/storage/pipelineCommonTaskSettings.go @@ -0,0 +1,83 @@ +package storage + +import ( + "database/sql" + "errors" + "fmt" + "strings" + + qb "github.com/Masterminds/squirrel" +) + +type PipelineCommonTaskSettings struct { + Namespace string + Pipeline string + PipelineConfigVersion int64 `db:"pipeline_config_version"` + Name string + Label string + Description string + DependsOn string `db:"depends_on"` + Settings string + InjectAPIToken bool `db:"inject_api_token"` +} + +func (db *DB) ListPipelineCommonTaskSettings(conn Queryable, namespace, pipeline string, version int64) ( + []PipelineCommonTaskSettings, error, +) { + query, args := qb.Select("namespace", "pipeline", "pipeline_config_version", "name", "label", "description", + "depends_on", "settings", "inject_api_token"). + From("pipeline_common_task_settings"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "pipeline_config_version": version}). + MustSql() + + commonTasks := []PipelineCommonTaskSettings{} + err := conn.Select(&commonTasks, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return commonTasks, nil +} + +func (db *DB) InsertPipelineCommonTaskSettings(conn Queryable, settings *PipelineCommonTaskSettings) error { + _, err := qb.Insert("pipeline_common_task_settings"). + Columns("namespace", "pipeline", "pipeline_config_version", "name", "label", "description", + "depends_on", "settings", "inject_api_token").Values( + settings.Namespace, settings.Pipeline, settings.PipelineConfigVersion, settings.Name, + settings.Label, settings.Description, settings.DependsOn, settings.Settings, settings.InjectAPIToken). + RunWith(conn).Exec() + if err != nil { + if strings.Contains(err.Error(), "UNIQUE constraint failed") { + return ErrEntityExists + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) GetPipelineCommonTaskSettings(conn Queryable, namespace, pipeline string, version int64, label string) ( + PipelineCommonTaskSettings, error, +) { + query, args := qb.Select("namespace", "pipeline", "pipeline_config_version", "name", "label", "description", + "depends_on", "settings", "inject_api_token"). + From("pipeline_common_task_settings").Where(qb.Eq{ + "namespace": namespace, + "pipeline": pipeline, + "pipeline_config_version": version, + "label": label, + }).MustSql() + + settings := PipelineCommonTaskSettings{} + err := conn.Get(&settings, query, args...) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return PipelineCommonTaskSettings{}, ErrEntityNotFound + } + + return PipelineCommonTaskSettings{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return settings, nil +} diff --git a/internal/storage/pipelineCommonTaskSettings_test.go b/internal/storage/pipelineCommonTaskSettings_test.go new file mode 100644 index 00000000..207be0fa --- /dev/null +++ b/internal/storage/pipelineCommonTaskSettings_test.go @@ -0,0 +1,97 @@ +package storage + +import ( + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDPipelineCommonTaskSettings(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + config := PipelineConfig{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Version: 0, + Registered: 0, + Deprecated: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineConfig(db, &config) + if err != nil { + t.Fatal(err) + } + + settings := PipelineCommonTaskSettings{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + PipelineConfigVersion: 0, + Description: "test_description", + DependsOn: "test_depends_on", + Name: "test_common_task_settings_name", + Label: "test_common_task_settings_label", + Settings: "test_settings", + InjectAPIToken: true, + } + + err = db.InsertPipelineCommonTaskSettings(db, &settings) + if err != nil { + t.Fatal(err) + } + + settingsList, err := db.ListPipelineCommonTaskSettings(db, pipeline.Namespace, pipeline.ID, config.Version) + if err != nil { + t.Fatal(err) + } + + if len(settingsList) != 1 { + t.Errorf("expected 1 element in list found %d", len(settingsList)) + } + + if diff := cmp.Diff(settings, settingsList[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedSettings, err := db.GetPipelineCommonTaskSettings(db, namespace.ID, pipeline.ID, config.Version, + settings.Label) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(settings, fetchedSettings); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } +} diff --git a/internal/storage/pipelineConfigs.go b/internal/storage/pipelineConfigs.go new file mode 100644 index 00000000..9d2916d0 --- /dev/null +++ b/internal/storage/pipelineConfigs.go @@ -0,0 +1,169 @@ +package storage + +import ( + "database/sql" + "errors" + "fmt" + "strings" + + qb "github.com/Masterminds/squirrel" +) + +type PipelineConfig struct { + Namespace string + Pipeline string + Version int64 + Parallelism int64 + Name string + Description string + Registered int64 + Deprecated int64 + State string +} + +type UpdatablePipelineConfigFields struct { + Deprecated *int64 + State *string +} + +func (db *DB) ListPipelineConfigs(conn Queryable, offset, limit int, namespace, pipeline string) ([]PipelineConfig, error) { + if limit == 0 || limit > db.maxResultsLimit { + limit = db.maxResultsLimit + } + + query, args := qb.Select("namespace", "pipeline", "version", "parallelism", "name", "description", "registered", + "deprecated", "state"). + From("pipeline_configs"). + OrderBy("version DESC"). + Limit(uint64(limit)). + Offset(uint64(offset)). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}). + MustSql() + + pipelineConfigs := []PipelineConfig{} + err := conn.Select(&pipelineConfigs, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return pipelineConfigs, nil +} + +func (db *DB) ListLivePipelineConfigs(conn Queryable, offset, limit int, namespace, pipeline string) ([]PipelineConfig, error) { + if limit == 0 || limit > db.maxResultsLimit { + limit = db.maxResultsLimit + } + + query, args := qb.Select("namespace", "pipeline", "version", "parallelism", "name", "description", "registered", + "deprecated", "state"). + From("pipeline_configs"). + OrderBy("version DESC"). + Limit(uint64(limit)). + Offset(uint64(offset)). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "state": "LIVE"}). + MustSql() + + pipelineConfigs := []PipelineConfig{} + err := conn.Select(&pipelineConfigs, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return pipelineConfigs, nil +} + +func (db *DB) InsertPipelineConfig(conn Queryable, config *PipelineConfig) error { + _, err := qb.Insert("pipeline_configs").Columns("namespace", "pipeline", "version", "parallelism", "name", + "description", "registered", "deprecated", "state"). + Values(config.Namespace, config.Pipeline, config.Version, config.Parallelism, config.Name, + config.Description, config.Registered, config.Deprecated, config.State). + RunWith(conn).Exec() + if err != nil { + if strings.Contains(err.Error(), "UNIQUE constraint failed") { + return ErrEntityExists + } + + return fmt.Errorf("database error occurred; could not insert pipeline to DB: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) GetPipelineConfig(conn Queryable, namespace, pipeline string, version int64) (PipelineConfig, error) { + query, args := qb.Select("namespace", "pipeline", "version", "parallelism", "name", "description", "registered", "deprecated", "state"). + From("pipeline_configs").Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "version": version}). + MustSql() + + config := PipelineConfig{} + err := conn.Get(&config, query, args...) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return PipelineConfig{}, ErrEntityNotFound + } + + return PipelineConfig{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return config, nil +} + +func (db *DB) GetCurrentPipelineConfig(conn Queryable, namespace, pipeline string) (PipelineConfig, error) { + query, args := qb.Select("namespace", "pipeline", "version", "parallelism", "name", "description", "registered", + "deprecated", "state"). + From("pipeline_configs"). + OrderBy("version DESC"). + Limit(1). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}). + MustSql() + + pipelineConfigs := []PipelineConfig{} + err := conn.Select(&pipelineConfigs, query, args...) + if err != nil { + return PipelineConfig{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + if len(pipelineConfigs) != 1 { + return PipelineConfig{}, ErrEntityNotFound + } + + return pipelineConfigs[0], nil +} + +func (db *DB) UpdatePipelineConfig(conn Queryable, namespace, pipeline string, version int64, + fields UpdatablePipelineConfigFields, +) error { + query := qb.Update("pipeline_configs") + + if fields.Deprecated != nil { + query = query.Set("deprecated", fields.Deprecated) + } + + if fields.State != nil { + query = query.Set("state", fields.State) + } + + _, err := query.Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "version": version}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return ErrEntityNotFound + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) DeletePipelineConfig(conn Queryable, namespace, pipeline string, version int64) error { + _, err := qb.Delete("pipeline_configs"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "version": version}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return nil + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} diff --git a/internal/storage/pipelineConfigs_test.go b/internal/storage/pipelineConfigs_test.go new file mode 100644 index 00000000..9ca8bbe4 --- /dev/null +++ b/internal/storage/pipelineConfigs_test.go @@ -0,0 +1,136 @@ +package storage + +import ( + "errors" + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDPipelineConfigs(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + config := PipelineConfig{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Parallelism: 0, + Name: "test Name", + Description: "test description", + Version: 0, + Registered: 0, + Deprecated: 0, + State: "LIVE", + } + + err = db.InsertPipelineConfig(db, &config) + if err != nil { + t.Fatal(err) + } + + configs, err := db.ListPipelineConfigs(db, 0, 0, pipeline.Namespace, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + if len(configs) != 1 { + t.Errorf("expected 1 element in list found %d", len(configs)) + } + + if diff := cmp.Diff(config, configs[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + configs, err = db.ListLivePipelineConfigs(db, 0, 0, pipeline.Namespace, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + if len(configs) != 1 { + t.Errorf("expected 1 element in list found %d", len(configs)) + } + + if diff := cmp.Diff(config, configs[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedConfig, err := db.GetPipelineConfig(db, namespace.ID, pipeline.ID, config.Version) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(config, fetchedConfig); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedConfig, err = db.GetCurrentPipelineConfig(db, namespace.ID, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(config, fetchedConfig); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedConfig.Deprecated = 1 + fetchedConfig.State = "DISABLED" + + err = db.UpdatePipelineConfig(db, namespace.ID, pipeline.ID, config.Version, + UpdatablePipelineConfigFields{ + Deprecated: &fetchedConfig.Deprecated, + State: &fetchedConfig.State, + }) + if err != nil { + t.Fatal(err) + } + + updatedConfig, err := db.GetPipelineConfig(db, namespace.ID, pipeline.ID, config.Version) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(fetchedConfig, updatedConfig); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + err = db.DeletePipelineConfig(db, namespace.ID, pipeline.ID, config.Version) + if err != nil { + t.Fatal(err) + } + + _, err = db.GetPipelineConfig(db, namespace.ID, pipeline.ID, config.Version) + if !errors.Is(err, ErrEntityNotFound) { + t.Fatal("expected error Not Found; found alternate error") + } +} diff --git a/internal/storage/pipelineCustomTasks.go b/internal/storage/pipelineCustomTasks.go new file mode 100644 index 00000000..73185884 --- /dev/null +++ b/internal/storage/pipelineCustomTasks.go @@ -0,0 +1,85 @@ +package storage + +import ( + "database/sql" + "errors" + "fmt" + "strings" + + qb "github.com/Masterminds/squirrel" +) + +type PipelineCustomTask struct { + Namespace string + Pipeline string + PipelineConfigVersion int64 `db:"pipeline_config_version"` + ID string + Description string + Image string + RegistryAuth string `db:"registry_auth"` + DependsOn string `db:"depends_on"` + Variables string + Entrypoint string + Command string + InjectAPIToken bool `db:"inject_api_token"` +} + +func (db *DB) ListPipelineCustomTasks(conn Queryable, namespace, pipeline string, version int64) ([]PipelineCustomTask, error) { + query, args := qb.Select("namespace", "pipeline", "pipeline_config_version", "id", "description", + "image", "registry_auth", "depends_on", "variables", "entrypoint", "command", "inject_api_token"). + From("pipeline_custom_tasks"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "pipeline_config_version": version}). + MustSql() + + customTasks := []PipelineCustomTask{} + err := conn.Select(&customTasks, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return customTasks, nil +} + +func (db *DB) InsertPipelineCustomTask(conn Queryable, task *PipelineCustomTask) error { + _, err := qb.Insert("pipeline_custom_tasks"). + Columns("namespace", "pipeline", "pipeline_config_version", "id", "description", "image", + "registry_auth", "depends_on", "variables", "entrypoint", "command", "inject_api_token").Values( + task.Namespace, task.Pipeline, task.PipelineConfigVersion, task.ID, task.Description, + task.Image, task.RegistryAuth, task.DependsOn, task.Variables, task.Entrypoint, task.Command, + task.InjectAPIToken, + ).RunWith(conn).Exec() + if err != nil { + if strings.Contains(err.Error(), "UNIQUE constraint failed") { + return ErrEntityExists + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) GetPipelineCustomTask(conn Queryable, namespace, pipeline string, version int64, id string) ( + PipelineCustomTask, error, +) { + query, args := qb.Select("namespace", "pipeline", "pipeline_config_version", "id", "description", "image", + "registry_auth", "depends_on", "variables", "entrypoint", "command", "inject_api_token"). + From("pipeline_custom_tasks").Where(qb.Eq{ + "namespace": namespace, + "pipeline": pipeline, + "pipeline_config_version": version, + "id": id, + }).MustSql() + + task := PipelineCustomTask{} + err := conn.Get(&task, query, args...) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return PipelineCustomTask{}, ErrEntityNotFound + } + + return PipelineCustomTask{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return task, nil +} diff --git a/internal/storage/pipelineCustomTasks_test.go b/internal/storage/pipelineCustomTasks_test.go new file mode 100644 index 00000000..b356301c --- /dev/null +++ b/internal/storage/pipelineCustomTasks_test.go @@ -0,0 +1,100 @@ +package storage + +import ( + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDPipelineCustomTasks(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + config := PipelineConfig{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Version: 0, + Registered: 0, + Deprecated: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineConfig(db, &config) + if err != nil { + t.Fatal(err) + } + + task := PipelineCustomTask{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + PipelineConfigVersion: 0, + ID: "test_task", + Description: "test description", + Image: "test", + RegistryAuth: "auth string", + DependsOn: "depends on list", + Variables: "variable list", + Entrypoint: "entrypoint list", + Command: "command list", + InjectAPIToken: true, + } + + err = db.InsertPipelineCustomTask(db, &task) + if err != nil { + t.Fatal(err) + } + + taskList, err := db.ListPipelineCustomTasks(db, pipeline.Namespace, pipeline.ID, config.Version) + if err != nil { + t.Fatal(err) + } + + if len(taskList) != 1 { + t.Errorf("expected 1 element in list found %d", len(taskList)) + } + + if diff := cmp.Diff(task, taskList[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedTask, err := db.GetPipelineCustomTask(db, namespace.ID, pipeline.ID, config.Version, + task.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(task, fetchedTask); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } +} diff --git a/internal/storage/pipelineDeployments.go b/internal/storage/pipelineDeployments.go new file mode 100644 index 00000000..5fbf6f50 --- /dev/null +++ b/internal/storage/pipelineDeployments.go @@ -0,0 +1,170 @@ +package storage + +import ( + "database/sql" + "errors" + "fmt" + "strings" + + qb "github.com/Masterminds/squirrel" +) + +type PipelineDeployment struct { + Namespace string + Pipeline string + ID int64 + StartVersion int64 `db:"start_version"` + EndVersion int64 `db:"end_version"` + Started int64 + Ended int64 + State string + Status string + StatusReason string `db:"status_reason"` + Logs string +} + +type UpdatablePipelineDeploymentFields struct { + Ended *int64 + State *string + Status *string + StatusReason *string + Logs *string +} + +func (db *DB) ListPipelineDeployments(conn Queryable, offset, limit int, namespace, pipeline string) ( + []PipelineDeployment, error, +) { + if limit == 0 || limit > db.maxResultsLimit { + limit = db.maxResultsLimit + } + + query, args := qb.Select("namespace", "pipeline", "id", "start_version", "end_version", "started", "ended", + "state", "status", "status_reason", "logs"). + From("pipeline_deployments"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}). + OrderBy("id DESC"). + Limit(uint64(limit)). + Offset(uint64(offset)).MustSql() + + deployments := []PipelineDeployment{} + err := conn.Select(&deployments, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return deployments, nil +} + +func (db *DB) ListRunningPipelineDeployments(conn Queryable, offset, limit int, namespace, pipeline string) ( + []PipelineDeployment, error, +) { + if limit == 0 || limit > db.maxResultsLimit { + limit = db.maxResultsLimit + } + + query, args := qb.Select("namespace", "pipeline", "id", "start_version", "end_version", "started", "ended", + "state", "status", "status_reason", "logs"). + From("pipeline_deployments"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "state": "RUNNING"}). + OrderBy("id DESC"). + Limit(uint64(limit)). + Offset(uint64(offset)).MustSql() + + deployments := []PipelineDeployment{} + err := conn.Select(&deployments, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return deployments, nil +} + +func (db *DB) InsertPipelineDeployment(conn Queryable, deployment *PipelineDeployment) error { + _, err := qb.Insert("pipeline_deployments").Columns("namespace", "pipeline", "id", "start_version", "end_version", + "started", "ended", "state", "status", "status_reason", "logs").Values( + deployment.Namespace, deployment.Pipeline, deployment.ID, deployment.StartVersion, deployment.EndVersion, + deployment.Started, deployment.Ended, deployment.State, deployment.Status, deployment.StatusReason, + deployment.Logs, + ).RunWith(conn).Exec() + if err != nil { + if strings.Contains(err.Error(), "UNIQUE constraint failed") { + return ErrEntityExists + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) GetPipelineDeployment(conn Queryable, namespace, pipeline string, id int64) ( + PipelineDeployment, error, +) { + query, args := qb.Select("namespace", "pipeline", "id", "start_version", "end_version", + "started", "ended", "state", "status", "status_reason", "logs"). + From("pipeline_deployments"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "id": id}).MustSql() + + deployment := PipelineDeployment{} + err := conn.Get(&deployment, query, args...) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return PipelineDeployment{}, ErrEntityNotFound + } + + return PipelineDeployment{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return deployment, nil +} + +func (db *DB) UpdatePipelineDeployment(conn Queryable, namespace, pipeline string, id int64, + fields UpdatablePipelineDeploymentFields, +) error { + query := qb.Update("pipeline_deployments") + + if fields.Ended != nil { + query = query.Set("ended", fields.Ended) + } + + if fields.State != nil { + query = query.Set("state", fields.State) + } + + if fields.Status != nil { + query = query.Set("status", fields.Status) + } + + if fields.StatusReason != nil { + query = query.Set("status_reason", fields.StatusReason) + } + + if fields.Logs != nil { + query = query.Set("logs", fields.Logs) + } + + _, err := query.Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "id": id}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return ErrEntityNotFound + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) DeletePipelineDeployment(conn Queryable, namespace, pipeline string, id int64) error { + _, err := qb.Delete("pipeline_deployments").Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "id": id}). + RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return nil + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} diff --git a/internal/storage/pipelineDeployments_test.go b/internal/storage/pipelineDeployments_test.go new file mode 100644 index 00000000..3c24a64d --- /dev/null +++ b/internal/storage/pipelineDeployments_test.go @@ -0,0 +1,135 @@ +package storage + +import ( + "errors" + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDPipelineDeployments(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + deployment := PipelineDeployment{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + ID: 0, + StartVersion: 0, + EndVersion: 1, + Started: 0, + Ended: 0, + State: "RUNNING", + Status: "ACTIVE", + StatusReason: "REASON", + Logs: "LOGS", + } + + err = db.InsertPipelineDeployment(db, &deployment) + if err != nil { + t.Fatal(err) + } + + deployments, err := db.ListPipelineDeployments(db, 0, 0, pipeline.Namespace, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + if len(deployments) != 1 { + t.Errorf("expected 1 element in list found %d", len(deployments)) + } + + if diff := cmp.Diff(deployment, deployments[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + deployments, err = db.ListRunningPipelineDeployments(db, 0, 0, pipeline.Namespace, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + if len(deployments) != 1 { + t.Errorf("expected 1 element in list found %d", len(deployments)) + } + + if diff := cmp.Diff(deployment, deployments[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedDeployment, err := db.GetPipelineDeployment(db, namespace.ID, pipeline.ID, deployment.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(deployment, fetchedDeployment); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedDeployment.Ended = 4 + fetchedDeployment.State = "DISABLED" + fetchedDeployment.Status = "UPDATED_STATUS" + fetchedDeployment.StatusReason = "UPDATED_STATUS_REASON" + fetchedDeployment.Logs = "UPDATED_LOGS" + + err = db.UpdatePipelineDeployment(db, namespace.ID, pipeline.ID, deployment.ID, + UpdatablePipelineDeploymentFields{ + Ended: &fetchedDeployment.Ended, + State: &fetchedDeployment.State, + Status: &fetchedDeployment.Status, + StatusReason: &fetchedDeployment.StatusReason, + Logs: &fetchedDeployment.Logs, + }) + if err != nil { + t.Fatal(err) + } + + updatedDeployment, err := db.GetPipelineDeployment(db, namespace.ID, pipeline.ID, deployment.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(fetchedDeployment, updatedDeployment); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + err = db.DeletePipelineDeployment(db, namespace.ID, pipeline.ID, deployment.ID) + if err != nil { + t.Fatal(err) + } + + _, err = db.GetPipelineDeployment(db, namespace.ID, pipeline.ID, deployment.ID) + if !errors.Is(err, ErrEntityNotFound) { + t.Fatal("expected error Not Found; found alternate error") + } +} diff --git a/internal/storage/pipelineMetadata.go b/internal/storage/pipelineMetadata.go new file mode 100644 index 00000000..d4afe477 --- /dev/null +++ b/internal/storage/pipelineMetadata.go @@ -0,0 +1,114 @@ +package storage + +import ( + "database/sql" + "errors" + "fmt" + "strings" + + qb "github.com/Masterminds/squirrel" +) + +type PipelineMetadata struct { + Namespace string + ID string + Created int64 + Modified int64 + State string +} + +type UpdatablePipelineMetadataFields struct { + Modified *int64 + State *string +} + +// Returns pipelines ordered by id. +func (db *DB) ListPipelineMetadata(conn Queryable, offset, limit int, namespace string) ([]PipelineMetadata, error) { + if limit == 0 || limit > db.maxResultsLimit { + limit = db.maxResultsLimit + } + + query, args := qb.Select("namespace", "id", "created", "modified", "state"). + From("pipeline_metadata"). + OrderBy("id DESC"). + Limit(uint64(limit)). + Offset(uint64(offset)). + Where(qb.Eq{"namespace": namespace}). + MustSql() + + pipelines := []PipelineMetadata{} + err := conn.Select(&pipelines, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return pipelines, nil +} + +func (db *DB) InsertPipelineMetadata(conn Queryable, metadata *PipelineMetadata) error { + _, err := qb.Insert("pipeline_metadata").Columns("namespace", "id", "created", "modified", "state"). + Values(metadata.Namespace, metadata.ID, metadata.Created, metadata.Modified, metadata.State). + RunWith(conn).Exec() + if err != nil { + if strings.Contains(err.Error(), "UNIQUE constraint failed") { + return ErrEntityExists + } + + return fmt.Errorf("database error occurred; could not insert pipeline to DB: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) GetPipelineMetadata(conn Queryable, namespace, id string) (PipelineMetadata, error) { + query, args := qb.Select("namespace", "id", "created", "modified", "state"). + From("pipeline_metadata").Where(qb.Eq{"namespace": namespace, "id": id}).MustSql() + + metadata := PipelineMetadata{} + err := conn.Get(&metadata, query, args...) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return PipelineMetadata{}, ErrEntityNotFound + } + + return PipelineMetadata{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return metadata, nil +} + +func (db *DB) UpdatePipelineMetadata(conn Queryable, namespace, id string, fields UpdatablePipelineMetadataFields) error { + query := qb.Update("pipeline_metadata") + + if fields.Modified != nil { + query = query.Set("modified", fields.Modified) + } + + if fields.State != nil { + query = query.Set("state", fields.State) + } + + _, err := query.Where(qb.Eq{"namespace": namespace, "id": id}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return ErrEntityNotFound + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) DeletePipelineMetadata(conn Queryable, namespace, id string) error { + _, err := qb.Delete("pipeline_metadata").Where(qb.Eq{"namespace": namespace, "id": id}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return nil + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} diff --git a/internal/storage/pipelineMetadata_test.go b/internal/storage/pipelineMetadata_test.go new file mode 100644 index 00000000..c19bc4fd --- /dev/null +++ b/internal/storage/pipelineMetadata_test.go @@ -0,0 +1,97 @@ +package storage + +import ( + "errors" + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDPipelines(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + pipelines, err := db.ListPipelineMetadata(db, 0, 0, pipeline.Namespace) + if err != nil { + t.Fatal(err) + } + + if len(pipelines) != 1 { + t.Errorf("expected 1 element in list found %d", len(pipelines)) + } + + if diff := cmp.Diff(pipeline, pipelines[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedPipeline, err := db.GetPipelineMetadata(db, namespace.ID, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(pipeline, fetchedPipeline); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedPipeline.Modified = 1 + fetchedPipeline.State = "DISABLED" + + err = db.UpdatePipelineMetadata(db, namespace.ID, pipeline.ID, + UpdatablePipelineMetadataFields{ + Modified: &fetchedPipeline.Modified, + State: &fetchedPipeline.State, + }) + if err != nil { + t.Fatal(err) + } + + updatedPipeline, err := db.GetPipelineMetadata(db, namespace.ID, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(fetchedPipeline, updatedPipeline); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + err = db.DeletePipelineMetadata(db, namespace.ID, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + _, err = db.GetPipelineMetadata(db, namespace.ID, pipeline.ID) + if !errors.Is(err, ErrEntityNotFound) { + t.Fatal("expected error Not Found; found alternate error") + } +} diff --git a/internal/storage/pipelineRuns.go b/internal/storage/pipelineRuns.go new file mode 100644 index 00000000..ad6b58e8 --- /dev/null +++ b/internal/storage/pipelineRuns.go @@ -0,0 +1,166 @@ +package storage + +import ( + "database/sql" + "errors" + "fmt" + "strings" + + qb "github.com/Masterminds/squirrel" +) + +type PipelineRun struct { + Namespace string + Pipeline string + PipelineConfigVersion int64 `db:"pipeline_config_version"` + ID int64 + Started int64 + Ended int64 + State string + Status string + StatusReason string `db:"status_reason"` + Trigger string + Variables string + StoreObjectsExpired bool `db:"store_objects_expired"` +} + +type UpdatablePipelineRunFields struct { + Ended *int64 + State *string + Status *string + StatusReason *string + Variables *string + StoreObjectsExpired *bool +} + +func (db *DB) ListPipelineRuns(conn Queryable, offset, limit int, namespace, pipeline string) ([]PipelineRun, error) { + if limit == 0 || limit > db.maxResultsLimit { + limit = db.maxResultsLimit + } + + query, args := qb.Select("namespace", "pipeline", "pipeline_config_version", "id", "started", "ended", "state", + "status", "status_reason", "trigger", "variables", "store_objects_expired"). + From("pipeline_runs"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}). + OrderBy("id DESC"). + Limit(uint64(limit)). + Offset(uint64(offset)).MustSql() + + runs := []PipelineRun{} + err := conn.Select(&runs, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return runs, nil +} + +func (db *DB) InsertPipelineRun(conn Queryable, run *PipelineRun) error { + _, err := qb.Insert("pipeline_runs").Columns("namespace", "pipeline", "pipeline_config_version", "id", "started", + "ended", "state", "status", "status_reason", "trigger", "variables", "store_objects_expired").Values( + run.Namespace, run.Pipeline, run.PipelineConfigVersion, run.ID, run.Started, run.Ended, run.State, + run.Status, run.StatusReason, run.Trigger, run.Variables, run.StoreObjectsExpired, + ).RunWith(conn).Exec() + if err != nil { + if strings.Contains(err.Error(), "UNIQUE constraint failed") { + return ErrEntityExists + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) GetPipelineRun(conn Queryable, namespace, pipeline string, id int64) (PipelineRun, error) { + query, args := qb.Select("namespace", "pipeline", "pipeline_config_version", "id", "started", "ended", "state", "status", + "status_reason", "trigger", "variables", "store_objects_expired"). + From("pipeline_runs"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "id": id}).MustSql() + + run := PipelineRun{} + err := conn.Get(&run, query, args...) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return PipelineRun{}, ErrEntityNotFound + } + + return PipelineRun{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return run, nil +} + +func (db *DB) GetLatestPipelineRun(conn Queryable, namespace, pipeline string) (PipelineRun, error) { + query, args := qb.Select("namespace", "pipeline", "pipeline_config_version", "id", "started", "ended", "state", + "status", "status_reason", "trigger", "variables", "store_objects_expired"). + From("pipeline_runs"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}). + OrderBy("id DESC"). + Limit(1).MustSql() + + runs := []PipelineRun{} + err := conn.Select(&runs, query, args...) + if err != nil { + return PipelineRun{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + if len(runs) < 1 { + return PipelineRun{}, ErrEntityNotFound + } + + return runs[0], nil +} + +func (db *DB) UpdatePipelineRun(conn Queryable, namespace, pipeline string, id int64, fields UpdatablePipelineRunFields) error { + query := qb.Update("pipeline_runs") + + if fields.Ended != nil { + query = query.Set("ended", fields.Ended) + } + + if fields.State != nil { + query = query.Set("state", fields.State) + } + + if fields.Status != nil { + query = query.Set("status", fields.Status) + } + + if fields.StatusReason != nil { + query = query.Set("status_reason", fields.StatusReason) + } + + if fields.Variables != nil { + query = query.Set("variables", fields.Variables) + } + + if fields.StoreObjectsExpired != nil { + query = query.Set("store_objects_expired", fields.StoreObjectsExpired) + } + + _, err := query.Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "id": id}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return ErrEntityNotFound + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) DeletePipelineRun(conn Queryable, namespace, pipeline string, id int64) error { + _, err := qb.Delete("pipeline_runs").Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "id": id}). + RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return nil + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} diff --git a/internal/storage/pipelineRuns_test.go b/internal/storage/pipelineRuns_test.go new file mode 100644 index 00000000..7700d4a0 --- /dev/null +++ b/internal/storage/pipelineRuns_test.go @@ -0,0 +1,148 @@ +package storage + +import ( + "errors" + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDPipelineRuns(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + config := PipelineConfig{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Version: 0, + Registered: 0, + Deprecated: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineConfig(db, &config) + if err != nil { + t.Fatal(err) + } + + run := PipelineRun{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + PipelineConfigVersion: 0, + ID: 1, + Started: 0, + Ended: 0, + State: "STATE_STRING", + Status: "STATUS_STRING", + StatusReason: "STATUS_REASON_STRING", + Trigger: "TRIGGER_STRING", + Variables: "VARIABLES_STRING", + StoreObjectsExpired: false, + } + + err = db.InsertPipelineRun(db, &run) + if err != nil { + t.Fatal(err) + } + + runs, err := db.ListPipelineRuns(db, 0, 0, pipeline.Namespace, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + if len(runs) != 1 { + t.Errorf("expected 1 element in list found %d", len(runs)) + } + + if diff := cmp.Diff(run, runs[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedRun, err := db.GetPipelineRun(db, namespace.ID, pipeline.ID, run.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(run, fetchedRun); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedRun, err = db.GetLatestPipelineRun(db, namespace.ID, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(run, fetchedRun); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedRun.Ended = 1 + fetchedRun.State = "DISABLED" + fetchedRun.Status = "UPDATED_STATUS" + fetchedRun.StatusReason = "UPDATED_STATUS_REASON" + fetchedRun.Variables = "UPDATED_VARIABLES" + fetchedRun.StoreObjectsExpired = true + + err = db.UpdatePipelineRun(db, namespace.ID, pipeline.ID, run.ID, + UpdatablePipelineRunFields{ + Ended: &fetchedRun.Ended, + State: &fetchedRun.State, + Status: &fetchedRun.Status, + StatusReason: &fetchedRun.StatusReason, + Variables: &fetchedRun.Variables, + StoreObjectsExpired: &fetchedRun.StoreObjectsExpired, + }) + if err != nil { + t.Fatal(err) + } + + updatedRun, err := db.GetPipelineRun(db, namespace.ID, pipeline.ID, run.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(fetchedRun, updatedRun); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + err = db.DeletePipelineRun(db, namespace.ID, pipeline.ID, run.ID) + if err != nil { + t.Fatal(err) + } + + _, err = db.GetPipelineRun(db, namespace.ID, pipeline.ID, run.ID) + if !errors.Is(err, ErrEntityNotFound) { + t.Fatal("expected error Not Found; found alternate error") + } +} diff --git a/internal/storage/pipelineTaskRuns.go b/internal/storage/pipelineTaskRuns.go new file mode 100644 index 00000000..dbaaf999 --- /dev/null +++ b/internal/storage/pipelineTaskRuns.go @@ -0,0 +1,167 @@ +package storage + +import ( + "database/sql" + "errors" + "fmt" + "strings" + + qb "github.com/Masterminds/squirrel" +) + +type PipelineTaskRun struct { + Namespace string + Pipeline string + Run int64 + ID string + Task string + Created int64 + Started int64 + Ended int64 + ExitCode int64 `db:"exit_code"` + LogsExpired bool `db:"logs_expired"` + LogsRemoved bool `db:"logs_removed"` + State string + Status string + StatusReason string `db:"status_reason"` + Variables string +} + +type UpdatablePipelineTaskRunFields struct { + Started *int64 + Ended *int64 + ExitCode *int64 + State *string + Status *string + StatusReason *string + LogsExpired *bool + LogsRemoved *bool + Variables *string +} + +func (db *DB) ListPipelineTaskRuns(conn Queryable, offset, limit int, namespace, pipeline string, run int64) ( + []PipelineTaskRun, error, +) { + if limit == 0 || limit > db.maxResultsLimit { + limit = db.maxResultsLimit + } + + query, args := qb.Select("namespace", "pipeline", "run", "id", "task", "created", "started", "ended", "exit_code", + "state", "status", "status_reason", "logs_expired", "logs_removed", "variables"). + From("pipeline_task_runs"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "run": run}). + Limit(uint64(limit)). + OrderBy("started ASC"). + Offset(uint64(offset)).MustSql() + + taskRuns := []PipelineTaskRun{} + err := conn.Select(&taskRuns, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return taskRuns, nil +} + +func (db *DB) InsertPipelineTaskRun(conn Queryable, taskRun *PipelineTaskRun) error { + _, err := qb.Insert("pipeline_task_runs").Columns("namespace", "pipeline", "run", "id", "created", "started", "ended", + "exit_code", "logs_expired", "logs_removed", "state", "status", "status_reason", "task", "variables").Values( + taskRun.Namespace, taskRun.Pipeline, taskRun.Run, taskRun.ID, taskRun.Created, taskRun.Started, + taskRun.Ended, taskRun.ExitCode, taskRun.LogsExpired, taskRun.LogsRemoved, taskRun.State, taskRun.Status, + taskRun.StatusReason, taskRun.Task, taskRun.Variables).RunWith(conn).Exec() + if err != nil { + if strings.Contains(err.Error(), "UNIQUE constraint failed") { + return ErrEntityExists + } + + return fmt.Errorf("database error occurred; could not insert pipeline to DB: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) GetPipelineTaskRun(conn Queryable, namespace, pipeline string, run int64, id string) (PipelineTaskRun, error) { + query, args := qb.Select("namespace", "pipeline", "run", "id", "task", "created", "started", "ended", "exit_code", + "state", "status", "status_reason", "logs_expired", "logs_removed", "variables"). + From("pipeline_task_runs"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "run": run, "id": id}).MustSql() + + taskRun := PipelineTaskRun{} + err := conn.Get(&taskRun, query, args...) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return PipelineTaskRun{}, ErrEntityNotFound + } + + return PipelineTaskRun{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return taskRun, nil +} + +func (db *DB) UpdatePipelineTaskRun(conn Queryable, namespace, pipeline string, run int64, id string, fields UpdatablePipelineTaskRunFields) error { + query := qb.Update("pipeline_task_runs") + + if fields.Started != nil { + query = query.Set("started", fields.Started) + } + + if fields.Ended != nil { + query = query.Set("ended", fields.Ended) + } + + if fields.ExitCode != nil { + query = query.Set("exit_code", fields.ExitCode) + } + + if fields.State != nil { + query = query.Set("state", fields.State) + } + + if fields.Status != nil { + query = query.Set("status", fields.Status) + } + + if fields.StatusReason != nil { + query = query.Set("status_reason", fields.StatusReason) + } + + if fields.LogsExpired != nil { + query = query.Set("logs_expired", fields.LogsExpired) + } + + if fields.LogsRemoved != nil { + query = query.Set("logs_removed", fields.LogsRemoved) + } + + if fields.Variables != nil { + query = query.Set("variables", fields.Variables) + } + + _, err := query.Where(qb.Eq{ + "namespace": namespace, "pipeline": pipeline, "run": run, "id": id, + }).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return ErrEntityNotFound + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) DeletePipelineTaskRun(conn Queryable, namespace, pipeline string, run int64, id string) error { + _, err := qb.Delete("pipeline_task_runs"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "run": run, "id": id}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return nil + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} diff --git a/internal/storage/pipelineTaskRuns_test.go b/internal/storage/pipelineTaskRuns_test.go new file mode 100644 index 00000000..fb2b7fff --- /dev/null +++ b/internal/storage/pipelineTaskRuns_test.go @@ -0,0 +1,162 @@ +package storage + +import ( + "errors" + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDPipelineTaskRuns(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + config := PipelineConfig{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Version: 0, + Registered: 0, + Deprecated: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineConfig(db, &config) + if err != nil { + t.Fatal(err) + } + + run := PipelineRun{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + PipelineConfigVersion: 0, + ID: 1, + Started: 0, + Ended: 0, + State: "STATE_STRING", + Status: "STATUS_STRING", + StatusReason: "STATUS_REASON_STRING", + Trigger: "TRIGGER_STRING", + Variables: "VARIABLES_STRING", + StoreObjectsExpired: false, + } + + err = db.InsertPipelineRun(db, &run) + if err != nil { + t.Fatal(err) + } + + taskRun := PipelineTaskRun{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Run: 1, + ID: "test_task_run", + Task: "TASK_STRING", + Created: 0, + Started: 0, + Ended: 0, + ExitCode: 0, + LogsExpired: true, + LogsRemoved: true, + State: "STATE_STRING", + Status: "STATUS_STRING", + StatusReason: "STATUS_REASON_STRING", + Variables: "VARIABLES_STRING", + } + + err = db.InsertPipelineTaskRun(db, &taskRun) + if err != nil { + t.Fatal(err) + } + + taskRuns, err := db.ListPipelineTaskRuns(db, 0, 0, pipeline.Namespace, pipeline.ID, run.ID) + if err != nil { + t.Fatal(err) + } + + if len(taskRuns) != 1 { + t.Errorf("expected 1 element in list found %d", len(taskRuns)) + } + + if diff := cmp.Diff(taskRun, taskRuns[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedRun, err := db.GetPipelineTaskRun(db, namespace.ID, pipeline.ID, run.ID, taskRun.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(taskRun, fetchedRun); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedRun.Ended = 1 + fetchedRun.State = "DISABLED" + fetchedRun.Status = "UPDATED_STATUS" + fetchedRun.StatusReason = "UPDATED_STATUS_REASON" + fetchedRun.Variables = "UPDATED_VARIABLES" + fetchedRun.LogsExpired = false + + err = db.UpdatePipelineTaskRun(db, namespace.ID, pipeline.ID, run.ID, taskRun.ID, + UpdatablePipelineTaskRunFields{ + Ended: &fetchedRun.Ended, + State: &fetchedRun.State, + Status: &fetchedRun.Status, + StatusReason: &fetchedRun.StatusReason, + Variables: &fetchedRun.Variables, + LogsExpired: &fetchedRun.LogsExpired, + }) + if err != nil { + t.Fatal(err) + } + + updatedRun, err := db.GetPipelineTaskRun(db, namespace.ID, pipeline.ID, run.ID, taskRun.ID) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(fetchedRun, updatedRun); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + err = db.DeletePipelineTaskRun(db, namespace.ID, pipeline.ID, run.ID, taskRun.ID) + if err != nil { + t.Fatal(err) + } + + _, err = db.GetPipelineTaskRun(db, namespace.ID, pipeline.ID, run.ID, taskRun.ID) + if !errors.Is(err, ErrEntityNotFound) { + t.Fatal("expected error Not Found; found alternate error") + } +} diff --git a/internal/storage/pipelineTriggerSubscriptions.go b/internal/storage/pipelineTriggerSubscriptions.go new file mode 100644 index 00000000..de904217 --- /dev/null +++ b/internal/storage/pipelineTriggerSubscriptions.go @@ -0,0 +1,122 @@ +package storage + +import ( + "database/sql" + "errors" + "fmt" + "strings" + + qb "github.com/Masterminds/squirrel" +) + +type PipelineTriggerSubscription struct { + Namespace string + Pipeline string + Name string + Label string + Settings string + Status string + StatusReason string `db:"status_reason"` +} + +type UpdateablePipelineTriggerSubscriptionFields struct { + Settings *string + Status *string + StatusReason *string +} + +func (db *DB) ListPipelineTriggerSubscriptions(conn Queryable, namespace, pipeline string) ([]PipelineTriggerSubscription, error) { + query, args := qb.Select("namespace", "pipeline", "name", "label", "settings", "status", "status_reason"). + From("pipeline_trigger_subscriptions"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}). + MustSql() + + triggers := []PipelineTriggerSubscription{} + err := conn.Select(&triggers, query, args...) + if err != nil { + return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return triggers, nil +} + +func (db *DB) InsertPipelineTriggerSubscription(conn Queryable, sub *PipelineTriggerSubscription) error { + _, err := qb.Insert("pipeline_trigger_subscriptions"). + Columns("namespace", "pipeline", "name", "label", "settings", "status", "status_reason").Values( + sub.Namespace, sub.Pipeline, sub.Name, sub.Label, sub.Settings, + sub.Status, sub.StatusReason, + ).RunWith(conn).Exec() + if err != nil { + if strings.Contains(err.Error(), "UNIQUE constraint failed") { + return ErrEntityExists + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) GetPipelineTriggerSubscription(conn Queryable, namespace, pipeline, name, label string) ( + PipelineTriggerSubscription, error, +) { + query, args := qb.Select("namespace", "pipeline", "name", "label", "settings", "status", "status_reason"). + From("pipeline_trigger_subscriptions").Where(qb.Eq{ + "namespace": namespace, "pipeline": pipeline, "name": name, "label": label, + }).MustSql() + + sub := PipelineTriggerSubscription{} + err := conn.Get(&sub, query, args...) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return PipelineTriggerSubscription{}, ErrEntityNotFound + } + + return PipelineTriggerSubscription{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return sub, nil +} + +func (db *DB) UpdatePipelineTriggerSubscription(conn Queryable, namespace, pipeline, name, label string, fields UpdateablePipelineTriggerSubscriptionFields) error { + query := qb.Update("pipeline_trigger_subscriptions") + + if fields.Settings != nil { + query = query.Set("settings", fields.Settings) + } + + if fields.Status != nil { + query = query.Set("status", fields.Status) + } + + if fields.StatusReason != nil { + query = query.Set("status_reason", fields.StatusReason) + } + + _, err := query.Where(qb.Eq{ + "namespace": namespace, "pipeline": pipeline, "name": name, "label": label, + }).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return ErrEntityNotFound + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} + +func (db *DB) DeletePipelineTriggerSubscription(conn Queryable, namespace, pipeline, name, label string) error { + _, err := qb.Delete("pipeline_trigger_subscriptions"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "name": name, "label": label}).RunWith(conn).Exec() + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + return nil + } + + return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + } + + return nil +} diff --git a/internal/storage/pipelineTriggerSubscriptions_test.go b/internal/storage/pipelineTriggerSubscriptions_test.go new file mode 100644 index 00000000..ab6b5bfb --- /dev/null +++ b/internal/storage/pipelineTriggerSubscriptions_test.go @@ -0,0 +1,105 @@ +package storage + +import ( + "errors" + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDPipelineTriggerSubscriptions(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + config := PipelineConfig{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Version: 0, + Registered: 0, + Deprecated: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineConfig(db, &config) + if err != nil { + t.Fatal(err) + } + + sub := PipelineTriggerSubscription{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Name: "test name", + Label: "test_label", + Settings: "settings string", + Status: "ACTIVE", + StatusReason: "reason string", + } + + err = db.InsertPipelineTriggerSubscription(db, &sub) + if err != nil { + t.Fatal(err) + } + + subs, err := db.ListPipelineTriggerSubscriptions(db, pipeline.Namespace, pipeline.ID) + if err != nil { + t.Fatal(err) + } + + if len(subs) != 1 { + t.Errorf("expected 1 element in list found %d", len(subs)) + } + + if diff := cmp.Diff(sub, subs[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedTask, err := db.GetPipelineTriggerSubscription(db, namespace.ID, pipeline.ID, sub.Name, sub.Label) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(sub, fetchedTask); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + err = db.DeletePipelineTriggerSubscription(db, namespace.ID, pipeline.ID, sub.Name, sub.Label) + if err != nil { + t.Fatal(err) + } + + _, err = db.GetPipelineTriggerSubscription(db, namespace.ID, pipeline.ID, sub.Name, sub.Label) + if !errors.Is(err, ErrEntityNotFound) { + t.Fatal("expected error Not Found; found alternate error") + } +} diff --git a/internal/storage/pipelines.go b/internal/storage/pipelines.go deleted file mode 100644 index 58b5921f..00000000 --- a/internal/storage/pipelines.go +++ /dev/null @@ -1,722 +0,0 @@ -package storage - -import ( - "database/sql" - "encoding/json" - "errors" - "fmt" - "strings" - - qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" -) - -type UpdatablePipelineFields struct { - Name *string - Description *string - Parallelism *int64 - Modified *int64 - State *models.PipelineState - Tasks *map[string]models.CustomTask - Triggers *map[string]models.PipelineTriggerSettings - CommonTasks *map[string]models.PipelineCommonTaskSettings - Errors *[]models.PipelineError -} - -func (db *DB) ListCustomTasks(conn qb.BaseRunner, namespace, pipeline string) ([]models.CustomTask, error) { - if conn == nil { - conn = db - } - - rows, err := qb.Select("id", "description", "image", "registry_auth", "depends_on", "variables", "entrypoint", "command", "inject_api_token"). - From("custom_tasks"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}).RunWith(conn).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - tasks := []models.CustomTask{} - - for rows.Next() { - var id string - var description string - var image string - var registryAuthJSON sql.NullString - var dependsOnJSON string - var variablesJSON string - var entrypointJSON sql.NullString - var commandJSON sql.NullString - var injectAPIToken bool - - err = rows.Scan(&id, &description, &image, ®istryAuthJSON, &dependsOnJSON, &variablesJSON, &entrypointJSON, &commandJSON, &injectAPIToken) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - var registryAuth *models.RegistryAuth - if registryAuthJSON.Valid { - registryAuth = &models.RegistryAuth{} - err := json.Unmarshal([]byte(registryAuthJSON.String), registryAuth) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - dependsOn := map[string]models.RequiredParentStatus{} - err = json.Unmarshal([]byte(dependsOnJSON), &dependsOn) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - variables := []models.Variable{} - err = json.Unmarshal([]byte(variablesJSON), &variables) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - var entrypoint *[]string - if entrypointJSON.Valid { - entrypoint = &[]string{} - err = json.Unmarshal([]byte(entrypointJSON.String), &entrypoint) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - var command *[]string - if commandJSON.Valid { - command = &[]string{} - err = json.Unmarshal([]byte(commandJSON.String), &command) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - tasks = append(tasks, models.CustomTask{ - ID: id, - Description: description, - Image: image, - RegistryAuth: registryAuth, - DependsOn: dependsOn, - Variables: variables, - Entrypoint: entrypoint, - Command: command, - InjectAPIToken: injectAPIToken, - }) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return tasks, nil -} - -func (db *DB) ListTriggerSettings(conn qb.BaseRunner, namespace, pipeline string) ([]models.PipelineTriggerSettings, error) { - if conn == nil { - conn = db - } - - rows, err := qb.Select("name", "label", "settings").From("pipeline_trigger_settings"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}).RunWith(conn).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - triggers := []models.PipelineTriggerSettings{} - - for rows.Next() { - var name string - var label string - var settingsJSON string - - err = rows.Scan(&name, &label, &settingsJSON) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - settings := map[string]string{} - err = json.Unmarshal([]byte(settingsJSON), &settings) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - triggers = append(triggers, models.PipelineTriggerSettings{ - Name: name, - Label: label, - Settings: settings, - }) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return triggers, nil -} - -func (db *DB) ListCommonTaskSettings(conn qb.BaseRunner, namespace, pipeline string) ([]models.PipelineCommonTaskSettings, error) { - if conn == nil { - conn = db - } - - rows, err := qb.Select("name", "label", "settings").From("pipeline_common_task_settings"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}).RunWith(conn).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - commonTasks := []models.PipelineCommonTaskSettings{} - - for rows.Next() { - var name string - var label string - var settingsJSON string - - err = rows.Scan(&name, &label, &settingsJSON) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - settings := map[string]string{} - err = json.Unmarshal([]byte(settingsJSON), &settings) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - commonTasks = append(commonTasks, models.PipelineCommonTaskSettings{ - Name: name, - Label: label, - Settings: settings, - }) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return commonTasks, nil -} - -func (db *DB) ListPipelines(offset, limit int, namespace string) ([]models.Pipeline, error) { - if limit == 0 || limit > db.maxResultsLimit { - limit = db.maxResultsLimit - } - - rows, err := qb.Select("namespace", "id", "name", "description", "parallelism", "created", "modified", "state", "errors"). - From("pipelines"). - OrderBy("created"). - Limit(uint64(limit)). - Offset(uint64(offset)). - Where(qb.Eq{"namespace": namespace}).RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - pipelines := []models.Pipeline{} - - for rows.Next() { - pipeline := models.Pipeline{} - - var namespace string - var id string - var name string - var description string - var parallelism int64 - var created int64 - var modified int64 - var state string - var errorsJSON string - - err = rows.Scan(&namespace, &id, &name, &description, ¶llelism, &created, &modified, &state, &errorsJSON) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - errors := []models.PipelineError{} - err := json.Unmarshal([]byte(errorsJSON), &errors) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - pipeline.Namespace = namespace - pipeline.ID = id - pipeline.Name = name - pipeline.Description = description - pipeline.Parallelism = parallelism - pipeline.Created = created - pipeline.Modified = modified - pipeline.State = models.PipelineState(state) - pipeline.Errors = errors - - pipelines = append(pipelines, pipeline) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - for index, pipeline := range pipelines { - taskList, err := db.ListCustomTasks(nil, namespace, pipeline.ID) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - tasks := map[string]models.CustomTask{} - for _, task := range taskList { - tasks[task.ID] = task - } - - triggerList, err := db.ListTriggerSettings(nil, namespace, pipeline.ID) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - triggers := map[string]models.PipelineTriggerSettings{} - for _, trigger := range triggerList { - triggers[trigger.Label] = trigger - } - - commonTaskList, err := db.ListCommonTaskSettings(nil, namespace, pipeline.ID) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - commonTasks := map[string]models.PipelineCommonTaskSettings{} - for _, task := range commonTaskList { - commonTasks[task.Label] = task - } - - pipeline.CustomTasks = tasks - pipeline.Triggers = triggers - pipeline.CommonTasks = commonTasks - - pipelines[index] = pipeline - } - - return pipelines, nil -} - -func insertCustomTask(conn qb.BaseRunner, namespace, pipeline string, task *models.CustomTask) error { - dependsOnJSON, err := json.Marshal(task.DependsOn) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - variablesJSON, err := json.Marshal(task.Variables) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - var registryAuthJSON *string - if task.RegistryAuth != nil { - tmpJSON, err := json.Marshal(task.RegistryAuth) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - registryAuthJSON = ptr(string(tmpJSON)) - } - - entrypointJSON, err := json.Marshal(task.Entrypoint) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - commandJSON, err := json.Marshal(task.Command) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - _, err = qb.Insert("custom_tasks").Columns("namespace", "pipeline", "id", "description", "image", - "registry_auth", "depends_on", "variables", "entrypoint", "command", "inject_api_token").Values( - namespace, pipeline, task.ID, task.Description, task.Image, registryAuthJSON, - string(dependsOnJSON), string(variablesJSON), string(entrypointJSON), string(commandJSON), task.InjectAPIToken, - ).RunWith(conn).Exec() - if err != nil { - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return ErrEntityExists - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func insertTriggerSettings(conn qb.BaseRunner, namespace, pipeline string, settings *models.PipelineTriggerSettings) error { - settingsJSON, err := json.Marshal(settings.Settings) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - _, err = qb.Insert("pipeline_trigger_settings").Columns("namespace", "pipeline", "name", "label", "settings").Values( - namespace, pipeline, settings.Name, settings.Label, string(settingsJSON)).RunWith(conn).Exec() - if err != nil { - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return ErrEntityExists - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func insertCommonTaskSettings(conn qb.BaseRunner, namespace, pipeline string, settings *models.PipelineCommonTaskSettings) error { - settingsJSON, err := json.Marshal(settings.Settings) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - _, err = qb.Insert("pipeline_common_task_settings").Columns("namespace", "pipeline", "name", "label", "settings").Values( - namespace, pipeline, settings.Name, settings.Label, string(settingsJSON)).RunWith(conn).Exec() - if err != nil { - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return ErrEntityExists - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func (db *DB) InsertPipeline(pipeline *models.Pipeline) error { - tx, err := db.Begin() - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred; could not start transaction: %v; %w", err, ErrInternal) - } - - errorsJSON, err := json.Marshal(pipeline.Errors) - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - _, err = qb.Insert("pipelines").Columns("namespace", "id", "name", "description", "parallelism", "state", - "created", "modified", "errors").Values( - pipeline.Namespace, pipeline.ID, pipeline.Name, pipeline.Description, pipeline.Parallelism, - pipeline.State, pipeline.Created, pipeline.Modified, string(errorsJSON)).RunWith(tx).Exec() - if err != nil { - mustRollback(tx) - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return ErrEntityExists - } - - return fmt.Errorf("database error occurred; could not insert pipeline to DB: %v; %w", err, ErrInternal) - } - - for _, task := range pipeline.CustomTasks { - err = insertCustomTask(tx, pipeline.Namespace, pipeline.ID, &task) - if err != nil { - mustRollback(tx) - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return ErrEntityExists - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - } - - for _, settings := range pipeline.Triggers { - err = insertTriggerSettings(tx, pipeline.Namespace, pipeline.ID, &settings) - if err != nil { - mustRollback(tx) - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return ErrEntityExists - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - } - - for _, settings := range pipeline.CommonTasks { - err = insertCommonTaskSettings(tx, pipeline.Namespace, pipeline.ID, &settings) - if err != nil { - mustRollback(tx) - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return ErrEntityExists - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - } - - err = tx.Commit() - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func (db *DB) GetPipeline(conn qb.BaseRunner, namespace, pipeline string) (models.Pipeline, error) { - if conn == nil { - conn = db - } - - row := qb.Select("id", "name", "description", "parallelism", "created", "modified", "state", "errors"). - From("pipelines").Where(qb.Eq{"namespace": namespace, "id": pipeline}).RunWith(conn).QueryRow() - - var id string - var name string - var description string - var parallelism int64 - var created int64 - var modified int64 - var state string - var errorsJSON string - err := row.Scan(&id, &name, &description, ¶llelism, &created, &modified, &state, &errorsJSON) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return models.Pipeline{}, ErrEntityNotFound - } - - return models.Pipeline{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - retrievedPipeline := models.Pipeline{} - - errors := []models.PipelineError{} - err = json.Unmarshal([]byte(errorsJSON), &errors) - if err != nil { - return models.Pipeline{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - taskList, err := db.ListCustomTasks(conn, namespace, pipeline) - if err != nil { - return models.Pipeline{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - tasks := map[string]models.CustomTask{} - for _, task := range taskList { - tasks[task.ID] = task - } - - triggerList, err := db.ListTriggerSettings(conn, namespace, pipeline) - if err != nil { - return models.Pipeline{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - triggers := map[string]models.PipelineTriggerSettings{} - for _, trigger := range triggerList { - triggers[trigger.Label] = trigger - } - - commonTaskList, err := db.ListCommonTaskSettings(conn, namespace, pipeline) - if err != nil { - return models.Pipeline{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - commonTasks := map[string]models.PipelineCommonTaskSettings{} - for _, task := range commonTaskList { - commonTasks[task.Label] = task - } - - retrievedPipeline.Namespace = namespace - retrievedPipeline.ID = id - retrievedPipeline.Name = name - retrievedPipeline.Description = description - retrievedPipeline.Parallelism = parallelism - retrievedPipeline.Created = created - retrievedPipeline.Modified = modified - retrievedPipeline.State = models.PipelineState(state) - retrievedPipeline.CustomTasks = tasks - retrievedPipeline.Triggers = triggers - retrievedPipeline.CommonTasks = commonTasks - retrievedPipeline.Errors = errors - - return retrievedPipeline, nil -} - -func (db *DB) UpdatePipeline(namespace, id string, fields UpdatablePipelineFields) error { - tx, err := db.Begin() - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - pipeline, err := db.GetPipeline(tx, namespace, id) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return ErrEntityNotFound - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - query := qb.Update("pipelines") - - if fields.Name != nil { - query = query.Set("name", fields.Name) - } - - if fields.Description != nil { - query = query.Set("description", fields.Description) - } - - if fields.Parallelism != nil { - query = query.Set("parallelism", fields.Parallelism) - } - - if fields.State != nil { - query = query.Set("state", fields.State) - } - - if fields.Modified != nil { - query = query.Set("modified", fields.Modified) - } - - if fields.Errors != nil { - errorsJSON, err := json.Marshal(fields.Errors) - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - query = query.Set("errors", errorsJSON) - } - - if fields.Tasks != nil { - for id := range pipeline.CustomTasks { - err := deleteTask(tx, namespace, pipeline.ID, id) - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - } - - for _, task := range *fields.Tasks { - err := insertCustomTask(tx, namespace, pipeline.ID, &task) - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - } - } - - if fields.Triggers != nil { - for id := range pipeline.Triggers { - err := deleteTriggerSettings(tx, namespace, pipeline.ID, id) - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - } - - for _, trigger := range *fields.Triggers { - err := insertTriggerSettings(tx, namespace, pipeline.ID, &trigger) - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - } - } - - if fields.CommonTasks != nil { - for id := range pipeline.CommonTasks { - err := deleteCommonTaskSettings(tx, namespace, pipeline.ID, id) - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - } - - for _, commonTask := range *fields.CommonTasks { - err := insertCommonTaskSettings(tx, namespace, pipeline.ID, &commonTask) - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - } - } - - _, err = query.Where(qb.Eq{"namespace": namespace, "id": id}).RunWith(tx).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return ErrEntityNotFound - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - err = tx.Commit() - if err != nil { - mustRollback(tx) - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func deleteTask(conn qb.BaseRunner, namespace, pipeline, id string) error { - _, err := qb.Delete("custom_tasks").Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "id": id}).RunWith(conn).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func deleteTriggerSettings(conn qb.BaseRunner, namespace, pipeline, label string) error { - _, err := qb.Delete("pipeline_trigger_settings"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "label": label}).RunWith(conn).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func deleteCommonTaskSettings(conn qb.BaseRunner, namespace, pipeline, label string) error { - _, err := qb.Delete("pipeline_common_task_settings"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "label": label}).RunWith(conn).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func (db *DB) DeletePipeline(namespace, id string) error { - _, err := qb.Delete("pipelines").Where(qb.Eq{"namespace": namespace, "id": id}).RunWith(db).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} diff --git a/internal/storage/runs.go b/internal/storage/runs.go deleted file mode 100644 index f685bc15..00000000 --- a/internal/storage/runs.go +++ /dev/null @@ -1,295 +0,0 @@ -package storage - -import ( - "database/sql" - "encoding/json" - "errors" - "fmt" - "strings" - - qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" -) - -type UpdatableRunFields struct { - Ended *int64 - State *models.RunState - Status *models.RunStatus - StatusReason *models.RunStatusReason - Variables *[]models.Variable - StoreObjectsExpired *bool -} - -func (db *DB) ListRuns(conn qb.BaseRunner, offset, limit int, namespace, pipeline string) ([]models.Run, error) { - if conn == nil { - conn = db - } - - if limit == 0 || limit > db.maxResultsLimit { - limit = db.maxResultsLimit - } - - rows, err := qb.Select("namespace", "pipeline", "id", "started", "ended", "state", "status", "status_reason", - "trigger", "variables", "store_objects_expired"). - From("runs"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}). - OrderBy("started DESC"). - Limit(uint64(limit)). - Offset(uint64(offset)).RunWith(conn).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - runs := []models.Run{} - - for rows.Next() { - run := models.Run{} - - var namespace string - var pipeline string - var id int64 - var started int64 - var ended int64 - var state string - var status string - var statusReasonJSON sql.NullString - var triggerJSON string - var variablesJSON string - var storeObjectsExpired bool - - err = rows.Scan(&namespace, &pipeline, &id, &started, &ended, &state, &status, &statusReasonJSON, - &triggerJSON, &variablesJSON, &storeObjectsExpired) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - var statusReason *models.RunStatusReason - if statusReasonJSON.Valid { - statusReason = &models.RunStatusReason{} - err := json.Unmarshal([]byte(statusReasonJSON.String), statusReason) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - trigger := models.TriggerInfo{} - err = json.Unmarshal([]byte(triggerJSON), &trigger) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - variables := []models.Variable{} - err = json.Unmarshal([]byte(variablesJSON), &variables) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - run.Namespace = namespace - run.Pipeline = pipeline - run.ID = id - run.Started = started - run.Ended = ended - run.State = models.RunState(state) - run.Status = models.RunStatus(status) - run.StatusReason = statusReason - run.Trigger = trigger - run.Variables = variables - run.StoreObjectsExpired = storeObjectsExpired - - runs = append(runs, run) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return runs, nil -} - -func (db *DB) InsertRun(run *models.Run) (int64, error) { - tx, err := db.Begin() - if err != nil { - mustRollback(tx) - return 0, err - } - - var statusReasonJSON *string - if run.StatusReason != nil { - rawJSON, err := json.Marshal(run.StatusReason) - if err != nil { - return 0, fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - statusReasonJSON = ptr(string(rawJSON)) - } - - triggerJSON, err := json.Marshal(run.Trigger) - if err != nil { - return 0, fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - variablesJSON, err := json.Marshal(run.Variables) - if err != nil { - return 0, fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - lastRun, err := db.ListRuns(tx, 0, 1, run.Namespace, run.Pipeline) - if err != nil { - mustRollback(tx) - return 0, fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - var nextID int64 = 1 - - if len(lastRun) != 0 { - nextID = lastRun[0].ID + 1 - } - - _, err = qb.Insert("runs").Columns("namespace", "pipeline", "id", "started", "ended", "state", "status", - "status_reason", "trigger", "variables", "store_objects_expired").Values( - run.Namespace, run.Pipeline, nextID, run.Started, run.Ended, run.State, run.Status, statusReasonJSON, - string(triggerJSON), string(variablesJSON), run.StoreObjectsExpired, - ).RunWith(tx).Exec() - if err != nil { - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return 0, ErrEntityExists - } - - return 0, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - err = tx.Commit() - if err != nil { - mustRollback(tx) - return 0, fmt.Errorf("database error occurred; could not commit; %v", err) - } - - return nextID, nil -} - -func (db *DB) GetRun(namespace, pipeline string, run int64) (models.Run, error) { - row := qb.Select("started", "ended", "state", "status", "status_reason", "trigger", "variables", - "store_objects_expired").From("runs"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "id": run}).RunWith(db).QueryRow() - - var started int64 - var ended int64 - var state string - var status string - var statusReasonJSON sql.NullString - var triggerJSON string - var variablesJSON string - var storeObjectsExpired bool - - err := row.Scan(&started, &ended, &state, &status, &statusReasonJSON, &triggerJSON, - &variablesJSON, &storeObjectsExpired) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return models.Run{}, ErrEntityNotFound - } - - return models.Run{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - var statusReason *models.RunStatusReason - if statusReasonJSON.Valid { - statusReason = &models.RunStatusReason{} - err := json.Unmarshal([]byte(statusReasonJSON.String), statusReason) - if err != nil { - return models.Run{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - trigger := models.TriggerInfo{} - err = json.Unmarshal([]byte(triggerJSON), &trigger) - if err != nil { - return models.Run{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - variables := []models.Variable{} - err = json.Unmarshal([]byte(variablesJSON), &variables) - if err != nil { - return models.Run{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - retrievedRun := models.Run{} - - retrievedRun.Namespace = namespace - retrievedRun.Pipeline = pipeline - retrievedRun.ID = run - retrievedRun.Started = started - retrievedRun.Ended = ended - retrievedRun.State = models.RunState(state) - retrievedRun.Status = models.RunStatus(status) - retrievedRun.StatusReason = statusReason - retrievedRun.Trigger = trigger - retrievedRun.Variables = variables - retrievedRun.StoreObjectsExpired = storeObjectsExpired - - return retrievedRun, nil -} - -func (db *DB) UpdateRun(namespace, pipeline string, run int64, fields UpdatableRunFields) error { - query := qb.Update("runs") - - if fields.Ended != nil { - query = query.Set("ended", fields.Ended) - } - - if fields.State != nil { - query = query.Set("state", fields.State) - } - - if fields.Status != nil { - query = query.Set("status", fields.Status) - } - - if fields.StatusReason != nil { - statusReason, err := json.Marshal(fields.StatusReason) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - query = query.Set("status_reason", string(statusReason)) - } - - if fields.Variables != nil { - variables, err := json.Marshal(fields.Variables) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - query = query.Set("variables", variables) - } - - if fields.StoreObjectsExpired != nil { - query = query.Set("store_objects_expired", fields.StoreObjectsExpired) - } - - _, err := query.Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "id": run}).RunWith(db).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return ErrEntityNotFound - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func (db *DB) DeleteRun(namespace, pipeline string, id int64) error { - _, err := qb.Delete("runs").Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "id": id}).RunWith(db).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} diff --git a/internal/storage/secretStoreGlobalKeys.go b/internal/storage/secretStoreGlobalKeys.go index 97303cdb..31616d62 100644 --- a/internal/storage/secretStoreGlobalKeys.go +++ b/internal/storage/secretStoreGlobalKeys.go @@ -7,71 +7,44 @@ import ( "strings" qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" ) -func (db *DB) ListSecretStoreGlobalKeys() ([]models.SecretStoreKey, error) { - rows, err := qb.Select("key", "created"). - From("secret_store_global_keys").RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - globalKeys := []models.SecretStoreKey{} - - for rows.Next() { - var key string - var created int64 - - err = rows.Scan(&key, &created) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } +type SecretStoreGlobalKey struct { + Key string + Created int64 +} - globalKeys = append(globalKeys, models.SecretStoreKey{ - Key: key, - Created: created, - }) +func (db *DB) ListSecretStoreGlobalKeys(conn Queryable) ([]SecretStoreGlobalKey, error) { + query, args := qb.Select("key", "created").From("secret_store_global_keys").MustSql() - } - err = rows.Err() + keys := []SecretStoreGlobalKey{} + err := conn.Select(&keys, query, args...) if err != nil { return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } - return globalKeys, nil + return keys, nil } -func (db *DB) GetSecretStoreGlobalKey(key string) (models.SecretStoreKey, error) { - row := qb.Select("key", "created"). - From("secret_store_global_keys").Where(qb.Eq{"key": key}).RunWith(db).QueryRow() - - var keyStr string - var created int64 +func (db *DB) GetSecretStoreGlobalKey(conn Queryable, key string) (SecretStoreGlobalKey, error) { + query, args := qb.Select("key", "created").From("secret_store_global_keys").Where(qb.Eq{"key": key}).MustSql() - err := row.Scan(&keyStr, &created) + secretKey := SecretStoreGlobalKey{} + err := conn.Get(&secretKey, query, args...) if err != nil { if errors.Is(err, sql.ErrNoRows) { - return models.SecretStoreKey{}, ErrEntityNotFound + return SecretStoreGlobalKey{}, ErrEntityNotFound } - return models.SecretStoreKey{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + return SecretStoreGlobalKey{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } - return models.SecretStoreKey{ - Key: key, - Created: created, - }, nil + return secretKey, nil } -func (db *DB) InsertSecretStoreGlobalKey(secretKey *models.SecretStoreKey, force bool) error { +func (db *DB) InsertSecretStoreGlobalKey(conn Queryable, secretKey *SecretStoreGlobalKey, force bool) error { _, err := qb.Insert("secret_store_global_keys").Columns("key", "created"). - Values(secretKey.Key, secretKey.Created).RunWith(db).Exec() + Values(secretKey.Key, secretKey.Created).RunWith(conn).Exec() if err != nil { if strings.Contains(err.Error(), "UNIQUE constraint failed") && !force { return ErrEntityExists @@ -79,7 +52,7 @@ func (db *DB) InsertSecretStoreGlobalKey(secretKey *models.SecretStoreKey, force // We should update the key's created if the flag for force was passed down. if strings.Contains(err.Error(), "UNIQUE constraint failed") { - _, err = qb.Update("secret_store_pipeline_keys").Set("created", secretKey.Created).RunWith(db).Exec() + _, err = qb.Update("secret_store_pipeline_keys").Set("created", secretKey.Created).RunWith(conn).Exec() if err != nil { return err } @@ -92,8 +65,8 @@ func (db *DB) InsertSecretStoreGlobalKey(secretKey *models.SecretStoreKey, force return nil } -func (db *DB) DeleteSecretStoreGlobalKey(key string) error { - _, err := qb.Delete("secret_store_global_keys").Where(qb.Eq{"key": key}).RunWith(db).Exec() +func (db *DB) DeleteSecretStoreGlobalKey(conn Queryable, key string) error { + _, err := qb.Delete("secret_store_global_keys").Where(qb.Eq{"key": key}).RunWith(conn).Exec() if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil diff --git a/internal/storage/secretStoreGlobalKeys_test.go b/internal/storage/secretStoreGlobalKeys_test.go new file mode 100644 index 00000000..664bd1cd --- /dev/null +++ b/internal/storage/secretStoreGlobalKeys_test.go @@ -0,0 +1,40 @@ +package storage + +import ( + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDSecretStoreGlobalKeys(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + key := SecretStoreGlobalKey{ + Key: "test_key", + Created: 0, + } + + err = db.InsertSecretStoreGlobalKey(db, &key, false) + if err != nil { + t.Fatal(err) + } + + keys, err := db.ListSecretStoreGlobalKeys(db) + if err != nil { + t.Fatal(err) + } + + if len(keys) != 1 { + t.Errorf("expected 1 element in list found %d", len(keys)) + } + + if diff := cmp.Diff(key, keys[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } +} diff --git a/internal/storage/secretStorePipelineKeys.go b/internal/storage/secretStorePipelineKeys.go index 5a7a83e0..8d101650 100644 --- a/internal/storage/secretStorePipelineKeys.go +++ b/internal/storage/secretStorePipelineKeys.go @@ -7,73 +7,51 @@ import ( "strings" qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" ) -func (db *DB) ListSecretStorePipelineKeys(namespace, pipeline string) ([]models.SecretStoreKey, error) { - rows, err := qb.Select("key", "created"). - From("secret_store_pipeline_keys"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}).RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - pipelineKeys := []models.SecretStoreKey{} - - for rows.Next() { - var key string - var created int64 - - err = rows.Scan(&key, &created) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } +type SecretStorePipelineKey struct { + Namespace string + Pipeline string + Key string + Created int64 +} - pipelineKeys = append(pipelineKeys, models.SecretStoreKey{ - Key: key, - Created: created, - }) +func (db *DB) ListSecretStorePipelineKeys(conn Queryable, namespace, pipeline string) ([]SecretStorePipelineKey, error) { + query, args := qb.Select("namespace", "pipeline", "key", "created"). + From("secret_store_pipeline_keys"). + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline}).MustSql() - } - err = rows.Err() + keys := []SecretStorePipelineKey{} + err := conn.Select(&keys, query, args...) if err != nil { return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } - return pipelineKeys, nil + return keys, nil } -func (db *DB) GetSecretStorePipelineKey(namespace, pipeline, key string) (models.SecretStoreKey, error) { - row := qb.Select("key", "created"). +func (db *DB) GetSecretStorePipelineKey(conn Queryable, namespace, pipeline, key string) (SecretStorePipelineKey, error) { + query, args := qb.Select("namespace", "pipeline", "key", "created"). From("secret_store_pipeline_keys"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "key": key}).RunWith(db).QueryRow() - - var keyStr string - var created int64 + Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "key": key}).MustSql() - err := row.Scan(&keyStr, &created) + secretKey := SecretStorePipelineKey{} + err := conn.Get(&secretKey, query, args...) if err != nil { if errors.Is(err, sql.ErrNoRows) { - return models.SecretStoreKey{}, ErrEntityNotFound + return SecretStorePipelineKey{}, ErrEntityNotFound } - return models.SecretStoreKey{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) + return SecretStorePipelineKey{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } - return models.SecretStoreKey{ - Key: key, - Created: created, - }, nil + return secretKey, nil } -func (db *DB) InsertSecretStorePipelineKey(namespace, pipeline string, secretKey *models.SecretStoreKey, force bool) error { +func (db *DB) InsertSecretStorePipelineKey(conn Queryable, secretKey *SecretStorePipelineKey, force bool, +) error { _, err := qb.Insert("secret_store_pipeline_keys").Columns("namespace", "pipeline", "key", "created").Values( - namespace, pipeline, secretKey.Key, secretKey.Created).RunWith(db).Exec() + secretKey.Namespace, secretKey.Pipeline, secretKey.Key, secretKey.Created).RunWith(conn).Exec() if err != nil { if strings.Contains(err.Error(), "UNIQUE constraint failed") && !force { return ErrEntityExists @@ -94,8 +72,10 @@ func (db *DB) InsertSecretStorePipelineKey(namespace, pipeline string, secretKey return nil } -func (db *DB) DeleteSecretStorePipelineKey(namespace, pipeline string, key string) error { - _, err := qb.Delete("secret_store_pipeline_keys").Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "key": key}).RunWith(db).Exec() +func (db *DB) DeleteSecretStorePipelineKey(conn Queryable, namespace, pipeline, key string) error { + _, err := qb.Delete("secret_store_pipeline_keys").Where(qb.Eq{ + "namespace": namespace, "pipeline": pipeline, "key": key, + }).RunWith(conn).Exec() if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil diff --git a/internal/storage/secretStorePipelineKeys_test.go b/internal/storage/secretStorePipelineKeys_test.go new file mode 100644 index 00000000..ab419377 --- /dev/null +++ b/internal/storage/secretStorePipelineKeys_test.go @@ -0,0 +1,68 @@ +package storage + +import ( + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDSecretStorePipelineKeys(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + namespace := Namespace{ + ID: "test_namespace", + Name: "Test Namespace", + Description: "This is a test namespace", + Created: 0, + Modified: 0, + } + + err = db.InsertNamespace(db, &namespace) + if err != nil { + t.Fatal(err) + } + + pipeline := PipelineMetadata{ + Namespace: "test_namespace", + ID: "test_pipeline", + Created: 0, + Modified: 0, + State: "ACTIVE", + } + + err = db.InsertPipelineMetadata(db, &pipeline) + if err != nil { + t.Fatal(err) + } + + key := SecretStorePipelineKey{ + Namespace: "test_namespace", + Pipeline: "test_pipeline", + Key: "test_key", + Created: 0, + } + + err = db.InsertSecretStorePipelineKey(db, &key, false) + if err != nil { + t.Fatal(err) + } + + keys, err := db.ListSecretStorePipelineKeys(db, "test_namespace", "test_pipeline") + if err != nil { + t.Fatal(err) + } + + if len(keys) != 1 { + t.Errorf("expected 1 element in list found %d", len(keys)) + } + + if diff := cmp.Diff(key, keys[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } +} diff --git a/internal/storage/storage.go b/internal/storage/storage.go index a4110bf1..6c08c724 100644 --- a/internal/storage/storage.go +++ b/internal/storage/storage.go @@ -2,6 +2,7 @@ package storage import ( + "context" "database/sql" "embed" "errors" @@ -28,8 +29,26 @@ var ( ErrInternal = errors.New("storage: unknown db error") ) -func ptr[T any](v T) *T { - return &v +// Queryable includes methods shared by sqlx.Tx and sqlx.DB so they can +// be used interchangeably. +type Queryable interface { + sqlx.Queryer + sqlx.Execer + GetContext(context.Context, interface{}, string, ...interface{}) error + SelectContext(context.Context, interface{}, string, ...interface{}) error + Get(interface{}, string, ...interface{}) error + MustExecContext(context.Context, string, ...interface{}) sql.Result + PreparexContext(context.Context, string) (*sqlx.Stmt, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row + Select(interface{}, string, ...interface{}) error + QueryRow(string, ...interface{}) *sql.Row + PrepareNamedContext(context.Context, string) (*sqlx.NamedStmt, error) + PrepareNamed(string) (*sqlx.NamedStmt, error) + Preparex(string) (*sqlx.Stmt, error) + NamedExec(string, interface{}) (sql.Result, error) + NamedExecContext(context.Context, string, interface{}) (sql.Result, error) + MustExec(string, ...interface{}) sql.Result + NamedQuery(string, interface{}) (*sqlx.Rows, error) } // DB is a representation of the datastore @@ -73,9 +92,31 @@ func New(path string, maxResultsLimit int) (DB, error) { }, nil } -func mustRollback(tx *sql.Tx) { - err := tx.Rollback() +// InsideTx is a convenience function so that upstream users can run multiple +// queries inside a transaction. +func InsideTx(db *sqlx.DB, fn func(*sqlx.Tx) error) error { + tx, err := db.Beginx() if err != nil { - panic(err) + return err + } + + defer func() { + if v := recover(); v != nil { + _ = tx.Rollback() + panic(v) + } + }() + + if err := fn(tx); err != nil { + if rerr := tx.Rollback(); rerr != nil { + err = fmt.Errorf("%w: rolling back transaction: %v", err, rerr) + } + return err } + + if err := tx.Commit(); err != nil { + return fmt.Errorf("committing transaction: %w", err) + } + + return nil } diff --git a/internal/storage/storage_test.go b/internal/storage/storage_test.go index 7878d081..1373619a 100644 --- a/internal/storage/storage_test.go +++ b/internal/storage/storage_test.go @@ -1,14 +1,7 @@ package storage import ( - "errors" "os" - "testing" - "time" - - "github.com/clintjedwards/gofer/models" - proto "github.com/clintjedwards/gofer/proto/go" - "github.com/google/go-cmp/cmp" ) func tempFile() string { @@ -24,944 +17,3 @@ func tempFile() string { } return f.Name() } - -func TestCRUDNamespaces(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - namespace := models.NewNamespace("test_namespace", "Test Namespace", "Testing namespace") - - err = db.InsertNamespace(namespace) - if err != nil { - t.Fatal(err) - } - - namespaces, err := db.ListNamespaces(0, 0) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*namespace, namespaces[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedNamespace, err := db.GetNamespace(namespace.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*namespace, fetchedNamespace); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.UpdateNamespace(namespace.ID, UpdatableNamespaceFields{ - Description: ptr("updated namespace"), - }) - if err != nil { - t.Fatal(err) - } - - namespace.Description = "updated namespace" - - fetchedNamespace, err = db.GetNamespace(namespace.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*namespace, fetchedNamespace); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteNamespace(namespace.ID) - if err != nil { - t.Fatal(err) - } - - _, err = db.GetNamespace(namespace.ID) - if !errors.Is(err, ErrEntityNotFound) { - t.Fatal("expected error Not Found; found alternate error") - } -} - -func TestCRUDPipelines(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - namespace := models.NewNamespace("test_namespace", "Test Namespace", "Testing namespace") - err = db.InsertNamespace(namespace) - if err != nil { - t.Fatal(err) - } - - pipelineConfig := proto.PipelineConfig{ - Id: "test_pipeline", - Name: "Test Pipeline", - Description: "", - Tasks: []*proto.PipelineTaskConfig{ - { - Task: &proto.PipelineTaskConfig_CustomTask{ - CustomTask: &proto.CustomTaskConfig{ - Id: "test_task", - Image: "task:latest", - DependsOn: map[string]proto.CustomTaskConfig_RequiredParentStatus{ - "test_task_depends": 1, - }, - InjectApiToken: true, - }, - }, - }, - }, - Triggers: []*proto.PipelineTriggerConfig{ - { - Name: "test_trigger", - Label: "test_trigger_label", - Settings: map[string]string{ - "test_setting_key": "test_setting_value", - }, - }, - }, - } - - pipeline := models.NewPipeline(namespace.ID, &pipelineConfig) - - err = db.InsertPipeline(pipeline) - if err != nil { - t.Fatal(err) - } - - pipelines, err := db.ListPipelines(0, 0, namespace.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*pipeline, pipelines[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedPipeline, err := db.GetPipeline(nil, namespace.ID, pipeline.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*pipeline, fetchedPipeline); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedPipeline.Description = "updated pipeline" - fetchedPipeline.CustomTasks = map[string]models.CustomTask{ - "updated_task": { - ID: "updated_task", - Image: "updated:latest", - DependsOn: map[string]models.RequiredParentStatus{ - "test_task_depends": models.RequiredParentStatusAny, - }, - }, - } - - err = db.UpdatePipeline(namespace.ID, pipeline.ID, UpdatablePipelineFields{ - Description: ptr("updated pipeline"), - Tasks: &fetchedPipeline.CustomTasks, - }) - if err != nil { - t.Fatal(err) - } - - updatedPipeline, err := db.GetPipeline(nil, namespace.ID, pipeline.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(fetchedPipeline, updatedPipeline); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeletePipeline(namespace.ID, pipeline.ID) - if err != nil { - t.Fatal(err) - } - - _, err = db.GetPipeline(nil, namespace.ID, pipeline.ID) - if !errors.Is(err, ErrEntityNotFound) { - t.Fatal("expected error Not Found; found alternate error") - } -} - -func TestCRUDRuns(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - namespace := models.NewNamespace("test_namespace", "Test Namespace", "Testing namespace") - - err = db.InsertNamespace(namespace) - if err != nil { - t.Fatal(err) - } - - pipelineConfig := proto.PipelineConfig{ - Id: "test_pipeline", - Name: "Test Pipeline", - Description: "", - Tasks: []*proto.PipelineTaskConfig{ - { - Task: &proto.PipelineTaskConfig_CustomTask{ - CustomTask: &proto.CustomTaskConfig{ - Id: "test_task", - Image: "task:latest", - DependsOn: map[string]proto.CustomTaskConfig_RequiredParentStatus{ - "test_task_depends": 1, - }, - }, - }, - }, - }, - Triggers: []*proto.PipelineTriggerConfig{ - { - Name: "test_trigger", - Label: "test_trigger_label", - Settings: map[string]string{ - "test_setting_key": "test_setting_value", - }, - }, - }, - } - - pipeline := models.NewPipeline(namespace.ID, &pipelineConfig) - - err = db.InsertPipeline(pipeline) - if err != nil { - t.Fatal(err) - } - - run := models.NewRun(namespace.ID, pipeline.ID, models.TriggerInfo{ - Name: "test_trigger_name", - Label: "test_trigger_label", - }, []models.Variable{}) - - runID, err := db.InsertRun(run) - if err != nil { - t.Fatal(err) - } - run.ID = runID - - runs, err := db.ListRuns(nil, 0, 0, namespace.ID, pipeline.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*run, runs[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedRun, err := db.GetRun(namespace.ID, pipeline.ID, run.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*run, fetchedRun); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.UpdateRun(namespace.ID, pipeline.ID, fetchedRun.ID, UpdatableRunFields{ - State: ptr(models.RunStateComplete), - Status: ptr(models.RunStatusSuccessful), - }) - if err != nil { - t.Fatal(err) - } - - run.State = models.RunStateComplete - run.Status = models.RunStatusSuccessful - - fetchedRun, err = db.GetRun(namespace.ID, pipeline.ID, run.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*run, fetchedRun); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteRun(run.Namespace, run.Pipeline, run.ID) - if err != nil { - t.Fatal(err) - } - - _, err = db.GetRun(run.Namespace, run.Pipeline, run.ID) - if !errors.Is(err, ErrEntityNotFound) { - t.Fatal("expected error Not Found; found alternate error") - } -} - -func TestCRUDTaskRuns(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - namespace := models.NewNamespace("test_namespace", "Test Namespace", "Testing namespace") - - err = db.InsertNamespace(namespace) - if err != nil { - t.Fatal(err) - } - - pipelineConfig := proto.PipelineConfig{ - Id: "test_pipeline", - Name: "Test Pipeline", - Description: "", - Tasks: []*proto.PipelineTaskConfig{ - { - Task: &proto.PipelineTaskConfig_CustomTask{ - CustomTask: &proto.CustomTaskConfig{ - Id: "test_task", - Image: "task:latest", - DependsOn: map[string]proto.CustomTaskConfig_RequiredParentStatus{ - "test_task_depends": 1, - }, - }, - }, - }, - }, - Triggers: []*proto.PipelineTriggerConfig{ - { - Name: "test_trigger", - Label: "test_trigger_label", - Settings: map[string]string{ - "test_setting_key": "test_setting_value", - }, - }, - }, - } - - pipeline := models.NewPipeline(namespace.ID, &pipelineConfig) - - err = db.InsertPipeline(pipeline) - if err != nil { - t.Fatal(err) - } - - run := models.NewRun(namespace.ID, pipeline.ID, models.TriggerInfo{ - Name: "test_trigger_name", - Label: "test_trigger_label", - }, []models.Variable{}) - - runID, err := db.InsertRun(run) - if err != nil { - t.Fatal(err) - } - run.ID = runID - - taskRun := models.NewTaskRun(namespace.ID, pipeline.ID, run.ID, &models.CustomTask{ - ID: "test_task", - }) - - err = db.InsertTaskRun(taskRun) - if err != nil { - t.Fatal(err) - } - - taskRuns, err := db.ListTaskRuns(0, 0, namespace.ID, pipeline.ID, run.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*taskRun, taskRuns[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedTaskRun, err := db.GetTaskRun(namespace.ID, pipeline.ID, run.ID, taskRun.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*taskRun, fetchedTaskRun); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.UpdateTaskRun(&fetchedTaskRun, UpdatableTaskRunFields{ - State: ptr(models.TaskRunStateComplete), - }) - if err != nil { - t.Fatal(err) - } - - taskRun.State = models.TaskRunStateComplete - - fetchedTaskRun, err = db.GetTaskRun(namespace.ID, pipeline.ID, run.ID, taskRun.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*taskRun, fetchedTaskRun); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteTaskRun(run.Namespace, run.Pipeline, run.ID, taskRun.ID) - if err != nil { - t.Fatal(err) - } - - _, err = db.GetTaskRun(run.Namespace, run.Pipeline, run.ID, taskRun.ID) - if !errors.Is(err, ErrEntityNotFound) { - t.Fatal("expected error Not Found; found alternate error") - } -} - -func TestCRUDEvents(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - event := models.NewEvent(&models.EventCreatedNamespace{ - NamespaceID: "test_namespace", - }) - - eventID, err := db.InsertEvent(event) - if err != nil { - t.Fatal(err) - } - - event.ID = eventID - - events, err := db.ListEvents(0, 0, false) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*event, events[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedEvent, err := db.GetEvent(event.ID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*event, fetchedEvent); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteEvent(event.ID) - if err != nil { - t.Fatal(err) - } - - _, err = db.GetEvent(event.ID) - if !errors.Is(err, ErrEntityNotFound) { - t.Fatal("expected error Not Found; found alternate error") - } -} - -func TestCRUDTriggerRegistrations(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - triggerReg := models.TriggerRegistration{ - Name: "test_trigger_registration", - Variables: []models.Variable{ - { - Key: "key", - Value: "value", - Source: models.VariableSourceSystem, - }, - }, - } - - err = db.InsertTriggerRegistration(&triggerReg) - if err != nil { - t.Fatal(err) - } - - regs, err := db.ListTriggerRegistrations(0, 0) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(triggerReg, regs[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedReg, err := db.GetTriggerRegistration(triggerReg.Name) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(triggerReg, fetchedReg); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.UpdateTriggerRegistration(triggerReg.Name, UpdatableTriggerRegistrationFields{ - Image: ptr("image:latest"), - }) - if err != nil { - t.Fatal(err) - } - - triggerReg.Image = "image:latest" - - fetchedReg, err = db.GetTriggerRegistration(triggerReg.Name) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(triggerReg, fetchedReg); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteTriggerRegistration(triggerReg.Name) - if err != nil { - t.Fatal(err) - } - - _, err = db.GetTriggerRegistration(triggerReg.Name) - if !errors.Is(err, ErrEntityNotFound) { - t.Fatalf("expected error Not Found; found error %v", err) - } -} - -func TestCRUDCommonTaskRegistrations(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - commonTaskReg := models.CommonTaskRegistration{ - Name: "test_commontask_registration", - Variables: []models.Variable{ - { - Key: "key", - Value: "value", - Source: models.VariableSourceSystem, - }, - }, - } - - err = db.InsertCommonTaskRegistration(&commonTaskReg) - if err != nil { - t.Fatal(err) - } - - regs, err := db.ListCommonTaskRegistrations(0, 0) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(commonTaskReg, regs[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedReg, err := db.GetCommonTaskRegistration(commonTaskReg.Name) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(commonTaskReg, fetchedReg); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.UpdateCommonTaskRegistration(commonTaskReg.Name, UpdatableCommonTaskRegistrationFields{ - Image: ptr("image:latest"), - }) - if err != nil { - t.Fatal(err) - } - - commonTaskReg.Image = "image:latest" - - fetchedReg, err = db.GetCommonTaskRegistration(commonTaskReg.Name) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(commonTaskReg, fetchedReg); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteCommonTaskRegistration(commonTaskReg.Name) - if err != nil { - t.Fatal(err) - } - - _, err = db.GetCommonTaskRegistration(commonTaskReg.Name) - if !errors.Is(err, ErrEntityNotFound) { - t.Fatalf("expected error Not Found; found error %v", err) - } -} - -func TestCRUDTokens(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - token := models.NewToken("test_hash", models.TokenKindManagement, []string{"test_namespace"}, map[string]string{"key": "value"}, time.Second) - - err = db.InsertToken(token) - if err != nil { - t.Fatal(err) - } - - tokens, err := db.ListTokens(0, 0) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*token, tokens[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedToken, err := db.GetToken(token.Hash) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*token, fetchedToken); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteToken(token.Hash) - if err != nil { - t.Fatal(err) - } - - _, err = db.GetToken(token.Hash) - if !errors.Is(err, ErrEntityNotFound) { - t.Fatal("expected error Not Found; found alternate error") - } -} - -func TestCRUDObjectStorePipelineKeys(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - namespace := models.NewNamespace("test_namespace", "Test Namespace", "Testing namespace") - - err = db.InsertNamespace(namespace) - if err != nil { - t.Fatal(err) - } - - pipelineConfig := proto.PipelineConfig{ - Id: "test_pipeline", - Name: "Test Pipeline", - Description: "", - Tasks: []*proto.PipelineTaskConfig{ - { - Task: &proto.PipelineTaskConfig_CustomTask{ - CustomTask: &proto.CustomTaskConfig{ - Id: "test_task", - Image: "task:latest", - DependsOn: map[string]proto.CustomTaskConfig_RequiredParentStatus{ - "test_task_depends": 1, - }, - }, - }, - }, - }, - Triggers: []*proto.PipelineTriggerConfig{ - { - Name: "test_trigger", - Label: "test_trigger_label", - Settings: map[string]string{ - "test_setting_key": "test_setting_value", - }, - }, - }, - } - - pipeline := models.NewPipeline(namespace.ID, &pipelineConfig) - - err = db.InsertPipeline(pipeline) - if err != nil { - t.Fatal(err) - } - - key := models.NewObjectStoreKey("test_key") - - err = db.InsertObjectStorePipelineKey("test_namespace", "test_pipeline", key) - if err != nil { - t.Fatal(err) - } - - keys, err := db.ListObjectStorePipelineKeys("test_namespace", "test_pipeline") - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*key, keys[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteObjectStorePipelineKey("test_namespace", "test_pipeline", key.Key) - if err != nil { - t.Fatal(err) - } - - keys, err = db.ListObjectStorePipelineKeys("test_namespace", "test_pipeline") - if err != nil { - t.Fatal(err) - } - - if len(keys) != 0 { - t.Fatalf("expected 0 keys but found keys: %+v", keys) - } -} - -func TestCRUDObjectStorePipelineRuns(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - namespace := models.NewNamespace("test_namespace", "Test Namespace", "Testing namespace") - - err = db.InsertNamespace(namespace) - if err != nil { - t.Fatal(err) - } - - pipelineConfig := proto.PipelineConfig{ - Id: "test_pipeline", - Name: "Test Pipeline", - Description: "", - Tasks: []*proto.PipelineTaskConfig{ - { - Task: &proto.PipelineTaskConfig_CustomTask{ - CustomTask: &proto.CustomTaskConfig{ - Id: "test_task", - Image: "task:latest", - DependsOn: map[string]proto.CustomTaskConfig_RequiredParentStatus{ - "test_task_depends": 1, - }, - }, - }, - }, - }, - Triggers: []*proto.PipelineTriggerConfig{ - { - Name: "test_trigger", - Label: "test_trigger_label", - Settings: map[string]string{ - "test_setting_key": "test_setting_value", - }, - }, - }, - } - - pipeline := models.NewPipeline(namespace.ID, &pipelineConfig) - - err = db.InsertPipeline(pipeline) - if err != nil { - t.Fatal(err) - } - - run := models.NewRun(namespace.ID, pipeline.ID, models.TriggerInfo{ - Name: "test_trigger_name", - Label: "test_trigger_label", - }, []models.Variable{}) - - runID, err := db.InsertRun(run) - if err != nil { - t.Fatal(err) - } - run.ID = runID - - key := models.NewObjectStoreKey("test_key") - - err = db.InsertObjectStoreRunKey("test_namespace", "test_pipeline", runID, key) - if err != nil { - t.Fatal(err) - } - - keys, err := db.ListObjectStoreRunKeys("test_namespace", "test_pipeline", runID) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*key, keys[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteObjectStoreRunKey("test_namespace", "test_pipeline", runID, key.Key) - if err != nil { - t.Fatal(err) - } - - keys, err = db.ListObjectStoreRunKeys("test_namespace", "test_pipeline", runID) - if err != nil { - t.Fatal(err) - } - - if len(keys) != 0 { - t.Fatalf("expected 0 keys but found keys: %+v", keys) - } -} - -func TestCRUDSecretStorePipelineKeys(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - namespace := models.NewNamespace("test_namespace", "Test Namespace", "Testing namespace") - - err = db.InsertNamespace(namespace) - if err != nil { - t.Fatal(err) - } - - pipelineConfig := proto.PipelineConfig{ - Id: "test_pipeline", - Name: "Test Pipeline", - Description: "", - Tasks: []*proto.PipelineTaskConfig{ - { - Task: &proto.PipelineTaskConfig_CustomTask{ - CustomTask: &proto.CustomTaskConfig{ - Id: "test_task", - Image: "task:latest", - DependsOn: map[string]proto.CustomTaskConfig_RequiredParentStatus{ - "test_task_depends": 1, - }, - }, - }, - }, - }, - Triggers: []*proto.PipelineTriggerConfig{ - { - Name: "test_trigger", - Label: "test_trigger_label", - Settings: map[string]string{ - "test_setting_key": "test_setting_value", - }, - }, - }, - } - - pipeline := models.NewPipeline(namespace.ID, &pipelineConfig) - - err = db.InsertPipeline(pipeline) - if err != nil { - t.Fatal(err) - } - - key := models.NewSecretStoreKey("test_key") - - err = db.InsertSecretStorePipelineKey("test_namespace", "test_pipeline", key, false) - if err != nil { - t.Fatal(err) - } - - keys, err := db.ListSecretStorePipelineKeys("test_namespace", "test_pipeline") - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*key, keys[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedKey, err := db.GetSecretStorePipelineKey("test_namespace", "test_pipeline", key.Key) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*key, fetchedKey); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteSecretStorePipelineKey("test_namespace", "test_pipeline", key.Key) - if err != nil { - t.Fatal(err) - } - - keys, err = db.ListSecretStorePipelineKeys("test_namespace", "test_pipeline") - if err != nil { - t.Fatal(err) - } - - if len(keys) != 0 { - t.Fatalf("expected 0 keys but found keys: %+v", keys) - } -} - -func TestCRUDSecretStoreGlobalKeys(t *testing.T) { - path := tempFile() - db, err := New(path, 200) - if err != nil { - t.Fatal(err) - } - defer os.Remove(path) - - key := models.NewSecretStoreKey("test_key") - - err = db.InsertSecretStoreGlobalKey(key, false) - if err != nil { - t.Fatal(err) - } - - keys, err := db.ListSecretStoreGlobalKeys() - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*key, keys[0]); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - fetchedKey, err := db.GetSecretStoreGlobalKey(key.Key) - if err != nil { - t.Fatal(err) - } - - if diff := cmp.Diff(*key, fetchedKey); diff != "" { - t.Errorf("unexpected map values (-want +got):\n%s", diff) - } - - err = db.DeleteSecretStoreGlobalKey(key.Key) - if err != nil { - t.Fatal(err) - } - - keys, err = db.ListSecretStoreGlobalKeys() - if err != nil { - t.Fatal(err) - } - - if len(keys) != 0 { - t.Fatalf("expected 0 keys but found keys: %+v", keys) - } -} diff --git a/internal/storage/taskRuns.go b/internal/storage/taskRuns.go deleted file mode 100644 index 41e0689e..00000000 --- a/internal/storage/taskRuns.go +++ /dev/null @@ -1,352 +0,0 @@ -package storage - -import ( - "database/sql" - "encoding/json" - "errors" - "fmt" - "strings" - - qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" -) - -type UpdatableTaskRunFields struct { - Started *int64 - Ended *int64 - ExitCode *int64 - State *models.TaskRunState - Status *models.TaskRunStatus - StatusReason *models.TaskRunStatusReason - LogsExpired *bool - LogsRemoved *bool - Variables *[]models.Variable -} - -func (db *DB) ListTaskRuns(offset, limit int, namespace, pipeline string, run int64) ([]models.TaskRun, error) { - if limit == 0 || limit > db.maxResultsLimit { - limit = db.maxResultsLimit - } - - rows, err := qb.Select("namespace", "pipeline", "run", "id", "task", "created", "started", "ended", "exit_code", - "state", "status", "status_reason", "logs_expired", "logs_removed", "variables"). - From("task_runs"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "run": run}). - Limit(uint64(limit)). - OrderBy("started ASC"). - Offset(uint64(offset)).RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - taskRuns := []models.TaskRun{} - - for rows.Next() { - taskRun := models.TaskRun{} - - var namespace string - var pipeline string - var run int64 - var id string - var taskJSON string - var created int64 - var started int64 - var ended int64 - var exitCodeRaw sql.NullInt64 - var state string - var status string - var statusReasonJSON sql.NullString - var logsExpired bool - var logsRemoved bool - var variablesJSON string - - err = rows.Scan(&namespace, &pipeline, &run, &id, &taskJSON, &created, &started, &ended, - &exitCodeRaw, &state, &status, &statusReasonJSON, &logsExpired, &logsRemoved, &variablesJSON) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - var statusReason *models.TaskRunStatusReason - if statusReasonJSON.Valid { - statusReason = &models.TaskRunStatusReason{} - err := json.Unmarshal([]byte(statusReasonJSON.String), statusReason) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - var exitCode *int64 - if exitCodeRaw.Valid { - exitCode = &exitCodeRaw.Int64 - } - - var task models.Task - - taskJSONRaw := map[string]json.RawMessage{} - err = json.Unmarshal([]byte(taskJSON), &taskJSONRaw) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - _, settingsExists := taskJSONRaw["settings"] - _, registrationExists := taskJSONRaw["registration"] - if settingsExists && registrationExists { - task = &models.CommonTask{} - err = json.Unmarshal([]byte(taskJSON), &task) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } else { - task = &models.CustomTask{} - err = json.Unmarshal([]byte(taskJSON), &task) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - variables := []models.Variable{} - err = json.Unmarshal([]byte(variablesJSON), &variables) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - taskRun.Namespace = namespace - taskRun.Pipeline = pipeline - taskRun.Run = run - taskRun.ID = id - taskRun.Task = task - taskRun.Created = created - taskRun.Started = started - taskRun.Ended = ended - taskRun.ExitCode = exitCode - taskRun.State = models.TaskRunState(state) - taskRun.Status = models.TaskRunStatus(status) - taskRun.StatusReason = statusReason - taskRun.LogsExpired = logsExpired - taskRun.LogsRemoved = logsRemoved - taskRun.Variables = variables - - taskRuns = append(taskRuns, taskRun) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return taskRuns, nil -} - -func (db *DB) InsertTaskRun(taskRun *models.TaskRun) error { - var statusReasonJSON *string - if taskRun.StatusReason != nil { - rawJSON, err := json.Marshal(taskRun.StatusReason) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - statusReasonJSON = ptr(string(rawJSON)) - } - - taskJSON, err := json.Marshal(taskRun.Task) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - variablesJSON, err := json.Marshal(taskRun.Variables) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - _, err = qb.Insert("task_runs").Columns("namespace", "pipeline", "run", "id", "created", "started", "ended", - "exit_code", "logs_expired", "logs_removed", "state", "status", "status_reason", "task", "variables").Values( - taskRun.Namespace, taskRun.Pipeline, taskRun.Run, taskRun.ID, taskRun.Created, taskRun.Started, - taskRun.Ended, taskRun.ExitCode, taskRun.LogsExpired, taskRun.LogsRemoved, taskRun.State, taskRun.Status, - statusReasonJSON, string(taskJSON), string(variablesJSON)).RunWith(db).Exec() - if err != nil { - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return ErrEntityExists - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func (db *DB) GetTaskRun(namespace, pipeline string, run int64, taskRun string) (models.TaskRun, error) { - row := qb.Select("namespace", "pipeline", "run", "id", "task", "created", "started", "ended", "exit_code", - "state", "status", "status_reason", "logs_expired", "logs_removed", "variables"). - From("task_runs"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "run": run, "id": taskRun}).RunWith(db).QueryRow() - - var namespaceID string - var pipelineID string - var runID int64 - var id string - var taskJSON string - var created int64 - var started int64 - var ended int64 - var exitCodeRaw sql.NullInt64 - var state string - var status string - var statusReasonJSON sql.NullString - var logsExpired bool - var logsRemoved bool - var variablesJSON string - - err := row.Scan(&namespaceID, &pipelineID, &runID, &id, &taskJSON, &created, &started, &ended, - &exitCodeRaw, &state, &status, &statusReasonJSON, &logsExpired, &logsRemoved, &variablesJSON) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return models.TaskRun{}, ErrEntityNotFound - } - - return models.TaskRun{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - var statusReason *models.TaskRunStatusReason - if statusReasonJSON.Valid { - statusReason = &models.TaskRunStatusReason{} - err := json.Unmarshal([]byte(statusReasonJSON.String), statusReason) - if err != nil { - return models.TaskRun{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - var task models.Task - - taskJSONRaw := map[string]json.RawMessage{} - err = json.Unmarshal([]byte(taskJSON), &taskJSONRaw) - if err != nil { - return models.TaskRun{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - _, settingsExists := taskJSONRaw["settings"] - _, registrationExists := taskJSONRaw["registration"] - if settingsExists && registrationExists { - task = &models.CommonTask{} - err = json.Unmarshal([]byte(taskJSON), &task) - if err != nil { - return models.TaskRun{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } else { - task = &models.CustomTask{} - err = json.Unmarshal([]byte(taskJSON), &task) - if err != nil { - return models.TaskRun{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - var exitCode *int64 - if exitCodeRaw.Valid { - exitCode = &exitCodeRaw.Int64 - } - - variables := []models.Variable{} - err = json.Unmarshal([]byte(variablesJSON), &variables) - if err != nil { - return models.TaskRun{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - retrievedTaskRun := models.TaskRun{} - - retrievedTaskRun.Namespace = namespace - retrievedTaskRun.Pipeline = pipeline - retrievedTaskRun.Run = run - retrievedTaskRun.ID = id - retrievedTaskRun.Task = task - retrievedTaskRun.Created = created - retrievedTaskRun.Started = started - retrievedTaskRun.Ended = ended - retrievedTaskRun.ExitCode = exitCode - retrievedTaskRun.State = models.TaskRunState(state) - retrievedTaskRun.Status = models.TaskRunStatus(status) - retrievedTaskRun.StatusReason = statusReason - retrievedTaskRun.LogsExpired = logsExpired - retrievedTaskRun.LogsRemoved = logsRemoved - retrievedTaskRun.Variables = variables - - return retrievedTaskRun, nil -} - -func (db *DB) UpdateTaskRun(taskRun *models.TaskRun, fields UpdatableTaskRunFields) error { - query := qb.Update("task_runs") - - if fields.Started != nil { - query = query.Set("started", fields.Started) - } - - if fields.Ended != nil { - query = query.Set("ended", fields.Ended) - } - - if fields.ExitCode != nil { - query = query.Set("exit_code", fields.ExitCode) - } - - if fields.State != nil { - query = query.Set("state", fields.State) - } - - if fields.Status != nil { - query = query.Set("status", fields.Status) - } - - if fields.StatusReason != nil { - statusReason, err := json.Marshal(fields.StatusReason) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - query = query.Set("status_reason", string(statusReason)) - } - - if fields.LogsExpired != nil { - query = query.Set("logs_expired", fields.LogsExpired) - } - - if fields.LogsRemoved != nil { - query = query.Set("logs_removed", fields.LogsRemoved) - } - - if fields.Variables != nil { - variables, err := json.Marshal(fields.Variables) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - query = query.Set("variables", string(variables)) - } - - _, err := query.Where(qb.Eq{ - "namespace": taskRun.Namespace, "pipeline": taskRun.Pipeline, "run": taskRun.Run, - "id": taskRun.ID, - }).RunWith(db).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return ErrEntityNotFound - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func (db *DB) DeleteTaskRun(namespace, pipeline string, run int64, id string) error { - _, err := qb.Delete("task_runs"). - Where(qb.Eq{"namespace": namespace, "pipeline": pipeline, "run": run, "id": id}).RunWith(db).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} diff --git a/internal/storage/tokens.go b/internal/storage/tokens.go index 9cc0ec8a..d237e7c2 100644 --- a/internal/storage/tokens.go +++ b/internal/storage/tokens.go @@ -2,74 +2,35 @@ package storage import ( "database/sql" - "encoding/json" "errors" "fmt" "strings" qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" ) -func (db *DB) ListTokens(offset, limit int) ([]models.Token, error) { +type Token struct { + Hash string + Created int64 + Kind string + Namespaces string + Metadata string + Expires int64 + Disabled bool +} + +func (db *DB) ListTokens(conn Queryable, offset, limit int) ([]Token, error) { if limit == 0 || limit > db.maxResultsLimit { limit = db.maxResultsLimit } - rows, err := qb.Select("hash", "created", "kind", "namespaces", "metadata", "expires", "disabled"). + query, args := qb.Select("hash", "created", "kind", "namespaces", "metadata", "expires", "disabled"). From("tokens"). Limit(uint64(limit)). - Offset(uint64(offset)).RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - tokens := []models.Token{} - - for rows.Next() { - token := models.Token{} - - var hash string - var created int64 - var kind string - var namespacesJSON string - var metadataJSON string - var expires int64 - var disabled bool - - err = rows.Scan(&hash, &created, &kind, &namespacesJSON, &metadataJSON, &expires, &disabled) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - namespaces := []string{} - err = json.Unmarshal([]byte(namespacesJSON), &namespaces) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - metadata := map[string]string{} - err = json.Unmarshal([]byte(metadataJSON), &metadata) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } + Offset(uint64(offset)).MustSql() - token.Hash = hash - token.Created = created - token.Kind = models.TokenKind(kind) - token.Namespaces = namespaces - token.Metadata = metadata - token.Expires = expires - token.Disabled = disabled - - tokens = append(tokens, token) - } - err = rows.Err() + tokens := []Token{} + err := conn.Select(&tokens, query, args...) if err != nil { return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } @@ -77,19 +38,9 @@ func (db *DB) ListTokens(offset, limit int) ([]models.Token, error) { return tokens, nil } -func (db *DB) InsertToken(tr *models.Token) error { - namespacesJSON, err := json.Marshal(tr.Namespaces) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - metadataJSON, err := json.Marshal(tr.Metadata) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - _, err = qb.Insert("tokens").Columns("hash", "created", "kind", "namespaces", "metadata", "expires", "disabled"). - Values(tr.Hash, tr.Created, tr.Kind, string(namespacesJSON), string(metadataJSON), tr.Expires, tr.Disabled).RunWith(db).Exec() +func (db *DB) InsertToken(conn Queryable, tr *Token) error { + _, err := qb.Insert("tokens").Columns("hash", "created", "kind", "namespaces", "metadata", "expires", "disabled"). + Values(tr.Hash, tr.Created, tr.Kind, tr.Namespaces, tr.Metadata, tr.Expires, tr.Disabled).RunWith(conn).Exec() if err != nil { if strings.Contains(err.Error(), "UNIQUE constraint failed") { return ErrEntityExists @@ -101,56 +52,27 @@ func (db *DB) InsertToken(tr *models.Token) error { return nil } -func (db *DB) GetToken(hashStr string) (models.Token, error) { - row := qb.Select("hash", "created", "kind", "namespaces", "metadata", "expires", "disabled"). - From("tokens").Where(qb.Eq{"hash": hashStr}).RunWith(db).QueryRow() - - token := models.Token{} +func (db *DB) GetToken(conn Queryable, hashStr string) (Token, error) { + query, args := qb.Select("hash", "created", "kind", "namespaces", "metadata", "expires", "disabled"). + From("tokens").Where(qb.Eq{"hash": hashStr}).MustSql() - var hash string - var created int64 - var kind string - var namespacesJSON string - var metadataJSON string - var expires int64 - var disabled bool - - err := row.Scan(&hash, &created, &kind, &namespacesJSON, &metadataJSON, &expires, &disabled) + token := Token{} + err := conn.Get(&token, query, args...) if err != nil { if errors.Is(err, sql.ErrNoRows) { - return models.Token{}, ErrEntityNotFound + return Token{}, ErrEntityNotFound } - return models.Token{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - namespaces := []string{} - err = json.Unmarshal([]byte(namespacesJSON), &namespaces) - if err != nil { - return models.Token{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - metadata := map[string]string{} - err = json.Unmarshal([]byte(metadataJSON), &metadata) - if err != nil { - return models.Token{}, fmt.Errorf("database error occurred; could not decode object; %v", err) + return Token{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) } - token.Hash = hash - token.Created = created - token.Kind = models.TokenKind(kind) - token.Namespaces = namespaces - token.Metadata = metadata - token.Expires = expires - token.Disabled = disabled - return token, nil } -func (db *DB) EnableToken(hashStr string) error { +func (db *DB) EnableToken(conn Queryable, hashStr string) error { query := qb.Update("tokens") query = query.Set("disabled", false) - _, err := query.Where(qb.Eq{"hash": hashStr}).RunWith(db).Exec() + _, err := query.Where(qb.Eq{"hash": hashStr}).RunWith(conn).Exec() if err != nil { if strings.Contains(err.Error(), "no rows in result set") { return ErrEntityNotFound @@ -162,10 +84,10 @@ func (db *DB) EnableToken(hashStr string) error { return nil } -func (db *DB) DisableToken(hashStr string) error { +func (db *DB) DisableToken(conn Queryable, hashStr string) error { query := qb.Update("tokens") query = query.Set("disabled", true) - _, err := query.Where(qb.Eq{"hash": hashStr}).RunWith(db).Exec() + _, err := query.Where(qb.Eq{"hash": hashStr}).RunWith(conn).Exec() if err != nil { if strings.Contains(err.Error(), "no rows in result set") { return ErrEntityNotFound @@ -177,8 +99,8 @@ func (db *DB) DisableToken(hashStr string) error { return nil } -func (db *DB) DeleteToken(hash string) error { - _, err := qb.Delete("tokens").Where(qb.Eq{"hash": hash}).RunWith(db).Exec() +func (db *DB) DeleteToken(conn Queryable, hash string) error { + _, err := qb.Delete("tokens").Where(qb.Eq{"hash": hash}).RunWith(conn).Exec() if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil diff --git a/internal/storage/tokens_test.go b/internal/storage/tokens_test.go new file mode 100644 index 00000000..f8eb5646 --- /dev/null +++ b/internal/storage/tokens_test.go @@ -0,0 +1,97 @@ +package storage + +import ( + "errors" + "os" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestCRUDTokens(t *testing.T) { + path := tempFile() + db, err := New(path, 200) + if err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + token := Token{ + Hash: "HASH_STR", + Created: 0, + Kind: "KIND_STR", + Namespaces: "NAMESPACE_STR", + Metadata: "METADATA_STR", + Expires: 0, + Disabled: true, + } + + err = db.InsertToken(db, &token) + if err != nil { + t.Fatal(err) + } + + tokens, err := db.ListTokens(db, 0, 0) + if err != nil { + t.Fatal(err) + } + + if len(tokens) != 1 { + t.Errorf("expected 1 element in list found %d", len(tokens)) + } + + if diff := cmp.Diff(token, tokens[0]); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + fetchedToken, err := db.GetToken(db, token.Hash) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(token, fetchedToken); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + token.Disabled = false + + err = db.EnableToken(db, token.Hash) + if err != nil { + t.Fatal(err) + } + + fetchedToken, err = db.GetToken(db, token.Hash) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(token, fetchedToken); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + token.Disabled = true + + err = db.DisableToken(db, token.Hash) + if err != nil { + t.Fatal(err) + } + + fetchedToken, err = db.GetToken(db, token.Hash) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(token, fetchedToken); diff != "" { + t.Errorf("unexpected map values (-want +got):\n%s", diff) + } + + err = db.DeleteToken(db, token.Hash) + if err != nil { + t.Fatal(err) + } + + _, err = db.GetToken(db, token.Hash) + if !errors.Is(err, ErrEntityNotFound) { + t.Fatal("expected error Not Found; found alternate error") + } +} diff --git a/internal/storage/triggerRegistrations.go b/internal/storage/triggerRegistrations.go deleted file mode 100644 index 51e4539c..00000000 --- a/internal/storage/triggerRegistrations.go +++ /dev/null @@ -1,214 +0,0 @@ -package storage - -import ( - "database/sql" - "encoding/json" - "errors" - "fmt" - "strings" - - qb "github.com/Masterminds/squirrel" - "github.com/clintjedwards/gofer/models" -) - -type UpdatableTriggerRegistrationFields struct { - Image *string - RegistryAuth *models.RegistryAuth - Variables *map[string]string - Status *models.TriggerStatus -} - -func (db *DB) ListTriggerRegistrations(offset, limit int) ([]models.TriggerRegistration, error) { - if limit == 0 || limit > db.maxResultsLimit { - limit = db.maxResultsLimit - } - - rows, err := qb.Select("name", "image", "registry_auth", "variables", "created", "status"). - From("trigger_registrations"). - Limit(uint64(limit)). - Offset(uint64(offset)).RunWith(db).Query() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - defer rows.Close() - - triggerRegistrations := []models.TriggerRegistration{} - - for rows.Next() { - triggerRegistration := models.TriggerRegistration{} - - var name string - var image string - var registryAuthJSON sql.NullString - var variablesJSON string - var created int64 - var status models.TriggerStatus - - err = rows.Scan(&name, &image, ®istryAuthJSON, &variablesJSON, &created, &status) - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - var registryAuth *models.RegistryAuth - if registryAuthJSON.Valid { - registryAuth = &models.RegistryAuth{} - err := json.Unmarshal([]byte(registryAuthJSON.String), registryAuth) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - variables := []models.Variable{} - err = json.Unmarshal([]byte(variablesJSON), &variables) - if err != nil { - return nil, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - triggerRegistration.Name = name - triggerRegistration.Image = image - triggerRegistration.RegistryAuth = registryAuth - triggerRegistration.Variables = variables - triggerRegistration.Created = created - triggerRegistration.Status = status - - triggerRegistrations = append(triggerRegistrations, triggerRegistration) - } - err = rows.Err() - if err != nil { - return nil, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return triggerRegistrations, nil -} - -func (db *DB) InsertTriggerRegistration(tr *models.TriggerRegistration) error { - variablesJSON, err := json.Marshal(tr.Variables) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - var registryAuthJSON *string - if tr.RegistryAuth != nil { - tmpJSON, err := json.Marshal(tr.RegistryAuth) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - - registryAuthJSON = ptr(string(tmpJSON)) - } - - _, err = qb.Insert("trigger_registrations").Columns("name", "image", "registry_auth", "variables", "created", - "status").Values(tr.Name, tr.Image, registryAuthJSON, string(variablesJSON), tr.Created, tr.Status).RunWith(db).Exec() - if err != nil { - if strings.Contains(err.Error(), "UNIQUE constraint failed") { - return ErrEntityExists - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func (db *DB) GetTriggerRegistration(name string) (models.TriggerRegistration, error) { - row := qb.Select("name", "image", "registry_auth", "variables", "created", "status"). - From("trigger_registrations").Where(qb.Eq{"name": name}).RunWith(db).QueryRow() - - triggerRegistration := models.TriggerRegistration{} - - var nameStr string - var image string - var registryAuthJSON sql.NullString - var variablesJSON string - var created int64 - var status models.TriggerStatus - - err := row.Scan(&nameStr, &image, ®istryAuthJSON, &variablesJSON, &created, &status) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return models.TriggerRegistration{}, ErrEntityNotFound - } - - return models.TriggerRegistration{}, fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - var registryAuth *models.RegistryAuth - if registryAuthJSON.Valid { - registryAuth = &models.RegistryAuth{} - err := json.Unmarshal([]byte(registryAuthJSON.String), registryAuth) - if err != nil { - return models.TriggerRegistration{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - } - - variables := []models.Variable{} - err = json.Unmarshal([]byte(variablesJSON), &variables) - if err != nil { - return models.TriggerRegistration{}, fmt.Errorf("database error occurred; could not decode object; %v", err) - } - - triggerRegistration.Name = name - triggerRegistration.Image = image - triggerRegistration.RegistryAuth = registryAuth - triggerRegistration.Variables = variables - triggerRegistration.Created = created - triggerRegistration.Status = status - - return triggerRegistration, nil -} - -func (db *DB) UpdateTriggerRegistration(name string, fields UpdatableTriggerRegistrationFields) error { - query := qb.Update("trigger_registrations") - - if fields.Image != nil { - query = query.Set("image", fields.Image) - } - - if fields.RegistryAuth != nil { - registryAuth, err := json.Marshal(fields.RegistryAuth) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - query = query.Set("registry_auth", registryAuth) - } - - if fields.Variables != nil { - variables, err := json.Marshal(fields.Variables) - if err != nil { - return fmt.Errorf("database error occurred; could not encode object; %v", err) - } - query = query.Set("variables", variables) - } - - if fields.Status != nil { - query = query.Set("status", fields.Status) - } - - _, err := query.Where(qb.Eq{"name": name}).RunWith(db).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return ErrEntityNotFound - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} - -func (db *DB) DeleteTriggerRegistration(name string) error { - _, err := qb.Delete("trigger_registrations").Where(qb.Eq{"name": name}).RunWith(db).Exec() - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil - } - - return fmt.Errorf("database error occurred: %v; %w", err, ErrInternal) - } - - return nil -} diff --git a/models/models.go b/models/models.go deleted file mode 100644 index 62131598..00000000 --- a/models/models.go +++ /dev/null @@ -1,80 +0,0 @@ -// The models package contains the core objects needed by Gofer and friends. -// -// A note about changes to this package: -// -// This package can be somewhat brittle as Go does not alert on missing struct -// fields and converting things to proto is done manually. The combination of -// these two things means that unfortunately these models may connect to other -// models(namely the proto models, but also the sdk and potentially others) -// in ways that might not be obvious and changes to them might break things -// in ways that are hard to set up testing for. Testing would need to -// heavily use reflection to prevent breakages and for now I don't have the -// time. -package models - -import ( - proto "github.com/clintjedwards/gofer/proto/go" -) - -type VariableSource string - -const ( - VariableSourceUnknown VariableSource = "UNKNOWN" - VariableSourcePipelineConfig VariableSource = "PIPELINE_CONFIG" - VariableSourceSystem VariableSource = "SYSTEM" - VariableSourceRunOptions VariableSource = "RUN_OPTIONS" - VariableSourceTrigger VariableSource = "TRIGGER" -) - -// A variable is a key value pair that is used either in a run or task level. -// The variable is inserted as an environment variable to an eventual task run. -// It can be owned by different parts of the system which control where -// the potentially sensitive variables might show up. -type Variable struct { - Key string `json:"key"` - Value string `json:"value"` - Source VariableSource `json:"source"` // Where the variable originated from -} - -func (v *Variable) ToProto() *proto.Variable { - return &proto.Variable{ - Key: v.Key, - Value: v.Value, - Source: string(v.Source), - } -} - -func (v *Variable) FromProto(proto *proto.Variable) { - v.Key = proto.Key - v.Value = proto.Value - v.Source = VariableSource(proto.Source) -} - -type RegistryAuth struct { - User string `json:"user"` - Pass string `json:"pass"` -} - -func (t *RegistryAuth) ToProto() *proto.RegistryAuth { - if t == nil { - return nil - } - - return &proto.RegistryAuth{ - User: t.User, - Pass: t.Pass, - } -} - -func (t *RegistryAuth) FromProto(pb *proto.RegistryAuth) { - if pb == nil { - return - } - - if t == nil { - t = &RegistryAuth{} - } - - t.User = pb.User - t.Pass = pb.Pass -} diff --git a/models/pipeline.go b/models/pipeline.go deleted file mode 100644 index a279c1c1..00000000 --- a/models/pipeline.go +++ /dev/null @@ -1,283 +0,0 @@ -package models - -import ( - "time" - - proto "github.com/clintjedwards/gofer/proto/go" -) - -type PipelineState string - -const ( - PipelineStateUnknown PipelineState = "UNKNOWN" - PipelineStateActive PipelineState = "ACTIVE" - PipelineStateDisabled PipelineState = "DISABLED" -) - -type PipelineErrorKind string - -const ( - PipelineErrorKindUnknown PipelineErrorKind = "UNKNOWN" - PipelineErrorKindTriggerSubscriptionFailure PipelineErrorKind = "TRIGGER_SUBSCRIPTION_FAILURE" -) - -type PipelineError struct { - Kind PipelineErrorKind - Description string -} - -func (p *PipelineError) ToProto() *proto.Pipeline_Error { - return &proto.Pipeline_Error{ - Kind: proto.Pipeline_ErrorKind(proto.Pipeline_ErrorKind_value[string(p.Kind)]), - Description: p.Description, - } -} - -func (p *PipelineError) FromProto(proto *proto.Pipeline_Error) { - p.Kind = PipelineErrorKind(proto.Kind) - p.Description = proto.Description -} - -// / A collection of logically grouped tasks. A task is a unit of work wrapped in a docker container. -// / Pipeline is a secondary level unit being contained within namespaces and containing runs. -type Pipeline struct { - Namespace string `json:"namespace"` // The namespace this pipeline belongs to. - ID string `json:"id"` // Unique identifier; user defined. - Name string `json:"name"` // Name refers to a human readable pipeline name. - Description string `json:"description"` // Description of pipeline's purpose and other details. - /// Controls how many runs can be active at any single time. 0 indicates unbounded with respect to bounds - /// enforced by Gofer. - Parallelism int64 `json:"parallelism"` - Created int64 `json:"created"` // Time pipeline was created in epoch milliseconds. - /// The current state of the pipeline. Pipelines can be disabled to stop execution of runs/tasks. - Modified int64 `json:"modified"` - // The current running state of the pipeline. This is used to determine if the pipeline should continue to process - // runs or not and properly convey that to the user. - State PipelineState `json:"state"` - // Map for quickly finding user created pipeline tasks; assists with DAG generation. - CustomTasks map[string]CustomTask `json:"custom_tasks"` - // Map for quickly finding gofer provided pipeline tasks; assists with DAG generation. - CommonTasks map[string]PipelineCommonTaskSettings `json:"common_tasks"` - // Triggers is a listing of trigger labels to the their trigger subscription objects - Triggers map[string]PipelineTriggerSettings `json:"triggers"` - // There are certain things that might occur within a pipeline that the user will have to fix to restore full - // functionality of the pipeline[^1]. Errors is a way to describe to the user which problems their pipeline might - // have. - // - // [^1]: For example, if you turn off Gofer and it restores trigger connections but one trigger is not available anymore - // Then we would use errors to message the user that this thing that was previously part of your pipeline will not - // work anymore. These cases should be rare, but are important to get right. - Errors []PipelineError `json:"errors"` -} - -func NewPipeline(namespace string, pb *proto.PipelineConfig) *Pipeline { - customTasks := map[string]CustomTask{} - commonTasks := map[string]PipelineCommonTaskSettings{} - - for _, task := range pb.Tasks { - switch t := task.Task.(type) { - case *proto.PipelineTaskConfig_CustomTask: - ct := CustomTask{} - ct.FromProtoCustomTaskConfig(t.CustomTask) - customTasks[t.CustomTask.Id] = ct - case *proto.PipelineTaskConfig_CommonTask: - ct := PipelineCommonTaskSettings{} - ct.FromProtoCommonTaskConfig(t.CommonTask) - commonTasks[ct.Label] = ct - } - } - - triggers := map[string]PipelineTriggerSettings{} - for _, trigger := range pb.Triggers { - triggerConfig := PipelineTriggerSettings{} - triggerConfig.FromProtoTriggerConfig(trigger) - triggers[trigger.Label] = triggerConfig - } - - newPipeline := &Pipeline{ - Namespace: namespace, - ID: pb.Id, - Name: pb.Name, - Description: pb.Description, - Parallelism: pb.Parallelism, - Created: time.Now().UnixMilli(), - Modified: time.Now().UnixMilli(), - State: PipelineStateActive, - CustomTasks: customTasks, - Triggers: triggers, - CommonTasks: commonTasks, - Errors: []PipelineError{}, - } - - return newPipeline -} - -func (p *Pipeline) ToProto() *proto.Pipeline { - customTasks := map[string]*proto.CustomTask{} - for id, task := range p.CustomTasks { - customTasks[id] = task.ToProto() - } - - triggers := map[string]*proto.PipelineTriggerSettings{} - for label, trigger := range p.Triggers { - triggers[label] = trigger.ToProto() - } - - commonTasks := map[string]*proto.PipelineCommonTaskSettings{} - for label, commonTask := range p.CommonTasks { - commonTasks[label] = commonTask.ToProto() - } - - pipelineErrors := []*proto.Pipeline_Error{} - for _, pipelineError := range p.Errors { - pipelineErrors = append(pipelineErrors, pipelineError.ToProto()) - } - - return &proto.Pipeline{ - Namespace: p.Namespace, - Id: p.ID, - Name: p.Name, - Description: p.Description, - Parallelism: p.Parallelism, - Created: p.Created, - Modified: p.Modified, - State: proto.Pipeline_PipelineState(proto.Pipeline_PipelineState_value[string(p.State)]), - CustomTasks: customTasks, - Triggers: triggers, - CommonTasks: commonTasks, - Errors: pipelineErrors, - } -} - -func (p *Pipeline) FromProto(proto *proto.Pipeline) { - customTasks := map[string]CustomTask{} - for id, protoCustomTask := range proto.CustomTasks { - customTask := CustomTask{} - customTask.FromProto(protoCustomTask) - customTasks[id] = customTask - } - - triggers := map[string]PipelineTriggerSettings{} - for label, trigger := range proto.Triggers { - settings := PipelineTriggerSettings{} - settings.FromProto(trigger) - triggers[label] = settings - } - - commonTasks := map[string]PipelineCommonTaskSettings{} - for label, commonTask := range proto.CommonTasks { - settings := PipelineCommonTaskSettings{} - settings.FromProto(commonTask) - commonTasks[label] = settings - } - - pipelineErrors := []PipelineError{} - for _, protoPipelineError := range proto.Errors { - pipelineError := PipelineError{} - pipelineError.FromProto(protoPipelineError) - pipelineErrors = append(pipelineErrors, pipelineError) - } - - p.Namespace = proto.Namespace - p.ID = proto.Id - p.Name = proto.Name - p.Description = proto.Description - p.Parallelism = proto.Parallelism - p.Created = proto.Created - p.Modified = proto.Modified - p.State = PipelineState(proto.State.String()) - p.CustomTasks = customTasks - p.Triggers = triggers - p.CommonTasks = commonTasks - p.Errors = pipelineErrors -} - -// Every time a pipeline attempts to subscribe to a trigger, it passes certain -// values back to that trigger for certain functionality. Since triggers keep no -// permanent state, these settings are kept here so that when triggers are restarted -// they can be restored with proper settings. -type PipelineTriggerSettings struct { - Name string // A global unique identifier. - // A user defined identifier for the trigger so that a pipeline with multiple triggers can be differentiated. - Label string - Settings map[string]string -} - -func (t *PipelineTriggerSettings) ToProto() *proto.PipelineTriggerSettings { - return &proto.PipelineTriggerSettings{ - Name: t.Name, - Label: t.Label, - Settings: t.Settings, - } -} - -func (t *PipelineTriggerSettings) FromProto(p *proto.PipelineTriggerSettings) { - t.Name = p.Name - t.Label = p.Label - t.Settings = p.Settings -} - -func (t *PipelineTriggerSettings) FromProtoTriggerConfig(p *proto.PipelineTriggerConfig) { - t.Name = p.Name - t.Label = p.Label - t.Settings = p.Settings -} - -type PipelineCommonTaskSettings struct { - Name string `json:"name"` // A global unique identifier for a specific type of common task. - // A user defined identifier for the common_task so that a pipeline with multiple common_tasks can be differentiated. - Label string `json:"label"` - Description string `json:"description"` - DependsOn map[string]RequiredParentStatus `json:"depends_on"` - Settings map[string]string `json:"settings"` - - // Allows users to tell gofer to auto-create and inject API Token into task. If this setting is found, Gofer creates - // an API key for the run (stored in the user's secret store) and then injects it for this run under the - // environment variables "GOFER_API_TOKEN". This key is automatically cleaned up when Gofer attempts to clean up - // the Run's objects. - InjectAPIToken bool `json:"inject_api_token"` -} - -func (t *PipelineCommonTaskSettings) ToProto() *proto.PipelineCommonTaskSettings { - dependsOn := map[string]proto.PipelineCommonTaskSettings_RequiredParentStatus{} - for key, value := range t.DependsOn { - dependsOn[key] = proto.PipelineCommonTaskSettings_RequiredParentStatus(proto.PipelineCommonTaskSettings_RequiredParentStatus_value[string(value)]) - } - - return &proto.PipelineCommonTaskSettings{ - Name: t.Name, - Label: t.Label, - Description: t.Description, - DependsOn: dependsOn, - Settings: t.Settings, - InjectApiToken: t.InjectAPIToken, - } -} - -func (t *PipelineCommonTaskSettings) FromProtoCommonTaskConfig(p *proto.CommonTaskConfig) { - dependsOn := map[string]RequiredParentStatus{} - for id, status := range p.DependsOn { - dependsOn[id] = RequiredParentStatus(status.String()) - } - - t.Name = p.Name - t.Label = p.Label - t.Description = p.Description - t.DependsOn = dependsOn - t.Settings = p.Settings - t.InjectAPIToken = p.InjectApiToken -} - -func (t *PipelineCommonTaskSettings) FromProto(p *proto.PipelineCommonTaskSettings) { - dependsOn := map[string]RequiredParentStatus{} - for id, status := range p.DependsOn { - dependsOn[id] = RequiredParentStatus(status.String()) - } - - t.Name = p.Name - t.Label = p.Label - t.Description = p.Description - t.DependsOn = dependsOn - t.Settings = p.Settings - t.InjectAPIToken = p.InjectApiToken -} diff --git a/models/trigger.go b/models/trigger.go deleted file mode 100644 index f6380455..00000000 --- a/models/trigger.go +++ /dev/null @@ -1,89 +0,0 @@ -package models - -import ( - "time" - - proto "github.com/clintjedwards/gofer/proto/go" -) - -type TriggerState string - -const ( - TriggerStateUnknown TriggerState = "UNKNOWN" // Unknown state, can be in this state because of an error. - TriggerStateProcessing TriggerState = "PROCESSING" // Pre-scheduling validation and prep. - TriggerStateRunning TriggerState = "RUNNING" // Currently running as reported by scheduler. - TriggerStateExited TriggerState = "EXITED" // Trigger has exited; usually because of an error. -) - -type TriggerStatus string - -const ( - TriggerStatusUnknown TriggerStatus = "UNKNOWN" // Cannot determine status of Trigger, should never be in this status. - TriggerStatusEnabled TriggerStatus = "ENABLED" // Installed and able to be used by pipelines. - /// Not available to be used by pipelines, either through lack of installation or - /// being disabled by an admin. - TriggerStatusDisabled TriggerStatus = "DISABLED" -) - -type Trigger struct { - Registration TriggerRegistration `json:"registration"` - - // URL is the network address used to communicate with the trigger by the main process. - URL string `json:"url"` - Started int64 `json:"started"` // The start time of the trigger in epoch milliseconds. - State TriggerState `json:"state"` - Documentation string `json:"documentation"` // The documentation link for this specific trigger. - // Key is a trigger's authentication key used to validate requests from the Gofer main service. - // On every request the Gofer service passes this key so that it is impossible for other service to contact - // and manipulate triggers directly. - Key *string `json:"-"` -} - -func (t *Trigger) ToProto() *proto.Trigger { - return &proto.Trigger{ - Name: t.Registration.Name, - Image: t.Registration.Image, - Url: t.URL, - Started: t.Started, - State: proto.Trigger_TriggerState(proto.Trigger_TriggerState_value[string(t.State)]), - Status: proto.Trigger_TriggerStatus(proto.Trigger_TriggerStatus_value[string(t.Registration.Status)]), - Documentation: t.Documentation, - } -} - -// When installing a new trigger, we allow the trigger installer to pass a bunch of settings that -// allow us to go get that trigger on future startups. -type TriggerRegistration struct { - Name string `json:"name"` - Image string `json:"image"` - RegistryAuth *RegistryAuth `json:"registry_auth"` - Variables []Variable `json:"variables"` - Created int64 `json:"created"` - Status TriggerStatus `json:"status"` -} - -func (c *TriggerRegistration) FromInstallTriggerRequest(proto *proto.InstallTriggerRequest) { - variables := []Variable{} - for key, value := range proto.Variables { - variables = append(variables, Variable{ - Key: key, - Value: value, - Source: VariableSourceSystem, - }) - } - - var registryAuth *RegistryAuth - if proto.User != "" { - registryAuth = &RegistryAuth{ - User: proto.User, - Pass: proto.Pass, - } - } - - c.Name = proto.Name - c.Image = proto.Image - c.RegistryAuth = registryAuth - c.Variables = variables - c.Created = time.Now().UnixMilli() - c.Status = TriggerStatusEnabled -} diff --git a/proto/go/gofer.pb.go b/proto/go/gofer.pb.go index 43384997..ed9aebfb 100644 --- a/proto/go/gofer.pb.go +++ b/proto/go/gofer.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.9 +// protoc v3.21.12 // source: gofer.proto package _go @@ -24,7 +24,7 @@ var File_gofer_proto protoreflect.FileDescriptor var file_gofer_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xc2, 0x28, 0x0a, 0x05, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x8f, 0x2c, 0x0a, 0x05, 0x47, 0x6f, 0x66, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, @@ -115,273 +115,302 @@ var file_gofer_proto_rawDesc = []byte{ 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4d, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x12, 0x4d, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4d, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, - 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, - 0x06, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, - 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x12, 0x16, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, - 0x0a, 0x08, 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x75, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x1b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x52, 0x75, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, + 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x21, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x14, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, + 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, + 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x47, 0x65, + 0x74, 0x52, 0x75, 0x6e, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x16, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, + 0x0a, 0x08, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x52, 0x75, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x75, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x52, 0x75, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x4c, 0x69, - 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x75, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, - 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x56, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, - 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, - 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x75, 0x6e, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4a, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, + 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, + 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, + 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x56, 0x0a, + 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, + 0x67, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x7a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4d, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, + 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, + 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x10, + 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x53, 0x0a, 0x10, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4d, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4a, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, + 0x0e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, + 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0d, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x4c, - 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1d, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, - 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, - 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, - 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x13, 0x55, - 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x73, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, + 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, + 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x20, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x56, 0x0a, 0x11, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, + 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x6e, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, - 0x0a, 0x11, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, - 0x61, 0x73, 0x6b, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x21, 0x2e, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x44, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, + 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, - 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, - 0x0c, 0x50, 0x75, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x5c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x56, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x50, 0x75, 0x74, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5f, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x50, 0x75, + 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, + 0x75, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, + 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, - 0x0a, 0x11, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x22, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x6c, - 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x4c, 0x69, 0x73, - 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x1f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, - 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6c, 0x6f, 0x62, - 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x50, 0x75, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, - 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x47, - 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6c, 0x6f, - 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, - 0x0a, 0x08, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x4c, - 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x32, 0xd8, 0x03, 0x0a, 0x0e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, - 0x77, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x69, 0x6e, 0x74, 0x6a, - 0x65, 0x64, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x50, + 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x47, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, + 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6c, + 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, + 0x0a, 0x0f, 0x50, 0x75, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x47, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x47, 0x6c, 0x6f, 0x62, + 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x59, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x47, + 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x32, 0xd8, 0x03, + 0x0a, 0x0e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x40, 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x52, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x20, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x55, 0x6e, + 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, + 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, + 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x68, + 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, + 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x69, 0x6e, 0x74, 0x6a, 0x65, 0x64, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_gofer_proto_goTypes = []interface{}{ @@ -404,129 +433,139 @@ var file_gofer_proto_goTypes = []interface{}{ (*ListPipelinesRequest)(nil), // 16: proto.ListPipelinesRequest (*EnablePipelineRequest)(nil), // 17: proto.EnablePipelineRequest (*DisablePipelineRequest)(nil), // 18: proto.DisablePipelineRequest - (*CreatePipelineRequest)(nil), // 19: proto.CreatePipelineRequest - (*UpdatePipelineRequest)(nil), // 20: proto.UpdatePipelineRequest - (*DeletePipelineRequest)(nil), // 21: proto.DeletePipelineRequest - (*GetRunRequest)(nil), // 22: proto.GetRunRequest - (*ListRunsRequest)(nil), // 23: proto.ListRunsRequest - (*StartRunRequest)(nil), // 24: proto.StartRunRequest - (*RetryRunRequest)(nil), // 25: proto.RetryRunRequest - (*CancelRunRequest)(nil), // 26: proto.CancelRunRequest - (*CancelAllRunsRequest)(nil), // 27: proto.CancelAllRunsRequest - (*GetTaskRunRequest)(nil), // 28: proto.GetTaskRunRequest - (*ListTaskRunsRequest)(nil), // 29: proto.ListTaskRunsRequest - (*CancelTaskRunRequest)(nil), // 30: proto.CancelTaskRunRequest - (*GetTaskRunLogsRequest)(nil), // 31: proto.GetTaskRunLogsRequest - (*DeleteTaskRunLogsRequest)(nil), // 32: proto.DeleteTaskRunLogsRequest - (*GetTriggerRequest)(nil), // 33: proto.GetTriggerRequest - (*ListTriggersRequest)(nil), // 34: proto.ListTriggersRequest - (*GetTriggerInstallInstructionsRequest)(nil), // 35: proto.GetTriggerInstallInstructionsRequest - (*InstallTriggerRequest)(nil), // 36: proto.InstallTriggerRequest - (*UninstallTriggerRequest)(nil), // 37: proto.UninstallTriggerRequest - (*EnableTriggerRequest)(nil), // 38: proto.EnableTriggerRequest - (*DisableTriggerRequest)(nil), // 39: proto.DisableTriggerRequest - (*GetCommonTaskRequest)(nil), // 40: proto.GetCommonTaskRequest - (*ListCommonTasksRequest)(nil), // 41: proto.ListCommonTasksRequest - (*GetCommonTaskInstallInstructionsRequest)(nil), // 42: proto.GetCommonTaskInstallInstructionsRequest - (*InstallCommonTaskRequest)(nil), // 43: proto.InstallCommonTaskRequest - (*UninstallCommonTaskRequest)(nil), // 44: proto.UninstallCommonTaskRequest - (*EnableCommonTaskRequest)(nil), // 45: proto.EnableCommonTaskRequest - (*DisableCommonTaskRequest)(nil), // 46: proto.DisableCommonTaskRequest - (*ListPipelineObjectsRequest)(nil), // 47: proto.ListPipelineObjectsRequest - (*GetPipelineObjectRequest)(nil), // 48: proto.GetPipelineObjectRequest - (*PutPipelineObjectRequest)(nil), // 49: proto.PutPipelineObjectRequest - (*DeletePipelineObjectRequest)(nil), // 50: proto.DeletePipelineObjectRequest - (*ListRunObjectsRequest)(nil), // 51: proto.ListRunObjectsRequest - (*GetRunObjectRequest)(nil), // 52: proto.GetRunObjectRequest - (*PutRunObjectRequest)(nil), // 53: proto.PutRunObjectRequest - (*DeleteRunObjectRequest)(nil), // 54: proto.DeleteRunObjectRequest - (*GetPipelineSecretRequest)(nil), // 55: proto.GetPipelineSecretRequest - (*ListPipelineSecretsRequest)(nil), // 56: proto.ListPipelineSecretsRequest - (*PutPipelineSecretRequest)(nil), // 57: proto.PutPipelineSecretRequest - (*DeletePipelineSecretRequest)(nil), // 58: proto.DeletePipelineSecretRequest - (*GetGlobalSecretRequest)(nil), // 59: proto.GetGlobalSecretRequest - (*ListGlobalSecretsRequest)(nil), // 60: proto.ListGlobalSecretsRequest - (*PutGlobalSecretRequest)(nil), // 61: proto.PutGlobalSecretRequest - (*DeleteGlobalSecretRequest)(nil), // 62: proto.DeleteGlobalSecretRequest - (*GetEventRequest)(nil), // 63: proto.GetEventRequest - (*ListEventsRequest)(nil), // 64: proto.ListEventsRequest - (*TriggerWatchRequest)(nil), // 65: proto.TriggerWatchRequest - (*TriggerInfoRequest)(nil), // 66: proto.TriggerInfoRequest - (*TriggerSubscribeRequest)(nil), // 67: proto.TriggerSubscribeRequest - (*TriggerUnsubscribeRequest)(nil), // 68: proto.TriggerUnsubscribeRequest - (*TriggerShutdownRequest)(nil), // 69: proto.TriggerShutdownRequest - (*TriggerExternalEventRequest)(nil), // 70: proto.TriggerExternalEventRequest - (*GetSystemInfoResponse)(nil), // 71: proto.GetSystemInfoResponse - (*RepairOrphanResponse)(nil), // 72: proto.RepairOrphanResponse - (*ToggleEventIngressResponse)(nil), // 73: proto.ToggleEventIngressResponse - (*CreateTokenResponse)(nil), // 74: proto.CreateTokenResponse - (*BootstrapTokenResponse)(nil), // 75: proto.BootstrapTokenResponse - (*ListTokensResponse)(nil), // 76: proto.ListTokensResponse - (*GetTokenResponse)(nil), // 77: proto.GetTokenResponse - (*EnableTokenResponse)(nil), // 78: proto.EnableTokenResponse - (*DisableTokenResponse)(nil), // 79: proto.DisableTokenResponse - (*DeleteTokenResponse)(nil), // 80: proto.DeleteTokenResponse - (*ListNamespacesResponse)(nil), // 81: proto.ListNamespacesResponse - (*CreateNamespaceResponse)(nil), // 82: proto.CreateNamespaceResponse - (*GetNamespaceResponse)(nil), // 83: proto.GetNamespaceResponse - (*UpdateNamespaceResponse)(nil), // 84: proto.UpdateNamespaceResponse - (*DeleteNamespaceResponse)(nil), // 85: proto.DeleteNamespaceResponse - (*GetPipelineResponse)(nil), // 86: proto.GetPipelineResponse - (*ListPipelinesResponse)(nil), // 87: proto.ListPipelinesResponse - (*EnablePipelineResponse)(nil), // 88: proto.EnablePipelineResponse - (*DisablePipelineResponse)(nil), // 89: proto.DisablePipelineResponse - (*CreatePipelineResponse)(nil), // 90: proto.CreatePipelineResponse - (*UpdatePipelineResponse)(nil), // 91: proto.UpdatePipelineResponse - (*DeletePipelineResponse)(nil), // 92: proto.DeletePipelineResponse - (*GetRunResponse)(nil), // 93: proto.GetRunResponse - (*ListRunsResponse)(nil), // 94: proto.ListRunsResponse - (*StartRunResponse)(nil), // 95: proto.StartRunResponse - (*RetryRunResponse)(nil), // 96: proto.RetryRunResponse - (*CancelRunResponse)(nil), // 97: proto.CancelRunResponse - (*CancelAllRunsResponse)(nil), // 98: proto.CancelAllRunsResponse - (*GetTaskRunResponse)(nil), // 99: proto.GetTaskRunResponse - (*ListTaskRunsResponse)(nil), // 100: proto.ListTaskRunsResponse - (*CancelTaskRunResponse)(nil), // 101: proto.CancelTaskRunResponse - (*GetTaskRunLogsResponse)(nil), // 102: proto.GetTaskRunLogsResponse - (*DeleteTaskRunLogsResponse)(nil), // 103: proto.DeleteTaskRunLogsResponse - (*GetTriggerResponse)(nil), // 104: proto.GetTriggerResponse - (*ListTriggersResponse)(nil), // 105: proto.ListTriggersResponse - (*GetTriggerInstallInstructionsResponse)(nil), // 106: proto.GetTriggerInstallInstructionsResponse - (*InstallTriggerResponse)(nil), // 107: proto.InstallTriggerResponse - (*UninstallTriggerResponse)(nil), // 108: proto.UninstallTriggerResponse - (*EnableTriggerResponse)(nil), // 109: proto.EnableTriggerResponse - (*DisableTriggerResponse)(nil), // 110: proto.DisableTriggerResponse - (*GetCommonTaskResponse)(nil), // 111: proto.GetCommonTaskResponse - (*ListCommonTasksResponse)(nil), // 112: proto.ListCommonTasksResponse - (*GetCommonTaskInstallInstructionsResponse)(nil), // 113: proto.GetCommonTaskInstallInstructionsResponse - (*InstallCommonTaskResponse)(nil), // 114: proto.InstallCommonTaskResponse - (*UninstallCommonTaskResponse)(nil), // 115: proto.UninstallCommonTaskResponse - (*EnableCommonTaskResponse)(nil), // 116: proto.EnableCommonTaskResponse - (*DisableCommonTaskResponse)(nil), // 117: proto.DisableCommonTaskResponse - (*ListPipelineObjectsResponse)(nil), // 118: proto.ListPipelineObjectsResponse - (*GetPipelineObjectResponse)(nil), // 119: proto.GetPipelineObjectResponse - (*PutPipelineObjectResponse)(nil), // 120: proto.PutPipelineObjectResponse - (*DeletePipelineObjectResponse)(nil), // 121: proto.DeletePipelineObjectResponse - (*ListRunObjectsResponse)(nil), // 122: proto.ListRunObjectsResponse - (*GetRunObjectResponse)(nil), // 123: proto.GetRunObjectResponse - (*PutRunObjectResponse)(nil), // 124: proto.PutRunObjectResponse - (*DeleteRunObjectResponse)(nil), // 125: proto.DeleteRunObjectResponse - (*GetPipelineSecretResponse)(nil), // 126: proto.GetPipelineSecretResponse - (*ListPipelineSecretsResponse)(nil), // 127: proto.ListPipelineSecretsResponse - (*PutPipelineSecretResponse)(nil), // 128: proto.PutPipelineSecretResponse - (*DeletePipelineSecretResponse)(nil), // 129: proto.DeletePipelineSecretResponse - (*GetGlobalSecretResponse)(nil), // 130: proto.GetGlobalSecretResponse - (*ListGlobalSecretsResponse)(nil), // 131: proto.ListGlobalSecretsResponse - (*PutGlobalSecretResponse)(nil), // 132: proto.PutGlobalSecretResponse - (*DeleteGlobalSecretResponse)(nil), // 133: proto.DeleteGlobalSecretResponse - (*GetEventResponse)(nil), // 134: proto.GetEventResponse - (*ListEventsResponse)(nil), // 135: proto.ListEventsResponse - (*TriggerWatchResponse)(nil), // 136: proto.TriggerWatchResponse - (*TriggerInfoResponse)(nil), // 137: proto.TriggerInfoResponse - (*TriggerSubscribeResponse)(nil), // 138: proto.TriggerSubscribeResponse - (*TriggerUnsubscribeResponse)(nil), // 139: proto.TriggerUnsubscribeResponse - (*TriggerShutdownResponse)(nil), // 140: proto.TriggerShutdownResponse - (*TriggerExternalEventResponse)(nil), // 141: proto.TriggerExternalEventResponse + (*DeployPipelineRequest)(nil), // 19: proto.DeployPipelineRequest + (*DeletePipelineRequest)(nil), // 20: proto.DeletePipelineRequest + (*RegisterPipelineConfigRequest)(nil), // 21: proto.RegisterPipelineConfigRequest + (*ListPipelineConfigsRequest)(nil), // 22: proto.ListPipelineConfigsRequest + (*GetPipelineConfigRequest)(nil), // 23: proto.GetPipelineConfigRequest + (*DeletePipelineConfigRequest)(nil), // 24: proto.DeletePipelineConfigRequest + (*ListDeploymentsRequest)(nil), // 25: proto.ListDeploymentsRequest + (*GetDeploymentRequest)(nil), // 26: proto.GetDeploymentRequest + (*GetRunRequest)(nil), // 27: proto.GetRunRequest + (*ListRunsRequest)(nil), // 28: proto.ListRunsRequest + (*StartRunRequest)(nil), // 29: proto.StartRunRequest + (*RetryRunRequest)(nil), // 30: proto.RetryRunRequest + (*CancelRunRequest)(nil), // 31: proto.CancelRunRequest + (*CancelAllRunsRequest)(nil), // 32: proto.CancelAllRunsRequest + (*GetTaskRunRequest)(nil), // 33: proto.GetTaskRunRequest + (*ListTaskRunsRequest)(nil), // 34: proto.ListTaskRunsRequest + (*CancelTaskRunRequest)(nil), // 35: proto.CancelTaskRunRequest + (*GetTaskRunLogsRequest)(nil), // 36: proto.GetTaskRunLogsRequest + (*DeleteTaskRunLogsRequest)(nil), // 37: proto.DeleteTaskRunLogsRequest + (*GetTriggerRequest)(nil), // 38: proto.GetTriggerRequest + (*ListTriggersRequest)(nil), // 39: proto.ListTriggersRequest + (*GetTriggerInstallInstructionsRequest)(nil), // 40: proto.GetTriggerInstallInstructionsRequest + (*InstallTriggerRequest)(nil), // 41: proto.InstallTriggerRequest + (*UninstallTriggerRequest)(nil), // 42: proto.UninstallTriggerRequest + (*EnableTriggerRequest)(nil), // 43: proto.EnableTriggerRequest + (*DisableTriggerRequest)(nil), // 44: proto.DisableTriggerRequest + (*GetCommonTaskRequest)(nil), // 45: proto.GetCommonTaskRequest + (*ListCommonTasksRequest)(nil), // 46: proto.ListCommonTasksRequest + (*GetCommonTaskInstallInstructionsRequest)(nil), // 47: proto.GetCommonTaskInstallInstructionsRequest + (*InstallCommonTaskRequest)(nil), // 48: proto.InstallCommonTaskRequest + (*UninstallCommonTaskRequest)(nil), // 49: proto.UninstallCommonTaskRequest + (*EnableCommonTaskRequest)(nil), // 50: proto.EnableCommonTaskRequest + (*DisableCommonTaskRequest)(nil), // 51: proto.DisableCommonTaskRequest + (*ListPipelineObjectsRequest)(nil), // 52: proto.ListPipelineObjectsRequest + (*GetPipelineObjectRequest)(nil), // 53: proto.GetPipelineObjectRequest + (*PutPipelineObjectRequest)(nil), // 54: proto.PutPipelineObjectRequest + (*DeletePipelineObjectRequest)(nil), // 55: proto.DeletePipelineObjectRequest + (*ListRunObjectsRequest)(nil), // 56: proto.ListRunObjectsRequest + (*GetRunObjectRequest)(nil), // 57: proto.GetRunObjectRequest + (*PutRunObjectRequest)(nil), // 58: proto.PutRunObjectRequest + (*DeleteRunObjectRequest)(nil), // 59: proto.DeleteRunObjectRequest + (*GetPipelineSecretRequest)(nil), // 60: proto.GetPipelineSecretRequest + (*ListPipelineSecretsRequest)(nil), // 61: proto.ListPipelineSecretsRequest + (*PutPipelineSecretRequest)(nil), // 62: proto.PutPipelineSecretRequest + (*DeletePipelineSecretRequest)(nil), // 63: proto.DeletePipelineSecretRequest + (*GetGlobalSecretRequest)(nil), // 64: proto.GetGlobalSecretRequest + (*ListGlobalSecretsRequest)(nil), // 65: proto.ListGlobalSecretsRequest + (*PutGlobalSecretRequest)(nil), // 66: proto.PutGlobalSecretRequest + (*DeleteGlobalSecretRequest)(nil), // 67: proto.DeleteGlobalSecretRequest + (*GetEventRequest)(nil), // 68: proto.GetEventRequest + (*ListEventsRequest)(nil), // 69: proto.ListEventsRequest + (*TriggerWatchRequest)(nil), // 70: proto.TriggerWatchRequest + (*TriggerInfoRequest)(nil), // 71: proto.TriggerInfoRequest + (*TriggerSubscribeRequest)(nil), // 72: proto.TriggerSubscribeRequest + (*TriggerUnsubscribeRequest)(nil), // 73: proto.TriggerUnsubscribeRequest + (*TriggerShutdownRequest)(nil), // 74: proto.TriggerShutdownRequest + (*TriggerExternalEventRequest)(nil), // 75: proto.TriggerExternalEventRequest + (*GetSystemInfoResponse)(nil), // 76: proto.GetSystemInfoResponse + (*RepairOrphanResponse)(nil), // 77: proto.RepairOrphanResponse + (*ToggleEventIngressResponse)(nil), // 78: proto.ToggleEventIngressResponse + (*CreateTokenResponse)(nil), // 79: proto.CreateTokenResponse + (*BootstrapTokenResponse)(nil), // 80: proto.BootstrapTokenResponse + (*ListTokensResponse)(nil), // 81: proto.ListTokensResponse + (*GetTokenResponse)(nil), // 82: proto.GetTokenResponse + (*EnableTokenResponse)(nil), // 83: proto.EnableTokenResponse + (*DisableTokenResponse)(nil), // 84: proto.DisableTokenResponse + (*DeleteTokenResponse)(nil), // 85: proto.DeleteTokenResponse + (*ListNamespacesResponse)(nil), // 86: proto.ListNamespacesResponse + (*CreateNamespaceResponse)(nil), // 87: proto.CreateNamespaceResponse + (*GetNamespaceResponse)(nil), // 88: proto.GetNamespaceResponse + (*UpdateNamespaceResponse)(nil), // 89: proto.UpdateNamespaceResponse + (*DeleteNamespaceResponse)(nil), // 90: proto.DeleteNamespaceResponse + (*GetPipelineResponse)(nil), // 91: proto.GetPipelineResponse + (*ListPipelinesResponse)(nil), // 92: proto.ListPipelinesResponse + (*EnablePipelineResponse)(nil), // 93: proto.EnablePipelineResponse + (*DisablePipelineResponse)(nil), // 94: proto.DisablePipelineResponse + (*DeployPipelineResponse)(nil), // 95: proto.DeployPipelineResponse + (*DeletePipelineResponse)(nil), // 96: proto.DeletePipelineResponse + (*RegisterPipelineConfigResponse)(nil), // 97: proto.RegisterPipelineConfigResponse + (*ListPipelineConfigsResponse)(nil), // 98: proto.ListPipelineConfigsResponse + (*GetPipelineConfigResponse)(nil), // 99: proto.GetPipelineConfigResponse + (*DeletePipelineConfigResponse)(nil), // 100: proto.DeletePipelineConfigResponse + (*ListDeploymentsResponse)(nil), // 101: proto.ListDeploymentsResponse + (*GetDeploymentResponse)(nil), // 102: proto.GetDeploymentResponse + (*GetRunResponse)(nil), // 103: proto.GetRunResponse + (*ListRunsResponse)(nil), // 104: proto.ListRunsResponse + (*StartRunResponse)(nil), // 105: proto.StartRunResponse + (*RetryRunResponse)(nil), // 106: proto.RetryRunResponse + (*CancelRunResponse)(nil), // 107: proto.CancelRunResponse + (*CancelAllRunsResponse)(nil), // 108: proto.CancelAllRunsResponse + (*GetTaskRunResponse)(nil), // 109: proto.GetTaskRunResponse + (*ListTaskRunsResponse)(nil), // 110: proto.ListTaskRunsResponse + (*CancelTaskRunResponse)(nil), // 111: proto.CancelTaskRunResponse + (*GetTaskRunLogsResponse)(nil), // 112: proto.GetTaskRunLogsResponse + (*DeleteTaskRunLogsResponse)(nil), // 113: proto.DeleteTaskRunLogsResponse + (*GetTriggerResponse)(nil), // 114: proto.GetTriggerResponse + (*ListTriggersResponse)(nil), // 115: proto.ListTriggersResponse + (*GetTriggerInstallInstructionsResponse)(nil), // 116: proto.GetTriggerInstallInstructionsResponse + (*InstallTriggerResponse)(nil), // 117: proto.InstallTriggerResponse + (*UninstallTriggerResponse)(nil), // 118: proto.UninstallTriggerResponse + (*EnableTriggerResponse)(nil), // 119: proto.EnableTriggerResponse + (*DisableTriggerResponse)(nil), // 120: proto.DisableTriggerResponse + (*GetCommonTaskResponse)(nil), // 121: proto.GetCommonTaskResponse + (*ListCommonTasksResponse)(nil), // 122: proto.ListCommonTasksResponse + (*GetCommonTaskInstallInstructionsResponse)(nil), // 123: proto.GetCommonTaskInstallInstructionsResponse + (*InstallCommonTaskResponse)(nil), // 124: proto.InstallCommonTaskResponse + (*UninstallCommonTaskResponse)(nil), // 125: proto.UninstallCommonTaskResponse + (*EnableCommonTaskResponse)(nil), // 126: proto.EnableCommonTaskResponse + (*DisableCommonTaskResponse)(nil), // 127: proto.DisableCommonTaskResponse + (*ListPipelineObjectsResponse)(nil), // 128: proto.ListPipelineObjectsResponse + (*GetPipelineObjectResponse)(nil), // 129: proto.GetPipelineObjectResponse + (*PutPipelineObjectResponse)(nil), // 130: proto.PutPipelineObjectResponse + (*DeletePipelineObjectResponse)(nil), // 131: proto.DeletePipelineObjectResponse + (*ListRunObjectsResponse)(nil), // 132: proto.ListRunObjectsResponse + (*GetRunObjectResponse)(nil), // 133: proto.GetRunObjectResponse + (*PutRunObjectResponse)(nil), // 134: proto.PutRunObjectResponse + (*DeleteRunObjectResponse)(nil), // 135: proto.DeleteRunObjectResponse + (*GetPipelineSecretResponse)(nil), // 136: proto.GetPipelineSecretResponse + (*ListPipelineSecretsResponse)(nil), // 137: proto.ListPipelineSecretsResponse + (*PutPipelineSecretResponse)(nil), // 138: proto.PutPipelineSecretResponse + (*DeletePipelineSecretResponse)(nil), // 139: proto.DeletePipelineSecretResponse + (*GetGlobalSecretResponse)(nil), // 140: proto.GetGlobalSecretResponse + (*ListGlobalSecretsResponse)(nil), // 141: proto.ListGlobalSecretsResponse + (*PutGlobalSecretResponse)(nil), // 142: proto.PutGlobalSecretResponse + (*DeleteGlobalSecretResponse)(nil), // 143: proto.DeleteGlobalSecretResponse + (*GetEventResponse)(nil), // 144: proto.GetEventResponse + (*ListEventsResponse)(nil), // 145: proto.ListEventsResponse + (*TriggerWatchResponse)(nil), // 146: proto.TriggerWatchResponse + (*TriggerInfoResponse)(nil), // 147: proto.TriggerInfoResponse + (*TriggerSubscribeResponse)(nil), // 148: proto.TriggerSubscribeResponse + (*TriggerUnsubscribeResponse)(nil), // 149: proto.TriggerUnsubscribeResponse + (*TriggerShutdownResponse)(nil), // 150: proto.TriggerShutdownResponse + (*TriggerExternalEventResponse)(nil), // 151: proto.TriggerExternalEventResponse } var file_gofer_proto_depIdxs = []int32{ 0, // 0: proto.Gofer.GetSystemInfo:input_type -> proto.GetSystemInfoRequest @@ -548,131 +587,141 @@ var file_gofer_proto_depIdxs = []int32{ 16, // 16: proto.Gofer.ListPipelines:input_type -> proto.ListPipelinesRequest 17, // 17: proto.Gofer.EnablePipeline:input_type -> proto.EnablePipelineRequest 18, // 18: proto.Gofer.DisablePipeline:input_type -> proto.DisablePipelineRequest - 19, // 19: proto.Gofer.CreatePipeline:input_type -> proto.CreatePipelineRequest - 20, // 20: proto.Gofer.UpdatePipeline:input_type -> proto.UpdatePipelineRequest - 21, // 21: proto.Gofer.DeletePipeline:input_type -> proto.DeletePipelineRequest - 22, // 22: proto.Gofer.GetRun:input_type -> proto.GetRunRequest - 23, // 23: proto.Gofer.ListRuns:input_type -> proto.ListRunsRequest - 24, // 24: proto.Gofer.StartRun:input_type -> proto.StartRunRequest - 25, // 25: proto.Gofer.RetryRun:input_type -> proto.RetryRunRequest - 26, // 26: proto.Gofer.CancelRun:input_type -> proto.CancelRunRequest - 27, // 27: proto.Gofer.CancelAllRuns:input_type -> proto.CancelAllRunsRequest - 28, // 28: proto.Gofer.GetTaskRun:input_type -> proto.GetTaskRunRequest - 29, // 29: proto.Gofer.ListTaskRuns:input_type -> proto.ListTaskRunsRequest - 30, // 30: proto.Gofer.CancelTaskRun:input_type -> proto.CancelTaskRunRequest - 31, // 31: proto.Gofer.GetTaskRunLogs:input_type -> proto.GetTaskRunLogsRequest - 32, // 32: proto.Gofer.DeleteTaskRunLogs:input_type -> proto.DeleteTaskRunLogsRequest - 33, // 33: proto.Gofer.GetTrigger:input_type -> proto.GetTriggerRequest - 34, // 34: proto.Gofer.ListTriggers:input_type -> proto.ListTriggersRequest - 35, // 35: proto.Gofer.GetTriggerInstallInstructions:input_type -> proto.GetTriggerInstallInstructionsRequest - 36, // 36: proto.Gofer.InstallTrigger:input_type -> proto.InstallTriggerRequest - 37, // 37: proto.Gofer.UninstallTrigger:input_type -> proto.UninstallTriggerRequest - 38, // 38: proto.Gofer.EnableTrigger:input_type -> proto.EnableTriggerRequest - 39, // 39: proto.Gofer.DisableTrigger:input_type -> proto.DisableTriggerRequest - 40, // 40: proto.Gofer.GetCommonTask:input_type -> proto.GetCommonTaskRequest - 41, // 41: proto.Gofer.ListCommonTasks:input_type -> proto.ListCommonTasksRequest - 42, // 42: proto.Gofer.GetCommonTaskInstallInstructions:input_type -> proto.GetCommonTaskInstallInstructionsRequest - 43, // 43: proto.Gofer.InstallCommonTask:input_type -> proto.InstallCommonTaskRequest - 44, // 44: proto.Gofer.UninstallCommonTask:input_type -> proto.UninstallCommonTaskRequest - 45, // 45: proto.Gofer.EnableCommonTask:input_type -> proto.EnableCommonTaskRequest - 46, // 46: proto.Gofer.DisableCommonTask:input_type -> proto.DisableCommonTaskRequest - 47, // 47: proto.Gofer.ListPipelineObjects:input_type -> proto.ListPipelineObjectsRequest - 48, // 48: proto.Gofer.GetPipelineObject:input_type -> proto.GetPipelineObjectRequest - 49, // 49: proto.Gofer.PutPipelineObject:input_type -> proto.PutPipelineObjectRequest - 50, // 50: proto.Gofer.DeletePipelineObject:input_type -> proto.DeletePipelineObjectRequest - 51, // 51: proto.Gofer.ListRunObjects:input_type -> proto.ListRunObjectsRequest - 52, // 52: proto.Gofer.GetRunObject:input_type -> proto.GetRunObjectRequest - 53, // 53: proto.Gofer.PutRunObject:input_type -> proto.PutRunObjectRequest - 54, // 54: proto.Gofer.DeleteRunObject:input_type -> proto.DeleteRunObjectRequest - 55, // 55: proto.Gofer.GetPipelineSecret:input_type -> proto.GetPipelineSecretRequest - 56, // 56: proto.Gofer.ListPipelineSecrets:input_type -> proto.ListPipelineSecretsRequest - 57, // 57: proto.Gofer.PutPipelineSecret:input_type -> proto.PutPipelineSecretRequest - 58, // 58: proto.Gofer.DeletePipelineSecret:input_type -> proto.DeletePipelineSecretRequest - 59, // 59: proto.Gofer.GetGlobalSecret:input_type -> proto.GetGlobalSecretRequest - 60, // 60: proto.Gofer.ListGlobalSecrets:input_type -> proto.ListGlobalSecretsRequest - 61, // 61: proto.Gofer.PutGlobalSecret:input_type -> proto.PutGlobalSecretRequest - 62, // 62: proto.Gofer.DeleteGlobalSecret:input_type -> proto.DeleteGlobalSecretRequest - 63, // 63: proto.Gofer.GetEvent:input_type -> proto.GetEventRequest - 64, // 64: proto.Gofer.ListEvents:input_type -> proto.ListEventsRequest - 65, // 65: proto.TriggerService.Watch:input_type -> proto.TriggerWatchRequest - 66, // 66: proto.TriggerService.Info:input_type -> proto.TriggerInfoRequest - 67, // 67: proto.TriggerService.Subscribe:input_type -> proto.TriggerSubscribeRequest - 68, // 68: proto.TriggerService.Unsubscribe:input_type -> proto.TriggerUnsubscribeRequest - 69, // 69: proto.TriggerService.Shutdown:input_type -> proto.TriggerShutdownRequest - 70, // 70: proto.TriggerService.ExternalEvent:input_type -> proto.TriggerExternalEventRequest - 71, // 71: proto.Gofer.GetSystemInfo:output_type -> proto.GetSystemInfoResponse - 72, // 72: proto.Gofer.RepairOrphan:output_type -> proto.RepairOrphanResponse - 73, // 73: proto.Gofer.ToggleEventIngress:output_type -> proto.ToggleEventIngressResponse - 74, // 74: proto.Gofer.CreateToken:output_type -> proto.CreateTokenResponse - 75, // 75: proto.Gofer.BootstrapToken:output_type -> proto.BootstrapTokenResponse - 76, // 76: proto.Gofer.ListTokens:output_type -> proto.ListTokensResponse - 77, // 77: proto.Gofer.GetToken:output_type -> proto.GetTokenResponse - 78, // 78: proto.Gofer.EnableToken:output_type -> proto.EnableTokenResponse - 79, // 79: proto.Gofer.DisableToken:output_type -> proto.DisableTokenResponse - 80, // 80: proto.Gofer.DeleteToken:output_type -> proto.DeleteTokenResponse - 81, // 81: proto.Gofer.ListNamespaces:output_type -> proto.ListNamespacesResponse - 82, // 82: proto.Gofer.CreateNamespace:output_type -> proto.CreateNamespaceResponse - 83, // 83: proto.Gofer.GetNamespace:output_type -> proto.GetNamespaceResponse - 84, // 84: proto.Gofer.UpdateNamespace:output_type -> proto.UpdateNamespaceResponse - 85, // 85: proto.Gofer.DeleteNamespace:output_type -> proto.DeleteNamespaceResponse - 86, // 86: proto.Gofer.GetPipeline:output_type -> proto.GetPipelineResponse - 87, // 87: proto.Gofer.ListPipelines:output_type -> proto.ListPipelinesResponse - 88, // 88: proto.Gofer.EnablePipeline:output_type -> proto.EnablePipelineResponse - 89, // 89: proto.Gofer.DisablePipeline:output_type -> proto.DisablePipelineResponse - 90, // 90: proto.Gofer.CreatePipeline:output_type -> proto.CreatePipelineResponse - 91, // 91: proto.Gofer.UpdatePipeline:output_type -> proto.UpdatePipelineResponse - 92, // 92: proto.Gofer.DeletePipeline:output_type -> proto.DeletePipelineResponse - 93, // 93: proto.Gofer.GetRun:output_type -> proto.GetRunResponse - 94, // 94: proto.Gofer.ListRuns:output_type -> proto.ListRunsResponse - 95, // 95: proto.Gofer.StartRun:output_type -> proto.StartRunResponse - 96, // 96: proto.Gofer.RetryRun:output_type -> proto.RetryRunResponse - 97, // 97: proto.Gofer.CancelRun:output_type -> proto.CancelRunResponse - 98, // 98: proto.Gofer.CancelAllRuns:output_type -> proto.CancelAllRunsResponse - 99, // 99: proto.Gofer.GetTaskRun:output_type -> proto.GetTaskRunResponse - 100, // 100: proto.Gofer.ListTaskRuns:output_type -> proto.ListTaskRunsResponse - 101, // 101: proto.Gofer.CancelTaskRun:output_type -> proto.CancelTaskRunResponse - 102, // 102: proto.Gofer.GetTaskRunLogs:output_type -> proto.GetTaskRunLogsResponse - 103, // 103: proto.Gofer.DeleteTaskRunLogs:output_type -> proto.DeleteTaskRunLogsResponse - 104, // 104: proto.Gofer.GetTrigger:output_type -> proto.GetTriggerResponse - 105, // 105: proto.Gofer.ListTriggers:output_type -> proto.ListTriggersResponse - 106, // 106: proto.Gofer.GetTriggerInstallInstructions:output_type -> proto.GetTriggerInstallInstructionsResponse - 107, // 107: proto.Gofer.InstallTrigger:output_type -> proto.InstallTriggerResponse - 108, // 108: proto.Gofer.UninstallTrigger:output_type -> proto.UninstallTriggerResponse - 109, // 109: proto.Gofer.EnableTrigger:output_type -> proto.EnableTriggerResponse - 110, // 110: proto.Gofer.DisableTrigger:output_type -> proto.DisableTriggerResponse - 111, // 111: proto.Gofer.GetCommonTask:output_type -> proto.GetCommonTaskResponse - 112, // 112: proto.Gofer.ListCommonTasks:output_type -> proto.ListCommonTasksResponse - 113, // 113: proto.Gofer.GetCommonTaskInstallInstructions:output_type -> proto.GetCommonTaskInstallInstructionsResponse - 114, // 114: proto.Gofer.InstallCommonTask:output_type -> proto.InstallCommonTaskResponse - 115, // 115: proto.Gofer.UninstallCommonTask:output_type -> proto.UninstallCommonTaskResponse - 116, // 116: proto.Gofer.EnableCommonTask:output_type -> proto.EnableCommonTaskResponse - 117, // 117: proto.Gofer.DisableCommonTask:output_type -> proto.DisableCommonTaskResponse - 118, // 118: proto.Gofer.ListPipelineObjects:output_type -> proto.ListPipelineObjectsResponse - 119, // 119: proto.Gofer.GetPipelineObject:output_type -> proto.GetPipelineObjectResponse - 120, // 120: proto.Gofer.PutPipelineObject:output_type -> proto.PutPipelineObjectResponse - 121, // 121: proto.Gofer.DeletePipelineObject:output_type -> proto.DeletePipelineObjectResponse - 122, // 122: proto.Gofer.ListRunObjects:output_type -> proto.ListRunObjectsResponse - 123, // 123: proto.Gofer.GetRunObject:output_type -> proto.GetRunObjectResponse - 124, // 124: proto.Gofer.PutRunObject:output_type -> proto.PutRunObjectResponse - 125, // 125: proto.Gofer.DeleteRunObject:output_type -> proto.DeleteRunObjectResponse - 126, // 126: proto.Gofer.GetPipelineSecret:output_type -> proto.GetPipelineSecretResponse - 127, // 127: proto.Gofer.ListPipelineSecrets:output_type -> proto.ListPipelineSecretsResponse - 128, // 128: proto.Gofer.PutPipelineSecret:output_type -> proto.PutPipelineSecretResponse - 129, // 129: proto.Gofer.DeletePipelineSecret:output_type -> proto.DeletePipelineSecretResponse - 130, // 130: proto.Gofer.GetGlobalSecret:output_type -> proto.GetGlobalSecretResponse - 131, // 131: proto.Gofer.ListGlobalSecrets:output_type -> proto.ListGlobalSecretsResponse - 132, // 132: proto.Gofer.PutGlobalSecret:output_type -> proto.PutGlobalSecretResponse - 133, // 133: proto.Gofer.DeleteGlobalSecret:output_type -> proto.DeleteGlobalSecretResponse - 134, // 134: proto.Gofer.GetEvent:output_type -> proto.GetEventResponse - 135, // 135: proto.Gofer.ListEvents:output_type -> proto.ListEventsResponse - 136, // 136: proto.TriggerService.Watch:output_type -> proto.TriggerWatchResponse - 137, // 137: proto.TriggerService.Info:output_type -> proto.TriggerInfoResponse - 138, // 138: proto.TriggerService.Subscribe:output_type -> proto.TriggerSubscribeResponse - 139, // 139: proto.TriggerService.Unsubscribe:output_type -> proto.TriggerUnsubscribeResponse - 140, // 140: proto.TriggerService.Shutdown:output_type -> proto.TriggerShutdownResponse - 141, // 141: proto.TriggerService.ExternalEvent:output_type -> proto.TriggerExternalEventResponse - 71, // [71:142] is the sub-list for method output_type - 0, // [0:71] is the sub-list for method input_type + 19, // 19: proto.Gofer.DeployPipeline:input_type -> proto.DeployPipelineRequest + 20, // 20: proto.Gofer.DeletePipeline:input_type -> proto.DeletePipelineRequest + 21, // 21: proto.Gofer.RegisterPipelineConfig:input_type -> proto.RegisterPipelineConfigRequest + 22, // 22: proto.Gofer.ListPipelineConfigs:input_type -> proto.ListPipelineConfigsRequest + 23, // 23: proto.Gofer.GetPipelineConfig:input_type -> proto.GetPipelineConfigRequest + 24, // 24: proto.Gofer.DeletePipelineConfig:input_type -> proto.DeletePipelineConfigRequest + 25, // 25: proto.Gofer.ListDeployments:input_type -> proto.ListDeploymentsRequest + 26, // 26: proto.Gofer.GetDeployment:input_type -> proto.GetDeploymentRequest + 27, // 27: proto.Gofer.GetRun:input_type -> proto.GetRunRequest + 28, // 28: proto.Gofer.ListRuns:input_type -> proto.ListRunsRequest + 29, // 29: proto.Gofer.StartRun:input_type -> proto.StartRunRequest + 30, // 30: proto.Gofer.RetryRun:input_type -> proto.RetryRunRequest + 31, // 31: proto.Gofer.CancelRun:input_type -> proto.CancelRunRequest + 32, // 32: proto.Gofer.CancelAllRuns:input_type -> proto.CancelAllRunsRequest + 33, // 33: proto.Gofer.GetTaskRun:input_type -> proto.GetTaskRunRequest + 34, // 34: proto.Gofer.ListTaskRuns:input_type -> proto.ListTaskRunsRequest + 35, // 35: proto.Gofer.CancelTaskRun:input_type -> proto.CancelTaskRunRequest + 36, // 36: proto.Gofer.GetTaskRunLogs:input_type -> proto.GetTaskRunLogsRequest + 37, // 37: proto.Gofer.DeleteTaskRunLogs:input_type -> proto.DeleteTaskRunLogsRequest + 38, // 38: proto.Gofer.GetTrigger:input_type -> proto.GetTriggerRequest + 39, // 39: proto.Gofer.ListTriggers:input_type -> proto.ListTriggersRequest + 40, // 40: proto.Gofer.GetTriggerInstallInstructions:input_type -> proto.GetTriggerInstallInstructionsRequest + 41, // 41: proto.Gofer.InstallTrigger:input_type -> proto.InstallTriggerRequest + 42, // 42: proto.Gofer.UninstallTrigger:input_type -> proto.UninstallTriggerRequest + 43, // 43: proto.Gofer.EnableTrigger:input_type -> proto.EnableTriggerRequest + 44, // 44: proto.Gofer.DisableTrigger:input_type -> proto.DisableTriggerRequest + 45, // 45: proto.Gofer.GetCommonTask:input_type -> proto.GetCommonTaskRequest + 46, // 46: proto.Gofer.ListCommonTasks:input_type -> proto.ListCommonTasksRequest + 47, // 47: proto.Gofer.GetCommonTaskInstallInstructions:input_type -> proto.GetCommonTaskInstallInstructionsRequest + 48, // 48: proto.Gofer.InstallCommonTask:input_type -> proto.InstallCommonTaskRequest + 49, // 49: proto.Gofer.UninstallCommonTask:input_type -> proto.UninstallCommonTaskRequest + 50, // 50: proto.Gofer.EnableCommonTask:input_type -> proto.EnableCommonTaskRequest + 51, // 51: proto.Gofer.DisableCommonTask:input_type -> proto.DisableCommonTaskRequest + 52, // 52: proto.Gofer.ListPipelineObjects:input_type -> proto.ListPipelineObjectsRequest + 53, // 53: proto.Gofer.GetPipelineObject:input_type -> proto.GetPipelineObjectRequest + 54, // 54: proto.Gofer.PutPipelineObject:input_type -> proto.PutPipelineObjectRequest + 55, // 55: proto.Gofer.DeletePipelineObject:input_type -> proto.DeletePipelineObjectRequest + 56, // 56: proto.Gofer.ListRunObjects:input_type -> proto.ListRunObjectsRequest + 57, // 57: proto.Gofer.GetRunObject:input_type -> proto.GetRunObjectRequest + 58, // 58: proto.Gofer.PutRunObject:input_type -> proto.PutRunObjectRequest + 59, // 59: proto.Gofer.DeleteRunObject:input_type -> proto.DeleteRunObjectRequest + 60, // 60: proto.Gofer.GetPipelineSecret:input_type -> proto.GetPipelineSecretRequest + 61, // 61: proto.Gofer.ListPipelineSecrets:input_type -> proto.ListPipelineSecretsRequest + 62, // 62: proto.Gofer.PutPipelineSecret:input_type -> proto.PutPipelineSecretRequest + 63, // 63: proto.Gofer.DeletePipelineSecret:input_type -> proto.DeletePipelineSecretRequest + 64, // 64: proto.Gofer.GetGlobalSecret:input_type -> proto.GetGlobalSecretRequest + 65, // 65: proto.Gofer.ListGlobalSecrets:input_type -> proto.ListGlobalSecretsRequest + 66, // 66: proto.Gofer.PutGlobalSecret:input_type -> proto.PutGlobalSecretRequest + 67, // 67: proto.Gofer.DeleteGlobalSecret:input_type -> proto.DeleteGlobalSecretRequest + 68, // 68: proto.Gofer.GetEvent:input_type -> proto.GetEventRequest + 69, // 69: proto.Gofer.ListEvents:input_type -> proto.ListEventsRequest + 70, // 70: proto.TriggerService.Watch:input_type -> proto.TriggerWatchRequest + 71, // 71: proto.TriggerService.Info:input_type -> proto.TriggerInfoRequest + 72, // 72: proto.TriggerService.Subscribe:input_type -> proto.TriggerSubscribeRequest + 73, // 73: proto.TriggerService.Unsubscribe:input_type -> proto.TriggerUnsubscribeRequest + 74, // 74: proto.TriggerService.Shutdown:input_type -> proto.TriggerShutdownRequest + 75, // 75: proto.TriggerService.ExternalEvent:input_type -> proto.TriggerExternalEventRequest + 76, // 76: proto.Gofer.GetSystemInfo:output_type -> proto.GetSystemInfoResponse + 77, // 77: proto.Gofer.RepairOrphan:output_type -> proto.RepairOrphanResponse + 78, // 78: proto.Gofer.ToggleEventIngress:output_type -> proto.ToggleEventIngressResponse + 79, // 79: proto.Gofer.CreateToken:output_type -> proto.CreateTokenResponse + 80, // 80: proto.Gofer.BootstrapToken:output_type -> proto.BootstrapTokenResponse + 81, // 81: proto.Gofer.ListTokens:output_type -> proto.ListTokensResponse + 82, // 82: proto.Gofer.GetToken:output_type -> proto.GetTokenResponse + 83, // 83: proto.Gofer.EnableToken:output_type -> proto.EnableTokenResponse + 84, // 84: proto.Gofer.DisableToken:output_type -> proto.DisableTokenResponse + 85, // 85: proto.Gofer.DeleteToken:output_type -> proto.DeleteTokenResponse + 86, // 86: proto.Gofer.ListNamespaces:output_type -> proto.ListNamespacesResponse + 87, // 87: proto.Gofer.CreateNamespace:output_type -> proto.CreateNamespaceResponse + 88, // 88: proto.Gofer.GetNamespace:output_type -> proto.GetNamespaceResponse + 89, // 89: proto.Gofer.UpdateNamespace:output_type -> proto.UpdateNamespaceResponse + 90, // 90: proto.Gofer.DeleteNamespace:output_type -> proto.DeleteNamespaceResponse + 91, // 91: proto.Gofer.GetPipeline:output_type -> proto.GetPipelineResponse + 92, // 92: proto.Gofer.ListPipelines:output_type -> proto.ListPipelinesResponse + 93, // 93: proto.Gofer.EnablePipeline:output_type -> proto.EnablePipelineResponse + 94, // 94: proto.Gofer.DisablePipeline:output_type -> proto.DisablePipelineResponse + 95, // 95: proto.Gofer.DeployPipeline:output_type -> proto.DeployPipelineResponse + 96, // 96: proto.Gofer.DeletePipeline:output_type -> proto.DeletePipelineResponse + 97, // 97: proto.Gofer.RegisterPipelineConfig:output_type -> proto.RegisterPipelineConfigResponse + 98, // 98: proto.Gofer.ListPipelineConfigs:output_type -> proto.ListPipelineConfigsResponse + 99, // 99: proto.Gofer.GetPipelineConfig:output_type -> proto.GetPipelineConfigResponse + 100, // 100: proto.Gofer.DeletePipelineConfig:output_type -> proto.DeletePipelineConfigResponse + 101, // 101: proto.Gofer.ListDeployments:output_type -> proto.ListDeploymentsResponse + 102, // 102: proto.Gofer.GetDeployment:output_type -> proto.GetDeploymentResponse + 103, // 103: proto.Gofer.GetRun:output_type -> proto.GetRunResponse + 104, // 104: proto.Gofer.ListRuns:output_type -> proto.ListRunsResponse + 105, // 105: proto.Gofer.StartRun:output_type -> proto.StartRunResponse + 106, // 106: proto.Gofer.RetryRun:output_type -> proto.RetryRunResponse + 107, // 107: proto.Gofer.CancelRun:output_type -> proto.CancelRunResponse + 108, // 108: proto.Gofer.CancelAllRuns:output_type -> proto.CancelAllRunsResponse + 109, // 109: proto.Gofer.GetTaskRun:output_type -> proto.GetTaskRunResponse + 110, // 110: proto.Gofer.ListTaskRuns:output_type -> proto.ListTaskRunsResponse + 111, // 111: proto.Gofer.CancelTaskRun:output_type -> proto.CancelTaskRunResponse + 112, // 112: proto.Gofer.GetTaskRunLogs:output_type -> proto.GetTaskRunLogsResponse + 113, // 113: proto.Gofer.DeleteTaskRunLogs:output_type -> proto.DeleteTaskRunLogsResponse + 114, // 114: proto.Gofer.GetTrigger:output_type -> proto.GetTriggerResponse + 115, // 115: proto.Gofer.ListTriggers:output_type -> proto.ListTriggersResponse + 116, // 116: proto.Gofer.GetTriggerInstallInstructions:output_type -> proto.GetTriggerInstallInstructionsResponse + 117, // 117: proto.Gofer.InstallTrigger:output_type -> proto.InstallTriggerResponse + 118, // 118: proto.Gofer.UninstallTrigger:output_type -> proto.UninstallTriggerResponse + 119, // 119: proto.Gofer.EnableTrigger:output_type -> proto.EnableTriggerResponse + 120, // 120: proto.Gofer.DisableTrigger:output_type -> proto.DisableTriggerResponse + 121, // 121: proto.Gofer.GetCommonTask:output_type -> proto.GetCommonTaskResponse + 122, // 122: proto.Gofer.ListCommonTasks:output_type -> proto.ListCommonTasksResponse + 123, // 123: proto.Gofer.GetCommonTaskInstallInstructions:output_type -> proto.GetCommonTaskInstallInstructionsResponse + 124, // 124: proto.Gofer.InstallCommonTask:output_type -> proto.InstallCommonTaskResponse + 125, // 125: proto.Gofer.UninstallCommonTask:output_type -> proto.UninstallCommonTaskResponse + 126, // 126: proto.Gofer.EnableCommonTask:output_type -> proto.EnableCommonTaskResponse + 127, // 127: proto.Gofer.DisableCommonTask:output_type -> proto.DisableCommonTaskResponse + 128, // 128: proto.Gofer.ListPipelineObjects:output_type -> proto.ListPipelineObjectsResponse + 129, // 129: proto.Gofer.GetPipelineObject:output_type -> proto.GetPipelineObjectResponse + 130, // 130: proto.Gofer.PutPipelineObject:output_type -> proto.PutPipelineObjectResponse + 131, // 131: proto.Gofer.DeletePipelineObject:output_type -> proto.DeletePipelineObjectResponse + 132, // 132: proto.Gofer.ListRunObjects:output_type -> proto.ListRunObjectsResponse + 133, // 133: proto.Gofer.GetRunObject:output_type -> proto.GetRunObjectResponse + 134, // 134: proto.Gofer.PutRunObject:output_type -> proto.PutRunObjectResponse + 135, // 135: proto.Gofer.DeleteRunObject:output_type -> proto.DeleteRunObjectResponse + 136, // 136: proto.Gofer.GetPipelineSecret:output_type -> proto.GetPipelineSecretResponse + 137, // 137: proto.Gofer.ListPipelineSecrets:output_type -> proto.ListPipelineSecretsResponse + 138, // 138: proto.Gofer.PutPipelineSecret:output_type -> proto.PutPipelineSecretResponse + 139, // 139: proto.Gofer.DeletePipelineSecret:output_type -> proto.DeletePipelineSecretResponse + 140, // 140: proto.Gofer.GetGlobalSecret:output_type -> proto.GetGlobalSecretResponse + 141, // 141: proto.Gofer.ListGlobalSecrets:output_type -> proto.ListGlobalSecretsResponse + 142, // 142: proto.Gofer.PutGlobalSecret:output_type -> proto.PutGlobalSecretResponse + 143, // 143: proto.Gofer.DeleteGlobalSecret:output_type -> proto.DeleteGlobalSecretResponse + 144, // 144: proto.Gofer.GetEvent:output_type -> proto.GetEventResponse + 145, // 145: proto.Gofer.ListEvents:output_type -> proto.ListEventsResponse + 146, // 146: proto.TriggerService.Watch:output_type -> proto.TriggerWatchResponse + 147, // 147: proto.TriggerService.Info:output_type -> proto.TriggerInfoResponse + 148, // 148: proto.TriggerService.Subscribe:output_type -> proto.TriggerSubscribeResponse + 149, // 149: proto.TriggerService.Unsubscribe:output_type -> proto.TriggerUnsubscribeResponse + 150, // 150: proto.TriggerService.Shutdown:output_type -> proto.TriggerShutdownResponse + 151, // 151: proto.TriggerService.ExternalEvent:output_type -> proto.TriggerExternalEventResponse + 76, // [76:152] is the sub-list for method output_type + 0, // [0:76] 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 diff --git a/proto/go/gofer_grpc.pb.go b/proto/go/gofer_grpc.pb.go index 4e0fa230..8677179b 100644 --- a/proto/go/gofer_grpc.pb.go +++ b/proto/go/gofer_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.9 +// - protoc v3.21.12 // source: gofer.proto package _go @@ -85,18 +85,23 @@ type GoferClient interface { // events that would normally cause the pipeline to be run are instead // discarded. DisablePipeline(ctx context.Context, in *DisablePipelineRequest, opts ...grpc.CallOption) (*DisablePipelineResponse, error) - // CreatePipeline creates a new pipeline from the protobuf input. This is - // usually autogenerated from the command line tool. - CreatePipeline(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*CreatePipelineResponse, error) - // UpdatePipeline updates a pipeline from the protobuf input. This input is - // usually autogenerated from the command line tool. - // Updating a pipeline requires the pipeline to adhere - // to two constraints: - // 1. The pipeline must not have any current runs in progress. - // 2. The pipeline must be in a disabled state. - UpdatePipeline(ctx context.Context, in *UpdatePipelineRequest, opts ...grpc.CallOption) (*UpdatePipelineResponse, error) + // DeployPipeline attempts to deploy a version of a pipeline. + DeployPipeline(ctx context.Context, in *DeployPipelineRequest, opts ...grpc.CallOption) (*DeployPipelineResponse, error) // DeletePipeline deletes a pipeline permenantly. It is not recoverable. DeletePipeline(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*DeletePipelineResponse, error) + // RegisterPipelineConfig registers a new version of a pipeline's + // configuration. If the pipeline does not exist it will be created. + RegisterPipelineConfig(ctx context.Context, in *RegisterPipelineConfigRequest, opts ...grpc.CallOption) (*RegisterPipelineConfigResponse, error) + // ListPipelineConfigs returns all registered pipeline configs. + ListPipelineConfigs(ctx context.Context, in *ListPipelineConfigsRequest, opts ...grpc.CallOption) (*ListPipelineConfigsResponse, error) + // GetPipelineConfig returns a single pipelineconfig by id. + GetPipelineConfig(ctx context.Context, in *GetPipelineConfigRequest, opts ...grpc.CallOption) (*GetPipelineConfigResponse, error) + // DeletePipelineConfig removes a pipelineconfig by id. + DeletePipelineConfig(ctx context.Context, in *DeletePipelineConfigRequest, opts ...grpc.CallOption) (*DeletePipelineConfigResponse, error) + // ListDeployments + ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) + // GetDeployment + GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...grpc.CallOption) (*GetDeploymentResponse, error) // GetRun returns the details of a single run. GetRun(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*GetRunResponse, error) // ListRuns returns a list of all runs by Pipeline ID. Pagination can be @@ -387,27 +392,72 @@ func (c *goferClient) DisablePipeline(ctx context.Context, in *DisablePipelineRe return out, nil } -func (c *goferClient) CreatePipeline(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*CreatePipelineResponse, error) { - out := new(CreatePipelineResponse) - err := c.cc.Invoke(ctx, "/proto.Gofer/CreatePipeline", in, out, opts...) +func (c *goferClient) DeployPipeline(ctx context.Context, in *DeployPipelineRequest, opts ...grpc.CallOption) (*DeployPipelineResponse, error) { + out := new(DeployPipelineResponse) + err := c.cc.Invoke(ctx, "/proto.Gofer/DeployPipeline", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *goferClient) UpdatePipeline(ctx context.Context, in *UpdatePipelineRequest, opts ...grpc.CallOption) (*UpdatePipelineResponse, error) { - out := new(UpdatePipelineResponse) - err := c.cc.Invoke(ctx, "/proto.Gofer/UpdatePipeline", in, out, opts...) +func (c *goferClient) DeletePipeline(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*DeletePipelineResponse, error) { + out := new(DeletePipelineResponse) + err := c.cc.Invoke(ctx, "/proto.Gofer/DeletePipeline", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *goferClient) DeletePipeline(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*DeletePipelineResponse, error) { - out := new(DeletePipelineResponse) - err := c.cc.Invoke(ctx, "/proto.Gofer/DeletePipeline", in, out, opts...) +func (c *goferClient) RegisterPipelineConfig(ctx context.Context, in *RegisterPipelineConfigRequest, opts ...grpc.CallOption) (*RegisterPipelineConfigResponse, error) { + out := new(RegisterPipelineConfigResponse) + err := c.cc.Invoke(ctx, "/proto.Gofer/RegisterPipelineConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *goferClient) ListPipelineConfigs(ctx context.Context, in *ListPipelineConfigsRequest, opts ...grpc.CallOption) (*ListPipelineConfigsResponse, error) { + out := new(ListPipelineConfigsResponse) + err := c.cc.Invoke(ctx, "/proto.Gofer/ListPipelineConfigs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *goferClient) GetPipelineConfig(ctx context.Context, in *GetPipelineConfigRequest, opts ...grpc.CallOption) (*GetPipelineConfigResponse, error) { + out := new(GetPipelineConfigResponse) + err := c.cc.Invoke(ctx, "/proto.Gofer/GetPipelineConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *goferClient) DeletePipelineConfig(ctx context.Context, in *DeletePipelineConfigRequest, opts ...grpc.CallOption) (*DeletePipelineConfigResponse, error) { + out := new(DeletePipelineConfigResponse) + err := c.cc.Invoke(ctx, "/proto.Gofer/DeletePipelineConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *goferClient) ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) { + out := new(ListDeploymentsResponse) + err := c.cc.Invoke(ctx, "/proto.Gofer/ListDeployments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *goferClient) GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...grpc.CallOption) (*GetDeploymentResponse, error) { + out := new(GetDeploymentResponse) + err := c.cc.Invoke(ctx, "/proto.Gofer/GetDeployment", in, out, opts...) if err != nil { return nil, err } @@ -914,18 +964,23 @@ type GoferServer interface { // events that would normally cause the pipeline to be run are instead // discarded. DisablePipeline(context.Context, *DisablePipelineRequest) (*DisablePipelineResponse, error) - // CreatePipeline creates a new pipeline from the protobuf input. This is - // usually autogenerated from the command line tool. - CreatePipeline(context.Context, *CreatePipelineRequest) (*CreatePipelineResponse, error) - // UpdatePipeline updates a pipeline from the protobuf input. This input is - // usually autogenerated from the command line tool. - // Updating a pipeline requires the pipeline to adhere - // to two constraints: - // 1. The pipeline must not have any current runs in progress. - // 2. The pipeline must be in a disabled state. - UpdatePipeline(context.Context, *UpdatePipelineRequest) (*UpdatePipelineResponse, error) + // DeployPipeline attempts to deploy a version of a pipeline. + DeployPipeline(context.Context, *DeployPipelineRequest) (*DeployPipelineResponse, error) // DeletePipeline deletes a pipeline permenantly. It is not recoverable. DeletePipeline(context.Context, *DeletePipelineRequest) (*DeletePipelineResponse, error) + // RegisterPipelineConfig registers a new version of a pipeline's + // configuration. If the pipeline does not exist it will be created. + RegisterPipelineConfig(context.Context, *RegisterPipelineConfigRequest) (*RegisterPipelineConfigResponse, error) + // ListPipelineConfigs returns all registered pipeline configs. + ListPipelineConfigs(context.Context, *ListPipelineConfigsRequest) (*ListPipelineConfigsResponse, error) + // GetPipelineConfig returns a single pipelineconfig by id. + GetPipelineConfig(context.Context, *GetPipelineConfigRequest) (*GetPipelineConfigResponse, error) + // DeletePipelineConfig removes a pipelineconfig by id. + DeletePipelineConfig(context.Context, *DeletePipelineConfigRequest) (*DeletePipelineConfigResponse, error) + // ListDeployments + ListDeployments(context.Context, *ListDeploymentsRequest) (*ListDeploymentsResponse, error) + // GetDeployment + GetDeployment(context.Context, *GetDeploymentRequest) (*GetDeploymentResponse, error) // GetRun returns the details of a single run. GetRun(context.Context, *GetRunRequest) (*GetRunResponse, error) // ListRuns returns a list of all runs by Pipeline ID. Pagination can be @@ -1099,15 +1154,30 @@ func (UnimplementedGoferServer) EnablePipeline(context.Context, *EnablePipelineR func (UnimplementedGoferServer) DisablePipeline(context.Context, *DisablePipelineRequest) (*DisablePipelineResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DisablePipeline not implemented") } -func (UnimplementedGoferServer) CreatePipeline(context.Context, *CreatePipelineRequest) (*CreatePipelineResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePipeline not implemented") -} -func (UnimplementedGoferServer) UpdatePipeline(context.Context, *UpdatePipelineRequest) (*UpdatePipelineResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdatePipeline not implemented") +func (UnimplementedGoferServer) DeployPipeline(context.Context, *DeployPipelineRequest) (*DeployPipelineResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeployPipeline not implemented") } func (UnimplementedGoferServer) DeletePipeline(context.Context, *DeletePipelineRequest) (*DeletePipelineResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeletePipeline not implemented") } +func (UnimplementedGoferServer) RegisterPipelineConfig(context.Context, *RegisterPipelineConfigRequest) (*RegisterPipelineConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterPipelineConfig not implemented") +} +func (UnimplementedGoferServer) ListPipelineConfigs(context.Context, *ListPipelineConfigsRequest) (*ListPipelineConfigsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPipelineConfigs not implemented") +} +func (UnimplementedGoferServer) GetPipelineConfig(context.Context, *GetPipelineConfigRequest) (*GetPipelineConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPipelineConfig not implemented") +} +func (UnimplementedGoferServer) DeletePipelineConfig(context.Context, *DeletePipelineConfigRequest) (*DeletePipelineConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePipelineConfig not implemented") +} +func (UnimplementedGoferServer) ListDeployments(context.Context, *ListDeploymentsRequest) (*ListDeploymentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDeployments not implemented") +} +func (UnimplementedGoferServer) GetDeployment(context.Context, *GetDeploymentRequest) (*GetDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDeployment not implemented") +} func (UnimplementedGoferServer) GetRun(context.Context, *GetRunRequest) (*GetRunResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRun not implemented") } @@ -1592,56 +1662,146 @@ func _Gofer_DisablePipeline_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -func _Gofer_CreatePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePipelineRequest) +func _Gofer_DeployPipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeployPipelineRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(GoferServer).CreatePipeline(ctx, in) + return srv.(GoferServer).DeployPipeline(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Gofer/CreatePipeline", + FullMethod: "/proto.Gofer/DeployPipeline", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GoferServer).CreatePipeline(ctx, req.(*CreatePipelineRequest)) + return srv.(GoferServer).DeployPipeline(ctx, req.(*DeployPipelineRequest)) } return interceptor(ctx, in, info, handler) } -func _Gofer_UpdatePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdatePipelineRequest) +func _Gofer_DeletePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePipelineRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(GoferServer).UpdatePipeline(ctx, in) + return srv.(GoferServer).DeletePipeline(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Gofer/UpdatePipeline", + FullMethod: "/proto.Gofer/DeletePipeline", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GoferServer).UpdatePipeline(ctx, req.(*UpdatePipelineRequest)) + return srv.(GoferServer).DeletePipeline(ctx, req.(*DeletePipelineRequest)) } return interceptor(ctx, in, info, handler) } -func _Gofer_DeletePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePipelineRequest) +func _Gofer_RegisterPipelineConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterPipelineConfigRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(GoferServer).DeletePipeline(ctx, in) + return srv.(GoferServer).RegisterPipelineConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.Gofer/DeletePipeline", + FullMethod: "/proto.Gofer/RegisterPipelineConfig", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GoferServer).DeletePipeline(ctx, req.(*DeletePipelineRequest)) + return srv.(GoferServer).RegisterPipelineConfig(ctx, req.(*RegisterPipelineConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Gofer_ListPipelineConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPipelineConfigsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GoferServer).ListPipelineConfigs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.Gofer/ListPipelineConfigs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GoferServer).ListPipelineConfigs(ctx, req.(*ListPipelineConfigsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Gofer_GetPipelineConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPipelineConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GoferServer).GetPipelineConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.Gofer/GetPipelineConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GoferServer).GetPipelineConfig(ctx, req.(*GetPipelineConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Gofer_DeletePipelineConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePipelineConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GoferServer).DeletePipelineConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.Gofer/DeletePipelineConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GoferServer).DeletePipelineConfig(ctx, req.(*DeletePipelineConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Gofer_ListDeployments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDeploymentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GoferServer).ListDeployments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.Gofer/ListDeployments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GoferServer).ListDeployments(ctx, req.(*ListDeploymentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Gofer_GetDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDeploymentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GoferServer).GetDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.Gofer/GetDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GoferServer).GetDeployment(ctx, req.(*GetDeploymentRequest)) } return interceptor(ctx, in, info, handler) } @@ -2510,17 +2670,37 @@ var Gofer_ServiceDesc = grpc.ServiceDesc{ Handler: _Gofer_DisablePipeline_Handler, }, { - MethodName: "CreatePipeline", - Handler: _Gofer_CreatePipeline_Handler, - }, - { - MethodName: "UpdatePipeline", - Handler: _Gofer_UpdatePipeline_Handler, + MethodName: "DeployPipeline", + Handler: _Gofer_DeployPipeline_Handler, }, { MethodName: "DeletePipeline", Handler: _Gofer_DeletePipeline_Handler, }, + { + MethodName: "RegisterPipelineConfig", + Handler: _Gofer_RegisterPipelineConfig_Handler, + }, + { + MethodName: "ListPipelineConfigs", + Handler: _Gofer_ListPipelineConfigs_Handler, + }, + { + MethodName: "GetPipelineConfig", + Handler: _Gofer_GetPipelineConfig_Handler, + }, + { + MethodName: "DeletePipelineConfig", + Handler: _Gofer_DeletePipelineConfig_Handler, + }, + { + MethodName: "ListDeployments", + Handler: _Gofer_ListDeployments_Handler, + }, + { + MethodName: "GetDeployment", + Handler: _Gofer_GetDeployment_Handler, + }, { MethodName: "GetRun", Handler: _Gofer_GetRun_Handler, diff --git a/proto/go/gofer_message.pb.go b/proto/go/gofer_message.pb.go deleted file mode 100644 index 7afce2c7..00000000 --- a/proto/go/gofer_message.pb.go +++ /dev/null @@ -1,4213 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.9 -// source: gofer_message.proto - -package _go - -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 Pipeline_PipelineState int32 - -const ( - Pipeline_PIPELINE_STATE_UNKNOWN Pipeline_PipelineState = 0 - Pipeline_ACTIVE Pipeline_PipelineState = 1 - Pipeline_DISABLED Pipeline_PipelineState = 2 -) - -// Enum value maps for Pipeline_PipelineState. -var ( - Pipeline_PipelineState_name = map[int32]string{ - 0: "PIPELINE_STATE_UNKNOWN", - 1: "ACTIVE", - 2: "DISABLED", - } - Pipeline_PipelineState_value = map[string]int32{ - "PIPELINE_STATE_UNKNOWN": 0, - "ACTIVE": 1, - "DISABLED": 2, - } -) - -func (x Pipeline_PipelineState) Enum() *Pipeline_PipelineState { - p := new(Pipeline_PipelineState) - *p = x - return p -} - -func (x Pipeline_PipelineState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Pipeline_PipelineState) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[0].Descriptor() -} - -func (Pipeline_PipelineState) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[0] -} - -func (x Pipeline_PipelineState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Pipeline_PipelineState.Descriptor instead. -func (Pipeline_PipelineState) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{2, 0} -} - -type Pipeline_ErrorKind int32 - -const ( - Pipeline_ERROR_KIND_UNKNOWN Pipeline_ErrorKind = 0 - Pipeline_TRIGGER_SUBSCRIPTION_FAILURE Pipeline_ErrorKind = 1 -) - -// Enum value maps for Pipeline_ErrorKind. -var ( - Pipeline_ErrorKind_name = map[int32]string{ - 0: "ERROR_KIND_UNKNOWN", - 1: "TRIGGER_SUBSCRIPTION_FAILURE", - } - Pipeline_ErrorKind_value = map[string]int32{ - "ERROR_KIND_UNKNOWN": 0, - "TRIGGER_SUBSCRIPTION_FAILURE": 1, - } -) - -func (x Pipeline_ErrorKind) Enum() *Pipeline_ErrorKind { - p := new(Pipeline_ErrorKind) - *p = x - return p -} - -func (x Pipeline_ErrorKind) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Pipeline_ErrorKind) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[1].Descriptor() -} - -func (Pipeline_ErrorKind) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[1] -} - -func (x Pipeline_ErrorKind) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Pipeline_ErrorKind.Descriptor instead. -func (Pipeline_ErrorKind) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{2, 1} -} - -type Run_RunState int32 - -const ( - Run_RUN_STATE_UNKNOWN Run_RunState = 0 - Run_PENDING Run_RunState = 1 - Run_RUNNING Run_RunState = 2 - Run_COMPLETE Run_RunState = 3 -) - -// Enum value maps for Run_RunState. -var ( - Run_RunState_name = map[int32]string{ - 0: "RUN_STATE_UNKNOWN", - 1: "PENDING", - 2: "RUNNING", - 3: "COMPLETE", - } - Run_RunState_value = map[string]int32{ - "RUN_STATE_UNKNOWN": 0, - "PENDING": 1, - "RUNNING": 2, - "COMPLETE": 3, - } -) - -func (x Run_RunState) Enum() *Run_RunState { - p := new(Run_RunState) - *p = x - return p -} - -func (x Run_RunState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Run_RunState) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[2].Descriptor() -} - -func (Run_RunState) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[2] -} - -func (x Run_RunState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Run_RunState.Descriptor instead. -func (Run_RunState) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{5, 0} -} - -type Run_RunStatus int32 - -const ( - Run_RUN_STATUS_UNKNOWN Run_RunStatus = 0 - Run_SUCCESSFUL Run_RunStatus = 1 - Run_FAILED Run_RunStatus = 2 - Run_CANCELLED Run_RunStatus = 3 -) - -// Enum value maps for Run_RunStatus. -var ( - Run_RunStatus_name = map[int32]string{ - 0: "RUN_STATUS_UNKNOWN", - 1: "SUCCESSFUL", - 2: "FAILED", - 3: "CANCELLED", - } - Run_RunStatus_value = map[string]int32{ - "RUN_STATUS_UNKNOWN": 0, - "SUCCESSFUL": 1, - "FAILED": 2, - "CANCELLED": 3, - } -) - -func (x Run_RunStatus) Enum() *Run_RunStatus { - p := new(Run_RunStatus) - *p = x - return p -} - -func (x Run_RunStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Run_RunStatus) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[3].Descriptor() -} - -func (Run_RunStatus) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[3] -} - -func (x Run_RunStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Run_RunStatus.Descriptor instead. -func (Run_RunStatus) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{5, 1} -} - -type RunStatusReason_RunStatusReasonKind int32 - -const ( - RunStatusReason_RUN_STATUS_REASON_UNKNOWN RunStatusReason_RunStatusReasonKind = 0 - RunStatusReason_ABNORMAL_EXIT RunStatusReason_RunStatusReasonKind = 1 - RunStatusReason_SCHEDULER_ERROR RunStatusReason_RunStatusReasonKind = 2 - RunStatusReason_FAILED_PRECONDITION RunStatusReason_RunStatusReasonKind = 3 - RunStatusReason_USER_CANCELLED RunStatusReason_RunStatusReasonKind = 4 - RunStatusReason_ADMIN_CANCELLED RunStatusReason_RunStatusReasonKind = 5 -) - -// Enum value maps for RunStatusReason_RunStatusReasonKind. -var ( - RunStatusReason_RunStatusReasonKind_name = map[int32]string{ - 0: "RUN_STATUS_REASON_UNKNOWN", - 1: "ABNORMAL_EXIT", - 2: "SCHEDULER_ERROR", - 3: "FAILED_PRECONDITION", - 4: "USER_CANCELLED", - 5: "ADMIN_CANCELLED", - } - RunStatusReason_RunStatusReasonKind_value = map[string]int32{ - "RUN_STATUS_REASON_UNKNOWN": 0, - "ABNORMAL_EXIT": 1, - "SCHEDULER_ERROR": 2, - "FAILED_PRECONDITION": 3, - "USER_CANCELLED": 4, - "ADMIN_CANCELLED": 5, - } -) - -func (x RunStatusReason_RunStatusReasonKind) Enum() *RunStatusReason_RunStatusReasonKind { - p := new(RunStatusReason_RunStatusReasonKind) - *p = x - return p -} - -func (x RunStatusReason_RunStatusReasonKind) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RunStatusReason_RunStatusReasonKind) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[4].Descriptor() -} - -func (RunStatusReason_RunStatusReasonKind) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[4] -} - -func (x RunStatusReason_RunStatusReasonKind) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RunStatusReason_RunStatusReasonKind.Descriptor instead. -func (RunStatusReason_RunStatusReasonKind) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{6, 0} -} - -type CustomTask_RequiredParentStatus int32 - -const ( - CustomTask_REQUIRED_PARENT_STATUS_UNKNOWN CustomTask_RequiredParentStatus = 0 - CustomTask_ANY CustomTask_RequiredParentStatus = 1 - CustomTask_SUCCESS CustomTask_RequiredParentStatus = 2 - CustomTask_FAILURE CustomTask_RequiredParentStatus = 3 -) - -// Enum value maps for CustomTask_RequiredParentStatus. -var ( - CustomTask_RequiredParentStatus_name = map[int32]string{ - 0: "REQUIRED_PARENT_STATUS_UNKNOWN", - 1: "ANY", - 2: "SUCCESS", - 3: "FAILURE", - } - CustomTask_RequiredParentStatus_value = map[string]int32{ - "REQUIRED_PARENT_STATUS_UNKNOWN": 0, - "ANY": 1, - "SUCCESS": 2, - "FAILURE": 3, - } -) - -func (x CustomTask_RequiredParentStatus) Enum() *CustomTask_RequiredParentStatus { - p := new(CustomTask_RequiredParentStatus) - *p = x - return p -} - -func (x CustomTask_RequiredParentStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CustomTask_RequiredParentStatus) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[5].Descriptor() -} - -func (CustomTask_RequiredParentStatus) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[5] -} - -func (x CustomTask_RequiredParentStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CustomTask_RequiredParentStatus.Descriptor instead. -func (CustomTask_RequiredParentStatus) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{8, 0} -} - -type PipelineCommonTaskSettings_RequiredParentStatus int32 - -const ( - PipelineCommonTaskSettings_REQUIRED_PARENT_STATUS_UNKNOWN PipelineCommonTaskSettings_RequiredParentStatus = 0 - PipelineCommonTaskSettings_ANY PipelineCommonTaskSettings_RequiredParentStatus = 1 - PipelineCommonTaskSettings_SUCCESS PipelineCommonTaskSettings_RequiredParentStatus = 2 - PipelineCommonTaskSettings_FAILURE PipelineCommonTaskSettings_RequiredParentStatus = 3 -) - -// Enum value maps for PipelineCommonTaskSettings_RequiredParentStatus. -var ( - PipelineCommonTaskSettings_RequiredParentStatus_name = map[int32]string{ - 0: "REQUIRED_PARENT_STATUS_UNKNOWN", - 1: "ANY", - 2: "SUCCESS", - 3: "FAILURE", - } - PipelineCommonTaskSettings_RequiredParentStatus_value = map[string]int32{ - "REQUIRED_PARENT_STATUS_UNKNOWN": 0, - "ANY": 1, - "SUCCESS": 2, - "FAILURE": 3, - } -) - -func (x PipelineCommonTaskSettings_RequiredParentStatus) Enum() *PipelineCommonTaskSettings_RequiredParentStatus { - p := new(PipelineCommonTaskSettings_RequiredParentStatus) - *p = x - return p -} - -func (x PipelineCommonTaskSettings_RequiredParentStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PipelineCommonTaskSettings_RequiredParentStatus) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[6].Descriptor() -} - -func (PipelineCommonTaskSettings_RequiredParentStatus) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[6] -} - -func (x PipelineCommonTaskSettings_RequiredParentStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PipelineCommonTaskSettings_RequiredParentStatus.Descriptor instead. -func (PipelineCommonTaskSettings_RequiredParentStatus) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{10, 0} -} - -type CustomTaskConfig_RequiredParentStatus int32 - -const ( - CustomTaskConfig_REQUIRED_PARENT_STATUS_UNKNOWN CustomTaskConfig_RequiredParentStatus = 0 - CustomTaskConfig_ANY CustomTaskConfig_RequiredParentStatus = 1 - CustomTaskConfig_SUCCESS CustomTaskConfig_RequiredParentStatus = 2 - CustomTaskConfig_FAILURE CustomTaskConfig_RequiredParentStatus = 3 -) - -// Enum value maps for CustomTaskConfig_RequiredParentStatus. -var ( - CustomTaskConfig_RequiredParentStatus_name = map[int32]string{ - 0: "REQUIRED_PARENT_STATUS_UNKNOWN", - 1: "ANY", - 2: "SUCCESS", - 3: "FAILURE", - } - CustomTaskConfig_RequiredParentStatus_value = map[string]int32{ - "REQUIRED_PARENT_STATUS_UNKNOWN": 0, - "ANY": 1, - "SUCCESS": 2, - "FAILURE": 3, - } -) - -func (x CustomTaskConfig_RequiredParentStatus) Enum() *CustomTaskConfig_RequiredParentStatus { - p := new(CustomTaskConfig_RequiredParentStatus) - *p = x - return p -} - -func (x CustomTaskConfig_RequiredParentStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CustomTaskConfig_RequiredParentStatus) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[7].Descriptor() -} - -func (CustomTaskConfig_RequiredParentStatus) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[7] -} - -func (x CustomTaskConfig_RequiredParentStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CustomTaskConfig_RequiredParentStatus.Descriptor instead. -func (CustomTaskConfig_RequiredParentStatus) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{11, 0} -} - -type CommonTaskConfig_RequiredParentStatus int32 - -const ( - CommonTaskConfig_REQUIRED_PARENT_STATUS_UNKNOWN CommonTaskConfig_RequiredParentStatus = 0 - CommonTaskConfig_ANY CommonTaskConfig_RequiredParentStatus = 1 - CommonTaskConfig_SUCCESS CommonTaskConfig_RequiredParentStatus = 2 - CommonTaskConfig_FAILURE CommonTaskConfig_RequiredParentStatus = 3 -) - -// Enum value maps for CommonTaskConfig_RequiredParentStatus. -var ( - CommonTaskConfig_RequiredParentStatus_name = map[int32]string{ - 0: "REQUIRED_PARENT_STATUS_UNKNOWN", - 1: "ANY", - 2: "SUCCESS", - 3: "FAILURE", - } - CommonTaskConfig_RequiredParentStatus_value = map[string]int32{ - "REQUIRED_PARENT_STATUS_UNKNOWN": 0, - "ANY": 1, - "SUCCESS": 2, - "FAILURE": 3, - } -) - -func (x CommonTaskConfig_RequiredParentStatus) Enum() *CommonTaskConfig_RequiredParentStatus { - p := new(CommonTaskConfig_RequiredParentStatus) - *p = x - return p -} - -func (x CommonTaskConfig_RequiredParentStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CommonTaskConfig_RequiredParentStatus) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[8].Descriptor() -} - -func (CommonTaskConfig_RequiredParentStatus) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[8] -} - -func (x CommonTaskConfig_RequiredParentStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CommonTaskConfig_RequiredParentStatus.Descriptor instead. -func (CommonTaskConfig_RequiredParentStatus) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{14, 0} -} - -type TaskRunStatusReason_Reason int32 - -const ( - TaskRunStatusReason_UNKNOWN TaskRunStatusReason_Reason = 0 - TaskRunStatusReason_ABNORMAL_EXIT TaskRunStatusReason_Reason = 1 - TaskRunStatusReason_SCHEDULER_ERROR TaskRunStatusReason_Reason = 2 - TaskRunStatusReason_FAILED_PRECONDITION TaskRunStatusReason_Reason = 3 - TaskRunStatusReason_CANCELLED TaskRunStatusReason_Reason = 4 - TaskRunStatusReason_ORPHANED TaskRunStatusReason_Reason = 5 -) - -// Enum value maps for TaskRunStatusReason_Reason. -var ( - TaskRunStatusReason_Reason_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ABNORMAL_EXIT", - 2: "SCHEDULER_ERROR", - 3: "FAILED_PRECONDITION", - 4: "CANCELLED", - 5: "ORPHANED", - } - TaskRunStatusReason_Reason_value = map[string]int32{ - "UNKNOWN": 0, - "ABNORMAL_EXIT": 1, - "SCHEDULER_ERROR": 2, - "FAILED_PRECONDITION": 3, - "CANCELLED": 4, - "ORPHANED": 5, - } -) - -func (x TaskRunStatusReason_Reason) Enum() *TaskRunStatusReason_Reason { - p := new(TaskRunStatusReason_Reason) - *p = x - return p -} - -func (x TaskRunStatusReason_Reason) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TaskRunStatusReason_Reason) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[9].Descriptor() -} - -func (TaskRunStatusReason_Reason) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[9] -} - -func (x TaskRunStatusReason_Reason) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TaskRunStatusReason_Reason.Descriptor instead. -func (TaskRunStatusReason_Reason) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{15, 0} -} - -type TaskRun_TaskRunState int32 - -const ( - TaskRun_UNKNOWN_STATE TaskRun_TaskRunState = 0 - TaskRun_PROCESSING TaskRun_TaskRunState = 1 - TaskRun_WAITING TaskRun_TaskRunState = 2 - TaskRun_RUNNING TaskRun_TaskRunState = 3 - TaskRun_COMPLETE TaskRun_TaskRunState = 4 -) - -// Enum value maps for TaskRun_TaskRunState. -var ( - TaskRun_TaskRunState_name = map[int32]string{ - 0: "UNKNOWN_STATE", - 1: "PROCESSING", - 2: "WAITING", - 3: "RUNNING", - 4: "COMPLETE", - } - TaskRun_TaskRunState_value = map[string]int32{ - "UNKNOWN_STATE": 0, - "PROCESSING": 1, - "WAITING": 2, - "RUNNING": 3, - "COMPLETE": 4, - } -) - -func (x TaskRun_TaskRunState) Enum() *TaskRun_TaskRunState { - p := new(TaskRun_TaskRunState) - *p = x - return p -} - -func (x TaskRun_TaskRunState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TaskRun_TaskRunState) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[10].Descriptor() -} - -func (TaskRun_TaskRunState) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[10] -} - -func (x TaskRun_TaskRunState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TaskRun_TaskRunState.Descriptor instead. -func (TaskRun_TaskRunState) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{16, 0} -} - -type TaskRun_TaskRunStatus int32 - -const ( - TaskRun_UNKNOWN_STATUS TaskRun_TaskRunStatus = 0 - TaskRun_SUCCESSFUL TaskRun_TaskRunStatus = 1 - TaskRun_FAILED TaskRun_TaskRunStatus = 2 - TaskRun_CANCELLED TaskRun_TaskRunStatus = 3 - TaskRun_SKIPPED TaskRun_TaskRunStatus = 4 -) - -// Enum value maps for TaskRun_TaskRunStatus. -var ( - TaskRun_TaskRunStatus_name = map[int32]string{ - 0: "UNKNOWN_STATUS", - 1: "SUCCESSFUL", - 2: "FAILED", - 3: "CANCELLED", - 4: "SKIPPED", - } - TaskRun_TaskRunStatus_value = map[string]int32{ - "UNKNOWN_STATUS": 0, - "SUCCESSFUL": 1, - "FAILED": 2, - "CANCELLED": 3, - "SKIPPED": 4, - } -) - -func (x TaskRun_TaskRunStatus) Enum() *TaskRun_TaskRunStatus { - p := new(TaskRun_TaskRunStatus) - *p = x - return p -} - -func (x TaskRun_TaskRunStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TaskRun_TaskRunStatus) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[11].Descriptor() -} - -func (TaskRun_TaskRunStatus) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[11] -} - -func (x TaskRun_TaskRunStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TaskRun_TaskRunStatus.Descriptor instead. -func (TaskRun_TaskRunStatus) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{16, 1} -} - -type Trigger_TriggerState int32 - -const ( - Trigger_UNKNOWN_STATE Trigger_TriggerState = 0 - Trigger_PROCESSING Trigger_TriggerState = 1 - Trigger_RUNNING Trigger_TriggerState = 2 - Trigger_EXITED Trigger_TriggerState = 3 -) - -// Enum value maps for Trigger_TriggerState. -var ( - Trigger_TriggerState_name = map[int32]string{ - 0: "UNKNOWN_STATE", - 1: "PROCESSING", - 2: "RUNNING", - 3: "EXITED", - } - Trigger_TriggerState_value = map[string]int32{ - "UNKNOWN_STATE": 0, - "PROCESSING": 1, - "RUNNING": 2, - "EXITED": 3, - } -) - -func (x Trigger_TriggerState) Enum() *Trigger_TriggerState { - p := new(Trigger_TriggerState) - *p = x - return p -} - -func (x Trigger_TriggerState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Trigger_TriggerState) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[12].Descriptor() -} - -func (Trigger_TriggerState) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[12] -} - -func (x Trigger_TriggerState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Trigger_TriggerState.Descriptor instead. -func (Trigger_TriggerState) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{17, 0} -} - -type Trigger_TriggerStatus int32 - -const ( - Trigger_UNKNOWN_STATUS Trigger_TriggerStatus = 0 - Trigger_ENABLED Trigger_TriggerStatus = 1 - Trigger_DISABLED Trigger_TriggerStatus = 2 -) - -// Enum value maps for Trigger_TriggerStatus. -var ( - Trigger_TriggerStatus_name = map[int32]string{ - 0: "UNKNOWN_STATUS", - 1: "ENABLED", - 2: "DISABLED", - } - Trigger_TriggerStatus_value = map[string]int32{ - "UNKNOWN_STATUS": 0, - "ENABLED": 1, - "DISABLED": 2, - } -) - -func (x Trigger_TriggerStatus) Enum() *Trigger_TriggerStatus { - p := new(Trigger_TriggerStatus) - *p = x - return p -} - -func (x Trigger_TriggerStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Trigger_TriggerStatus) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[13].Descriptor() -} - -func (Trigger_TriggerStatus) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[13] -} - -func (x Trigger_TriggerStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Trigger_TriggerStatus.Descriptor instead. -func (Trigger_TriggerStatus) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{17, 1} -} - -type TriggerRegistration_TriggerStatus int32 - -const ( - TriggerRegistration_UNKNOWN_STATUS TriggerRegistration_TriggerStatus = 0 - TriggerRegistration_ENABLED TriggerRegistration_TriggerStatus = 1 - TriggerRegistration_DISABLED TriggerRegistration_TriggerStatus = 2 -) - -// Enum value maps for TriggerRegistration_TriggerStatus. -var ( - TriggerRegistration_TriggerStatus_name = map[int32]string{ - 0: "UNKNOWN_STATUS", - 1: "ENABLED", - 2: "DISABLED", - } - TriggerRegistration_TriggerStatus_value = map[string]int32{ - "UNKNOWN_STATUS": 0, - "ENABLED": 1, - "DISABLED": 2, - } -) - -func (x TriggerRegistration_TriggerStatus) Enum() *TriggerRegistration_TriggerStatus { - p := new(TriggerRegistration_TriggerStatus) - *p = x - return p -} - -func (x TriggerRegistration_TriggerStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TriggerRegistration_TriggerStatus) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[14].Descriptor() -} - -func (TriggerRegistration_TriggerStatus) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[14] -} - -func (x TriggerRegistration_TriggerStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TriggerRegistration_TriggerStatus.Descriptor instead. -func (TriggerRegistration_TriggerStatus) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{18, 0} -} - -type CommonTaskRegistration_Status int32 - -const ( - CommonTaskRegistration_UNKNOWN CommonTaskRegistration_Status = 0 - CommonTaskRegistration_ENABLED CommonTaskRegistration_Status = 1 - CommonTaskRegistration_DISABLED CommonTaskRegistration_Status = 2 -) - -// Enum value maps for CommonTaskRegistration_Status. -var ( - CommonTaskRegistration_Status_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ENABLED", - 2: "DISABLED", - } - CommonTaskRegistration_Status_value = map[string]int32{ - "UNKNOWN": 0, - "ENABLED": 1, - "DISABLED": 2, - } -) - -func (x CommonTaskRegistration_Status) Enum() *CommonTaskRegistration_Status { - p := new(CommonTaskRegistration_Status) - *p = x - return p -} - -func (x CommonTaskRegistration_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CommonTaskRegistration_Status) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[15].Descriptor() -} - -func (CommonTaskRegistration_Status) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[15] -} - -func (x CommonTaskRegistration_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CommonTaskRegistration_Status.Descriptor instead. -func (CommonTaskRegistration_Status) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{19, 0} -} - -type Token_Kind int32 - -const ( - Token_UNKNOWN Token_Kind = 0 - Token_MANAGEMENT Token_Kind = 1 - Token_CLIENT Token_Kind = 2 -) - -// Enum value maps for Token_Kind. -var ( - Token_Kind_name = map[int32]string{ - 0: "UNKNOWN", - 1: "MANAGEMENT", - 2: "CLIENT", - } - Token_Kind_value = map[string]int32{ - "UNKNOWN": 0, - "MANAGEMENT": 1, - "CLIENT": 2, - } -) - -func (x Token_Kind) Enum() *Token_Kind { - p := new(Token_Kind) - *p = x - return p -} - -func (x Token_Kind) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Token_Kind) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[16].Descriptor() -} - -func (Token_Kind) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[16] -} - -func (x Token_Kind) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Token_Kind.Descriptor instead. -func (Token_Kind) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{21, 0} -} - -type TriggerResult_Status int32 - -const ( - TriggerResult_UNKNOWN TriggerResult_Status = 0 - TriggerResult_FAILURE TriggerResult_Status = 1 - TriggerResult_SUCCESS TriggerResult_Status = 2 - TriggerResult_SKIPPED TriggerResult_Status = 3 -) - -// Enum value maps for TriggerResult_Status. -var ( - TriggerResult_Status_name = map[int32]string{ - 0: "UNKNOWN", - 1: "FAILURE", - 2: "SUCCESS", - 3: "SKIPPED", - } - TriggerResult_Status_value = map[string]int32{ - "UNKNOWN": 0, - "FAILURE": 1, - "SUCCESS": 2, - "SKIPPED": 3, - } -) - -func (x TriggerResult_Status) Enum() *TriggerResult_Status { - p := new(TriggerResult_Status) - *p = x - return p -} - -func (x TriggerResult_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TriggerResult_Status) Descriptor() protoreflect.EnumDescriptor { - return file_gofer_message_proto_enumTypes[17].Descriptor() -} - -func (TriggerResult_Status) Type() protoreflect.EnumType { - return &file_gofer_message_proto_enumTypes[17] -} - -func (x TriggerResult_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TriggerResult_Status.Descriptor instead. -func (TriggerResult_Status) EnumDescriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{22, 0} -} - -type Namespace struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Created int64 `protobuf:"varint,4,opt,name=created,proto3" json:"created,omitempty"` - Modified int64 `protobuf:"varint,5,opt,name=modified,proto3" json:"modified,omitempty"` -} - -func (x *Namespace) Reset() { - *x = Namespace{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Namespace) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Namespace) ProtoMessage() {} - -func (x *Namespace) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 Namespace.ProtoReflect.Descriptor instead. -func (*Namespace) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{0} -} - -func (x *Namespace) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Namespace) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Namespace) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Namespace) GetCreated() int64 { - if x != nil { - return x.Created - } - return 0 -} - -func (x *Namespace) GetModified() int64 { - if x != nil { - return x.Modified - } - return 0 -} - -type Variable struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` -} - -func (x *Variable) Reset() { - *x = Variable{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[1] - 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_gofer_message_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 Variable.ProtoReflect.Descriptor instead. -func (*Variable) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{1} -} - -func (x *Variable) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Variable) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *Variable) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -type Pipeline struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - Parallelism int64 `protobuf:"varint,5,opt,name=parallelism,proto3" json:"parallelism,omitempty"` - Created int64 `protobuf:"varint,6,opt,name=created,proto3" json:"created,omitempty"` - Modified int64 `protobuf:"varint,7,opt,name=modified,proto3" json:"modified,omitempty"` - State Pipeline_PipelineState `protobuf:"varint,8,opt,name=state,proto3,enum=proto.Pipeline_PipelineState" json:"state,omitempty"` - CustomTasks map[string]*CustomTask `protobuf:"bytes,9,rep,name=custom_tasks,json=customTasks,proto3" json:"custom_tasks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Triggers map[string]*PipelineTriggerSettings `protobuf:"bytes,10,rep,name=triggers,proto3" json:"triggers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - CommonTasks map[string]*PipelineCommonTaskSettings `protobuf:"bytes,11,rep,name=common_tasks,json=commonTasks,proto3" json:"common_tasks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Errors []*Pipeline_Error `protobuf:"bytes,12,rep,name=errors,proto3" json:"errors,omitempty"` -} - -func (x *Pipeline) Reset() { - *x = Pipeline{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Pipeline) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Pipeline) ProtoMessage() {} - -func (x *Pipeline) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 Pipeline.ProtoReflect.Descriptor instead. -func (*Pipeline) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{2} -} - -func (x *Pipeline) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *Pipeline) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Pipeline) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Pipeline) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Pipeline) GetParallelism() int64 { - if x != nil { - return x.Parallelism - } - return 0 -} - -func (x *Pipeline) GetCreated() int64 { - if x != nil { - return x.Created - } - return 0 -} - -func (x *Pipeline) GetModified() int64 { - if x != nil { - return x.Modified - } - return 0 -} - -func (x *Pipeline) GetState() Pipeline_PipelineState { - if x != nil { - return x.State - } - return Pipeline_PIPELINE_STATE_UNKNOWN -} - -func (x *Pipeline) GetCustomTasks() map[string]*CustomTask { - if x != nil { - return x.CustomTasks - } - return nil -} - -func (x *Pipeline) GetTriggers() map[string]*PipelineTriggerSettings { - if x != nil { - return x.Triggers - } - return nil -} - -func (x *Pipeline) GetCommonTasks() map[string]*PipelineCommonTaskSettings { - if x != nil { - return x.CommonTasks - } - return nil -} - -func (x *Pipeline) GetErrors() []*Pipeline_Error { - if x != nil { - return x.Errors - } - return nil -} - -type PipelineTaskConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Task: - // - // *PipelineTaskConfig_CustomTask - // *PipelineTaskConfig_CommonTask - Task isPipelineTaskConfig_Task `protobuf_oneof:"task"` -} - -func (x *PipelineTaskConfig) Reset() { - *x = PipelineTaskConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PipelineTaskConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PipelineTaskConfig) ProtoMessage() {} - -func (x *PipelineTaskConfig) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 PipelineTaskConfig.ProtoReflect.Descriptor instead. -func (*PipelineTaskConfig) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{3} -} - -func (m *PipelineTaskConfig) GetTask() isPipelineTaskConfig_Task { - if m != nil { - return m.Task - } - return nil -} - -func (x *PipelineTaskConfig) GetCustomTask() *CustomTaskConfig { - if x, ok := x.GetTask().(*PipelineTaskConfig_CustomTask); ok { - return x.CustomTask - } - return nil -} - -func (x *PipelineTaskConfig) GetCommonTask() *CommonTaskConfig { - if x, ok := x.GetTask().(*PipelineTaskConfig_CommonTask); ok { - return x.CommonTask - } - return nil -} - -type isPipelineTaskConfig_Task interface { - isPipelineTaskConfig_Task() -} - -type PipelineTaskConfig_CustomTask struct { - CustomTask *CustomTaskConfig `protobuf:"bytes,1,opt,name=custom_task,json=customTask,proto3,oneof"` -} - -type PipelineTaskConfig_CommonTask struct { - CommonTask *CommonTaskConfig `protobuf:"bytes,2,opt,name=common_task,json=commonTask,proto3,oneof"` -} - -func (*PipelineTaskConfig_CustomTask) isPipelineTaskConfig_Task() {} - -func (*PipelineTaskConfig_CommonTask) isPipelineTaskConfig_Task() {} - -type PipelineConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Parallelism int64 `protobuf:"varint,4,opt,name=parallelism,proto3" json:"parallelism,omitempty"` - Tasks []*PipelineTaskConfig `protobuf:"bytes,5,rep,name=tasks,proto3" json:"tasks,omitempty"` - Triggers []*PipelineTriggerConfig `protobuf:"bytes,6,rep,name=triggers,proto3" json:"triggers,omitempty"` -} - -func (x *PipelineConfig) Reset() { - *x = PipelineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PipelineConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PipelineConfig) ProtoMessage() {} - -func (x *PipelineConfig) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 PipelineConfig.ProtoReflect.Descriptor instead. -func (*PipelineConfig) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{4} -} - -func (x *PipelineConfig) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *PipelineConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PipelineConfig) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *PipelineConfig) GetParallelism() int64 { - if x != nil { - return x.Parallelism - } - return 0 -} - -func (x *PipelineConfig) GetTasks() []*PipelineTaskConfig { - if x != nil { - return x.Tasks - } - return nil -} - -func (x *PipelineConfig) GetTriggers() []*PipelineTriggerConfig { - if x != nil { - return x.Triggers - } - return nil -} - -type Run struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Pipeline string `protobuf:"bytes,2,opt,name=pipeline,proto3" json:"pipeline,omitempty"` - Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` - Started int64 `protobuf:"varint,4,opt,name=started,proto3" json:"started,omitempty"` - Ended int64 `protobuf:"varint,5,opt,name=ended,proto3" json:"ended,omitempty"` - State Run_RunState `protobuf:"varint,6,opt,name=state,proto3,enum=proto.Run_RunState" json:"state,omitempty"` - Status Run_RunStatus `protobuf:"varint,7,opt,name=status,proto3,enum=proto.Run_RunStatus" json:"status,omitempty"` - StatusReason *RunStatusReason `protobuf:"bytes,8,opt,name=status_reason,json=statusReason,proto3" json:"status_reason,omitempty"` - Trigger *Run_RunTriggerInfo `protobuf:"bytes,10,opt,name=trigger,proto3" json:"trigger,omitempty"` - Variables []*Variable `protobuf:"bytes,11,rep,name=variables,proto3" json:"variables,omitempty"` - StoreObjectsExpired bool `protobuf:"varint,12,opt,name=store_objects_expired,json=storeObjectsExpired,proto3" json:"store_objects_expired,omitempty"` -} - -func (x *Run) Reset() { - *x = Run{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Run) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Run) ProtoMessage() {} - -func (x *Run) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 Run.ProtoReflect.Descriptor instead. -func (*Run) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{5} -} - -func (x *Run) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *Run) GetPipeline() string { - if x != nil { - return x.Pipeline - } - return "" -} - -func (x *Run) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Run) GetStarted() int64 { - if x != nil { - return x.Started - } - return 0 -} - -func (x *Run) GetEnded() int64 { - if x != nil { - return x.Ended - } - return 0 -} - -func (x *Run) GetState() Run_RunState { - if x != nil { - return x.State - } - return Run_RUN_STATE_UNKNOWN -} - -func (x *Run) GetStatus() Run_RunStatus { - if x != nil { - return x.Status - } - return Run_RUN_STATUS_UNKNOWN -} - -func (x *Run) GetStatusReason() *RunStatusReason { - if x != nil { - return x.StatusReason - } - return nil -} - -func (x *Run) GetTrigger() *Run_RunTriggerInfo { - if x != nil { - return x.Trigger - } - return nil -} - -func (x *Run) GetVariables() []*Variable { - if x != nil { - return x.Variables - } - return nil -} - -func (x *Run) GetStoreObjectsExpired() bool { - if x != nil { - return x.StoreObjectsExpired - } - return false -} - -type RunStatusReason struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Reason RunStatusReason_RunStatusReasonKind `protobuf:"varint,1,opt,name=reason,proto3,enum=proto.RunStatusReason_RunStatusReasonKind" json:"reason,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *RunStatusReason) Reset() { - *x = RunStatusReason{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RunStatusReason) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RunStatusReason) ProtoMessage() {} - -func (x *RunStatusReason) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 RunStatusReason.ProtoReflect.Descriptor instead. -func (*RunStatusReason) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{6} -} - -func (x *RunStatusReason) GetReason() RunStatusReason_RunStatusReasonKind { - if x != nil { - return x.Reason - } - return RunStatusReason_RUN_STATUS_REASON_UNKNOWN -} - -func (x *RunStatusReason) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -type RegistryAuth struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - Pass string `protobuf:"bytes,2,opt,name=pass,proto3" json:"pass,omitempty"` -} - -func (x *RegistryAuth) Reset() { - *x = RegistryAuth{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegistryAuth) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegistryAuth) ProtoMessage() {} - -func (x *RegistryAuth) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 RegistryAuth.ProtoReflect.Descriptor instead. -func (*RegistryAuth) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{7} -} - -func (x *RegistryAuth) GetUser() string { - if x != nil { - return x.User - } - return "" -} - -func (x *RegistryAuth) GetPass() string { - if x != nil { - return x.Pass - } - return "" -} - -type CustomTask struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` - RegistryAuth *RegistryAuth `protobuf:"bytes,4,opt,name=registry_auth,json=registryAuth,proto3" json:"registry_auth,omitempty"` - DependsOn map[string]CustomTask_RequiredParentStatus `protobuf:"bytes,5,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=proto.CustomTask_RequiredParentStatus"` - Variables []*Variable `protobuf:"bytes,6,rep,name=variables,proto3" json:"variables,omitempty"` - Entrypoint []string `protobuf:"bytes,7,rep,name=entrypoint,proto3" json:"entrypoint,omitempty"` - Command []string `protobuf:"bytes,8,rep,name=command,proto3" json:"command,omitempty"` - InjectApiToken bool `protobuf:"varint,9,opt,name=inject_api_token,json=injectApiToken,proto3" json:"inject_api_token,omitempty"` -} - -func (x *CustomTask) Reset() { - *x = CustomTask{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTask) ProtoMessage() {} - -func (x *CustomTask) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 CustomTask.ProtoReflect.Descriptor instead. -func (*CustomTask) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{8} -} - -func (x *CustomTask) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *CustomTask) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *CustomTask) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *CustomTask) GetRegistryAuth() *RegistryAuth { - if x != nil { - return x.RegistryAuth - } - return nil -} - -func (x *CustomTask) GetDependsOn() map[string]CustomTask_RequiredParentStatus { - if x != nil { - return x.DependsOn - } - return nil -} - -func (x *CustomTask) GetVariables() []*Variable { - if x != nil { - return x.Variables - } - return nil -} - -func (x *CustomTask) GetEntrypoint() []string { - if x != nil { - return x.Entrypoint - } - return nil -} - -func (x *CustomTask) GetCommand() []string { - if x != nil { - return x.Command - } - return nil -} - -func (x *CustomTask) GetInjectApiToken() bool { - if x != nil { - return x.InjectApiToken - } - return false -} - -type PipelineTriggerSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` - Settings map[string]string `protobuf:"bytes,3,rep,name=settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *PipelineTriggerSettings) Reset() { - *x = PipelineTriggerSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PipelineTriggerSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PipelineTriggerSettings) ProtoMessage() {} - -func (x *PipelineTriggerSettings) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 PipelineTriggerSettings.ProtoReflect.Descriptor instead. -func (*PipelineTriggerSettings) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{9} -} - -func (x *PipelineTriggerSettings) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PipelineTriggerSettings) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *PipelineTriggerSettings) GetSettings() map[string]string { - if x != nil { - return x.Settings - } - return nil -} - -type PipelineCommonTaskSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - DependsOn map[string]PipelineCommonTaskSettings_RequiredParentStatus `protobuf:"bytes,4,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=proto.PipelineCommonTaskSettings_RequiredParentStatus"` - Settings map[string]string `protobuf:"bytes,5,rep,name=settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - InjectApiToken bool `protobuf:"varint,6,opt,name=inject_api_token,json=injectApiToken,proto3" json:"inject_api_token,omitempty"` -} - -func (x *PipelineCommonTaskSettings) Reset() { - *x = PipelineCommonTaskSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PipelineCommonTaskSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PipelineCommonTaskSettings) ProtoMessage() {} - -func (x *PipelineCommonTaskSettings) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 PipelineCommonTaskSettings.ProtoReflect.Descriptor instead. -func (*PipelineCommonTaskSettings) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{10} -} - -func (x *PipelineCommonTaskSettings) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PipelineCommonTaskSettings) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *PipelineCommonTaskSettings) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *PipelineCommonTaskSettings) GetDependsOn() map[string]PipelineCommonTaskSettings_RequiredParentStatus { - if x != nil { - return x.DependsOn - } - return nil -} - -func (x *PipelineCommonTaskSettings) GetSettings() map[string]string { - if x != nil { - return x.Settings - } - return nil -} - -func (x *PipelineCommonTaskSettings) GetInjectApiToken() bool { - if x != nil { - return x.InjectApiToken - } - return false -} - -type CustomTaskConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` - RegistryAuth *RegistryAuth `protobuf:"bytes,4,opt,name=registry_auth,json=registryAuth,proto3" json:"registry_auth,omitempty"` - DependsOn map[string]CustomTaskConfig_RequiredParentStatus `protobuf:"bytes,5,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=proto.CustomTaskConfig_RequiredParentStatus"` - Variables map[string]string `protobuf:"bytes,6,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Entrypoint []string `protobuf:"bytes,7,rep,name=entrypoint,proto3" json:"entrypoint,omitempty"` - Command []string `protobuf:"bytes,8,rep,name=command,proto3" json:"command,omitempty"` - InjectApiToken bool `protobuf:"varint,9,opt,name=inject_api_token,json=injectApiToken,proto3" json:"inject_api_token,omitempty"` -} - -func (x *CustomTaskConfig) Reset() { - *x = CustomTaskConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTaskConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTaskConfig) ProtoMessage() {} - -func (x *CustomTaskConfig) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 CustomTaskConfig.ProtoReflect.Descriptor instead. -func (*CustomTaskConfig) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{11} -} - -func (x *CustomTaskConfig) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *CustomTaskConfig) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *CustomTaskConfig) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *CustomTaskConfig) GetRegistryAuth() *RegistryAuth { - if x != nil { - return x.RegistryAuth - } - return nil -} - -func (x *CustomTaskConfig) GetDependsOn() map[string]CustomTaskConfig_RequiredParentStatus { - if x != nil { - return x.DependsOn - } - return nil -} - -func (x *CustomTaskConfig) GetVariables() map[string]string { - if x != nil { - return x.Variables - } - return nil -} - -func (x *CustomTaskConfig) GetEntrypoint() []string { - if x != nil { - return x.Entrypoint - } - return nil -} - -func (x *CustomTaskConfig) GetCommand() []string { - if x != nil { - return x.Command - } - return nil -} - -func (x *CustomTaskConfig) GetInjectApiToken() bool { - if x != nil { - return x.InjectApiToken - } - return false -} - -type PipelineTriggerConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` - Settings map[string]string `protobuf:"bytes,3,rep,name=settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *PipelineTriggerConfig) Reset() { - *x = PipelineTriggerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PipelineTriggerConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PipelineTriggerConfig) ProtoMessage() {} - -func (x *PipelineTriggerConfig) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 PipelineTriggerConfig.ProtoReflect.Descriptor instead. -func (*PipelineTriggerConfig) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{12} -} - -func (x *PipelineTriggerConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PipelineTriggerConfig) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *PipelineTriggerConfig) GetSettings() map[string]string { - if x != nil { - return x.Settings - } - return nil -} - -type CommonTask struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Settings *PipelineCommonTaskSettings `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"` - Registration *CommonTaskRegistration `protobuf:"bytes,2,opt,name=registration,proto3" json:"registration,omitempty"` -} - -func (x *CommonTask) Reset() { - *x = CommonTask{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonTask) ProtoMessage() {} - -func (x *CommonTask) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 CommonTask.ProtoReflect.Descriptor instead. -func (*CommonTask) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{13} -} - -func (x *CommonTask) GetSettings() *PipelineCommonTaskSettings { - if x != nil { - return x.Settings - } - return nil -} - -func (x *CommonTask) GetRegistration() *CommonTaskRegistration { - if x != nil { - return x.Registration - } - return nil -} - -type CommonTaskConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - DependsOn map[string]CommonTaskConfig_RequiredParentStatus `protobuf:"bytes,4,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=proto.CommonTaskConfig_RequiredParentStatus"` - Settings map[string]string `protobuf:"bytes,5,rep,name=settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - InjectApiToken bool `protobuf:"varint,6,opt,name=inject_api_token,json=injectApiToken,proto3" json:"inject_api_token,omitempty"` -} - -func (x *CommonTaskConfig) Reset() { - *x = CommonTaskConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonTaskConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonTaskConfig) ProtoMessage() {} - -func (x *CommonTaskConfig) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 CommonTaskConfig.ProtoReflect.Descriptor instead. -func (*CommonTaskConfig) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{14} -} - -func (x *CommonTaskConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CommonTaskConfig) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *CommonTaskConfig) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *CommonTaskConfig) GetDependsOn() map[string]CommonTaskConfig_RequiredParentStatus { - if x != nil { - return x.DependsOn - } - return nil -} - -func (x *CommonTaskConfig) GetSettings() map[string]string { - if x != nil { - return x.Settings - } - return nil -} - -func (x *CommonTaskConfig) GetInjectApiToken() bool { - if x != nil { - return x.InjectApiToken - } - return false -} - -type TaskRunStatusReason struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Reason TaskRunStatusReason_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=proto.TaskRunStatusReason_Reason" json:"reason,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *TaskRunStatusReason) Reset() { - *x = TaskRunStatusReason{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TaskRunStatusReason) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskRunStatusReason) ProtoMessage() {} - -func (x *TaskRunStatusReason) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 TaskRunStatusReason.ProtoReflect.Descriptor instead. -func (*TaskRunStatusReason) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{15} -} - -func (x *TaskRunStatusReason) GetReason() TaskRunStatusReason_Reason { - if x != nil { - return x.Reason - } - return TaskRunStatusReason_UNKNOWN -} - -func (x *TaskRunStatusReason) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -type TaskRun struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Created int64 `protobuf:"varint,1,opt,name=created,proto3" json:"created,omitempty"` - Ended int64 `protobuf:"varint,2,opt,name=ended,proto3" json:"ended,omitempty"` - ExitCode int64 `protobuf:"varint,3,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` - StatusReason *TaskRunStatusReason `protobuf:"bytes,4,opt,name=status_reason,json=statusReason,proto3" json:"status_reason,omitempty"` - Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` - LogsExpired bool `protobuf:"varint,6,opt,name=logs_expired,json=logsExpired,proto3" json:"logs_expired,omitempty"` - LogsRemoved bool `protobuf:"varint,7,opt,name=logs_removed,json=logsRemoved,proto3" json:"logs_removed,omitempty"` - Namespace string `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"` - Pipeline string `protobuf:"bytes,9,opt,name=pipeline,proto3" json:"pipeline,omitempty"` - Run int64 `protobuf:"varint,10,opt,name=run,proto3" json:"run,omitempty"` - Started int64 `protobuf:"varint,11,opt,name=started,proto3" json:"started,omitempty"` - State TaskRun_TaskRunState `protobuf:"varint,12,opt,name=state,proto3,enum=proto.TaskRun_TaskRunState" json:"state,omitempty"` - Status TaskRun_TaskRunStatus `protobuf:"varint,13,opt,name=status,proto3,enum=proto.TaskRun_TaskRunStatus" json:"status,omitempty"` - // Types that are assignable to Task: - // - // *TaskRun_CustomTask - // *TaskRun_CommonTask - Task isTaskRun_Task `protobuf_oneof:"task"` - Variables []*Variable `protobuf:"bytes,16,rep,name=variables,proto3" json:"variables,omitempty"` -} - -func (x *TaskRun) Reset() { - *x = TaskRun{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TaskRun) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskRun) ProtoMessage() {} - -func (x *TaskRun) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 TaskRun.ProtoReflect.Descriptor instead. -func (*TaskRun) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{16} -} - -func (x *TaskRun) GetCreated() int64 { - if x != nil { - return x.Created - } - return 0 -} - -func (x *TaskRun) GetEnded() int64 { - if x != nil { - return x.Ended - } - return 0 -} - -func (x *TaskRun) GetExitCode() int64 { - if x != nil { - return x.ExitCode - } - return 0 -} - -func (x *TaskRun) GetStatusReason() *TaskRunStatusReason { - if x != nil { - return x.StatusReason - } - return nil -} - -func (x *TaskRun) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *TaskRun) GetLogsExpired() bool { - if x != nil { - return x.LogsExpired - } - return false -} - -func (x *TaskRun) GetLogsRemoved() bool { - if x != nil { - return x.LogsRemoved - } - return false -} - -func (x *TaskRun) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *TaskRun) GetPipeline() string { - if x != nil { - return x.Pipeline - } - return "" -} - -func (x *TaskRun) GetRun() int64 { - if x != nil { - return x.Run - } - return 0 -} - -func (x *TaskRun) GetStarted() int64 { - if x != nil { - return x.Started - } - return 0 -} - -func (x *TaskRun) GetState() TaskRun_TaskRunState { - if x != nil { - return x.State - } - return TaskRun_UNKNOWN_STATE -} - -func (x *TaskRun) GetStatus() TaskRun_TaskRunStatus { - if x != nil { - return x.Status - } - return TaskRun_UNKNOWN_STATUS -} - -func (m *TaskRun) GetTask() isTaskRun_Task { - if m != nil { - return m.Task - } - return nil -} - -func (x *TaskRun) GetCustomTask() *CustomTask { - if x, ok := x.GetTask().(*TaskRun_CustomTask); ok { - return x.CustomTask - } - return nil -} - -func (x *TaskRun) GetCommonTask() *CommonTask { - if x, ok := x.GetTask().(*TaskRun_CommonTask); ok { - return x.CommonTask - } - return nil -} - -func (x *TaskRun) GetVariables() []*Variable { - if x != nil { - return x.Variables - } - return nil -} - -type isTaskRun_Task interface { - isTaskRun_Task() -} - -type TaskRun_CustomTask struct { - CustomTask *CustomTask `protobuf:"bytes,14,opt,name=custom_task,json=customTask,proto3,oneof"` -} - -type TaskRun_CommonTask struct { - CommonTask *CommonTask `protobuf:"bytes,15,opt,name=common_task,json=commonTask,proto3,oneof"` -} - -func (*TaskRun_CustomTask) isTaskRun_Task() {} - -func (*TaskRun_CommonTask) isTaskRun_Task() {} - -type Trigger struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` - Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` - Started int64 `protobuf:"varint,4,opt,name=started,proto3" json:"started,omitempty"` - State Trigger_TriggerState `protobuf:"varint,5,opt,name=state,proto3,enum=proto.Trigger_TriggerState" json:"state,omitempty"` - Status Trigger_TriggerStatus `protobuf:"varint,6,opt,name=status,proto3,enum=proto.Trigger_TriggerStatus" json:"status,omitempty"` - Documentation string `protobuf:"bytes,7,opt,name=documentation,proto3" json:"documentation,omitempty"` -} - -func (x *Trigger) Reset() { - *x = Trigger{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Trigger) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Trigger) ProtoMessage() {} - -func (x *Trigger) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 Trigger.ProtoReflect.Descriptor instead. -func (*Trigger) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{17} -} - -func (x *Trigger) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Trigger) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *Trigger) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Trigger) GetStarted() int64 { - if x != nil { - return x.Started - } - return 0 -} - -func (x *Trigger) GetState() Trigger_TriggerState { - if x != nil { - return x.State - } - return Trigger_UNKNOWN_STATE -} - -func (x *Trigger) GetStatus() Trigger_TriggerStatus { - if x != nil { - return x.Status - } - return Trigger_UNKNOWN_STATUS -} - -func (x *Trigger) GetDocumentation() string { - if x != nil { - return x.Documentation - } - return "" -} - -type TriggerRegistration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` - User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` - Pass string `protobuf:"bytes,4,opt,name=pass,proto3" json:"pass,omitempty"` - Variables map[string]string `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Created int64 `protobuf:"varint,6,opt,name=created,proto3" json:"created,omitempty"` - Status TriggerRegistration_TriggerStatus `protobuf:"varint,7,opt,name=status,proto3,enum=proto.TriggerRegistration_TriggerStatus" json:"status,omitempty"` -} - -func (x *TriggerRegistration) Reset() { - *x = TriggerRegistration{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TriggerRegistration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TriggerRegistration) ProtoMessage() {} - -func (x *TriggerRegistration) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 TriggerRegistration.ProtoReflect.Descriptor instead. -func (*TriggerRegistration) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{18} -} - -func (x *TriggerRegistration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TriggerRegistration) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *TriggerRegistration) GetUser() string { - if x != nil { - return x.User - } - return "" -} - -func (x *TriggerRegistration) GetPass() string { - if x != nil { - return x.Pass - } - return "" -} - -func (x *TriggerRegistration) GetVariables() map[string]string { - if x != nil { - return x.Variables - } - return nil -} - -func (x *TriggerRegistration) GetCreated() int64 { - if x != nil { - return x.Created - } - return 0 -} - -func (x *TriggerRegistration) GetStatus() TriggerRegistration_TriggerStatus { - if x != nil { - return x.Status - } - return TriggerRegistration_UNKNOWN_STATUS -} - -type CommonTaskRegistration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` - User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` - Pass string `protobuf:"bytes,4,opt,name=pass,proto3" json:"pass,omitempty"` - Variables []*Variable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"` - Created int64 `protobuf:"varint,6,opt,name=created,proto3" json:"created,omitempty"` - Status CommonTaskRegistration_Status `protobuf:"varint,7,opt,name=status,proto3,enum=proto.CommonTaskRegistration_Status" json:"status,omitempty"` - Documentation string `protobuf:"bytes,8,opt,name=documentation,proto3" json:"documentation,omitempty"` -} - -func (x *CommonTaskRegistration) Reset() { - *x = CommonTaskRegistration{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonTaskRegistration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonTaskRegistration) ProtoMessage() {} - -func (x *CommonTaskRegistration) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_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 CommonTaskRegistration.ProtoReflect.Descriptor instead. -func (*CommonTaskRegistration) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{19} -} - -func (x *CommonTaskRegistration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CommonTaskRegistration) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *CommonTaskRegistration) GetUser() string { - if x != nil { - return x.User - } - return "" -} - -func (x *CommonTaskRegistration) GetPass() string { - if x != nil { - return x.Pass - } - return "" -} - -func (x *CommonTaskRegistration) GetVariables() []*Variable { - if x != nil { - return x.Variables - } - return nil -} - -func (x *CommonTaskRegistration) GetCreated() int64 { - if x != nil { - return x.Created - } - return 0 -} - -func (x *CommonTaskRegistration) GetStatus() CommonTaskRegistration_Status { - if x != nil { - return x.Status - } - return CommonTaskRegistration_UNKNOWN -} - -func (x *CommonTaskRegistration) GetDocumentation() string { - if x != nil { - return x.Documentation - } - return "" -} - -type Event struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` // What type of event - Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` // Json output of the event - Emitted int64 `protobuf:"varint,4,opt,name=emitted,proto3" json:"emitted,omitempty"` -} - -func (x *Event) Reset() { - *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{20} -} - -func (x *Event) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Event) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *Event) GetDetails() string { - if x != nil { - return x.Details - } - return "" -} - -func (x *Event) GetEmitted() int64 { - if x != nil { - return x.Emitted - } - return 0 -} - -type Token struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Created int64 `protobuf:"varint,1,opt,name=created,proto3" json:"created,omitempty"` - Kind Token_Kind `protobuf:"varint,2,opt,name=kind,proto3,enum=proto.Token_Kind" json:"kind,omitempty"` - Namespaces []string `protobuf:"bytes,3,rep,name=namespaces,proto3" json:"namespaces,omitempty"` - Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Expires int64 `protobuf:"varint,5,opt,name=expires,proto3" json:"expires,omitempty"` - Disabled bool `protobuf:"varint,6,opt,name=disabled,proto3" json:"disabled,omitempty"` -} - -func (x *Token) Reset() { - *x = Token{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Token) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Token) ProtoMessage() {} - -func (x *Token) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Token.ProtoReflect.Descriptor instead. -func (*Token) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{21} -} - -func (x *Token) GetCreated() int64 { - if x != nil { - return x.Created - } - return 0 -} - -func (x *Token) GetKind() Token_Kind { - if x != nil { - return x.Kind - } - return Token_UNKNOWN -} - -func (x *Token) GetNamespaces() []string { - if x != nil { - return x.Namespaces - } - return nil -} - -func (x *Token) GetMetadata() map[string]string { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Token) GetExpires() int64 { - if x != nil { - return x.Expires - } - return 0 -} - -func (x *Token) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -type TriggerResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status TriggerResult_Status `protobuf:"varint,1,opt,name=status,proto3,enum=proto.TriggerResult_Status" json:"status,omitempty"` - Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` -} - -func (x *TriggerResult) Reset() { - *x = TriggerResult{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TriggerResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TriggerResult) ProtoMessage() {} - -func (x *TriggerResult) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TriggerResult.ProtoReflect.Descriptor instead. -func (*TriggerResult) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{22} -} - -func (x *TriggerResult) GetStatus() TriggerResult_Status { - if x != nil { - return x.Status - } - return TriggerResult_UNKNOWN -} - -func (x *TriggerResult) GetDetails() string { - if x != nil { - return x.Details - } - return "" -} - -type SecretStoreKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"` -} - -func (x *SecretStoreKey) Reset() { - *x = SecretStoreKey{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecretStoreKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecretStoreKey) ProtoMessage() {} - -func (x *SecretStoreKey) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecretStoreKey.ProtoReflect.Descriptor instead. -func (*SecretStoreKey) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{23} -} - -func (x *SecretStoreKey) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *SecretStoreKey) GetCreated() int64 { - if x != nil { - return x.Created - } - return 0 -} - -type ObjectStoreKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"` -} - -func (x *ObjectStoreKey) Reset() { - *x = ObjectStoreKey{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ObjectStoreKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ObjectStoreKey) ProtoMessage() {} - -func (x *ObjectStoreKey) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ObjectStoreKey.ProtoReflect.Descriptor instead. -func (*ObjectStoreKey) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{24} -} - -func (x *ObjectStoreKey) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *ObjectStoreKey) GetCreated() int64 { - if x != nil { - return x.Created - } - return 0 -} - -type Pipeline_Error struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Kind Pipeline_ErrorKind `protobuf:"varint,1,opt,name=kind,proto3,enum=proto.Pipeline_ErrorKind" json:"kind,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *Pipeline_Error) Reset() { - *x = Pipeline_Error{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Pipeline_Error) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Pipeline_Error) ProtoMessage() {} - -func (x *Pipeline_Error) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Pipeline_Error.ProtoReflect.Descriptor instead. -func (*Pipeline_Error) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{2, 3} -} - -func (x *Pipeline_Error) GetKind() Pipeline_ErrorKind { - if x != nil { - return x.Kind - } - return Pipeline_ERROR_KIND_UNKNOWN -} - -func (x *Pipeline_Error) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -type Run_RunTriggerInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` -} - -func (x *Run_RunTriggerInfo) Reset() { - *x = Run_RunTriggerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_gofer_message_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Run_RunTriggerInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Run_RunTriggerInfo) ProtoMessage() {} - -func (x *Run_RunTriggerInfo) ProtoReflect() protoreflect.Message { - mi := &file_gofer_message_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Run_RunTriggerInfo.ProtoReflect.Descriptor instead. -func (*Run_RunTriggerInfo) Descriptor() ([]byte, []int) { - return file_gofer_message_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *Run_RunTriggerInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Run_RunTriggerInfo) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -var File_gofer_message_proto protoreflect.FileDescriptor - -var file_gofer_message_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, - 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 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, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x6f, - 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x6f, - 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x4a, 0x0a, 0x08, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 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, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x22, 0xea, 0x07, 0x0a, 0x08, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, - 0x73, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, - 0x65, 0x6c, 0x69, 0x73, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x43, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, - 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x39, 0x0a, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, - 0x12, 0x43, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, - 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, - 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x73, 0x1a, 0x51, 0x0a, 0x10, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5b, 0x0a, 0x0d, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x61, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x58, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x12, 0x2d, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x45, 0x0a, 0x0d, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, - 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, - 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x22, 0x45, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4b, - 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x20, 0x0a, - 0x1c, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x22, - 0x94, 0x01, 0x0a, 0x12, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, - 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x06, - 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0xe3, 0x01, 0x0a, 0x0e, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x6d, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73, - 0x6d, 0x12, 0x2f, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x74, 0x61, 0x73, - 0x6b, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x22, 0x84, 0x05, 0x0a, - 0x03, 0x52, 0x75, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x64, 0x65, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x29, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, - 0x6e, 0x2e, 0x52, 0x75, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x09, 0x76, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x76, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x1a, 0x3a, 0x0a, 0x0e, - 0x52, 0x75, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x49, 0x0a, 0x08, 0x52, 0x75, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, - 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, - 0x45, 0x10, 0x03, 0x22, 0x4e, 0x0a, 0x09, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x16, 0x0a, 0x12, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x55, 0x43, 0x43, - 0x45, 0x53, 0x53, 0x46, 0x55, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, - 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, - 0x44, 0x10, 0x03, 0x22, 0x98, 0x02, 0x0a, 0x0f, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, - 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x4b, - 0x69, 0x6e, 0x64, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9e, 0x01, - 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x42, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, - 0x5f, 0x45, 0x58, 0x49, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x43, 0x48, 0x45, 0x44, - 0x55, 0x4c, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, - 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x43, 0x41, - 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x44, 0x4d, - 0x49, 0x4e, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x22, 0x36, - 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x12, - 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, 0x22, 0xa7, 0x04, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, - 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x3f, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, - 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x44, - 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, - 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x12, 0x2d, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x76, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x6a, - 0x65, 0x63, 0x74, 0x41, 0x70, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x64, 0x0a, 0x0e, 0x44, - 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x3c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, - 0x6b, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x5d, 0x0a, 0x14, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x45, 0x51, - 0x55, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, - 0x03, 0x41, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, - 0x53, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x03, - 0x22, 0xca, 0x01, 0x0a, 0x17, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x48, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x1a, 0x3b, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, 0x04, - 0x0a, 0x1a, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 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, 0x4f, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, - 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x12, 0x4b, 0x0a, 0x08, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x70, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x1a, 0x74, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x5d, 0x0a, 0x14, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x52, - 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, - 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x10, 0x03, 0x22, 0x8e, 0x05, 0x0a, 0x10, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, - 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, - 0x38, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x52, 0x0c, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x45, 0x0a, 0x0a, 0x64, 0x65, 0x70, - 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, - 0x12, 0x44, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x6a, 0x65, - 0x63, 0x74, 0x41, 0x70, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x6a, 0x0a, 0x0e, 0x44, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x42, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5d, 0x0a, 0x14, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, - 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x1e, - 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, - 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, - 0x45, 0x10, 0x03, 0x22, 0xc6, 0x01, 0x0a, 0x15, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x46, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, - 0x3b, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8e, 0x01, 0x0a, - 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3d, 0x0a, 0x08, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x0c, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9a, 0x04, - 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 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, 0x45, - 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x12, 0x41, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x70, 0x69, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x1a, 0x6a, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, - 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5d, 0x0a, 0x14, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x5f, - 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0b, 0x0a, - 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x03, 0x22, 0xe7, 0x01, 0x0a, 0x13, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x52, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x73, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x42, 0x4e, 0x4f, 0x52, 0x4d, - 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x49, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x43, 0x48, - 0x45, 0x44, 0x55, 0x4c, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x17, - 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44, - 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, - 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x52, 0x50, 0x48, 0x41, 0x4e, - 0x45, 0x44, 0x10, 0x05, 0x22, 0x97, 0x06, 0x0a, 0x07, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, - 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x64, 0x65, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x3f, 0x0a, - 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, - 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x72, 0x75, 0x6e, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x2e, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, - 0x73, 0x6b, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0a, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, - 0x6b, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, - 0x2d, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x59, - 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, - 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, - 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, - 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, - 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x43, - 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x04, 0x22, 0x5b, 0x0a, 0x0d, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x00, 0x12, 0x0e, - 0x0a, 0x0a, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x46, 0x55, 0x4c, 0x10, 0x01, 0x12, 0x0a, - 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, - 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x4b, 0x49, - 0x50, 0x50, 0x45, 0x44, 0x10, 0x04, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0xfa, - 0x02, 0x0a, 0x07, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, - 0x12, 0x31, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x2e, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x4a, 0x0a, 0x0c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, - 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x49, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0x3e, 0x0a, 0x0d, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, - 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x22, 0x8a, 0x03, 0x0a, 0x13, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x70, 0x61, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3e, 0x0a, 0x0d, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, - 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, - 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x22, 0xc9, 0x02, 0x0a, 0x16, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x70, 0x61, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3c, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x30, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, - 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, - 0x45, 0x44, 0x10, 0x02, 0x22, 0x5f, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x64, 0x22, 0xc4, 0x02, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x04, 0x6b, 0x69, 0x6e, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x12, 0x36, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x3b, - 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2f, 0x0a, 0x04, 0x4b, - 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, - 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x22, 0x9c, 0x01, 0x0a, - 0x0d, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x33, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x3c, 0x0a, - 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, - 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0b, - 0x0a, 0x07, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x03, 0x22, 0x3c, 0x0a, 0x0e, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3c, 0x0a, 0x0e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x69, 0x6e, 0x74, 0x6a, 0x65, 0x64, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_gofer_message_proto_rawDescOnce sync.Once - file_gofer_message_proto_rawDescData = file_gofer_message_proto_rawDesc -) - -func file_gofer_message_proto_rawDescGZIP() []byte { - file_gofer_message_proto_rawDescOnce.Do(func() { - file_gofer_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_gofer_message_proto_rawDescData) - }) - return file_gofer_message_proto_rawDescData -} - -var file_gofer_message_proto_enumTypes = make([]protoimpl.EnumInfo, 18) -var file_gofer_message_proto_msgTypes = make([]protoimpl.MessageInfo, 41) -var file_gofer_message_proto_goTypes = []interface{}{ - (Pipeline_PipelineState)(0), // 0: proto.Pipeline.PipelineState - (Pipeline_ErrorKind)(0), // 1: proto.Pipeline.ErrorKind - (Run_RunState)(0), // 2: proto.Run.RunState - (Run_RunStatus)(0), // 3: proto.Run.RunStatus - (RunStatusReason_RunStatusReasonKind)(0), // 4: proto.RunStatusReason.RunStatusReasonKind - (CustomTask_RequiredParentStatus)(0), // 5: proto.CustomTask.RequiredParentStatus - (PipelineCommonTaskSettings_RequiredParentStatus)(0), // 6: proto.PipelineCommonTaskSettings.RequiredParentStatus - (CustomTaskConfig_RequiredParentStatus)(0), // 7: proto.CustomTaskConfig.RequiredParentStatus - (CommonTaskConfig_RequiredParentStatus)(0), // 8: proto.CommonTaskConfig.RequiredParentStatus - (TaskRunStatusReason_Reason)(0), // 9: proto.TaskRunStatusReason.Reason - (TaskRun_TaskRunState)(0), // 10: proto.TaskRun.TaskRunState - (TaskRun_TaskRunStatus)(0), // 11: proto.TaskRun.TaskRunStatus - (Trigger_TriggerState)(0), // 12: proto.Trigger.TriggerState - (Trigger_TriggerStatus)(0), // 13: proto.Trigger.TriggerStatus - (TriggerRegistration_TriggerStatus)(0), // 14: proto.TriggerRegistration.TriggerStatus - (CommonTaskRegistration_Status)(0), // 15: proto.CommonTaskRegistration.Status - (Token_Kind)(0), // 16: proto.Token.Kind - (TriggerResult_Status)(0), // 17: proto.TriggerResult.Status - (*Namespace)(nil), // 18: proto.Namespace - (*Variable)(nil), // 19: proto.Variable - (*Pipeline)(nil), // 20: proto.Pipeline - (*PipelineTaskConfig)(nil), // 21: proto.PipelineTaskConfig - (*PipelineConfig)(nil), // 22: proto.PipelineConfig - (*Run)(nil), // 23: proto.Run - (*RunStatusReason)(nil), // 24: proto.RunStatusReason - (*RegistryAuth)(nil), // 25: proto.RegistryAuth - (*CustomTask)(nil), // 26: proto.CustomTask - (*PipelineTriggerSettings)(nil), // 27: proto.PipelineTriggerSettings - (*PipelineCommonTaskSettings)(nil), // 28: proto.PipelineCommonTaskSettings - (*CustomTaskConfig)(nil), // 29: proto.CustomTaskConfig - (*PipelineTriggerConfig)(nil), // 30: proto.PipelineTriggerConfig - (*CommonTask)(nil), // 31: proto.CommonTask - (*CommonTaskConfig)(nil), // 32: proto.CommonTaskConfig - (*TaskRunStatusReason)(nil), // 33: proto.TaskRunStatusReason - (*TaskRun)(nil), // 34: proto.TaskRun - (*Trigger)(nil), // 35: proto.Trigger - (*TriggerRegistration)(nil), // 36: proto.TriggerRegistration - (*CommonTaskRegistration)(nil), // 37: proto.CommonTaskRegistration - (*Event)(nil), // 38: proto.Event - (*Token)(nil), // 39: proto.Token - (*TriggerResult)(nil), // 40: proto.TriggerResult - (*SecretStoreKey)(nil), // 41: proto.SecretStoreKey - (*ObjectStoreKey)(nil), // 42: proto.ObjectStoreKey - nil, // 43: proto.Pipeline.CustomTasksEntry - nil, // 44: proto.Pipeline.TriggersEntry - nil, // 45: proto.Pipeline.CommonTasksEntry - (*Pipeline_Error)(nil), // 46: proto.Pipeline.Error - (*Run_RunTriggerInfo)(nil), // 47: proto.Run.RunTriggerInfo - nil, // 48: proto.CustomTask.DependsOnEntry - nil, // 49: proto.PipelineTriggerSettings.SettingsEntry - nil, // 50: proto.PipelineCommonTaskSettings.DependsOnEntry - nil, // 51: proto.PipelineCommonTaskSettings.SettingsEntry - nil, // 52: proto.CustomTaskConfig.DependsOnEntry - nil, // 53: proto.CustomTaskConfig.VariablesEntry - nil, // 54: proto.PipelineTriggerConfig.SettingsEntry - nil, // 55: proto.CommonTaskConfig.DependsOnEntry - nil, // 56: proto.CommonTaskConfig.SettingsEntry - nil, // 57: proto.TriggerRegistration.VariablesEntry - nil, // 58: proto.Token.MetadataEntry -} -var file_gofer_message_proto_depIdxs = []int32{ - 0, // 0: proto.Pipeline.state:type_name -> proto.Pipeline.PipelineState - 43, // 1: proto.Pipeline.custom_tasks:type_name -> proto.Pipeline.CustomTasksEntry - 44, // 2: proto.Pipeline.triggers:type_name -> proto.Pipeline.TriggersEntry - 45, // 3: proto.Pipeline.common_tasks:type_name -> proto.Pipeline.CommonTasksEntry - 46, // 4: proto.Pipeline.errors:type_name -> proto.Pipeline.Error - 29, // 5: proto.PipelineTaskConfig.custom_task:type_name -> proto.CustomTaskConfig - 32, // 6: proto.PipelineTaskConfig.common_task:type_name -> proto.CommonTaskConfig - 21, // 7: proto.PipelineConfig.tasks:type_name -> proto.PipelineTaskConfig - 30, // 8: proto.PipelineConfig.triggers:type_name -> proto.PipelineTriggerConfig - 2, // 9: proto.Run.state:type_name -> proto.Run.RunState - 3, // 10: proto.Run.status:type_name -> proto.Run.RunStatus - 24, // 11: proto.Run.status_reason:type_name -> proto.RunStatusReason - 47, // 12: proto.Run.trigger:type_name -> proto.Run.RunTriggerInfo - 19, // 13: proto.Run.variables:type_name -> proto.Variable - 4, // 14: proto.RunStatusReason.reason:type_name -> proto.RunStatusReason.RunStatusReasonKind - 25, // 15: proto.CustomTask.registry_auth:type_name -> proto.RegistryAuth - 48, // 16: proto.CustomTask.depends_on:type_name -> proto.CustomTask.DependsOnEntry - 19, // 17: proto.CustomTask.variables:type_name -> proto.Variable - 49, // 18: proto.PipelineTriggerSettings.settings:type_name -> proto.PipelineTriggerSettings.SettingsEntry - 50, // 19: proto.PipelineCommonTaskSettings.depends_on:type_name -> proto.PipelineCommonTaskSettings.DependsOnEntry - 51, // 20: proto.PipelineCommonTaskSettings.settings:type_name -> proto.PipelineCommonTaskSettings.SettingsEntry - 25, // 21: proto.CustomTaskConfig.registry_auth:type_name -> proto.RegistryAuth - 52, // 22: proto.CustomTaskConfig.depends_on:type_name -> proto.CustomTaskConfig.DependsOnEntry - 53, // 23: proto.CustomTaskConfig.variables:type_name -> proto.CustomTaskConfig.VariablesEntry - 54, // 24: proto.PipelineTriggerConfig.settings:type_name -> proto.PipelineTriggerConfig.SettingsEntry - 28, // 25: proto.CommonTask.settings:type_name -> proto.PipelineCommonTaskSettings - 37, // 26: proto.CommonTask.registration:type_name -> proto.CommonTaskRegistration - 55, // 27: proto.CommonTaskConfig.depends_on:type_name -> proto.CommonTaskConfig.DependsOnEntry - 56, // 28: proto.CommonTaskConfig.settings:type_name -> proto.CommonTaskConfig.SettingsEntry - 9, // 29: proto.TaskRunStatusReason.reason:type_name -> proto.TaskRunStatusReason.Reason - 33, // 30: proto.TaskRun.status_reason:type_name -> proto.TaskRunStatusReason - 10, // 31: proto.TaskRun.state:type_name -> proto.TaskRun.TaskRunState - 11, // 32: proto.TaskRun.status:type_name -> proto.TaskRun.TaskRunStatus - 26, // 33: proto.TaskRun.custom_task:type_name -> proto.CustomTask - 31, // 34: proto.TaskRun.common_task:type_name -> proto.CommonTask - 19, // 35: proto.TaskRun.variables:type_name -> proto.Variable - 12, // 36: proto.Trigger.state:type_name -> proto.Trigger.TriggerState - 13, // 37: proto.Trigger.status:type_name -> proto.Trigger.TriggerStatus - 57, // 38: proto.TriggerRegistration.variables:type_name -> proto.TriggerRegistration.VariablesEntry - 14, // 39: proto.TriggerRegistration.status:type_name -> proto.TriggerRegistration.TriggerStatus - 19, // 40: proto.CommonTaskRegistration.variables:type_name -> proto.Variable - 15, // 41: proto.CommonTaskRegistration.status:type_name -> proto.CommonTaskRegistration.Status - 16, // 42: proto.Token.kind:type_name -> proto.Token.Kind - 58, // 43: proto.Token.metadata:type_name -> proto.Token.MetadataEntry - 17, // 44: proto.TriggerResult.status:type_name -> proto.TriggerResult.Status - 26, // 45: proto.Pipeline.CustomTasksEntry.value:type_name -> proto.CustomTask - 27, // 46: proto.Pipeline.TriggersEntry.value:type_name -> proto.PipelineTriggerSettings - 28, // 47: proto.Pipeline.CommonTasksEntry.value:type_name -> proto.PipelineCommonTaskSettings - 1, // 48: proto.Pipeline.Error.kind:type_name -> proto.Pipeline.ErrorKind - 5, // 49: proto.CustomTask.DependsOnEntry.value:type_name -> proto.CustomTask.RequiredParentStatus - 6, // 50: proto.PipelineCommonTaskSettings.DependsOnEntry.value:type_name -> proto.PipelineCommonTaskSettings.RequiredParentStatus - 7, // 51: proto.CustomTaskConfig.DependsOnEntry.value:type_name -> proto.CustomTaskConfig.RequiredParentStatus - 8, // 52: proto.CommonTaskConfig.DependsOnEntry.value:type_name -> proto.CommonTaskConfig.RequiredParentStatus - 53, // [53:53] is the sub-list for method output_type - 53, // [53:53] is the sub-list for method input_type - 53, // [53:53] is the sub-list for extension type_name - 53, // [53:53] is the sub-list for extension extendee - 0, // [0:53] is the sub-list for field type_name -} - -func init() { file_gofer_message_proto_init() } -func file_gofer_message_proto_init() { - if File_gofer_message_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_gofer_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Namespace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[1].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_gofer_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pipeline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineTaskConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Run); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunStatusReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegistryAuth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineTriggerSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineCommonTaskSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTaskConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineTriggerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTaskConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskRunStatusReason); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Trigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TriggerRegistration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTaskRegistration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Token); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TriggerResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretStoreKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ObjectStoreKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pipeline_Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_gofer_message_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Run_RunTriggerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_gofer_message_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*PipelineTaskConfig_CustomTask)(nil), - (*PipelineTaskConfig_CommonTask)(nil), - } - file_gofer_message_proto_msgTypes[16].OneofWrappers = []interface{}{ - (*TaskRun_CustomTask)(nil), - (*TaskRun_CommonTask)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gofer_message_proto_rawDesc, - NumEnums: 18, - NumMessages: 41, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_gofer_message_proto_goTypes, - DependencyIndexes: file_gofer_message_proto_depIdxs, - EnumInfos: file_gofer_message_proto_enumTypes, - MessageInfos: file_gofer_message_proto_msgTypes, - }.Build() - File_gofer_message_proto = out.File - file_gofer_message_proto_rawDesc = nil - file_gofer_message_proto_goTypes = nil - file_gofer_message_proto_depIdxs = nil -} diff --git a/proto/go/gofer_message_api.pb.go b/proto/go/gofer_message_api.pb.go new file mode 100644 index 00000000..c81738f9 --- /dev/null +++ b/proto/go/gofer_message_api.pb.go @@ -0,0 +1,4016 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: gofer_message_api.proto + +package _go + +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 PipelineMetadata_PipelineState int32 + +const ( + PipelineMetadata_PIPELINE_STATE_UNKNOWN PipelineMetadata_PipelineState = 0 + PipelineMetadata_ACTIVE PipelineMetadata_PipelineState = 1 + PipelineMetadata_DISABLED PipelineMetadata_PipelineState = 2 +) + +// Enum value maps for PipelineMetadata_PipelineState. +var ( + PipelineMetadata_PipelineState_name = map[int32]string{ + 0: "PIPELINE_STATE_UNKNOWN", + 1: "ACTIVE", + 2: "DISABLED", + } + PipelineMetadata_PipelineState_value = map[string]int32{ + "PIPELINE_STATE_UNKNOWN": 0, + "ACTIVE": 1, + "DISABLED": 2, + } +) + +func (x PipelineMetadata_PipelineState) Enum() *PipelineMetadata_PipelineState { + p := new(PipelineMetadata_PipelineState) + *p = x + return p +} + +func (x PipelineMetadata_PipelineState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PipelineMetadata_PipelineState) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[0].Descriptor() +} + +func (PipelineMetadata_PipelineState) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[0] +} + +func (x PipelineMetadata_PipelineState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PipelineMetadata_PipelineState.Descriptor instead. +func (PipelineMetadata_PipelineState) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{3, 0} +} + +type PipelineConfig_PipelineConfigState int32 + +const ( + PipelineConfig_PIPELINE_CONFIG_STATE_UNKNOWN PipelineConfig_PipelineConfigState = 0 + PipelineConfig_UNRELEASED PipelineConfig_PipelineConfigState = 1 + PipelineConfig_LIVE PipelineConfig_PipelineConfigState = 2 + PipelineConfig_DEPRECATED PipelineConfig_PipelineConfigState = 3 +) + +// Enum value maps for PipelineConfig_PipelineConfigState. +var ( + PipelineConfig_PipelineConfigState_name = map[int32]string{ + 0: "PIPELINE_CONFIG_STATE_UNKNOWN", + 1: "UNRELEASED", + 2: "LIVE", + 3: "DEPRECATED", + } + PipelineConfig_PipelineConfigState_value = map[string]int32{ + "PIPELINE_CONFIG_STATE_UNKNOWN": 0, + "UNRELEASED": 1, + "LIVE": 2, + "DEPRECATED": 3, + } +) + +func (x PipelineConfig_PipelineConfigState) Enum() *PipelineConfig_PipelineConfigState { + p := new(PipelineConfig_PipelineConfigState) + *p = x + return p +} + +func (x PipelineConfig_PipelineConfigState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PipelineConfig_PipelineConfigState) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[1].Descriptor() +} + +func (PipelineConfig_PipelineConfigState) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[1] +} + +func (x PipelineConfig_PipelineConfigState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PipelineConfig_PipelineConfigState.Descriptor instead. +func (PipelineConfig_PipelineConfigState) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{4, 0} +} + +type DeploymentStatusReason_DeploymentStatusReasonKind int32 + +const ( + DeploymentStatusReason_DEPLOYMENT_STATUS_REASON_UNKNOWN DeploymentStatusReason_DeploymentStatusReasonKind = 0 + DeploymentStatusReason_TRIGGER_GENERAL_FAILURE DeploymentStatusReason_DeploymentStatusReasonKind = 1 + DeploymentStatusReason_TRIGGER_NOT_FOUND DeploymentStatusReason_DeploymentStatusReasonKind = 2 + DeploymentStatusReason_TRIGGER_CONFIG_INVALID DeploymentStatusReason_DeploymentStatusReasonKind = 3 +) + +// Enum value maps for DeploymentStatusReason_DeploymentStatusReasonKind. +var ( + DeploymentStatusReason_DeploymentStatusReasonKind_name = map[int32]string{ + 0: "DEPLOYMENT_STATUS_REASON_UNKNOWN", + 1: "TRIGGER_GENERAL_FAILURE", + 2: "TRIGGER_NOT_FOUND", + 3: "TRIGGER_CONFIG_INVALID", + } + DeploymentStatusReason_DeploymentStatusReasonKind_value = map[string]int32{ + "DEPLOYMENT_STATUS_REASON_UNKNOWN": 0, + "TRIGGER_GENERAL_FAILURE": 1, + "TRIGGER_NOT_FOUND": 2, + "TRIGGER_CONFIG_INVALID": 3, + } +) + +func (x DeploymentStatusReason_DeploymentStatusReasonKind) Enum() *DeploymentStatusReason_DeploymentStatusReasonKind { + p := new(DeploymentStatusReason_DeploymentStatusReasonKind) + *p = x + return p +} + +func (x DeploymentStatusReason_DeploymentStatusReasonKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeploymentStatusReason_DeploymentStatusReasonKind) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[2].Descriptor() +} + +func (DeploymentStatusReason_DeploymentStatusReasonKind) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[2] +} + +func (x DeploymentStatusReason_DeploymentStatusReasonKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeploymentStatusReason_DeploymentStatusReasonKind.Descriptor instead. +func (DeploymentStatusReason_DeploymentStatusReasonKind) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{5, 0} +} + +type Deployment_DeploymentState int32 + +const ( + Deployment_DEPLOYMENT_STATE_UNKNOWN Deployment_DeploymentState = 0 + Deployment_RUNNING Deployment_DeploymentState = 1 + Deployment_COMPLETE Deployment_DeploymentState = 2 +) + +// Enum value maps for Deployment_DeploymentState. +var ( + Deployment_DeploymentState_name = map[int32]string{ + 0: "DEPLOYMENT_STATE_UNKNOWN", + 1: "RUNNING", + 2: "COMPLETE", + } + Deployment_DeploymentState_value = map[string]int32{ + "DEPLOYMENT_STATE_UNKNOWN": 0, + "RUNNING": 1, + "COMPLETE": 2, + } +) + +func (x Deployment_DeploymentState) Enum() *Deployment_DeploymentState { + p := new(Deployment_DeploymentState) + *p = x + return p +} + +func (x Deployment_DeploymentState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Deployment_DeploymentState) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[3].Descriptor() +} + +func (Deployment_DeploymentState) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[3] +} + +func (x Deployment_DeploymentState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Deployment_DeploymentState.Descriptor instead. +func (Deployment_DeploymentState) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{6, 0} +} + +type Deployment_DeploymentStatus int32 + +const ( + Deployment_DEPLOYMENT_STATUS_UNKNOWN Deployment_DeploymentStatus = 0 + Deployment_FAILED Deployment_DeploymentStatus = 1 + Deployment_SUCCESSFUL Deployment_DeploymentStatus = 2 +) + +// Enum value maps for Deployment_DeploymentStatus. +var ( + Deployment_DeploymentStatus_name = map[int32]string{ + 0: "DEPLOYMENT_STATUS_UNKNOWN", + 1: "FAILED", + 2: "SUCCESSFUL", + } + Deployment_DeploymentStatus_value = map[string]int32{ + "DEPLOYMENT_STATUS_UNKNOWN": 0, + "FAILED": 1, + "SUCCESSFUL": 2, + } +) + +func (x Deployment_DeploymentStatus) Enum() *Deployment_DeploymentStatus { + p := new(Deployment_DeploymentStatus) + *p = x + return p +} + +func (x Deployment_DeploymentStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Deployment_DeploymentStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[4].Descriptor() +} + +func (Deployment_DeploymentStatus) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[4] +} + +func (x Deployment_DeploymentStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Deployment_DeploymentStatus.Descriptor instead. +func (Deployment_DeploymentStatus) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{6, 1} +} + +type Run_RunState int32 + +const ( + Run_RUN_STATE_UNKNOWN Run_RunState = 0 + Run_PENDING Run_RunState = 1 + Run_RUNNING Run_RunState = 2 + Run_COMPLETE Run_RunState = 3 +) + +// Enum value maps for Run_RunState. +var ( + Run_RunState_name = map[int32]string{ + 0: "RUN_STATE_UNKNOWN", + 1: "PENDING", + 2: "RUNNING", + 3: "COMPLETE", + } + Run_RunState_value = map[string]int32{ + "RUN_STATE_UNKNOWN": 0, + "PENDING": 1, + "RUNNING": 2, + "COMPLETE": 3, + } +) + +func (x Run_RunState) Enum() *Run_RunState { + p := new(Run_RunState) + *p = x + return p +} + +func (x Run_RunState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Run_RunState) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[5].Descriptor() +} + +func (Run_RunState) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[5] +} + +func (x Run_RunState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Run_RunState.Descriptor instead. +func (Run_RunState) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{7, 0} +} + +type Run_RunStatus int32 + +const ( + Run_RUN_STATUS_UNKNOWN Run_RunStatus = 0 + Run_SUCCESSFUL Run_RunStatus = 1 + Run_FAILED Run_RunStatus = 2 + Run_CANCELLED Run_RunStatus = 3 +) + +// Enum value maps for Run_RunStatus. +var ( + Run_RunStatus_name = map[int32]string{ + 0: "RUN_STATUS_UNKNOWN", + 1: "SUCCESSFUL", + 2: "FAILED", + 3: "CANCELLED", + } + Run_RunStatus_value = map[string]int32{ + "RUN_STATUS_UNKNOWN": 0, + "SUCCESSFUL": 1, + "FAILED": 2, + "CANCELLED": 3, + } +) + +func (x Run_RunStatus) Enum() *Run_RunStatus { + p := new(Run_RunStatus) + *p = x + return p +} + +func (x Run_RunStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Run_RunStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[6].Descriptor() +} + +func (Run_RunStatus) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[6] +} + +func (x Run_RunStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Run_RunStatus.Descriptor instead. +func (Run_RunStatus) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{7, 1} +} + +type RunStatusReason_RunStatusReasonKind int32 + +const ( + RunStatusReason_RUN_STATUS_REASON_UNKNOWN RunStatusReason_RunStatusReasonKind = 0 + RunStatusReason_ABNORMAL_EXIT RunStatusReason_RunStatusReasonKind = 1 + RunStatusReason_SCHEDULER_ERROR RunStatusReason_RunStatusReasonKind = 2 + RunStatusReason_FAILED_PRECONDITION RunStatusReason_RunStatusReasonKind = 3 + RunStatusReason_USER_CANCELLED RunStatusReason_RunStatusReasonKind = 4 + RunStatusReason_ADMIN_CANCELLED RunStatusReason_RunStatusReasonKind = 5 +) + +// Enum value maps for RunStatusReason_RunStatusReasonKind. +var ( + RunStatusReason_RunStatusReasonKind_name = map[int32]string{ + 0: "RUN_STATUS_REASON_UNKNOWN", + 1: "ABNORMAL_EXIT", + 2: "SCHEDULER_ERROR", + 3: "FAILED_PRECONDITION", + 4: "USER_CANCELLED", + 5: "ADMIN_CANCELLED", + } + RunStatusReason_RunStatusReasonKind_value = map[string]int32{ + "RUN_STATUS_REASON_UNKNOWN": 0, + "ABNORMAL_EXIT": 1, + "SCHEDULER_ERROR": 2, + "FAILED_PRECONDITION": 3, + "USER_CANCELLED": 4, + "ADMIN_CANCELLED": 5, + } +) + +func (x RunStatusReason_RunStatusReasonKind) Enum() *RunStatusReason_RunStatusReasonKind { + p := new(RunStatusReason_RunStatusReasonKind) + *p = x + return p +} + +func (x RunStatusReason_RunStatusReasonKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RunStatusReason_RunStatusReasonKind) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[7].Descriptor() +} + +func (RunStatusReason_RunStatusReasonKind) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[7] +} + +func (x RunStatusReason_RunStatusReasonKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RunStatusReason_RunStatusReasonKind.Descriptor instead. +func (RunStatusReason_RunStatusReasonKind) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{8, 0} +} + +type CustomTask_RequiredParentStatus int32 + +const ( + CustomTask_REQUIRED_PARENT_STATUS_UNKNOWN CustomTask_RequiredParentStatus = 0 + CustomTask_ANY CustomTask_RequiredParentStatus = 1 + CustomTask_SUCCESS CustomTask_RequiredParentStatus = 2 + CustomTask_FAILURE CustomTask_RequiredParentStatus = 3 +) + +// Enum value maps for CustomTask_RequiredParentStatus. +var ( + CustomTask_RequiredParentStatus_name = map[int32]string{ + 0: "REQUIRED_PARENT_STATUS_UNKNOWN", + 1: "ANY", + 2: "SUCCESS", + 3: "FAILURE", + } + CustomTask_RequiredParentStatus_value = map[string]int32{ + "REQUIRED_PARENT_STATUS_UNKNOWN": 0, + "ANY": 1, + "SUCCESS": 2, + "FAILURE": 3, + } +) + +func (x CustomTask_RequiredParentStatus) Enum() *CustomTask_RequiredParentStatus { + p := new(CustomTask_RequiredParentStatus) + *p = x + return p +} + +func (x CustomTask_RequiredParentStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CustomTask_RequiredParentStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[8].Descriptor() +} + +func (CustomTask_RequiredParentStatus) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[8] +} + +func (x CustomTask_RequiredParentStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CustomTask_RequiredParentStatus.Descriptor instead. +func (CustomTask_RequiredParentStatus) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{10, 0} +} + +type PipelineCommonTaskSettings_RequiredParentStatus int32 + +const ( + PipelineCommonTaskSettings_REQUIRED_PARENT_STATUS_UNKNOWN PipelineCommonTaskSettings_RequiredParentStatus = 0 + PipelineCommonTaskSettings_ANY PipelineCommonTaskSettings_RequiredParentStatus = 1 + PipelineCommonTaskSettings_SUCCESS PipelineCommonTaskSettings_RequiredParentStatus = 2 + PipelineCommonTaskSettings_FAILURE PipelineCommonTaskSettings_RequiredParentStatus = 3 +) + +// Enum value maps for PipelineCommonTaskSettings_RequiredParentStatus. +var ( + PipelineCommonTaskSettings_RequiredParentStatus_name = map[int32]string{ + 0: "REQUIRED_PARENT_STATUS_UNKNOWN", + 1: "ANY", + 2: "SUCCESS", + 3: "FAILURE", + } + PipelineCommonTaskSettings_RequiredParentStatus_value = map[string]int32{ + "REQUIRED_PARENT_STATUS_UNKNOWN": 0, + "ANY": 1, + "SUCCESS": 2, + "FAILURE": 3, + } +) + +func (x PipelineCommonTaskSettings_RequiredParentStatus) Enum() *PipelineCommonTaskSettings_RequiredParentStatus { + p := new(PipelineCommonTaskSettings_RequiredParentStatus) + *p = x + return p +} + +func (x PipelineCommonTaskSettings_RequiredParentStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PipelineCommonTaskSettings_RequiredParentStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[9].Descriptor() +} + +func (PipelineCommonTaskSettings_RequiredParentStatus) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[9] +} + +func (x PipelineCommonTaskSettings_RequiredParentStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PipelineCommonTaskSettings_RequiredParentStatus.Descriptor instead. +func (PipelineCommonTaskSettings_RequiredParentStatus) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{12, 0} +} + +type TaskRunStatusReason_Reason int32 + +const ( + TaskRunStatusReason_UNKNOWN TaskRunStatusReason_Reason = 0 + TaskRunStatusReason_ABNORMAL_EXIT TaskRunStatusReason_Reason = 1 + TaskRunStatusReason_SCHEDULER_ERROR TaskRunStatusReason_Reason = 2 + TaskRunStatusReason_FAILED_PRECONDITION TaskRunStatusReason_Reason = 3 + TaskRunStatusReason_CANCELLED TaskRunStatusReason_Reason = 4 + TaskRunStatusReason_ORPHANED TaskRunStatusReason_Reason = 5 +) + +// Enum value maps for TaskRunStatusReason_Reason. +var ( + TaskRunStatusReason_Reason_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ABNORMAL_EXIT", + 2: "SCHEDULER_ERROR", + 3: "FAILED_PRECONDITION", + 4: "CANCELLED", + 5: "ORPHANED", + } + TaskRunStatusReason_Reason_value = map[string]int32{ + "UNKNOWN": 0, + "ABNORMAL_EXIT": 1, + "SCHEDULER_ERROR": 2, + "FAILED_PRECONDITION": 3, + "CANCELLED": 4, + "ORPHANED": 5, + } +) + +func (x TaskRunStatusReason_Reason) Enum() *TaskRunStatusReason_Reason { + p := new(TaskRunStatusReason_Reason) + *p = x + return p +} + +func (x TaskRunStatusReason_Reason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TaskRunStatusReason_Reason) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[10].Descriptor() +} + +func (TaskRunStatusReason_Reason) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[10] +} + +func (x TaskRunStatusReason_Reason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TaskRunStatusReason_Reason.Descriptor instead. +func (TaskRunStatusReason_Reason) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{14, 0} +} + +type TaskRun_TaskRunState int32 + +const ( + TaskRun_UNKNOWN_STATE TaskRun_TaskRunState = 0 + TaskRun_PROCESSING TaskRun_TaskRunState = 1 + TaskRun_WAITING TaskRun_TaskRunState = 2 + TaskRun_RUNNING TaskRun_TaskRunState = 3 + TaskRun_COMPLETE TaskRun_TaskRunState = 4 +) + +// Enum value maps for TaskRun_TaskRunState. +var ( + TaskRun_TaskRunState_name = map[int32]string{ + 0: "UNKNOWN_STATE", + 1: "PROCESSING", + 2: "WAITING", + 3: "RUNNING", + 4: "COMPLETE", + } + TaskRun_TaskRunState_value = map[string]int32{ + "UNKNOWN_STATE": 0, + "PROCESSING": 1, + "WAITING": 2, + "RUNNING": 3, + "COMPLETE": 4, + } +) + +func (x TaskRun_TaskRunState) Enum() *TaskRun_TaskRunState { + p := new(TaskRun_TaskRunState) + *p = x + return p +} + +func (x TaskRun_TaskRunState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TaskRun_TaskRunState) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[11].Descriptor() +} + +func (TaskRun_TaskRunState) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[11] +} + +func (x TaskRun_TaskRunState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TaskRun_TaskRunState.Descriptor instead. +func (TaskRun_TaskRunState) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{15, 0} +} + +type TaskRun_TaskRunStatus int32 + +const ( + TaskRun_UNKNOWN_STATUS TaskRun_TaskRunStatus = 0 + TaskRun_SUCCESSFUL TaskRun_TaskRunStatus = 1 + TaskRun_FAILED TaskRun_TaskRunStatus = 2 + TaskRun_CANCELLED TaskRun_TaskRunStatus = 3 + TaskRun_SKIPPED TaskRun_TaskRunStatus = 4 +) + +// Enum value maps for TaskRun_TaskRunStatus. +var ( + TaskRun_TaskRunStatus_name = map[int32]string{ + 0: "UNKNOWN_STATUS", + 1: "SUCCESSFUL", + 2: "FAILED", + 3: "CANCELLED", + 4: "SKIPPED", + } + TaskRun_TaskRunStatus_value = map[string]int32{ + "UNKNOWN_STATUS": 0, + "SUCCESSFUL": 1, + "FAILED": 2, + "CANCELLED": 3, + "SKIPPED": 4, + } +) + +func (x TaskRun_TaskRunStatus) Enum() *TaskRun_TaskRunStatus { + p := new(TaskRun_TaskRunStatus) + *p = x + return p +} + +func (x TaskRun_TaskRunStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TaskRun_TaskRunStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[12].Descriptor() +} + +func (TaskRun_TaskRunStatus) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[12] +} + +func (x TaskRun_TaskRunStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TaskRun_TaskRunStatus.Descriptor instead. +func (TaskRun_TaskRunStatus) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{15, 1} +} + +type Trigger_TriggerState int32 + +const ( + Trigger_UNKNOWN_STATE Trigger_TriggerState = 0 + Trigger_PROCESSING Trigger_TriggerState = 1 + Trigger_RUNNING Trigger_TriggerState = 2 + Trigger_EXITED Trigger_TriggerState = 3 +) + +// Enum value maps for Trigger_TriggerState. +var ( + Trigger_TriggerState_name = map[int32]string{ + 0: "UNKNOWN_STATE", + 1: "PROCESSING", + 2: "RUNNING", + 3: "EXITED", + } + Trigger_TriggerState_value = map[string]int32{ + "UNKNOWN_STATE": 0, + "PROCESSING": 1, + "RUNNING": 2, + "EXITED": 3, + } +) + +func (x Trigger_TriggerState) Enum() *Trigger_TriggerState { + p := new(Trigger_TriggerState) + *p = x + return p +} + +func (x Trigger_TriggerState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Trigger_TriggerState) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[13].Descriptor() +} + +func (Trigger_TriggerState) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[13] +} + +func (x Trigger_TriggerState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Trigger_TriggerState.Descriptor instead. +func (Trigger_TriggerState) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{16, 0} +} + +type Trigger_TriggerStatus int32 + +const ( + Trigger_UNKNOWN_STATUS Trigger_TriggerStatus = 0 + Trigger_ENABLED Trigger_TriggerStatus = 1 + Trigger_DISABLED Trigger_TriggerStatus = 2 +) + +// Enum value maps for Trigger_TriggerStatus. +var ( + Trigger_TriggerStatus_name = map[int32]string{ + 0: "UNKNOWN_STATUS", + 1: "ENABLED", + 2: "DISABLED", + } + Trigger_TriggerStatus_value = map[string]int32{ + "UNKNOWN_STATUS": 0, + "ENABLED": 1, + "DISABLED": 2, + } +) + +func (x Trigger_TriggerStatus) Enum() *Trigger_TriggerStatus { + p := new(Trigger_TriggerStatus) + *p = x + return p +} + +func (x Trigger_TriggerStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Trigger_TriggerStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[14].Descriptor() +} + +func (Trigger_TriggerStatus) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[14] +} + +func (x Trigger_TriggerStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Trigger_TriggerStatus.Descriptor instead. +func (Trigger_TriggerStatus) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{16, 1} +} + +type TriggerRegistration_TriggerStatus int32 + +const ( + TriggerRegistration_UNKNOWN_STATUS TriggerRegistration_TriggerStatus = 0 + TriggerRegistration_ENABLED TriggerRegistration_TriggerStatus = 1 + TriggerRegistration_DISABLED TriggerRegistration_TriggerStatus = 2 +) + +// Enum value maps for TriggerRegistration_TriggerStatus. +var ( + TriggerRegistration_TriggerStatus_name = map[int32]string{ + 0: "UNKNOWN_STATUS", + 1: "ENABLED", + 2: "DISABLED", + } + TriggerRegistration_TriggerStatus_value = map[string]int32{ + "UNKNOWN_STATUS": 0, + "ENABLED": 1, + "DISABLED": 2, + } +) + +func (x TriggerRegistration_TriggerStatus) Enum() *TriggerRegistration_TriggerStatus { + p := new(TriggerRegistration_TriggerStatus) + *p = x + return p +} + +func (x TriggerRegistration_TriggerStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TriggerRegistration_TriggerStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[15].Descriptor() +} + +func (TriggerRegistration_TriggerStatus) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[15] +} + +func (x TriggerRegistration_TriggerStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TriggerRegistration_TriggerStatus.Descriptor instead. +func (TriggerRegistration_TriggerStatus) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{17, 0} +} + +type CommonTaskRegistration_Status int32 + +const ( + CommonTaskRegistration_UNKNOWN CommonTaskRegistration_Status = 0 + CommonTaskRegistration_ENABLED CommonTaskRegistration_Status = 1 + CommonTaskRegistration_DISABLED CommonTaskRegistration_Status = 2 +) + +// Enum value maps for CommonTaskRegistration_Status. +var ( + CommonTaskRegistration_Status_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ENABLED", + 2: "DISABLED", + } + CommonTaskRegistration_Status_value = map[string]int32{ + "UNKNOWN": 0, + "ENABLED": 1, + "DISABLED": 2, + } +) + +func (x CommonTaskRegistration_Status) Enum() *CommonTaskRegistration_Status { + p := new(CommonTaskRegistration_Status) + *p = x + return p +} + +func (x CommonTaskRegistration_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CommonTaskRegistration_Status) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[16].Descriptor() +} + +func (CommonTaskRegistration_Status) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[16] +} + +func (x CommonTaskRegistration_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CommonTaskRegistration_Status.Descriptor instead. +func (CommonTaskRegistration_Status) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{18, 0} +} + +type Token_Kind int32 + +const ( + Token_UNKNOWN Token_Kind = 0 + Token_MANAGEMENT Token_Kind = 1 + Token_CLIENT Token_Kind = 2 +) + +// Enum value maps for Token_Kind. +var ( + Token_Kind_name = map[int32]string{ + 0: "UNKNOWN", + 1: "MANAGEMENT", + 2: "CLIENT", + } + Token_Kind_value = map[string]int32{ + "UNKNOWN": 0, + "MANAGEMENT": 1, + "CLIENT": 2, + } +) + +func (x Token_Kind) Enum() *Token_Kind { + p := new(Token_Kind) + *p = x + return p +} + +func (x Token_Kind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Token_Kind) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[17].Descriptor() +} + +func (Token_Kind) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[17] +} + +func (x Token_Kind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Token_Kind.Descriptor instead. +func (Token_Kind) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{20, 0} +} + +type TriggerResult_Status int32 + +const ( + TriggerResult_UNKNOWN TriggerResult_Status = 0 + TriggerResult_FAILURE TriggerResult_Status = 1 + TriggerResult_SUCCESS TriggerResult_Status = 2 + TriggerResult_SKIPPED TriggerResult_Status = 3 +) + +// Enum value maps for TriggerResult_Status. +var ( + TriggerResult_Status_name = map[int32]string{ + 0: "UNKNOWN", + 1: "FAILURE", + 2: "SUCCESS", + 3: "SKIPPED", + } + TriggerResult_Status_value = map[string]int32{ + "UNKNOWN": 0, + "FAILURE": 1, + "SUCCESS": 2, + "SKIPPED": 3, + } +) + +func (x TriggerResult_Status) Enum() *TriggerResult_Status { + p := new(TriggerResult_Status) + *p = x + return p +} + +func (x TriggerResult_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TriggerResult_Status) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_api_proto_enumTypes[18].Descriptor() +} + +func (TriggerResult_Status) Type() protoreflect.EnumType { + return &file_gofer_message_api_proto_enumTypes[18] +} + +func (x TriggerResult_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TriggerResult_Status.Descriptor instead. +func (TriggerResult_Status) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{21, 0} +} + +type Namespace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Created int64 `protobuf:"varint,4,opt,name=created,proto3" json:"created,omitempty"` + Modified int64 `protobuf:"varint,5,opt,name=modified,proto3" json:"modified,omitempty"` +} + +func (x *Namespace) Reset() { + *x = Namespace{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Namespace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Namespace) ProtoMessage() {} + +func (x *Namespace) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 Namespace.ProtoReflect.Descriptor instead. +func (*Namespace) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{0} +} + +func (x *Namespace) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Namespace) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Namespace) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Namespace) GetCreated() int64 { + if x != nil { + return x.Created + } + return 0 +} + +func (x *Namespace) GetModified() int64 { + if x != nil { + return x.Modified + } + return 0 +} + +type Variable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` +} + +func (x *Variable) Reset() { + *x = Variable{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[1] + 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_gofer_message_api_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 Variable.ProtoReflect.Descriptor instead. +func (*Variable) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{1} +} + +func (x *Variable) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *Variable) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *Variable) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +type Pipeline struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *PipelineMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Config *PipelineConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *Pipeline) Reset() { + *x = Pipeline{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Pipeline) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Pipeline) ProtoMessage() {} + +func (x *Pipeline) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 Pipeline.ProtoReflect.Descriptor instead. +func (*Pipeline) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{2} +} + +func (x *Pipeline) GetMetadata() *PipelineMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Pipeline) GetConfig() *PipelineConfig { + if x != nil { + return x.Config + } + return nil +} + +type PipelineMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"` + Modified int64 `protobuf:"varint,4,opt,name=modified,proto3" json:"modified,omitempty"` + State PipelineMetadata_PipelineState `protobuf:"varint,5,opt,name=state,proto3,enum=proto.PipelineMetadata_PipelineState" json:"state,omitempty"` +} + +func (x *PipelineMetadata) Reset() { + *x = PipelineMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PipelineMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PipelineMetadata) ProtoMessage() {} + +func (x *PipelineMetadata) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 PipelineMetadata.ProtoReflect.Descriptor instead. +func (*PipelineMetadata) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{3} +} + +func (x *PipelineMetadata) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *PipelineMetadata) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PipelineMetadata) GetCreated() int64 { + if x != nil { + return x.Created + } + return 0 +} + +func (x *PipelineMetadata) GetModified() int64 { + if x != nil { + return x.Modified + } + return 0 +} + +func (x *PipelineMetadata) GetState() PipelineMetadata_PipelineState { + if x != nil { + return x.State + } + return PipelineMetadata_PIPELINE_STATE_UNKNOWN +} + +type PipelineConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Pipeline string `protobuf:"bytes,2,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Parallelism int64 `protobuf:"varint,4,opt,name=parallelism,proto3" json:"parallelism,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + CustomTasks map[string]*CustomTask `protobuf:"bytes,7,rep,name=custom_tasks,json=customTasks,proto3" json:"custom_tasks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + CommonTasks map[string]*PipelineCommonTaskSettings `protobuf:"bytes,8,rep,name=common_tasks,json=commonTasks,proto3" json:"common_tasks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + State PipelineConfig_PipelineConfigState `protobuf:"varint,9,opt,name=state,proto3,enum=proto.PipelineConfig_PipelineConfigState" json:"state,omitempty"` + Registered int64 `protobuf:"varint,10,opt,name=registered,proto3" json:"registered,omitempty"` + Deprecated int64 `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` +} + +func (x *PipelineConfig) Reset() { + *x = PipelineConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PipelineConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PipelineConfig) ProtoMessage() {} + +func (x *PipelineConfig) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 PipelineConfig.ProtoReflect.Descriptor instead. +func (*PipelineConfig) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{4} +} + +func (x *PipelineConfig) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *PipelineConfig) GetPipeline() string { + if x != nil { + return x.Pipeline + } + return "" +} + +func (x *PipelineConfig) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *PipelineConfig) GetParallelism() int64 { + if x != nil { + return x.Parallelism + } + return 0 +} + +func (x *PipelineConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PipelineConfig) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *PipelineConfig) GetCustomTasks() map[string]*CustomTask { + if x != nil { + return x.CustomTasks + } + return nil +} + +func (x *PipelineConfig) GetCommonTasks() map[string]*PipelineCommonTaskSettings { + if x != nil { + return x.CommonTasks + } + return nil +} + +func (x *PipelineConfig) GetState() PipelineConfig_PipelineConfigState { + if x != nil { + return x.State + } + return PipelineConfig_PIPELINE_CONFIG_STATE_UNKNOWN +} + +func (x *PipelineConfig) GetRegistered() int64 { + if x != nil { + return x.Registered + } + return 0 +} + +func (x *PipelineConfig) GetDeprecated() int64 { + if x != nil { + return x.Deprecated + } + return 0 +} + +type DeploymentStatusReason struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reason DeploymentStatusReason_DeploymentStatusReasonKind `protobuf:"varint,1,opt,name=reason,proto3,enum=proto.DeploymentStatusReason_DeploymentStatusReasonKind" json:"reason,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *DeploymentStatusReason) Reset() { + *x = DeploymentStatusReason{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeploymentStatusReason) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeploymentStatusReason) ProtoMessage() {} + +func (x *DeploymentStatusReason) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 DeploymentStatusReason.ProtoReflect.Descriptor instead. +func (*DeploymentStatusReason) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{5} +} + +func (x *DeploymentStatusReason) GetReason() DeploymentStatusReason_DeploymentStatusReasonKind { + if x != nil { + return x.Reason + } + return DeploymentStatusReason_DEPLOYMENT_STATUS_REASON_UNKNOWN +} + +func (x *DeploymentStatusReason) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type Deployment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Pipeline string `protobuf:"bytes,2,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` + StartVersion int64 `protobuf:"varint,4,opt,name=start_version,json=startVersion,proto3" json:"start_version,omitempty"` + EndVersion int64 `protobuf:"varint,5,opt,name=end_version,json=endVersion,proto3" json:"end_version,omitempty"` + Started int64 `protobuf:"varint,6,opt,name=started,proto3" json:"started,omitempty"` + Ended int64 `protobuf:"varint,7,opt,name=ended,proto3" json:"ended,omitempty"` + State Deployment_DeploymentState `protobuf:"varint,8,opt,name=state,proto3,enum=proto.Deployment_DeploymentState" json:"state,omitempty"` + Status Deployment_DeploymentStatus `protobuf:"varint,9,opt,name=status,proto3,enum=proto.Deployment_DeploymentStatus" json:"status,omitempty"` + StatusReason *DeploymentStatusReason `protobuf:"bytes,10,opt,name=status_reason,json=statusReason,proto3" json:"status_reason,omitempty"` + Logs []*Event `protobuf:"bytes,11,rep,name=logs,proto3" json:"logs,omitempty"` +} + +func (x *Deployment) Reset() { + *x = Deployment{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Deployment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Deployment) ProtoMessage() {} + +func (x *Deployment) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 Deployment.ProtoReflect.Descriptor instead. +func (*Deployment) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{6} +} + +func (x *Deployment) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *Deployment) GetPipeline() string { + if x != nil { + return x.Pipeline + } + return "" +} + +func (x *Deployment) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Deployment) GetStartVersion() int64 { + if x != nil { + return x.StartVersion + } + return 0 +} + +func (x *Deployment) GetEndVersion() int64 { + if x != nil { + return x.EndVersion + } + return 0 +} + +func (x *Deployment) GetStarted() int64 { + if x != nil { + return x.Started + } + return 0 +} + +func (x *Deployment) GetEnded() int64 { + if x != nil { + return x.Ended + } + return 0 +} + +func (x *Deployment) GetState() Deployment_DeploymentState { + if x != nil { + return x.State + } + return Deployment_DEPLOYMENT_STATE_UNKNOWN +} + +func (x *Deployment) GetStatus() Deployment_DeploymentStatus { + if x != nil { + return x.Status + } + return Deployment_DEPLOYMENT_STATUS_UNKNOWN +} + +func (x *Deployment) GetStatusReason() *DeploymentStatusReason { + if x != nil { + return x.StatusReason + } + return nil +} + +func (x *Deployment) GetLogs() []*Event { + if x != nil { + return x.Logs + } + return nil +} + +type Run struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Pipeline string `protobuf:"bytes,2,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Id int64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"` + Started int64 `protobuf:"varint,5,opt,name=started,proto3" json:"started,omitempty"` + Ended int64 `protobuf:"varint,6,opt,name=ended,proto3" json:"ended,omitempty"` + State Run_RunState `protobuf:"varint,7,opt,name=state,proto3,enum=proto.Run_RunState" json:"state,omitempty"` + Status Run_RunStatus `protobuf:"varint,8,opt,name=status,proto3,enum=proto.Run_RunStatus" json:"status,omitempty"` + StatusReason *RunStatusReason `protobuf:"bytes,9,opt,name=status_reason,json=statusReason,proto3" json:"status_reason,omitempty"` + Trigger *Run_RunTriggerInfo `protobuf:"bytes,10,opt,name=trigger,proto3" json:"trigger,omitempty"` + Variables []*Variable `protobuf:"bytes,11,rep,name=variables,proto3" json:"variables,omitempty"` + StoreObjectsExpired bool `protobuf:"varint,12,opt,name=store_objects_expired,json=storeObjectsExpired,proto3" json:"store_objects_expired,omitempty"` +} + +func (x *Run) Reset() { + *x = Run{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Run) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Run) ProtoMessage() {} + +func (x *Run) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 Run.ProtoReflect.Descriptor instead. +func (*Run) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{7} +} + +func (x *Run) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *Run) GetPipeline() string { + if x != nil { + return x.Pipeline + } + return "" +} + +func (x *Run) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Run) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Run) GetStarted() int64 { + if x != nil { + return x.Started + } + return 0 +} + +func (x *Run) GetEnded() int64 { + if x != nil { + return x.Ended + } + return 0 +} + +func (x *Run) GetState() Run_RunState { + if x != nil { + return x.State + } + return Run_RUN_STATE_UNKNOWN +} + +func (x *Run) GetStatus() Run_RunStatus { + if x != nil { + return x.Status + } + return Run_RUN_STATUS_UNKNOWN +} + +func (x *Run) GetStatusReason() *RunStatusReason { + if x != nil { + return x.StatusReason + } + return nil +} + +func (x *Run) GetTrigger() *Run_RunTriggerInfo { + if x != nil { + return x.Trigger + } + return nil +} + +func (x *Run) GetVariables() []*Variable { + if x != nil { + return x.Variables + } + return nil +} + +func (x *Run) GetStoreObjectsExpired() bool { + if x != nil { + return x.StoreObjectsExpired + } + return false +} + +type RunStatusReason struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reason RunStatusReason_RunStatusReasonKind `protobuf:"varint,1,opt,name=reason,proto3,enum=proto.RunStatusReason_RunStatusReasonKind" json:"reason,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *RunStatusReason) Reset() { + *x = RunStatusReason{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunStatusReason) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunStatusReason) ProtoMessage() {} + +func (x *RunStatusReason) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 RunStatusReason.ProtoReflect.Descriptor instead. +func (*RunStatusReason) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{8} +} + +func (x *RunStatusReason) GetReason() RunStatusReason_RunStatusReasonKind { + if x != nil { + return x.Reason + } + return RunStatusReason_RUN_STATUS_REASON_UNKNOWN +} + +func (x *RunStatusReason) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type RegistryAuth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Pass string `protobuf:"bytes,2,opt,name=pass,proto3" json:"pass,omitempty"` +} + +func (x *RegistryAuth) Reset() { + *x = RegistryAuth{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegistryAuth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegistryAuth) ProtoMessage() {} + +func (x *RegistryAuth) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 RegistryAuth.ProtoReflect.Descriptor instead. +func (*RegistryAuth) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{9} +} + +func (x *RegistryAuth) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *RegistryAuth) GetPass() string { + if x != nil { + return x.Pass + } + return "" +} + +type CustomTask struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` + RegistryAuth *RegistryAuth `protobuf:"bytes,4,opt,name=registry_auth,json=registryAuth,proto3" json:"registry_auth,omitempty"` + DependsOn map[string]CustomTask_RequiredParentStatus `protobuf:"bytes,5,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=proto.CustomTask_RequiredParentStatus"` + Variables []*Variable `protobuf:"bytes,6,rep,name=variables,proto3" json:"variables,omitempty"` + Entrypoint []string `protobuf:"bytes,7,rep,name=entrypoint,proto3" json:"entrypoint,omitempty"` + Command []string `protobuf:"bytes,8,rep,name=command,proto3" json:"command,omitempty"` + InjectApiToken bool `protobuf:"varint,9,opt,name=inject_api_token,json=injectApiToken,proto3" json:"inject_api_token,omitempty"` +} + +func (x *CustomTask) Reset() { + *x = CustomTask{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomTask) ProtoMessage() {} + +func (x *CustomTask) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 CustomTask.ProtoReflect.Descriptor instead. +func (*CustomTask) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{10} +} + +func (x *CustomTask) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CustomTask) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CustomTask) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *CustomTask) GetRegistryAuth() *RegistryAuth { + if x != nil { + return x.RegistryAuth + } + return nil +} + +func (x *CustomTask) GetDependsOn() map[string]CustomTask_RequiredParentStatus { + if x != nil { + return x.DependsOn + } + return nil +} + +func (x *CustomTask) GetVariables() []*Variable { + if x != nil { + return x.Variables + } + return nil +} + +func (x *CustomTask) GetEntrypoint() []string { + if x != nil { + return x.Entrypoint + } + return nil +} + +func (x *CustomTask) GetCommand() []string { + if x != nil { + return x.Command + } + return nil +} + +func (x *CustomTask) GetInjectApiToken() bool { + if x != nil { + return x.InjectApiToken + } + return false +} + +type PipelineTriggerSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` + Settings map[string]string `protobuf:"bytes,3,rep,name=settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *PipelineTriggerSettings) Reset() { + *x = PipelineTriggerSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PipelineTriggerSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PipelineTriggerSettings) ProtoMessage() {} + +func (x *PipelineTriggerSettings) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 PipelineTriggerSettings.ProtoReflect.Descriptor instead. +func (*PipelineTriggerSettings) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{11} +} + +func (x *PipelineTriggerSettings) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PipelineTriggerSettings) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *PipelineTriggerSettings) GetSettings() map[string]string { + if x != nil { + return x.Settings + } + return nil +} + +type PipelineCommonTaskSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + DependsOn map[string]PipelineCommonTaskSettings_RequiredParentStatus `protobuf:"bytes,4,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=proto.PipelineCommonTaskSettings_RequiredParentStatus"` + Settings map[string]string `protobuf:"bytes,5,rep,name=settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + InjectApiToken bool `protobuf:"varint,6,opt,name=inject_api_token,json=injectApiToken,proto3" json:"inject_api_token,omitempty"` +} + +func (x *PipelineCommonTaskSettings) Reset() { + *x = PipelineCommonTaskSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PipelineCommonTaskSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PipelineCommonTaskSettings) ProtoMessage() {} + +func (x *PipelineCommonTaskSettings) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 PipelineCommonTaskSettings.ProtoReflect.Descriptor instead. +func (*PipelineCommonTaskSettings) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{12} +} + +func (x *PipelineCommonTaskSettings) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PipelineCommonTaskSettings) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *PipelineCommonTaskSettings) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *PipelineCommonTaskSettings) GetDependsOn() map[string]PipelineCommonTaskSettings_RequiredParentStatus { + if x != nil { + return x.DependsOn + } + return nil +} + +func (x *PipelineCommonTaskSettings) GetSettings() map[string]string { + if x != nil { + return x.Settings + } + return nil +} + +func (x *PipelineCommonTaskSettings) GetInjectApiToken() bool { + if x != nil { + return x.InjectApiToken + } + return false +} + +type CommonTask struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Settings *PipelineCommonTaskSettings `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"` + Registration *CommonTaskRegistration `protobuf:"bytes,2,opt,name=registration,proto3" json:"registration,omitempty"` +} + +func (x *CommonTask) Reset() { + *x = CommonTask{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommonTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommonTask) ProtoMessage() {} + +func (x *CommonTask) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 CommonTask.ProtoReflect.Descriptor instead. +func (*CommonTask) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{13} +} + +func (x *CommonTask) GetSettings() *PipelineCommonTaskSettings { + if x != nil { + return x.Settings + } + return nil +} + +func (x *CommonTask) GetRegistration() *CommonTaskRegistration { + if x != nil { + return x.Registration + } + return nil +} + +type TaskRunStatusReason struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reason TaskRunStatusReason_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=proto.TaskRunStatusReason_Reason" json:"reason,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *TaskRunStatusReason) Reset() { + *x = TaskRunStatusReason{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskRunStatusReason) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskRunStatusReason) ProtoMessage() {} + +func (x *TaskRunStatusReason) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 TaskRunStatusReason.ProtoReflect.Descriptor instead. +func (*TaskRunStatusReason) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{14} +} + +func (x *TaskRunStatusReason) GetReason() TaskRunStatusReason_Reason { + if x != nil { + return x.Reason + } + return TaskRunStatusReason_UNKNOWN +} + +func (x *TaskRunStatusReason) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type TaskRun struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Created int64 `protobuf:"varint,1,opt,name=created,proto3" json:"created,omitempty"` + Ended int64 `protobuf:"varint,2,opt,name=ended,proto3" json:"ended,omitempty"` + ExitCode int64 `protobuf:"varint,3,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` + StatusReason *TaskRunStatusReason `protobuf:"bytes,4,opt,name=status_reason,json=statusReason,proto3" json:"status_reason,omitempty"` + Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` + LogsExpired bool `protobuf:"varint,6,opt,name=logs_expired,json=logsExpired,proto3" json:"logs_expired,omitempty"` + LogsRemoved bool `protobuf:"varint,7,opt,name=logs_removed,json=logsRemoved,proto3" json:"logs_removed,omitempty"` + Namespace string `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"` + Pipeline string `protobuf:"bytes,9,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + Version int64 `protobuf:"varint,10,opt,name=version,proto3" json:"version,omitempty"` + Run int64 `protobuf:"varint,11,opt,name=run,proto3" json:"run,omitempty"` + Started int64 `protobuf:"varint,12,opt,name=started,proto3" json:"started,omitempty"` + State TaskRun_TaskRunState `protobuf:"varint,13,opt,name=state,proto3,enum=proto.TaskRun_TaskRunState" json:"state,omitempty"` + Status TaskRun_TaskRunStatus `protobuf:"varint,14,opt,name=status,proto3,enum=proto.TaskRun_TaskRunStatus" json:"status,omitempty"` + // Types that are assignable to Task: + // + // *TaskRun_CustomTask + // *TaskRun_CommonTask + Task isTaskRun_Task `protobuf_oneof:"task"` + Variables []*Variable `protobuf:"bytes,17,rep,name=variables,proto3" json:"variables,omitempty"` +} + +func (x *TaskRun) Reset() { + *x = TaskRun{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskRun) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskRun) ProtoMessage() {} + +func (x *TaskRun) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 TaskRun.ProtoReflect.Descriptor instead. +func (*TaskRun) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{15} +} + +func (x *TaskRun) GetCreated() int64 { + if x != nil { + return x.Created + } + return 0 +} + +func (x *TaskRun) GetEnded() int64 { + if x != nil { + return x.Ended + } + return 0 +} + +func (x *TaskRun) GetExitCode() int64 { + if x != nil { + return x.ExitCode + } + return 0 +} + +func (x *TaskRun) GetStatusReason() *TaskRunStatusReason { + if x != nil { + return x.StatusReason + } + return nil +} + +func (x *TaskRun) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *TaskRun) GetLogsExpired() bool { + if x != nil { + return x.LogsExpired + } + return false +} + +func (x *TaskRun) GetLogsRemoved() bool { + if x != nil { + return x.LogsRemoved + } + return false +} + +func (x *TaskRun) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *TaskRun) GetPipeline() string { + if x != nil { + return x.Pipeline + } + return "" +} + +func (x *TaskRun) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *TaskRun) GetRun() int64 { + if x != nil { + return x.Run + } + return 0 +} + +func (x *TaskRun) GetStarted() int64 { + if x != nil { + return x.Started + } + return 0 +} + +func (x *TaskRun) GetState() TaskRun_TaskRunState { + if x != nil { + return x.State + } + return TaskRun_UNKNOWN_STATE +} + +func (x *TaskRun) GetStatus() TaskRun_TaskRunStatus { + if x != nil { + return x.Status + } + return TaskRun_UNKNOWN_STATUS +} + +func (m *TaskRun) GetTask() isTaskRun_Task { + if m != nil { + return m.Task + } + return nil +} + +func (x *TaskRun) GetCustomTask() *CustomTask { + if x, ok := x.GetTask().(*TaskRun_CustomTask); ok { + return x.CustomTask + } + return nil +} + +func (x *TaskRun) GetCommonTask() *CommonTask { + if x, ok := x.GetTask().(*TaskRun_CommonTask); ok { + return x.CommonTask + } + return nil +} + +func (x *TaskRun) GetVariables() []*Variable { + if x != nil { + return x.Variables + } + return nil +} + +type isTaskRun_Task interface { + isTaskRun_Task() +} + +type TaskRun_CustomTask struct { + CustomTask *CustomTask `protobuf:"bytes,15,opt,name=custom_task,json=customTask,proto3,oneof"` +} + +type TaskRun_CommonTask struct { + CommonTask *CommonTask `protobuf:"bytes,16,opt,name=common_task,json=commonTask,proto3,oneof"` +} + +func (*TaskRun_CustomTask) isTaskRun_Task() {} + +func (*TaskRun_CommonTask) isTaskRun_Task() {} + +type Trigger struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + Started int64 `protobuf:"varint,4,opt,name=started,proto3" json:"started,omitempty"` + State Trigger_TriggerState `protobuf:"varint,5,opt,name=state,proto3,enum=proto.Trigger_TriggerState" json:"state,omitempty"` + Status Trigger_TriggerStatus `protobuf:"varint,6,opt,name=status,proto3,enum=proto.Trigger_TriggerStatus" json:"status,omitempty"` + Documentation string `protobuf:"bytes,7,opt,name=documentation,proto3" json:"documentation,omitempty"` +} + +func (x *Trigger) Reset() { + *x = Trigger{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trigger) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trigger) ProtoMessage() {} + +func (x *Trigger) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 Trigger.ProtoReflect.Descriptor instead. +func (*Trigger) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{16} +} + +func (x *Trigger) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Trigger) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *Trigger) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Trigger) GetStarted() int64 { + if x != nil { + return x.Started + } + return 0 +} + +func (x *Trigger) GetState() Trigger_TriggerState { + if x != nil { + return x.State + } + return Trigger_UNKNOWN_STATE +} + +func (x *Trigger) GetStatus() Trigger_TriggerStatus { + if x != nil { + return x.Status + } + return Trigger_UNKNOWN_STATUS +} + +func (x *Trigger) GetDocumentation() string { + if x != nil { + return x.Documentation + } + return "" +} + +type TriggerRegistration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` + Pass string `protobuf:"bytes,4,opt,name=pass,proto3" json:"pass,omitempty"` + Variables map[string]string `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Created int64 `protobuf:"varint,6,opt,name=created,proto3" json:"created,omitempty"` + Status TriggerRegistration_TriggerStatus `protobuf:"varint,7,opt,name=status,proto3,enum=proto.TriggerRegistration_TriggerStatus" json:"status,omitempty"` +} + +func (x *TriggerRegistration) Reset() { + *x = TriggerRegistration{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TriggerRegistration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TriggerRegistration) ProtoMessage() {} + +func (x *TriggerRegistration) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 TriggerRegistration.ProtoReflect.Descriptor instead. +func (*TriggerRegistration) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{17} +} + +func (x *TriggerRegistration) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TriggerRegistration) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *TriggerRegistration) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *TriggerRegistration) GetPass() string { + if x != nil { + return x.Pass + } + return "" +} + +func (x *TriggerRegistration) GetVariables() map[string]string { + if x != nil { + return x.Variables + } + return nil +} + +func (x *TriggerRegistration) GetCreated() int64 { + if x != nil { + return x.Created + } + return 0 +} + +func (x *TriggerRegistration) GetStatus() TriggerRegistration_TriggerStatus { + if x != nil { + return x.Status + } + return TriggerRegistration_UNKNOWN_STATUS +} + +type CommonTaskRegistration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` + Pass string `protobuf:"bytes,4,opt,name=pass,proto3" json:"pass,omitempty"` + Variables []*Variable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"` + Created int64 `protobuf:"varint,6,opt,name=created,proto3" json:"created,omitempty"` + Status CommonTaskRegistration_Status `protobuf:"varint,7,opt,name=status,proto3,enum=proto.CommonTaskRegistration_Status" json:"status,omitempty"` + Documentation string `protobuf:"bytes,8,opt,name=documentation,proto3" json:"documentation,omitempty"` +} + +func (x *CommonTaskRegistration) Reset() { + *x = CommonTaskRegistration{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommonTaskRegistration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommonTaskRegistration) ProtoMessage() {} + +func (x *CommonTaskRegistration) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 CommonTaskRegistration.ProtoReflect.Descriptor instead. +func (*CommonTaskRegistration) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{18} +} + +func (x *CommonTaskRegistration) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CommonTaskRegistration) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *CommonTaskRegistration) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *CommonTaskRegistration) GetPass() string { + if x != nil { + return x.Pass + } + return "" +} + +func (x *CommonTaskRegistration) GetVariables() []*Variable { + if x != nil { + return x.Variables + } + return nil +} + +func (x *CommonTaskRegistration) GetCreated() int64 { + if x != nil { + return x.Created + } + return 0 +} + +func (x *CommonTaskRegistration) GetStatus() CommonTaskRegistration_Status { + if x != nil { + return x.Status + } + return CommonTaskRegistration_UNKNOWN +} + +func (x *CommonTaskRegistration) GetDocumentation() string { + if x != nil { + return x.Documentation + } + return "" +} + +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` // What type of event + Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` // Json output of the event + Emitted int64 `protobuf:"varint,4,opt,name=emitted,proto3" json:"emitted,omitempty"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_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 Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{19} +} + +func (x *Event) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Event) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Event) GetDetails() string { + if x != nil { + return x.Details + } + return "" +} + +func (x *Event) GetEmitted() int64 { + if x != nil { + return x.Emitted + } + return 0 +} + +type Token struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Created int64 `protobuf:"varint,1,opt,name=created,proto3" json:"created,omitempty"` + Kind Token_Kind `protobuf:"varint,2,opt,name=kind,proto3,enum=proto.Token_Kind" json:"kind,omitempty"` + Namespaces []string `protobuf:"bytes,3,rep,name=namespaces,proto3" json:"namespaces,omitempty"` + Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Expires int64 `protobuf:"varint,5,opt,name=expires,proto3" json:"expires,omitempty"` + Disabled bool `protobuf:"varint,6,opt,name=disabled,proto3" json:"disabled,omitempty"` +} + +func (x *Token) Reset() { + *x = Token{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Token) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Token) ProtoMessage() {} + +func (x *Token) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Token.ProtoReflect.Descriptor instead. +func (*Token) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{20} +} + +func (x *Token) GetCreated() int64 { + if x != nil { + return x.Created + } + return 0 +} + +func (x *Token) GetKind() Token_Kind { + if x != nil { + return x.Kind + } + return Token_UNKNOWN +} + +func (x *Token) GetNamespaces() []string { + if x != nil { + return x.Namespaces + } + return nil +} + +func (x *Token) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Token) GetExpires() int64 { + if x != nil { + return x.Expires + } + return 0 +} + +func (x *Token) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +type TriggerResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status TriggerResult_Status `protobuf:"varint,1,opt,name=status,proto3,enum=proto.TriggerResult_Status" json:"status,omitempty"` + Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` +} + +func (x *TriggerResult) Reset() { + *x = TriggerResult{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TriggerResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TriggerResult) ProtoMessage() {} + +func (x *TriggerResult) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TriggerResult.ProtoReflect.Descriptor instead. +func (*TriggerResult) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{21} +} + +func (x *TriggerResult) GetStatus() TriggerResult_Status { + if x != nil { + return x.Status + } + return TriggerResult_UNKNOWN +} + +func (x *TriggerResult) GetDetails() string { + if x != nil { + return x.Details + } + return "" +} + +type SecretStoreKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"` +} + +func (x *SecretStoreKey) Reset() { + *x = SecretStoreKey{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecretStoreKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretStoreKey) ProtoMessage() {} + +func (x *SecretStoreKey) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecretStoreKey.ProtoReflect.Descriptor instead. +func (*SecretStoreKey) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{22} +} + +func (x *SecretStoreKey) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *SecretStoreKey) GetCreated() int64 { + if x != nil { + return x.Created + } + return 0 +} + +type ObjectStoreKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"` +} + +func (x *ObjectStoreKey) Reset() { + *x = ObjectStoreKey{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObjectStoreKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObjectStoreKey) ProtoMessage() {} + +func (x *ObjectStoreKey) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObjectStoreKey.ProtoReflect.Descriptor instead. +func (*ObjectStoreKey) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{23} +} + +func (x *ObjectStoreKey) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *ObjectStoreKey) GetCreated() int64 { + if x != nil { + return x.Created + } + return 0 +} + +type Run_RunTriggerInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` +} + +func (x *Run_RunTriggerInfo) Reset() { + *x = Run_RunTriggerInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_api_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Run_RunTriggerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Run_RunTriggerInfo) ProtoMessage() {} + +func (x *Run_RunTriggerInfo) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_api_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Run_RunTriggerInfo.ProtoReflect.Descriptor instead. +func (*Run_RunTriggerInfo) Descriptor() ([]byte, []int) { + return file_gofer_message_api_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *Run_RunTriggerInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Run_RunTriggerInfo) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +var File_gofer_message_api_proto protoreflect.FileDescriptor + +var file_gofer_message_api_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x87, 0x01, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 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, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x4a, 0x0a, 0x08, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 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, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x6e, 0x0a, 0x08, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xfa, 0x01, 0x0a, 0x10, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, + 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x45, 0x0a, 0x0d, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, + 0x16, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, + 0x44, 0x10, 0x02, 0x22, 0xed, 0x05, 0x0a, 0x0e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, + 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x6d, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 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, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x49, 0x0a, + 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x1a, 0x51, 0x0a, 0x10, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x61, 0x0a, 0x10, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x62, 0x0a, 0x13, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, + 0x4e, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x4e, 0x52, + 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x56, + 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, + 0x44, 0x10, 0x03, 0x22, 0xa1, 0x02, 0x0a, 0x16, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x50, + 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x92, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, + 0x64, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x52, 0x49, 0x47, 0x47, + 0x45, 0x52, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, + 0x52, 0x45, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, + 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x54, + 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x03, 0x22, 0xc2, 0x04, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x64, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x6e, 0x64, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x42, 0x0a, 0x0d, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x20, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x6f, 0x67, + 0x73, 0x22, 0x4a, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, + 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x22, 0x4d, 0x0a, + 0x10, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, + 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x46, 0x55, 0x4c, 0x10, 0x02, 0x22, 0x9e, 0x05, 0x0a, + 0x03, 0x52, 0x75, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x52, 0x75, 0x6e, 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x2e, + 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x3b, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x33, + 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x2e, 0x52, 0x75, 0x6e, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x13, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x1a, 0x3a, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x22, 0x49, 0x0a, 0x08, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, + 0x0a, 0x11, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, + 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x22, 0x4e, 0x0a, + 0x09, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x55, + 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x46, 0x55, 0x4c, + 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, + 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x22, 0x98, 0x02, + 0x0a, 0x0f, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x12, 0x42, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x06, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x12, + 0x1d, 0x0a, 0x19, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x41, 0x42, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x49, 0x54, 0x10, + 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x52, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, + 0x12, 0x0a, 0x0e, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x43, 0x41, 0x4e, + 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x22, 0x36, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, + 0x70, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, + 0x22, 0xa7, 0x04, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x41, + 0x75, 0x74, 0x68, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x41, 0x75, 0x74, + 0x68, 0x12, 0x3f, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, + 0x4f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, + 0x4f, 0x6e, 0x12, 0x2d, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x69, + 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x70, 0x69, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x64, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, + 0x4f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5d, 0x0a, 0x14, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x5f, + 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x01, + 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0b, 0x0a, + 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x03, 0x22, 0xca, 0x01, 0x0a, 0x17, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x12, 0x48, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, 0x04, 0x0a, 0x1a, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 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, 0x4f, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x73, 0x4f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x73, 0x4f, 0x6e, 0x12, 0x4b, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x41, 0x70, 0x69, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x74, 0x0a, 0x0e, 0x44, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4c, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x3b, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5d, 0x0a, + 0x14, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, + 0x44, 0x5f, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x03, 0x22, 0x8e, 0x01, 0x0a, + 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3d, 0x0a, 0x08, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x0c, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe7, 0x01, + 0x0a, 0x13, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x73, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x42, 0x4e, + 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5f, 0x45, 0x58, 0x49, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, + 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x02, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x43, + 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, + 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x52, 0x50, + 0x48, 0x41, 0x4e, 0x45, 0x44, 0x10, 0x05, 0x22, 0xb1, 0x06, 0x0a, 0x07, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x75, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x73, 0x45, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x73, 0x5f, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x72, + 0x75, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, + 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x0a, 0x09, + 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x59, 0x0a, 0x0c, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, + 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4d, 0x50, + 0x4c, 0x45, 0x54, 0x45, 0x10, 0x04, 0x22, 0x5b, 0x0a, 0x0d, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, + 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x46, 0x55, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, + 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, + 0x44, 0x10, 0x04, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0xfa, 0x02, 0x0a, 0x07, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x0c, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, + 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, + 0x45, 0x58, 0x49, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0x3e, 0x0a, 0x0d, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, + 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x22, 0x8a, 0x03, 0x0a, 0x13, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x73, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3e, 0x0a, 0x0d, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, + 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, + 0x4c, 0x45, 0x44, 0x10, 0x02, 0x22, 0xc9, 0x02, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x30, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, + 0x02, 0x22, 0x5f, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6d, 0x69, 0x74, 0x74, + 0x65, 0x64, 0x22, 0xc4, 0x02, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1e, 0x0a, + 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x36, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2f, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, + 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, + 0x0a, 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x22, 0x9c, 0x01, 0x0a, 0x0d, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x33, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x3c, 0x0a, 0x06, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, + 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x03, 0x22, 0x3c, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3c, 0x0a, 0x0e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x69, 0x6e, 0x74, 0x6a, 0x65, 0x64, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gofer_message_api_proto_rawDescOnce sync.Once + file_gofer_message_api_proto_rawDescData = file_gofer_message_api_proto_rawDesc +) + +func file_gofer_message_api_proto_rawDescGZIP() []byte { + file_gofer_message_api_proto_rawDescOnce.Do(func() { + file_gofer_message_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_gofer_message_api_proto_rawDescData) + }) + return file_gofer_message_api_proto_rawDescData +} + +var file_gofer_message_api_proto_enumTypes = make([]protoimpl.EnumInfo, 19) +var file_gofer_message_api_proto_msgTypes = make([]protoimpl.MessageInfo, 33) +var file_gofer_message_api_proto_goTypes = []interface{}{ + (PipelineMetadata_PipelineState)(0), // 0: proto.PipelineMetadata.PipelineState + (PipelineConfig_PipelineConfigState)(0), // 1: proto.PipelineConfig.PipelineConfigState + (DeploymentStatusReason_DeploymentStatusReasonKind)(0), // 2: proto.DeploymentStatusReason.DeploymentStatusReasonKind + (Deployment_DeploymentState)(0), // 3: proto.Deployment.DeploymentState + (Deployment_DeploymentStatus)(0), // 4: proto.Deployment.DeploymentStatus + (Run_RunState)(0), // 5: proto.Run.RunState + (Run_RunStatus)(0), // 6: proto.Run.RunStatus + (RunStatusReason_RunStatusReasonKind)(0), // 7: proto.RunStatusReason.RunStatusReasonKind + (CustomTask_RequiredParentStatus)(0), // 8: proto.CustomTask.RequiredParentStatus + (PipelineCommonTaskSettings_RequiredParentStatus)(0), // 9: proto.PipelineCommonTaskSettings.RequiredParentStatus + (TaskRunStatusReason_Reason)(0), // 10: proto.TaskRunStatusReason.Reason + (TaskRun_TaskRunState)(0), // 11: proto.TaskRun.TaskRunState + (TaskRun_TaskRunStatus)(0), // 12: proto.TaskRun.TaskRunStatus + (Trigger_TriggerState)(0), // 13: proto.Trigger.TriggerState + (Trigger_TriggerStatus)(0), // 14: proto.Trigger.TriggerStatus + (TriggerRegistration_TriggerStatus)(0), // 15: proto.TriggerRegistration.TriggerStatus + (CommonTaskRegistration_Status)(0), // 16: proto.CommonTaskRegistration.Status + (Token_Kind)(0), // 17: proto.Token.Kind + (TriggerResult_Status)(0), // 18: proto.TriggerResult.Status + (*Namespace)(nil), // 19: proto.Namespace + (*Variable)(nil), // 20: proto.Variable + (*Pipeline)(nil), // 21: proto.Pipeline + (*PipelineMetadata)(nil), // 22: proto.PipelineMetadata + (*PipelineConfig)(nil), // 23: proto.PipelineConfig + (*DeploymentStatusReason)(nil), // 24: proto.DeploymentStatusReason + (*Deployment)(nil), // 25: proto.Deployment + (*Run)(nil), // 26: proto.Run + (*RunStatusReason)(nil), // 27: proto.RunStatusReason + (*RegistryAuth)(nil), // 28: proto.RegistryAuth + (*CustomTask)(nil), // 29: proto.CustomTask + (*PipelineTriggerSettings)(nil), // 30: proto.PipelineTriggerSettings + (*PipelineCommonTaskSettings)(nil), // 31: proto.PipelineCommonTaskSettings + (*CommonTask)(nil), // 32: proto.CommonTask + (*TaskRunStatusReason)(nil), // 33: proto.TaskRunStatusReason + (*TaskRun)(nil), // 34: proto.TaskRun + (*Trigger)(nil), // 35: proto.Trigger + (*TriggerRegistration)(nil), // 36: proto.TriggerRegistration + (*CommonTaskRegistration)(nil), // 37: proto.CommonTaskRegistration + (*Event)(nil), // 38: proto.Event + (*Token)(nil), // 39: proto.Token + (*TriggerResult)(nil), // 40: proto.TriggerResult + (*SecretStoreKey)(nil), // 41: proto.SecretStoreKey + (*ObjectStoreKey)(nil), // 42: proto.ObjectStoreKey + nil, // 43: proto.PipelineConfig.CustomTasksEntry + nil, // 44: proto.PipelineConfig.CommonTasksEntry + (*Run_RunTriggerInfo)(nil), // 45: proto.Run.RunTriggerInfo + nil, // 46: proto.CustomTask.DependsOnEntry + nil, // 47: proto.PipelineTriggerSettings.SettingsEntry + nil, // 48: proto.PipelineCommonTaskSettings.DependsOnEntry + nil, // 49: proto.PipelineCommonTaskSettings.SettingsEntry + nil, // 50: proto.TriggerRegistration.VariablesEntry + nil, // 51: proto.Token.MetadataEntry +} +var file_gofer_message_api_proto_depIdxs = []int32{ + 22, // 0: proto.Pipeline.metadata:type_name -> proto.PipelineMetadata + 23, // 1: proto.Pipeline.config:type_name -> proto.PipelineConfig + 0, // 2: proto.PipelineMetadata.state:type_name -> proto.PipelineMetadata.PipelineState + 43, // 3: proto.PipelineConfig.custom_tasks:type_name -> proto.PipelineConfig.CustomTasksEntry + 44, // 4: proto.PipelineConfig.common_tasks:type_name -> proto.PipelineConfig.CommonTasksEntry + 1, // 5: proto.PipelineConfig.state:type_name -> proto.PipelineConfig.PipelineConfigState + 2, // 6: proto.DeploymentStatusReason.reason:type_name -> proto.DeploymentStatusReason.DeploymentStatusReasonKind + 3, // 7: proto.Deployment.state:type_name -> proto.Deployment.DeploymentState + 4, // 8: proto.Deployment.status:type_name -> proto.Deployment.DeploymentStatus + 24, // 9: proto.Deployment.status_reason:type_name -> proto.DeploymentStatusReason + 38, // 10: proto.Deployment.logs:type_name -> proto.Event + 5, // 11: proto.Run.state:type_name -> proto.Run.RunState + 6, // 12: proto.Run.status:type_name -> proto.Run.RunStatus + 27, // 13: proto.Run.status_reason:type_name -> proto.RunStatusReason + 45, // 14: proto.Run.trigger:type_name -> proto.Run.RunTriggerInfo + 20, // 15: proto.Run.variables:type_name -> proto.Variable + 7, // 16: proto.RunStatusReason.reason:type_name -> proto.RunStatusReason.RunStatusReasonKind + 28, // 17: proto.CustomTask.registry_auth:type_name -> proto.RegistryAuth + 46, // 18: proto.CustomTask.depends_on:type_name -> proto.CustomTask.DependsOnEntry + 20, // 19: proto.CustomTask.variables:type_name -> proto.Variable + 47, // 20: proto.PipelineTriggerSettings.settings:type_name -> proto.PipelineTriggerSettings.SettingsEntry + 48, // 21: proto.PipelineCommonTaskSettings.depends_on:type_name -> proto.PipelineCommonTaskSettings.DependsOnEntry + 49, // 22: proto.PipelineCommonTaskSettings.settings:type_name -> proto.PipelineCommonTaskSettings.SettingsEntry + 31, // 23: proto.CommonTask.settings:type_name -> proto.PipelineCommonTaskSettings + 37, // 24: proto.CommonTask.registration:type_name -> proto.CommonTaskRegistration + 10, // 25: proto.TaskRunStatusReason.reason:type_name -> proto.TaskRunStatusReason.Reason + 33, // 26: proto.TaskRun.status_reason:type_name -> proto.TaskRunStatusReason + 11, // 27: proto.TaskRun.state:type_name -> proto.TaskRun.TaskRunState + 12, // 28: proto.TaskRun.status:type_name -> proto.TaskRun.TaskRunStatus + 29, // 29: proto.TaskRun.custom_task:type_name -> proto.CustomTask + 32, // 30: proto.TaskRun.common_task:type_name -> proto.CommonTask + 20, // 31: proto.TaskRun.variables:type_name -> proto.Variable + 13, // 32: proto.Trigger.state:type_name -> proto.Trigger.TriggerState + 14, // 33: proto.Trigger.status:type_name -> proto.Trigger.TriggerStatus + 50, // 34: proto.TriggerRegistration.variables:type_name -> proto.TriggerRegistration.VariablesEntry + 15, // 35: proto.TriggerRegistration.status:type_name -> proto.TriggerRegistration.TriggerStatus + 20, // 36: proto.CommonTaskRegistration.variables:type_name -> proto.Variable + 16, // 37: proto.CommonTaskRegistration.status:type_name -> proto.CommonTaskRegistration.Status + 17, // 38: proto.Token.kind:type_name -> proto.Token.Kind + 51, // 39: proto.Token.metadata:type_name -> proto.Token.MetadataEntry + 18, // 40: proto.TriggerResult.status:type_name -> proto.TriggerResult.Status + 29, // 41: proto.PipelineConfig.CustomTasksEntry.value:type_name -> proto.CustomTask + 31, // 42: proto.PipelineConfig.CommonTasksEntry.value:type_name -> proto.PipelineCommonTaskSettings + 8, // 43: proto.CustomTask.DependsOnEntry.value:type_name -> proto.CustomTask.RequiredParentStatus + 9, // 44: proto.PipelineCommonTaskSettings.DependsOnEntry.value:type_name -> proto.PipelineCommonTaskSettings.RequiredParentStatus + 45, // [45:45] is the sub-list for method output_type + 45, // [45:45] is the sub-list for method input_type + 45, // [45:45] is the sub-list for extension type_name + 45, // [45:45] is the sub-list for extension extendee + 0, // [0:45] is the sub-list for field type_name +} + +func init() { file_gofer_message_api_proto_init() } +func file_gofer_message_api_proto_init() { + if File_gofer_message_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gofer_message_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Namespace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[1].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_gofer_message_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Pipeline); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PipelineMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PipelineConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeploymentStatusReason); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Deployment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Run); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunStatusReason); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegistryAuth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CustomTask); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PipelineTriggerSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PipelineCommonTaskSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommonTask); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskRunStatusReason); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskRun); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trigger); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TriggerRegistration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommonTaskRegistration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Token); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TriggerResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecretStoreKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObjectStoreKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_api_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Run_RunTriggerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_gofer_message_api_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*TaskRun_CustomTask)(nil), + (*TaskRun_CommonTask)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gofer_message_api_proto_rawDesc, + NumEnums: 19, + NumMessages: 33, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_gofer_message_api_proto_goTypes, + DependencyIndexes: file_gofer_message_api_proto_depIdxs, + EnumInfos: file_gofer_message_api_proto_enumTypes, + MessageInfos: file_gofer_message_api_proto_msgTypes, + }.Build() + File_gofer_message_api_proto = out.File + file_gofer_message_api_proto_rawDesc = nil + file_gofer_message_api_proto_goTypes = nil + file_gofer_message_api_proto_depIdxs = nil +} diff --git a/proto/go/gofer_message_sdk.pb.go b/proto/go/gofer_message_sdk.pb.go new file mode 100644 index 00000000..5603cc16 --- /dev/null +++ b/proto/go/gofer_message_sdk.pb.go @@ -0,0 +1,720 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: gofer_message_sdk.proto + +package _go + +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 UserCustomTaskConfig_RequiredParentStatus int32 + +const ( + UserCustomTaskConfig_REQUIRED_PARENT_STATUS_UNKNOWN UserCustomTaskConfig_RequiredParentStatus = 0 + UserCustomTaskConfig_ANY UserCustomTaskConfig_RequiredParentStatus = 1 + UserCustomTaskConfig_SUCCESS UserCustomTaskConfig_RequiredParentStatus = 2 + UserCustomTaskConfig_FAILURE UserCustomTaskConfig_RequiredParentStatus = 3 +) + +// Enum value maps for UserCustomTaskConfig_RequiredParentStatus. +var ( + UserCustomTaskConfig_RequiredParentStatus_name = map[int32]string{ + 0: "REQUIRED_PARENT_STATUS_UNKNOWN", + 1: "ANY", + 2: "SUCCESS", + 3: "FAILURE", + } + UserCustomTaskConfig_RequiredParentStatus_value = map[string]int32{ + "REQUIRED_PARENT_STATUS_UNKNOWN": 0, + "ANY": 1, + "SUCCESS": 2, + "FAILURE": 3, + } +) + +func (x UserCustomTaskConfig_RequiredParentStatus) Enum() *UserCustomTaskConfig_RequiredParentStatus { + p := new(UserCustomTaskConfig_RequiredParentStatus) + *p = x + return p +} + +func (x UserCustomTaskConfig_RequiredParentStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UserCustomTaskConfig_RequiredParentStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_sdk_proto_enumTypes[0].Descriptor() +} + +func (UserCustomTaskConfig_RequiredParentStatus) Type() protoreflect.EnumType { + return &file_gofer_message_sdk_proto_enumTypes[0] +} + +func (x UserCustomTaskConfig_RequiredParentStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UserCustomTaskConfig_RequiredParentStatus.Descriptor instead. +func (UserCustomTaskConfig_RequiredParentStatus) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_sdk_proto_rawDescGZIP(), []int{2, 0} +} + +type UserCommonTaskConfig_RequiredParentStatus int32 + +const ( + UserCommonTaskConfig_REQUIRED_PARENT_STATUS_UNKNOWN UserCommonTaskConfig_RequiredParentStatus = 0 + UserCommonTaskConfig_ANY UserCommonTaskConfig_RequiredParentStatus = 1 + UserCommonTaskConfig_SUCCESS UserCommonTaskConfig_RequiredParentStatus = 2 + UserCommonTaskConfig_FAILURE UserCommonTaskConfig_RequiredParentStatus = 3 +) + +// Enum value maps for UserCommonTaskConfig_RequiredParentStatus. +var ( + UserCommonTaskConfig_RequiredParentStatus_name = map[int32]string{ + 0: "REQUIRED_PARENT_STATUS_UNKNOWN", + 1: "ANY", + 2: "SUCCESS", + 3: "FAILURE", + } + UserCommonTaskConfig_RequiredParentStatus_value = map[string]int32{ + "REQUIRED_PARENT_STATUS_UNKNOWN": 0, + "ANY": 1, + "SUCCESS": 2, + "FAILURE": 3, + } +) + +func (x UserCommonTaskConfig_RequiredParentStatus) Enum() *UserCommonTaskConfig_RequiredParentStatus { + p := new(UserCommonTaskConfig_RequiredParentStatus) + *p = x + return p +} + +func (x UserCommonTaskConfig_RequiredParentStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UserCommonTaskConfig_RequiredParentStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gofer_message_sdk_proto_enumTypes[1].Descriptor() +} + +func (UserCommonTaskConfig_RequiredParentStatus) Type() protoreflect.EnumType { + return &file_gofer_message_sdk_proto_enumTypes[1] +} + +func (x UserCommonTaskConfig_RequiredParentStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UserCommonTaskConfig_RequiredParentStatus.Descriptor instead. +func (UserCommonTaskConfig_RequiredParentStatus) EnumDescriptor() ([]byte, []int) { + return file_gofer_message_sdk_proto_rawDescGZIP(), []int{3, 0} +} + +type UserPipelineConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Parallelism int64 `protobuf:"varint,4,opt,name=parallelism,proto3" json:"parallelism,omitempty"` + Tasks []*UserPipelineTaskConfig `protobuf:"bytes,5,rep,name=tasks,proto3" json:"tasks,omitempty"` +} + +func (x *UserPipelineConfig) Reset() { + *x = UserPipelineConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_sdk_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserPipelineConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserPipelineConfig) ProtoMessage() {} + +func (x *UserPipelineConfig) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_sdk_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 UserPipelineConfig.ProtoReflect.Descriptor instead. +func (*UserPipelineConfig) Descriptor() ([]byte, []int) { + return file_gofer_message_sdk_proto_rawDescGZIP(), []int{0} +} + +func (x *UserPipelineConfig) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UserPipelineConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UserPipelineConfig) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UserPipelineConfig) GetParallelism() int64 { + if x != nil { + return x.Parallelism + } + return 0 +} + +func (x *UserPipelineConfig) GetTasks() []*UserPipelineTaskConfig { + if x != nil { + return x.Tasks + } + return nil +} + +type UserPipelineTaskConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Task: + // + // *UserPipelineTaskConfig_CustomTask + // *UserPipelineTaskConfig_CommonTask + Task isUserPipelineTaskConfig_Task `protobuf_oneof:"task"` +} + +func (x *UserPipelineTaskConfig) Reset() { + *x = UserPipelineTaskConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_sdk_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserPipelineTaskConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserPipelineTaskConfig) ProtoMessage() {} + +func (x *UserPipelineTaskConfig) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_sdk_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 UserPipelineTaskConfig.ProtoReflect.Descriptor instead. +func (*UserPipelineTaskConfig) Descriptor() ([]byte, []int) { + return file_gofer_message_sdk_proto_rawDescGZIP(), []int{1} +} + +func (m *UserPipelineTaskConfig) GetTask() isUserPipelineTaskConfig_Task { + if m != nil { + return m.Task + } + return nil +} + +func (x *UserPipelineTaskConfig) GetCustomTask() *UserCustomTaskConfig { + if x, ok := x.GetTask().(*UserPipelineTaskConfig_CustomTask); ok { + return x.CustomTask + } + return nil +} + +func (x *UserPipelineTaskConfig) GetCommonTask() *UserCommonTaskConfig { + if x, ok := x.GetTask().(*UserPipelineTaskConfig_CommonTask); ok { + return x.CommonTask + } + return nil +} + +type isUserPipelineTaskConfig_Task interface { + isUserPipelineTaskConfig_Task() +} + +type UserPipelineTaskConfig_CustomTask struct { + CustomTask *UserCustomTaskConfig `protobuf:"bytes,1,opt,name=custom_task,json=customTask,proto3,oneof"` +} + +type UserPipelineTaskConfig_CommonTask struct { + CommonTask *UserCommonTaskConfig `protobuf:"bytes,2,opt,name=common_task,json=commonTask,proto3,oneof"` +} + +func (*UserPipelineTaskConfig_CustomTask) isUserPipelineTaskConfig_Task() {} + +func (*UserPipelineTaskConfig_CommonTask) isUserPipelineTaskConfig_Task() {} + +type UserCustomTaskConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` + RegistryAuth *RegistryAuth `protobuf:"bytes,4,opt,name=registry_auth,json=registryAuth,proto3" json:"registry_auth,omitempty"` + DependsOn map[string]UserCustomTaskConfig_RequiredParentStatus `protobuf:"bytes,5,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=proto.UserCustomTaskConfig_RequiredParentStatus"` + Variables map[string]string `protobuf:"bytes,6,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Entrypoint []string `protobuf:"bytes,7,rep,name=entrypoint,proto3" json:"entrypoint,omitempty"` + Command []string `protobuf:"bytes,8,rep,name=command,proto3" json:"command,omitempty"` + InjectApiToken bool `protobuf:"varint,9,opt,name=inject_api_token,json=injectApiToken,proto3" json:"inject_api_token,omitempty"` +} + +func (x *UserCustomTaskConfig) Reset() { + *x = UserCustomTaskConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_sdk_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserCustomTaskConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserCustomTaskConfig) ProtoMessage() {} + +func (x *UserCustomTaskConfig) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_sdk_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 UserCustomTaskConfig.ProtoReflect.Descriptor instead. +func (*UserCustomTaskConfig) Descriptor() ([]byte, []int) { + return file_gofer_message_sdk_proto_rawDescGZIP(), []int{2} +} + +func (x *UserCustomTaskConfig) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UserCustomTaskConfig) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UserCustomTaskConfig) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *UserCustomTaskConfig) GetRegistryAuth() *RegistryAuth { + if x != nil { + return x.RegistryAuth + } + return nil +} + +func (x *UserCustomTaskConfig) GetDependsOn() map[string]UserCustomTaskConfig_RequiredParentStatus { + if x != nil { + return x.DependsOn + } + return nil +} + +func (x *UserCustomTaskConfig) GetVariables() map[string]string { + if x != nil { + return x.Variables + } + return nil +} + +func (x *UserCustomTaskConfig) GetEntrypoint() []string { + if x != nil { + return x.Entrypoint + } + return nil +} + +func (x *UserCustomTaskConfig) GetCommand() []string { + if x != nil { + return x.Command + } + return nil +} + +func (x *UserCustomTaskConfig) GetInjectApiToken() bool { + if x != nil { + return x.InjectApiToken + } + return false +} + +type UserCommonTaskConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + DependsOn map[string]UserCommonTaskConfig_RequiredParentStatus `protobuf:"bytes,4,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=proto.UserCommonTaskConfig_RequiredParentStatus"` + Settings map[string]string `protobuf:"bytes,5,rep,name=settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + InjectApiToken bool `protobuf:"varint,6,opt,name=inject_api_token,json=injectApiToken,proto3" json:"inject_api_token,omitempty"` +} + +func (x *UserCommonTaskConfig) Reset() { + *x = UserCommonTaskConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_message_sdk_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserCommonTaskConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserCommonTaskConfig) ProtoMessage() {} + +func (x *UserCommonTaskConfig) ProtoReflect() protoreflect.Message { + mi := &file_gofer_message_sdk_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 UserCommonTaskConfig.ProtoReflect.Descriptor instead. +func (*UserCommonTaskConfig) Descriptor() ([]byte, []int) { + return file_gofer_message_sdk_proto_rawDescGZIP(), []int{3} +} + +func (x *UserCommonTaskConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UserCommonTaskConfig) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *UserCommonTaskConfig) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UserCommonTaskConfig) GetDependsOn() map[string]UserCommonTaskConfig_RequiredParentStatus { + if x != nil { + return x.DependsOn + } + return nil +} + +func (x *UserCommonTaskConfig) GetSettings() map[string]string { + if x != nil { + return x.Settings + } + return nil +} + +func (x *UserCommonTaskConfig) GetInjectApiToken() bool { + if x != nil { + return x.InjectApiToken + } + return false +} + +var File_gofer_message_sdk_proto protoreflect.FileDescriptor + +var file_gofer_message_sdk_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x64, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x01, 0x0a, 0x12, 0x55, 0x73, + 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, + 0x65, 0x6c, 0x69, 0x73, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x61, 0x72, + 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x6d, 0x12, 0x33, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0xa0, 0x01, + 0x0a, 0x16, 0x55, 0x73, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, + 0x22, 0x9e, 0x05, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, + 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x12, 0x38, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x61, 0x75, + 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x52, 0x0c, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x0a, 0x64, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x12, 0x48, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x70, 0x69, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x6e, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, + 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x5d, 0x0a, 0x14, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x45, + 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, + 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, + 0x53, 0x53, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, + 0x03, 0x22, 0xaa, 0x04, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 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, 0x49, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, + 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, + 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, + 0x6e, 0x12, 0x45, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x70, 0x69, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x1a, 0x6e, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x5d, 0x0a, 0x14, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x45, 0x51, 0x55, 0x49, + 0x52, 0x45, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, + 0x4e, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, + 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x03, 0x42, 0x29, + 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x69, + 0x6e, 0x74, 0x6a, 0x65, 0x64, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x72, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_gofer_message_sdk_proto_rawDescOnce sync.Once + file_gofer_message_sdk_proto_rawDescData = file_gofer_message_sdk_proto_rawDesc +) + +func file_gofer_message_sdk_proto_rawDescGZIP() []byte { + file_gofer_message_sdk_proto_rawDescOnce.Do(func() { + file_gofer_message_sdk_proto_rawDescData = protoimpl.X.CompressGZIP(file_gofer_message_sdk_proto_rawDescData) + }) + return file_gofer_message_sdk_proto_rawDescData +} + +var file_gofer_message_sdk_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_gofer_message_sdk_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_gofer_message_sdk_proto_goTypes = []interface{}{ + (UserCustomTaskConfig_RequiredParentStatus)(0), // 0: proto.UserCustomTaskConfig.RequiredParentStatus + (UserCommonTaskConfig_RequiredParentStatus)(0), // 1: proto.UserCommonTaskConfig.RequiredParentStatus + (*UserPipelineConfig)(nil), // 2: proto.UserPipelineConfig + (*UserPipelineTaskConfig)(nil), // 3: proto.UserPipelineTaskConfig + (*UserCustomTaskConfig)(nil), // 4: proto.UserCustomTaskConfig + (*UserCommonTaskConfig)(nil), // 5: proto.UserCommonTaskConfig + nil, // 6: proto.UserCustomTaskConfig.DependsOnEntry + nil, // 7: proto.UserCustomTaskConfig.VariablesEntry + nil, // 8: proto.UserCommonTaskConfig.DependsOnEntry + nil, // 9: proto.UserCommonTaskConfig.SettingsEntry + (*RegistryAuth)(nil), // 10: proto.RegistryAuth +} +var file_gofer_message_sdk_proto_depIdxs = []int32{ + 3, // 0: proto.UserPipelineConfig.tasks:type_name -> proto.UserPipelineTaskConfig + 4, // 1: proto.UserPipelineTaskConfig.custom_task:type_name -> proto.UserCustomTaskConfig + 5, // 2: proto.UserPipelineTaskConfig.common_task:type_name -> proto.UserCommonTaskConfig + 10, // 3: proto.UserCustomTaskConfig.registry_auth:type_name -> proto.RegistryAuth + 6, // 4: proto.UserCustomTaskConfig.depends_on:type_name -> proto.UserCustomTaskConfig.DependsOnEntry + 7, // 5: proto.UserCustomTaskConfig.variables:type_name -> proto.UserCustomTaskConfig.VariablesEntry + 8, // 6: proto.UserCommonTaskConfig.depends_on:type_name -> proto.UserCommonTaskConfig.DependsOnEntry + 9, // 7: proto.UserCommonTaskConfig.settings:type_name -> proto.UserCommonTaskConfig.SettingsEntry + 0, // 8: proto.UserCustomTaskConfig.DependsOnEntry.value:type_name -> proto.UserCustomTaskConfig.RequiredParentStatus + 1, // 9: proto.UserCommonTaskConfig.DependsOnEntry.value:type_name -> proto.UserCommonTaskConfig.RequiredParentStatus + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_gofer_message_sdk_proto_init() } +func file_gofer_message_sdk_proto_init() { + if File_gofer_message_sdk_proto != nil { + return + } + file_gofer_message_api_proto_init() + if !protoimpl.UnsafeEnabled { + file_gofer_message_sdk_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserPipelineConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_sdk_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserPipelineTaskConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_sdk_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserCustomTaskConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_message_sdk_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserCommonTaskConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_gofer_message_sdk_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*UserPipelineTaskConfig_CustomTask)(nil), + (*UserPipelineTaskConfig_CommonTask)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gofer_message_sdk_proto_rawDesc, + NumEnums: 2, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_gofer_message_sdk_proto_goTypes, + DependencyIndexes: file_gofer_message_sdk_proto_depIdxs, + EnumInfos: file_gofer_message_sdk_proto_enumTypes, + MessageInfos: file_gofer_message_sdk_proto_msgTypes, + }.Build() + File_gofer_message_sdk_proto = out.File + file_gofer_message_sdk_proto_rawDesc = nil + file_gofer_message_sdk_proto_goTypes = nil + file_gofer_message_sdk_proto_depIdxs = nil +} diff --git a/proto/go/gofer_transport.pb.go b/proto/go/gofer_transport.pb.go index 35f5dd7c..ab319ff1 100644 --- a/proto/go/gofer_transport.pb.go +++ b/proto/go/gofer_transport.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.9 +// protoc v3.21.12 // source: gofer_transport.proto package _go @@ -118,7 +118,7 @@ func (x TriggerWatchResponse_Result) Number() protoreflect.EnumNumber { // Deprecated: Use TriggerWatchResponse_Result.Descriptor instead. func (TriggerWatchResponse_Result) EnumDescriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{97, 0} + return file_gofer_transport_proto_rawDescGZIP(), []int{107, 0} } type GetSystemInfoRequest struct { @@ -1576,6 +1576,8 @@ type GetPipelineRequest struct { NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier + // Pipeline version to retrieve. -1 Returns the currently active version. + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` } func (x *GetPipelineRequest) Reset() { @@ -1624,6 +1626,13 @@ func (x *GetPipelineRequest) GetId() string { return "" } +func (x *GetPipelineRequest) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + type GetPipelineResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1743,7 +1752,7 @@ type ListPipelinesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Pipelines []*Pipeline `protobuf:"bytes,1,rep,name=pipelines,proto3" json:"pipelines,omitempty"` + Pipelines []*PipelineMetadata `protobuf:"bytes,1,rep,name=pipelines,proto3" json:"pipelines,omitempty"` } func (x *ListPipelinesResponse) Reset() { @@ -1778,7 +1787,7 @@ func (*ListPipelinesResponse) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{33} } -func (x *ListPipelinesResponse) GetPipelines() []*Pipeline { +func (x *ListPipelinesResponse) GetPipelines() []*PipelineMetadata { if x != nil { return x.Pipelines } @@ -1971,17 +1980,18 @@ func (*EnablePipelineResponse) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{37} } -type CreatePipelineRequest struct { +type RegisterPipelineConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier - PipelineConfig *PipelineConfig `protobuf:"bytes,2,opt,name=pipeline_config,json=pipelineConfig,proto3" json:"pipeline_config,omitempty"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier + PipelineConfig *UserPipelineConfig `protobuf:"bytes,2,opt,name=pipeline_config,json=pipelineConfig,proto3" json:"pipeline_config,omitempty"` + Disable bool `protobuf:"varint,3,opt,name=disable,proto3" json:"disable,omitempty"` // Disable the pipeline upon registration } -func (x *CreatePipelineRequest) Reset() { - *x = CreatePipelineRequest{} +func (x *RegisterPipelineConfigRequest) Reset() { + *x = RegisterPipelineConfigRequest{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1989,13 +1999,13 @@ func (x *CreatePipelineRequest) Reset() { } } -func (x *CreatePipelineRequest) String() string { +func (x *RegisterPipelineConfigRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreatePipelineRequest) ProtoMessage() {} +func (*RegisterPipelineConfigRequest) ProtoMessage() {} -func (x *CreatePipelineRequest) ProtoReflect() protoreflect.Message { +func (x *RegisterPipelineConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2007,26 +2017,33 @@ func (x *CreatePipelineRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreatePipelineRequest.ProtoReflect.Descriptor instead. -func (*CreatePipelineRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use RegisterPipelineConfigRequest.ProtoReflect.Descriptor instead. +func (*RegisterPipelineConfigRequest) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{38} } -func (x *CreatePipelineRequest) GetNamespaceId() string { +func (x *RegisterPipelineConfigRequest) GetNamespaceId() string { if x != nil { return x.NamespaceId } return "" } -func (x *CreatePipelineRequest) GetPipelineConfig() *PipelineConfig { +func (x *RegisterPipelineConfigRequest) GetPipelineConfig() *UserPipelineConfig { if x != nil { return x.PipelineConfig } return nil } -type CreatePipelineResponse struct { +func (x *RegisterPipelineConfigRequest) GetDisable() bool { + if x != nil { + return x.Disable + } + return false +} + +type RegisterPipelineConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -2034,8 +2051,8 @@ type CreatePipelineResponse struct { Pipeline *Pipeline `protobuf:"bytes,1,opt,name=pipeline,proto3" json:"pipeline,omitempty"` } -func (x *CreatePipelineResponse) Reset() { - *x = CreatePipelineResponse{} +func (x *RegisterPipelineConfigResponse) Reset() { + *x = RegisterPipelineConfigResponse{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2043,13 +2060,13 @@ func (x *CreatePipelineResponse) Reset() { } } -func (x *CreatePipelineResponse) String() string { +func (x *RegisterPipelineConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreatePipelineResponse) ProtoMessage() {} +func (*RegisterPipelineConfigResponse) ProtoMessage() {} -func (x *CreatePipelineResponse) ProtoReflect() protoreflect.Message { +func (x *RegisterPipelineConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2061,29 +2078,31 @@ func (x *CreatePipelineResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreatePipelineResponse.ProtoReflect.Descriptor instead. -func (*CreatePipelineResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use RegisterPipelineConfigResponse.ProtoReflect.Descriptor instead. +func (*RegisterPipelineConfigResponse) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{39} } -func (x *CreatePipelineResponse) GetPipeline() *Pipeline { +func (x *RegisterPipelineConfigResponse) GetPipeline() *Pipeline { if x != nil { return x.Pipeline } return nil } -type UpdatePipelineRequest struct { +type DeployPipelineRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier - PipelineConfig *PipelineConfig `protobuf:"bytes,2,opt,name=pipeline_config,json=pipelineConfig,proto3" json:"pipeline_config,omitempty"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Force bool `protobuf:"varint,4,opt,name=force,proto3" json:"force,omitempty"` } -func (x *UpdatePipelineRequest) Reset() { - *x = UpdatePipelineRequest{} +func (x *DeployPipelineRequest) Reset() { + *x = DeployPipelineRequest{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2091,13 +2110,13 @@ func (x *UpdatePipelineRequest) Reset() { } } -func (x *UpdatePipelineRequest) String() string { +func (x *DeployPipelineRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdatePipelineRequest) ProtoMessage() {} +func (*DeployPipelineRequest) ProtoMessage() {} -func (x *UpdatePipelineRequest) ProtoReflect() protoreflect.Message { +func (x *DeployPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2109,35 +2128,49 @@ func (x *UpdatePipelineRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdatePipelineRequest.ProtoReflect.Descriptor instead. -func (*UpdatePipelineRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use DeployPipelineRequest.ProtoReflect.Descriptor instead. +func (*DeployPipelineRequest) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{40} } -func (x *UpdatePipelineRequest) GetNamespaceId() string { +func (x *DeployPipelineRequest) GetNamespaceId() string { if x != nil { return x.NamespaceId } return "" } -func (x *UpdatePipelineRequest) GetPipelineConfig() *PipelineConfig { +func (x *DeployPipelineRequest) GetId() string { if x != nil { - return x.PipelineConfig + return x.Id } - return nil + return "" +} + +func (x *DeployPipelineRequest) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *DeployPipelineRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false } -type UpdatePipelineResponse struct { +type DeployPipelineResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Pipeline *Pipeline `protobuf:"bytes,1,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + DeploymentId int64 `protobuf:"varint,1,opt,name=deployment_id,json=deploymentId,proto3" json:"deployment_id,omitempty"` } -func (x *UpdatePipelineResponse) Reset() { - *x = UpdatePipelineResponse{} +func (x *DeployPipelineResponse) Reset() { + *x = DeployPipelineResponse{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2145,13 +2178,13 @@ func (x *UpdatePipelineResponse) Reset() { } } -func (x *UpdatePipelineResponse) String() string { +func (x *DeployPipelineResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdatePipelineResponse) ProtoMessage() {} +func (*DeployPipelineResponse) ProtoMessage() {} -func (x *UpdatePipelineResponse) ProtoReflect() protoreflect.Message { +func (x *DeployPipelineResponse) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2163,16 +2196,16 @@ func (x *UpdatePipelineResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdatePipelineResponse.ProtoReflect.Descriptor instead. -func (*UpdatePipelineResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use DeployPipelineResponse.ProtoReflect.Descriptor instead. +func (*DeployPipelineResponse) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{41} } -func (x *UpdatePipelineResponse) GetPipeline() *Pipeline { +func (x *DeployPipelineResponse) GetDeploymentId() int64 { if x != nil { - return x.Pipeline + return x.DeploymentId } - return nil + return 0 } type DeletePipelineRequest struct { @@ -2268,18 +2301,19 @@ func (*DeletePipelineResponse) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{43} } -type GetRunRequest struct { +type GetPipelineConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier - PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` - Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` // Run ID + PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` // Unique pipeline identifier + // Pipeline version to retrieve. -1 Returns the currently active version. + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` } -func (x *GetRunRequest) Reset() { - *x = GetRunRequest{} +func (x *GetPipelineConfigRequest) Reset() { + *x = GetPipelineConfigRequest{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2287,13 +2321,13 @@ func (x *GetRunRequest) Reset() { } } -func (x *GetRunRequest) String() string { +func (x *GetPipelineConfigRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetRunRequest) ProtoMessage() {} +func (*GetPipelineConfigRequest) ProtoMessage() {} -func (x *GetRunRequest) ProtoReflect() protoreflect.Message { +func (x *GetPipelineConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2305,42 +2339,42 @@ func (x *GetRunRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetRunRequest.ProtoReflect.Descriptor instead. -func (*GetRunRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetPipelineConfigRequest.ProtoReflect.Descriptor instead. +func (*GetPipelineConfigRequest) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{44} } -func (x *GetRunRequest) GetNamespaceId() string { +func (x *GetPipelineConfigRequest) GetNamespaceId() string { if x != nil { return x.NamespaceId } return "" } -func (x *GetRunRequest) GetPipelineId() string { +func (x *GetPipelineConfigRequest) GetPipelineId() string { if x != nil { return x.PipelineId } return "" } -func (x *GetRunRequest) GetId() int64 { +func (x *GetPipelineConfigRequest) GetVersion() int64 { if x != nil { - return x.Id + return x.Version } return 0 } -type GetRunResponse struct { +type GetPipelineConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` + Config *PipelineConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` } -func (x *GetRunResponse) Reset() { - *x = GetRunResponse{} +func (x *GetPipelineConfigResponse) Reset() { + *x = GetPipelineConfigResponse{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2348,13 +2382,13 @@ func (x *GetRunResponse) Reset() { } } -func (x *GetRunResponse) String() string { +func (x *GetPipelineConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetRunResponse) ProtoMessage() {} +func (*GetPipelineConfigResponse) ProtoMessage() {} -func (x *GetRunResponse) ProtoReflect() protoreflect.Message { +func (x *GetPipelineConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2366,30 +2400,35 @@ func (x *GetRunResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetRunResponse.ProtoReflect.Descriptor instead. -func (*GetRunResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetPipelineConfigResponse.ProtoReflect.Descriptor instead. +func (*GetPipelineConfigResponse) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{45} } -func (x *GetRunResponse) GetRun() *Run { +func (x *GetPipelineConfigResponse) GetConfig() *PipelineConfig { if x != nil { - return x.Run + return x.Config } return nil } -type BatchGetRunsRequest struct { +type ListPipelineConfigsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier - PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` - Ids []int64 `protobuf:"varint,3,rep,packed,name=ids,proto3" json:"ids,omitempty"` // Run IDs + // offset is a pagination parameter that defines where to start when counting + // the list of objects to return. + Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` + // limit is a pagination parameter that defines how many objects to return + // per result. + Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + NamespaceId string `protobuf:"bytes,3,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier + PipelineId string `protobuf:"bytes,4,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` // Unique pipeline identifier } -func (x *BatchGetRunsRequest) Reset() { - *x = BatchGetRunsRequest{} +func (x *ListPipelineConfigsRequest) Reset() { + *x = ListPipelineConfigsRequest{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2397,13 +2436,13 @@ func (x *BatchGetRunsRequest) Reset() { } } -func (x *BatchGetRunsRequest) String() string { +func (x *ListPipelineConfigsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BatchGetRunsRequest) ProtoMessage() {} +func (*ListPipelineConfigsRequest) ProtoMessage() {} -func (x *BatchGetRunsRequest) ProtoReflect() protoreflect.Message { +func (x *ListPipelineConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2415,42 +2454,49 @@ func (x *BatchGetRunsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BatchGetRunsRequest.ProtoReflect.Descriptor instead. -func (*BatchGetRunsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListPipelineConfigsRequest.ProtoReflect.Descriptor instead. +func (*ListPipelineConfigsRequest) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{46} } -func (x *BatchGetRunsRequest) GetNamespaceId() string { +func (x *ListPipelineConfigsRequest) GetOffset() int64 { if x != nil { - return x.NamespaceId + return x.Offset } - return "" + return 0 } -func (x *BatchGetRunsRequest) GetPipelineId() string { +func (x *ListPipelineConfigsRequest) GetLimit() int64 { if x != nil { - return x.PipelineId + return x.Limit + } + return 0 +} + +func (x *ListPipelineConfigsRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId } return "" } -func (x *BatchGetRunsRequest) GetIds() []int64 { +func (x *ListPipelineConfigsRequest) GetPipelineId() string { if x != nil { - return x.Ids + return x.PipelineId } - return nil + return "" } -type BatchGetRunsResponse struct { +type ListPipelineConfigsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Runs []*Run `protobuf:"bytes,1,rep,name=runs,proto3" json:"runs,omitempty"` + Configs []*PipelineConfig `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` } -func (x *BatchGetRunsResponse) Reset() { - *x = BatchGetRunsResponse{} +func (x *ListPipelineConfigsResponse) Reset() { + *x = ListPipelineConfigsResponse{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2458,13 +2504,13 @@ func (x *BatchGetRunsResponse) Reset() { } } -func (x *BatchGetRunsResponse) String() string { +func (x *ListPipelineConfigsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BatchGetRunsResponse) ProtoMessage() {} +func (*ListPipelineConfigsResponse) ProtoMessage() {} -func (x *BatchGetRunsResponse) ProtoReflect() protoreflect.Message { +func (x *ListPipelineConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2476,35 +2522,31 @@ func (x *BatchGetRunsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BatchGetRunsResponse.ProtoReflect.Descriptor instead. -func (*BatchGetRunsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListPipelineConfigsResponse.ProtoReflect.Descriptor instead. +func (*ListPipelineConfigsResponse) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{47} } -func (x *BatchGetRunsResponse) GetRuns() []*Run { +func (x *ListPipelineConfigsResponse) GetConfigs() []*PipelineConfig { if x != nil { - return x.Runs + return x.Configs } return nil } -type ListRunsRequest struct { +type DeletePipelineConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // offset is a pagination parameter that defines where to start when - // counting the list of pipelines to return - Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` - // limit is a pagination parameter that defines how many pipelines to return - // per result. - Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - NamespaceId string `protobuf:"bytes,3,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier - PipelineId string `protobuf:"bytes,4,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier + PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` // Unique pipeline identifier + // Pipeline version to retrieve. -1 Returns the currently active version. + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` } -func (x *ListRunsRequest) Reset() { - *x = ListRunsRequest{} +func (x *DeletePipelineConfigRequest) Reset() { + *x = DeletePipelineConfigRequest{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2512,13 +2554,13 @@ func (x *ListRunsRequest) Reset() { } } -func (x *ListRunsRequest) String() string { +func (x *DeletePipelineConfigRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListRunsRequest) ProtoMessage() {} +func (*DeletePipelineConfigRequest) ProtoMessage() {} -func (x *ListRunsRequest) ProtoReflect() protoreflect.Message { +func (x *DeletePipelineConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2530,49 +2572,40 @@ func (x *ListRunsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListRunsRequest.ProtoReflect.Descriptor instead. -func (*ListRunsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use DeletePipelineConfigRequest.ProtoReflect.Descriptor instead. +func (*DeletePipelineConfigRequest) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{48} } -func (x *ListRunsRequest) GetOffset() int64 { - if x != nil { - return x.Offset - } - return 0 -} - -func (x *ListRunsRequest) GetLimit() int64 { +func (x *DeletePipelineConfigRequest) GetNamespaceId() string { if x != nil { - return x.Limit + return x.NamespaceId } - return 0 + return "" } -func (x *ListRunsRequest) GetNamespaceId() string { +func (x *DeletePipelineConfigRequest) GetPipelineId() string { if x != nil { - return x.NamespaceId + return x.PipelineId } return "" } -func (x *ListRunsRequest) GetPipelineId() string { +func (x *DeletePipelineConfigRequest) GetVersion() int64 { if x != nil { - return x.PipelineId + return x.Version } - return "" + return 0 } -type ListRunsResponse struct { +type DeletePipelineConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Runs []*Run `protobuf:"bytes,1,rep,name=runs,proto3" json:"runs,omitempty"` } -func (x *ListRunsResponse) Reset() { - *x = ListRunsResponse{} +func (x *DeletePipelineConfigResponse) Reset() { + *x = DeletePipelineConfigResponse{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2580,13 +2613,13 @@ func (x *ListRunsResponse) Reset() { } } -func (x *ListRunsResponse) String() string { +func (x *DeletePipelineConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListRunsResponse) ProtoMessage() {} +func (*DeletePipelineConfigResponse) ProtoMessage() {} -func (x *ListRunsResponse) ProtoReflect() protoreflect.Message { +func (x *DeletePipelineConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2598,32 +2631,29 @@ func (x *ListRunsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListRunsResponse.ProtoReflect.Descriptor instead. -func (*ListRunsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use DeletePipelineConfigResponse.ProtoReflect.Descriptor instead. +func (*DeletePipelineConfigResponse) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{49} } -func (x *ListRunsResponse) GetRuns() []*Run { - if x != nil { - return x.Runs - } - return nil -} - -type StartRunRequest struct { +// //////////// Deployment Transport Models ////////////// +type ListDeploymentsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier - PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` - // variables allows for the replacement of task environment variables, it - // overrides all other environment variables if there is a name collision. - Variables map[string]string `protobuf:"bytes,3,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // offset is a pagination parameter that defines where to start when counting + // the list of Deployments to return. + Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` + // limit is a pagination parameter that defines how many Deployments to return + // per result. + Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + NamespaceId string `protobuf:"bytes,3,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier + PipelineId string `protobuf:"bytes,4,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` } -func (x *StartRunRequest) Reset() { - *x = StartRunRequest{} +func (x *ListDeploymentsRequest) Reset() { + *x = ListDeploymentsRequest{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2631,13 +2661,13 @@ func (x *StartRunRequest) Reset() { } } -func (x *StartRunRequest) String() string { +func (x *ListDeploymentsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StartRunRequest) ProtoMessage() {} +func (*ListDeploymentsRequest) ProtoMessage() {} -func (x *StartRunRequest) ProtoReflect() protoreflect.Message { +func (x *ListDeploymentsRequest) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2649,42 +2679,49 @@ func (x *StartRunRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StartRunRequest.ProtoReflect.Descriptor instead. -func (*StartRunRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListDeploymentsRequest.ProtoReflect.Descriptor instead. +func (*ListDeploymentsRequest) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{50} } -func (x *StartRunRequest) GetNamespaceId() string { +func (x *ListDeploymentsRequest) GetOffset() int64 { if x != nil { - return x.NamespaceId + return x.Offset } - return "" + return 0 } -func (x *StartRunRequest) GetPipelineId() string { +func (x *ListDeploymentsRequest) GetLimit() int64 { if x != nil { - return x.PipelineId + return x.Limit + } + return 0 +} + +func (x *ListDeploymentsRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId } return "" } -func (x *StartRunRequest) GetVariables() map[string]string { +func (x *ListDeploymentsRequest) GetPipelineId() string { if x != nil { - return x.Variables + return x.PipelineId } - return nil + return "" } -type StartRunResponse struct { +type ListDeploymentsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` + Deployments []*Deployment `protobuf:"bytes,1,rep,name=Deployments,proto3" json:"Deployments,omitempty"` } -func (x *StartRunResponse) Reset() { - *x = StartRunResponse{} +func (x *ListDeploymentsResponse) Reset() { + *x = ListDeploymentsResponse{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2692,13 +2729,13 @@ func (x *StartRunResponse) Reset() { } } -func (x *StartRunResponse) String() string { +func (x *ListDeploymentsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StartRunResponse) ProtoMessage() {} +func (*ListDeploymentsResponse) ProtoMessage() {} -func (x *StartRunResponse) ProtoReflect() protoreflect.Message { +func (x *ListDeploymentsResponse) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2710,30 +2747,30 @@ func (x *StartRunResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StartRunResponse.ProtoReflect.Descriptor instead. -func (*StartRunResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListDeploymentsResponse.ProtoReflect.Descriptor instead. +func (*ListDeploymentsResponse) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{51} } -func (x *StartRunResponse) GetRun() *Run { +func (x *ListDeploymentsResponse) GetDeployments() []*Deployment { if x != nil { - return x.Run + return x.Deployments } return nil } -type RetryRunRequest struct { +type GetDeploymentRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` - RunId int64 `protobuf:"varint,3,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` // Run ID + Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` // Unique deployment identifier. } -func (x *RetryRunRequest) Reset() { - *x = RetryRunRequest{} +func (x *GetDeploymentRequest) Reset() { + *x = GetDeploymentRequest{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2741,13 +2778,13 @@ func (x *RetryRunRequest) Reset() { } } -func (x *RetryRunRequest) String() string { +func (x *GetDeploymentRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RetryRunRequest) ProtoMessage() {} +func (*GetDeploymentRequest) ProtoMessage() {} -func (x *RetryRunRequest) ProtoReflect() protoreflect.Message { +func (x *GetDeploymentRequest) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2759,42 +2796,42 @@ func (x *RetryRunRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RetryRunRequest.ProtoReflect.Descriptor instead. -func (*RetryRunRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetDeploymentRequest.ProtoReflect.Descriptor instead. +func (*GetDeploymentRequest) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{52} } -func (x *RetryRunRequest) GetNamespaceId() string { +func (x *GetDeploymentRequest) GetNamespaceId() string { if x != nil { return x.NamespaceId } return "" } -func (x *RetryRunRequest) GetPipelineId() string { +func (x *GetDeploymentRequest) GetPipelineId() string { if x != nil { return x.PipelineId } return "" } -func (x *RetryRunRequest) GetRunId() int64 { +func (x *GetDeploymentRequest) GetId() int64 { if x != nil { - return x.RunId + return x.Id } return 0 } -type RetryRunResponse struct { +type GetDeploymentResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` + Deployment *Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment,omitempty"` } -func (x *RetryRunResponse) Reset() { - *x = RetryRunResponse{} +func (x *GetDeploymentResponse) Reset() { + *x = GetDeploymentResponse{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2802,13 +2839,13 @@ func (x *RetryRunResponse) Reset() { } } -func (x *RetryRunResponse) String() string { +func (x *GetDeploymentResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RetryRunResponse) ProtoMessage() {} +func (*GetDeploymentResponse) ProtoMessage() {} -func (x *RetryRunResponse) ProtoReflect() protoreflect.Message { +func (x *GetDeploymentResponse) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2820,33 +2857,30 @@ func (x *RetryRunResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RetryRunResponse.ProtoReflect.Descriptor instead. -func (*RetryRunResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetDeploymentResponse.ProtoReflect.Descriptor instead. +func (*GetDeploymentResponse) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{53} } -func (x *RetryRunResponse) GetRun() *Run { +func (x *GetDeploymentResponse) GetDeployment() *Deployment { if x != nil { - return x.Run + return x.Deployment } return nil } -type CancelRunRequest struct { +type GetRunRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` - RunId int64 `protobuf:"varint,3,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` // Run ID - // force will cause Gofer to hard kill any outstanding task run containers. - // Usually this means that the container receives a SIGKILL. - Force bool `protobuf:"varint,4,opt,name=force,proto3" json:"force,omitempty"` + Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` // Run ID } -func (x *CancelRunRequest) Reset() { - *x = CancelRunRequest{} +func (x *GetRunRequest) Reset() { + *x = GetRunRequest{} if protoimpl.UnsafeEnabled { mi := &file_gofer_transport_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2854,13 +2888,13 @@ func (x *CancelRunRequest) Reset() { } } -func (x *CancelRunRequest) String() string { +func (x *GetRunRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CancelRunRequest) ProtoMessage() {} +func (*GetRunRequest) ProtoMessage() {} -func (x *CancelRunRequest) ProtoReflect() protoreflect.Message { +func (x *GetRunRequest) ProtoReflect() protoreflect.Message { mi := &file_gofer_transport_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2872,19 +2906,586 @@ func (x *CancelRunRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CancelRunRequest.ProtoReflect.Descriptor instead. -func (*CancelRunRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetRunRequest.ProtoReflect.Descriptor instead. +func (*GetRunRequest) Descriptor() ([]byte, []int) { return file_gofer_transport_proto_rawDescGZIP(), []int{54} } -func (x *CancelRunRequest) GetNamespaceId() string { +func (x *GetRunRequest) GetNamespaceId() string { if x != nil { return x.NamespaceId } return "" } -func (x *CancelRunRequest) GetPipelineId() string { +func (x *GetRunRequest) GetPipelineId() string { + if x != nil { + return x.PipelineId + } + return "" +} + +func (x *GetRunRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +type GetRunResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` +} + +func (x *GetRunResponse) Reset() { + *x = GetRunResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_transport_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRunResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRunResponse) ProtoMessage() {} + +func (x *GetRunResponse) ProtoReflect() protoreflect.Message { + mi := &file_gofer_transport_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRunResponse.ProtoReflect.Descriptor instead. +func (*GetRunResponse) Descriptor() ([]byte, []int) { + return file_gofer_transport_proto_rawDescGZIP(), []int{55} +} + +func (x *GetRunResponse) GetRun() *Run { + if x != nil { + return x.Run + } + return nil +} + +type BatchGetRunsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier + PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + Ids []int64 `protobuf:"varint,3,rep,packed,name=ids,proto3" json:"ids,omitempty"` // Run IDs +} + +func (x *BatchGetRunsRequest) Reset() { + *x = BatchGetRunsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_transport_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchGetRunsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchGetRunsRequest) ProtoMessage() {} + +func (x *BatchGetRunsRequest) ProtoReflect() protoreflect.Message { + mi := &file_gofer_transport_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchGetRunsRequest.ProtoReflect.Descriptor instead. +func (*BatchGetRunsRequest) Descriptor() ([]byte, []int) { + return file_gofer_transport_proto_rawDescGZIP(), []int{56} +} + +func (x *BatchGetRunsRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *BatchGetRunsRequest) GetPipelineId() string { + if x != nil { + return x.PipelineId + } + return "" +} + +func (x *BatchGetRunsRequest) GetIds() []int64 { + if x != nil { + return x.Ids + } + return nil +} + +type BatchGetRunsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Runs []*Run `protobuf:"bytes,1,rep,name=runs,proto3" json:"runs,omitempty"` +} + +func (x *BatchGetRunsResponse) Reset() { + *x = BatchGetRunsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_transport_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchGetRunsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchGetRunsResponse) ProtoMessage() {} + +func (x *BatchGetRunsResponse) ProtoReflect() protoreflect.Message { + mi := &file_gofer_transport_proto_msgTypes[57] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchGetRunsResponse.ProtoReflect.Descriptor instead. +func (*BatchGetRunsResponse) Descriptor() ([]byte, []int) { + return file_gofer_transport_proto_rawDescGZIP(), []int{57} +} + +func (x *BatchGetRunsResponse) GetRuns() []*Run { + if x != nil { + return x.Runs + } + return nil +} + +type ListRunsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // offset is a pagination parameter that defines where to start when + // counting the list of pipelines to return + Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` + // limit is a pagination parameter that defines how many pipelines to return + // per result. + Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + NamespaceId string `protobuf:"bytes,3,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier + PipelineId string `protobuf:"bytes,4,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` +} + +func (x *ListRunsRequest) Reset() { + *x = ListRunsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_transport_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRunsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRunsRequest) ProtoMessage() {} + +func (x *ListRunsRequest) ProtoReflect() protoreflect.Message { + mi := &file_gofer_transport_proto_msgTypes[58] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRunsRequest.ProtoReflect.Descriptor instead. +func (*ListRunsRequest) Descriptor() ([]byte, []int) { + return file_gofer_transport_proto_rawDescGZIP(), []int{58} +} + +func (x *ListRunsRequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ListRunsRequest) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *ListRunsRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *ListRunsRequest) GetPipelineId() string { + if x != nil { + return x.PipelineId + } + return "" +} + +type ListRunsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Runs []*Run `protobuf:"bytes,1,rep,name=runs,proto3" json:"runs,omitempty"` +} + +func (x *ListRunsResponse) Reset() { + *x = ListRunsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_transport_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRunsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRunsResponse) ProtoMessage() {} + +func (x *ListRunsResponse) ProtoReflect() protoreflect.Message { + mi := &file_gofer_transport_proto_msgTypes[59] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRunsResponse.ProtoReflect.Descriptor instead. +func (*ListRunsResponse) Descriptor() ([]byte, []int) { + return file_gofer_transport_proto_rawDescGZIP(), []int{59} +} + +func (x *ListRunsResponse) GetRuns() []*Run { + if x != nil { + return x.Runs + } + return nil +} + +type StartRunRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier + PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + // variables allows for the replacement of task environment variables, it + // overrides all other environment variables if there is a name collision. + Variables map[string]string `protobuf:"bytes,3,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *StartRunRequest) Reset() { + *x = StartRunRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_transport_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartRunRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartRunRequest) ProtoMessage() {} + +func (x *StartRunRequest) ProtoReflect() protoreflect.Message { + mi := &file_gofer_transport_proto_msgTypes[60] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartRunRequest.ProtoReflect.Descriptor instead. +func (*StartRunRequest) Descriptor() ([]byte, []int) { + return file_gofer_transport_proto_rawDescGZIP(), []int{60} +} + +func (x *StartRunRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *StartRunRequest) GetPipelineId() string { + if x != nil { + return x.PipelineId + } + return "" +} + +func (x *StartRunRequest) GetVariables() map[string]string { + if x != nil { + return x.Variables + } + return nil +} + +type StartRunResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` +} + +func (x *StartRunResponse) Reset() { + *x = StartRunResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_transport_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartRunResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartRunResponse) ProtoMessage() {} + +func (x *StartRunResponse) ProtoReflect() protoreflect.Message { + mi := &file_gofer_transport_proto_msgTypes[61] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartRunResponse.ProtoReflect.Descriptor instead. +func (*StartRunResponse) Descriptor() ([]byte, []int) { + return file_gofer_transport_proto_rawDescGZIP(), []int{61} +} + +func (x *StartRunResponse) GetRun() *Run { + if x != nil { + return x.Run + } + return nil +} + +type RetryRunRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier + PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + RunId int64 `protobuf:"varint,3,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` // Run ID +} + +func (x *RetryRunRequest) Reset() { + *x = RetryRunRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_transport_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RetryRunRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetryRunRequest) ProtoMessage() {} + +func (x *RetryRunRequest) ProtoReflect() protoreflect.Message { + mi := &file_gofer_transport_proto_msgTypes[62] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetryRunRequest.ProtoReflect.Descriptor instead. +func (*RetryRunRequest) Descriptor() ([]byte, []int) { + return file_gofer_transport_proto_rawDescGZIP(), []int{62} +} + +func (x *RetryRunRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *RetryRunRequest) GetPipelineId() string { + if x != nil { + return x.PipelineId + } + return "" +} + +func (x *RetryRunRequest) GetRunId() int64 { + if x != nil { + return x.RunId + } + return 0 +} + +type RetryRunResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` +} + +func (x *RetryRunResponse) Reset() { + *x = RetryRunResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_transport_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RetryRunResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetryRunResponse) ProtoMessage() {} + +func (x *RetryRunResponse) ProtoReflect() protoreflect.Message { + mi := &file_gofer_transport_proto_msgTypes[63] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetryRunResponse.ProtoReflect.Descriptor instead. +func (*RetryRunResponse) Descriptor() ([]byte, []int) { + return file_gofer_transport_proto_rawDescGZIP(), []int{63} +} + +func (x *RetryRunResponse) GetRun() *Run { + if x != nil { + return x.Run + } + return nil +} + +type CancelRunRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Unique namespace identifier + PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + RunId int64 `protobuf:"varint,3,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` // Run ID + // force will cause Gofer to hard kill any outstanding task run containers. + // Usually this means that the container receives a SIGKILL. + Force bool `protobuf:"varint,4,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *CancelRunRequest) Reset() { + *x = CancelRunRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gofer_transport_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelRunRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelRunRequest) ProtoMessage() {} + +func (x *CancelRunRequest) ProtoReflect() protoreflect.Message { + mi := &file_gofer_transport_proto_msgTypes[64] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelRunRequest.ProtoReflect.Descriptor instead. +func (*CancelRunRequest) Descriptor() ([]byte, []int) { + return file_gofer_transport_proto_rawDescGZIP(), []int{64} +} + +func (x *CancelRunRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *CancelRunRequest) GetPipelineId() string { if x != nil { return x.PipelineId } @@ -2914,7 +3515,7 @@ type CancelRunResponse struct { func (x *CancelRunResponse) Reset() { *x = CancelRunResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[55] + mi := &file_gofer_transport_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2927,7 +3528,7 @@ func (x *CancelRunResponse) String() string { func (*CancelRunResponse) ProtoMessage() {} func (x *CancelRunResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[55] + mi := &file_gofer_transport_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2940,7 +3541,7 @@ func (x *CancelRunResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelRunResponse.ProtoReflect.Descriptor instead. func (*CancelRunResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{55} + return file_gofer_transport_proto_rawDescGZIP(), []int{65} } type CancelAllRunsRequest struct { @@ -2958,7 +3559,7 @@ type CancelAllRunsRequest struct { func (x *CancelAllRunsRequest) Reset() { *x = CancelAllRunsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[56] + mi := &file_gofer_transport_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2971,7 +3572,7 @@ func (x *CancelAllRunsRequest) String() string { func (*CancelAllRunsRequest) ProtoMessage() {} func (x *CancelAllRunsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[56] + mi := &file_gofer_transport_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2984,7 +3585,7 @@ func (x *CancelAllRunsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelAllRunsRequest.ProtoReflect.Descriptor instead. func (*CancelAllRunsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{56} + return file_gofer_transport_proto_rawDescGZIP(), []int{66} } func (x *CancelAllRunsRequest) GetNamespaceId() string { @@ -3019,7 +3620,7 @@ type CancelAllRunsResponse struct { func (x *CancelAllRunsResponse) Reset() { *x = CancelAllRunsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[57] + mi := &file_gofer_transport_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3032,7 +3633,7 @@ func (x *CancelAllRunsResponse) String() string { func (*CancelAllRunsResponse) ProtoMessage() {} func (x *CancelAllRunsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[57] + mi := &file_gofer_transport_proto_msgTypes[67] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3045,7 +3646,7 @@ func (x *CancelAllRunsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelAllRunsResponse.ProtoReflect.Descriptor instead. func (*CancelAllRunsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{57} + return file_gofer_transport_proto_rawDescGZIP(), []int{67} } func (x *CancelAllRunsResponse) GetRuns() []int64 { @@ -3068,7 +3669,7 @@ type ListTaskRunsRequest struct { func (x *ListTaskRunsRequest) Reset() { *x = ListTaskRunsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[58] + mi := &file_gofer_transport_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3081,7 +3682,7 @@ func (x *ListTaskRunsRequest) String() string { func (*ListTaskRunsRequest) ProtoMessage() {} func (x *ListTaskRunsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[58] + mi := &file_gofer_transport_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3094,7 +3695,7 @@ func (x *ListTaskRunsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListTaskRunsRequest.ProtoReflect.Descriptor instead. func (*ListTaskRunsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{58} + return file_gofer_transport_proto_rawDescGZIP(), []int{68} } func (x *ListTaskRunsRequest) GetNamespaceId() string { @@ -3129,7 +3730,7 @@ type ListTaskRunsResponse struct { func (x *ListTaskRunsResponse) Reset() { *x = ListTaskRunsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[59] + mi := &file_gofer_transport_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3142,7 +3743,7 @@ func (x *ListTaskRunsResponse) String() string { func (*ListTaskRunsResponse) ProtoMessage() {} func (x *ListTaskRunsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[59] + mi := &file_gofer_transport_proto_msgTypes[69] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3155,7 +3756,7 @@ func (x *ListTaskRunsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListTaskRunsResponse.ProtoReflect.Descriptor instead. func (*ListTaskRunsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{59} + return file_gofer_transport_proto_rawDescGZIP(), []int{69} } func (x *ListTaskRunsResponse) GetTaskRuns() []*TaskRun { @@ -3179,7 +3780,7 @@ type GetTaskRunRequest struct { func (x *GetTaskRunRequest) Reset() { *x = GetTaskRunRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[60] + mi := &file_gofer_transport_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3192,7 +3793,7 @@ func (x *GetTaskRunRequest) String() string { func (*GetTaskRunRequest) ProtoMessage() {} func (x *GetTaskRunRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[60] + mi := &file_gofer_transport_proto_msgTypes[70] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3205,7 +3806,7 @@ func (x *GetTaskRunRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTaskRunRequest.ProtoReflect.Descriptor instead. func (*GetTaskRunRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{60} + return file_gofer_transport_proto_rawDescGZIP(), []int{70} } func (x *GetTaskRunRequest) GetNamespaceId() string { @@ -3247,7 +3848,7 @@ type GetTaskRunResponse struct { func (x *GetTaskRunResponse) Reset() { *x = GetTaskRunResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[61] + mi := &file_gofer_transport_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3260,7 +3861,7 @@ func (x *GetTaskRunResponse) String() string { func (*GetTaskRunResponse) ProtoMessage() {} func (x *GetTaskRunResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[61] + mi := &file_gofer_transport_proto_msgTypes[71] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3273,7 +3874,7 @@ func (x *GetTaskRunResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTaskRunResponse.ProtoReflect.Descriptor instead. func (*GetTaskRunResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{61} + return file_gofer_transport_proto_rawDescGZIP(), []int{71} } func (x *GetTaskRunResponse) GetTaskRun() *TaskRun { @@ -3300,7 +3901,7 @@ type CancelTaskRunRequest struct { func (x *CancelTaskRunRequest) Reset() { *x = CancelTaskRunRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[62] + mi := &file_gofer_transport_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3313,7 +3914,7 @@ func (x *CancelTaskRunRequest) String() string { func (*CancelTaskRunRequest) ProtoMessage() {} func (x *CancelTaskRunRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[62] + mi := &file_gofer_transport_proto_msgTypes[72] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3326,7 +3927,7 @@ func (x *CancelTaskRunRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelTaskRunRequest.ProtoReflect.Descriptor instead. func (*CancelTaskRunRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{62} + return file_gofer_transport_proto_rawDescGZIP(), []int{72} } func (x *CancelTaskRunRequest) GetNamespaceId() string { @@ -3373,7 +3974,7 @@ type CancelTaskRunResponse struct { func (x *CancelTaskRunResponse) Reset() { *x = CancelTaskRunResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[63] + mi := &file_gofer_transport_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3386,7 +3987,7 @@ func (x *CancelTaskRunResponse) String() string { func (*CancelTaskRunResponse) ProtoMessage() {} func (x *CancelTaskRunResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[63] + mi := &file_gofer_transport_proto_msgTypes[73] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3399,7 +4000,7 @@ func (x *CancelTaskRunResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CancelTaskRunResponse.ProtoReflect.Descriptor instead. func (*CancelTaskRunResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{63} + return file_gofer_transport_proto_rawDescGZIP(), []int{73} } type GetTaskRunLogsRequest struct { @@ -3416,7 +4017,7 @@ type GetTaskRunLogsRequest struct { func (x *GetTaskRunLogsRequest) Reset() { *x = GetTaskRunLogsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[64] + mi := &file_gofer_transport_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3429,7 +4030,7 @@ func (x *GetTaskRunLogsRequest) String() string { func (*GetTaskRunLogsRequest) ProtoMessage() {} func (x *GetTaskRunLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[64] + mi := &file_gofer_transport_proto_msgTypes[74] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3442,7 +4043,7 @@ func (x *GetTaskRunLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTaskRunLogsRequest.ProtoReflect.Descriptor instead. func (*GetTaskRunLogsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{64} + return file_gofer_transport_proto_rawDescGZIP(), []int{74} } func (x *GetTaskRunLogsRequest) GetNamespaceId() string { @@ -3485,7 +4086,7 @@ type GetTaskRunLogsResponse struct { func (x *GetTaskRunLogsResponse) Reset() { *x = GetTaskRunLogsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[65] + mi := &file_gofer_transport_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3498,7 +4099,7 @@ func (x *GetTaskRunLogsResponse) String() string { func (*GetTaskRunLogsResponse) ProtoMessage() {} func (x *GetTaskRunLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[65] + mi := &file_gofer_transport_proto_msgTypes[75] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3511,7 +4112,7 @@ func (x *GetTaskRunLogsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTaskRunLogsResponse.ProtoReflect.Descriptor instead. func (*GetTaskRunLogsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{65} + return file_gofer_transport_proto_rawDescGZIP(), []int{75} } func (x *GetTaskRunLogsResponse) GetLogLine() string { @@ -3542,7 +4143,7 @@ type DeleteTaskRunLogsRequest struct { func (x *DeleteTaskRunLogsRequest) Reset() { *x = DeleteTaskRunLogsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[66] + mi := &file_gofer_transport_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3555,7 +4156,7 @@ func (x *DeleteTaskRunLogsRequest) String() string { func (*DeleteTaskRunLogsRequest) ProtoMessage() {} func (x *DeleteTaskRunLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[66] + mi := &file_gofer_transport_proto_msgTypes[76] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3568,7 +4169,7 @@ func (x *DeleteTaskRunLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteTaskRunLogsRequest.ProtoReflect.Descriptor instead. func (*DeleteTaskRunLogsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{66} + return file_gofer_transport_proto_rawDescGZIP(), []int{76} } func (x *DeleteTaskRunLogsRequest) GetNamespaceId() string { @@ -3608,7 +4209,7 @@ type DeleteTaskRunLogsResponse struct { func (x *DeleteTaskRunLogsResponse) Reset() { *x = DeleteTaskRunLogsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[67] + mi := &file_gofer_transport_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3621,7 +4222,7 @@ func (x *DeleteTaskRunLogsResponse) String() string { func (*DeleteTaskRunLogsResponse) ProtoMessage() {} func (x *DeleteTaskRunLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[67] + mi := &file_gofer_transport_proto_msgTypes[77] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3634,7 +4235,7 @@ func (x *DeleteTaskRunLogsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteTaskRunLogsResponse.ProtoReflect.Descriptor instead. func (*DeleteTaskRunLogsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{67} + return file_gofer_transport_proto_rawDescGZIP(), []int{77} } type GetTriggerRequest struct { @@ -3648,7 +4249,7 @@ type GetTriggerRequest struct { func (x *GetTriggerRequest) Reset() { *x = GetTriggerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[68] + mi := &file_gofer_transport_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3661,7 +4262,7 @@ func (x *GetTriggerRequest) String() string { func (*GetTriggerRequest) ProtoMessage() {} func (x *GetTriggerRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[68] + mi := &file_gofer_transport_proto_msgTypes[78] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3674,7 +4275,7 @@ func (x *GetTriggerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTriggerRequest.ProtoReflect.Descriptor instead. func (*GetTriggerRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{68} + return file_gofer_transport_proto_rawDescGZIP(), []int{78} } func (x *GetTriggerRequest) GetName() string { @@ -3695,7 +4296,7 @@ type GetTriggerResponse struct { func (x *GetTriggerResponse) Reset() { *x = GetTriggerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[69] + mi := &file_gofer_transport_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3708,7 +4309,7 @@ func (x *GetTriggerResponse) String() string { func (*GetTriggerResponse) ProtoMessage() {} func (x *GetTriggerResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[69] + mi := &file_gofer_transport_proto_msgTypes[79] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3721,7 +4322,7 @@ func (x *GetTriggerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTriggerResponse.ProtoReflect.Descriptor instead. func (*GetTriggerResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{69} + return file_gofer_transport_proto_rawDescGZIP(), []int{79} } func (x *GetTriggerResponse) GetTrigger() *Trigger { @@ -3740,7 +4341,7 @@ type ListTriggersRequest struct { func (x *ListTriggersRequest) Reset() { *x = ListTriggersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[70] + mi := &file_gofer_transport_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3753,7 +4354,7 @@ func (x *ListTriggersRequest) String() string { func (*ListTriggersRequest) ProtoMessage() {} func (x *ListTriggersRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[70] + mi := &file_gofer_transport_proto_msgTypes[80] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3766,7 +4367,7 @@ func (x *ListTriggersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListTriggersRequest.ProtoReflect.Descriptor instead. func (*ListTriggersRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{70} + return file_gofer_transport_proto_rawDescGZIP(), []int{80} } type ListTriggersResponse struct { @@ -3780,7 +4381,7 @@ type ListTriggersResponse struct { func (x *ListTriggersResponse) Reset() { *x = ListTriggersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[71] + mi := &file_gofer_transport_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3793,7 +4394,7 @@ func (x *ListTriggersResponse) String() string { func (*ListTriggersResponse) ProtoMessage() {} func (x *ListTriggersResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[71] + mi := &file_gofer_transport_proto_msgTypes[81] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3806,7 +4407,7 @@ func (x *ListTriggersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListTriggersResponse.ProtoReflect.Descriptor instead. func (*ListTriggersResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{71} + return file_gofer_transport_proto_rawDescGZIP(), []int{81} } func (x *ListTriggersResponse) GetTriggers() []*Trigger { @@ -3831,7 +4432,7 @@ type InstallTriggerRequest struct { func (x *InstallTriggerRequest) Reset() { *x = InstallTriggerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[72] + mi := &file_gofer_transport_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3844,7 +4445,7 @@ func (x *InstallTriggerRequest) String() string { func (*InstallTriggerRequest) ProtoMessage() {} func (x *InstallTriggerRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[72] + mi := &file_gofer_transport_proto_msgTypes[82] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3857,7 +4458,7 @@ func (x *InstallTriggerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InstallTriggerRequest.ProtoReflect.Descriptor instead. func (*InstallTriggerRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{72} + return file_gofer_transport_proto_rawDescGZIP(), []int{82} } func (x *InstallTriggerRequest) GetName() string { @@ -3904,7 +4505,7 @@ type InstallTriggerResponse struct { func (x *InstallTriggerResponse) Reset() { *x = InstallTriggerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[73] + mi := &file_gofer_transport_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3917,7 +4518,7 @@ func (x *InstallTriggerResponse) String() string { func (*InstallTriggerResponse) ProtoMessage() {} func (x *InstallTriggerResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[73] + mi := &file_gofer_transport_proto_msgTypes[83] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3930,7 +4531,7 @@ func (x *InstallTriggerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InstallTriggerResponse.ProtoReflect.Descriptor instead. func (*InstallTriggerResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{73} + return file_gofer_transport_proto_rawDescGZIP(), []int{83} } type UninstallTriggerRequest struct { @@ -3944,7 +4545,7 @@ type UninstallTriggerRequest struct { func (x *UninstallTriggerRequest) Reset() { *x = UninstallTriggerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[74] + mi := &file_gofer_transport_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3957,7 +4558,7 @@ func (x *UninstallTriggerRequest) String() string { func (*UninstallTriggerRequest) ProtoMessage() {} func (x *UninstallTriggerRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[74] + mi := &file_gofer_transport_proto_msgTypes[84] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3970,7 +4571,7 @@ func (x *UninstallTriggerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UninstallTriggerRequest.ProtoReflect.Descriptor instead. func (*UninstallTriggerRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{74} + return file_gofer_transport_proto_rawDescGZIP(), []int{84} } func (x *UninstallTriggerRequest) GetName() string { @@ -3989,7 +4590,7 @@ type UninstallTriggerResponse struct { func (x *UninstallTriggerResponse) Reset() { *x = UninstallTriggerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[75] + mi := &file_gofer_transport_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4002,7 +4603,7 @@ func (x *UninstallTriggerResponse) String() string { func (*UninstallTriggerResponse) ProtoMessage() {} func (x *UninstallTriggerResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[75] + mi := &file_gofer_transport_proto_msgTypes[85] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4015,7 +4616,7 @@ func (x *UninstallTriggerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UninstallTriggerResponse.ProtoReflect.Descriptor instead. func (*UninstallTriggerResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{75} + return file_gofer_transport_proto_rawDescGZIP(), []int{85} } type EnableTriggerRequest struct { @@ -4029,7 +4630,7 @@ type EnableTriggerRequest struct { func (x *EnableTriggerRequest) Reset() { *x = EnableTriggerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[76] + mi := &file_gofer_transport_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4042,7 +4643,7 @@ func (x *EnableTriggerRequest) String() string { func (*EnableTriggerRequest) ProtoMessage() {} func (x *EnableTriggerRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[76] + mi := &file_gofer_transport_proto_msgTypes[86] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4055,7 +4656,7 @@ func (x *EnableTriggerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EnableTriggerRequest.ProtoReflect.Descriptor instead. func (*EnableTriggerRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{76} + return file_gofer_transport_proto_rawDescGZIP(), []int{86} } func (x *EnableTriggerRequest) GetName() string { @@ -4074,7 +4675,7 @@ type EnableTriggerResponse struct { func (x *EnableTriggerResponse) Reset() { *x = EnableTriggerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[77] + mi := &file_gofer_transport_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4087,7 +4688,7 @@ func (x *EnableTriggerResponse) String() string { func (*EnableTriggerResponse) ProtoMessage() {} func (x *EnableTriggerResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[77] + mi := &file_gofer_transport_proto_msgTypes[87] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4100,7 +4701,7 @@ func (x *EnableTriggerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EnableTriggerResponse.ProtoReflect.Descriptor instead. func (*EnableTriggerResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{77} + return file_gofer_transport_proto_rawDescGZIP(), []int{87} } type DisableTriggerRequest struct { @@ -4114,7 +4715,7 @@ type DisableTriggerRequest struct { func (x *DisableTriggerRequest) Reset() { *x = DisableTriggerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[78] + mi := &file_gofer_transport_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4127,7 +4728,7 @@ func (x *DisableTriggerRequest) String() string { func (*DisableTriggerRequest) ProtoMessage() {} func (x *DisableTriggerRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[78] + mi := &file_gofer_transport_proto_msgTypes[88] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4140,7 +4741,7 @@ func (x *DisableTriggerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DisableTriggerRequest.ProtoReflect.Descriptor instead. func (*DisableTriggerRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{78} + return file_gofer_transport_proto_rawDescGZIP(), []int{88} } func (x *DisableTriggerRequest) GetName() string { @@ -4159,7 +4760,7 @@ type DisableTriggerResponse struct { func (x *DisableTriggerResponse) Reset() { *x = DisableTriggerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[79] + mi := &file_gofer_transport_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4172,7 +4773,7 @@ func (x *DisableTriggerResponse) String() string { func (*DisableTriggerResponse) ProtoMessage() {} func (x *DisableTriggerResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[79] + mi := &file_gofer_transport_proto_msgTypes[89] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4185,7 +4786,7 @@ func (x *DisableTriggerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DisableTriggerResponse.ProtoReflect.Descriptor instead. func (*DisableTriggerResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{79} + return file_gofer_transport_proto_rawDescGZIP(), []int{89} } type GetTriggerInstallInstructionsRequest struct { @@ -4201,7 +4802,7 @@ type GetTriggerInstallInstructionsRequest struct { func (x *GetTriggerInstallInstructionsRequest) Reset() { *x = GetTriggerInstallInstructionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[80] + mi := &file_gofer_transport_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4214,7 +4815,7 @@ func (x *GetTriggerInstallInstructionsRequest) String() string { func (*GetTriggerInstallInstructionsRequest) ProtoMessage() {} func (x *GetTriggerInstallInstructionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[80] + mi := &file_gofer_transport_proto_msgTypes[90] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4227,7 +4828,7 @@ func (x *GetTriggerInstallInstructionsRequest) ProtoReflect() protoreflect.Messa // Deprecated: Use GetTriggerInstallInstructionsRequest.ProtoReflect.Descriptor instead. func (*GetTriggerInstallInstructionsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{80} + return file_gofer_transport_proto_rawDescGZIP(), []int{90} } func (x *GetTriggerInstallInstructionsRequest) GetImage() string { @@ -4262,7 +4863,7 @@ type GetTriggerInstallInstructionsResponse struct { func (x *GetTriggerInstallInstructionsResponse) Reset() { *x = GetTriggerInstallInstructionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[81] + mi := &file_gofer_transport_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4275,7 +4876,7 @@ func (x *GetTriggerInstallInstructionsResponse) String() string { func (*GetTriggerInstallInstructionsResponse) ProtoMessage() {} func (x *GetTriggerInstallInstructionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[81] + mi := &file_gofer_transport_proto_msgTypes[91] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4288,7 +4889,7 @@ func (x *GetTriggerInstallInstructionsResponse) ProtoReflect() protoreflect.Mess // Deprecated: Use GetTriggerInstallInstructionsResponse.ProtoReflect.Descriptor instead. func (*GetTriggerInstallInstructionsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{81} + return file_gofer_transport_proto_rawDescGZIP(), []int{91} } func (x *GetTriggerInstallInstructionsResponse) GetInstructions() string { @@ -4309,7 +4910,7 @@ type GetCommonTaskRequest struct { func (x *GetCommonTaskRequest) Reset() { *x = GetCommonTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[82] + mi := &file_gofer_transport_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4322,7 +4923,7 @@ func (x *GetCommonTaskRequest) String() string { func (*GetCommonTaskRequest) ProtoMessage() {} func (x *GetCommonTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[82] + mi := &file_gofer_transport_proto_msgTypes[92] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4335,7 +4936,7 @@ func (x *GetCommonTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCommonTaskRequest.ProtoReflect.Descriptor instead. func (*GetCommonTaskRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{82} + return file_gofer_transport_proto_rawDescGZIP(), []int{92} } func (x *GetCommonTaskRequest) GetName() string { @@ -4356,7 +4957,7 @@ type GetCommonTaskResponse struct { func (x *GetCommonTaskResponse) Reset() { *x = GetCommonTaskResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[83] + mi := &file_gofer_transport_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4369,7 +4970,7 @@ func (x *GetCommonTaskResponse) String() string { func (*GetCommonTaskResponse) ProtoMessage() {} func (x *GetCommonTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[83] + mi := &file_gofer_transport_proto_msgTypes[93] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4382,7 +4983,7 @@ func (x *GetCommonTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCommonTaskResponse.ProtoReflect.Descriptor instead. func (*GetCommonTaskResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{83} + return file_gofer_transport_proto_rawDescGZIP(), []int{93} } func (x *GetCommonTaskResponse) GetCommonTask() *CommonTaskRegistration { @@ -4401,7 +5002,7 @@ type ListCommonTasksRequest struct { func (x *ListCommonTasksRequest) Reset() { *x = ListCommonTasksRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[84] + mi := &file_gofer_transport_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4414,7 +5015,7 @@ func (x *ListCommonTasksRequest) String() string { func (*ListCommonTasksRequest) ProtoMessage() {} func (x *ListCommonTasksRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[84] + mi := &file_gofer_transport_proto_msgTypes[94] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4427,7 +5028,7 @@ func (x *ListCommonTasksRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListCommonTasksRequest.ProtoReflect.Descriptor instead. func (*ListCommonTasksRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{84} + return file_gofer_transport_proto_rawDescGZIP(), []int{94} } type ListCommonTasksResponse struct { @@ -4441,7 +5042,7 @@ type ListCommonTasksResponse struct { func (x *ListCommonTasksResponse) Reset() { *x = ListCommonTasksResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[85] + mi := &file_gofer_transport_proto_msgTypes[95] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4454,7 +5055,7 @@ func (x *ListCommonTasksResponse) String() string { func (*ListCommonTasksResponse) ProtoMessage() {} func (x *ListCommonTasksResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[85] + mi := &file_gofer_transport_proto_msgTypes[95] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4467,7 +5068,7 @@ func (x *ListCommonTasksResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListCommonTasksResponse.ProtoReflect.Descriptor instead. func (*ListCommonTasksResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{85} + return file_gofer_transport_proto_rawDescGZIP(), []int{95} } func (x *ListCommonTasksResponse) GetCommonTasks() []*CommonTaskRegistration { @@ -4493,7 +5094,7 @@ type InstallCommonTaskRequest struct { func (x *InstallCommonTaskRequest) Reset() { *x = InstallCommonTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[86] + mi := &file_gofer_transport_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4506,7 +5107,7 @@ func (x *InstallCommonTaskRequest) String() string { func (*InstallCommonTaskRequest) ProtoMessage() {} func (x *InstallCommonTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[86] + mi := &file_gofer_transport_proto_msgTypes[96] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4519,7 +5120,7 @@ func (x *InstallCommonTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InstallCommonTaskRequest.ProtoReflect.Descriptor instead. func (*InstallCommonTaskRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{86} + return file_gofer_transport_proto_rawDescGZIP(), []int{96} } func (x *InstallCommonTaskRequest) GetName() string { @@ -4573,7 +5174,7 @@ type InstallCommonTaskResponse struct { func (x *InstallCommonTaskResponse) Reset() { *x = InstallCommonTaskResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[87] + mi := &file_gofer_transport_proto_msgTypes[97] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4586,7 +5187,7 @@ func (x *InstallCommonTaskResponse) String() string { func (*InstallCommonTaskResponse) ProtoMessage() {} func (x *InstallCommonTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[87] + mi := &file_gofer_transport_proto_msgTypes[97] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4599,7 +5200,7 @@ func (x *InstallCommonTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InstallCommonTaskResponse.ProtoReflect.Descriptor instead. func (*InstallCommonTaskResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{87} + return file_gofer_transport_proto_rawDescGZIP(), []int{97} } type UninstallCommonTaskRequest struct { @@ -4613,7 +5214,7 @@ type UninstallCommonTaskRequest struct { func (x *UninstallCommonTaskRequest) Reset() { *x = UninstallCommonTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[88] + mi := &file_gofer_transport_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4626,7 +5227,7 @@ func (x *UninstallCommonTaskRequest) String() string { func (*UninstallCommonTaskRequest) ProtoMessage() {} func (x *UninstallCommonTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[88] + mi := &file_gofer_transport_proto_msgTypes[98] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4639,7 +5240,7 @@ func (x *UninstallCommonTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UninstallCommonTaskRequest.ProtoReflect.Descriptor instead. func (*UninstallCommonTaskRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{88} + return file_gofer_transport_proto_rawDescGZIP(), []int{98} } func (x *UninstallCommonTaskRequest) GetName() string { @@ -4658,7 +5259,7 @@ type UninstallCommonTaskResponse struct { func (x *UninstallCommonTaskResponse) Reset() { *x = UninstallCommonTaskResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[89] + mi := &file_gofer_transport_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4671,7 +5272,7 @@ func (x *UninstallCommonTaskResponse) String() string { func (*UninstallCommonTaskResponse) ProtoMessage() {} func (x *UninstallCommonTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[89] + mi := &file_gofer_transport_proto_msgTypes[99] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4684,7 +5285,7 @@ func (x *UninstallCommonTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UninstallCommonTaskResponse.ProtoReflect.Descriptor instead. func (*UninstallCommonTaskResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{89} + return file_gofer_transport_proto_rawDescGZIP(), []int{99} } type EnableCommonTaskRequest struct { @@ -4698,7 +5299,7 @@ type EnableCommonTaskRequest struct { func (x *EnableCommonTaskRequest) Reset() { *x = EnableCommonTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[90] + mi := &file_gofer_transport_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4711,7 +5312,7 @@ func (x *EnableCommonTaskRequest) String() string { func (*EnableCommonTaskRequest) ProtoMessage() {} func (x *EnableCommonTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[90] + mi := &file_gofer_transport_proto_msgTypes[100] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4724,7 +5325,7 @@ func (x *EnableCommonTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EnableCommonTaskRequest.ProtoReflect.Descriptor instead. func (*EnableCommonTaskRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{90} + return file_gofer_transport_proto_rawDescGZIP(), []int{100} } func (x *EnableCommonTaskRequest) GetName() string { @@ -4743,7 +5344,7 @@ type EnableCommonTaskResponse struct { func (x *EnableCommonTaskResponse) Reset() { *x = EnableCommonTaskResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[91] + mi := &file_gofer_transport_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4756,7 +5357,7 @@ func (x *EnableCommonTaskResponse) String() string { func (*EnableCommonTaskResponse) ProtoMessage() {} func (x *EnableCommonTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[91] + mi := &file_gofer_transport_proto_msgTypes[101] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4769,7 +5370,7 @@ func (x *EnableCommonTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EnableCommonTaskResponse.ProtoReflect.Descriptor instead. func (*EnableCommonTaskResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{91} + return file_gofer_transport_proto_rawDescGZIP(), []int{101} } type DisableCommonTaskRequest struct { @@ -4783,7 +5384,7 @@ type DisableCommonTaskRequest struct { func (x *DisableCommonTaskRequest) Reset() { *x = DisableCommonTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[92] + mi := &file_gofer_transport_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4796,7 +5397,7 @@ func (x *DisableCommonTaskRequest) String() string { func (*DisableCommonTaskRequest) ProtoMessage() {} func (x *DisableCommonTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[92] + mi := &file_gofer_transport_proto_msgTypes[102] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4809,7 +5410,7 @@ func (x *DisableCommonTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DisableCommonTaskRequest.ProtoReflect.Descriptor instead. func (*DisableCommonTaskRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{92} + return file_gofer_transport_proto_rawDescGZIP(), []int{102} } func (x *DisableCommonTaskRequest) GetName() string { @@ -4828,7 +5429,7 @@ type DisableCommonTaskResponse struct { func (x *DisableCommonTaskResponse) Reset() { *x = DisableCommonTaskResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[93] + mi := &file_gofer_transport_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4841,7 +5442,7 @@ func (x *DisableCommonTaskResponse) String() string { func (*DisableCommonTaskResponse) ProtoMessage() {} func (x *DisableCommonTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[93] + mi := &file_gofer_transport_proto_msgTypes[103] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4854,7 +5455,7 @@ func (x *DisableCommonTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DisableCommonTaskResponse.ProtoReflect.Descriptor instead. func (*DisableCommonTaskResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{93} + return file_gofer_transport_proto_rawDescGZIP(), []int{103} } type GetCommonTaskInstallInstructionsRequest struct { @@ -4870,7 +5471,7 @@ type GetCommonTaskInstallInstructionsRequest struct { func (x *GetCommonTaskInstallInstructionsRequest) Reset() { *x = GetCommonTaskInstallInstructionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[94] + mi := &file_gofer_transport_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4883,7 +5484,7 @@ func (x *GetCommonTaskInstallInstructionsRequest) String() string { func (*GetCommonTaskInstallInstructionsRequest) ProtoMessage() {} func (x *GetCommonTaskInstallInstructionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[94] + mi := &file_gofer_transport_proto_msgTypes[104] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4896,7 +5497,7 @@ func (x *GetCommonTaskInstallInstructionsRequest) ProtoReflect() protoreflect.Me // Deprecated: Use GetCommonTaskInstallInstructionsRequest.ProtoReflect.Descriptor instead. func (*GetCommonTaskInstallInstructionsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{94} + return file_gofer_transport_proto_rawDescGZIP(), []int{104} } func (x *GetCommonTaskInstallInstructionsRequest) GetImage() string { @@ -4931,7 +5532,7 @@ type GetCommonTaskInstallInstructionsResponse struct { func (x *GetCommonTaskInstallInstructionsResponse) Reset() { *x = GetCommonTaskInstallInstructionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[95] + mi := &file_gofer_transport_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4944,7 +5545,7 @@ func (x *GetCommonTaskInstallInstructionsResponse) String() string { func (*GetCommonTaskInstallInstructionsResponse) ProtoMessage() {} func (x *GetCommonTaskInstallInstructionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[95] + mi := &file_gofer_transport_proto_msgTypes[105] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4957,7 +5558,7 @@ func (x *GetCommonTaskInstallInstructionsResponse) ProtoReflect() protoreflect.M // Deprecated: Use GetCommonTaskInstallInstructionsResponse.ProtoReflect.Descriptor instead. func (*GetCommonTaskInstallInstructionsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{95} + return file_gofer_transport_proto_rawDescGZIP(), []int{105} } func (x *GetCommonTaskInstallInstructionsResponse) GetInstructions() string { @@ -4976,7 +5577,7 @@ type TriggerWatchRequest struct { func (x *TriggerWatchRequest) Reset() { *x = TriggerWatchRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[96] + mi := &file_gofer_transport_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4989,7 +5590,7 @@ func (x *TriggerWatchRequest) String() string { func (*TriggerWatchRequest) ProtoMessage() {} func (x *TriggerWatchRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[96] + mi := &file_gofer_transport_proto_msgTypes[106] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5002,7 +5603,7 @@ func (x *TriggerWatchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerWatchRequest.ProtoReflect.Descriptor instead. func (*TriggerWatchRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{96} + return file_gofer_transport_proto_rawDescGZIP(), []int{106} } type TriggerWatchResponse struct { @@ -5027,7 +5628,7 @@ type TriggerWatchResponse struct { func (x *TriggerWatchResponse) Reset() { *x = TriggerWatchResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[97] + mi := &file_gofer_transport_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5040,7 +5641,7 @@ func (x *TriggerWatchResponse) String() string { func (*TriggerWatchResponse) ProtoMessage() {} func (x *TriggerWatchResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[97] + mi := &file_gofer_transport_proto_msgTypes[107] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5053,7 +5654,7 @@ func (x *TriggerWatchResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerWatchResponse.ProtoReflect.Descriptor instead. func (*TriggerWatchResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{97} + return file_gofer_transport_proto_rawDescGZIP(), []int{107} } func (x *TriggerWatchResponse) GetDetails() string { @@ -5107,7 +5708,7 @@ type TriggerInfoRequest struct { func (x *TriggerInfoRequest) Reset() { *x = TriggerInfoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[98] + mi := &file_gofer_transport_proto_msgTypes[108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5120,7 +5721,7 @@ func (x *TriggerInfoRequest) String() string { func (*TriggerInfoRequest) ProtoMessage() {} func (x *TriggerInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[98] + mi := &file_gofer_transport_proto_msgTypes[108] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5133,7 +5734,7 @@ func (x *TriggerInfoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerInfoRequest.ProtoReflect.Descriptor instead. func (*TriggerInfoRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{98} + return file_gofer_transport_proto_rawDescGZIP(), []int{108} } type TriggerInfoResponse struct { @@ -5156,7 +5757,7 @@ type TriggerInfoResponse struct { func (x *TriggerInfoResponse) Reset() { *x = TriggerInfoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[99] + mi := &file_gofer_transport_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5169,7 +5770,7 @@ func (x *TriggerInfoResponse) String() string { func (*TriggerInfoResponse) ProtoMessage() {} func (x *TriggerInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[99] + mi := &file_gofer_transport_proto_msgTypes[109] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5182,7 +5783,7 @@ func (x *TriggerInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerInfoResponse.ProtoReflect.Descriptor instead. func (*TriggerInfoResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{99} + return file_gofer_transport_proto_rawDescGZIP(), []int{109} } func (x *TriggerInfoResponse) GetName() string { @@ -5211,8 +5812,8 @@ type TriggerSubscribeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // unique identifier for associated namespace - PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` // unique identifier for associated pipeline + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // unique identifier for associated namespace. + PipelineId string `protobuf:"bytes,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` // unique identifier for associated pipeline. PipelineTriggerLabel string `protobuf:"bytes,3,opt,name=pipeline_trigger_label,json=pipelineTriggerLabel,proto3" json:"pipeline_trigger_label,omitempty"` // pipeline specific subscription id // Pipelines are allowed to pass a configuration to triggers denoting what // specific settings they might like for a specific trigger. The acceptable @@ -5230,7 +5831,7 @@ type TriggerSubscribeRequest struct { func (x *TriggerSubscribeRequest) Reset() { *x = TriggerSubscribeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[100] + mi := &file_gofer_transport_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5243,7 +5844,7 @@ func (x *TriggerSubscribeRequest) String() string { func (*TriggerSubscribeRequest) ProtoMessage() {} func (x *TriggerSubscribeRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[100] + mi := &file_gofer_transport_proto_msgTypes[110] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5256,7 +5857,7 @@ func (x *TriggerSubscribeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerSubscribeRequest.ProtoReflect.Descriptor instead. func (*TriggerSubscribeRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{100} + return file_gofer_transport_proto_rawDescGZIP(), []int{110} } func (x *TriggerSubscribeRequest) GetNamespaceId() string { @@ -5296,7 +5897,7 @@ type TriggerSubscribeResponse struct { func (x *TriggerSubscribeResponse) Reset() { *x = TriggerSubscribeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[101] + mi := &file_gofer_transport_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5309,7 +5910,7 @@ func (x *TriggerSubscribeResponse) String() string { func (*TriggerSubscribeResponse) ProtoMessage() {} func (x *TriggerSubscribeResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[101] + mi := &file_gofer_transport_proto_msgTypes[111] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5322,7 +5923,7 @@ func (x *TriggerSubscribeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerSubscribeResponse.ProtoReflect.Descriptor instead. func (*TriggerSubscribeResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{101} + return file_gofer_transport_proto_rawDescGZIP(), []int{111} } type TriggerUnsubscribeRequest struct { @@ -5338,7 +5939,7 @@ type TriggerUnsubscribeRequest struct { func (x *TriggerUnsubscribeRequest) Reset() { *x = TriggerUnsubscribeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[102] + mi := &file_gofer_transport_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5351,7 +5952,7 @@ func (x *TriggerUnsubscribeRequest) String() string { func (*TriggerUnsubscribeRequest) ProtoMessage() {} func (x *TriggerUnsubscribeRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[102] + mi := &file_gofer_transport_proto_msgTypes[112] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5364,7 +5965,7 @@ func (x *TriggerUnsubscribeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerUnsubscribeRequest.ProtoReflect.Descriptor instead. func (*TriggerUnsubscribeRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{102} + return file_gofer_transport_proto_rawDescGZIP(), []int{112} } func (x *TriggerUnsubscribeRequest) GetNamespaceId() string { @@ -5397,7 +5998,7 @@ type TriggerUnsubscribeResponse struct { func (x *TriggerUnsubscribeResponse) Reset() { *x = TriggerUnsubscribeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[103] + mi := &file_gofer_transport_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5410,7 +6011,7 @@ func (x *TriggerUnsubscribeResponse) String() string { func (*TriggerUnsubscribeResponse) ProtoMessage() {} func (x *TriggerUnsubscribeResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[103] + mi := &file_gofer_transport_proto_msgTypes[113] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5423,7 +6024,7 @@ func (x *TriggerUnsubscribeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerUnsubscribeResponse.ProtoReflect.Descriptor instead. func (*TriggerUnsubscribeResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{103} + return file_gofer_transport_proto_rawDescGZIP(), []int{113} } type TriggerShutdownRequest struct { @@ -5435,7 +6036,7 @@ type TriggerShutdownRequest struct { func (x *TriggerShutdownRequest) Reset() { *x = TriggerShutdownRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[104] + mi := &file_gofer_transport_proto_msgTypes[114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5448,7 +6049,7 @@ func (x *TriggerShutdownRequest) String() string { func (*TriggerShutdownRequest) ProtoMessage() {} func (x *TriggerShutdownRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[104] + mi := &file_gofer_transport_proto_msgTypes[114] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5461,7 +6062,7 @@ func (x *TriggerShutdownRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerShutdownRequest.ProtoReflect.Descriptor instead. func (*TriggerShutdownRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{104} + return file_gofer_transport_proto_rawDescGZIP(), []int{114} } type TriggerShutdownResponse struct { @@ -5473,7 +6074,7 @@ type TriggerShutdownResponse struct { func (x *TriggerShutdownResponse) Reset() { *x = TriggerShutdownResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[105] + mi := &file_gofer_transport_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5486,7 +6087,7 @@ func (x *TriggerShutdownResponse) String() string { func (*TriggerShutdownResponse) ProtoMessage() {} func (x *TriggerShutdownResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[105] + mi := &file_gofer_transport_proto_msgTypes[115] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5499,7 +6100,7 @@ func (x *TriggerShutdownResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerShutdownResponse.ProtoReflect.Descriptor instead. func (*TriggerShutdownResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{105} + return file_gofer_transport_proto_rawDescGZIP(), []int{115} } type TriggerExternalEventRequest struct { @@ -5513,7 +6114,7 @@ type TriggerExternalEventRequest struct { func (x *TriggerExternalEventRequest) Reset() { *x = TriggerExternalEventRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[106] + mi := &file_gofer_transport_proto_msgTypes[116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5526,7 +6127,7 @@ func (x *TriggerExternalEventRequest) String() string { func (*TriggerExternalEventRequest) ProtoMessage() {} func (x *TriggerExternalEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[106] + mi := &file_gofer_transport_proto_msgTypes[116] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5539,7 +6140,7 @@ func (x *TriggerExternalEventRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerExternalEventRequest.ProtoReflect.Descriptor instead. func (*TriggerExternalEventRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{106} + return file_gofer_transport_proto_rawDescGZIP(), []int{116} } func (x *TriggerExternalEventRequest) GetPayload() []byte { @@ -5558,7 +6159,7 @@ type TriggerExternalEventResponse struct { func (x *TriggerExternalEventResponse) Reset() { *x = TriggerExternalEventResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[107] + mi := &file_gofer_transport_proto_msgTypes[117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5571,7 +6172,7 @@ func (x *TriggerExternalEventResponse) String() string { func (*TriggerExternalEventResponse) ProtoMessage() {} func (x *TriggerExternalEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[107] + mi := &file_gofer_transport_proto_msgTypes[117] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5584,7 +6185,7 @@ func (x *TriggerExternalEventResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TriggerExternalEventResponse.ProtoReflect.Descriptor instead. func (*TriggerExternalEventResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{107} + return file_gofer_transport_proto_rawDescGZIP(), []int{117} } type GetEventRequest struct { @@ -5598,7 +6199,7 @@ type GetEventRequest struct { func (x *GetEventRequest) Reset() { *x = GetEventRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[108] + mi := &file_gofer_transport_proto_msgTypes[118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5611,7 +6212,7 @@ func (x *GetEventRequest) String() string { func (*GetEventRequest) ProtoMessage() {} func (x *GetEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[108] + mi := &file_gofer_transport_proto_msgTypes[118] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5624,7 +6225,7 @@ func (x *GetEventRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetEventRequest.ProtoReflect.Descriptor instead. func (*GetEventRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{108} + return file_gofer_transport_proto_rawDescGZIP(), []int{118} } func (x *GetEventRequest) GetId() int64 { @@ -5645,7 +6246,7 @@ type GetEventResponse struct { func (x *GetEventResponse) Reset() { *x = GetEventResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[109] + mi := &file_gofer_transport_proto_msgTypes[119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5658,7 +6259,7 @@ func (x *GetEventResponse) String() string { func (*GetEventResponse) ProtoMessage() {} func (x *GetEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[109] + mi := &file_gofer_transport_proto_msgTypes[119] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5671,7 +6272,7 @@ func (x *GetEventResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetEventResponse.ProtoReflect.Descriptor instead. func (*GetEventResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{109} + return file_gofer_transport_proto_rawDescGZIP(), []int{119} } func (x *GetEventResponse) GetEvent() *Event { @@ -5696,7 +6297,7 @@ type ListEventsRequest struct { func (x *ListEventsRequest) Reset() { *x = ListEventsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[110] + mi := &file_gofer_transport_proto_msgTypes[120] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5709,7 +6310,7 @@ func (x *ListEventsRequest) String() string { func (*ListEventsRequest) ProtoMessage() {} func (x *ListEventsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[110] + mi := &file_gofer_transport_proto_msgTypes[120] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5722,7 +6323,7 @@ func (x *ListEventsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListEventsRequest.ProtoReflect.Descriptor instead. func (*ListEventsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{110} + return file_gofer_transport_proto_rawDescGZIP(), []int{120} } func (x *ListEventsRequest) GetReverse() bool { @@ -5750,7 +6351,7 @@ type ListEventsResponse struct { func (x *ListEventsResponse) Reset() { *x = ListEventsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[111] + mi := &file_gofer_transport_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5763,7 +6364,7 @@ func (x *ListEventsResponse) String() string { func (*ListEventsResponse) ProtoMessage() {} func (x *ListEventsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[111] + mi := &file_gofer_transport_proto_msgTypes[121] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5776,7 +6377,7 @@ func (x *ListEventsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListEventsResponse.ProtoReflect.Descriptor instead. func (*ListEventsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{111} + return file_gofer_transport_proto_rawDescGZIP(), []int{121} } func (x *ListEventsResponse) GetEvent() *Event { @@ -5799,7 +6400,7 @@ type GetPipelineObjectRequest struct { func (x *GetPipelineObjectRequest) Reset() { *x = GetPipelineObjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[112] + mi := &file_gofer_transport_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5812,7 +6413,7 @@ func (x *GetPipelineObjectRequest) String() string { func (*GetPipelineObjectRequest) ProtoMessage() {} func (x *GetPipelineObjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[112] + mi := &file_gofer_transport_proto_msgTypes[122] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5825,7 +6426,7 @@ func (x *GetPipelineObjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPipelineObjectRequest.ProtoReflect.Descriptor instead. func (*GetPipelineObjectRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{112} + return file_gofer_transport_proto_rawDescGZIP(), []int{122} } func (x *GetPipelineObjectRequest) GetNamespaceId() string { @@ -5860,7 +6461,7 @@ type GetPipelineObjectResponse struct { func (x *GetPipelineObjectResponse) Reset() { *x = GetPipelineObjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[113] + mi := &file_gofer_transport_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5873,7 +6474,7 @@ func (x *GetPipelineObjectResponse) String() string { func (*GetPipelineObjectResponse) ProtoMessage() {} func (x *GetPipelineObjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[113] + mi := &file_gofer_transport_proto_msgTypes[123] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5886,7 +6487,7 @@ func (x *GetPipelineObjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPipelineObjectResponse.ProtoReflect.Descriptor instead. func (*GetPipelineObjectResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{113} + return file_gofer_transport_proto_rawDescGZIP(), []int{123} } func (x *GetPipelineObjectResponse) GetContent() []byte { @@ -5908,7 +6509,7 @@ type ListPipelineObjectsRequest struct { func (x *ListPipelineObjectsRequest) Reset() { *x = ListPipelineObjectsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[114] + mi := &file_gofer_transport_proto_msgTypes[124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5921,7 +6522,7 @@ func (x *ListPipelineObjectsRequest) String() string { func (*ListPipelineObjectsRequest) ProtoMessage() {} func (x *ListPipelineObjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[114] + mi := &file_gofer_transport_proto_msgTypes[124] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5934,7 +6535,7 @@ func (x *ListPipelineObjectsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPipelineObjectsRequest.ProtoReflect.Descriptor instead. func (*ListPipelineObjectsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{114} + return file_gofer_transport_proto_rawDescGZIP(), []int{124} } func (x *ListPipelineObjectsRequest) GetNamespaceId() string { @@ -5962,7 +6563,7 @@ type ListPipelineObjectsResponse struct { func (x *ListPipelineObjectsResponse) Reset() { *x = ListPipelineObjectsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[115] + mi := &file_gofer_transport_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5975,7 +6576,7 @@ func (x *ListPipelineObjectsResponse) String() string { func (*ListPipelineObjectsResponse) ProtoMessage() {} func (x *ListPipelineObjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[115] + mi := &file_gofer_transport_proto_msgTypes[125] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5988,7 +6589,7 @@ func (x *ListPipelineObjectsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPipelineObjectsResponse.ProtoReflect.Descriptor instead. func (*ListPipelineObjectsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{115} + return file_gofer_transport_proto_rawDescGZIP(), []int{125} } func (x *ListPipelineObjectsResponse) GetKeys() []*ObjectStoreKey { @@ -6013,7 +6614,7 @@ type PutPipelineObjectRequest struct { func (x *PutPipelineObjectRequest) Reset() { *x = PutPipelineObjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[116] + mi := &file_gofer_transport_proto_msgTypes[126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6026,7 +6627,7 @@ func (x *PutPipelineObjectRequest) String() string { func (*PutPipelineObjectRequest) ProtoMessage() {} func (x *PutPipelineObjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[116] + mi := &file_gofer_transport_proto_msgTypes[126] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6039,7 +6640,7 @@ func (x *PutPipelineObjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PutPipelineObjectRequest.ProtoReflect.Descriptor instead. func (*PutPipelineObjectRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{116} + return file_gofer_transport_proto_rawDescGZIP(), []int{126} } func (x *PutPipelineObjectRequest) GetNamespaceId() string { @@ -6093,7 +6694,7 @@ type PutPipelineObjectResponse struct { func (x *PutPipelineObjectResponse) Reset() { *x = PutPipelineObjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[117] + mi := &file_gofer_transport_proto_msgTypes[127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6106,7 +6707,7 @@ func (x *PutPipelineObjectResponse) String() string { func (*PutPipelineObjectResponse) ProtoMessage() {} func (x *PutPipelineObjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[117] + mi := &file_gofer_transport_proto_msgTypes[127] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6119,7 +6720,7 @@ func (x *PutPipelineObjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PutPipelineObjectResponse.ProtoReflect.Descriptor instead. func (*PutPipelineObjectResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{117} + return file_gofer_transport_proto_rawDescGZIP(), []int{127} } func (x *PutPipelineObjectResponse) GetBytes() int64 { @@ -6156,7 +6757,7 @@ type DeletePipelineObjectRequest struct { func (x *DeletePipelineObjectRequest) Reset() { *x = DeletePipelineObjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[118] + mi := &file_gofer_transport_proto_msgTypes[128] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6169,7 +6770,7 @@ func (x *DeletePipelineObjectRequest) String() string { func (*DeletePipelineObjectRequest) ProtoMessage() {} func (x *DeletePipelineObjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[118] + mi := &file_gofer_transport_proto_msgTypes[128] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6182,7 +6783,7 @@ func (x *DeletePipelineObjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeletePipelineObjectRequest.ProtoReflect.Descriptor instead. func (*DeletePipelineObjectRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{118} + return file_gofer_transport_proto_rawDescGZIP(), []int{128} } func (x *DeletePipelineObjectRequest) GetNamespaceId() string { @@ -6215,7 +6816,7 @@ type DeletePipelineObjectResponse struct { func (x *DeletePipelineObjectResponse) Reset() { *x = DeletePipelineObjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[119] + mi := &file_gofer_transport_proto_msgTypes[129] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6228,7 +6829,7 @@ func (x *DeletePipelineObjectResponse) String() string { func (*DeletePipelineObjectResponse) ProtoMessage() {} func (x *DeletePipelineObjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[119] + mi := &file_gofer_transport_proto_msgTypes[129] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6241,7 +6842,7 @@ func (x *DeletePipelineObjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeletePipelineObjectResponse.ProtoReflect.Descriptor instead. func (*DeletePipelineObjectResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{119} + return file_gofer_transport_proto_rawDescGZIP(), []int{129} } type GetRunObjectRequest struct { @@ -6258,7 +6859,7 @@ type GetRunObjectRequest struct { func (x *GetRunObjectRequest) Reset() { *x = GetRunObjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[120] + mi := &file_gofer_transport_proto_msgTypes[130] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6271,7 +6872,7 @@ func (x *GetRunObjectRequest) String() string { func (*GetRunObjectRequest) ProtoMessage() {} func (x *GetRunObjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[120] + mi := &file_gofer_transport_proto_msgTypes[130] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6284,7 +6885,7 @@ func (x *GetRunObjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRunObjectRequest.ProtoReflect.Descriptor instead. func (*GetRunObjectRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{120} + return file_gofer_transport_proto_rawDescGZIP(), []int{130} } func (x *GetRunObjectRequest) GetNamespaceId() string { @@ -6326,7 +6927,7 @@ type GetRunObjectResponse struct { func (x *GetRunObjectResponse) Reset() { *x = GetRunObjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[121] + mi := &file_gofer_transport_proto_msgTypes[131] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6339,7 +6940,7 @@ func (x *GetRunObjectResponse) String() string { func (*GetRunObjectResponse) ProtoMessage() {} func (x *GetRunObjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[121] + mi := &file_gofer_transport_proto_msgTypes[131] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6352,7 +6953,7 @@ func (x *GetRunObjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRunObjectResponse.ProtoReflect.Descriptor instead. func (*GetRunObjectResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{121} + return file_gofer_transport_proto_rawDescGZIP(), []int{131} } func (x *GetRunObjectResponse) GetContent() []byte { @@ -6375,7 +6976,7 @@ type ListRunObjectsRequest struct { func (x *ListRunObjectsRequest) Reset() { *x = ListRunObjectsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[122] + mi := &file_gofer_transport_proto_msgTypes[132] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6388,7 +6989,7 @@ func (x *ListRunObjectsRequest) String() string { func (*ListRunObjectsRequest) ProtoMessage() {} func (x *ListRunObjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[122] + mi := &file_gofer_transport_proto_msgTypes[132] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6401,7 +7002,7 @@ func (x *ListRunObjectsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRunObjectsRequest.ProtoReflect.Descriptor instead. func (*ListRunObjectsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{122} + return file_gofer_transport_proto_rawDescGZIP(), []int{132} } func (x *ListRunObjectsRequest) GetNamespaceId() string { @@ -6436,7 +7037,7 @@ type ListRunObjectsResponse struct { func (x *ListRunObjectsResponse) Reset() { *x = ListRunObjectsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[123] + mi := &file_gofer_transport_proto_msgTypes[133] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6449,7 +7050,7 @@ func (x *ListRunObjectsResponse) String() string { func (*ListRunObjectsResponse) ProtoMessage() {} func (x *ListRunObjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[123] + mi := &file_gofer_transport_proto_msgTypes[133] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6462,7 +7063,7 @@ func (x *ListRunObjectsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRunObjectsResponse.ProtoReflect.Descriptor instead. func (*ListRunObjectsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{123} + return file_gofer_transport_proto_rawDescGZIP(), []int{133} } func (x *ListRunObjectsResponse) GetKeys() []*ObjectStoreKey { @@ -6488,7 +7089,7 @@ type PutRunObjectRequest struct { func (x *PutRunObjectRequest) Reset() { *x = PutRunObjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[124] + mi := &file_gofer_transport_proto_msgTypes[134] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6501,7 +7102,7 @@ func (x *PutRunObjectRequest) String() string { func (*PutRunObjectRequest) ProtoMessage() {} func (x *PutRunObjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[124] + mi := &file_gofer_transport_proto_msgTypes[134] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6514,7 +7115,7 @@ func (x *PutRunObjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PutRunObjectRequest.ProtoReflect.Descriptor instead. func (*PutRunObjectRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{124} + return file_gofer_transport_proto_rawDescGZIP(), []int{134} } func (x *PutRunObjectRequest) GetNamespaceId() string { @@ -6570,7 +7171,7 @@ type PutRunObjectResponse struct { func (x *PutRunObjectResponse) Reset() { *x = PutRunObjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[125] + mi := &file_gofer_transport_proto_msgTypes[135] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6583,7 +7184,7 @@ func (x *PutRunObjectResponse) String() string { func (*PutRunObjectResponse) ProtoMessage() {} func (x *PutRunObjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[125] + mi := &file_gofer_transport_proto_msgTypes[135] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6596,7 +7197,7 @@ func (x *PutRunObjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PutRunObjectResponse.ProtoReflect.Descriptor instead. func (*PutRunObjectResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{125} + return file_gofer_transport_proto_rawDescGZIP(), []int{135} } func (x *PutRunObjectResponse) GetBytes() int64 { @@ -6620,7 +7221,7 @@ type DeleteRunObjectRequest struct { func (x *DeleteRunObjectRequest) Reset() { *x = DeleteRunObjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[126] + mi := &file_gofer_transport_proto_msgTypes[136] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6633,7 +7234,7 @@ func (x *DeleteRunObjectRequest) String() string { func (*DeleteRunObjectRequest) ProtoMessage() {} func (x *DeleteRunObjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[126] + mi := &file_gofer_transport_proto_msgTypes[136] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6646,7 +7247,7 @@ func (x *DeleteRunObjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRunObjectRequest.ProtoReflect.Descriptor instead. func (*DeleteRunObjectRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{126} + return file_gofer_transport_proto_rawDescGZIP(), []int{136} } func (x *DeleteRunObjectRequest) GetNamespaceId() string { @@ -6686,7 +7287,7 @@ type DeleteRunObjectResponse struct { func (x *DeleteRunObjectResponse) Reset() { *x = DeleteRunObjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[127] + mi := &file_gofer_transport_proto_msgTypes[137] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6699,7 +7300,7 @@ func (x *DeleteRunObjectResponse) String() string { func (*DeleteRunObjectResponse) ProtoMessage() {} func (x *DeleteRunObjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[127] + mi := &file_gofer_transport_proto_msgTypes[137] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6712,7 +7313,7 @@ func (x *DeleteRunObjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRunObjectResponse.ProtoReflect.Descriptor instead. func (*DeleteRunObjectResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{127} + return file_gofer_transport_proto_rawDescGZIP(), []int{137} } type GetPipelineSecretRequest struct { @@ -6729,7 +7330,7 @@ type GetPipelineSecretRequest struct { func (x *GetPipelineSecretRequest) Reset() { *x = GetPipelineSecretRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[128] + mi := &file_gofer_transport_proto_msgTypes[138] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6742,7 +7343,7 @@ func (x *GetPipelineSecretRequest) String() string { func (*GetPipelineSecretRequest) ProtoMessage() {} func (x *GetPipelineSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[128] + mi := &file_gofer_transport_proto_msgTypes[138] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6755,7 +7356,7 @@ func (x *GetPipelineSecretRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPipelineSecretRequest.ProtoReflect.Descriptor instead. func (*GetPipelineSecretRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{128} + return file_gofer_transport_proto_rawDescGZIP(), []int{138} } func (x *GetPipelineSecretRequest) GetNamespaceId() string { @@ -6798,7 +7399,7 @@ type GetPipelineSecretResponse struct { func (x *GetPipelineSecretResponse) Reset() { *x = GetPipelineSecretResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[129] + mi := &file_gofer_transport_proto_msgTypes[139] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6811,7 +7412,7 @@ func (x *GetPipelineSecretResponse) String() string { func (*GetPipelineSecretResponse) ProtoMessage() {} func (x *GetPipelineSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[129] + mi := &file_gofer_transport_proto_msgTypes[139] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6824,7 +7425,7 @@ func (x *GetPipelineSecretResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPipelineSecretResponse.ProtoReflect.Descriptor instead. func (*GetPipelineSecretResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{129} + return file_gofer_transport_proto_rawDescGZIP(), []int{139} } func (x *GetPipelineSecretResponse) GetMetadata() *SecretStoreKey { @@ -6853,7 +7454,7 @@ type ListPipelineSecretsRequest struct { func (x *ListPipelineSecretsRequest) Reset() { *x = ListPipelineSecretsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[130] + mi := &file_gofer_transport_proto_msgTypes[140] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6866,7 +7467,7 @@ func (x *ListPipelineSecretsRequest) String() string { func (*ListPipelineSecretsRequest) ProtoMessage() {} func (x *ListPipelineSecretsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[130] + mi := &file_gofer_transport_proto_msgTypes[140] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6879,7 +7480,7 @@ func (x *ListPipelineSecretsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPipelineSecretsRequest.ProtoReflect.Descriptor instead. func (*ListPipelineSecretsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{130} + return file_gofer_transport_proto_rawDescGZIP(), []int{140} } func (x *ListPipelineSecretsRequest) GetNamespaceId() string { @@ -6907,7 +7508,7 @@ type ListPipelineSecretsResponse struct { func (x *ListPipelineSecretsResponse) Reset() { *x = ListPipelineSecretsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[131] + mi := &file_gofer_transport_proto_msgTypes[141] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6920,7 +7521,7 @@ func (x *ListPipelineSecretsResponse) String() string { func (*ListPipelineSecretsResponse) ProtoMessage() {} func (x *ListPipelineSecretsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[131] + mi := &file_gofer_transport_proto_msgTypes[141] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6933,7 +7534,7 @@ func (x *ListPipelineSecretsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPipelineSecretsResponse.ProtoReflect.Descriptor instead. func (*ListPipelineSecretsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{131} + return file_gofer_transport_proto_rawDescGZIP(), []int{141} } func (x *ListPipelineSecretsResponse) GetKeys() []*SecretStoreKey { @@ -6958,7 +7559,7 @@ type PutPipelineSecretRequest struct { func (x *PutPipelineSecretRequest) Reset() { *x = PutPipelineSecretRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[132] + mi := &file_gofer_transport_proto_msgTypes[142] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6971,7 +7572,7 @@ func (x *PutPipelineSecretRequest) String() string { func (*PutPipelineSecretRequest) ProtoMessage() {} func (x *PutPipelineSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[132] + mi := &file_gofer_transport_proto_msgTypes[142] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6984,7 +7585,7 @@ func (x *PutPipelineSecretRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PutPipelineSecretRequest.ProtoReflect.Descriptor instead. func (*PutPipelineSecretRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{132} + return file_gofer_transport_proto_rawDescGZIP(), []int{142} } func (x *PutPipelineSecretRequest) GetNamespaceId() string { @@ -7034,7 +7635,7 @@ type PutPipelineSecretResponse struct { func (x *PutPipelineSecretResponse) Reset() { *x = PutPipelineSecretResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[133] + mi := &file_gofer_transport_proto_msgTypes[143] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7047,7 +7648,7 @@ func (x *PutPipelineSecretResponse) String() string { func (*PutPipelineSecretResponse) ProtoMessage() {} func (x *PutPipelineSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[133] + mi := &file_gofer_transport_proto_msgTypes[143] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7060,7 +7661,7 @@ func (x *PutPipelineSecretResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PutPipelineSecretResponse.ProtoReflect.Descriptor instead. func (*PutPipelineSecretResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{133} + return file_gofer_transport_proto_rawDescGZIP(), []int{143} } func (x *PutPipelineSecretResponse) GetBytes() int64 { @@ -7083,7 +7684,7 @@ type DeletePipelineSecretRequest struct { func (x *DeletePipelineSecretRequest) Reset() { *x = DeletePipelineSecretRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[134] + mi := &file_gofer_transport_proto_msgTypes[144] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7096,7 +7697,7 @@ func (x *DeletePipelineSecretRequest) String() string { func (*DeletePipelineSecretRequest) ProtoMessage() {} func (x *DeletePipelineSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[134] + mi := &file_gofer_transport_proto_msgTypes[144] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7109,7 +7710,7 @@ func (x *DeletePipelineSecretRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeletePipelineSecretRequest.ProtoReflect.Descriptor instead. func (*DeletePipelineSecretRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{134} + return file_gofer_transport_proto_rawDescGZIP(), []int{144} } func (x *DeletePipelineSecretRequest) GetNamespaceId() string { @@ -7142,7 +7743,7 @@ type DeletePipelineSecretResponse struct { func (x *DeletePipelineSecretResponse) Reset() { *x = DeletePipelineSecretResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[135] + mi := &file_gofer_transport_proto_msgTypes[145] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7155,7 +7756,7 @@ func (x *DeletePipelineSecretResponse) String() string { func (*DeletePipelineSecretResponse) ProtoMessage() {} func (x *DeletePipelineSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[135] + mi := &file_gofer_transport_proto_msgTypes[145] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7168,7 +7769,7 @@ func (x *DeletePipelineSecretResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeletePipelineSecretResponse.ProtoReflect.Descriptor instead. func (*DeletePipelineSecretResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{135} + return file_gofer_transport_proto_rawDescGZIP(), []int{145} } type GetGlobalSecretRequest struct { @@ -7183,7 +7784,7 @@ type GetGlobalSecretRequest struct { func (x *GetGlobalSecretRequest) Reset() { *x = GetGlobalSecretRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[136] + mi := &file_gofer_transport_proto_msgTypes[146] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7196,7 +7797,7 @@ func (x *GetGlobalSecretRequest) String() string { func (*GetGlobalSecretRequest) ProtoMessage() {} func (x *GetGlobalSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[136] + mi := &file_gofer_transport_proto_msgTypes[146] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7209,7 +7810,7 @@ func (x *GetGlobalSecretRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGlobalSecretRequest.ProtoReflect.Descriptor instead. func (*GetGlobalSecretRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{136} + return file_gofer_transport_proto_rawDescGZIP(), []int{146} } func (x *GetGlobalSecretRequest) GetKey() string { @@ -7238,7 +7839,7 @@ type GetGlobalSecretResponse struct { func (x *GetGlobalSecretResponse) Reset() { *x = GetGlobalSecretResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[137] + mi := &file_gofer_transport_proto_msgTypes[147] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7251,7 +7852,7 @@ func (x *GetGlobalSecretResponse) String() string { func (*GetGlobalSecretResponse) ProtoMessage() {} func (x *GetGlobalSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[137] + mi := &file_gofer_transport_proto_msgTypes[147] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7264,7 +7865,7 @@ func (x *GetGlobalSecretResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGlobalSecretResponse.ProtoReflect.Descriptor instead. func (*GetGlobalSecretResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{137} + return file_gofer_transport_proto_rawDescGZIP(), []int{147} } func (x *GetGlobalSecretResponse) GetMetadata() *SecretStoreKey { @@ -7290,7 +7891,7 @@ type ListGlobalSecretsRequest struct { func (x *ListGlobalSecretsRequest) Reset() { *x = ListGlobalSecretsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[138] + mi := &file_gofer_transport_proto_msgTypes[148] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7303,7 +7904,7 @@ func (x *ListGlobalSecretsRequest) String() string { func (*ListGlobalSecretsRequest) ProtoMessage() {} func (x *ListGlobalSecretsRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[138] + mi := &file_gofer_transport_proto_msgTypes[148] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7316,7 +7917,7 @@ func (x *ListGlobalSecretsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListGlobalSecretsRequest.ProtoReflect.Descriptor instead. func (*ListGlobalSecretsRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{138} + return file_gofer_transport_proto_rawDescGZIP(), []int{148} } type ListGlobalSecretsResponse struct { @@ -7330,7 +7931,7 @@ type ListGlobalSecretsResponse struct { func (x *ListGlobalSecretsResponse) Reset() { *x = ListGlobalSecretsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[139] + mi := &file_gofer_transport_proto_msgTypes[149] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7343,7 +7944,7 @@ func (x *ListGlobalSecretsResponse) String() string { func (*ListGlobalSecretsResponse) ProtoMessage() {} func (x *ListGlobalSecretsResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[139] + mi := &file_gofer_transport_proto_msgTypes[149] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7356,7 +7957,7 @@ func (x *ListGlobalSecretsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListGlobalSecretsResponse.ProtoReflect.Descriptor instead. func (*ListGlobalSecretsResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{139} + return file_gofer_transport_proto_rawDescGZIP(), []int{149} } func (x *ListGlobalSecretsResponse) GetKeys() []*SecretStoreKey { @@ -7379,7 +7980,7 @@ type PutGlobalSecretRequest struct { func (x *PutGlobalSecretRequest) Reset() { *x = PutGlobalSecretRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[140] + mi := &file_gofer_transport_proto_msgTypes[150] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7392,7 +7993,7 @@ func (x *PutGlobalSecretRequest) String() string { func (*PutGlobalSecretRequest) ProtoMessage() {} func (x *PutGlobalSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[140] + mi := &file_gofer_transport_proto_msgTypes[150] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7405,7 +8006,7 @@ func (x *PutGlobalSecretRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PutGlobalSecretRequest.ProtoReflect.Descriptor instead. func (*PutGlobalSecretRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{140} + return file_gofer_transport_proto_rawDescGZIP(), []int{150} } func (x *PutGlobalSecretRequest) GetKey() string { @@ -7441,7 +8042,7 @@ type PutGlobalSecretResponse struct { func (x *PutGlobalSecretResponse) Reset() { *x = PutGlobalSecretResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[141] + mi := &file_gofer_transport_proto_msgTypes[151] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7454,7 +8055,7 @@ func (x *PutGlobalSecretResponse) String() string { func (*PutGlobalSecretResponse) ProtoMessage() {} func (x *PutGlobalSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[141] + mi := &file_gofer_transport_proto_msgTypes[151] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7467,7 +8068,7 @@ func (x *PutGlobalSecretResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PutGlobalSecretResponse.ProtoReflect.Descriptor instead. func (*PutGlobalSecretResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{141} + return file_gofer_transport_proto_rawDescGZIP(), []int{151} } func (x *PutGlobalSecretResponse) GetBytes() int64 { @@ -7488,7 +8089,7 @@ type DeleteGlobalSecretRequest struct { func (x *DeleteGlobalSecretRequest) Reset() { *x = DeleteGlobalSecretRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[142] + mi := &file_gofer_transport_proto_msgTypes[152] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7501,7 +8102,7 @@ func (x *DeleteGlobalSecretRequest) String() string { func (*DeleteGlobalSecretRequest) ProtoMessage() {} func (x *DeleteGlobalSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[142] + mi := &file_gofer_transport_proto_msgTypes[152] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7514,7 +8115,7 @@ func (x *DeleteGlobalSecretRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteGlobalSecretRequest.ProtoReflect.Descriptor instead. func (*DeleteGlobalSecretRequest) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{142} + return file_gofer_transport_proto_rawDescGZIP(), []int{152} } func (x *DeleteGlobalSecretRequest) GetKey() string { @@ -7533,7 +8134,7 @@ type DeleteGlobalSecretResponse struct { func (x *DeleteGlobalSecretResponse) Reset() { *x = DeleteGlobalSecretResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gofer_transport_proto_msgTypes[143] + mi := &file_gofer_transport_proto_msgTypes[153] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7546,7 +8147,7 @@ func (x *DeleteGlobalSecretResponse) String() string { func (*DeleteGlobalSecretResponse) ProtoMessage() {} func (x *DeleteGlobalSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_gofer_transport_proto_msgTypes[143] + mi := &file_gofer_transport_proto_msgTypes[153] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7559,720 +8160,787 @@ func (x *DeleteGlobalSecretResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteGlobalSecretResponse.ProtoReflect.Descriptor instead. func (*DeleteGlobalSecretResponse) Descriptor() ([]byte, []int) { - return file_gofer_transport_proto_rawDescGZIP(), []int{143} + return file_gofer_transport_proto_rawDescGZIP(), []int{153} } var File_gofer_transport_proto protoreflect.FileDescriptor var file_gofer_transport_proto_rawDesc = []byte{ 0x0a, 0x15, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, - 0x67, 0x6f, 0x66, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x71, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x10, - 0x64, 0x65, 0x76, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x65, 0x76, 0x4d, 0x6f, 0x64, 0x65, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6d, 0x76, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6d, 0x76, 0x65, 0x72, 0x22, 0x70, - 0x0a, 0x13, 0x52, 0x65, 0x70, 0x61, 0x69, 0x72, 0x4f, 0x72, 0x70, 0x68, 0x61, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, - 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x61, 0x69, 0x72, 0x4f, 0x72, 0x70, 0x68, 0x61, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x54, 0x6f, 0x67, 0x67, - 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x32, 0x0a, 0x1a, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 0x02, 0x0a, 0x12, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x32, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, - 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x2f, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x4d, - 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, - 0x02, 0x22, 0x53, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x17, 0x0a, 0x15, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, - 0x72, 0x61, 0x70, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x56, 0x0a, 0x16, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x64, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x27, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0x3a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x31, 0x0a, 0x11, - 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, - 0x3a, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x2a, 0x0a, 0x12, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, - 0x0a, 0x12, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2b, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x16, - 0x0a, 0x14, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x46, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x4a, 0x0a, 0x16, - 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x5e, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x22, 0x5e, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x19, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, - 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x47, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x22, 0x67, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x15, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x22, 0x4b, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x19, - 0x0a, 0x17, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x0a, 0x15, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x7a, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x45, 0x0a, 0x16, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x22, 0x7a, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3e, - 0x0a, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x45, - 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x4a, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, - 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, - 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x2e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, - 0x22, 0x6b, 0x0a, 0x13, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x69, - 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x36, 0x0a, - 0x14, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, - 0x04, 0x72, 0x75, 0x6e, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x10, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1e, 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x22, - 0xd8, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, - 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x30, 0x0a, 0x10, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, - 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x22, 0x6c, 0x0a, 0x0f, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x10, 0x52, 0x65, - 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, - 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x22, 0x83, 0x01, 0x0a, - 0x10, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x75, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x41, 0x6c, 0x6c, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x2b, 0x0a, 0x15, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, - 0x52, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x22, 0x70, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, - 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, - 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, - 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x52, 0x75, 0x6e, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x22, 0x7e, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x67, 0x6f, 0x66, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, + 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x64, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x71, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x64, 0x65, 0x76, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x65, 0x76, 0x4d, 0x6f, 0x64, 0x65, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6d, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6d, 0x76, 0x65, 0x72, 0x22, 0x70, 0x0a, 0x13, 0x52, + 0x65, 0x70, 0x61, 0x69, 0x72, 0x4f, 0x72, 0x70, 0x68, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3f, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x22, 0x97, - 0x01, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, - 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, - 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x82, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, - 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, - 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6c, - 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6c, - 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0x85, 0x01, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1b, - 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, - 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x74, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x42, 0x0a, 0x14, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x22, - 0xf2, 0x01, 0x0a, 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x09, 0x76, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x18, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, - 0x0a, 0x17, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, - 0x18, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, - 0x0a, 0x15, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, 0x22, 0x4b, 0x0a, 0x25, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x57, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, - 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x18, 0x0a, - 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5b, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, - 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x22, 0x9e, 0x02, 0x0a, 0x18, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1b, 0x0a, 0x19, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x30, 0x0a, 0x1a, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a, 0x1b, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, - 0x0a, 0x18, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1b, - 0x0a, 0x19, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x27, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x70, 0x61, 0x73, 0x73, 0x22, 0x4e, 0x0a, 0x28, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, - 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa8, 0x03, 0x0a, 0x14, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, - 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x49, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x74, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x14, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x12, 0x45, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3c, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, - 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x4b, 0x49, - 0x50, 0x50, 0x45, 0x44, 0x10, 0x03, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6f, 0x0a, 0x13, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, - 0x0a, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x22, 0x92, 0x02, - 0x0a, 0x17, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, - 0x16, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x1a, 0x0a, 0x18, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, - 0x01, 0x0a, 0x19, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, - 0x12, 0x34, 0x0a, 0x16, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x14, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, - 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x19, - 0x0a, 0x17, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x0a, 0x1b, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x16, 0x0a, + 0x14, 0x52, 0x65, 0x70, 0x61, 0x69, 0x72, 0x4f, 0x72, 0x70, 0x68, 0x61, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x32, 0x0a, 0x1a, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 0x02, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x12, 0x43, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, + 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2f, 0x0a, + 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x4d, 0x45, 0x4e, 0x54, + 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x22, 0x53, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x17, 0x0a, 0x15, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x56, 0x0a, 0x16, + 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x27, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3a, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x26, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x31, 0x0a, 0x11, 0x4c, 0x69, 0x73, + 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x12, + 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x2a, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x12, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, + 0x0a, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x44, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x22, 0x45, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x4a, 0x0a, 0x16, 0x4c, 0x69, 0x73, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x5e, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2e, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x22, 0x5e, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x19, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x16, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x36, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x45, 0x0a, - 0x11, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x6f, - 0x6c, 0x6c, 0x6f, 0x77, 0x22, 0x38, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x70, - 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x61, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0x42, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x67, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x22, 0x4e, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x70, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, + 0x22, 0x4b, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x19, 0x0a, + 0x17, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x0a, 0x15, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, + 0x01, 0x0a, 0x1d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x22, 0x4d, 0x0a, 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x22, 0x7a, 0x0a, 0x15, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x3d, 0x0a, 0x16, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x15, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x78, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x19, 0x47, + 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8e, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0x7b, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, + 0x0b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x22, 0x6a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x22, 0x35, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x60, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x1b, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x04, 0x6b, - 0x65, 0x79, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x18, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x7b, 0x0a, 0x19, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x25, 0x0a, 0x0e, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x65, 0x76, 0x69, 0x63, 0x74, 0x65, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x76, 0x69, 0x63, - 0x74, 0x65, 0x64, 0x22, 0x73, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4a, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x63, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x2e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1c, 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x22, + 0x6b, 0x0a, 0x13, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x36, 0x0a, 0x14, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x04, + 0x72, 0x75, 0x6e, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x10, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, + 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x22, 0xd8, + 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x30, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, - 0x72, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, - 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, - 0x6e, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, - 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, - 0x65, 0x79, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xb2, 0x01, 0x0a, 0x13, 0x50, 0x75, 0x74, - 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x30, 0x0a, 0x10, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, + 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x22, 0x6c, 0x0a, 0x0f, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x10, 0x52, 0x65, 0x74, + 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, + 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x22, 0x83, 0x01, 0x0a, 0x10, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x2c, 0x0a, - 0x14, 0x50, 0x75, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x16, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x75, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x41, 0x6c, 0x6c, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x2b, 0x0a, 0x15, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, + 0x04, 0x72, 0x75, 0x6e, 0x73, 0x22, 0x70, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, + 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x75, 0x6e, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x22, 0x7e, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3f, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x22, 0x97, 0x01, + 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, - 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x97, - 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x82, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, + 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, + 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x69, + 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6c, 0x69, + 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0x85, 0x01, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1b, 0x0a, + 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x4c, 0x6f, + 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x0a, 0x11, 0x47, 0x65, + 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x74, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x42, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x52, 0x08, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x22, 0xf2, + 0x01, 0x0a, 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x09, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x18, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x0a, + 0x17, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, 0x18, + 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x0a, + 0x15, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, 0x22, 0x4b, 0x0a, 0x25, 0x47, 0x65, + 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, + 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x57, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x18, 0x0a, 0x16, + 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5b, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, + 0x73, 0x6b, 0x73, 0x22, 0x9e, 0x02, 0x0a, 0x18, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1b, 0x0a, 0x19, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x30, 0x0a, 0x1a, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a, 0x1b, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, + 0x18, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1b, 0x0a, + 0x19, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x27, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x73, 0x73, 0x22, 0x4e, 0x0a, 0x28, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa8, 0x03, 0x0a, 0x14, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x21, 0x0a, + 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, + 0x64, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x45, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3c, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x4b, 0x49, 0x50, + 0x50, 0x45, 0x44, 0x10, 0x03, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6f, 0x0a, 0x13, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x22, 0x92, 0x02, 0x0a, + 0x17, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x16, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x1a, 0x0a, 0x18, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, + 0x0a, 0x19, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x66, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x22, 0x60, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, - 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, - 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x49, 0x64, 0x22, 0x48, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x29, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, - 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xa0, 0x01, 0x0a, - 0x18, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, + 0x34, 0x0a, 0x16, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x14, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x68, + 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x19, 0x0a, + 0x17, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x0a, 0x1b, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x36, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x11, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, + 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x6f, 0x6c, + 0x6c, 0x6f, 0x77, 0x22, 0x38, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x70, 0x0a, + 0x18, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, - 0x31, 0x0a, 0x19, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x22, 0x73, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, + 0x35, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x60, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x04, 0x6b, 0x65, + 0x79, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x18, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x7b, 0x0a, 0x19, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x65, 0x76, 0x69, 0x63, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x76, 0x69, 0x63, 0x74, + 0x65, 0x64, 0x22, 0x73, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x6c, - 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x64, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x22, 0x1a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x46, 0x0a, 0x19, - 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x6b, 0x65, 0x79, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x04, - 0x6b, 0x65, 0x79, 0x73, 0x22, 0x5a, 0x0a, 0x16, 0x50, 0x75, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, - 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x22, 0x2f, 0x0a, 0x17, 0x50, 0x75, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, + 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, + 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x30, 0x0a, 0x14, + 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x72, + 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, + 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, + 0x49, 0x64, 0x22, 0x43, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, + 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, + 0x79, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xb2, 0x01, 0x0a, 0x13, 0x50, 0x75, 0x74, 0x52, + 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x14, + 0x50, 0x75, 0x74, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x16, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x97, 0x01, + 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x66, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, + 0x60, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, + 0x64, 0x22, 0x48, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x29, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x18, + 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x31, + 0x0a, 0x19, 0x50, 0x75, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x22, 0x2d, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, - 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, - 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x69, - 0x6e, 0x74, 0x6a, 0x65, 0x64, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x72, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x73, 0x22, 0x73, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x64, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, + 0x1a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x46, 0x0a, 0x19, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x04, 0x6b, + 0x65, 0x79, 0x73, 0x22, 0x5a, 0x0a, 0x16, 0x50, 0x75, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, + 0x2f, 0x0a, 0x17, 0x50, 0x75, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x22, 0x2d, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, + 0x1c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a, + 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x69, 0x6e, + 0x74, 0x6a, 0x65, 0x64, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x72, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8288,7 +8956,7 @@ func file_gofer_transport_proto_rawDescGZIP() []byte { } var file_gofer_transport_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_gofer_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 150) +var file_gofer_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 160) var file_gofer_transport_proto_goTypes = []interface{}{ (CreateTokenRequest_Kind)(0), // 0: proto.CreateTokenRequest.Kind (TriggerWatchResponse_Result)(0), // 1: proto.TriggerWatchResponse.Result @@ -8330,176 +8998,191 @@ var file_gofer_transport_proto_goTypes = []interface{}{ (*DisablePipelineResponse)(nil), // 37: proto.DisablePipelineResponse (*EnablePipelineRequest)(nil), // 38: proto.EnablePipelineRequest (*EnablePipelineResponse)(nil), // 39: proto.EnablePipelineResponse - (*CreatePipelineRequest)(nil), // 40: proto.CreatePipelineRequest - (*CreatePipelineResponse)(nil), // 41: proto.CreatePipelineResponse - (*UpdatePipelineRequest)(nil), // 42: proto.UpdatePipelineRequest - (*UpdatePipelineResponse)(nil), // 43: proto.UpdatePipelineResponse + (*RegisterPipelineConfigRequest)(nil), // 40: proto.RegisterPipelineConfigRequest + (*RegisterPipelineConfigResponse)(nil), // 41: proto.RegisterPipelineConfigResponse + (*DeployPipelineRequest)(nil), // 42: proto.DeployPipelineRequest + (*DeployPipelineResponse)(nil), // 43: proto.DeployPipelineResponse (*DeletePipelineRequest)(nil), // 44: proto.DeletePipelineRequest (*DeletePipelineResponse)(nil), // 45: proto.DeletePipelineResponse - (*GetRunRequest)(nil), // 46: proto.GetRunRequest - (*GetRunResponse)(nil), // 47: proto.GetRunResponse - (*BatchGetRunsRequest)(nil), // 48: proto.BatchGetRunsRequest - (*BatchGetRunsResponse)(nil), // 49: proto.BatchGetRunsResponse - (*ListRunsRequest)(nil), // 50: proto.ListRunsRequest - (*ListRunsResponse)(nil), // 51: proto.ListRunsResponse - (*StartRunRequest)(nil), // 52: proto.StartRunRequest - (*StartRunResponse)(nil), // 53: proto.StartRunResponse - (*RetryRunRequest)(nil), // 54: proto.RetryRunRequest - (*RetryRunResponse)(nil), // 55: proto.RetryRunResponse - (*CancelRunRequest)(nil), // 56: proto.CancelRunRequest - (*CancelRunResponse)(nil), // 57: proto.CancelRunResponse - (*CancelAllRunsRequest)(nil), // 58: proto.CancelAllRunsRequest - (*CancelAllRunsResponse)(nil), // 59: proto.CancelAllRunsResponse - (*ListTaskRunsRequest)(nil), // 60: proto.ListTaskRunsRequest - (*ListTaskRunsResponse)(nil), // 61: proto.ListTaskRunsResponse - (*GetTaskRunRequest)(nil), // 62: proto.GetTaskRunRequest - (*GetTaskRunResponse)(nil), // 63: proto.GetTaskRunResponse - (*CancelTaskRunRequest)(nil), // 64: proto.CancelTaskRunRequest - (*CancelTaskRunResponse)(nil), // 65: proto.CancelTaskRunResponse - (*GetTaskRunLogsRequest)(nil), // 66: proto.GetTaskRunLogsRequest - (*GetTaskRunLogsResponse)(nil), // 67: proto.GetTaskRunLogsResponse - (*DeleteTaskRunLogsRequest)(nil), // 68: proto.DeleteTaskRunLogsRequest - (*DeleteTaskRunLogsResponse)(nil), // 69: proto.DeleteTaskRunLogsResponse - (*GetTriggerRequest)(nil), // 70: proto.GetTriggerRequest - (*GetTriggerResponse)(nil), // 71: proto.GetTriggerResponse - (*ListTriggersRequest)(nil), // 72: proto.ListTriggersRequest - (*ListTriggersResponse)(nil), // 73: proto.ListTriggersResponse - (*InstallTriggerRequest)(nil), // 74: proto.InstallTriggerRequest - (*InstallTriggerResponse)(nil), // 75: proto.InstallTriggerResponse - (*UninstallTriggerRequest)(nil), // 76: proto.UninstallTriggerRequest - (*UninstallTriggerResponse)(nil), // 77: proto.UninstallTriggerResponse - (*EnableTriggerRequest)(nil), // 78: proto.EnableTriggerRequest - (*EnableTriggerResponse)(nil), // 79: proto.EnableTriggerResponse - (*DisableTriggerRequest)(nil), // 80: proto.DisableTriggerRequest - (*DisableTriggerResponse)(nil), // 81: proto.DisableTriggerResponse - (*GetTriggerInstallInstructionsRequest)(nil), // 82: proto.GetTriggerInstallInstructionsRequest - (*GetTriggerInstallInstructionsResponse)(nil), // 83: proto.GetTriggerInstallInstructionsResponse - (*GetCommonTaskRequest)(nil), // 84: proto.GetCommonTaskRequest - (*GetCommonTaskResponse)(nil), // 85: proto.GetCommonTaskResponse - (*ListCommonTasksRequest)(nil), // 86: proto.ListCommonTasksRequest - (*ListCommonTasksResponse)(nil), // 87: proto.ListCommonTasksResponse - (*InstallCommonTaskRequest)(nil), // 88: proto.InstallCommonTaskRequest - (*InstallCommonTaskResponse)(nil), // 89: proto.InstallCommonTaskResponse - (*UninstallCommonTaskRequest)(nil), // 90: proto.UninstallCommonTaskRequest - (*UninstallCommonTaskResponse)(nil), // 91: proto.UninstallCommonTaskResponse - (*EnableCommonTaskRequest)(nil), // 92: proto.EnableCommonTaskRequest - (*EnableCommonTaskResponse)(nil), // 93: proto.EnableCommonTaskResponse - (*DisableCommonTaskRequest)(nil), // 94: proto.DisableCommonTaskRequest - (*DisableCommonTaskResponse)(nil), // 95: proto.DisableCommonTaskResponse - (*GetCommonTaskInstallInstructionsRequest)(nil), // 96: proto.GetCommonTaskInstallInstructionsRequest - (*GetCommonTaskInstallInstructionsResponse)(nil), // 97: proto.GetCommonTaskInstallInstructionsResponse - (*TriggerWatchRequest)(nil), // 98: proto.TriggerWatchRequest - (*TriggerWatchResponse)(nil), // 99: proto.TriggerWatchResponse - (*TriggerInfoRequest)(nil), // 100: proto.TriggerInfoRequest - (*TriggerInfoResponse)(nil), // 101: proto.TriggerInfoResponse - (*TriggerSubscribeRequest)(nil), // 102: proto.TriggerSubscribeRequest - (*TriggerSubscribeResponse)(nil), // 103: proto.TriggerSubscribeResponse - (*TriggerUnsubscribeRequest)(nil), // 104: proto.TriggerUnsubscribeRequest - (*TriggerUnsubscribeResponse)(nil), // 105: proto.TriggerUnsubscribeResponse - (*TriggerShutdownRequest)(nil), // 106: proto.TriggerShutdownRequest - (*TriggerShutdownResponse)(nil), // 107: proto.TriggerShutdownResponse - (*TriggerExternalEventRequest)(nil), // 108: proto.TriggerExternalEventRequest - (*TriggerExternalEventResponse)(nil), // 109: proto.TriggerExternalEventResponse - (*GetEventRequest)(nil), // 110: proto.GetEventRequest - (*GetEventResponse)(nil), // 111: proto.GetEventResponse - (*ListEventsRequest)(nil), // 112: proto.ListEventsRequest - (*ListEventsResponse)(nil), // 113: proto.ListEventsResponse - (*GetPipelineObjectRequest)(nil), // 114: proto.GetPipelineObjectRequest - (*GetPipelineObjectResponse)(nil), // 115: proto.GetPipelineObjectResponse - (*ListPipelineObjectsRequest)(nil), // 116: proto.ListPipelineObjectsRequest - (*ListPipelineObjectsResponse)(nil), // 117: proto.ListPipelineObjectsResponse - (*PutPipelineObjectRequest)(nil), // 118: proto.PutPipelineObjectRequest - (*PutPipelineObjectResponse)(nil), // 119: proto.PutPipelineObjectResponse - (*DeletePipelineObjectRequest)(nil), // 120: proto.DeletePipelineObjectRequest - (*DeletePipelineObjectResponse)(nil), // 121: proto.DeletePipelineObjectResponse - (*GetRunObjectRequest)(nil), // 122: proto.GetRunObjectRequest - (*GetRunObjectResponse)(nil), // 123: proto.GetRunObjectResponse - (*ListRunObjectsRequest)(nil), // 124: proto.ListRunObjectsRequest - (*ListRunObjectsResponse)(nil), // 125: proto.ListRunObjectsResponse - (*PutRunObjectRequest)(nil), // 126: proto.PutRunObjectRequest - (*PutRunObjectResponse)(nil), // 127: proto.PutRunObjectResponse - (*DeleteRunObjectRequest)(nil), // 128: proto.DeleteRunObjectRequest - (*DeleteRunObjectResponse)(nil), // 129: proto.DeleteRunObjectResponse - (*GetPipelineSecretRequest)(nil), // 130: proto.GetPipelineSecretRequest - (*GetPipelineSecretResponse)(nil), // 131: proto.GetPipelineSecretResponse - (*ListPipelineSecretsRequest)(nil), // 132: proto.ListPipelineSecretsRequest - (*ListPipelineSecretsResponse)(nil), // 133: proto.ListPipelineSecretsResponse - (*PutPipelineSecretRequest)(nil), // 134: proto.PutPipelineSecretRequest - (*PutPipelineSecretResponse)(nil), // 135: proto.PutPipelineSecretResponse - (*DeletePipelineSecretRequest)(nil), // 136: proto.DeletePipelineSecretRequest - (*DeletePipelineSecretResponse)(nil), // 137: proto.DeletePipelineSecretResponse - (*GetGlobalSecretRequest)(nil), // 138: proto.GetGlobalSecretRequest - (*GetGlobalSecretResponse)(nil), // 139: proto.GetGlobalSecretResponse - (*ListGlobalSecretsRequest)(nil), // 140: proto.ListGlobalSecretsRequest - (*ListGlobalSecretsResponse)(nil), // 141: proto.ListGlobalSecretsResponse - (*PutGlobalSecretRequest)(nil), // 142: proto.PutGlobalSecretRequest - (*PutGlobalSecretResponse)(nil), // 143: proto.PutGlobalSecretResponse - (*DeleteGlobalSecretRequest)(nil), // 144: proto.DeleteGlobalSecretRequest - (*DeleteGlobalSecretResponse)(nil), // 145: proto.DeleteGlobalSecretResponse - nil, // 146: proto.CreateTokenRequest.MetadataEntry - nil, // 147: proto.StartRunRequest.VariablesEntry - nil, // 148: proto.InstallTriggerRequest.VariablesEntry - nil, // 149: proto.InstallCommonTaskRequest.VariablesEntry - nil, // 150: proto.TriggerWatchResponse.MetadataEntry - nil, // 151: proto.TriggerSubscribeRequest.ConfigEntry - (*Token)(nil), // 152: proto.Token - (*Namespace)(nil), // 153: proto.Namespace - (*Pipeline)(nil), // 154: proto.Pipeline - (*PipelineConfig)(nil), // 155: proto.PipelineConfig - (*Run)(nil), // 156: proto.Run - (*TaskRun)(nil), // 157: proto.TaskRun - (*Trigger)(nil), // 158: proto.Trigger - (*CommonTaskRegistration)(nil), // 159: proto.CommonTaskRegistration - (*Event)(nil), // 160: proto.Event - (*ObjectStoreKey)(nil), // 161: proto.ObjectStoreKey - (*SecretStoreKey)(nil), // 162: proto.SecretStoreKey + (*GetPipelineConfigRequest)(nil), // 46: proto.GetPipelineConfigRequest + (*GetPipelineConfigResponse)(nil), // 47: proto.GetPipelineConfigResponse + (*ListPipelineConfigsRequest)(nil), // 48: proto.ListPipelineConfigsRequest + (*ListPipelineConfigsResponse)(nil), // 49: proto.ListPipelineConfigsResponse + (*DeletePipelineConfigRequest)(nil), // 50: proto.DeletePipelineConfigRequest + (*DeletePipelineConfigResponse)(nil), // 51: proto.DeletePipelineConfigResponse + (*ListDeploymentsRequest)(nil), // 52: proto.ListDeploymentsRequest + (*ListDeploymentsResponse)(nil), // 53: proto.ListDeploymentsResponse + (*GetDeploymentRequest)(nil), // 54: proto.GetDeploymentRequest + (*GetDeploymentResponse)(nil), // 55: proto.GetDeploymentResponse + (*GetRunRequest)(nil), // 56: proto.GetRunRequest + (*GetRunResponse)(nil), // 57: proto.GetRunResponse + (*BatchGetRunsRequest)(nil), // 58: proto.BatchGetRunsRequest + (*BatchGetRunsResponse)(nil), // 59: proto.BatchGetRunsResponse + (*ListRunsRequest)(nil), // 60: proto.ListRunsRequest + (*ListRunsResponse)(nil), // 61: proto.ListRunsResponse + (*StartRunRequest)(nil), // 62: proto.StartRunRequest + (*StartRunResponse)(nil), // 63: proto.StartRunResponse + (*RetryRunRequest)(nil), // 64: proto.RetryRunRequest + (*RetryRunResponse)(nil), // 65: proto.RetryRunResponse + (*CancelRunRequest)(nil), // 66: proto.CancelRunRequest + (*CancelRunResponse)(nil), // 67: proto.CancelRunResponse + (*CancelAllRunsRequest)(nil), // 68: proto.CancelAllRunsRequest + (*CancelAllRunsResponse)(nil), // 69: proto.CancelAllRunsResponse + (*ListTaskRunsRequest)(nil), // 70: proto.ListTaskRunsRequest + (*ListTaskRunsResponse)(nil), // 71: proto.ListTaskRunsResponse + (*GetTaskRunRequest)(nil), // 72: proto.GetTaskRunRequest + (*GetTaskRunResponse)(nil), // 73: proto.GetTaskRunResponse + (*CancelTaskRunRequest)(nil), // 74: proto.CancelTaskRunRequest + (*CancelTaskRunResponse)(nil), // 75: proto.CancelTaskRunResponse + (*GetTaskRunLogsRequest)(nil), // 76: proto.GetTaskRunLogsRequest + (*GetTaskRunLogsResponse)(nil), // 77: proto.GetTaskRunLogsResponse + (*DeleteTaskRunLogsRequest)(nil), // 78: proto.DeleteTaskRunLogsRequest + (*DeleteTaskRunLogsResponse)(nil), // 79: proto.DeleteTaskRunLogsResponse + (*GetTriggerRequest)(nil), // 80: proto.GetTriggerRequest + (*GetTriggerResponse)(nil), // 81: proto.GetTriggerResponse + (*ListTriggersRequest)(nil), // 82: proto.ListTriggersRequest + (*ListTriggersResponse)(nil), // 83: proto.ListTriggersResponse + (*InstallTriggerRequest)(nil), // 84: proto.InstallTriggerRequest + (*InstallTriggerResponse)(nil), // 85: proto.InstallTriggerResponse + (*UninstallTriggerRequest)(nil), // 86: proto.UninstallTriggerRequest + (*UninstallTriggerResponse)(nil), // 87: proto.UninstallTriggerResponse + (*EnableTriggerRequest)(nil), // 88: proto.EnableTriggerRequest + (*EnableTriggerResponse)(nil), // 89: proto.EnableTriggerResponse + (*DisableTriggerRequest)(nil), // 90: proto.DisableTriggerRequest + (*DisableTriggerResponse)(nil), // 91: proto.DisableTriggerResponse + (*GetTriggerInstallInstructionsRequest)(nil), // 92: proto.GetTriggerInstallInstructionsRequest + (*GetTriggerInstallInstructionsResponse)(nil), // 93: proto.GetTriggerInstallInstructionsResponse + (*GetCommonTaskRequest)(nil), // 94: proto.GetCommonTaskRequest + (*GetCommonTaskResponse)(nil), // 95: proto.GetCommonTaskResponse + (*ListCommonTasksRequest)(nil), // 96: proto.ListCommonTasksRequest + (*ListCommonTasksResponse)(nil), // 97: proto.ListCommonTasksResponse + (*InstallCommonTaskRequest)(nil), // 98: proto.InstallCommonTaskRequest + (*InstallCommonTaskResponse)(nil), // 99: proto.InstallCommonTaskResponse + (*UninstallCommonTaskRequest)(nil), // 100: proto.UninstallCommonTaskRequest + (*UninstallCommonTaskResponse)(nil), // 101: proto.UninstallCommonTaskResponse + (*EnableCommonTaskRequest)(nil), // 102: proto.EnableCommonTaskRequest + (*EnableCommonTaskResponse)(nil), // 103: proto.EnableCommonTaskResponse + (*DisableCommonTaskRequest)(nil), // 104: proto.DisableCommonTaskRequest + (*DisableCommonTaskResponse)(nil), // 105: proto.DisableCommonTaskResponse + (*GetCommonTaskInstallInstructionsRequest)(nil), // 106: proto.GetCommonTaskInstallInstructionsRequest + (*GetCommonTaskInstallInstructionsResponse)(nil), // 107: proto.GetCommonTaskInstallInstructionsResponse + (*TriggerWatchRequest)(nil), // 108: proto.TriggerWatchRequest + (*TriggerWatchResponse)(nil), // 109: proto.TriggerWatchResponse + (*TriggerInfoRequest)(nil), // 110: proto.TriggerInfoRequest + (*TriggerInfoResponse)(nil), // 111: proto.TriggerInfoResponse + (*TriggerSubscribeRequest)(nil), // 112: proto.TriggerSubscribeRequest + (*TriggerSubscribeResponse)(nil), // 113: proto.TriggerSubscribeResponse + (*TriggerUnsubscribeRequest)(nil), // 114: proto.TriggerUnsubscribeRequest + (*TriggerUnsubscribeResponse)(nil), // 115: proto.TriggerUnsubscribeResponse + (*TriggerShutdownRequest)(nil), // 116: proto.TriggerShutdownRequest + (*TriggerShutdownResponse)(nil), // 117: proto.TriggerShutdownResponse + (*TriggerExternalEventRequest)(nil), // 118: proto.TriggerExternalEventRequest + (*TriggerExternalEventResponse)(nil), // 119: proto.TriggerExternalEventResponse + (*GetEventRequest)(nil), // 120: proto.GetEventRequest + (*GetEventResponse)(nil), // 121: proto.GetEventResponse + (*ListEventsRequest)(nil), // 122: proto.ListEventsRequest + (*ListEventsResponse)(nil), // 123: proto.ListEventsResponse + (*GetPipelineObjectRequest)(nil), // 124: proto.GetPipelineObjectRequest + (*GetPipelineObjectResponse)(nil), // 125: proto.GetPipelineObjectResponse + (*ListPipelineObjectsRequest)(nil), // 126: proto.ListPipelineObjectsRequest + (*ListPipelineObjectsResponse)(nil), // 127: proto.ListPipelineObjectsResponse + (*PutPipelineObjectRequest)(nil), // 128: proto.PutPipelineObjectRequest + (*PutPipelineObjectResponse)(nil), // 129: proto.PutPipelineObjectResponse + (*DeletePipelineObjectRequest)(nil), // 130: proto.DeletePipelineObjectRequest + (*DeletePipelineObjectResponse)(nil), // 131: proto.DeletePipelineObjectResponse + (*GetRunObjectRequest)(nil), // 132: proto.GetRunObjectRequest + (*GetRunObjectResponse)(nil), // 133: proto.GetRunObjectResponse + (*ListRunObjectsRequest)(nil), // 134: proto.ListRunObjectsRequest + (*ListRunObjectsResponse)(nil), // 135: proto.ListRunObjectsResponse + (*PutRunObjectRequest)(nil), // 136: proto.PutRunObjectRequest + (*PutRunObjectResponse)(nil), // 137: proto.PutRunObjectResponse + (*DeleteRunObjectRequest)(nil), // 138: proto.DeleteRunObjectRequest + (*DeleteRunObjectResponse)(nil), // 139: proto.DeleteRunObjectResponse + (*GetPipelineSecretRequest)(nil), // 140: proto.GetPipelineSecretRequest + (*GetPipelineSecretResponse)(nil), // 141: proto.GetPipelineSecretResponse + (*ListPipelineSecretsRequest)(nil), // 142: proto.ListPipelineSecretsRequest + (*ListPipelineSecretsResponse)(nil), // 143: proto.ListPipelineSecretsResponse + (*PutPipelineSecretRequest)(nil), // 144: proto.PutPipelineSecretRequest + (*PutPipelineSecretResponse)(nil), // 145: proto.PutPipelineSecretResponse + (*DeletePipelineSecretRequest)(nil), // 146: proto.DeletePipelineSecretRequest + (*DeletePipelineSecretResponse)(nil), // 147: proto.DeletePipelineSecretResponse + (*GetGlobalSecretRequest)(nil), // 148: proto.GetGlobalSecretRequest + (*GetGlobalSecretResponse)(nil), // 149: proto.GetGlobalSecretResponse + (*ListGlobalSecretsRequest)(nil), // 150: proto.ListGlobalSecretsRequest + (*ListGlobalSecretsResponse)(nil), // 151: proto.ListGlobalSecretsResponse + (*PutGlobalSecretRequest)(nil), // 152: proto.PutGlobalSecretRequest + (*PutGlobalSecretResponse)(nil), // 153: proto.PutGlobalSecretResponse + (*DeleteGlobalSecretRequest)(nil), // 154: proto.DeleteGlobalSecretRequest + (*DeleteGlobalSecretResponse)(nil), // 155: proto.DeleteGlobalSecretResponse + nil, // 156: proto.CreateTokenRequest.MetadataEntry + nil, // 157: proto.StartRunRequest.VariablesEntry + nil, // 158: proto.InstallTriggerRequest.VariablesEntry + nil, // 159: proto.InstallCommonTaskRequest.VariablesEntry + nil, // 160: proto.TriggerWatchResponse.MetadataEntry + nil, // 161: proto.TriggerSubscribeRequest.ConfigEntry + (*Token)(nil), // 162: proto.Token + (*Namespace)(nil), // 163: proto.Namespace + (*Pipeline)(nil), // 164: proto.Pipeline + (*PipelineMetadata)(nil), // 165: proto.PipelineMetadata + (*UserPipelineConfig)(nil), // 166: proto.UserPipelineConfig + (*PipelineConfig)(nil), // 167: proto.PipelineConfig + (*Deployment)(nil), // 168: proto.Deployment + (*Run)(nil), // 169: proto.Run + (*TaskRun)(nil), // 170: proto.TaskRun + (*Trigger)(nil), // 171: proto.Trigger + (*CommonTaskRegistration)(nil), // 172: proto.CommonTaskRegistration + (*Event)(nil), // 173: proto.Event + (*ObjectStoreKey)(nil), // 174: proto.ObjectStoreKey + (*SecretStoreKey)(nil), // 175: proto.SecretStoreKey } var file_gofer_transport_proto_depIdxs = []int32{ 0, // 0: proto.CreateTokenRequest.kind:type_name -> proto.CreateTokenRequest.Kind - 146, // 1: proto.CreateTokenRequest.metadata:type_name -> proto.CreateTokenRequest.MetadataEntry - 152, // 2: proto.CreateTokenResponse.details:type_name -> proto.Token - 152, // 3: proto.BootstrapTokenResponse.details:type_name -> proto.Token - 152, // 4: proto.GetTokenResponse.details:type_name -> proto.Token - 152, // 5: proto.ListTokensResponse.tokens:type_name -> proto.Token - 153, // 6: proto.GetNamespaceResponse.namespace:type_name -> proto.Namespace - 153, // 7: proto.ListNamespacesResponse.namespaces:type_name -> proto.Namespace - 153, // 8: proto.CreateNamespaceResponse.namespace:type_name -> proto.Namespace - 154, // 9: proto.GetPipelineResponse.pipeline:type_name -> proto.Pipeline - 154, // 10: proto.ListPipelinesResponse.pipelines:type_name -> proto.Pipeline - 155, // 11: proto.CreatePipelineRequest.pipeline_config:type_name -> proto.PipelineConfig - 154, // 12: proto.CreatePipelineResponse.pipeline:type_name -> proto.Pipeline - 155, // 13: proto.UpdatePipelineRequest.pipeline_config:type_name -> proto.PipelineConfig - 154, // 14: proto.UpdatePipelineResponse.pipeline:type_name -> proto.Pipeline - 156, // 15: proto.GetRunResponse.run:type_name -> proto.Run - 156, // 16: proto.BatchGetRunsResponse.runs:type_name -> proto.Run - 156, // 17: proto.ListRunsResponse.runs:type_name -> proto.Run - 147, // 18: proto.StartRunRequest.variables:type_name -> proto.StartRunRequest.VariablesEntry - 156, // 19: proto.StartRunResponse.run:type_name -> proto.Run - 156, // 20: proto.RetryRunResponse.run:type_name -> proto.Run - 157, // 21: proto.ListTaskRunsResponse.task_runs:type_name -> proto.TaskRun - 157, // 22: proto.GetTaskRunResponse.task_run:type_name -> proto.TaskRun - 158, // 23: proto.GetTriggerResponse.trigger:type_name -> proto.Trigger - 158, // 24: proto.ListTriggersResponse.triggers:type_name -> proto.Trigger - 148, // 25: proto.InstallTriggerRequest.variables:type_name -> proto.InstallTriggerRequest.VariablesEntry - 159, // 26: proto.GetCommonTaskResponse.common_task:type_name -> proto.CommonTaskRegistration - 159, // 27: proto.ListCommonTasksResponse.common_tasks:type_name -> proto.CommonTaskRegistration - 149, // 28: proto.InstallCommonTaskRequest.variables:type_name -> proto.InstallCommonTaskRequest.VariablesEntry - 1, // 29: proto.TriggerWatchResponse.result:type_name -> proto.TriggerWatchResponse.Result - 150, // 30: proto.TriggerWatchResponse.metadata:type_name -> proto.TriggerWatchResponse.MetadataEntry - 151, // 31: proto.TriggerSubscribeRequest.config:type_name -> proto.TriggerSubscribeRequest.ConfigEntry - 160, // 32: proto.GetEventResponse.event:type_name -> proto.Event - 160, // 33: proto.ListEventsResponse.event:type_name -> proto.Event - 161, // 34: proto.ListPipelineObjectsResponse.keys:type_name -> proto.ObjectStoreKey - 161, // 35: proto.ListRunObjectsResponse.keys:type_name -> proto.ObjectStoreKey - 162, // 36: proto.GetPipelineSecretResponse.metadata:type_name -> proto.SecretStoreKey - 162, // 37: proto.ListPipelineSecretsResponse.keys:type_name -> proto.SecretStoreKey - 162, // 38: proto.GetGlobalSecretResponse.metadata:type_name -> proto.SecretStoreKey - 162, // 39: proto.ListGlobalSecretsResponse.keys:type_name -> proto.SecretStoreKey - 40, // [40:40] is the sub-list for method output_type - 40, // [40:40] is the sub-list for method input_type - 40, // [40:40] is the sub-list for extension type_name - 40, // [40:40] is the sub-list for extension extendee - 0, // [0:40] is the sub-list for field type_name + 156, // 1: proto.CreateTokenRequest.metadata:type_name -> proto.CreateTokenRequest.MetadataEntry + 162, // 2: proto.CreateTokenResponse.details:type_name -> proto.Token + 162, // 3: proto.BootstrapTokenResponse.details:type_name -> proto.Token + 162, // 4: proto.GetTokenResponse.details:type_name -> proto.Token + 162, // 5: proto.ListTokensResponse.tokens:type_name -> proto.Token + 163, // 6: proto.GetNamespaceResponse.namespace:type_name -> proto.Namespace + 163, // 7: proto.ListNamespacesResponse.namespaces:type_name -> proto.Namespace + 163, // 8: proto.CreateNamespaceResponse.namespace:type_name -> proto.Namespace + 164, // 9: proto.GetPipelineResponse.pipeline:type_name -> proto.Pipeline + 165, // 10: proto.ListPipelinesResponse.pipelines:type_name -> proto.PipelineMetadata + 166, // 11: proto.RegisterPipelineConfigRequest.pipeline_config:type_name -> proto.UserPipelineConfig + 164, // 12: proto.RegisterPipelineConfigResponse.pipeline:type_name -> proto.Pipeline + 167, // 13: proto.GetPipelineConfigResponse.config:type_name -> proto.PipelineConfig + 167, // 14: proto.ListPipelineConfigsResponse.configs:type_name -> proto.PipelineConfig + 168, // 15: proto.ListDeploymentsResponse.Deployments:type_name -> proto.Deployment + 168, // 16: proto.GetDeploymentResponse.deployment:type_name -> proto.Deployment + 169, // 17: proto.GetRunResponse.run:type_name -> proto.Run + 169, // 18: proto.BatchGetRunsResponse.runs:type_name -> proto.Run + 169, // 19: proto.ListRunsResponse.runs:type_name -> proto.Run + 157, // 20: proto.StartRunRequest.variables:type_name -> proto.StartRunRequest.VariablesEntry + 169, // 21: proto.StartRunResponse.run:type_name -> proto.Run + 169, // 22: proto.RetryRunResponse.run:type_name -> proto.Run + 170, // 23: proto.ListTaskRunsResponse.task_runs:type_name -> proto.TaskRun + 170, // 24: proto.GetTaskRunResponse.task_run:type_name -> proto.TaskRun + 171, // 25: proto.GetTriggerResponse.trigger:type_name -> proto.Trigger + 171, // 26: proto.ListTriggersResponse.triggers:type_name -> proto.Trigger + 158, // 27: proto.InstallTriggerRequest.variables:type_name -> proto.InstallTriggerRequest.VariablesEntry + 172, // 28: proto.GetCommonTaskResponse.common_task:type_name -> proto.CommonTaskRegistration + 172, // 29: proto.ListCommonTasksResponse.common_tasks:type_name -> proto.CommonTaskRegistration + 159, // 30: proto.InstallCommonTaskRequest.variables:type_name -> proto.InstallCommonTaskRequest.VariablesEntry + 1, // 31: proto.TriggerWatchResponse.result:type_name -> proto.TriggerWatchResponse.Result + 160, // 32: proto.TriggerWatchResponse.metadata:type_name -> proto.TriggerWatchResponse.MetadataEntry + 161, // 33: proto.TriggerSubscribeRequest.config:type_name -> proto.TriggerSubscribeRequest.ConfigEntry + 173, // 34: proto.GetEventResponse.event:type_name -> proto.Event + 173, // 35: proto.ListEventsResponse.event:type_name -> proto.Event + 174, // 36: proto.ListPipelineObjectsResponse.keys:type_name -> proto.ObjectStoreKey + 174, // 37: proto.ListRunObjectsResponse.keys:type_name -> proto.ObjectStoreKey + 175, // 38: proto.GetPipelineSecretResponse.metadata:type_name -> proto.SecretStoreKey + 175, // 39: proto.ListPipelineSecretsResponse.keys:type_name -> proto.SecretStoreKey + 175, // 40: proto.GetGlobalSecretResponse.metadata:type_name -> proto.SecretStoreKey + 175, // 41: proto.ListGlobalSecretsResponse.keys:type_name -> proto.SecretStoreKey + 42, // [42:42] is the sub-list for method output_type + 42, // [42:42] is the sub-list for method input_type + 42, // [42:42] is the sub-list for extension type_name + 42, // [42:42] is the sub-list for extension extendee + 0, // [0:42] is the sub-list for field type_name } func init() { file_gofer_transport_proto_init() } @@ -8507,7 +9190,8 @@ func file_gofer_transport_proto_init() { if File_gofer_transport_proto != nil { return } - file_gofer_message_proto_init() + file_gofer_message_api_proto_init() + file_gofer_message_sdk_proto_init() if !protoimpl.UnsafeEnabled { file_gofer_transport_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSystemInfoRequest); i { @@ -8785,8 +9469,128 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNamespacesResponse); i { + file_gofer_transport_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNamespacesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_transport_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_transport_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_transport_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_transport_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_transport_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_transport_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_transport_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPipelineRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_transport_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPipelineResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_transport_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPipelinesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gofer_transport_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPipelinesResponse); i { case 0: return &v.state case 1: @@ -8797,8 +9601,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateNamespaceRequest); i { + file_gofer_transport_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisablePipelineRequest); i { case 0: return &v.state case 1: @@ -8809,8 +9613,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateNamespaceResponse); i { + file_gofer_transport_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisablePipelineResponse); i { case 0: return &v.state case 1: @@ -8821,8 +9625,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateNamespaceRequest); i { + file_gofer_transport_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnablePipelineRequest); i { case 0: return &v.state case 1: @@ -8833,8 +9637,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateNamespaceResponse); i { + file_gofer_transport_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnablePipelineResponse); i { case 0: return &v.state case 1: @@ -8845,8 +9649,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteNamespaceRequest); i { + file_gofer_transport_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterPipelineConfigRequest); i { case 0: return &v.state case 1: @@ -8857,8 +9661,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteNamespaceResponse); i { + file_gofer_transport_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterPipelineConfigResponse); i { case 0: return &v.state case 1: @@ -8869,8 +9673,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPipelineRequest); i { + file_gofer_transport_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployPipelineRequest); i { case 0: return &v.state case 1: @@ -8881,8 +9685,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPipelineResponse); i { + file_gofer_transport_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployPipelineResponse); i { case 0: return &v.state case 1: @@ -8893,8 +9697,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPipelinesRequest); i { + file_gofer_transport_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletePipelineRequest); i { case 0: return &v.state case 1: @@ -8905,8 +9709,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPipelinesResponse); i { + file_gofer_transport_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletePipelineResponse); i { case 0: return &v.state case 1: @@ -8917,8 +9721,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisablePipelineRequest); i { + file_gofer_transport_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPipelineConfigRequest); i { case 0: return &v.state case 1: @@ -8929,8 +9733,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisablePipelineResponse); i { + file_gofer_transport_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPipelineConfigResponse); i { case 0: return &v.state case 1: @@ -8941,8 +9745,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnablePipelineRequest); i { + file_gofer_transport_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPipelineConfigsRequest); i { case 0: return &v.state case 1: @@ -8953,8 +9757,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnablePipelineResponse); i { + file_gofer_transport_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPipelineConfigsResponse); i { case 0: return &v.state case 1: @@ -8965,8 +9769,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePipelineRequest); i { + file_gofer_transport_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletePipelineConfigRequest); i { case 0: return &v.state case 1: @@ -8977,8 +9781,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePipelineResponse); i { + file_gofer_transport_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletePipelineConfigResponse); i { case 0: return &v.state case 1: @@ -8989,8 +9793,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePipelineRequest); i { + file_gofer_transport_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDeploymentsRequest); i { case 0: return &v.state case 1: @@ -9001,8 +9805,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePipelineResponse); i { + file_gofer_transport_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDeploymentsResponse); i { case 0: return &v.state case 1: @@ -9013,8 +9817,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePipelineRequest); i { + file_gofer_transport_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDeploymentRequest); i { case 0: return &v.state case 1: @@ -9025,8 +9829,8 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePipelineResponse); i { + file_gofer_transport_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDeploymentResponse); i { case 0: return &v.state case 1: @@ -9037,7 +9841,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRunRequest); i { case 0: return &v.state @@ -9049,7 +9853,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRunResponse); i { case 0: return &v.state @@ -9061,7 +9865,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BatchGetRunsRequest); i { case 0: return &v.state @@ -9073,7 +9877,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BatchGetRunsResponse); i { case 0: return &v.state @@ -9085,7 +9889,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRunsRequest); i { case 0: return &v.state @@ -9097,7 +9901,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRunsResponse); i { case 0: return &v.state @@ -9109,7 +9913,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartRunRequest); i { case 0: return &v.state @@ -9121,7 +9925,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartRunResponse); i { case 0: return &v.state @@ -9133,7 +9937,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetryRunRequest); i { case 0: return &v.state @@ -9145,7 +9949,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetryRunResponse); i { case 0: return &v.state @@ -9157,7 +9961,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CancelRunRequest); i { case 0: return &v.state @@ -9169,7 +9973,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CancelRunResponse); i { case 0: return &v.state @@ -9181,7 +9985,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CancelAllRunsRequest); i { case 0: return &v.state @@ -9193,7 +9997,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CancelAllRunsResponse); i { case 0: return &v.state @@ -9205,7 +10009,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListTaskRunsRequest); i { case 0: return &v.state @@ -9217,7 +10021,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListTaskRunsResponse); i { case 0: return &v.state @@ -9229,7 +10033,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTaskRunRequest); i { case 0: return &v.state @@ -9241,7 +10045,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTaskRunResponse); i { case 0: return &v.state @@ -9253,7 +10057,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CancelTaskRunRequest); i { case 0: return &v.state @@ -9265,7 +10069,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CancelTaskRunResponse); i { case 0: return &v.state @@ -9277,7 +10081,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTaskRunLogsRequest); i { case 0: return &v.state @@ -9289,7 +10093,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTaskRunLogsResponse); i { case 0: return &v.state @@ -9301,7 +10105,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteTaskRunLogsRequest); i { case 0: return &v.state @@ -9313,7 +10117,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteTaskRunLogsResponse); i { case 0: return &v.state @@ -9325,7 +10129,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTriggerRequest); i { case 0: return &v.state @@ -9337,7 +10141,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTriggerResponse); i { case 0: return &v.state @@ -9349,7 +10153,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListTriggersRequest); i { case 0: return &v.state @@ -9361,7 +10165,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListTriggersResponse); i { case 0: return &v.state @@ -9373,7 +10177,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InstallTriggerRequest); i { case 0: return &v.state @@ -9385,7 +10189,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InstallTriggerResponse); i { case 0: return &v.state @@ -9397,7 +10201,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UninstallTriggerRequest); i { case 0: return &v.state @@ -9409,7 +10213,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UninstallTriggerResponse); i { case 0: return &v.state @@ -9421,7 +10225,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnableTriggerRequest); i { case 0: return &v.state @@ -9433,7 +10237,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnableTriggerResponse); i { case 0: return &v.state @@ -9445,7 +10249,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DisableTriggerRequest); i { case 0: return &v.state @@ -9457,7 +10261,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DisableTriggerResponse); i { case 0: return &v.state @@ -9469,7 +10273,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTriggerInstallInstructionsRequest); i { case 0: return &v.state @@ -9481,7 +10285,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTriggerInstallInstructionsResponse); i { case 0: return &v.state @@ -9493,7 +10297,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetCommonTaskRequest); i { case 0: return &v.state @@ -9505,7 +10309,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetCommonTaskResponse); i { case 0: return &v.state @@ -9517,7 +10321,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListCommonTasksRequest); i { case 0: return &v.state @@ -9529,7 +10333,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListCommonTasksResponse); i { case 0: return &v.state @@ -9541,7 +10345,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InstallCommonTaskRequest); i { case 0: return &v.state @@ -9553,7 +10357,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InstallCommonTaskResponse); i { case 0: return &v.state @@ -9565,7 +10369,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UninstallCommonTaskRequest); i { case 0: return &v.state @@ -9577,7 +10381,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UninstallCommonTaskResponse); i { case 0: return &v.state @@ -9589,7 +10393,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnableCommonTaskRequest); i { case 0: return &v.state @@ -9601,7 +10405,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnableCommonTaskResponse); i { case 0: return &v.state @@ -9613,7 +10417,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DisableCommonTaskRequest); i { case 0: return &v.state @@ -9625,7 +10429,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DisableCommonTaskResponse); i { case 0: return &v.state @@ -9637,7 +10441,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetCommonTaskInstallInstructionsRequest); i { case 0: return &v.state @@ -9649,7 +10453,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetCommonTaskInstallInstructionsResponse); i { case 0: return &v.state @@ -9661,7 +10465,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerWatchRequest); i { case 0: return &v.state @@ -9673,7 +10477,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerWatchResponse); i { case 0: return &v.state @@ -9685,7 +10489,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerInfoRequest); i { case 0: return &v.state @@ -9697,7 +10501,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerInfoResponse); i { case 0: return &v.state @@ -9709,7 +10513,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerSubscribeRequest); i { case 0: return &v.state @@ -9721,7 +10525,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerSubscribeResponse); i { case 0: return &v.state @@ -9733,7 +10537,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerUnsubscribeRequest); i { case 0: return &v.state @@ -9745,7 +10549,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerUnsubscribeResponse); i { case 0: return &v.state @@ -9757,7 +10561,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerShutdownRequest); i { case 0: return &v.state @@ -9769,7 +10573,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerShutdownResponse); i { case 0: return &v.state @@ -9781,7 +10585,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerExternalEventRequest); i { case 0: return &v.state @@ -9793,7 +10597,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TriggerExternalEventResponse); i { case 0: return &v.state @@ -9805,7 +10609,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetEventRequest); i { case 0: return &v.state @@ -9817,7 +10621,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetEventResponse); i { case 0: return &v.state @@ -9829,7 +10633,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListEventsRequest); i { case 0: return &v.state @@ -9841,7 +10645,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListEventsResponse); i { case 0: return &v.state @@ -9853,7 +10657,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPipelineObjectRequest); i { case 0: return &v.state @@ -9865,7 +10669,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPipelineObjectResponse); i { case 0: return &v.state @@ -9877,7 +10681,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPipelineObjectsRequest); i { case 0: return &v.state @@ -9889,7 +10693,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPipelineObjectsResponse); i { case 0: return &v.state @@ -9901,7 +10705,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutPipelineObjectRequest); i { case 0: return &v.state @@ -9913,7 +10717,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutPipelineObjectResponse); i { case 0: return &v.state @@ -9925,7 +10729,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeletePipelineObjectRequest); i { case 0: return &v.state @@ -9937,7 +10741,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeletePipelineObjectResponse); i { case 0: return &v.state @@ -9949,7 +10753,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRunObjectRequest); i { case 0: return &v.state @@ -9961,7 +10765,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRunObjectResponse); i { case 0: return &v.state @@ -9973,7 +10777,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRunObjectsRequest); i { case 0: return &v.state @@ -9985,7 +10789,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRunObjectsResponse); i { case 0: return &v.state @@ -9997,7 +10801,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutRunObjectRequest); i { case 0: return &v.state @@ -10009,7 +10813,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutRunObjectResponse); i { case 0: return &v.state @@ -10021,7 +10825,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRunObjectRequest); i { case 0: return &v.state @@ -10033,7 +10837,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRunObjectResponse); i { case 0: return &v.state @@ -10045,7 +10849,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPipelineSecretRequest); i { case 0: return &v.state @@ -10057,7 +10861,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPipelineSecretResponse); i { case 0: return &v.state @@ -10069,7 +10873,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPipelineSecretsRequest); i { case 0: return &v.state @@ -10081,7 +10885,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPipelineSecretsResponse); i { case 0: return &v.state @@ -10093,7 +10897,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutPipelineSecretRequest); i { case 0: return &v.state @@ -10105,7 +10909,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutPipelineSecretResponse); i { case 0: return &v.state @@ -10117,7 +10921,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeletePipelineSecretRequest); i { case 0: return &v.state @@ -10129,7 +10933,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeletePipelineSecretResponse); i { case 0: return &v.state @@ -10141,7 +10945,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetGlobalSecretRequest); i { case 0: return &v.state @@ -10153,7 +10957,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetGlobalSecretResponse); i { case 0: return &v.state @@ -10165,7 +10969,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListGlobalSecretsRequest); i { case 0: return &v.state @@ -10177,7 +10981,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListGlobalSecretsResponse); i { case 0: return &v.state @@ -10189,7 +10993,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutGlobalSecretRequest); i { case 0: return &v.state @@ -10201,7 +11005,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutGlobalSecretResponse); i { case 0: return &v.state @@ -10213,7 +11017,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteGlobalSecretRequest); i { case 0: return &v.state @@ -10225,7 +11029,7 @@ func file_gofer_transport_proto_init() { return nil } } - file_gofer_transport_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { + file_gofer_transport_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteGlobalSecretResponse); i { case 0: return &v.state @@ -10244,7 +11048,7 @@ func file_gofer_transport_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gofer_transport_proto_rawDesc, NumEnums: 2, - NumMessages: 150, + NumMessages: 160, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/gofer.proto b/proto/gofer.proto index 137f5854..a81c0fa1 100644 --- a/proto/gofer.proto +++ b/proto/gofer.proto @@ -101,21 +101,46 @@ service Gofer { // discarded. rpc DisablePipeline(DisablePipelineRequest) returns (DisablePipelineResponse); - // CreatePipeline creates a new pipeline from the protobuf input. This is - // usually autogenerated from the command line tool. - rpc CreatePipeline(CreatePipelineRequest) returns (CreatePipelineResponse); - - // UpdatePipeline updates a pipeline from the protobuf input. This input is - // usually autogenerated from the command line tool. - // Updating a pipeline requires the pipeline to adhere - // to two constraints: - // 1) The pipeline must not have any current runs in progress. - // 2) The pipeline must be in a disabled state. - rpc UpdatePipeline(UpdatePipelineRequest) returns (UpdatePipelineResponse); + // DeployPipeline attempts to deploy a version of a pipeline. + rpc DeployPipeline(DeployPipelineRequest) returns (DeployPipelineResponse); // DeletePipeline deletes a pipeline permenantly. It is not recoverable. rpc DeletePipeline(DeletePipelineRequest) returns (DeletePipelineResponse); + ////////////// Pipeline Configs RPCs ////////////// + // + // Pipeline configs are versioned configurations for a particular pipeline. + // They are created by using the "PushPipeline" endpoint and deployed + // to your pipeline by the "DeployPipeline" endpoint. + + // RegisterPipelineConfig registers a new version of a pipeline's + // configuration. If the pipeline does not exist it will be created. + rpc RegisterPipelineConfig(RegisterPipelineConfigRequest) + returns (RegisterPipelineConfigResponse); + + // ListPipelineConfigs returns all registered pipeline configs. + rpc ListPipelineConfigs(ListPipelineConfigsRequest) + returns (ListPipelineConfigsResponse); + + // GetPipelineConfig returns a single pipelineconfig by id. + rpc GetPipelineConfig(GetPipelineConfigRequest) + returns (GetPipelineConfigResponse); + + // DeletePipelineConfig removes a pipelineconfig by id. + rpc DeletePipelineConfig(DeletePipelineConfigRequest) + returns (DeletePipelineConfigResponse); + + ////////////// Pipeline Deployment RPCs ////////////// + // + // A deployment is a releasing of a new pipeline version. It tracks the + // progress and result of the release. + + // ListDeployments + rpc ListDeployments(ListDeploymentsRequest) returns (ListDeploymentsResponse); + + // GetDeployment + rpc GetDeployment(GetDeploymentRequest) returns (GetDeploymentResponse); + ////////////// Run RPCs ////////////// // // A run is a specific execution of a pipeline at a specific point in time. diff --git a/proto/gofer_message.proto b/proto/gofer_message_api.proto similarity index 74% rename from proto/gofer_message.proto rename to proto/gofer_message_api.proto index 1e47384e..07e0c4d1 100644 --- a/proto/gofer_message.proto +++ b/proto/gofer_message_api.proto @@ -35,70 +35,100 @@ message Variable { } message Pipeline { + PipelineMetadata metadata = 1; + PipelineConfig config = 2; +} + +message PipelineMetadata { string namespace = 1; string id = 2; - string name = 3; - string description = 4; - int64 parallelism = 5; - int64 created = 6; - int64 modified = 7; + int64 created = 3; + int64 modified = 4; enum PipelineState { PIPELINE_STATE_UNKNOWN = 0; ACTIVE = 1; DISABLED = 2; } - PipelineState state = 8; - map custom_tasks = 9; - map triggers = 10; - map common_tasks = 11; - enum ErrorKind { - ERROR_KIND_UNKNOWN = 0; - TRIGGER_SUBSCRIPTION_FAILURE = 1; - } - message Error { - ErrorKind kind = 1; - string description = 2; + PipelineState state = 5; +} + +message PipelineConfig { + string namespace = 1; + string pipeline = 2; + int64 version = 3; + int64 parallelism = 4; + string name = 5; + string description = 6; + map custom_tasks = 7; + map common_tasks = 8; + enum PipelineConfigState { + PIPELINE_CONFIG_STATE_UNKNOWN = 0; + UNRELEASED = 1; + LIVE = 2; + DEPRECATED = 3; } - repeated Error errors = 12; + PipelineConfigState state = 9; + int64 registered = 10; + int64 deprecated = 11; } -message PipelineTaskConfig { - oneof task { - CustomTaskConfig custom_task = 1; - CommonTaskConfig common_task = 2; +message DeploymentStatusReason { + enum DeploymentStatusReasonKind { + DEPLOYMENT_STATUS_REASON_UNKNOWN = 0; + TRIGGER_GENERAL_FAILURE = 1; + TRIGGER_NOT_FOUND = 2; + TRIGGER_CONFIG_INVALID = 3; } + DeploymentStatusReasonKind reason = 1; + string description = 2; } -message PipelineConfig { - string id = 1; - string name = 2; - string description = 3; - int64 parallelism = 4; - repeated PipelineTaskConfig tasks = 5; - repeated PipelineTriggerConfig triggers = 6; +message Deployment { + string namespace = 1; + string pipeline = 2; + int64 id = 3; + int64 start_version = 4; + int64 end_version = 5; + int64 started = 6; + int64 ended = 7; + enum DeploymentState { + DEPLOYMENT_STATE_UNKNOWN = 0; + RUNNING = 1; + COMPLETE = 2; + } + DeploymentState state = 8; + enum DeploymentStatus { + DEPLOYMENT_STATUS_UNKNOWN = 0; + FAILED = 1; + SUCCESSFUL = 2; + } + DeploymentStatus status = 9; + DeploymentStatusReason status_reason = 10; + repeated Event logs = 11; } message Run { string namespace = 1; string pipeline = 2; - int64 id = 3; - int64 started = 4; - int64 ended = 5; + int64 version = 3; + int64 id = 4; + int64 started = 5; + int64 ended = 6; enum RunState { RUN_STATE_UNKNOWN = 0; PENDING = 1; RUNNING = 2; COMPLETE = 3; } - RunState state = 6; + RunState state = 7; enum RunStatus { RUN_STATUS_UNKNOWN = 0; SUCCESSFUL = 1; FAILED = 2; CANCELLED = 3; } - RunStatus status = 7; - RunStatusReason status_reason = 8; + RunStatus status = 8; + RunStatusReason status_reason = 9; message RunTriggerInfo { string name = 1; string label = 2; @@ -165,50 +195,11 @@ message PipelineCommonTaskSettings { bool inject_api_token = 6; } -message CustomTaskConfig { - string id = 1; - string description = 2; - string image = 3; - RegistryAuth registry_auth = 4; - enum RequiredParentStatus { - REQUIRED_PARENT_STATUS_UNKNOWN = 0; - ANY = 1; - SUCCESS = 2; - FAILURE = 3; - } - map depends_on = 5; - map variables = 6; - repeated string entrypoint = 7; - repeated string command = 8; - bool inject_api_token = 9; -} - -message PipelineTriggerConfig { - string name = 1; - string label = 2; - map settings = 3; -} - message CommonTask { PipelineCommonTaskSettings settings = 1; CommonTaskRegistration registration = 2; } -message CommonTaskConfig { - string name = 1; - string label = 2; - enum RequiredParentStatus { - REQUIRED_PARENT_STATUS_UNKNOWN = 0; - ANY = 1; - SUCCESS = 2; - FAILURE = 3; - } - string description = 3; - map depends_on = 4; - map settings = 5; - bool inject_api_token = 6; -} - message TaskRunStatusReason { enum Reason { UNKNOWN = 0; @@ -232,8 +223,9 @@ message TaskRun { bool logs_removed = 7; string namespace = 8; string pipeline = 9; - int64 run = 10; - int64 started = 11; + int64 version = 10; + int64 run = 11; + int64 started = 12; enum TaskRunState { UNKNOWN_STATE = 0; PROCESSING = 1; @@ -241,7 +233,7 @@ message TaskRun { RUNNING = 3; COMPLETE = 4; } - TaskRunState state = 12; + TaskRunState state = 13; enum TaskRunStatus { UNKNOWN_STATUS = 0; SUCCESSFUL = 1; @@ -249,12 +241,12 @@ message TaskRun { CANCELLED = 3; SKIPPED = 4; } - TaskRunStatus status = 13; + TaskRunStatus status = 14; oneof task { - CustomTask custom_task = 14; - CommonTask common_task = 15; + CustomTask custom_task = 15; + CommonTask common_task = 16; } - repeated Variable variables = 16; + repeated Variable variables = 17; } message Trigger { diff --git a/proto/gofer_message_sdk.proto b/proto/gofer_message_sdk.proto new file mode 100644 index 00000000..8e5f6128 --- /dev/null +++ b/proto/gofer_message_sdk.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package proto; + +option go_package = "github.com/clintjedwards/gofer/proto/go"; + +import "gofer_message_api.proto"; + +// These protobufs contain protos used within the SDK. These models are usually +// inputs for the API, used by the frontend(CLI in this case). + +message UserPipelineConfig { + string id = 1; + string name = 2; + string description = 3; + int64 parallelism = 4; + repeated UserPipelineTaskConfig tasks = 5; +} + +message UserPipelineTaskConfig { + oneof task { + UserCustomTaskConfig custom_task = 1; + UserCommonTaskConfig common_task = 2; + } +} + +message UserCustomTaskConfig { + string id = 1; + string description = 2; + string image = 3; + RegistryAuth registry_auth = 4; + enum RequiredParentStatus { + REQUIRED_PARENT_STATUS_UNKNOWN = 0; + ANY = 1; + SUCCESS = 2; + FAILURE = 3; + } + map depends_on = 5; + map variables = 6; + repeated string entrypoint = 7; + repeated string command = 8; + bool inject_api_token = 9; +} + +message UserCommonTaskConfig { + string name = 1; + string label = 2; + enum RequiredParentStatus { + REQUIRED_PARENT_STATUS_UNKNOWN = 0; + ANY = 1; + SUCCESS = 2; + FAILURE = 3; + } + string description = 3; + map depends_on = 4; + map settings = 5; + bool inject_api_token = 6; +} diff --git a/proto/gofer_transport.proto b/proto/gofer_transport.proto index 757ff659..ce73df61 100644 --- a/proto/gofer_transport.proto +++ b/proto/gofer_transport.proto @@ -4,7 +4,8 @@ package proto; option go_package = "github.com/clintjedwards/gofer/proto/go"; -import "gofer_message.proto"; +import "gofer_message_api.proto"; +import "gofer_message_sdk.proto"; ////////////// System Transport Models ////////////// @@ -105,6 +106,8 @@ message DeleteNamespaceResponse {} message GetPipelineRequest { string namespace_id = 1; // Unique namespace identifier string id = 2; // Unique identifier + // Pipeline version to retrieve. -1 Returns the currently active version. + int64 version = 3; } message GetPipelineResponse { Pipeline pipeline = 1; } @@ -118,7 +121,7 @@ message ListPipelinesRequest { int64 limit = 2; string namespace_id = 3; // Unique namespace identifier } -message ListPipelinesResponse { repeated Pipeline pipelines = 1; } +message ListPipelinesResponse { repeated PipelineMetadata pipelines = 1; } message DisablePipelineRequest { string namespace_id = 1; // Unique namespace identifier @@ -132,17 +135,20 @@ message EnablePipelineRequest { } message EnablePipelineResponse {} -message CreatePipelineRequest { +message RegisterPipelineConfigRequest { string namespace_id = 1; // Unique namespace identifier - PipelineConfig pipeline_config = 2; + UserPipelineConfig pipeline_config = 2; + bool disable = 3; // Disable the pipeline upon registration } -message CreatePipelineResponse { Pipeline pipeline = 1; } +message RegisterPipelineConfigResponse { Pipeline pipeline = 1; } -message UpdatePipelineRequest { +message DeployPipelineRequest { string namespace_id = 1; // Unique namespace identifier - PipelineConfig pipeline_config = 2; + string id = 2; + int64 version = 3; + bool force = 4; } -message UpdatePipelineResponse { Pipeline pipeline = 1; } +message DeployPipelineResponse { int64 deployment_id = 1; } message DeletePipelineRequest { string namespace_id = 1; // Unique namespace identifier @@ -150,6 +156,60 @@ message DeletePipelineRequest { } message DeletePipelineResponse {} +////////////// Pipeline Config Transport Models ////////////// + +message GetPipelineConfigRequest { + string namespace_id = 1; // Unique namespace identifier + string pipeline_id = 2; // Unique pipeline identifier + // Pipeline version to retrieve. -1 Returns the currently active version. + int64 version = 3; +} +message GetPipelineConfigResponse { PipelineConfig config = 1; } + +message ListPipelineConfigsRequest { + // offset is a pagination parameter that defines where to start when counting + // the list of objects to return. + int64 offset = 1; + + // limit is a pagination parameter that defines how many objects to return + // per result. + int64 limit = 2; + string namespace_id = 3; // Unique namespace identifier + string pipeline_id = 4; // Unique pipeline identifier +} + +message ListPipelineConfigsResponse { repeated PipelineConfig configs = 1; } + +message DeletePipelineConfigRequest { + string namespace_id = 1; // Unique namespace identifier + string pipeline_id = 2; // Unique pipeline identifier + // Pipeline version to retrieve. -1 Returns the currently active version. + int64 version = 3; +} +message DeletePipelineConfigResponse {} + +////////////// Deployment Transport Models ////////////// +message ListDeploymentsRequest { + // offset is a pagination parameter that defines where to start when counting + // the list of Deployments to return. + int64 offset = 1; + + // limit is a pagination parameter that defines how many Deployments to return + // per result. + int64 limit = 2; + string namespace_id = 3; // Unique namespace identifier + string pipeline_id = 4; +} + +message ListDeploymentsResponse { repeated Deployment Deployments = 1; } + +message GetDeploymentRequest { + string namespace_id = 1; // Unique namespace identifier + string pipeline_id = 2; + int64 id = 3; // Unique deployment identifier. +} +message GetDeploymentResponse { Deployment deployment = 1; } + ////////////// Runs Transport Models ////////////// message GetRunRequest { @@ -384,8 +444,8 @@ message TriggerInfoResponse { } message TriggerSubscribeRequest { - string namespace_id = 1; // unique identifier for associated namespace - string pipeline_id = 2; // unique identifier for associated pipeline + string namespace_id = 1; // unique identifier for associated namespace. + string pipeline_id = 2; // unique identifier for associated pipeline. string pipeline_trigger_label = 3; // pipeline specific subscription id // Pipelines are allowed to pass a configuration to triggers denoting what diff --git a/proto/rust/build.rs b/proto/rust/build.rs index 6e9eb0c2..9e7aea45 100644 --- a/proto/rust/build.rs +++ b/proto/rust/build.rs @@ -6,7 +6,8 @@ fn main() { &[ "gofer.proto", "gofer_transport.proto", - "gofer_message.proto", + "gofer_message_api.proto", + "gofer_message_sdk.proto", ], &["../"], ) diff --git a/proto/rust/src/proto.rs b/proto/rust/src/proto.rs index c5ef9a83..8d6dc615 100644 --- a/proto/rust/src/proto.rs +++ b/proto/rust/src/proto.rs @@ -38,83 +38,129 @@ pub struct Variable { } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Pipeline { + #[prost(message, optional, tag="1")] + pub metadata: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub config: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PipelineMetadata { #[prost(string, tag="1")] pub namespace: ::prost::alloc::string::String, #[prost(string, tag="2")] pub id: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub description: ::prost::alloc::string::String, - #[prost(int64, tag="5")] - pub parallelism: i64, - #[prost(int64, tag="6")] + #[prost(int64, tag="3")] pub created: i64, - #[prost(int64, tag="7")] + #[prost(int64, tag="4")] pub modified: i64, - #[prost(enumeration="pipeline::PipelineState", tag="8")] - pub state: i32, - #[prost(map="string, message", tag="9")] - pub custom_tasks: ::std::collections::HashMap<::prost::alloc::string::String, CustomTask>, - #[prost(map="string, message", tag="10")] - pub triggers: ::std::collections::HashMap<::prost::alloc::string::String, PipelineTriggerSettings>, - #[prost(map="string, message", tag="11")] - pub common_tasks: ::std::collections::HashMap<::prost::alloc::string::String, PipelineCommonTaskSettings>, - #[prost(message, repeated, tag="12")] - pub errors: ::prost::alloc::vec::Vec, + #[prost(enumeration="pipeline_metadata::PipelineStatus", tag="5")] + pub status: i32, } -/// Nested message and enum types in `Pipeline`. -pub mod pipeline { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Error { - #[prost(enumeration="ErrorKind", tag="1")] - pub kind: i32, - #[prost(string, tag="2")] - pub description: ::prost::alloc::string::String, - } +/// Nested message and enum types in `PipelineMetadata`. +pub mod pipeline_metadata { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] - pub enum PipelineState { + pub enum PipelineStatus { Unknown = 0, Active = 1, Disabled = 2, } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PipelineConfig { + #[prost(string, tag="1")] + pub namespace: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub pipeline: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub version: ::prost::alloc::string::String, + #[prost(int64, tag="4")] + pub parallelism: i64, + #[prost(string, tag="5")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub description: ::prost::alloc::string::String, + #[prost(map="string, message", tag="7")] + pub custom_tasks: ::std::collections::HashMap<::prost::alloc::string::String, CustomTask>, + #[prost(map="string, message", tag="8")] + pub common_tasks: ::std::collections::HashMap<::prost::alloc::string::String, PipelineCommonTaskSettings>, + #[prost(enumeration="pipeline_config::PipelineConfigState", tag="9")] + pub state: i32, + #[prost(int64, tag="10")] + pub registered: i64, + #[prost(int64, tag="11")] + pub deprecated: i64, +} +/// Nested message and enum types in `PipelineConfig`. +pub mod pipeline_config { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] - pub enum ErrorKind { + pub enum PipelineConfigState { Unknown = 0, - TriggerSubscriptionFailure = 1, + Unreleased = 1, + Live = 2, + Deprecated = 3, } } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct PipelineTaskConfig { - #[prost(oneof="pipeline_task_config::Task", tags="1, 2")] - pub task: ::core::option::Option, +pub struct DeploymentStatusReason { + #[prost(enumeration="deployment_status_reason::DeploymentStatusReasonKind", tag="1")] + pub reason: i32, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, } -/// Nested message and enum types in `PipelineTaskConfig`. -pub mod pipeline_task_config { - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Task { - #[prost(message, tag="1")] - CustomTask(super::CustomTaskConfig), - #[prost(message, tag="2")] - CommonTask(super::CommonTaskConfig), +/// Nested message and enum types in `DeploymentStatusReason`. +pub mod deployment_status_reason { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum DeploymentStatusReasonKind { + DeploymentStatusReasonUnknown = 0, + TriggerGeneralFailure = 1, + TriggerNotFound = 2, + TriggerConfigInvalid = 3, } } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct PipelineConfig { +pub struct Deployment { #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, + pub namespace: ::prost::alloc::string::String, #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub description: ::prost::alloc::string::String, + pub pipeline: ::prost::alloc::string::String, + #[prost(int64, tag="3")] + pub id: i64, #[prost(int64, tag="4")] - pub parallelism: i64, - #[prost(message, repeated, tag="5")] - pub tasks: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="6")] - pub triggers: ::prost::alloc::vec::Vec, + pub start_version: i64, + #[prost(int64, tag="5")] + pub end_version: i64, + #[prost(int64, tag="6")] + pub started: i64, + #[prost(int64, tag="7")] + pub ended: i64, + #[prost(enumeration="deployment::DeploymentState", tag="8")] + pub state: i32, + #[prost(enumeration="deployment::DeploymentStatus", tag="9")] + pub status: i32, + #[prost(message, optional, tag="10")] + pub status_reason: ::core::option::Option, + #[prost(message, repeated, tag="11")] + pub logs: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `Deployment`. +pub mod deployment { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum DeploymentState { + Unknown = 0, + Running = 1, + Complete = 2, + } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum DeploymentStatus { + Unknown = 0, + Failed = 1, + Successful = 2, + } } #[derive(Clone, PartialEq, ::prost::Message)] pub struct Run { @@ -123,16 +169,18 @@ pub struct Run { #[prost(string, tag="2")] pub pipeline: ::prost::alloc::string::String, #[prost(int64, tag="3")] - pub id: i64, + pub version: i64, #[prost(int64, tag="4")] - pub started: i64, + pub id: i64, #[prost(int64, tag="5")] + pub started: i64, + #[prost(int64, tag="6")] pub ended: i64, - #[prost(enumeration="run::RunState", tag="6")] + #[prost(enumeration="run::RunState", tag="7")] pub state: i32, - #[prost(enumeration="run::RunStatus", tag="7")] + #[prost(enumeration="run::RunStatus", tag="8")] pub status: i32, - #[prost(message, optional, tag="8")] + #[prost(message, optional, tag="9")] pub status_reason: ::core::option::Option, #[prost(message, optional, tag="10")] pub trigger: ::core::option::Option, @@ -262,47 +310,6 @@ pub mod pipeline_common_task_settings { } } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CustomTaskConfig { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub description: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub image: ::prost::alloc::string::String, - #[prost(message, optional, tag="4")] - pub registry_auth: ::core::option::Option, - #[prost(map="string, enumeration(custom_task_config::RequiredParentStatus)", tag="5")] - pub depends_on: ::std::collections::HashMap<::prost::alloc::string::String, i32>, - #[prost(map="string, string", tag="6")] - pub variables: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(string, repeated, tag="7")] - pub entrypoint: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag="8")] - pub command: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(bool, tag="9")] - pub inject_api_token: bool, -} -/// Nested message and enum types in `CustomTaskConfig`. -pub mod custom_task_config { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum RequiredParentStatus { - Unknown = 0, - Any = 1, - Success = 2, - Failure = 3, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PipelineTriggerConfig { - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub label: ::prost::alloc::string::String, - #[prost(map="string, string", tag="3")] - pub settings: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] pub struct CommonTask { #[prost(message, optional, tag="1")] pub settings: ::core::option::Option, @@ -310,32 +317,6 @@ pub struct CommonTask { pub registration: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommonTaskConfig { - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub label: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub description: ::prost::alloc::string::String, - #[prost(map="string, enumeration(common_task_config::RequiredParentStatus)", tag="4")] - pub depends_on: ::std::collections::HashMap<::prost::alloc::string::String, i32>, - #[prost(map="string, string", tag="5")] - pub settings: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(bool, tag="6")] - pub inject_api_token: bool, -} -/// Nested message and enum types in `CommonTaskConfig`. -pub mod common_task_config { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum RequiredParentStatus { - Unknown = 0, - Any = 1, - Success = 2, - Failure = 3, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] pub struct TaskRunStatusReason { #[prost(enumeration="task_run_status_reason::Reason", tag="1")] pub reason: i32, @@ -376,16 +357,18 @@ pub struct TaskRun { #[prost(string, tag="9")] pub pipeline: ::prost::alloc::string::String, #[prost(int64, tag="10")] - pub run: i64, + pub version: i64, #[prost(int64, tag="11")] + pub run: i64, + #[prost(int64, tag="12")] pub started: i64, - #[prost(enumeration="task_run::TaskRunState", tag="12")] + #[prost(enumeration="task_run::TaskRunState", tag="13")] pub state: i32, - #[prost(enumeration="task_run::TaskRunStatus", tag="13")] + #[prost(enumeration="task_run::TaskRunStatus", tag="14")] pub status: i32, - #[prost(message, repeated, tag="16")] + #[prost(message, repeated, tag="17")] pub variables: ::prost::alloc::vec::Vec, - #[prost(oneof="task_run::Task", tags="14, 15")] + #[prost(oneof="task_run::Task", tags="15, 16")] pub task: ::core::option::Option, } /// Nested message and enum types in `TaskRun`. @@ -410,9 +393,9 @@ pub mod task_run { } #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Task { - #[prost(message, tag="14")] - CustomTask(super::CustomTask), #[prost(message, tag="15")] + CustomTask(super::CustomTask), + #[prost(message, tag="16")] CommonTask(super::CommonTask), } } @@ -771,6 +754,9 @@ pub struct GetPipelineRequest { /// Unique identifier #[prost(string, tag="2")] pub id: ::prost::alloc::string::String, + /// Pipeline version to retrieve. -1 Returns the currently active version. + #[prost(int64, tag="3")] + pub version: i64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetPipelineResponse { @@ -790,6 +776,9 @@ pub struct ListPipelinesRequest { /// Unique namespace identifier #[prost(string, tag="3")] pub namespace_id: ::prost::alloc::string::String, + /// Leave out deprecated pipeline versions. + #[prost(bool, tag="4")] + pub exclude_deprecated: bool, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListPipelinesResponse { @@ -821,7 +810,7 @@ pub struct EnablePipelineRequest { pub struct EnablePipelineResponse { } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreatePipelineRequest { +pub struct RegisterPipelineRequest { /// Unique namespace identifier #[prost(string, tag="1")] pub namespace_id: ::prost::alloc::string::String, @@ -829,22 +818,28 @@ pub struct CreatePipelineRequest { pub pipeline_config: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreatePipelineResponse { +pub struct RegisterPipelineResponse { #[prost(message, optional, tag="1")] pub pipeline: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdatePipelineRequest { +pub struct DeployPipelineRequest { /// Unique namespace identifier #[prost(string, tag="1")] pub namespace_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub pipeline_config: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, + #[prost(int64, tag="3")] + pub version: i64, + #[prost(bool, tag="4")] + pub force: bool, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdatePipelineResponse { - #[prost(message, optional, tag="1")] - pub pipeline: ::core::option::Option, +pub struct DeployPipelineResponse { + #[prost(int64, tag="1")] + pub deployment_id: i64, + #[prost(message, optional, tag="2")] + pub event: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePipelineRequest { @@ -858,6 +853,44 @@ pub struct DeletePipelineRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePipelineResponse { } +/////////////// Deployment Transport Models ////////////// +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDeploymentsRequest { + /// offset is a pagination parameter that defines where to start when counting + /// the list of Deployments to return. + #[prost(int64, tag="1")] + pub offset: i64, + /// limit is a pagination parameter that defines how many Deployments to return + /// per result. + #[prost(int64, tag="2")] + pub limit: i64, + /// Unique namespace identifier + #[prost(string, tag="3")] + pub namespace_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub pipeline_id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDeploymentsResponse { + #[prost(message, repeated, tag="1")] + pub deployments: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDeploymentRequest { + /// Unique namespace identifier + #[prost(string, tag="1")] + pub namespace_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub pipeline_id: ::prost::alloc::string::String, + /// Unique deployment identifier. + #[prost(int64, tag="3")] + pub id: i64, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDeploymentResponse { + #[prost(message, optional, tag="1")] + pub deployment: ::core::option::Option, +} ////////////// Runs Transport Models ////////////// #[derive(Clone, PartialEq, ::prost::Message)] @@ -1284,10 +1317,10 @@ pub struct TriggerInfoResponse { } #[derive(Clone, PartialEq, ::prost::Message)] pub struct TriggerSubscribeRequest { - /// unique identifier for associated namespace + /// unique identifier for associated namespace. #[prost(string, tag="1")] pub namespace_id: ::prost::alloc::string::String, - /// unique identifier for associated pipeline + /// unique identifier for associated pipeline. #[prost(string, tag="2")] pub pipeline_id: ::prost::alloc::string::String, /// pipeline specific subscription id @@ -2073,12 +2106,12 @@ pub mod gofer_client { ); self.inner.unary(request.into_request(), path, codec).await } - /// CreatePipeline creates a new pipeline from the protobuf input. This is - /// usually autogenerated from the command line tool. - pub async fn create_pipeline( + /// RegisterPipeline creates a new version of a pipeline from the protobuf + /// input. + pub async fn register_pipeline( &mut self, - request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { self.inner .ready() .await @@ -2090,20 +2123,30 @@ pub mod gofer_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/proto.Gofer/CreatePipeline", + "/proto.Gofer/RegisterPipeline", ); self.inner.unary(request.into_request(), path, codec).await } - /// UpdatePipeline updates a pipeline from the protobuf input. This input is - /// usually autogenerated from the command line tool. - /// Updating a pipeline requires the pipeline to adhere - /// to two constraints: - /// 1) The pipeline must not have any current runs in progress. - /// 2) The pipeline must be in a disabled state. - pub async fn update_pipeline( + /// DeployPipeline attempts to deploy a version of a pipeline. + /// + /// Deploying a pipeline involves removing all the old triggers and registering + /// the pipeline with any new ones. + /// + /// Deploying the pipeline automatically makes sure that the pipeline adheres + /// to two constraints before starting the process of deploying the new + /// version: + /// 1) The old pipeline must not have any current runs in progress. + /// 2) The old pipeline must be in a disabled state. + /// + /// The endpoint returns a stream of events that are being emitted by the + /// deployment along with a reference to the deployment object. + pub async fn deploy_pipeline( &mut self, - request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { + request: impl tonic::IntoRequest, + ) -> Result< + tonic::Response>, + tonic::Status, + > { self.inner .ready() .await @@ -2115,9 +2158,9 @@ pub mod gofer_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/proto.Gofer/UpdatePipeline", + "/proto.Gofer/DeployPipeline", ); - self.inner.unary(request.into_request(), path, codec).await + self.inner.server_streaming(request.into_request(), path, codec).await } /// DeletePipeline deletes a pipeline permenantly. It is not recoverable. pub async fn delete_pipeline( @@ -2139,6 +2182,46 @@ pub mod gofer_client { ); self.inner.unary(request.into_request(), path, codec).await } + /// ListDeployments + pub async fn list_deployments( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/proto.Gofer/ListDeployments", + ); + self.inner.unary(request.into_request(), path, codec).await + } + /// GetDeployment + pub async fn get_deployment( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/proto.Gofer/GetDeployment", + ); + self.inner.unary(request.into_request(), path, codec).await + } /// GetRun returns the details of a single run. pub async fn get_run( &mut self, @@ -3342,27 +3425,50 @@ pub mod gofer_server { &self, request: tonic::Request, ) -> Result, tonic::Status>; - /// CreatePipeline creates a new pipeline from the protobuf input. This is - /// usually autogenerated from the command line tool. - async fn create_pipeline( + /// RegisterPipeline creates a new version of a pipeline from the protobuf + /// input. + async fn register_pipeline( &self, - request: tonic::Request, - ) -> Result, tonic::Status>; - /// UpdatePipeline updates a pipeline from the protobuf input. This input is - /// usually autogenerated from the command line tool. - /// Updating a pipeline requires the pipeline to adhere - /// to two constraints: - /// 1) The pipeline must not have any current runs in progress. - /// 2) The pipeline must be in a disabled state. - async fn update_pipeline( + request: tonic::Request, + ) -> Result, tonic::Status>; + ///Server streaming response type for the DeployPipeline method. + type DeployPipelineStream: futures_core::Stream< + Item = Result, + > + + Send + + 'static; + /// DeployPipeline attempts to deploy a version of a pipeline. + /// + /// Deploying a pipeline involves removing all the old triggers and registering + /// the pipeline with any new ones. + /// + /// Deploying the pipeline automatically makes sure that the pipeline adheres + /// to two constraints before starting the process of deploying the new + /// version: + /// 1) The old pipeline must not have any current runs in progress. + /// 2) The old pipeline must be in a disabled state. + /// + /// The endpoint returns a stream of events that are being emitted by the + /// deployment along with a reference to the deployment object. + async fn deploy_pipeline( &self, - request: tonic::Request, - ) -> Result, tonic::Status>; + request: tonic::Request, + ) -> Result, tonic::Status>; /// DeletePipeline deletes a pipeline permenantly. It is not recoverable. async fn delete_pipeline( &self, request: tonic::Request, ) -> Result, tonic::Status>; + /// ListDeployments + async fn list_deployments( + &self, + request: tonic::Request, + ) -> Result, tonic::Status>; + /// GetDeployment + async fn get_deployment( + &self, + request: tonic::Request, + ) -> Result, tonic::Status>; /// GetRun returns the details of a single run. async fn get_run( &self, @@ -4411,25 +4517,25 @@ pub mod gofer_server { }; Box::pin(fut) } - "/proto.Gofer/CreatePipeline" => { + "/proto.Gofer/RegisterPipeline" => { #[allow(non_camel_case_types)] - struct CreatePipelineSvc(pub Arc); + struct RegisterPipelineSvc(pub Arc); impl< T: Gofer, - > tonic::server::UnaryService - for CreatePipelineSvc { - type Response = super::CreatePipelineResponse; + > tonic::server::UnaryService + for RegisterPipelineSvc { + type Response = super::RegisterPipelineResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { - (*inner).create_pipeline(request).await + (*inner).register_pipeline(request).await }; Box::pin(fut) } @@ -4439,7 +4545,7 @@ pub mod gofer_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = CreatePipelineSvc(inner); + let method = RegisterPipelineSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -4451,25 +4557,26 @@ pub mod gofer_server { }; Box::pin(fut) } - "/proto.Gofer/UpdatePipeline" => { + "/proto.Gofer/DeployPipeline" => { #[allow(non_camel_case_types)] - struct UpdatePipelineSvc(pub Arc); + struct DeployPipelineSvc(pub Arc); impl< T: Gofer, - > tonic::server::UnaryService - for UpdatePipelineSvc { - type Response = super::UpdatePipelineResponse; + > tonic::server::ServerStreamingService + for DeployPipelineSvc { + type Response = super::DeployPipelineResponse; + type ResponseStream = T::DeployPipelineStream; type Future = BoxFuture< - tonic::Response, + tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { - (*inner).update_pipeline(request).await + (*inner).deploy_pipeline(request).await }; Box::pin(fut) } @@ -4479,14 +4586,14 @@ pub mod gofer_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdatePipelineSvc(inner); + let method = DeployPipelineSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ); - let res = grpc.unary(method, req).await; + let res = grpc.server_streaming(method, req).await; Ok(res) }; Box::pin(fut) @@ -4531,6 +4638,86 @@ pub mod gofer_server { }; Box::pin(fut) } + "/proto.Gofer/ListDeployments" => { + #[allow(non_camel_case_types)] + struct ListDeploymentsSvc(pub Arc); + impl< + T: Gofer, + > tonic::server::UnaryService + for ListDeploymentsSvc { + type Response = super::ListDeploymentsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = self.0.clone(); + let fut = async move { + (*inner).list_deployments(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ListDeploymentsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/proto.Gofer/GetDeployment" => { + #[allow(non_camel_case_types)] + struct GetDeploymentSvc(pub Arc); + impl< + T: Gofer, + > tonic::server::UnaryService + for GetDeploymentSvc { + type Response = super::GetDeploymentResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = self.0.clone(); + let fut = async move { + (*inner).get_deployment(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetDeploymentSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } "/proto.Gofer/GetRun" => { #[allow(non_camel_case_types)] struct GetRunSvc(pub Arc); @@ -6628,3 +6815,112 @@ pub mod trigger_service_server { const NAME: &'static str = "proto.TriggerService"; } } +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PipelineConfigSdk { + #[prost(string, tag="1")] + pub namespace: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub pipeline: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub version: ::prost::alloc::string::String, + #[prost(int64, tag="4")] + pub parallelism: i64, + #[prost(string, tag="5")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub description: ::prost::alloc::string::String, + #[prost(map="string, message", tag="7")] + pub custom_tasks: ::std::collections::HashMap<::prost::alloc::string::String, CustomTask>, + #[prost(map="string, message", tag="8")] + pub common_tasks: ::std::collections::HashMap<::prost::alloc::string::String, PipelineCommonTaskSettings>, + #[prost(enumeration="pipeline_config_sdk::PipelineConfigState", tag="9")] + pub state: i32, + #[prost(int64, tag="10")] + pub registered: i64, + #[prost(int64, tag="11")] + pub deprecated: i64, +} +/// Nested message and enum types in `PipelineConfigSDK`. +pub mod pipeline_config_sdk { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum PipelineConfigState { + Unknown = 0, + Unreleased = 1, + Live = 2, + Deprecated = 3, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PipelineTaskConfigSdk { + #[prost(oneof="pipeline_task_config_sdk::Task", tags="1, 2")] + pub task: ::core::option::Option, +} +/// Nested message and enum types in `PipelineTaskConfigSDK`. +pub mod pipeline_task_config_sdk { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Task { + #[prost(message, tag="1")] + CustomTask(super::CustomTaskConfigSdk), + #[prost(message, tag="2")] + CommonTask(super::CommonTaskConfigSdk), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CustomTaskConfigSdk { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub image: ::prost::alloc::string::String, + #[prost(message, optional, tag="4")] + pub registry_auth: ::core::option::Option, + #[prost(map="string, enumeration(custom_task_config_sdk::RequiredParentStatus)", tag="5")] + pub depends_on: ::std::collections::HashMap<::prost::alloc::string::String, i32>, + #[prost(map="string, string", tag="6")] + pub variables: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + #[prost(string, repeated, tag="7")] + pub entrypoint: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="8")] + pub command: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="9")] + pub inject_api_token: bool, +} +/// Nested message and enum types in `CustomTaskConfigSDK`. +pub mod custom_task_config_sdk { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum RequiredParentStatus { + Unknown = 0, + Any = 1, + Success = 2, + Failure = 3, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CommonTaskConfigSdk { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub label: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub description: ::prost::alloc::string::String, + #[prost(map="string, enumeration(common_task_config_sdk::RequiredParentStatus)", tag="4")] + pub depends_on: ::std::collections::HashMap<::prost::alloc::string::String, i32>, + #[prost(map="string, string", tag="5")] + pub settings: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + #[prost(bool, tag="6")] + pub inject_api_token: bool, +} +/// Nested message and enum types in `CommonTaskConfigSDK`. +pub mod common_task_config_sdk { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum RequiredParentStatus { + Unknown = 0, + Any = 1, + Success = 2, + Failure = 3, + } +} diff --git a/sdk/go/config/commonTask.go b/sdk/go/config/commonTask.go index 1571fc84..85f0a130 100644 --- a/sdk/go/config/commonTask.go +++ b/sdk/go/config/commonTask.go @@ -62,13 +62,13 @@ func NewCommonTask(name, label string) *CommonTaskWrapper { } } -func (t *CommonTaskWrapper) Proto() *proto.CommonTaskConfig { - dependsOn := map[string]proto.CommonTaskConfig_RequiredParentStatus{} +func (t *CommonTaskWrapper) Proto() *proto.UserCommonTaskConfig { + dependsOn := map[string]proto.UserCommonTaskConfig_RequiredParentStatus{} for key, value := range t.CommonTask.DependsOn { - dependsOn[key] = proto.CommonTaskConfig_RequiredParentStatus(proto.CommonTaskConfig_RequiredParentStatus_value[string(value)]) + dependsOn[key] = proto.UserCommonTaskConfig_RequiredParentStatus(proto.UserCommonTaskConfig_RequiredParentStatus_value[string(value)]) } - return &proto.CommonTaskConfig{ + return &proto.UserCommonTaskConfig{ Name: t.CommonTask.Name, Label: t.CommonTask.Label, Description: t.CommonTask.Description, diff --git a/sdk/go/config/config.go b/sdk/go/config/config.go index 6e079b27..2498450c 100644 --- a/sdk/go/config/config.go +++ b/sdk/go/config/config.go @@ -84,12 +84,11 @@ type PipelineWrapper struct { // A pipeline is a representation of a Gofer pipeline, the structure in which users represent what they // want to run in Gofer. type Pipeline struct { - ID string `json:"id"` // Unique Identifier for the pipeline. - Name string `json:"name"` // Humanized name for the pipeline. - Description string `json:"description"` // A short description for the pipeline. - Parallelism int64 `json:"parallelism"` // How many runs are allowed to run at the same time. - Tasks []TaskConfig `json:"tasks"` // The task set of the pipeline. AKA which containers should be run. - Triggers []TriggerWrapper `json:"triggers"` // Associated triggers of the pipeline. + ID string `json:"id"` // Unique Identifier for the pipeline. + Name string `json:"name"` // Humanized name for the pipeline. + Description string `json:"description"` // A short description for the pipeline. + Parallelism int64 `json:"parallelism"` // How many runs are allowed to run at the same time. + Tasks []TaskConfig `json:"tasks"` // The task set of the pipeline. AKA which containers should be run. } // Create a new pipeline. @@ -106,7 +105,6 @@ func NewPipeline(id, name string) *PipelineWrapper { Description: "", Parallelism: 0, Tasks: []TaskConfig{}, - Triggers: []TriggerWrapper{}, }, } } @@ -130,13 +128,6 @@ func (p *PipelineWrapper) Validate() error { } } - for _, trigger := range p.Pipeline.Triggers { - err = trigger.validate() - if err != nil { - return err - } - } - return nil } @@ -160,45 +151,31 @@ func (p *PipelineWrapper) Tasks(tasks ...TaskConfig) *PipelineWrapper { return p } -// Triggers are the way in which Gofer handles automation. Triggers are allowed to start runs on your pipeline -// per some predefined event. For example, a common trigger is just the passage of time. The interval trigger -// might attempt to start a run for your pipeline when some value(that you set) of time has passed. -func (p *PipelineWrapper) Triggers(triggers ...TriggerWrapper) *PipelineWrapper { - p.Pipeline.Triggers = triggers - return p -} - -func (p *PipelineWrapper) Proto() *proto.PipelineConfig { - tasks := []*proto.PipelineTaskConfig{} +func (p *PipelineWrapper) Proto() *proto.UserPipelineConfig { + tasks := []*proto.UserPipelineTaskConfig{} for _, task := range p.Pipeline.Tasks { switch t := task.(type) { case *CommonTaskWrapper: - tasks = append(tasks, &proto.PipelineTaskConfig{ - Task: &proto.PipelineTaskConfig_CommonTask{ + tasks = append(tasks, &proto.UserPipelineTaskConfig{ + Task: &proto.UserPipelineTaskConfig_CommonTask{ CommonTask: t.Proto(), }, }) case *CustomTaskWrapper: - tasks = append(tasks, &proto.PipelineTaskConfig{ - Task: &proto.PipelineTaskConfig_CustomTask{ + tasks = append(tasks, &proto.UserPipelineTaskConfig{ + Task: &proto.UserPipelineTaskConfig_CustomTask{ CustomTask: t.Proto(), }, }) } } - triggers := []*proto.PipelineTriggerConfig{} - for _, trigger := range p.Pipeline.Triggers { - triggers = append(triggers, trigger.Proto()) - } - - return &proto.PipelineConfig{ + return &proto.UserPipelineConfig{ Id: p.Pipeline.ID, Name: p.Pipeline.Name, Description: p.Pipeline.Description, Parallelism: p.Pipeline.Parallelism, Tasks: tasks, - Triggers: triggers, } } diff --git a/sdk/go/config/config_test.go b/sdk/go/config/config_test.go index aec3e1eb..676beb33 100644 --- a/sdk/go/config/config_test.go +++ b/sdk/go/config/config_test.go @@ -96,14 +96,14 @@ func TestSimpleConfigSerialization(t *testing.T) { t.Fatal(err) } - want := proto.PipelineConfig{ + want := proto.UserPipelineConfig{ Id: "simple_test_pipeline", Name: "Simple Test Pipeline", Description: "Simple Test Pipeline", - Tasks: []*proto.PipelineTaskConfig{ + Tasks: []*proto.UserPipelineTaskConfig{ { - Task: &proto.PipelineTaskConfig_CustomTask{ - CustomTask: &proto.CustomTaskConfig{ + Task: &proto.UserPipelineTaskConfig_CustomTask{ + CustomTask: &proto.UserCustomTaskConfig{ Id: "simple_task", Image: "ubuntu:latest", Description: "This task simply prints our hello-world message and exits!", diff --git a/sdk/go/config/customTask.go b/sdk/go/config/customTask.go index 5824019b..4c7f7b0a 100644 --- a/sdk/go/config/customTask.go +++ b/sdk/go/config/customTask.go @@ -60,10 +60,10 @@ func NewCustomTask(id, image string) *CustomTaskWrapper { } } -func (t *CustomTaskWrapper) Proto() *proto.CustomTaskConfig { - dependsOn := map[string]proto.CustomTaskConfig_RequiredParentStatus{} +func (t *CustomTaskWrapper) Proto() *proto.UserCustomTaskConfig { + dependsOn := map[string]proto.UserCustomTaskConfig_RequiredParentStatus{} for key, value := range t.CustomTask.DependsOn { - dependsOn[key] = proto.CustomTaskConfig_RequiredParentStatus(proto.CustomTaskConfig_RequiredParentStatus_value[string(value)]) + dependsOn[key] = proto.UserCustomTaskConfig_RequiredParentStatus(proto.UserCustomTaskConfig_RequiredParentStatus_value[string(value)]) } entrypoint := []string{} @@ -76,7 +76,7 @@ func (t *CustomTaskWrapper) Proto() *proto.CustomTaskConfig { command = *t.CustomTask.Command } - return &proto.CustomTaskConfig{ + return &proto.UserCustomTaskConfig{ Id: t.CustomTask.ID, Description: t.CustomTask.Description, Image: t.CustomTask.Image, @@ -89,7 +89,7 @@ func (t *CustomTaskWrapper) Proto() *proto.CustomTaskConfig { } } -func (t *CustomTaskWrapper) FromCustomTaskProto(proto *proto.CustomTaskConfig) { +func (t *CustomTaskWrapper) FromCustomTaskProto(proto *proto.UserCustomTaskConfig) { var registryAuth *RegistryAuth if proto.RegistryAuth != nil { ra := RegistryAuth{} diff --git a/sdk/go/config/trigger.go b/sdk/go/config/trigger.go deleted file mode 100644 index a52fa5c5..00000000 --- a/sdk/go/config/trigger.go +++ /dev/null @@ -1,72 +0,0 @@ -package config - -import ( - "fmt" - "strings" - - proto "github.com/clintjedwards/gofer/proto/go" -) - -// TriggerWrapper type simply exists so that we can make structs with fields like "id" -// and we can still add functions called "id()". This makes it not only easier to -// reason about when working with the struct, but when just writing pipelines as an end user. -type TriggerWrapper struct { - Trigger -} - -// Trigger is a representation of a Gofer Trigger. Triggers are Gofer's way to automate pipeline -// executions. -type Trigger struct { - Name string `json:"name"` - Label string `json:"label"` - Settings map[string]string `json:"settings"` -} - -// Attach the pipeline to one of Gofer's triggers. Triggers are Gofer's way to automate pipeline -// executions. -// -// You can use `gofer triggers list` to view current triggers available. -func NewTrigger(name, label string) *TriggerWrapper { - return &TriggerWrapper{ - Trigger{ - Name: name, - Label: label, - }, - } -} - -// Add a single setting. Settings allows you to control the behavior of a trigger. -// Make sure to read the trigger's readme in order to understand which settings and their -// associated values are accepted. -func (p *TriggerWrapper) Setting(key, value string) *TriggerWrapper { - p.Trigger.Settings[fmt.Sprintf("GOFER_PLUGIN_PARAM_%s", strings.ToUpper(key))] = value - return p -} - -// Add multiple settings. Settings allows you to control the behavior of a trigger. -// Make sure to read the trigger's readme in order to understand which settings and their -// associated values are accepted. -func (p *TriggerWrapper) Settings(settings map[string]string) *TriggerWrapper { - for key, value := range settings { - p.Trigger.Settings[fmt.Sprintf("GOFER_PLUGIN_PARAM_%s", strings.ToUpper(key))] = value - } - return p -} - -func (p *TriggerWrapper) FromProto(proto *proto.PipelineTriggerConfig) { - p.Trigger.Name = proto.Name - p.Trigger.Label = proto.Label - p.Trigger.Settings = proto.Settings -} - -func (p *TriggerWrapper) Proto() *proto.PipelineTriggerConfig { - return &proto.PipelineTriggerConfig{ - Name: p.Trigger.Name, - Label: p.Trigger.Label, - Settings: p.Trigger.Settings, - } -} - -func (p *TriggerWrapper) validate() error { - return validateIdentifier("label", p.Label) -}