From 4d01e5bf52ee9bfe7e45e2512cd284f06342805d Mon Sep 17 00:00:00 2001 From: c-kruse Date: Wed, 13 Apr 2022 16:42:38 -0700 Subject: [PATCH 001/173] Always Run Staticcheck workflow (#4690) Signed-off-by: c-kruse --- .github/workflows/static-check.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/static-check.yml b/.github/workflows/static-check.yml index 824e246e0a..ad1d6bdcd9 100644 --- a/.github/workflows/static-check.yml +++ b/.github/workflows/static-check.yml @@ -1,14 +1,12 @@ name: static-check on: + pull_request: push: tags: - 'v*' branches: - main - pull_request: - branches: - - '*' jobs: staticcheck: From 01845a4574ad59148df4a0b290dd188a9429e4ee Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Thu, 14 Apr 2022 13:37:23 -0700 Subject: [PATCH 002/173] Update go modules Signed-off-by: Eric Chlebek --- api/core/v2/go.mod | 2 +- api/core/v3/go.mod | 4 ++-- api/core/v3/go.sum | 1 - types/go.mod | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/api/core/v2/go.mod b/api/core/v2/go.mod index 04061da2b0..d47d72c19c 100644 --- a/api/core/v2/go.mod +++ b/api/core/v2/go.mod @@ -1,6 +1,6 @@ module github.com/sensu/sensu-go/api/core/v2 -go 1.13 +go 1.16 require ( github.com/echlebek/crock v1.0.1 diff --git a/api/core/v3/go.mod b/api/core/v3/go.mod index 68fcf81c1d..92e27dfa06 100644 --- a/api/core/v3/go.mod +++ b/api/core/v3/go.mod @@ -1,6 +1,6 @@ module github.com/sensu/sensu-go/api/core/v3 -go 1.13 +go 1.16 replace ( github.com/sensu/sensu-go/api/core/v2 => ../v2 @@ -10,6 +10,6 @@ replace ( require ( github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.2 - github.com/sensu/sensu-go/api/core/v2 v2.9.1-alpha + github.com/sensu/sensu-go/api/core/v2 v2.14.0 github.com/sensu/sensu-go/types v0.9.1-alpha ) diff --git a/api/core/v3/go.sum b/api/core/v3/go.sum index 61ac9d33f2..ad57e54dcd 100644 --- a/api/core/v3/go.sum +++ b/api/core/v3/go.sum @@ -167,7 +167,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= diff --git a/types/go.mod b/types/go.mod index 34efca4ff4..6566e2e4b5 100644 --- a/types/go.mod +++ b/types/go.mod @@ -10,7 +10,7 @@ replace ( require ( github.com/blang/semver/v4 v4.0.0 github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff - github.com/sensu/sensu-go/api/core/v2 v2.9.1-alpha + github.com/sensu/sensu-go/api/core/v2 v2.14.0 github.com/sensu/sensu-go/api/core/v3 v3.6.1-alpha github.com/stretchr/testify v1.6.0 ) From 741af7a107d0851b81807352652aa5ab59e23717 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Thu, 14 Apr 2022 13:41:17 -0700 Subject: [PATCH 003/173] Update core/v3 and types modules Signed-off-by: Eric Chlebek --- api/core/v3/go.mod | 2 +- go.mod | 6 +++--- types/go.mod | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/core/v3/go.mod b/api/core/v3/go.mod index 92e27dfa06..2e77f716b5 100644 --- a/api/core/v3/go.mod +++ b/api/core/v3/go.mod @@ -11,5 +11,5 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.2 github.com/sensu/sensu-go/api/core/v2 v2.14.0 - github.com/sensu/sensu-go/types v0.9.1-alpha + github.com/sensu/sensu-go/types v0.10.0 ) diff --git a/go.mod b/go.mod index 7d8b817d59..1756b83112 100644 --- a/go.mod +++ b/go.mod @@ -57,9 +57,9 @@ require ( github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 - github.com/sensu/sensu-go/api/core/v2 v2.9.1-alpha - github.com/sensu/sensu-go/api/core/v3 v3.6.1-alpha - github.com/sensu/sensu-go/types v0.9.1-alpha + github.com/sensu/sensu-go/api/core/v2 v2.14.0 + github.com/sensu/sensu-go/api/core/v3 v3.6.1 + github.com/sensu/sensu-go/types v0.10.0 github.com/shirou/gopsutil/v3 v3.21.12 github.com/sirupsen/logrus v1.7.0 github.com/spf13/cobra v1.1.3 diff --git a/types/go.mod b/types/go.mod index 6566e2e4b5..dd94e83be5 100644 --- a/types/go.mod +++ b/types/go.mod @@ -11,6 +11,6 @@ require ( github.com/blang/semver/v4 v4.0.0 github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff github.com/sensu/sensu-go/api/core/v2 v2.14.0 - github.com/sensu/sensu-go/api/core/v3 v3.6.1-alpha + github.com/sensu/sensu-go/api/core/v3 v3.6.1 github.com/stretchr/testify v1.6.0 ) From 7120298632b8267a83e1d54f2a76b08f91851d05 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Wed, 20 Apr 2022 13:06:23 -0700 Subject: [PATCH 004/173] Fix types module breakage (#4698) Signed-off-by: Eric Chlebek --- types/go.sum | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/types/go.sum b/types/go.sum index 5aeedac6f9..774a68223d 100644 --- a/types/go.sum +++ b/types/go.sum @@ -49,17 +49,13 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -68,14 +64,13 @@ github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspo github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/sensu/sensu-go/api/core/v3 v3.6.1-alpha h1:IYqWVLq03FEJTRYvH0pguwVBUu70/4r3Tpp6dATs0ZY= -github.com/sensu/sensu-go/api/core/v3 v3.6.1-alpha/go.mod h1:xnd6gfPu21bESxlI9Zd6VLaVhuz/ly2P9suwMux2TDU= -github.com/sensu/sensu-go/types v0.3.0/go.mod h1:TyeO3h/82XE1KppZRFg+jKB4QYwY2hE5hbCzjnnGdRo= +github.com/sensu/sensu-go/api/core/v3 v3.6.1 h1:WJfIE8gIE9TlmkAI14FGALnOKO/O+D0BS68+HxmjmxY= +github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= +github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= From c6438e548c6f51ad9ed8c7aed039ecc902e8adfd Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Wed, 20 Apr 2022 14:38:20 -0700 Subject: [PATCH 005/173] Update CHANGELOG for 6.7.0 (#4699) Signed-off-by: Cyril Cressent --- CHANGELOG-6.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index cfb421298e..f4a80ccd6f 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -9,6 +9,8 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +## [6.7.0] - 2022-04-21 + ### Added - Automatically create system namespace and backend entities. - Generate backend events on secret provider access errors. From 815e95c59f02010908e6a48bc9648c00fab09b90 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Tue, 26 Apr 2022 11:21:17 -0700 Subject: [PATCH 006/173] [GraphQL] Correctly reference event filter in suggestions API (#4702) The suggest.Resource name must match a resource type name. In this case the event filter's type name isn't filter but event_filter and as such suggestions were never returned. Signed-off-by: James Phillips --- backend/apid/graphql/suggest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apid/graphql/suggest.go b/backend/apid/graphql/suggest.go index 384cfdaa0e..bd61905628 100644 --- a/backend/apid/graphql/suggest.go +++ b/backend/apid/graphql/suggest.go @@ -145,7 +145,7 @@ func DefaultSuggestSchema() suggest.Register { }, &suggest.Resource{ Group: "core/v2", - Name: "filter", + Name: "event_filter", FilterFunc: corev2.EventFilterFields, Fields: []suggest.Field{ &suggest.ObjectField{ From f0d290a0230cfe10ec1186a35d45e6ccd7e525b1 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Mon, 25 Apr 2022 10:36:45 -0700 Subject: [PATCH 007/173] Fix several data races in schedulerd Signed-off-by: Eric Chlebek --- backend/schedulerd/cron_scheduler.go | 7 ++++++- backend/schedulerd/interval_scheduler.go | 8 +++++++- backend/schedulerd/roundrobin_cron.go | 6 +++++- backend/schedulerd/roundrobin_interval.go | 6 +++++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/backend/schedulerd/cron_scheduler.go b/backend/schedulerd/cron_scheduler.go index 449c016063..76d9e5b181 100644 --- a/backend/schedulerd/cron_scheduler.go +++ b/backend/schedulerd/cron_scheduler.go @@ -2,6 +2,7 @@ package schedulerd import ( "context" + "sync" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/secrets" @@ -24,6 +25,7 @@ type CronScheduler struct { interrupt chan *corev2.CheckConfig entityCache *cachev2.Resource secretsProviderManager *secrets.ProviderManager + stopWg sync.WaitGroup } // NewCronScheduler initializes a CronScheduler @@ -65,10 +67,12 @@ func (s *CronScheduler) schedule(timer *CronTimer, executor *CheckExecutor) { // Start starts the cron scheduler. func (s *CronScheduler) Start() { cronCounter.WithLabelValues(s.check.Namespace).Inc() + s.stopWg.Add(1) go s.start() } func (s *CronScheduler) start() { + defer s.stopWg.Done() s.logger.Info("starting new cron scheduler") timer := NewCronTimer(s.check.Name, s.check.Cron) executor := NewCheckExecutor(s.bus, s.check.Namespace, s.store, s.entityCache, s.secretsProviderManager) @@ -101,9 +105,10 @@ func (s *CronScheduler) Interrupt(check *corev2.CheckConfig) { // Stop stops the cron scheduler. func (s *CronScheduler) Stop() error { + s.cancel() + s.stopWg.Wait() cronCounter.WithLabelValues(s.check.Namespace).Dec() logger.Info("stopping cron scheduler") - s.cancel() return nil } diff --git a/backend/schedulerd/interval_scheduler.go b/backend/schedulerd/interval_scheduler.go index 0d9bbad358..28b839562b 100644 --- a/backend/schedulerd/interval_scheduler.go +++ b/backend/schedulerd/interval_scheduler.go @@ -2,6 +2,7 @@ package schedulerd import ( "context" + "sync" corev2 "github.com/sensu/sensu-go/api/core/v2" "github.com/sensu/sensu-go/backend/messaging" @@ -23,6 +24,7 @@ type IntervalScheduler struct { interrupt chan *corev2.CheckConfig entityCache *cachev2.Resource secretsProviderManager *secrets.ProviderManager + stopWg sync.WaitGroup } // NewIntervalScheduler initializes an IntervalScheduler @@ -64,10 +66,12 @@ func (s *IntervalScheduler) schedule(timer CheckTimer, executor *CheckExecutor) // Start starts the IntervalScheduler. func (s *IntervalScheduler) Start() { intervalCounter.WithLabelValues(s.check.Namespace).Inc() + s.stopWg.Add(1) go s.start() } func (s *IntervalScheduler) start() { + defer s.stopWg.Done() s.logger.Info("starting new interval scheduler") timer := NewIntervalTimer(s.check.Name, uint(s.check.Interval)) executor := NewCheckExecutor(s.bus, s.check.Namespace, s.store, s.entityCache, s.secretsProviderManager) @@ -101,9 +105,11 @@ func (s *IntervalScheduler) Interrupt(check *corev2.CheckConfig) { // Stop stops the IntervalScheduler func (s *IntervalScheduler) Stop() error { - intervalCounter.WithLabelValues(s.check.Namespace).Dec() s.logger.Info("stopping scheduler") s.cancel() + s.stopWg.Wait() + + intervalCounter.WithLabelValues(s.check.Namespace).Dec() return nil } diff --git a/backend/schedulerd/roundrobin_cron.go b/backend/schedulerd/roundrobin_cron.go index c12e8185e8..608e3bcf7a 100644 --- a/backend/schedulerd/roundrobin_cron.go +++ b/backend/schedulerd/roundrobin_cron.go @@ -32,6 +32,7 @@ type RoundRobinCronScheduler struct { entityCache *cachev2.Resource mu sync.Mutex proxyEntities []*corev3.EntityConfig + stopWg sync.WaitGroup } // NewRoundRobinCronScheduler creates a new RoundRobinCronScheduler. @@ -61,6 +62,7 @@ func NewRoundRobinCronScheduler(ctx context.Context, store store.Store, bus mess // Start starts the scheduler. func (s *RoundRobinCronScheduler) Start() { rrCronCounter.WithLabelValues(s.check.Namespace).Inc() + s.stopWg.Add(1) go s.start() } @@ -97,6 +99,7 @@ func (s *RoundRobinCronScheduler) handleEvent(executor *CheckExecutor, event rin } func (s *RoundRobinCronScheduler) start() { + defer s.stopWg.Done() s.logger.Info("starting new round-robin cron scheduler") s.setLastState() s.updateRings() @@ -220,9 +223,10 @@ func (s *RoundRobinCronScheduler) Interrupt(check *corev2.CheckConfig) { // Stop stops the scheduler func (s *RoundRobinCronScheduler) Stop() error { - rrCronCounter.WithLabelValues(s.check.Namespace).Dec() s.logger.Info("stopping scheduler") s.cancel() + s.stopWg.Wait() + rrCronCounter.WithLabelValues(s.check.Namespace).Dec() return nil } diff --git a/backend/schedulerd/roundrobin_interval.go b/backend/schedulerd/roundrobin_interval.go index a00702c971..a9eb577ca7 100644 --- a/backend/schedulerd/roundrobin_interval.go +++ b/backend/schedulerd/roundrobin_interval.go @@ -45,6 +45,7 @@ type RoundRobinIntervalScheduler struct { entityCache *cachev2.Resource mu sync.Mutex proxyEntities []*corev3.EntityConfig + stopWg sync.WaitGroup } // NewRoundRobinIntervalScheduler initializes a RoundRobinIntervalScheduler @@ -123,6 +124,7 @@ func (s *RoundRobinIntervalScheduler) updateRings() { // Start starts the round robin interval scheduler. func (s *RoundRobinIntervalScheduler) Start() { rrIntervalCounter.WithLabelValues(s.check.Namespace).Inc() + s.stopWg.Add(1) go s.start() } @@ -174,6 +176,7 @@ func (s *RoundRobinIntervalScheduler) handleEvent(executor *CheckExecutor, event } func (s *RoundRobinIntervalScheduler) start() { + defer s.stopWg.Done() s.logger.Info("starting new round-robin interval scheduler") s.setLastState() s.updateRings() @@ -245,9 +248,10 @@ func (s *RoundRobinIntervalScheduler) Interrupt(check *corev2.CheckConfig) { // Stop stops the scheduler func (s *RoundRobinIntervalScheduler) Stop() error { - rrIntervalCounter.WithLabelValues(s.check.Namespace).Dec() s.logger.Info("stopping scheduler") s.cancel() + s.stopWg.Wait() + rrIntervalCounter.WithLabelValues(s.check.Namespace).Dec() return nil } From 0a77f95a80f254068a9c6e1c16cf5ffd3298166f Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Tue, 26 Apr 2022 13:52:39 -0700 Subject: [PATCH 008/173] Mitigate a data race in agentd sessions Signed-off-by: Eric Chlebek --- backend/agentd/session.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/agentd/session.go b/backend/agentd/session.go index a510348db4..595651675c 100644 --- a/backend/agentd/session.go +++ b/backend/agentd/session.go @@ -577,6 +577,8 @@ func (s *Session) stop() { logger.WithError(err).Error("error closing session") } }() + defer close(s.entityConfig.updatesChannel) + defer close(s.checkChannel) sessionCounter.WithLabelValues(s.cfg.Namespace).Dec() @@ -593,9 +595,6 @@ func (s *Session) stop() { sessionErrorCounter.WithLabelValues("GracePeriodExpired").Inc() } - close(s.entityConfig.updatesChannel) - close(s.checkChannel) - // Remove the entity config subscriptions for sub := range s.entityConfig.subscriptions { if err := sub.Cancel(); err != nil { From e55455b8d72024f309d22f34652332585e806a67 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Wed, 27 Apr 2022 01:33:57 -0700 Subject: [PATCH 009/173] Log that cron is stopping before stopping it Signed-off-by: Eric Chlebek --- backend/schedulerd/cron_scheduler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/schedulerd/cron_scheduler.go b/backend/schedulerd/cron_scheduler.go index 76d9e5b181..4c925bc131 100644 --- a/backend/schedulerd/cron_scheduler.go +++ b/backend/schedulerd/cron_scheduler.go @@ -105,10 +105,10 @@ func (s *CronScheduler) Interrupt(check *corev2.CheckConfig) { // Stop stops the cron scheduler. func (s *CronScheduler) Stop() error { + logger.Info("stopping cron scheduler") s.cancel() s.stopWg.Wait() cronCounter.WithLabelValues(s.check.Namespace).Dec() - logger.Info("stopping cron scheduler") return nil } From 052d3bfbc8f2283471e3629f0b8baf5dd275a231 Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Thu, 28 Apr 2022 12:27:41 -0700 Subject: [PATCH 010/173] Add develop/ and release/ to AppVeyor config Signed-off-by: Cyril Cressent --- .appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index cc617a94bd..ad2f8d8a54 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -3,6 +3,8 @@ clone_folder: c:\gopath\src\github.com\sensu\sensu-go branches: only: - main + - /develop\/[0-9.]+/ + - /release\/[0-9.]+/ image: - Visual Studio 2015 From caf7b2aa193bbf831a3f7cc1a4777c83a3a644f2 Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Thu, 28 Apr 2022 12:27:41 -0700 Subject: [PATCH 011/173] Add develop/ and release/ to AppVeyor config Signed-off-by: Cyril Cressent --- .appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index cc617a94bd..ad2f8d8a54 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -3,6 +3,8 @@ clone_folder: c:\gopath\src\github.com\sensu\sensu-go branches: only: - main + - /develop\/[0-9.]+/ + - /release\/[0-9.]+/ image: - Visual Studio 2015 From 1cd8df1ecc059c934f211907c10c0a3729769db2 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Mon, 25 Apr 2022 10:36:45 -0700 Subject: [PATCH 012/173] Fix several data races in schedulerd Signed-off-by: Eric Chlebek --- backend/schedulerd/cron_scheduler.go | 7 ++++++- backend/schedulerd/interval_scheduler.go | 8 +++++++- backend/schedulerd/roundrobin_cron.go | 6 +++++- backend/schedulerd/roundrobin_interval.go | 6 +++++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/backend/schedulerd/cron_scheduler.go b/backend/schedulerd/cron_scheduler.go index 449c016063..76d9e5b181 100644 --- a/backend/schedulerd/cron_scheduler.go +++ b/backend/schedulerd/cron_scheduler.go @@ -2,6 +2,7 @@ package schedulerd import ( "context" + "sync" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/secrets" @@ -24,6 +25,7 @@ type CronScheduler struct { interrupt chan *corev2.CheckConfig entityCache *cachev2.Resource secretsProviderManager *secrets.ProviderManager + stopWg sync.WaitGroup } // NewCronScheduler initializes a CronScheduler @@ -65,10 +67,12 @@ func (s *CronScheduler) schedule(timer *CronTimer, executor *CheckExecutor) { // Start starts the cron scheduler. func (s *CronScheduler) Start() { cronCounter.WithLabelValues(s.check.Namespace).Inc() + s.stopWg.Add(1) go s.start() } func (s *CronScheduler) start() { + defer s.stopWg.Done() s.logger.Info("starting new cron scheduler") timer := NewCronTimer(s.check.Name, s.check.Cron) executor := NewCheckExecutor(s.bus, s.check.Namespace, s.store, s.entityCache, s.secretsProviderManager) @@ -101,9 +105,10 @@ func (s *CronScheduler) Interrupt(check *corev2.CheckConfig) { // Stop stops the cron scheduler. func (s *CronScheduler) Stop() error { + s.cancel() + s.stopWg.Wait() cronCounter.WithLabelValues(s.check.Namespace).Dec() logger.Info("stopping cron scheduler") - s.cancel() return nil } diff --git a/backend/schedulerd/interval_scheduler.go b/backend/schedulerd/interval_scheduler.go index 0d9bbad358..28b839562b 100644 --- a/backend/schedulerd/interval_scheduler.go +++ b/backend/schedulerd/interval_scheduler.go @@ -2,6 +2,7 @@ package schedulerd import ( "context" + "sync" corev2 "github.com/sensu/sensu-go/api/core/v2" "github.com/sensu/sensu-go/backend/messaging" @@ -23,6 +24,7 @@ type IntervalScheduler struct { interrupt chan *corev2.CheckConfig entityCache *cachev2.Resource secretsProviderManager *secrets.ProviderManager + stopWg sync.WaitGroup } // NewIntervalScheduler initializes an IntervalScheduler @@ -64,10 +66,12 @@ func (s *IntervalScheduler) schedule(timer CheckTimer, executor *CheckExecutor) // Start starts the IntervalScheduler. func (s *IntervalScheduler) Start() { intervalCounter.WithLabelValues(s.check.Namespace).Inc() + s.stopWg.Add(1) go s.start() } func (s *IntervalScheduler) start() { + defer s.stopWg.Done() s.logger.Info("starting new interval scheduler") timer := NewIntervalTimer(s.check.Name, uint(s.check.Interval)) executor := NewCheckExecutor(s.bus, s.check.Namespace, s.store, s.entityCache, s.secretsProviderManager) @@ -101,9 +105,11 @@ func (s *IntervalScheduler) Interrupt(check *corev2.CheckConfig) { // Stop stops the IntervalScheduler func (s *IntervalScheduler) Stop() error { - intervalCounter.WithLabelValues(s.check.Namespace).Dec() s.logger.Info("stopping scheduler") s.cancel() + s.stopWg.Wait() + + intervalCounter.WithLabelValues(s.check.Namespace).Dec() return nil } diff --git a/backend/schedulerd/roundrobin_cron.go b/backend/schedulerd/roundrobin_cron.go index c12e8185e8..608e3bcf7a 100644 --- a/backend/schedulerd/roundrobin_cron.go +++ b/backend/schedulerd/roundrobin_cron.go @@ -32,6 +32,7 @@ type RoundRobinCronScheduler struct { entityCache *cachev2.Resource mu sync.Mutex proxyEntities []*corev3.EntityConfig + stopWg sync.WaitGroup } // NewRoundRobinCronScheduler creates a new RoundRobinCronScheduler. @@ -61,6 +62,7 @@ func NewRoundRobinCronScheduler(ctx context.Context, store store.Store, bus mess // Start starts the scheduler. func (s *RoundRobinCronScheduler) Start() { rrCronCounter.WithLabelValues(s.check.Namespace).Inc() + s.stopWg.Add(1) go s.start() } @@ -97,6 +99,7 @@ func (s *RoundRobinCronScheduler) handleEvent(executor *CheckExecutor, event rin } func (s *RoundRobinCronScheduler) start() { + defer s.stopWg.Done() s.logger.Info("starting new round-robin cron scheduler") s.setLastState() s.updateRings() @@ -220,9 +223,10 @@ func (s *RoundRobinCronScheduler) Interrupt(check *corev2.CheckConfig) { // Stop stops the scheduler func (s *RoundRobinCronScheduler) Stop() error { - rrCronCounter.WithLabelValues(s.check.Namespace).Dec() s.logger.Info("stopping scheduler") s.cancel() + s.stopWg.Wait() + rrCronCounter.WithLabelValues(s.check.Namespace).Dec() return nil } diff --git a/backend/schedulerd/roundrobin_interval.go b/backend/schedulerd/roundrobin_interval.go index a00702c971..a9eb577ca7 100644 --- a/backend/schedulerd/roundrobin_interval.go +++ b/backend/schedulerd/roundrobin_interval.go @@ -45,6 +45,7 @@ type RoundRobinIntervalScheduler struct { entityCache *cachev2.Resource mu sync.Mutex proxyEntities []*corev3.EntityConfig + stopWg sync.WaitGroup } // NewRoundRobinIntervalScheduler initializes a RoundRobinIntervalScheduler @@ -123,6 +124,7 @@ func (s *RoundRobinIntervalScheduler) updateRings() { // Start starts the round robin interval scheduler. func (s *RoundRobinIntervalScheduler) Start() { rrIntervalCounter.WithLabelValues(s.check.Namespace).Inc() + s.stopWg.Add(1) go s.start() } @@ -174,6 +176,7 @@ func (s *RoundRobinIntervalScheduler) handleEvent(executor *CheckExecutor, event } func (s *RoundRobinIntervalScheduler) start() { + defer s.stopWg.Done() s.logger.Info("starting new round-robin interval scheduler") s.setLastState() s.updateRings() @@ -245,9 +248,10 @@ func (s *RoundRobinIntervalScheduler) Interrupt(check *corev2.CheckConfig) { // Stop stops the scheduler func (s *RoundRobinIntervalScheduler) Stop() error { - rrIntervalCounter.WithLabelValues(s.check.Namespace).Dec() s.logger.Info("stopping scheduler") s.cancel() + s.stopWg.Wait() + rrIntervalCounter.WithLabelValues(s.check.Namespace).Dec() return nil } From aced91354db5902f6fa44066b0a0e3cbe8e48ffe Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Tue, 26 Apr 2022 13:52:39 -0700 Subject: [PATCH 013/173] Mitigate a data race in agentd sessions Signed-off-by: Eric Chlebek --- backend/agentd/session.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/agentd/session.go b/backend/agentd/session.go index a510348db4..595651675c 100644 --- a/backend/agentd/session.go +++ b/backend/agentd/session.go @@ -577,6 +577,8 @@ func (s *Session) stop() { logger.WithError(err).Error("error closing session") } }() + defer close(s.entityConfig.updatesChannel) + defer close(s.checkChannel) sessionCounter.WithLabelValues(s.cfg.Namespace).Dec() @@ -593,9 +595,6 @@ func (s *Session) stop() { sessionErrorCounter.WithLabelValues("GracePeriodExpired").Inc() } - close(s.entityConfig.updatesChannel) - close(s.checkChannel) - // Remove the entity config subscriptions for sub := range s.entityConfig.subscriptions { if err := sub.Cancel(); err != nil { From 8e68ed5603bf8941529adac908eec12f67089e0a Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Wed, 27 Apr 2022 01:33:57 -0700 Subject: [PATCH 014/173] Log that cron is stopping before stopping it Signed-off-by: Eric Chlebek --- backend/schedulerd/cron_scheduler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/schedulerd/cron_scheduler.go b/backend/schedulerd/cron_scheduler.go index 76d9e5b181..4c925bc131 100644 --- a/backend/schedulerd/cron_scheduler.go +++ b/backend/schedulerd/cron_scheduler.go @@ -105,10 +105,10 @@ func (s *CronScheduler) Interrupt(check *corev2.CheckConfig) { // Stop stops the cron scheduler. func (s *CronScheduler) Stop() error { + logger.Info("stopping cron scheduler") s.cancel() s.stopWg.Wait() cronCounter.WithLabelValues(s.check.Namespace).Dec() - logger.Info("stopping cron scheduler") return nil } From 8b21ba553abbeb785f303a8d66e5d290b2ed0099 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 28 Apr 2022 12:37:32 -0700 Subject: [PATCH 015/173] update changelog for 6.7.1 Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index f4a80ccd6f..8df8407182 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -1,5 +1,3 @@ - - # Changelog All notable changes to this project will be documented in this file. @@ -9,6 +7,16 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +## [6.7.1] - 2022-04-28 + +### Changed +- Cron scheduler now logs that it is stopping before it begins the process of +stopping. + +### Fixed +- Fixed several data races in schedulerd. +- Mitigate a data race in agentd sessions. + ## [6.7.0] - 2022-04-21 ### Added From ac3387abab706a6ab49e94a9ab5d05e8b2aa2c2f Mon Sep 17 00:00:00 2001 From: c-kruse Date: Fri, 29 Apr 2022 10:02:02 -0700 Subject: [PATCH 016/173] Add core/v3 support for global resources (#4700) * Add core/v3 support for global resources Adds a GlobalResource interface that corev3 Resoruces can optionally implement to indicate they are not namespaced. Also updates the V2ResourceProxy to honor the core/v2 behavior of no-op SetNamespace implementations to indicate a resource is global. Signed-off-by: c-kruse * update types package as well Signed-off-by: c-kruse * update changelog Signed-off-by: c-kruse --- CHANGELOG-6.md | 3 ++ api/core/v3/resource.go | 16 +++++++ api/core/v3/resource_test.go | 37 ++++++++++++---- types/compat/compat.go | 12 +++++- types/compat/compat_test.go | 81 ++++++++++++++++++++++++++++++++++++ types/go.mod | 1 + 6 files changed, 142 insertions(+), 8 deletions(-) create mode 100644 types/compat/compat_test.go diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 8df8407182..d2c910ccee 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -16,6 +16,9 @@ stopping. ### Fixed - Fixed several data races in schedulerd. - Mitigate a data race in agentd sessions. +### Added +- GlobalResource interface in core/v3 allows core/v3 resources to +be marked as global resources. ## [6.7.0] - 2022-04-21 diff --git a/api/core/v3/resource.go b/api/core/v3/resource.go index ae2eea4476..7c6fd0fb44 100644 --- a/api/core/v3/resource.go +++ b/api/core/v3/resource.go @@ -37,6 +37,14 @@ type GeneratedType interface { Validate() error } +// GlobalResource is an interface for indicating +// a resource's namespace strategy +type GlobalResource interface { + // IsGlobalResource returns true when the resource + // is not namespaced. + IsGlobalResource() bool +} + // V2ResourceProxy is a compatibility shim for converting from a v3 resource to // a v2 resource. //sensu:nogen @@ -64,6 +72,14 @@ func (v *V2ResourceProxy) SetObjectMeta(meta corev2.ObjectMeta) { } func (v *V2ResourceProxy) SetNamespace(ns string) { + // SetNamespace expected to be a no-op for + // core/v2 Resources. sensu-go and sensu-go/types + // both depend on this property. + if gr, ok := v.Resource.(GlobalResource); ok { + if gr.IsGlobalResource() { + return + } + } if v.GetMetadata() == nil { v.SetMetadata(&corev2.ObjectMeta{ Labels: make(map[string]string), diff --git a/api/core/v3/resource_test.go b/api/core/v3/resource_test.go index bc896ac04c..73ede058b3 100644 --- a/api/core/v3/resource_test.go +++ b/api/core/v3/resource_test.go @@ -14,11 +14,9 @@ type testResource struct { meta *corev2.ObjectMeta } -func (t testResource) GetMetadata() *corev2.ObjectMeta { +func (t *testResource) GetMetadata() *corev2.ObjectMeta { if t.meta == nil { t.meta = &corev2.ObjectMeta{ - Name: "foo", - Namespace: "default", Labels: make(map[string]string), Annotations: make(map[string]string), } @@ -26,8 +24,8 @@ func (t testResource) GetMetadata() *corev2.ObjectMeta { return t.meta } -func (t testResource) SetMetadata(meta *corev2.ObjectMeta) { - t.meta = meta //nolint:staticcheck +func (t *testResource) SetMetadata(meta *corev2.ObjectMeta) { + t.meta = meta } func (t testResource) StoreName() string { @@ -46,8 +44,14 @@ func (t testResource) Validate() error { return errors.New("invalid resource") } +type globalTestResource struct { + testResource +} + +func (g globalTestResource) IsGlobalResource() bool { return true } + func TestV3ToV2Resource(t *testing.T) { - resource := testResource{} + resource := &testResource{} corev2Resource := V3ToV2Resource(resource) if got, want := corev2Resource.GetObjectMeta(), resource.GetMetadata(); !proto.Equal(&got, want) { @@ -60,9 +64,12 @@ func TestV3ToV2Resource(t *testing.T) { } corev2Resource.SetNamespace("baz") - if got, want := resource.GetMetadata().Namespace, corev2Resource.GetObjectMeta().Namespace; got != want { + if got, want := corev2Resource.GetObjectMeta().Namespace, "baz"; got != want { t.Errorf("SetNamespace had wrong effect: got Namespace %s, want %s", got, want) } + if got, want := resource.GetMetadata().Namespace, corev2Resource.GetObjectMeta().Namespace; got != want { + t.Errorf("SetNamespace operation was not proxied: got Namespace %s, want %s", got, want) + } if got, want := corev2Resource.StorePrefix(), resource.StoreName(); got != want { t.Errorf("bad StorePrefix: got %s, want %s", got, want) @@ -79,4 +86,20 @@ func TestV3ToV2Resource(t *testing.T) { if got, want := corev2Resource.Validate().Error(), resource.Validate().Error(); got != want { t.Errorf("bad Validate(): got %s, want %s", got, want) } + + // test global resoruce + globalResource := &globalTestResource{} + globalCorev2Resource := V3ToV2Resource(globalResource) + globalCorev2Resource.SetObjectMeta(corev2.ObjectMeta{Name: "oof"}) + if got, want := globalCorev2Resource.GetObjectMeta().Name, "oof"; got != want { + t.Errorf("SetMetadata had wrong effect: got Name %s, want %s", got, want) + } + if got, want := globalResource.GetMetadata().Name, globalCorev2Resource.GetObjectMeta().Name; got != want { + t.Errorf("SetMetadata was not proxied: got Name %s, want %s", got, want) + } + + globalCorev2Resource.SetNamespace("baz") + if got, want := globalCorev2Resource.GetObjectMeta().Namespace, ""; got != want { + t.Errorf("SetNamespace had wrong effect: got Namespace %s, want %s", got, want) + } } diff --git a/types/compat/compat.go b/types/compat/compat.go index 4bc3180cdb..3f35a35bfa 100644 --- a/types/compat/compat.go +++ b/types/compat/compat.go @@ -39,7 +39,17 @@ func SetNamespace(value interface{}, namespace string) { case corev2.Resource: value.SetNamespace(namespace) case corev3.Resource: - value.GetMetadata().Namespace = namespace + if gr, ok := value.(corev3.GlobalResource); ok && gr.IsGlobalResource() { + // replicate corev2.Resource behavior where SetNamespace is no-op + // for global resources + return + } + meta := value.GetMetadata() + if meta == nil { + meta = &corev2.ObjectMeta{} + value.SetMetadata(meta) + } + meta.Namespace = namespace default: // impossible unless the type resolver is broken. fatal error. panic("got neither corev2 resource nor corev3 resource") diff --git a/types/compat/compat_test.go b/types/compat/compat_test.go new file mode 100644 index 0000000000..0be12b1ebf --- /dev/null +++ b/types/compat/compat_test.go @@ -0,0 +1,81 @@ +package compat + +import ( + "testing" + + corev2 "github.com/sensu/sensu-go/api/core/v2" + corev3 "github.com/sensu/sensu-go/api/core/v3" +) + +func TestSetNamespace(t *testing.T) { + tests := []struct { + Name string + Resource interface{} + Namespace string + Expected string + }{ + { + Name: "namespaced corev2 resource", + Resource: new(testCoreV2Resoruce), + Namespace: "test", + Expected: "test", + }, { + Name: "global corev2 resource", + Resource: new(testCoreV2GlobalResoruce), + Namespace: "test", + Expected: "", + }, { + Name: "namespaced corev3 resource", + Resource: new(testCoreV3Resoruce), + Namespace: "test", + Expected: "test", + }, { + Name: "global corev3 resource", + Resource: new(testCoreV3GlobalResoruce), + Namespace: "test", + Expected: "", + }, + } + for _, tc := range tests { + t.Run(tc.Name, func(t *testing.T) { + SetNamespace(tc.Resource, tc.Namespace) + var namespace string + if meta := GetObjectMeta(tc.Resource); meta != nil { + namespace = meta.Namespace + } + if got, want := namespace, tc.Expected; got != want { + t.Errorf("SetNamespace had incorrect effect. got: %s, want: %s", got, want) + } + }) + } +} + +type testCoreV3Resoruce struct { + corev3.EntityConfig +} + +type testCoreV3GlobalResoruce struct { + corev3.EntityConfig +} + +func (t *testCoreV3GlobalResoruce) IsGlobalResource() bool { + return true +} + +type testCoreV2Resoruce struct { + corev2.Entity +} + +type testCoreV2GlobalResoruce struct { + corev2.Entity +} + +func (t *testCoreV2GlobalResoruce) SetNamespace(namespace string) {} + +// compile time assertions that test types +// implement expected interfaces +var _ corev3.Resource = new(testCoreV3Resoruce) +var _ corev3.Resource = new(testCoreV3GlobalResoruce) +var _ corev3.GlobalResource = new(testCoreV3GlobalResoruce) +var _ corev2.Resource = new(testCoreV2Resoruce) +var _ corev2.Resource = new(testCoreV2GlobalResoruce) diff --git a/types/go.mod b/types/go.mod index dd94e83be5..897eb5f6dc 100644 --- a/types/go.mod +++ b/types/go.mod @@ -5,6 +5,7 @@ go 1.13 replace ( github.com/sensu/sensu-go => ../ github.com/sensu/sensu-go/api/core/v2 => ../api/core/v2 + github.com/sensu/sensu-go/api/core/v3 => ../api/core/v3 ) require ( From a9ed2427d4ca435d5107024cfca87a64d3878685 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Fri, 29 Apr 2022 12:21:58 -0700 Subject: [PATCH 017/173] Fix Changelog Merge (#4716) ac3387abab was merged with its changelog entry under the 6.7.1 release. This moves it back to unreleased Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index d2c910ccee..2360b13555 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,6 +7,10 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +### Added +- GlobalResource interface in core/v3 allows core/v3 resources to +be marked as global resources. + ## [6.7.1] - 2022-04-28 ### Changed @@ -16,9 +20,6 @@ stopping. ### Fixed - Fixed several data races in schedulerd. - Mitigate a data race in agentd sessions. -### Added -- GlobalResource interface in core/v3 allows core/v3 resources to -be marked as global resources. ## [6.7.0] - 2022-04-21 From 163a6ebf71c915b9ef749a6b08c6da535a3f4e79 Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Tue, 3 May 2022 11:00:47 -0700 Subject: [PATCH 018/173] Parametrize go version in CircleCI config (#4715) The goal is to have a format that's similar to the one in sensu-go-enterprise and make certain operations, like grepping for the go version, easier across both repositories. (cherry picked from commit 22d167808dbca4d32a5762a509a527bdb44dac04) Signed-off-by: Cyril Cressent --- .circleci/config.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1abf2f747c..13fe906987 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,9 +3,14 @@ version: 2.1 orbs: go: circleci/go@1.1.2 +parameters: + go_version: + type: string + default: "1.17.6" + sensu_go_build_env: &sensu_go_build_env docker: - - image: cimg/go:1.17.6 + - image: cimg/go:<< pipeline.parameters.go_version >> auth: username: $DOCKER_USERNAME password: $DOCKER_PASSWORD From 242b19bcd13a99a457d3406e92cb813e033ed5f7 Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Tue, 3 May 2022 11:00:47 -0700 Subject: [PATCH 019/173] Parametrize go version in CircleCI config (#4715) The goal is to have a format that's similar to the one in sensu-go-enterprise and make certain operations, like grepping for the go version, easier across both repositories. (cherry picked from commit 22d167808dbca4d32a5762a509a527bdb44dac04) Signed-off-by: Cyril Cressent --- .circleci/config.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1abf2f747c..13fe906987 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,9 +3,14 @@ version: 2.1 orbs: go: circleci/go@1.1.2 +parameters: + go_version: + type: string + default: "1.17.6" + sensu_go_build_env: &sensu_go_build_env docker: - - image: cimg/go:1.17.6 + - image: cimg/go:<< pipeline.parameters.go_version >> auth: username: $DOCKER_USERNAME password: $DOCKER_PASSWORD From f184bd62b9d59c18794ced4f20edc804fac9c4a4 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Wed, 4 May 2022 09:33:37 -0700 Subject: [PATCH 020/173] Bump sensu-go and types api/core/v3 dependency to v3.6.2 (#4717) Signed-off-by: Christian Kruse --- go.mod | 2 +- types/go.mod | 2 +- types/go.sum | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 1756b83112..f146df46f1 100644 --- a/go.mod +++ b/go.mod @@ -58,7 +58,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 github.com/sensu/sensu-go/api/core/v2 v2.14.0 - github.com/sensu/sensu-go/api/core/v3 v3.6.1 + github.com/sensu/sensu-go/api/core/v3 v3.6.2 github.com/sensu/sensu-go/types v0.10.0 github.com/shirou/gopsutil/v3 v3.21.12 github.com/sirupsen/logrus v1.7.0 diff --git a/types/go.mod b/types/go.mod index 897eb5f6dc..a0ecb645ad 100644 --- a/types/go.mod +++ b/types/go.mod @@ -12,6 +12,6 @@ require ( github.com/blang/semver/v4 v4.0.0 github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff github.com/sensu/sensu-go/api/core/v2 v2.14.0 - github.com/sensu/sensu-go/api/core/v3 v3.6.1 + github.com/sensu/sensu-go/api/core/v3 v3.6.2 github.com/stretchr/testify v1.6.0 ) diff --git a/types/go.sum b/types/go.sum index 774a68223d..5b3dd96270 100644 --- a/types/go.sum +++ b/types/go.sum @@ -64,8 +64,6 @@ github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspo github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/sensu/sensu-go/api/core/v3 v3.6.1 h1:WJfIE8gIE9TlmkAI14FGALnOKO/O+D0BS68+HxmjmxY= -github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= From a049763ebbd2078551e9627f7f351ec3e90d0933 Mon Sep 17 00:00:00 2001 From: Francis Guimond Date: Mon, 9 May 2022 14:00:36 -0400 Subject: [PATCH 021/173] Round Robin Postgres Scheduler (#4736) * Round-robin scheduling for Postgres * print ring source (etcd or postgres) correctly in scheduler Signed-off-by: Francis Guimond --- CHANGELOG-6.md | 3 ++ backend/ringv2/ringv2.go | 7 +++- backend/ringv2/ringv2_test.go | 45 +++++++++++++---------- backend/schedulerd/roundrobin_interval.go | 11 ++++-- 4 files changed, 41 insertions(+), 25 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 8df8407182..f127e2b911 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,6 +7,9 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +### Fixed +- Print the correct round robin scheduler source (etcd or postgres). + ## [6.7.1] - 2022-04-28 ### Changed diff --git a/backend/ringv2/ringv2.go b/backend/ringv2/ringv2.go index fb88e2b68d..622ef9a755 100644 --- a/backend/ringv2/ringv2.go +++ b/backend/ringv2/ringv2.go @@ -101,6 +101,9 @@ type Event struct { // Err is any error that occurred while processing the event. Err error + + // Source is the notification source + Source string } // Ring is a circular queue of items that are cooperatively iterated over by one @@ -534,7 +537,7 @@ func (r *Ring) startWatchers(ctx context.Context, ch chan Event, name string, va func notifyClosing(ctx context.Context, ch chan<- Event) { select { - case ch <- Event{Type: EventClosing}: + case ch <- Event{Type: EventClosing, Source: "etcd"}: case <-ctx.Done(): } close(ch) @@ -680,6 +683,7 @@ func notifyAddRemove(ch chan<- Event, response clientv3.WatchResponse) { ch <- Event{ Type: eventType, Values: []string{path.Base(string(event.Kv.Key))}, + Source: "etcd", } } } @@ -699,6 +703,7 @@ func notifyTrigger(ch chan<- Event, items []*mvccpb.KeyValue) { event := Event{ Type: EventTrigger, Values: values, + Source: "etcd", } ch <- event } diff --git a/backend/ringv2/ringv2_test.go b/backend/ringv2/ringv2_test.go index d4fcbfd6a5..99d2c4dcc7 100644 --- a/backend/ringv2/ringv2_test.go +++ b/backend/ringv2/ringv2_test.go @@ -85,6 +85,7 @@ func TestWatchAddRemove(t *testing.T) { want := Event{ Type: EventAdd, Values: []string{"foo"}, + Source: "etcd", } if !reflect.DeepEqual(got, want) { @@ -100,6 +101,7 @@ func TestWatchAddRemove(t *testing.T) { want = Event{ Type: EventRemove, Values: []string{"foo"}, + Source: "etcd", } if !reflect.DeepEqual(got, want) { @@ -140,6 +142,7 @@ func TestWatchTrigger(t *testing.T) { want := Event{ Type: EventTrigger, Values: []string{"foo"}, + Source: "etcd", } if !reflect.DeepEqual(got, want) { t.Fatalf("bad event: got %v, want %v", got, want) @@ -188,6 +191,7 @@ func TestRingOrdering(t *testing.T) { want := Event{ Type: EventTrigger, Values: []string{items[i%len(items)]}, + Source: "etcd", } if !reflect.DeepEqual(got, want) { t.Fatalf("bad event: got %v, want %v", got, want) @@ -237,6 +241,7 @@ func TestConcurrentRingOrdering(t *testing.T) { want := Event{ Type: EventAdd, Values: []string{items[i]}, + Source: "etcd", } if !reflect.DeepEqual(got, want) { @@ -261,11 +266,11 @@ func TestConcurrentRingOrdering(t *testing.T) { wg.Wait() exp := []Event{ - {Type: EventTrigger, Values: []string{"mulder"}}, - {Type: EventTrigger, Values: []string{"scully"}}, - {Type: EventTrigger, Values: []string{"skinner"}}, - {Type: EventTrigger, Values: []string{"mulder"}}, - {Type: EventTrigger, Values: []string{"scully"}}, + {Type: EventTrigger, Values: []string{"mulder"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"scully"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"skinner"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"mulder"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"scully"}, Source: "etcd"}, } for i := range events { @@ -323,25 +328,25 @@ func eventTest(t *testing.T, want []Event) { func TestRemoveNextTrigger(t *testing.T) { eventTest(t, []Event{ - {Type: EventAdd, Values: []string{"mulder"}}, - {Type: EventAdd, Values: []string{"scully"}}, - {Type: EventAdd, Values: []string{"skinner"}}, - {Type: EventTrigger, Values: []string{"mulder"}}, - {Type: EventTrigger, Values: []string{"scully"}}, - {Type: EventRemove, Values: []string{"skinner"}}, - {Type: EventTrigger, Values: []string{"mulder"}}, + {Type: EventAdd, Values: []string{"mulder"}, Source: "etcd"}, + {Type: EventAdd, Values: []string{"scully"}, Source: "etcd"}, + {Type: EventAdd, Values: []string{"skinner"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"mulder"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"scully"}, Source: "etcd"}, + {Type: EventRemove, Values: []string{"skinner"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"mulder"}, Source: "etcd"}, }) } func TestWatchAndAddAfter(t *testing.T) { eventTest(t, []Event{ - {Type: EventAdd, Values: []string{"byers"}}, - {Type: EventAdd, Values: []string{"frohike"}}, - {Type: EventTrigger, Values: []string{"byers"}}, - {Type: EventAdd, Values: []string{"langly"}}, - {Type: EventTrigger, Values: []string{"frohike"}}, - {Type: EventTrigger, Values: []string{"langly"}}, - {Type: EventTrigger, Values: []string{"byers"}}, + {Type: EventAdd, Values: []string{"byers"}, Source: "etcd"}, + {Type: EventAdd, Values: []string{"frohike"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"byers"}, Source: "etcd"}, + {Type: EventAdd, Values: []string{"langly"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"frohike"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"langly"}, Source: "etcd"}, + {Type: EventTrigger, Values: []string{"byers"}, Source: "etcd"}, }) } @@ -366,7 +371,7 @@ func TestWatchAfterAdd(t *testing.T) { wc := ring.Watch(ctx, "test", 1, 5, "") got := <-wc - want := Event{Type: EventTrigger, Values: []string{"fowley"}} + want := Event{Type: EventTrigger, Values: []string{"fowley"}, Source: "etcd"} if !reflect.DeepEqual(got, want) { t.Fatalf("bad event: got %v, want %v", got, want) diff --git a/backend/schedulerd/roundrobin_interval.go b/backend/schedulerd/roundrobin_interval.go index a9eb577ca7..d6f34d9551 100644 --- a/backend/schedulerd/roundrobin_interval.go +++ b/backend/schedulerd/roundrobin_interval.go @@ -146,16 +146,18 @@ func getAgentEntity(event ringv2.Event) string { func (s *RoundRobinIntervalScheduler) handleEvent(executor *CheckExecutor, event ringv2.Event) { switch event.Type { case ringv2.EventError: - s.logger.WithError(event.Err).Error("error scheduling check") + s.logger.WithFields(logrus.Fields{"source": event.Source}).WithError(event.Err).Error("error scheduling check") case ringv2.EventAdd: s.logger.WithFields(logrus.Fields{ "agent_entity": getAgentEntity(event), + "source": event.Source, }).Info("adding entity to round-robin") case ringv2.EventRemove: s.logger.WithFields(logrus.Fields{ "agent_entity": getAgentEntity(event), + "source": event.Source, }).Info("removing entity from round-robin") case ringv2.EventTrigger: @@ -165,9 +167,9 @@ func (s *RoundRobinIntervalScheduler) handleEvent(executor *CheckExecutor, event } // The ring has produced a trigger for the entity, and a check should // be executed. - s.logger.WithFields(logrus.Fields{"agents": event.Values}).Info("executing round robin check on agents") + s.logger.WithFields(logrus.Fields{"agents": event.Values, "source": event.Source}).Info("executing round robin check on agents") s.mu.Lock() - s.schedule(executor, s.proxyEntities, event.Values) + s.schedule(executor, s.proxyEntities, event.Values, event.Source) s.mu.Unlock() case ringv2.EventClosing: @@ -201,7 +203,7 @@ func (s *RoundRobinIntervalScheduler) start() { } } -func (s *RoundRobinIntervalScheduler) schedule(executor *CheckExecutor, proxyEntities []*corev3.EntityConfig, agentEntities []string) { +func (s *RoundRobinIntervalScheduler) schedule(executor *CheckExecutor, proxyEntities []*corev3.EntityConfig, agentEntities []string, source string) { if s.check.IsSubdued() { s.logger.Debug("check is subdued") return @@ -209,6 +211,7 @@ func (s *RoundRobinIntervalScheduler) schedule(executor *CheckExecutor, proxyEnt s.logger.Debug("check is not subdued") + s.check.Scheduler = source if err := processRoundRobinCheck(s.ctx, executor, s.check, proxyEntities, agentEntities); err != nil { logger.WithError(err).Error("error executing check") } From 9f8454abc406eb8d9079edd47e87bb448d44a36d Mon Sep 17 00:00:00 2001 From: Sean Porter Date: Tue, 10 May 2022 16:14:52 -0700 Subject: [PATCH 022/173] etcd-unsafe-no-fsync pass-through etcd option flag (#4696) * etcd-unsafe-no-fsync pass-through etcd option flag Signed-off-by: Sean Porter * remove UnsafeNoFsync conditional Signed-off-by: Sean Porter * fixed unsafe flag usage Signed-off-by: Sean Porter * added etcd-unsafe-no-fsync to store flag category Signed-off-by: Sean Porter * etcd-unsafe-no-fsync changelog entry Signed-off-by: Sean Porter --- CHANGELOG-6.md | 6 ++++++ backend/backend.go | 3 +++ backend/cmd/start.go | 8 ++++++++ backend/config.go | 3 +++ backend/etcd/etcd.go | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index f127e2b911..2f93698bd3 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,6 +7,12 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +### Added +- Added the `etcd-unsafe-no-fsync` backend configuration option, +making it possible to run a sensu-backend with an embedded etcd node +for testing and development without placing lots of load on the file +system. + ### Fixed - Print the correct round robin scheduler source (etcd or postgres). diff --git a/backend/backend.go b/backend/backend.go index 450c490fb1..c23d8f997a 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -275,6 +275,9 @@ func newClient(ctx context.Context, config *Config, backend *Backend) (*clientv3 cfg.MaxRequestBytes = config.EtcdMaxRequestBytes } + // Unsafe config + cfg.UnsafeNoFsync = config.EtcdUnsafeNoFsync + // Start etcd e, err := etcd.NewEtcd(cfg) if err != nil { diff --git a/backend/cmd/start.go b/backend/cmd/start.go index 596ae4a956..2533f454a6 100644 --- a/backend/cmd/start.go +++ b/backend/cmd/start.go @@ -104,6 +104,9 @@ const ( envEtcdClientUsername = "etcd-client-username" envEtcdClientPassword = "etcd-client-password" + // Etcd unsafe constants + flagEtcdUnsafeNoFsync = "etcd-unsafe-no-fsync" + // Metric logging flags flagDisablePlatformMetrics = "disable-platform-metrics" flagPlatformMetricsLoggingInterval = "platform-metrics-logging-interval" @@ -255,6 +258,7 @@ func StartCommand(initialize InitializeFunc) *cobra.Command { EtcdClientLogLevel: viper.GetString(flagEtcdClientLogLevel), EtcdClientUsername: viper.GetString(envEtcdClientUsername), EtcdClientPassword: viper.GetString(envEtcdClientPassword), + EtcdUnsafeNoFsync: viper.GetBool(flagEtcdUnsafeNoFsync), NoEmbedEtcd: viper.GetBool(flagNoEmbedEtcd), Labels: viper.GetStringMapString(flagLabels), Annotations: viper.GetStringMapString(flagAnnotations), @@ -598,6 +602,10 @@ func flagSet(server bool) *pflag.FlagSet { _ = flagSet.String(flagEventLogFile, "", "path to the event log file") _ = flagSet.Bool(flagEventLogParallelEncoders, false, "use parallel JSON encoding for the event log") + // Etcd server unsafe flags + _ = flagSet.Bool(flagEtcdUnsafeNoFsync, false, "disables fsync, unsafe, may cause data loss") + _ = flagSet.SetAnnotation(flagEtcdUnsafeNoFsync, "categories", []string{"store"}) + // Use a default value of 100,000 messages for the buffer. A serialized event // takes a minimum of around 1300 bytes, so once full the buffer ring could // require about 130MB of memory. diff --git a/backend/config.go b/backend/config.go index c46723669b..cbcd74e196 100644 --- a/backend/config.go +++ b/backend/config.go @@ -116,6 +116,9 @@ type Config struct { EtcdLogLevel string EtcdClientLogLevel string + // Etcd unsafe configuration + EtcdUnsafeNoFsync bool + LicenseGetter licensing.Getter DisablePlatformMetrics bool diff --git a/backend/etcd/etcd.go b/backend/etcd/etcd.go index 50d61289a3..122417131c 100644 --- a/backend/etcd/etcd.go +++ b/backend/etcd/etcd.go @@ -104,6 +104,8 @@ type Config struct { LogLevel string ClientLogLevel string + + UnsafeNoFsync bool } // TLSInfo wraps etcd transport TLSInfo @@ -274,6 +276,9 @@ func NewEtcd(config *Config) (*Etcd, error) { logutil.DefaultZapLoggerConfig.Level.SetLevel(LogLevelToZap(config.LogLevel)) } + // Unsafe options. + cfg.UnsafeNoFsync = config.UnsafeNoFsync + e, err := embed.StartEtcd(cfg) if err != nil { return nil, err From 8395674b294e2148f90700b533da11d3c4264991 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Wed, 11 May 2022 12:33:42 -0700 Subject: [PATCH 023/173] Remove go mod replace usage (#4732) * Remove go.mod replace directives from sensu modules Signed-off-by: Christian Kruse * ignore go's multi-module workspace files Signed-off-by: Christian Kruse * bump minimum go version to 1.16 Signed-off-by: Christian Kruse * Update CONTRIBUTING.md with multi module dev workflow Signed-off-by: Christian Kruse * Add CircleCI test to check for replace directives Signed-off-by: Christian Kruse --- .circleci/config.yml | 16 ++++++++++++++++ .gitignore | 4 ++++ CONTRIBUTING.md | 24 ++++++++++++++++++++++++ api/core/v3/go.mod | 5 ----- api/core/v3/go.sum | 6 +++++- go.mod | 9 +-------- go.sum | 8 +++++++- types/go.mod | 8 +------- types/go.sum | 5 +++++ 9 files changed, 63 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 13fe906987..4e19623336 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,6 +22,21 @@ go_test_env: &sensu_go_test_env GOPROXY: 'https://proxy.golang.org' jobs: + assert-no-replace: + <<: *sensu_go_build_env + <<: *sensu_go_test_env + steps: + - checkout + - run: + name: Check For Replace Directives + command: | + replaces=$(grep -R --include="go.mod" "^replace " || :) + if [ -n "$replaces" ] + then + echo "replace directives not allowed" + echo "$replaces" + exit 1 + fi test: <<: *sensu_go_build_env <<: *sensu_go_test_env @@ -90,6 +105,7 @@ workflows: - test-module: name: types path: types + - assert-no-replace build: jobs: # darwin/amd64 diff --git a/.gitignore b/.gitignore index f7a5e26c21..11e9cce05b 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,7 @@ sensu-backend sensuctl loadit *.exe + +# multi-module workspaces +go.work +go.work.sum diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8cc00237df..a07863b52b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -218,6 +218,30 @@ Once you make a change to any `*.proto` file within the **types** package, you w Sensu uses [Go modules](https://github.com/golang/go/wiki/Modules) for managing its dependencies. +The sensu-go repository contains multiple go modules. `github.com/sensu/sensu-go` is the main module containing the bulk of sensu's logic, and has dependencies on the other sensu-go modules. +`github.com/sensu/sensu-go/types`, `github.com/sensu/sensu-go/api/core/v2` and `github.com/sensu/sensu-go/api/core/v3` are supporting modules that define sensu's API resources. + +#### Working with local dependencies + +When developing changes across multiple modules in the sensu-go repository it can be helpful to use [workspaces](https://go.dev/ref/mod#workspaces) (go 1.18+) locally. + +Example: +``` +$ go work init && go work use . ./types ./api/core/v2 ./api/core/v3 +``` + +#### Staging PRs changing multiple modules + +If it is most convenient to review changes to multiple modules in the sensu-go repository in a single PR, we recommend that you organize commits by module. +You may then `go get` a dependency by either commit sha or pushed `-dev` tag in a subsequent commit to the dependent module. + +Example CL for a PR: +``` +bad91f2 (HEAD -> razzle-dazzle-feat) Add RazzleDazzle HTTP Routes to sensu-go +8171511 Bump sensu-go /api/core/v3 dependency to v1.0.1-dev +76e86d0 (tag: v1.0.1-dev) Add /api/core/v3/RazzleDazzle Resource +``` + ## Testing Run test suites: diff --git a/api/core/v3/go.mod b/api/core/v3/go.mod index 2e77f716b5..f1d33dcaa4 100644 --- a/api/core/v3/go.mod +++ b/api/core/v3/go.mod @@ -2,11 +2,6 @@ module github.com/sensu/sensu-go/api/core/v3 go 1.16 -replace ( - github.com/sensu/sensu-go/api/core/v2 => ../v2 - github.com/sensu/sensu-go/types => ../../../types -) - require ( github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.2 diff --git a/api/core/v3/go.sum b/api/core/v3/go.sum index ad57e54dcd..c1e134564f 100644 --- a/api/core/v3/go.sum +++ b/api/core/v3/go.sum @@ -64,7 +64,11 @@ github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspo github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/sensu/sensu-go/api/core/v3 v3.6.1-alpha/go.mod h1:xnd6gfPu21bESxlI9Zd6VLaVhuz/ly2P9suwMux2TDU= +github.com/sensu/sensu-go/api/core/v2 v2.14.0 h1:z4JVqy7z6iFgMDUH0uc1Ns0bqLFKTpc5bi4Iw7qweks= +github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= +github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= +github.com/sensu/sensu-go/types v0.10.0 h1:sm+dLuqEEECVxjW5EfXkU5weGPwrg/Jymbm28HdQpl8= +github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/go.mod b/go.mod index f146df46f1..3994e866db 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,6 @@ module github.com/sensu/sensu-go -go 1.13 - -replace ( - github.com/sensu/sensu-go/api/core/v2 => ./api/core/v2 - github.com/sensu/sensu-go/api/core/v3 => ./api/core/v3 - github.com/sensu/sensu-go/backend/store/v2 => ./backend/store/v2 - github.com/sensu/sensu-go/types => ./types -) +go 1.16 require ( github.com/AlecAivazis/survey/v2 v2.2.14 diff --git a/go.sum b/go.sum index 0d44beb696..85d4018931 100644 --- a/go.sum +++ b/go.sum @@ -397,6 +397,13 @@ github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmR github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= +github.com/sensu/sensu-go/api/core/v2 v2.14.0 h1:z4JVqy7z6iFgMDUH0uc1Ns0bqLFKTpc5bi4Iw7qweks= +github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= +github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= +github.com/sensu/sensu-go/api/core/v3 v3.6.2 h1:NEkHcPxkaYwPlH4gG6kgvdvYLlwBBaswMHscA7X3V+4= +github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= +github.com/sensu/sensu-go/types v0.10.0 h1:sm+dLuqEEECVxjW5EfXkU5weGPwrg/Jymbm28HdQpl8= +github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -558,7 +565,6 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/types/go.mod b/types/go.mod index a0ecb645ad..31c615cd61 100644 --- a/types/go.mod +++ b/types/go.mod @@ -1,12 +1,6 @@ module github.com/sensu/sensu-go/types -go 1.13 - -replace ( - github.com/sensu/sensu-go => ../ - github.com/sensu/sensu-go/api/core/v2 => ../api/core/v2 - github.com/sensu/sensu-go/api/core/v3 => ../api/core/v3 -) +go 1.16 require ( github.com/blang/semver/v4 v4.0.0 diff --git a/types/go.sum b/types/go.sum index 5b3dd96270..8bf654b7c0 100644 --- a/types/go.sum +++ b/types/go.sum @@ -64,6 +64,11 @@ github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspo github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/sensu/sensu-go/api/core/v2 v2.14.0 h1:z4JVqy7z6iFgMDUH0uc1Ns0bqLFKTpc5bi4Iw7qweks= +github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= +github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= +github.com/sensu/sensu-go/api/core/v3 v3.6.2 h1:NEkHcPxkaYwPlH4gG6kgvdvYLlwBBaswMHscA7X3V+4= +github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= From 2518dc25a33aad6e1056b90cd8e3ba5fd79b6e2f Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Wed, 11 May 2022 13:55:28 -0700 Subject: [PATCH 024/173] bump etcd version to v3.5.4 for bug fix (#4741) * bump etcd version to v3.5.4 for bug fix Signed-off-by: Christian Kruse * add changelog entry Signed-off-by: Christian Kruse * drop usage of clientv3.CreateDefaultZapLoggerConfig() Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 3 +++ backend/backend.go | 3 ++- backend/etcd/etcd.go | 4 ++-- go.mod | 16 +++++++------- go.sum | 50 ++++++++++++++++++++++++-------------------- 5 files changed, 42 insertions(+), 34 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 2f93698bd3..9e0f48b667 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -16,6 +16,9 @@ system. ### Fixed - Print the correct round robin scheduler source (etcd or postgres). +### Changed +- Upgraded etcd version from 3.5.2 to 3.5.4. + ## [6.7.1] - 2022-04-28 ### Changed diff --git a/backend/backend.go b/backend/backend.go index c23d8f997a..fd74c922ba 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -14,6 +14,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/sensu/sensu-go/backend/resource" "github.com/spf13/viper" + "go.etcd.io/etcd/client/pkg/v3/logutil" "go.etcd.io/etcd/client/pkg/v3/transport" clientv3 "go.etcd.io/etcd/client/v3" "golang.org/x/time/rate" @@ -221,7 +222,7 @@ func newClient(ctx context.Context, config *Config, backend *Backend) (*clientv3 } // Set etcd client log level - logConfig := clientv3.CreateDefaultZapLoggerConfig() + logConfig := logutil.DefaultZapLoggerConfig logConfig.Level.SetLevel(etcd.LogLevelToZap(config.EtcdClientLogLevel)) clientv3Config.LogConfig = &logConfig diff --git a/backend/etcd/etcd.go b/backend/etcd/etcd.go index 122417131c..6b721b9403 100644 --- a/backend/etcd/etcd.go +++ b/backend/etcd/etcd.go @@ -327,7 +327,7 @@ func (e *Etcd) NewClientContext(ctx context.Context) (*clientv3.Client, error) { } // Set etcd client log level - logConfig := clientv3.CreateDefaultZapLoggerConfig() + logConfig := logutil.DefaultZapLoggerConfig logConfig.Level.SetLevel(LogLevelToZap(e.cfg.ClientLogLevel)) return clientv3.New(clientv3.Config{ @@ -353,7 +353,7 @@ func (e *Etcd) NewEmbeddedClient() *clientv3.Client { // Based on https://github.com/etcd-io/etcd/blob/v3.4.16/etcdserver/api/v3client/v3client.go#L30. func (e *Etcd) NewEmbeddedClientWithContext(ctx context.Context) *clientv3.Client { // Set etcd client log level - logConfig := clientv3.CreateDefaultZapLoggerConfig() + logConfig := logutil.DefaultZapLoggerConfig logConfig.Level.SetLevel(LogLevelToZap(e.cfg.ClientLogLevel)) clientLogger, err := logConfig.Build() if err != nil { diff --git a/go.mod b/go.mod index 1756b83112..f43d93a51f 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ require ( github.com/mitchellh/hashstructure v1.0.0 github.com/mitchellh/mapstructure v1.1.2 github.com/olekukonko/tablewriter v0.0.5 - github.com/prometheus/client_golang v1.11.0 + github.com/prometheus/client_golang v1.11.1 github.com/prometheus/client_model v0.2.0 github.com/prometheus/common v0.26.0 github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff @@ -70,15 +70,15 @@ require ( github.com/ulikunitz/xz v0.5.10 // indirect github.com/willf/pad v0.0.0-20160331131008-b3d780601022 go.etcd.io/bbolt v1.3.6 - go.etcd.io/etcd/api/v3 v3.5.2 - go.etcd.io/etcd/client/pkg/v3 v3.5.2 - go.etcd.io/etcd/client/v3 v3.5.2 - go.etcd.io/etcd/server/v3 v3.5.2 - go.etcd.io/etcd/tests/v3 v3.5.2 + go.etcd.io/etcd/api/v3 v3.5.4 + go.etcd.io/etcd/client/pkg/v3 v3.5.4 + go.etcd.io/etcd/client/v3 v3.5.4 + go.etcd.io/etcd/server/v3 v3.5.4 + go.etcd.io/etcd/tests/v3 v3.5.4 go.uber.org/atomic v1.7.0 go.uber.org/zap v1.17.0 - golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 - golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 + golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 + golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 golang.org/x/sys v0.0.0-20211013075003-97ac67df715c golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba google.golang.org/grpc v1.38.0 diff --git a/go.sum b/go.sum index 0d44beb696..ea6caeb3f5 100644 --- a/go.sum +++ b/go.sum @@ -363,8 +363,8 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -467,23 +467,23 @@ go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.2 h1:tXok5yLlKyuQ/SXSjtqHc4uzNaMqZi2XsoSPr/LlJXI= -go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/client/pkg/v3 v3.5.2 h1:4hzqQ6hIb3blLyQ8usCU4h3NghkqcsohEQ3o3VetYxE= -go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.2 h1:ymrVwTkefuqA/rPkSW7/B4ApijbPVefRumkY+stNfS0= -go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= -go.etcd.io/etcd/client/v3 v3.5.2 h1:WdnejrUtQC4nCxK0/dLTMqKOB+U5TP/2Ya0BJL+1otA= -go.etcd.io/etcd/client/v3 v3.5.2/go.mod h1:kOOaWFFgHygyT0WlSmL8TJiXmMysO/nNUlEsSsN6W4o= -go.etcd.io/etcd/etcdutl/v3 v3.5.2/go.mod h1:f+KEUNxRzqQGq1Y/SsaDN5cmlOGRWgfE3lXEDi5F1Ys= -go.etcd.io/etcd/pkg/v3 v3.5.2 h1:YZUojdoPhOyl5QILYnR8LTUbbNefu/sV4ma+ZMr2tto= -go.etcd.io/etcd/pkg/v3 v3.5.2/go.mod h1:zsXz+9D/kijzRiG/UnFGDTyHKcVp0orwiO8iMLAi+k0= -go.etcd.io/etcd/raft/v3 v3.5.2 h1:uCC37qOXqBvKqTGHGyhASsaCsnTuJugl1GvneJNwHWo= -go.etcd.io/etcd/raft/v3 v3.5.2/go.mod h1:G6pCP1sFgbjod7/KnEHY0vHUViqxjkdt6AiKsD0GRr8= -go.etcd.io/etcd/server/v3 v3.5.2 h1:B6ytJvS4Fmt8nkjzS2/8POf4tuPhFMluE0lWd4dx/7U= -go.etcd.io/etcd/server/v3 v3.5.2/go.mod h1:mlG8znIEz4N/28GABrohZCBM11FqgGVQcpbcyJgh0j0= -go.etcd.io/etcd/tests/v3 v3.5.2 h1:uk7/uMGVebpBDl+roivowHt6gJ5Fnqwik3syDkoSKdo= -go.etcd.io/etcd/tests/v3 v3.5.2/go.mod h1:Jdzbei4uFi9C3xDBfCwckRXjlX0UPooiP4g/zXgBMgQ= +go.etcd.io/etcd/api/v3 v3.5.4 h1:OHVyt3TopwtUQ2GKdd5wu3PmmipR4FTwCqoEjSyRdIc= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/client/pkg/v3 v3.5.4 h1:lrneYvz923dvC14R54XcA7FXoZ3mlGZAgmwhfm7HqOg= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.4 h1:Dcx3/MYyfKcPNLpR4VVQUP5KgYrBeJtktBwEKkw08Ao= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= +go.etcd.io/etcd/client/v3 v3.5.4 h1:p83BUL3tAYS0OT/r0qglgc3M1JjhM0diV8DSWAhVXv4= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.etcd.io/etcd/etcdutl/v3 v3.5.4/go.mod h1:eK9eZfI/BxDQCztpuaJ1E/ufYpMw2Y16dPX1azGWrBU= +go.etcd.io/etcd/pkg/v3 v3.5.4 h1:V5Dvl7S39ZDwjkKqJG2BfXgxZ3QREqqKifWQgIw5IM0= +go.etcd.io/etcd/pkg/v3 v3.5.4/go.mod h1:OI+TtO+Aa3nhQSppMbwE4ld3uF1/fqqwbpfndbbrEe0= +go.etcd.io/etcd/raft/v3 v3.5.4 h1:YGrnAgRfgXloBNuqa+oBI/aRZMcK/1GS6trJePJ/Gqc= +go.etcd.io/etcd/raft/v3 v3.5.4/go.mod h1:SCuunjYvZFC0fBX0vxMSPjuZmpcSk+XaAcMrD6Do03w= +go.etcd.io/etcd/server/v3 v3.5.4 h1:CMAZd0g8Bn5NRhynW6pKhc4FRg41/0QYy3d7aNm9874= +go.etcd.io/etcd/server/v3 v3.5.4/go.mod h1:S5/YTU15KxymM5l3T6b09sNOHPXqGYIZStpuuGbb65c= +go.etcd.io/etcd/tests/v3 v3.5.4 h1:wiYG8vbDwZO2UatQE9Z3GIv2z52jGg5DvEkTDXm090c= +go.etcd.io/etcd/tests/v3 v3.5.4/go.mod h1:ymig8LjkI1zqAxxMsl+nntzG21dND2hh0UQXl9BaJP8= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= @@ -533,8 +533,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 h1:71vQrMauZZhcTVK6KdYM+rklehEEwb3E+ZhaE5jrPrE= +golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -583,8 +583,9 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -631,8 +632,10 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211013075003-97ac67df715c h1:taxlMj0D/1sOAuv/CbSD+MMDof2vbyPTqz5FNYKpXt8= golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -646,8 +649,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= From 53ce19726a32e433891ecbeadcad9854b8c5a373 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Wed, 11 May 2022 14:03:26 -0700 Subject: [PATCH 025/173] Prepare for 6.7.2 Release (#4742) Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 9e0f48b667..f72d0f047d 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,6 +7,8 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +## [6.7.2] - 2022-05-12 + ### Added - Added the `etcd-unsafe-no-fsync` backend configuration option, making it possible to run a sensu-backend with an embedded etcd node From babccc11273469cd7612ed54e72cedfc40d17bf5 Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Fri, 20 May 2022 11:21:12 -0700 Subject: [PATCH 026/173] Get rid of docker and go-ansiterm deps (#4750) This branch never worked: calling GetTermSize() on fd 0 always results in an error: "inappropriate ioctl for device". We have been using width=80 all along! In that light, I'm just deleting the branch, which automatically gets rid of (very) low level dependencies issuing ioctl() system calls on Unix and calls to GetConsoleScreenBufferInfo() in kernel32.dll on Windows. (cherry picked from dfc30f09b70fabf565f7fa55b44ab4393dec0662) Signed-off-by: Cyril Cressent --- cli/commands/root/templates.go | 7 ------- go.mod | 4 ---- go.sum | 8 -------- 3 files changed, 19 deletions(-) diff --git a/cli/commands/root/templates.go b/cli/commands/root/templates.go index f96e6bcd29..3805d8ab7b 100644 --- a/cli/commands/root/templates.go +++ b/cli/commands/root/templates.go @@ -1,7 +1,6 @@ package root import ( - "github.com/docker/docker/pkg/term" "github.com/spf13/cobra" ) @@ -87,16 +86,10 @@ func managementSubCommands(cmd *cobra.Command) []*cobra.Command { func wrappedInheritedFlagUsages(cmd *cobra.Command) string { width := 80 - if ws, err := term.GetWinsize(0); err == nil { - width = int(ws.Width) - } return cmd.InheritedFlags().FlagUsagesWrapped(width - 1) } func wrappedLocalFlagUsages(cmd *cobra.Command) string { width := 80 - if ws, err := term.GetWinsize(0); err == nil { - width = int(ws.Width) - } return cmd.LocalFlags().FlagUsagesWrapped(width - 1) } diff --git a/go.mod b/go.mod index 43904ea356..b47367727a 100644 --- a/go.mod +++ b/go.mod @@ -4,12 +4,10 @@ go 1.16 require ( github.com/AlecAivazis/survey/v2 v2.2.14 - github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect github.com/ash2k/stager v0.0.0-20170622123058-6e9c7b0eacd4 // indirect github.com/atlassian/gostatsd v0.0.0-20180514010436-af796620006e github.com/blang/semver/v4 v4.0.0 github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1 - github.com/docker/docker v0.0.0-20180409082103-cbde00b44273 github.com/dustin/go-humanize v1.0.0 github.com/echlebek/crock v1.0.1 github.com/echlebek/timeproxy v1.0.0 @@ -25,7 +23,6 @@ require ( github.com/google/uuid v1.1.2 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.4.2 - github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c github.com/graphql-go/graphql v0.7.10-0.20200426202700-116f19d099aa github.com/gxed/GoEndian v0.0.0-20160916112711-0f5c6873267e // indirect @@ -77,5 +74,4 @@ require ( google.golang.org/grpc v1.38.0 gopkg.in/h2non/filetype.v1 v1.0.3 gopkg.in/yaml.v2 v2.4.0 - gotest.tools v2.2.0+incompatible // indirect ) diff --git a/go.sum b/go.sum index 4e17bf7ee5..7d0a8b5534 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,6 @@ code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AlecAivazis/survey/v2 v2.2.14 h1:aTYTaCh1KLd+YWilkeJ65Ph78g48NVQ3ay9xmaNIyhk= github.com/AlecAivazis/survey/v2 v2.2.14/go.mod h1:TH2kPCDU3Kqq7pLbnCWwZXDBjnhZtmsCle5EiYDJ2fg= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -86,8 +84,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/docker v0.0.0-20180409082103-cbde00b44273 h1:fBZtiZxfOkWgrl/P6Qi+r1W5vt0ajRitqn6qQMVUKs4= -github.com/docker/docker v0.0.0-20180409082103-cbde00b44273/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= @@ -196,8 +192,6 @@ 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 v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible h1:AQwinXlbQR2HvPjQZOmDhRqsv5mZf+Jb1RnSLxcqZcI= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c h1:94S+uoVVMpQAEOrqGjCDyUdML4dJDkh6aC4MYmXECg4= github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= github.com/graphql-go/graphql v0.7.10-0.20200426202700-116f19d099aa h1:4anOZ2o/OTkxszIWihRKw3GvHEtGvcxBpPReF/WbXJQ= @@ -773,8 +767,6 @@ 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= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From e9cad2f558a1727ee8df9e8657f66729688bad2e Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Fri, 20 May 2022 11:21:12 -0700 Subject: [PATCH 027/173] Get rid of docker and go-ansiterm deps (#4750) This branch never worked: calling GetTermSize() on fd 0 always results in an error: "inappropriate ioctl for device". We have been using width=80 all along! In that light, I'm just deleting the branch, which automatically gets rid of (very) low level dependencies issuing ioctl() system calls on Unix and calls to GetConsoleScreenBufferInfo() in kernel32.dll on Windows. (cherry picked from dfc30f09b70fabf565f7fa55b44ab4393dec0662) Signed-off-by: Cyril Cressent --- cli/commands/root/templates.go | 7 ------- go.mod | 4 ---- go.sum | 8 -------- 3 files changed, 19 deletions(-) diff --git a/cli/commands/root/templates.go b/cli/commands/root/templates.go index f96e6bcd29..3805d8ab7b 100644 --- a/cli/commands/root/templates.go +++ b/cli/commands/root/templates.go @@ -1,7 +1,6 @@ package root import ( - "github.com/docker/docker/pkg/term" "github.com/spf13/cobra" ) @@ -87,16 +86,10 @@ func managementSubCommands(cmd *cobra.Command) []*cobra.Command { func wrappedInheritedFlagUsages(cmd *cobra.Command) string { width := 80 - if ws, err := term.GetWinsize(0); err == nil { - width = int(ws.Width) - } return cmd.InheritedFlags().FlagUsagesWrapped(width - 1) } func wrappedLocalFlagUsages(cmd *cobra.Command) string { width := 80 - if ws, err := term.GetWinsize(0); err == nil { - width = int(ws.Width) - } return cmd.LocalFlags().FlagUsagesWrapped(width - 1) } diff --git a/go.mod b/go.mod index f43d93a51f..3c870e170e 100644 --- a/go.mod +++ b/go.mod @@ -11,12 +11,10 @@ replace ( require ( github.com/AlecAivazis/survey/v2 v2.2.14 - github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect github.com/ash2k/stager v0.0.0-20170622123058-6e9c7b0eacd4 // indirect github.com/atlassian/gostatsd v0.0.0-20180514010436-af796620006e github.com/blang/semver/v4 v4.0.0 github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1 - github.com/docker/docker v0.0.0-20180409082103-cbde00b44273 github.com/dustin/go-humanize v1.0.0 github.com/echlebek/crock v1.0.1 github.com/echlebek/timeproxy v1.0.0 @@ -32,7 +30,6 @@ require ( github.com/google/uuid v1.1.2 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.4.2 - github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c github.com/graphql-go/graphql v0.7.10-0.20200426202700-116f19d099aa github.com/gxed/GoEndian v0.0.0-20160916112711-0f5c6873267e // indirect @@ -84,5 +81,4 @@ require ( google.golang.org/grpc v1.38.0 gopkg.in/h2non/filetype.v1 v1.0.3 gopkg.in/yaml.v2 v2.4.0 - gotest.tools v2.2.0+incompatible // indirect ) diff --git a/go.sum b/go.sum index ea6caeb3f5..775e06a8dc 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,6 @@ code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AlecAivazis/survey/v2 v2.2.14 h1:aTYTaCh1KLd+YWilkeJ65Ph78g48NVQ3ay9xmaNIyhk= github.com/AlecAivazis/survey/v2 v2.2.14/go.mod h1:TH2kPCDU3Kqq7pLbnCWwZXDBjnhZtmsCle5EiYDJ2fg= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -86,8 +84,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/docker v0.0.0-20180409082103-cbde00b44273 h1:fBZtiZxfOkWgrl/P6Qi+r1W5vt0ajRitqn6qQMVUKs4= -github.com/docker/docker v0.0.0-20180409082103-cbde00b44273/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= @@ -196,8 +192,6 @@ 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 v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible h1:AQwinXlbQR2HvPjQZOmDhRqsv5mZf+Jb1RnSLxcqZcI= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c h1:94S+uoVVMpQAEOrqGjCDyUdML4dJDkh6aC4MYmXECg4= github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= github.com/graphql-go/graphql v0.7.10-0.20200426202700-116f19d099aa h1:4anOZ2o/OTkxszIWihRKw3GvHEtGvcxBpPReF/WbXJQ= @@ -767,8 +761,6 @@ 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= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From ab623c8ec0008e79d3b3de4ca7afcf7370c4fa5b Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 16 Jun 2022 13:06:10 -0700 Subject: [PATCH 028/173] prevent old & dup check request execution Signed-off-by: Justin Kolberg --- agent/agent.go | 11 +++++++++- agent/check_handler.go | 30 ++++++++++++++++++++++++++++ agent/check_handler_internal_test.go | 23 ++++++++++++++++++++- 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 8aab130e90..6b2e8dc543 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -152,6 +152,8 @@ type Agent struct { header http.Header inProgress map[string]*corev2.CheckConfig inProgressMu *sync.Mutex + lastIssued map[string]int64 + lastIssuedMu *sync.Mutex localEntityConfig *corev3.EntityConfig statsdServer StatsdServer sendq chan *transport.Message @@ -194,6 +196,8 @@ func NewAgentContext(ctx context.Context, config *Config) (*Agent, error) { entityConfigCh: make(chan struct{}), inProgress: make(map[string]*corev2.CheckConfig), inProgressMu: &sync.Mutex{}, + lastIssued: make(map[string]int64), + lastIssuedMu: &sync.Mutex{}, sendq: make(chan *transport.Message, 10), systemInfo: &corev2.System{}, unmarshal: UnmarshalJSON, @@ -559,7 +563,12 @@ func (a *Agent) receiveLoop(ctx context.Context, cancel context.CancelFunc, conn }).Info("message received") err := a.handler.Handle(ctx, msg.Type, msg.Payload) if err != nil { - logger.WithError(err).Error("error handling message") + switch err { + case dupCheckRequestErr: + logger.WithError(err).Warn("error handling message") + default: + logger.WithError(err).Error("error handling message") + } } }(m) } diff --git a/agent/check_handler.go b/agent/check_handler.go index 005ba36c99..c0ad1a82ff 100644 --- a/agent/check_handler.go +++ b/agent/check_handler.go @@ -31,6 +31,11 @@ const ( measureNullStatus = "null-status" ) +var ( + dupCheckRequestErr = errors.New("check request has already been received - agent & check may have multiple matching subscriptions") + oldCheckRequestErr = errors.New("check request is older than a previously received check request") +) + // handleCheck is the check message handler. // TODO(greg): At some point, we're going to need max parallelism. func (a *Agent) handleCheck(ctx context.Context, payload []byte) error { @@ -58,6 +63,14 @@ func (a *Agent) handleCheck(ctx context.Context, payload []byte) error { return nil } + lastIssued := a.getLastIssued(request) + if lastIssued > request.Issued { + return oldCheckRequestErr + } + if lastIssued == request.Issued { + return dupCheckRequestErr + } + // only schedule check execution if its not already in progress // ** check hooks are part of a checks execution if a.checkInProgress(request) { @@ -110,7 +123,24 @@ func (a *Agent) removeInProgress(request *corev2.CheckRequest) { a.inProgressMu.Unlock() } +func (a *Agent) getLastIssued(request *corev2.CheckRequest) int64 { + a.lastIssuedMu.Lock() + issued, ok := a.lastIssued[checkKey(request)] + a.lastIssuedMu.Unlock() + if !ok { + return 0 + } + return issued +} + +func (a *Agent) setLastIssued(request *corev2.CheckRequest) { + a.lastIssuedMu.Lock() + a.lastIssued[checkKey(request)] = request.Issued + a.lastIssuedMu.Unlock() +} + func (a *Agent) executeCheck(ctx context.Context, request *corev2.CheckRequest, entity *corev2.Entity) { + a.setLastIssued(request) a.addInProgress(request) defer a.removeInProgress(request) diff --git a/agent/check_handler_internal_test.go b/agent/check_handler_internal_test.go index 0d9efa9637..04b6498e1d 100644 --- a/agent/check_handler_internal_test.go +++ b/agent/check_handler_internal_test.go @@ -40,11 +40,32 @@ func TestHandleCheck(t *testing.T) { ch := make(chan *transport.Message, 5) agent.sendq = ch + // check request issued timestamp is older than last issued + agent.lastIssuedMu.Lock() + agent.lastIssued[checkKey(request)] = time.Now().Unix() + 100 + agent.lastIssuedMu.Unlock() + assert.ErrorIs(agent.handleCheck(context.TODO(), payload), oldCheckRequestErr) + + // check request issued timestamp is the same as last issued + agent.lastIssuedMu.Lock() + agent.lastIssued[checkKey(request)] = request.Issued + agent.lastIssuedMu.Unlock() + assert.ErrorIs(agent.handleCheck(context.TODO(), payload), dupCheckRequestErr) + + // check request issued timestamp is newer than last issued + agent.lastIssuedMu.Lock() + agent.lastIssued[checkKey(request)] = time.Now().Unix() - 100 + agent.lastIssuedMu.Unlock() + assert.NoError(agent.handleCheck(context.TODO(), payload)) + // check is already in progress, it shouldn't execute agent.inProgressMu.Lock() + delete(agent.lastIssued, checkKey(request)) agent.inProgress[checkKey(request)] = request.Config agent.inProgressMu.Unlock() - assert.Error(agent.handleCheck(context.TODO(), payload)) + assert.EqualError( + agent.handleCheck(context.TODO(), payload), + fmt.Sprintf("check execution still in progress: %s", request.Config.Name)) // check is not in progress, it should execute agent.inProgressMu.Lock() From a96440d9dde460f7df56d19aa3cbc91a8f12174f Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 16 Jun 2022 13:09:02 -0700 Subject: [PATCH 029/173] update changelog Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 8b6db75c1a..c659a7d9b7 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -10,6 +10,12 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Added - GlobalResource interface in core/v3 allows core/v3 resources to be marked as global resources. + +### Changed +- Agents will no longer execute check requests with equal or older issued +timestamps than the issued timestamp for the last executed check request with +the same check name. + ## [6.7.2] - 2022-05-12 ### Added From 6f9aeff3bcbf58cc504b323d4bcb2432446e1e83 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 16 Jun 2022 14:17:05 -0700 Subject: [PATCH 030/173] use and instead of & Signed-off-by: Justin Kolberg --- agent/check_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/check_handler.go b/agent/check_handler.go index c0ad1a82ff..6d3e2a7a94 100644 --- a/agent/check_handler.go +++ b/agent/check_handler.go @@ -32,7 +32,7 @@ const ( ) var ( - dupCheckRequestErr = errors.New("check request has already been received - agent & check may have multiple matching subscriptions") + dupCheckRequestErr = errors.New("check request has already been received - agent and check may have multiple matching subscriptions") oldCheckRequestErr = errors.New("check request is older than a previously received check request") ) From b5517ca93db44ec70e0ba834ea2be35e39cd053e Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 16 Jun 2022 21:22:40 -0700 Subject: [PATCH 031/173] rework tests Signed-off-by: Justin Kolberg --- agent/agent.go | 2 +- agent/check_handler.go | 49 +++++--- agent/check_handler_internal_test.go | 180 +++++++++++++++++++-------- 3 files changed, 157 insertions(+), 74 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 6b2e8dc543..9a192182af 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -564,7 +564,7 @@ func (a *Agent) receiveLoop(ctx context.Context, cancel context.CancelFunc, conn err := a.handler.Handle(ctx, msg.Type, msg.Payload) if err != nil { switch err { - case dupCheckRequestErr: + case errDupCheckRequest: logger.WithError(err).Warn("error handling message") default: logger.WithError(err).Error("error handling message") diff --git a/agent/check_handler.go b/agent/check_handler.go index 6d3e2a7a94..53415f5006 100644 --- a/agent/check_handler.go +++ b/agent/check_handler.go @@ -32,8 +32,8 @@ const ( ) var ( - dupCheckRequestErr = errors.New("check request has already been received - agent and check may have multiple matching subscriptions") - oldCheckRequestErr = errors.New("check request is older than a previously received check request") + errDupCheckRequest = errors.New("check request has already been received - agent and check may have multiple matching subscriptions") + errOldCheckRequest = errors.New("check request is older than a previously received check request") ) // handleCheck is the check message handler. @@ -47,6 +47,23 @@ func (a *Agent) handleCheck(ctx context.Context, payload []byte) error { } checkConfig := request.Config + + // only schedule check execution if the issued timestamp is newer than any + // previous executions of the check + lastIssued := a.getLastIssued(request) + if lastIssued > request.Issued { + return errOldCheckRequest + } + if lastIssued == request.Issued { + return errDupCheckRequest + } + + // only schedule check execution if its not already in progress + // ** check hooks are part of a checks execution + if a.checkInProgress(request) { + return fmt.Errorf("check execution still in progress: %s", checkConfig.Name) + } + sendFailure := func(err error) { check := corev2.NewCheck(checkConfig) check.Executed = time.Now().Unix() @@ -63,20 +80,6 @@ func (a *Agent) handleCheck(ctx context.Context, payload []byte) error { return nil } - lastIssued := a.getLastIssued(request) - if lastIssued > request.Issued { - return oldCheckRequestErr - } - if lastIssued == request.Issued { - return dupCheckRequestErr - } - - // only schedule check execution if its not already in progress - // ** check hooks are part of a checks execution - if a.checkInProgress(request) { - return fmt.Errorf("check execution still in progress: %s", checkConfig.Name) - } - // Validate that the given check is valid. if err := request.Config.Validate(); err != nil { sendFailure(fmt.Errorf("given check is invalid: %s", err)) @@ -113,30 +116,36 @@ func checkKey(request *corev2.CheckRequest) string { func (a *Agent) addInProgress(request *corev2.CheckRequest) { a.inProgressMu.Lock() + defer a.inProgressMu.Unlock() a.inProgress[checkKey(request)] = request.Config - a.inProgressMu.Unlock() } func (a *Agent) removeInProgress(request *corev2.CheckRequest) { a.inProgressMu.Lock() + defer a.inProgressMu.Unlock() delete(a.inProgress, checkKey(request)) - a.inProgressMu.Unlock() } func (a *Agent) getLastIssued(request *corev2.CheckRequest) int64 { a.lastIssuedMu.Lock() + defer a.lastIssuedMu.Unlock() issued, ok := a.lastIssued[checkKey(request)] - a.lastIssuedMu.Unlock() if !ok { return 0 } return issued } +func (a *Agent) removeLastIssued(request *corev2.CheckRequest) { + a.lastIssuedMu.Lock() + defer a.lastIssuedMu.Unlock() + delete(a.lastIssued, checkKey(request)) +} + func (a *Agent) setLastIssued(request *corev2.CheckRequest) { a.lastIssuedMu.Lock() + defer a.lastIssuedMu.Unlock() a.lastIssued[checkKey(request)] = request.Issued - a.lastIssuedMu.Unlock() } func (a *Agent) executeCheck(ctx context.Context, request *corev2.CheckRequest, entity *corev2.Entity) { diff --git a/agent/check_handler_internal_test.go b/agent/check_handler_internal_test.go index 04b6498e1d..f37dd00dea 100644 --- a/agent/check_handler_internal_test.go +++ b/agent/check_handler_internal_test.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "sync" "testing" "time" @@ -17,61 +18,134 @@ import ( ) func TestHandleCheck(t *testing.T) { - assert := assert.New(t) - - checkConfig := corev2.FixtureCheckConfig("check") - - request := &corev2.CheckRequest{Config: checkConfig, Issued: time.Now().Unix()} - payload, err := json.Marshal(request) - if err != nil { - assert.FailNow("error marshaling check request") + newCheckRequest := func(t *testing.T, issued int64) []byte { + checkConfig := corev2.FixtureCheckConfig("check") + checkRequest := &corev2.CheckRequest{ + Config: checkConfig, + Issued: issued, + } + payload, err := json.Marshal(checkRequest) + require.NoError(t, err) + return payload } - - config, cleanup := FixtureConfig() - defer cleanup() - agent, err := NewAgent(config) - if err != nil { - t.Fatal(err) + type fields struct { + inProgress map[string]*corev2.CheckConfig + lastIssued map[string]int64 + sequences map[string]int64 + } + type args struct { + ctx context.Context + payload []byte + } + tests := []struct { + name string + fields fields + args args + wantErr bool + wantErrMsg string + }{ + { + name: "errors when issued timestamp is older than the previous", + fields: fields{ + lastIssued: map[string]int64{ + "check": time.Now().Unix() + 1000, + }, + }, + args: args{ + ctx: context.Background(), + payload: newCheckRequest(t, time.Now().Unix()), + }, + wantErr: true, + wantErrMsg: errOldCheckRequest.Error(), + }, + { + name: "errors when issued timestamp is the same as the previous", + fields: fields{ + lastIssued: map[string]int64{ + "check": 1234, + }, + }, + args: args{ + ctx: context.Background(), + payload: newCheckRequest(t, 1234), + }, + wantErr: true, + wantErrMsg: errDupCheckRequest.Error(), + }, + { + name: "errors when check execution is already in progress", + fields: fields{ + inProgress: map[string]*corev2.CheckConfig{ + "check": corev2.FixtureCheckConfig("check"), + }, + lastIssued: map[string]int64{ + "check": 1234, + }, + }, + args: args{ + ctx: context.Background(), + payload: newCheckRequest(t, 1235), + }, + wantErr: true, + wantErrMsg: "check execution still in progress: check", + }, + { + name: "executes the first time a request for a check is received", + fields: fields{ + inProgress: make(map[string]*corev2.CheckConfig), + lastIssued: make(map[string]int64), + sequences: make(map[string]int64), + }, + args: args{ + ctx: context.Background(), + payload: newCheckRequest(t, 1235), + }, + wantErr: false, + }, + { + name: "executes the second time a request for a check is received", + fields: fields{ + inProgress: make(map[string]*corev2.CheckConfig), + lastIssued: map[string]int64{ + "check": 1234, + }, + sequences: map[string]int64{ + "check": 1, + }, + }, + args: args{ + ctx: context.Background(), + payload: newCheckRequest(t, 1235), + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + agentConfig := &Config{} + ex := &mockexecutor.MockExecutor{} + execution := command.FixtureExecutionResponse(0, "") + ex.Return(execution, nil) + agent := &Agent{ + config: agentConfig, + executor: ex, + inProgress: tt.fields.inProgress, + inProgressMu: &sync.Mutex{}, + lastIssued: tt.fields.lastIssued, + lastIssuedMu: &sync.Mutex{}, + marshal: MarshalJSON, + sequences: tt.fields.sequences, + unmarshal: UnmarshalJSON, + } + err := agent.handleCheck(tt.args.ctx, tt.args.payload) + if (err != nil) != tt.wantErr { + t.Errorf("Agent.handleCheck() error = %v, wantErr %v", err, tt.wantErr) + } + if err != nil && err.Error() != tt.wantErrMsg { + t.Errorf("Agent.handleCheck() error msg = %v, wantErrMsg %v", err.Error(), tt.wantErrMsg) + } + }) } - ex := &mockexecutor.MockExecutor{} - agent.executor = ex - execution := command.FixtureExecutionResponse(0, "") - ex.Return(execution, nil) - ch := make(chan *transport.Message, 5) - agent.sendq = ch - - // check request issued timestamp is older than last issued - agent.lastIssuedMu.Lock() - agent.lastIssued[checkKey(request)] = time.Now().Unix() + 100 - agent.lastIssuedMu.Unlock() - assert.ErrorIs(agent.handleCheck(context.TODO(), payload), oldCheckRequestErr) - - // check request issued timestamp is the same as last issued - agent.lastIssuedMu.Lock() - agent.lastIssued[checkKey(request)] = request.Issued - agent.lastIssuedMu.Unlock() - assert.ErrorIs(agent.handleCheck(context.TODO(), payload), dupCheckRequestErr) - - // check request issued timestamp is newer than last issued - agent.lastIssuedMu.Lock() - agent.lastIssued[checkKey(request)] = time.Now().Unix() - 100 - agent.lastIssuedMu.Unlock() - assert.NoError(agent.handleCheck(context.TODO(), payload)) - - // check is already in progress, it shouldn't execute - agent.inProgressMu.Lock() - delete(agent.lastIssued, checkKey(request)) - agent.inProgress[checkKey(request)] = request.Config - agent.inProgressMu.Unlock() - assert.EqualError( - agent.handleCheck(context.TODO(), payload), - fmt.Sprintf("check execution still in progress: %s", request.Config.Name)) - - // check is not in progress, it should execute - agent.inProgressMu.Lock() - delete(agent.inProgress, checkKey(request)) - agent.inProgressMu.Unlock() - assert.NoError(agent.handleCheck(context.TODO(), payload)) } func TestCheckInProgress_GH2704(t *testing.T) { From 88eb0a8144df5d8181ff25636df21571daa2da94 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 16 Jun 2022 21:28:34 -0700 Subject: [PATCH 032/173] remove unused code Signed-off-by: Justin Kolberg --- agent/check_handler.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/agent/check_handler.go b/agent/check_handler.go index 53415f5006..76e5484f47 100644 --- a/agent/check_handler.go +++ b/agent/check_handler.go @@ -136,12 +136,6 @@ func (a *Agent) getLastIssued(request *corev2.CheckRequest) int64 { return issued } -func (a *Agent) removeLastIssued(request *corev2.CheckRequest) { - a.lastIssuedMu.Lock() - defer a.lastIssuedMu.Unlock() - delete(a.lastIssued, checkKey(request)) -} - func (a *Agent) setLastIssued(request *corev2.CheckRequest) { a.lastIssuedMu.Lock() defer a.lastIssuedMu.Unlock() From b913fb22f5be8f9dde0725b6f4924790ba63352b Mon Sep 17 00:00:00 2001 From: James Phillips Date: Mon, 20 Jun 2022 08:20:58 -0700 Subject: [PATCH 033/173] Add Fields() methods to corev2 resources (#4774) Signed-off-by: James Phillips --- api/core/v2/apikey.go | 5 ++ api/core/v2/apikey_test.go | 6 +- api/core/v2/asset.go | 5 ++ api/core/v2/asset_test.go | 4 +- api/core/v2/check_config.go | 5 ++ api/core/v2/check_config_test.go | 18 +++++- api/core/v2/entity.go | 5 ++ api/core/v2/entity_test.go | 6 +- api/core/v2/event.go | 5 ++ api/core/v2/event_test.go | 6 +- api/core/v2/extension.go | 5 ++ api/core/v2/extension_test.go | 6 +- api/core/v2/fielder.go | 7 +++ api/core/v2/filter.go | 8 ++- api/core/v2/filter_test.go | 6 +- api/core/v2/handler.go | 5 ++ api/core/v2/handler_test.go | 4 +- api/core/v2/hook.go | 5 ++ api/core/v2/hook_test.go | 6 +- api/core/v2/mutator.go | 5 ++ api/core/v2/mutator_test.go | 6 +- api/core/v2/namespace.go | 5 ++ api/core/v2/namespace_test.go | 6 +- api/core/v2/pipeline.go | 5 ++ api/core/v2/pipeline_test.go | 31 +++++++++++ api/core/v2/rbac.go | 20 +++++++ api/core/v2/rbac_test.go | 96 ++++++++++++++++++++++++++++++++ api/core/v2/silenced.go | 5 ++ api/core/v2/silenced_test.go | 6 +- api/core/v2/user.go | 5 ++ api/core/v2/user_test.go | 4 +- 31 files changed, 273 insertions(+), 38 deletions(-) create mode 100644 api/core/v2/fielder.go diff --git a/api/core/v2/apikey.go b/api/core/v2/apikey.go index b8e2083073..3740a46766 100644 --- a/api/core/v2/apikey.go +++ b/api/core/v2/apikey.go @@ -61,6 +61,11 @@ func APIKeyFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent the resource. +func (a *APIKey) Fields() map[string]string { + return APIKeyFields(a) +} + // SetNamespace sets the namespace of the resource. func (a *APIKey) SetNamespace(namespace string) {} diff --git a/api/core/v2/apikey_test.go b/api/core/v2/apikey_test.go index fb212e82d0..5165ae197a 100644 --- a/api/core/v2/apikey_test.go +++ b/api/core/v2/apikey_test.go @@ -44,7 +44,7 @@ func TestAPIKeyValidate(t *testing.T) { func TestAPIKeyFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -73,9 +73,9 @@ func TestAPIKeyFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := APIKeyFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("APIKeyFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + t.Errorf("APIKey.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } }) } diff --git a/api/core/v2/asset.go b/api/core/v2/asset.go index 9a52689643..04da501294 100644 --- a/api/core/v2/asset.go +++ b/api/core/v2/asset.go @@ -147,6 +147,11 @@ func AssetFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (a *Asset) Fields() map[string]string { + return AssetFields(a) +} + // SetNamespace sets the namespace of the resource. func (a *Asset) SetNamespace(namespace string) { a.Namespace = namespace diff --git a/api/core/v2/asset_test.go b/api/core/v2/asset_test.go index 96d059e9da..8c89137a45 100644 --- a/api/core/v2/asset_test.go +++ b/api/core/v2/asset_test.go @@ -64,7 +64,7 @@ func TestValidateName_GH3344(t *testing.T) { func TestAssetFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -93,7 +93,7 @@ func TestAssetFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := AssetFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { t.Errorf("AssetFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } diff --git a/api/core/v2/check_config.go b/api/core/v2/check_config.go index cc9bdd5273..448ad4f98d 100644 --- a/api/core/v2/check_config.go +++ b/api/core/v2/check_config.go @@ -251,3 +251,8 @@ func CheckConfigFields(r Resource) map[string]string { return fields } + +// CheckConfigFields returns a set of fields that represent that resource +func (c *CheckConfig) Fields() map[string]string { + return CheckConfigFields(c) +} diff --git a/api/core/v2/check_config_test.go b/api/core/v2/check_config_test.go index 5e3f172b47..9ea76cfd3f 100644 --- a/api/core/v2/check_config_test.go +++ b/api/core/v2/check_config_test.go @@ -144,7 +144,7 @@ func TestSortCheckConfigsByName(t *testing.T) { func TestCheckConfigFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -166,6 +166,18 @@ func TestCheckConfigFields(t *testing.T) { wantKey: "check.round_robin", want: "true", }, + { + name: "exposes pipelines", + args: &CheckConfig{ + Pipelines: []*ResourceReference{{ + Name: "xxx", + Type: "yyy", + APIVersion: "zzz", + }}, + }, + wantKey: "check.pipelines", + want: "zzz.yyy(Name=xxx)", + }, { name: "exposes labels", args: &CheckConfig{ @@ -179,9 +191,9 @@ func TestCheckConfigFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := CheckConfigFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("CheckConfigFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + t.Errorf("CheckConfig.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } }) } diff --git a/api/core/v2/entity.go b/api/core/v2/entity.go index 9c471e0af0..a3a7ae007d 100644 --- a/api/core/v2/entity.go +++ b/api/core/v2/entity.go @@ -180,6 +180,11 @@ func EntityFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (e *Entity) Fields() map[string]string { + return EntityFields(e) +} + // SetNamespace sets the namespace of the resource. func (e *Entity) SetNamespace(namespace string) { e.Namespace = namespace diff --git a/api/core/v2/entity_test.go b/api/core/v2/entity_test.go index 521d5d7b4c..8f027d4c5c 100644 --- a/api/core/v2/entity_test.go +++ b/api/core/v2/entity_test.go @@ -56,7 +56,7 @@ func TestEntityMarshal(t *testing.T) { func TestEntityFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -85,9 +85,9 @@ func TestEntityFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := EntityFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("EntityFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + t.Errorf("Entity.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } }) } diff --git a/api/core/v2/event.go b/api/core/v2/event.go index 3d7eedf393..0f7d175087 100644 --- a/api/core/v2/event.go +++ b/api/core/v2/event.go @@ -332,6 +332,11 @@ func EventFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (e *Event) Fields() map[string]string { + return EventFields(e) +} + func isSilenced(e *Event) string { if len(e.Check.Silenced) > 0 { return "true" diff --git a/api/core/v2/event_test.go b/api/core/v2/event_test.go index 2f5c151e44..7126f01d56 100644 --- a/api/core/v2/event_test.go +++ b/api/core/v2/event_test.go @@ -764,7 +764,7 @@ func TestUnmarshalID(t *testing.T) { func TestEventFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -816,9 +816,9 @@ func TestEventFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := EventFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("EventFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + t.Errorf("Event.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } }) } diff --git a/api/core/v2/extension.go b/api/core/v2/extension.go index eed01ac22b..834bc8c743 100644 --- a/api/core/v2/extension.go +++ b/api/core/v2/extension.go @@ -61,6 +61,11 @@ func ExtensionFields(r Resource) map[string]string { return fields } +// ExtensionFields returns a set of fields that represent that resource +func (e *Extension) Fields() map[string]string { + return ExtensionFields(e) +} + // SetNamespace sets the namespace of the resource. func (e *Extension) SetNamespace(namespace string) { e.Namespace = namespace diff --git a/api/core/v2/extension_test.go b/api/core/v2/extension_test.go index 9185351458..d69f03b8da 100644 --- a/api/core/v2/extension_test.go +++ b/api/core/v2/extension_test.go @@ -8,7 +8,7 @@ import ( func TestExtensionFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -31,9 +31,9 @@ func TestExtensionFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := ExtensionFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("ExtensionFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + t.Errorf("Extension.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } }) } diff --git a/api/core/v2/fielder.go b/api/core/v2/fielder.go new file mode 100644 index 0000000000..9f586593e3 --- /dev/null +++ b/api/core/v2/fielder.go @@ -0,0 +1,7 @@ +package v2 + +// Fielder includes a set of fields that represent a resource. +type Fielder interface { + // Fields returns a set of fields that represent the resource. + Fields() map[string]string +} diff --git a/api/core/v2/filter.go b/api/core/v2/filter.go index 75051b8fb2..fdb3fa0340 100644 --- a/api/core/v2/filter.go +++ b/api/core/v2/filter.go @@ -9,7 +9,6 @@ import ( "strings" "github.com/sensu/sensu-go/api/core/v2/internal/js" - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" utilstrings "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" ) @@ -173,10 +172,15 @@ func EventFilterFields(r Resource) map[string]string { "filter.action": resource.Action, "filter.runtime_assets": strings.Join(resource.RuntimeAssets, ","), } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "filter.labels.") + utilstrings.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "filter.labels.") return fields } +// Fields returns a set of fields that represent that resource +func (e *EventFilter) Fields() map[string]string { + return EventFilterFields(e) +} + // SetNamespace sets the namespace of the resource. func (f *EventFilter) SetNamespace(namespace string) { f.Namespace = namespace diff --git a/api/core/v2/filter_test.go b/api/core/v2/filter_test.go index 57e84c3a8d..d989e5513b 100644 --- a/api/core/v2/filter_test.go +++ b/api/core/v2/filter_test.go @@ -49,7 +49,7 @@ func TestEventFilterValidate(t *testing.T) { func TestEventFilterFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -78,9 +78,9 @@ func TestEventFilterFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := EventFilterFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("EventFilterFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + t.Errorf("EventFilter.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } }) } diff --git a/api/core/v2/handler.go b/api/core/v2/handler.go index 66e86a593e..f2f917cfeb 100644 --- a/api/core/v2/handler.go +++ b/api/core/v2/handler.go @@ -195,6 +195,11 @@ func HandlerFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (h *Handler) Fields() map[string]string { + return HandlerFields(h) +} + // SetNamespace sets the namespace of the resource. func (h *Handler) SetNamespace(namespace string) { h.Namespace = namespace diff --git a/api/core/v2/handler_test.go b/api/core/v2/handler_test.go index 433652cea2..ca435dc9b9 100644 --- a/api/core/v2/handler_test.go +++ b/api/core/v2/handler_test.go @@ -238,7 +238,7 @@ func TestSortHandlersByName(t *testing.T) { func TestHandlerFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -267,7 +267,7 @@ func TestHandlerFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := HandlerFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { t.Errorf("HandlerFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } diff --git a/api/core/v2/hook.go b/api/core/v2/hook.go index a5e279e802..dea4314af8 100644 --- a/api/core/v2/hook.go +++ b/api/core/v2/hook.go @@ -177,6 +177,11 @@ func HookConfigFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (h *HookConfig) Fields() map[string]string { + return HookConfigFields(h) +} + // SetNamespace sets the namespace of the resource. func (c *HookConfig) SetNamespace(namespace string) { c.Namespace = namespace diff --git a/api/core/v2/hook_test.go b/api/core/v2/hook_test.go index 3a070d53be..87ba455c25 100644 --- a/api/core/v2/hook_test.go +++ b/api/core/v2/hook_test.go @@ -112,7 +112,7 @@ func TestHookUnmarshal_GH1520(t *testing.T) { func TestHookConfigFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -135,9 +135,9 @@ func TestHookConfigFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := HookConfigFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("HookConfigFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + t.Errorf("HookConfig.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } }) } diff --git a/api/core/v2/mutator.go b/api/core/v2/mutator.go index 595bb40c0d..71fbec9525 100644 --- a/api/core/v2/mutator.go +++ b/api/core/v2/mutator.go @@ -160,6 +160,11 @@ func MutatorFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (m *Mutator) Fields() map[string]string { + return MutatorFields(m) +} + // SetNamespace sets the namespace of the resource. func (m *Mutator) SetNamespace(namespace string) { m.Namespace = namespace diff --git a/api/core/v2/mutator_test.go b/api/core/v2/mutator_test.go index 72a8142119..d2b9b7b412 100644 --- a/api/core/v2/mutator_test.go +++ b/api/core/v2/mutator_test.go @@ -70,7 +70,7 @@ func TestSortMutatorsByName(t *testing.T) { func TestMutatorFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -93,9 +93,9 @@ func TestMutatorFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := MutatorFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("MutatorFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + t.Errorf("Mutator.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } }) } diff --git a/api/core/v2/namespace.go b/api/core/v2/namespace.go index cdfe27b8ca..acedd1328d 100644 --- a/api/core/v2/namespace.go +++ b/api/core/v2/namespace.go @@ -54,6 +54,11 @@ func NamespaceFields(r Resource) map[string]string { } } +// Fields returns a set of fields that represent that resource +func (n *Namespace) Fields() map[string]string { + return NamespaceFields(n) +} + // SetNamespace sets the namespace of the resource. func (n *Namespace) SetNamespace(namespace string) { } diff --git a/api/core/v2/namespace_test.go b/api/core/v2/namespace_test.go index f8d1e56198..bd7419ebde 100644 --- a/api/core/v2/namespace_test.go +++ b/api/core/v2/namespace_test.go @@ -8,7 +8,7 @@ import ( func TestNamespaceFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -21,9 +21,9 @@ func TestNamespaceFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := NamespaceFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("NamespaceFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + t.Errorf("Namespace.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } }) } diff --git a/api/core/v2/pipeline.go b/api/core/v2/pipeline.go index 8df330f019..e119a2c0e9 100644 --- a/api/core/v2/pipeline.go +++ b/api/core/v2/pipeline.go @@ -77,6 +77,11 @@ func PipelineFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource. +func (p *Pipeline) Fields() map[string]string { + return PipelineFields(p) +} + // FixturePipeline returns a testing fixture for a Pipeline object. func FixturePipeline(name, namespace string) *Pipeline { return &Pipeline{ diff --git a/api/core/v2/pipeline_test.go b/api/core/v2/pipeline_test.go index 32288887db..6cc7d56aad 100644 --- a/api/core/v2/pipeline_test.go +++ b/api/core/v2/pipeline_test.go @@ -1,6 +1,7 @@ package v2 import ( + "reflect" "testing" ) @@ -286,3 +287,33 @@ func TestResourceReference_validate(t *testing.T) { }) } } + +func TestPipelineFields(t *testing.T) { + tests := []struct { + name string + args Fielder + wantKey string + want string + }{ + { + name: "exposes name", + args: FixturePipeline("contoso", "default"), + wantKey: "pipeline.name", + want: "contoso", + }, + { + name: "exposes namespace", + args: FixturePipeline("contoso", "default"), + wantKey: "pipeline.namespace", + want: "default", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := tt.args.Fields() + if !reflect.DeepEqual(got[tt.wantKey], tt.want) { + t.Errorf("Pipeline.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + } + }) + } +} diff --git a/api/core/v2/rbac.go b/api/core/v2/rbac.go index 093c9c52a9..4021e21e6b 100644 --- a/api/core/v2/rbac.go +++ b/api/core/v2/rbac.go @@ -380,6 +380,11 @@ func ClusterRoleFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (c *ClusterRole) Fields() map[string]string { + return ClusterRoleFields(c) +} + // ClusterRoleBindingFields returns a set of fields that represent that resource func ClusterRoleBindingFields(r Resource) map[string]string { resource := r.(*ClusterRoleBinding) @@ -392,6 +397,11 @@ func ClusterRoleBindingFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (c *ClusterRoleBinding) Fields() map[string]string { + return ClusterRoleBindingFields(c) +} + // RoleFields returns a set of fields that represent that resource func RoleFields(r Resource) map[string]string { resource := r.(*Role) @@ -403,6 +413,11 @@ func RoleFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (c *Role) Fields() map[string]string { + return RoleFields(c) +} + // RoleBindingFields returns a set of fields that represent that resource func RoleBindingFields(r Resource) map[string]string { resource := r.(*RoleBinding) @@ -416,6 +431,11 @@ func RoleBindingFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (c *RoleBinding) Fields() map[string]string { + return RoleBindingFields(c) +} + // SetNamespace sets the namespace of the resource. func (r *ClusterRole) SetNamespace(namespace string) { } diff --git a/api/core/v2/rbac_test.go b/api/core/v2/rbac_test.go index accc4e3aff..892ef32cc4 100644 --- a/api/core/v2/rbac_test.go +++ b/api/core/v2/rbac_test.go @@ -360,3 +360,99 @@ func TestValidateRoleRef(t *testing.T) { }) } } + +func TestRoleFields(t *testing.T) { + tests := []struct { + name string + args Fielder + wantKey string + want string + }{ + { + name: "exposes name", + args: FixtureRole("contoso", "default"), + wantKey: "role.name", + want: "contoso", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := tt.args.Fields() + if !reflect.DeepEqual(got[tt.wantKey], tt.want) { + t.Errorf("Role.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + } + }) + } +} + +func TestRoleBindingFields(t *testing.T) { + tests := []struct { + name string + args Fielder + wantKey string + want string + }{ + { + name: "exposes name", + args: FixtureRoleBinding("contoso", "default"), + wantKey: "rolebinding.name", + want: "contoso", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := tt.args.Fields() + if !reflect.DeepEqual(got[tt.wantKey], tt.want) { + t.Errorf("RoleBinding.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + } + }) + } +} + +func TestClusterRoleFields(t *testing.T) { + tests := []struct { + name string + args Fielder + wantKey string + want string + }{ + { + name: "exposes name", + args: FixtureClusterRole("contoso"), + wantKey: "clusterrole.name", + want: "contoso", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := tt.args.Fields() + if !reflect.DeepEqual(got[tt.wantKey], tt.want) { + t.Errorf("ClusterRole.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + } + }) + } +} + +func TestClusterRoleBindingFields(t *testing.T) { + tests := []struct { + name string + args Fielder + wantKey string + want string + }{ + { + name: "exposes name", + args: FixtureClusterRoleBinding("contoso"), + wantKey: "clusterrolebinding.name", + want: "contoso", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := tt.args.Fields() + if !reflect.DeepEqual(got[tt.wantKey], tt.want) { + t.Errorf("ClusterRoleBinding.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + } + }) + } +} diff --git a/api/core/v2/silenced.go b/api/core/v2/silenced.go index 0998921577..7e4b9feaa5 100644 --- a/api/core/v2/silenced.go +++ b/api/core/v2/silenced.go @@ -201,6 +201,11 @@ func SilencedFields(r Resource) map[string]string { return fields } +// Fields returns a set of fields that represent that resource +func (s *Silenced) Fields() map[string]string { + return SilencedFields(s) +} + // SetNamespace sets the namespace of the resource. func (s *Silenced) SetNamespace(namespace string) { s.Namespace = namespace diff --git a/api/core/v2/silenced_test.go b/api/core/v2/silenced_test.go index b0c402a813..1efb30f76c 100644 --- a/api/core/v2/silenced_test.go +++ b/api/core/v2/silenced_test.go @@ -165,7 +165,7 @@ func TestSilencedMatches(t *testing.T) { func TestSilencedFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -194,9 +194,9 @@ func TestSilencedFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := SilencedFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("SilencedFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + t.Errorf("Silenced.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } }) } diff --git a/api/core/v2/user.go b/api/core/v2/user.go index e614817f3a..ee20ab7f06 100644 --- a/api/core/v2/user.go +++ b/api/core/v2/user.go @@ -70,6 +70,11 @@ func UserFields(r Resource) map[string]string { } } +// Fields returns a set of fields that represent that resource +func (u *User) Fields() map[string]string { + return UserFields(u) +} + // SetNamespace sets the namespace of the resource. func (u *User) SetNamespace(namespace string) { } diff --git a/api/core/v2/user_test.go b/api/core/v2/user_test.go index 1574014448..d46d145702 100644 --- a/api/core/v2/user_test.go +++ b/api/core/v2/user_test.go @@ -43,7 +43,7 @@ func TestUserValidatePassword(t *testing.T) { func TestUserFields(t *testing.T) { tests := []struct { name string - args Resource + args Fielder wantKey string want string }{ @@ -62,7 +62,7 @@ func TestUserFields(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := UserFields(tt.args) + got := tt.args.Fields() if !reflect.DeepEqual(got[tt.wantKey], tt.want) { t.Errorf("UserFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) } From 61b4026b01639356b32fcbcfb025649c23bbd47a Mon Sep 17 00:00:00 2001 From: Melissa Page <73hl10n@gmail.com> Date: Wed, 6 Jul 2022 13:35:01 -0700 Subject: [PATCH 034/173] [Graphql] Query builds on asset resource (#4791) * Add builds to asset Signed-off-by: Melissa Page <73hl10n@gmail.com> Co-authored-by: James Phillips --- backend/apid/graphql/schema/asset.gql.go | 26 +++ backend/apid/graphql/schema/asset.graphql | 5 + backend/apid/graphql/schema/corev2.gen.gql.go | 171 ++++++++++++++++++ .../apid/graphql/schema/corev2.gen.graphql | 26 +++ backend/apid/graphql/schema/schema_gen.go | 2 +- backend/apid/graphql/service.go | 1 + 6 files changed, 230 insertions(+), 1 deletion(-) diff --git a/backend/apid/graphql/schema/asset.gql.go b/backend/apid/graphql/schema/asset.gql.go index 9ea44600e3..cd3b5d0137 100644 --- a/backend/apid/graphql/schema/asset.gql.go +++ b/backend/apid/graphql/schema/asset.gql.go @@ -35,6 +35,9 @@ type AssetFieldResolvers interface { // ToJSON implements response to request for 'toJSON' field. ToJSON(p graphql.ResolveParams) (interface{}, error) + + // Builds implements response to request for 'builds' field. + Builds(p graphql.ResolveParams) (interface{}, error) } // AssetAliases implements all methods on AssetFieldResolvers interface by using reflection to @@ -133,6 +136,12 @@ func (_ AssetAliases) ToJSON(p graphql.ResolveParams) (interface{}, error) { return val, err } +// Builds implements response to request for 'builds' field. +func (_ AssetAliases) Builds(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + // AssetType Asset defines an archive, an agent will install as a dependency for a check. var AssetType = graphql.NewType("Asset", graphql.ObjectKind) @@ -212,10 +221,26 @@ func _ObjTypeAssetToJSONHandler(impl interface{}) graphql1.FieldResolveFn { } } +func _ObjTypeAssetBuildsHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Builds(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Builds(frp) + } +} + func _ObjectTypeAssetConfigFn() graphql1.ObjectConfig { return graphql1.ObjectConfig{ Description: "Asset defines an archive, an agent will install as a dependency for a check.", Fields: graphql1.Fields{ + "builds": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Builds defines a collection of assets that this asset can install as a dependency for a check, handler, mutator, etc. .", + Name: "builds", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql.OutputType("CoreV2AssetBuild")))), + }, "filters": &graphql1.Field{ Args: graphql1.FieldConfigArgument{}, DeprecationReason: "", @@ -293,6 +318,7 @@ func _ObjectTypeAssetConfigFn() graphql1.ObjectConfig { var _ObjectTypeAssetDesc = graphql.ObjectDesc{ Config: _ObjectTypeAssetConfigFn, FieldHandlers: map[string]graphql.FieldHandler{ + "builds": _ObjTypeAssetBuildsHandler, "filters": _ObjTypeAssetFiltersHandler, "id": _ObjTypeAssetIDHandler, "metadata": _ObjTypeAssetMetadataHandler, diff --git a/backend/apid/graphql/schema/asset.graphql b/backend/apid/graphql/schema/asset.graphql index d5c232c523..6cd77852b2 100644 --- a/backend/apid/graphql/schema/asset.graphql +++ b/backend/apid/graphql/schema/asset.graphql @@ -32,4 +32,9 @@ type Asset implements Node & Namespaced & Resource { sharing snippets that can then be imported with `sensuctl create`. """ toJSON: JSON! + + """ + Builds defines a collection of assets that this asset can install as a dependency for a check, handler, mutator, etc. . + """ + builds: [CoreV2AssetBuild!]! } diff --git a/backend/apid/graphql/schema/corev2.gen.gql.go b/backend/apid/graphql/schema/corev2.gen.gql.go index 54b70d25a7..059c519ff4 100644 --- a/backend/apid/graphql/schema/corev2.gen.gql.go +++ b/backend/apid/graphql/schema/corev2.gen.gql.go @@ -8,6 +8,177 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) +// +// CoreV2AssetBuildFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2AssetBuild' type. +type CoreV2AssetBuildFieldResolvers interface { + // Url implements response to request for 'url' field. + Url(p graphql.ResolveParams) (string, error) + + // Sha512 implements response to request for 'sha512' field. + Sha512(p graphql.ResolveParams) (string, error) + + // Filters implements response to request for 'filters' field. + Filters(p graphql.ResolveParams) ([]string, error) + + // Headers implements response to request for 'headers' field. + Headers(p graphql.ResolveParams) (interface{}, error) +} + +// CoreV2AssetBuildAliases implements all methods on CoreV2AssetBuildFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2AssetBuildAliases struct{} + +// Url implements response to request for 'url' field. +func (_ CoreV2AssetBuildAliases) Url(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'url'") + } + return ret, err +} + +// Sha512 implements response to request for 'sha512' field. +func (_ CoreV2AssetBuildAliases) Sha512(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'sha512'") + } + return ret, err +} + +// Filters implements response to request for 'filters' field. +func (_ CoreV2AssetBuildAliases) Filters(p graphql.ResolveParams) ([]string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.([]string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'filters'") + } + return ret, err +} + +// Headers implements response to request for 'headers' field. +func (_ CoreV2AssetBuildAliases) Headers(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +/* +CoreV2AssetBuildType AssetBuild defines an individual asset that an asset can install as a +dependency for a check, handler, mutator, etc. +*/ +var CoreV2AssetBuildType = graphql.NewType("CoreV2AssetBuild", graphql.ObjectKind) + +// RegisterCoreV2AssetBuild registers CoreV2AssetBuild object type with given service. +func RegisterCoreV2AssetBuild(svc *graphql.Service, impl CoreV2AssetBuildFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2AssetBuildDesc, impl) +} +func _ObjTypeCoreV2AssetBuildUrlHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Url(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Url(frp) + } +} + +func _ObjTypeCoreV2AssetBuildSha512Handler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Sha512(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Sha512(frp) + } +} + +func _ObjTypeCoreV2AssetBuildFiltersHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Filters(p graphql.ResolveParams) ([]string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Filters(frp) + } +} + +func _ObjTypeCoreV2AssetBuildHeadersHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Headers(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Headers(frp) + } +} + +func _ObjectTypeCoreV2AssetBuildConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "AssetBuild defines an individual asset that an asset can install as a\ndependency for a check, handler, mutator, etc.", + Fields: graphql1.Fields{ + "filters": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Filters are a collection of sensu queries, used by the system to\ndetermine if the asset should be installed. If more than one filter is\npresent the queries are joined by the \"AND\" operator.", + Name: "filters", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), + }, + "headers": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Headers is a collection of key/value string pairs used as HTTP headers\nfor asset retrieval.", + Name: "headers", + Type: graphql1.NewNonNull(graphql.OutputType("JSON")), + }, + "sha512": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Sha512 is the SHA-512 checksum of the asset", + Name: "sha512", + Type: graphql1.NewNonNull(graphql1.String), + }, + "url": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "URL is the location of the asset", + Name: "url", + Type: graphql1.NewNonNull(graphql1.String), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2AssetBuildFieldResolvers.") + }, + Name: "CoreV2AssetBuild", + } +} + +// describe CoreV2AssetBuild's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2AssetBuildDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2AssetBuildConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "filters": _ObjTypeCoreV2AssetBuildFiltersHandler, + "headers": _ObjTypeCoreV2AssetBuildHeadersHandler, + "sha512": _ObjTypeCoreV2AssetBuildSha512Handler, + "url": _ObjTypeCoreV2AssetBuildUrlHandler, + }, +} + // // CoreV2PipelineFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Pipeline' type. diff --git a/backend/apid/graphql/schema/corev2.gen.graphql b/backend/apid/graphql/schema/corev2.gen.graphql index caa7669790..aa5098dc38 100644 --- a/backend/apid/graphql/schema/corev2.gen.graphql +++ b/backend/apid/graphql/schema/corev2.gen.graphql @@ -1,5 +1,31 @@ # automatically generated file, do not edit! +""" +AssetBuild defines an individual asset that an asset can install as a +dependency for a check, handler, mutator, etc. +""" +type CoreV2AssetBuild { + + """URL is the location of the asset""" + url: String! + + """Sha512 is the SHA-512 checksum of the asset""" + sha512: String! + + """ + Filters are a collection of sensu queries, used by the system to + determine if the asset should be installed. If more than one filter is + present the queries are joined by the "AND" operator. + """ + filters: [String!]! + + """ + Headers is a collection of key/value string pairs used as HTTP headers + for asset retrieval. + """ + headers: JSON! +} + """Pipeline represents a named collection of pipeline workflows.""" type CoreV2Pipeline { diff --git a/backend/apid/graphql/schema/schema_gen.go b/backend/apid/graphql/schema/schema_gen.go index 0cf20832f4..40d4e19542 100644 --- a/backend/apid/graphql/schema/schema_gen.go +++ b/backend/apid/graphql/schema/schema_gen.go @@ -1,4 +1,4 @@ package schema -//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types Secret,Pipeline,PipelineWorkflow,ResourceReference -pkg-path ../../../../api/core/v2 -o ./corev2.gen.graphql +//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types Secret,Pipeline,PipelineWorkflow,ResourceReference,AssetBuild -pkg-path ../../../../api/core/v2 -o ./corev2.gen.graphql //go:generate go run github.com/sensu/sensu-go/scripts/gengraphql . diff --git a/backend/apid/graphql/service.go b/backend/apid/graphql/service.go index 20e57d250d..444f67dde4 100644 --- a/backend/apid/graphql/service.go +++ b/backend/apid/graphql/service.go @@ -66,6 +66,7 @@ func NewService(cfg ServiceConfig) (*Service, error) { // Register types schema.RegisterAsset(svc, &assetImpl{}) + schema.RegisterCoreV2AssetBuild(svc, &schema.CoreV2AssetBuildAliases{}) schema.RegisterCoreV2Pipeline(svc, &corev2PipelineImpl{}) schema.RegisterCoreV2PipelineExtensionOverrides(svc, &corev2PipelineImpl{}) schema.RegisterCoreV2PipelineWorkflow(svc, &schema.CoreV2PipelineWorkflowAliases{}) From 3da7cc5fc3d3e75f37d5a3013be82ac8ab0f0086 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 7 Jul 2022 09:47:42 -0700 Subject: [PATCH 035/173] prep for 6.7.3 release Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index f72d0f047d..8a3860bd41 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,6 +7,8 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +## [6.7.3] - 2022-07-07 + ## [6.7.2] - 2022-05-12 ### Added @@ -143,7 +145,6 @@ sensuctl or the webui. ### Added - Add backend label to logged metrics. -### Added - Check & CheckConfig validation errors related to cron now provide additional context. From bd9cea568fed15d1bb8f8b1b8909741853d40317 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 16 Jun 2022 13:06:10 -0700 Subject: [PATCH 036/173] prevent old & dup check request execution Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 5 + agent/agent.go | 11 +- agent/check_handler.go | 49 +++++++-- agent/check_handler_internal_test.go | 159 +++++++++++++++++++++------ 4 files changed, 183 insertions(+), 41 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 8a3860bd41..b7f32a22c8 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -9,6 +9,11 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## [6.7.3] - 2022-07-07 +### Changed +- Agents will no longer execute check requests with equal or older issued +timestamps than the issued timestamp for the last executed check request with +the same check name. + ## [6.7.2] - 2022-05-12 ### Added diff --git a/agent/agent.go b/agent/agent.go index 8aab130e90..9a192182af 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -152,6 +152,8 @@ type Agent struct { header http.Header inProgress map[string]*corev2.CheckConfig inProgressMu *sync.Mutex + lastIssued map[string]int64 + lastIssuedMu *sync.Mutex localEntityConfig *corev3.EntityConfig statsdServer StatsdServer sendq chan *transport.Message @@ -194,6 +196,8 @@ func NewAgentContext(ctx context.Context, config *Config) (*Agent, error) { entityConfigCh: make(chan struct{}), inProgress: make(map[string]*corev2.CheckConfig), inProgressMu: &sync.Mutex{}, + lastIssued: make(map[string]int64), + lastIssuedMu: &sync.Mutex{}, sendq: make(chan *transport.Message, 10), systemInfo: &corev2.System{}, unmarshal: UnmarshalJSON, @@ -559,7 +563,12 @@ func (a *Agent) receiveLoop(ctx context.Context, cancel context.CancelFunc, conn }).Info("message received") err := a.handler.Handle(ctx, msg.Type, msg.Payload) if err != nil { - logger.WithError(err).Error("error handling message") + switch err { + case errDupCheckRequest: + logger.WithError(err).Warn("error handling message") + default: + logger.WithError(err).Error("error handling message") + } } }(m) } diff --git a/agent/check_handler.go b/agent/check_handler.go index 005ba36c99..76e5484f47 100644 --- a/agent/check_handler.go +++ b/agent/check_handler.go @@ -31,6 +31,11 @@ const ( measureNullStatus = "null-status" ) +var ( + errDupCheckRequest = errors.New("check request has already been received - agent and check may have multiple matching subscriptions") + errOldCheckRequest = errors.New("check request is older than a previously received check request") +) + // handleCheck is the check message handler. // TODO(greg): At some point, we're going to need max parallelism. func (a *Agent) handleCheck(ctx context.Context, payload []byte) error { @@ -42,6 +47,23 @@ func (a *Agent) handleCheck(ctx context.Context, payload []byte) error { } checkConfig := request.Config + + // only schedule check execution if the issued timestamp is newer than any + // previous executions of the check + lastIssued := a.getLastIssued(request) + if lastIssued > request.Issued { + return errOldCheckRequest + } + if lastIssued == request.Issued { + return errDupCheckRequest + } + + // only schedule check execution if its not already in progress + // ** check hooks are part of a checks execution + if a.checkInProgress(request) { + return fmt.Errorf("check execution still in progress: %s", checkConfig.Name) + } + sendFailure := func(err error) { check := corev2.NewCheck(checkConfig) check.Executed = time.Now().Unix() @@ -58,12 +80,6 @@ func (a *Agent) handleCheck(ctx context.Context, payload []byte) error { return nil } - // only schedule check execution if its not already in progress - // ** check hooks are part of a checks execution - if a.checkInProgress(request) { - return fmt.Errorf("check execution still in progress: %s", checkConfig.Name) - } - // Validate that the given check is valid. if err := request.Config.Validate(); err != nil { sendFailure(fmt.Errorf("given check is invalid: %s", err)) @@ -100,17 +116,34 @@ func checkKey(request *corev2.CheckRequest) string { func (a *Agent) addInProgress(request *corev2.CheckRequest) { a.inProgressMu.Lock() + defer a.inProgressMu.Unlock() a.inProgress[checkKey(request)] = request.Config - a.inProgressMu.Unlock() } func (a *Agent) removeInProgress(request *corev2.CheckRequest) { a.inProgressMu.Lock() + defer a.inProgressMu.Unlock() delete(a.inProgress, checkKey(request)) - a.inProgressMu.Unlock() +} + +func (a *Agent) getLastIssued(request *corev2.CheckRequest) int64 { + a.lastIssuedMu.Lock() + defer a.lastIssuedMu.Unlock() + issued, ok := a.lastIssued[checkKey(request)] + if !ok { + return 0 + } + return issued +} + +func (a *Agent) setLastIssued(request *corev2.CheckRequest) { + a.lastIssuedMu.Lock() + defer a.lastIssuedMu.Unlock() + a.lastIssued[checkKey(request)] = request.Issued } func (a *Agent) executeCheck(ctx context.Context, request *corev2.CheckRequest, entity *corev2.Entity) { + a.setLastIssued(request) a.addInProgress(request) defer a.removeInProgress(request) diff --git a/agent/check_handler_internal_test.go b/agent/check_handler_internal_test.go index 0d9efa9637..f37dd00dea 100644 --- a/agent/check_handler_internal_test.go +++ b/agent/check_handler_internal_test.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "sync" "testing" "time" @@ -17,40 +18,134 @@ import ( ) func TestHandleCheck(t *testing.T) { - assert := assert.New(t) - - checkConfig := corev2.FixtureCheckConfig("check") - - request := &corev2.CheckRequest{Config: checkConfig, Issued: time.Now().Unix()} - payload, err := json.Marshal(request) - if err != nil { - assert.FailNow("error marshaling check request") + newCheckRequest := func(t *testing.T, issued int64) []byte { + checkConfig := corev2.FixtureCheckConfig("check") + checkRequest := &corev2.CheckRequest{ + Config: checkConfig, + Issued: issued, + } + payload, err := json.Marshal(checkRequest) + require.NoError(t, err) + return payload } - - config, cleanup := FixtureConfig() - defer cleanup() - agent, err := NewAgent(config) - if err != nil { - t.Fatal(err) + type fields struct { + inProgress map[string]*corev2.CheckConfig + lastIssued map[string]int64 + sequences map[string]int64 + } + type args struct { + ctx context.Context + payload []byte + } + tests := []struct { + name string + fields fields + args args + wantErr bool + wantErrMsg string + }{ + { + name: "errors when issued timestamp is older than the previous", + fields: fields{ + lastIssued: map[string]int64{ + "check": time.Now().Unix() + 1000, + }, + }, + args: args{ + ctx: context.Background(), + payload: newCheckRequest(t, time.Now().Unix()), + }, + wantErr: true, + wantErrMsg: errOldCheckRequest.Error(), + }, + { + name: "errors when issued timestamp is the same as the previous", + fields: fields{ + lastIssued: map[string]int64{ + "check": 1234, + }, + }, + args: args{ + ctx: context.Background(), + payload: newCheckRequest(t, 1234), + }, + wantErr: true, + wantErrMsg: errDupCheckRequest.Error(), + }, + { + name: "errors when check execution is already in progress", + fields: fields{ + inProgress: map[string]*corev2.CheckConfig{ + "check": corev2.FixtureCheckConfig("check"), + }, + lastIssued: map[string]int64{ + "check": 1234, + }, + }, + args: args{ + ctx: context.Background(), + payload: newCheckRequest(t, 1235), + }, + wantErr: true, + wantErrMsg: "check execution still in progress: check", + }, + { + name: "executes the first time a request for a check is received", + fields: fields{ + inProgress: make(map[string]*corev2.CheckConfig), + lastIssued: make(map[string]int64), + sequences: make(map[string]int64), + }, + args: args{ + ctx: context.Background(), + payload: newCheckRequest(t, 1235), + }, + wantErr: false, + }, + { + name: "executes the second time a request for a check is received", + fields: fields{ + inProgress: make(map[string]*corev2.CheckConfig), + lastIssued: map[string]int64{ + "check": 1234, + }, + sequences: map[string]int64{ + "check": 1, + }, + }, + args: args{ + ctx: context.Background(), + payload: newCheckRequest(t, 1235), + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + agentConfig := &Config{} + ex := &mockexecutor.MockExecutor{} + execution := command.FixtureExecutionResponse(0, "") + ex.Return(execution, nil) + agent := &Agent{ + config: agentConfig, + executor: ex, + inProgress: tt.fields.inProgress, + inProgressMu: &sync.Mutex{}, + lastIssued: tt.fields.lastIssued, + lastIssuedMu: &sync.Mutex{}, + marshal: MarshalJSON, + sequences: tt.fields.sequences, + unmarshal: UnmarshalJSON, + } + err := agent.handleCheck(tt.args.ctx, tt.args.payload) + if (err != nil) != tt.wantErr { + t.Errorf("Agent.handleCheck() error = %v, wantErr %v", err, tt.wantErr) + } + if err != nil && err.Error() != tt.wantErrMsg { + t.Errorf("Agent.handleCheck() error msg = %v, wantErrMsg %v", err.Error(), tt.wantErrMsg) + } + }) } - ex := &mockexecutor.MockExecutor{} - agent.executor = ex - execution := command.FixtureExecutionResponse(0, "") - ex.Return(execution, nil) - ch := make(chan *transport.Message, 5) - agent.sendq = ch - - // check is already in progress, it shouldn't execute - agent.inProgressMu.Lock() - agent.inProgress[checkKey(request)] = request.Config - agent.inProgressMu.Unlock() - assert.Error(agent.handleCheck(context.TODO(), payload)) - - // check is not in progress, it should execute - agent.inProgressMu.Lock() - delete(agent.inProgress, checkKey(request)) - agent.inProgressMu.Unlock() - assert.NoError(agent.handleCheck(context.TODO(), payload)) } func TestCheckInProgress_GH2704(t *testing.T) { From b7e28270ae24b1b8f3831a9fda20ba00cb934ce8 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 7 Jul 2022 13:06:12 -0700 Subject: [PATCH 037/173] fix changelog Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index fa27f3eeac..f08d96f850 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -10,6 +10,7 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Added - GlobalResource interface in core/v3 allows core/v3 resources to be marked as global resources. + ## [6.7.3] - 2022-07-07 ### Changed From 3610709f71ddcbe46710df3fcb8629211ef9c9c4 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Tue, 12 Jul 2022 15:11:57 -0700 Subject: [PATCH 038/173] Upgrade Go to 1.17.12 Mitigates several CVEs. https://github.com/golang/go/issues?q=milestone%3AGo1.17.12+label%3ACherryPickApproved for details. Signed-off-by: Eric Chlebek --- .circleci/config.yml | 4 ++-- CHANGELOG-6.md | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 13fe906987..a8d71421a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,12 +1,12 @@ version: 2.1 orbs: - go: circleci/go@1.1.2 + go: circleci/go@1.7.1 parameters: go_version: type: string - default: "1.17.6" + default: "1.17.12" sensu_go_build_env: &sensu_go_build_env docker: diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index b7f32a22c8..2dbe2a27b4 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,6 +7,11 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +## [6.7.4] - 2022-07-12 + +### Changed +- Upgraded CI Go version to 1.17.12 + ## [6.7.3] - 2022-07-07 ### Changed From 7a95f01756a925a5e0ee48454f719d4054c41a64 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Fri, 15 Jul 2022 10:52:27 -0700 Subject: [PATCH 039/173] Update appveyor as well Signed-off-by: Eric Chlebek --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index ad2f8d8a54..852cd9f896 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -16,7 +16,7 @@ cache: environment: GOPATH: c:\gopath GOROOT: c:\Program Files\Go - GOVERSION: 1.17.6 + GOVERSION: 1.17.12 GO111MODULE: 'on' GOPROXY: 'https://proxy.golang.org' From f6f6a2c634bd76c9d70d096eabdc319cc6f10783 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 19 Jul 2022 14:52:12 -0700 Subject: [PATCH 040/173] Backport addition of corev3.ValidateGlobalMetadata (#4800) * Backport addition of corev3.ValidateGlobalMetadata Signed-off-by: Christian Kruse * fix typo Signed-off-by: Christian Kruse --- api/core/v3/validation.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/api/core/v3/validation.go b/api/core/v3/validation.go index cd2d53eec3..7cf6b9f095 100644 --- a/api/core/v3/validation.go +++ b/api/core/v3/validation.go @@ -22,3 +22,18 @@ func ValidateMetadata(meta *corev2.ObjectMeta) error { } return nil } + +// ValidateGlobalMetadata validates ObjectMeta for global (unnamespaced) +// resources. To be used on Resources implementing GlobalResource +func ValidateGlobalMetadata(meta *corev2.ObjectMeta) error { + if meta == nil { + return errors.New("nil metadata") + } + if meta.Namespace != "" { + return fmt.Errorf( + "global resources must have empty namespace: got %s", + meta.Namespace, + ) + } + return nil +} From 35d054530faf49d701b25a3bf58f550a4663fdcc Mon Sep 17 00:00:00 2001 From: James Phillips Date: Thu, 21 Jul 2022 10:28:07 -0700 Subject: [PATCH 041/173] [GraphQL] Generate & Implement RBAC types (#4793) Closes sensu/sensu-enterprise-go#2313 Required by sensu/sensu-enterprise-go#2362 Signed-off-by: James Phillips --- backend/apid/graphql/corev2.go | 110 +++ backend/apid/graphql/corev2_test.go | 178 +++- backend/apid/graphql/node.go | 8 +- backend/apid/graphql/rbac.go | 44 - backend/apid/graphql/schema/corev2.gen.gql.go | 912 ++++++++++++++++-- .../apid/graphql/schema/corev2.gen.graphql | 92 ++ backend/apid/graphql/schema/corev2.gql.go | 276 ++++++ backend/apid/graphql/schema/corev2.graphql | 67 ++ backend/apid/graphql/schema/rbac.gql.go | 901 ----------------- backend/apid/graphql/schema/rbac.graphql | 88 -- backend/apid/graphql/schema/schema_gen.go | 2 +- backend/apid/graphql/service.go | 18 +- graphql/resolvers.go | 3 +- 13 files changed, 1564 insertions(+), 1135 deletions(-) delete mode 100644 backend/apid/graphql/rbac.go delete mode 100644 backend/apid/graphql/schema/rbac.gql.go delete mode 100644 backend/apid/graphql/schema/rbac.graphql diff --git a/backend/apid/graphql/corev2.go b/backend/apid/graphql/corev2.go index 33b236b97d..fee7ecf679 100644 --- a/backend/apid/graphql/corev2.go +++ b/backend/apid/graphql/corev2.go @@ -8,6 +8,12 @@ import ( "github.com/sensu/sensu-go/types" ) +// +// CoreV2Pipeline +// + +var _ schema.CoreV2PipelineExtensionOverridesFieldResolvers = (*corev2PipelineImpl)(nil) + type corev2PipelineImpl struct { schema.CoreV2PipelineAliases } @@ -27,3 +33,107 @@ func (*corev2PipelineImpl) IsTypeOf(s interface{}, p graphql.IsTypeOfParams) boo _, ok := s.(*corev2.Pipeline) return ok } + +// +// Implement ClusterRoleFieldResolvers +// + +var _ schema.CoreV2ClusterRoleExtensionOverridesFieldResolvers = (*clusterRoleImpl)(nil) + +type clusterRoleImpl struct { + schema.CoreV2ClusterRoleAliases +} + +// ID implements response to request for 'id' field. +func (*clusterRoleImpl) ID(p graphql.ResolveParams) (string, error) { + return globalid.ClusterRoleTranslator.EncodeToString(p.Context, p.Source), nil +} + +// ToJSON implements response to request for 'toJSON' field. +func (*clusterRoleImpl) ToJSON(p graphql.ResolveParams) (interface{}, error) { + return types.WrapResource(p.Source.(corev2.Resource)), nil +} + +// IsTypeOf is used to determine if a given value is associated with the type +func (*clusterRoleImpl) IsTypeOf(s interface{}, p graphql.IsTypeOfParams) bool { + _, ok := s.(*corev2.ClusterRole) + return ok +} + +// +// Implement ClusterRoleBindingFieldResolvers +// + +var _ schema.CoreV2ClusterRoleBindingExtensionOverridesFieldResolvers = (*clusterRoleBindingImpl)(nil) + +type clusterRoleBindingImpl struct { + schema.CoreV2ClusterRoleBindingAliases +} + +// ID implements response to request for 'id' field. +func (*clusterRoleBindingImpl) ID(p graphql.ResolveParams) (string, error) { + return globalid.ClusterRoleBindingTranslator.EncodeToString(p.Context, p.Source), nil +} + +// ToJSON implements response to request for 'toJSON' field. +func (*clusterRoleBindingImpl) ToJSON(p graphql.ResolveParams) (interface{}, error) { + return types.WrapResource(p.Source.(corev2.Resource)), nil +} + +// IsTypeOf is used to determine if a given value is associated with the type +func (*clusterRoleBindingImpl) IsTypeOf(s interface{}, p graphql.IsTypeOfParams) bool { + _, ok := s.(*corev2.ClusterRoleBinding) + return ok +} + +// +// Implement RoleFieldResolvers +// + +var _ schema.CoreV2RoleExtensionOverridesFieldResolvers = (*roleImpl)(nil) + +type roleImpl struct { + schema.CoreV2RoleAliases +} + +// ID implements response to request for 'id' field. +func (*roleImpl) ID(p graphql.ResolveParams) (string, error) { + return globalid.RoleTranslator.EncodeToString(p.Context, p.Source), nil +} + +// ToJSON implements response to request for 'toJSON' field. +func (*roleImpl) ToJSON(p graphql.ResolveParams) (interface{}, error) { + return types.WrapResource(p.Source.(corev2.Resource)), nil +} + +// IsTypeOf is used to determine if a given value is associated with the type +func (*roleImpl) IsTypeOf(s interface{}, p graphql.IsTypeOfParams) bool { + _, ok := s.(*corev2.Role) + return ok +} + +// +// Implement RoleBindingFieldResolvers +// + +var _ schema.CoreV2RoleBindingExtensionOverridesFieldResolvers = (*roleBindingImpl)(nil) + +type roleBindingImpl struct { + schema.CoreV2RoleBindingAliases +} + +// ID implements response to request for 'id' field. +func (*roleBindingImpl) ID(p graphql.ResolveParams) (string, error) { + return globalid.RoleBindingTranslator.EncodeToString(p.Context, p.Source), nil +} + +// ToJSON implements response to request for 'toJSON' field. +func (*roleBindingImpl) ToJSON(p graphql.ResolveParams) (interface{}, error) { + return types.WrapResource(p.Source.(corev2.Resource)), nil +} + +// IsTypeOf is used to determine if a given value is associated with the type +func (*roleBindingImpl) IsTypeOf(s interface{}, p graphql.IsTypeOfParams) bool { + _, ok := s.(*corev2.RoleBinding) + return ok +} diff --git a/backend/apid/graphql/corev2_test.go b/backend/apid/graphql/corev2_test.go index 297b74c761..18692c0e79 100644 --- a/backend/apid/graphql/corev2_test.go +++ b/backend/apid/graphql/corev2_test.go @@ -2,6 +2,7 @@ package graphql import ( "context" + "fmt" "reflect" "testing" @@ -10,24 +11,56 @@ import ( "github.com/sensu/sensu-go/types" ) -func Test_corev2PipelineImpl_ID(t *testing.T) { +func Test_corev2_ID(t *testing.T) { tests := []struct { - name string - in *corev2.Pipeline + name string + resolver interface { + ID(p graphql.ResolveParams) (string, error) + } + in interface{} want string wantErr bool }{ { - name: "default", - in: corev2.FixturePipeline("test", "default"), - want: "srn:corev2/pipeline:default:test", - wantErr: false, + name: "default", + resolver: &corev2PipelineImpl{}, + in: corev2.FixturePipeline("test", "default"), + want: "srn:corev2/pipeline:default:test", + wantErr: false, + }, + { + name: "role", + resolver: &roleImpl{}, + in: corev2.FixtureRole("test", "default"), + want: "srn:roles:default:test", + wantErr: false, + }, + { + name: "role_binding", + resolver: &roleBindingImpl{}, + in: corev2.FixtureRoleBinding("test", "default"), + want: "srn:rolebindings:default:test", + wantErr: false, + }, + { + name: "cluster_role", + resolver: &clusterRoleImpl{}, + in: corev2.FixtureClusterRole("test"), + want: "srn:clusterroles:test", + wantErr: false, + }, + { + name: "cluster_role_binding", + resolver: &clusterRoleBindingImpl{}, + in: corev2.FixtureClusterRoleBinding("test"), + want: "srn:clusterrolebindings:test", + wantErr: false, }, } for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - tr := &corev2PipelineImpl{} - got, err := tr.ID(graphql.ResolveParams{Context: context.Background(), Source: tt.in}) + t.Run(fmt.Sprintf("%T/%s", tt.resolver, tt.name), func(t *testing.T) { + params := graphql.ResolveParams{Context: context.Background(), Source: tt.in} + got, err := tt.resolver.ID(params) if (err != nil) != tt.wantErr { t.Errorf("corev2PipelineImpl.ID() error = %v, wantErr %v", err, tt.wantErr) return @@ -39,24 +72,55 @@ func Test_corev2PipelineImpl_ID(t *testing.T) { } } -func Test_corev2PipelineImp_ToJSON(t *testing.T) { +func Test_corev2_ToJSON(t *testing.T) { tests := []struct { - name string - in *corev2.Pipeline + name string + resolver interface { + ToJSON(p graphql.ResolveParams) (interface{}, error) + } + in interface{} want interface{} wantErr bool }{ { - name: "default", - in: corev2.FixturePipeline("name", "default"), - want: types.WrapResource(corev2.FixturePipeline("name", "default")), - wantErr: false, + name: "default", + resolver: &corev2PipelineImpl{}, + in: corev2.FixturePipeline("name", "default"), + want: types.WrapResource(corev2.FixturePipeline("name", "default")), + wantErr: false, + }, + { + name: "default", + resolver: &roleImpl{}, + in: corev2.FixtureRole("name", "default"), + want: types.WrapResource(corev2.FixtureRole("name", "default")), + wantErr: false, + }, + { + name: "default", + resolver: &roleBindingImpl{}, + in: corev2.FixtureRoleBinding("name", "default"), + want: types.WrapResource(corev2.FixtureRoleBinding("name", "default")), + wantErr: false, + }, + { + name: "default", + resolver: &clusterRoleImpl{}, + in: corev2.FixtureClusterRole("name"), + want: types.WrapResource(corev2.FixtureClusterRole("name")), + wantErr: false, + }, + { + name: "default", + resolver: &clusterRoleBindingImpl{}, + in: corev2.FixtureClusterRoleBinding("name"), + want: types.WrapResource(corev2.FixtureClusterRoleBinding("name")), + wantErr: false, }, } for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - tr := &corev2PipelineImpl{} - got, err := tr.ToJSON(graphql.ResolveParams{Context: context.Background(), Source: tt.in}) + t.Run(fmt.Sprintf("%T/%s", tt.resolver, tt.name), func(t *testing.T) { + got, err := tt.resolver.ToJSON(graphql.ResolveParams{Context: context.Background(), Source: tt.in}) if (err != nil) != tt.wantErr { t.Errorf("corev2PipelineImpl.ToJSON() error = %v, wantErr %v", err, tt.wantErr) return @@ -68,27 +132,79 @@ func Test_corev2PipelineImp_ToJSON(t *testing.T) { } } -func Test_corev2PipelineImp_IsTypeOf(t *testing.T) { +func Test_corev2types_IsTypeOf(t *testing.T) { tests := []struct { - name string + name string + resolver interface { + IsTypeOf(s interface{}, p graphql.IsTypeOfParams) bool + } in interface{} want bool }{ { - name: "match", - in: corev2.FixturePipeline("name", "default"), - want: true, + name: "match", + resolver: &corev2PipelineImpl{}, + in: corev2.FixturePipeline("name", "default"), + want: true, + }, + { + name: "no match", + resolver: &corev2PipelineImpl{}, + in: corev2.FixtureEntity("name"), + want: false, + }, + { + name: "match", + resolver: &roleImpl{}, + in: corev2.FixtureRole("name", "default"), + want: true, + }, + { + name: "no match", + resolver: &roleImpl{}, + in: corev2.FixtureEntity("name"), + want: false, + }, + { + name: "match", + resolver: &roleBindingImpl{}, + in: corev2.FixtureRoleBinding("name", "default"), + want: true, + }, + { + name: "no match", + resolver: &roleBindingImpl{}, + in: corev2.FixtureEntity("name"), + want: false, + }, + { + name: "match", + resolver: &clusterRoleImpl{}, + in: corev2.FixtureClusterRole("name"), + want: true, + }, + { + name: "no match", + resolver: &clusterRoleImpl{}, + in: corev2.FixtureEntity("name"), + want: false, + }, + { + name: "match", + resolver: &clusterRoleBindingImpl{}, + in: corev2.FixtureClusterRoleBinding("name"), + want: true, }, { - name: "no match", - in: corev2.FixtureEntity("name"), - want: false, + name: "no match", + resolver: &clusterRoleBindingImpl{}, + in: corev2.FixtureEntity("name"), + want: false, }, } for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - tr := &corev2PipelineImpl{} - got := tr.IsTypeOf(tt.in, graphql.IsTypeOfParams{Context: context.Background()}) + t.Run(fmt.Sprintf("%T/%s", tt.resolver, tt.name), func(t *testing.T) { + got := tt.resolver.IsTypeOf(tt.in, graphql.IsTypeOfParams{Context: context.Background()}) if !reflect.DeepEqual(got, tt.want) { t.Errorf("corev2PipelineImpl.ToJSON() = %v, want %v", got, tt.want) } diff --git a/backend/apid/graphql/node.go b/backend/apid/graphql/node.go index a87357ca08..303dd9521a 100644 --- a/backend/apid/graphql/node.go +++ b/backend/apid/graphql/node.go @@ -119,7 +119,7 @@ func registerMutatorNodeResolver(register relay.NodeRegister, client GenericClie func registerClusterRoleNodeResolver(register relay.NodeRegister, client RBACClient) { register.RegisterResolver(relay.NodeResolver{ - ObjectType: schema.ClusterRoleType, + ObjectType: schema.CoreV2ClusterRoleType, Translator: globalid.ClusterRoleTranslator, Resolve: func(p relay.NodeResolverParams) (interface{}, error) { ctx := setContextFromComponents(p.Context, p.IDComponents) @@ -133,7 +133,7 @@ func registerClusterRoleNodeResolver(register relay.NodeRegister, client RBACCli func registerClusterRoleBindingNodeResolver(register relay.NodeRegister, client RBACClient) { register.RegisterResolver(relay.NodeResolver{ - ObjectType: schema.ClusterRoleBindingType, + ObjectType: schema.CoreV2ClusterRoleBindingType, Translator: globalid.ClusterRoleBindingTranslator, Resolve: func(p relay.NodeResolverParams) (interface{}, error) { ctx := setContextFromComponents(p.Context, p.IDComponents) @@ -147,7 +147,7 @@ func registerClusterRoleBindingNodeResolver(register relay.NodeRegister, client func registerRoleNodeResolver(register relay.NodeRegister, client RBACClient) { register.RegisterResolver(relay.NodeResolver{ - ObjectType: schema.RoleType, + ObjectType: schema.CoreV2RoleType, Translator: globalid.RoleTranslator, Resolve: func(p relay.NodeResolverParams) (interface{}, error) { ctx := setContextFromComponents(p.Context, p.IDComponents) @@ -161,7 +161,7 @@ func registerRoleNodeResolver(register relay.NodeRegister, client RBACClient) { func registerRoleBindingNodeResolver(register relay.NodeRegister, client RBACClient) { register.RegisterResolver(relay.NodeResolver{ - ObjectType: schema.RoleBindingType, + ObjectType: schema.CoreV2RoleBindingType, Translator: globalid.RoleBindingTranslator, Resolve: func(p relay.NodeResolverParams) (interface{}, error) { ctx := setContextFromComponents(p.Context, p.IDComponents) diff --git a/backend/apid/graphql/rbac.go b/backend/apid/graphql/rbac.go deleted file mode 100644 index 061d111469..0000000000 --- a/backend/apid/graphql/rbac.go +++ /dev/null @@ -1,44 +0,0 @@ -package graphql - -import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" - "github.com/sensu/sensu-go/backend/apid/graphql/globalid" - "github.com/sensu/sensu-go/backend/apid/graphql/schema" - "github.com/sensu/sensu-go/graphql" -) - -var _ schema.RuleFieldResolvers = (*ruleImpl)(nil) -var _ schema.RoleFieldResolvers = (*roleImpl)(nil) - -// -// Implement RuleFieldResolvers -// - -type ruleImpl struct { - schema.RuleAliases -} - -// IsTypeOf is used to determine if a given value is associated with the type -func (*ruleImpl) IsTypeOf(s interface{}, p graphql.IsTypeOfParams) bool { - _, ok := s.(corev2.Rule) - return ok -} - -// -// Implement RoleFieldResolvers -// - -type roleImpl struct { - schema.RoleAliases -} - -// ID implements response to request for 'id' field. -func (*roleImpl) ID(p graphql.ResolveParams) (string, error) { - return globalid.RoleTranslator.EncodeToString(p.Context, p.Source), nil -} - -// IsTypeOf is used to determine if a given value is associated with the type -func (*roleImpl) IsTypeOf(s interface{}, p graphql.IsTypeOfParams) bool { - _, ok := s.(*corev2.Role) - return ok -} diff --git a/backend/apid/graphql/schema/corev2.gen.gql.go b/backend/apid/graphql/schema/corev2.gen.gql.go index 059c519ff4..76486e2775 100644 --- a/backend/apid/graphql/schema/corev2.gen.gql.go +++ b/backend/apid/graphql/schema/corev2.gen.gql.go @@ -179,6 +179,225 @@ var _ObjectTypeCoreV2AssetBuildDesc = graphql.ObjectDesc{ }, } +// +// CoreV2ClusterRoleFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2ClusterRole' type. +type CoreV2ClusterRoleFieldResolvers interface { + // Rules implements response to request for 'rules' field. + Rules(p graphql.ResolveParams) (interface{}, error) + + // Metadata implements response to request for 'metadata' field. + Metadata(p graphql.ResolveParams) (interface{}, error) +} + +// CoreV2ClusterRoleAliases implements all methods on CoreV2ClusterRoleFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2ClusterRoleAliases struct{} + +// Rules implements response to request for 'rules' field. +func (_ CoreV2ClusterRoleAliases) Rules(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// Metadata implements response to request for 'metadata' field. +func (_ CoreV2ClusterRoleAliases) Metadata(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// CoreV2ClusterRoleType ClusterRole applies to all namespaces within a cluster. +var CoreV2ClusterRoleType = graphql.NewType("CoreV2ClusterRole", graphql.ObjectKind) + +// RegisterCoreV2ClusterRole registers CoreV2ClusterRole object type with given service. +func RegisterCoreV2ClusterRole(svc *graphql.Service, impl CoreV2ClusterRoleFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2ClusterRoleDesc, impl) +} +func _ObjTypeCoreV2ClusterRoleRulesHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Rules(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Rules(frp) + } +} + +func _ObjTypeCoreV2ClusterRoleMetadataHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Metadata(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Metadata(frp) + } +} + +func _ObjectTypeCoreV2ClusterRoleConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "ClusterRole applies to all namespaces within a cluster.", + Fields: graphql1.Fields{ + "metadata": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Metadata contains name, namespace, labels and annotations", + Name: "metadata", + Type: graphql1.NewNonNull(graphql.OutputType("ObjectMeta")), + }, + "rules": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "rules", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql.OutputType("CoreV2Rule")))), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2ClusterRoleFieldResolvers.") + }, + Name: "CoreV2ClusterRole", + } +} + +// describe CoreV2ClusterRole's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2ClusterRoleDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2ClusterRoleConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "metadata": _ObjTypeCoreV2ClusterRoleMetadataHandler, + "rules": _ObjTypeCoreV2ClusterRoleRulesHandler, + }, +} + +// +// CoreV2ClusterRoleBindingFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2ClusterRoleBinding' type. +type CoreV2ClusterRoleBindingFieldResolvers interface { + // Subjects implements response to request for 'subjects' field. + Subjects(p graphql.ResolveParams) (interface{}, error) + + // Role_ref implements response to request for 'role_ref' field. + Role_ref(p graphql.ResolveParams) (interface{}, error) + + // Metadata implements response to request for 'metadata' field. + Metadata(p graphql.ResolveParams) (interface{}, error) +} + +// CoreV2ClusterRoleBindingAliases implements all methods on CoreV2ClusterRoleBindingFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2ClusterRoleBindingAliases struct{} + +// Subjects implements response to request for 'subjects' field. +func (_ CoreV2ClusterRoleBindingAliases) Subjects(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// Role_ref implements response to request for 'role_ref' field. +func (_ CoreV2ClusterRoleBindingAliases) Role_ref(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// Metadata implements response to request for 'metadata' field. +func (_ CoreV2ClusterRoleBindingAliases) Metadata(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +/* +CoreV2ClusterRoleBindingType ClusterRoleBinding grants the permissions defined in a ClusterRole referenced +to a user or a set of users +*/ +var CoreV2ClusterRoleBindingType = graphql.NewType("CoreV2ClusterRoleBinding", graphql.ObjectKind) + +// RegisterCoreV2ClusterRoleBinding registers CoreV2ClusterRoleBinding object type with given service. +func RegisterCoreV2ClusterRoleBinding(svc *graphql.Service, impl CoreV2ClusterRoleBindingFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2ClusterRoleBindingDesc, impl) +} +func _ObjTypeCoreV2ClusterRoleBindingSubjectsHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Subjects(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Subjects(frp) + } +} + +func _ObjTypeCoreV2ClusterRoleBindingRole_refHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Role_ref(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Role_ref(frp) + } +} + +func _ObjTypeCoreV2ClusterRoleBindingMetadataHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Metadata(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Metadata(frp) + } +} + +func _ObjectTypeCoreV2ClusterRoleBindingConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "ClusterRoleBinding grants the permissions defined in a ClusterRole referenced\nto a user or a set of users", + Fields: graphql1.Fields{ + "metadata": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Metadata contains name, namespace, labels and annotations", + Name: "metadata", + Type: graphql1.NewNonNull(graphql.OutputType("ObjectMeta")), + }, + "role_ref": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "RoleRef references a ClusterRole in the current namespace", + Name: "role_ref", + Type: graphql1.NewNonNull(graphql.OutputType("CoreV2RoleRef")), + }, + "subjects": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Subjects holds references to the objects the ClusterRole applies to", + Name: "subjects", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql.OutputType("CoreV2Subject")))), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2ClusterRoleBindingFieldResolvers.") + }, + Name: "CoreV2ClusterRoleBinding", + } +} + +// describe CoreV2ClusterRoleBinding's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2ClusterRoleBindingDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2ClusterRoleBindingConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "metadata": _ObjTypeCoreV2ClusterRoleBindingMetadataHandler, + "role_ref": _ObjTypeCoreV2ClusterRoleBindingRole_refHandler, + "subjects": _ObjTypeCoreV2ClusterRoleBindingSubjectsHandler, + }, +} + // // CoreV2PipelineFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Pipeline' type. @@ -574,90 +793,76 @@ var _ObjectTypeCoreV2ResourceReferenceDesc = graphql.ObjectDesc{ } // -// CoreV2SecretFieldResolvers represents a collection of methods whose products represent the -// response values of the 'CoreV2Secret' type. -type CoreV2SecretFieldResolvers interface { - // Name implements response to request for 'name' field. - Name(p graphql.ResolveParams) (string, error) +// CoreV2RoleFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2Role' type. +type CoreV2RoleFieldResolvers interface { + // Rules implements response to request for 'rules' field. + Rules(p graphql.ResolveParams) (interface{}, error) - // Secret implements response to request for 'secret' field. - Secret(p graphql.ResolveParams) (string, error) + // Metadata implements response to request for 'metadata' field. + Metadata(p graphql.ResolveParams) (interface{}, error) } -// CoreV2SecretAliases implements all methods on CoreV2SecretFieldResolvers interface by using reflection to +// CoreV2RoleAliases implements all methods on CoreV2RoleFieldResolvers interface by using reflection to // match name of field to a field on the given value. Intent is reduce friction // of writing new resolvers by removing all the instances where you would simply // have the resolvers method return a field. -type CoreV2SecretAliases struct{} +type CoreV2RoleAliases struct{} -// Name implements response to request for 'name' field. -func (_ CoreV2SecretAliases) Name(p graphql.ResolveParams) (string, error) { +// Rules implements response to request for 'rules' field. +func (_ CoreV2RoleAliases) Rules(p graphql.ResolveParams) (interface{}, error) { val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'name'") - } - return ret, err + return val, err } -// Secret implements response to request for 'secret' field. -func (_ CoreV2SecretAliases) Secret(p graphql.ResolveParams) (string, error) { +// Metadata implements response to request for 'metadata' field. +func (_ CoreV2RoleAliases) Metadata(p graphql.ResolveParams) (interface{}, error) { val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'secret'") - } - return ret, err + return val, err } -// CoreV2SecretType A Secret is a secret specification. -var CoreV2SecretType = graphql.NewType("CoreV2Secret", graphql.ObjectKind) +// CoreV2RoleType Role applies only to a single namespace. +var CoreV2RoleType = graphql.NewType("CoreV2Role", graphql.ObjectKind) -// RegisterCoreV2Secret registers CoreV2Secret object type with given service. -func RegisterCoreV2Secret(svc *graphql.Service, impl CoreV2SecretFieldResolvers) { - svc.RegisterObject(_ObjectTypeCoreV2SecretDesc, impl) +// RegisterCoreV2Role registers CoreV2Role object type with given service. +func RegisterCoreV2Role(svc *graphql.Service, impl CoreV2RoleFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2RoleDesc, impl) } -func _ObjTypeCoreV2SecretNameHandler(impl interface{}) graphql1.FieldResolveFn { +func _ObjTypeCoreV2RoleRulesHandler(impl interface{}) graphql1.FieldResolveFn { resolver := impl.(interface { - Name(p graphql.ResolveParams) (string, error) + Rules(p graphql.ResolveParams) (interface{}, error) }) return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Name(frp) + return resolver.Rules(frp) } } -func _ObjTypeCoreV2SecretSecretHandler(impl interface{}) graphql1.FieldResolveFn { +func _ObjTypeCoreV2RoleMetadataHandler(impl interface{}) graphql1.FieldResolveFn { resolver := impl.(interface { - Secret(p graphql.ResolveParams) (string, error) + Metadata(p graphql.ResolveParams) (interface{}, error) }) return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Secret(frp) + return resolver.Metadata(frp) } } -func _ObjectTypeCoreV2SecretConfigFn() graphql1.ObjectConfig { +func _ObjectTypeCoreV2RoleConfigFn() graphql1.ObjectConfig { return graphql1.ObjectConfig{ - Description: "A Secret is a secret specification.", + Description: "Role applies only to a single namespace.", Fields: graphql1.Fields{ - "name": &graphql1.Field{ + "metadata": &graphql1.Field{ Args: graphql1.FieldConfigArgument{}, DeprecationReason: "", - Description: "Name is the name of the secret referenced in an executable command.", - Name: "name", - Type: graphql1.NewNonNull(graphql1.String), + Description: "Metadata contains name, namespace, labels and annotations", + Name: "metadata", + Type: graphql1.NewNonNull(graphql.OutputType("ObjectMeta")), }, - "secret": &graphql1.Field{ + "rules": &graphql1.Field{ Args: graphql1.FieldConfigArgument{}, DeprecationReason: "", - Description: "Secret is the name of the Sensu secret resource.", - Name: "secret", - Type: graphql1.NewNonNull(graphql1.String), + Description: "self descriptive", + Name: "rules", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql.OutputType("CoreV2Rule")))), }, }, Interfaces: []*graphql1.Interface{}, @@ -667,17 +872,610 @@ func _ObjectTypeCoreV2SecretConfigFn() graphql1.ObjectConfig { // these fields are updated with instantiated resolvers. If these // defaults are called it is most certainly programmer err. // If you're see this comment then: 'Whoops! Sorry, my bad.' - panic("Unimplemented; see CoreV2SecretFieldResolvers.") + panic("Unimplemented; see CoreV2RoleFieldResolvers.") }, - Name: "CoreV2Secret", + Name: "CoreV2Role", } } -// describe CoreV2Secret's configuration; kept private to avoid unintentional tampering of configuration at runtime. -var _ObjectTypeCoreV2SecretDesc = graphql.ObjectDesc{ - Config: _ObjectTypeCoreV2SecretConfigFn, +// describe CoreV2Role's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2RoleDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2RoleConfigFn, FieldHandlers: map[string]graphql.FieldHandler{ - "name": _ObjTypeCoreV2SecretNameHandler, - "secret": _ObjTypeCoreV2SecretSecretHandler, + "metadata": _ObjTypeCoreV2RoleMetadataHandler, + "rules": _ObjTypeCoreV2RoleRulesHandler, + }, +} + +// +// CoreV2RoleBindingFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2RoleBinding' type. +type CoreV2RoleBindingFieldResolvers interface { + // Subjects implements response to request for 'subjects' field. + Subjects(p graphql.ResolveParams) (interface{}, error) + + // Role_ref implements response to request for 'role_ref' field. + Role_ref(p graphql.ResolveParams) (interface{}, error) + + // Metadata implements response to request for 'metadata' field. + Metadata(p graphql.ResolveParams) (interface{}, error) +} + +// CoreV2RoleBindingAliases implements all methods on CoreV2RoleBindingFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2RoleBindingAliases struct{} + +// Subjects implements response to request for 'subjects' field. +func (_ CoreV2RoleBindingAliases) Subjects(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// Role_ref implements response to request for 'role_ref' field. +func (_ CoreV2RoleBindingAliases) Role_ref(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// Metadata implements response to request for 'metadata' field. +func (_ CoreV2RoleBindingAliases) Metadata(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +/* +CoreV2RoleBindingType RoleBinding grants the permissions defined in a Role referenced to a user or +a set of users +*/ +var CoreV2RoleBindingType = graphql.NewType("CoreV2RoleBinding", graphql.ObjectKind) + +// RegisterCoreV2RoleBinding registers CoreV2RoleBinding object type with given service. +func RegisterCoreV2RoleBinding(svc *graphql.Service, impl CoreV2RoleBindingFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2RoleBindingDesc, impl) +} +func _ObjTypeCoreV2RoleBindingSubjectsHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Subjects(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Subjects(frp) + } +} + +func _ObjTypeCoreV2RoleBindingRole_refHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Role_ref(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Role_ref(frp) + } +} + +func _ObjTypeCoreV2RoleBindingMetadataHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Metadata(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Metadata(frp) + } +} + +func _ObjectTypeCoreV2RoleBindingConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "RoleBinding grants the permissions defined in a Role referenced to a user or\na set of users", + Fields: graphql1.Fields{ + "metadata": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Metadata contains name, namespace, labels and annotations", + Name: "metadata", + Type: graphql1.NewNonNull(graphql.OutputType("ObjectMeta")), + }, + "role_ref": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "RoleRef references a Role in the current namespace", + Name: "role_ref", + Type: graphql1.NewNonNull(graphql.OutputType("CoreV2RoleRef")), + }, + "subjects": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Subjects holds references to the objects the Role applies to", + Name: "subjects", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql.OutputType("CoreV2Subject")))), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2RoleBindingFieldResolvers.") + }, + Name: "CoreV2RoleBinding", + } +} + +// describe CoreV2RoleBinding's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2RoleBindingDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2RoleBindingConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "metadata": _ObjTypeCoreV2RoleBindingMetadataHandler, + "role_ref": _ObjTypeCoreV2RoleBindingRole_refHandler, + "subjects": _ObjTypeCoreV2RoleBindingSubjectsHandler, + }, +} + +// +// CoreV2RoleRefFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2RoleRef' type. +type CoreV2RoleRefFieldResolvers interface { + // Type implements response to request for 'type' field. + Type(p graphql.ResolveParams) (string, error) + + // Name implements response to request for 'name' field. + Name(p graphql.ResolveParams) (string, error) +} + +// CoreV2RoleRefAliases implements all methods on CoreV2RoleRefFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2RoleRefAliases struct{} + +// Type implements response to request for 'type' field. +func (_ CoreV2RoleRefAliases) Type(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'type'") + } + return ret, err +} + +// Name implements response to request for 'name' field. +func (_ CoreV2RoleRefAliases) Name(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'name'") + } + return ret, err +} + +// CoreV2RoleRefType RoleRef maps groups to Roles or ClusterRoles. +var CoreV2RoleRefType = graphql.NewType("CoreV2RoleRef", graphql.ObjectKind) + +// RegisterCoreV2RoleRef registers CoreV2RoleRef object type with given service. +func RegisterCoreV2RoleRef(svc *graphql.Service, impl CoreV2RoleRefFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2RoleRefDesc, impl) +} +func _ObjTypeCoreV2RoleRefTypeHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Type(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Type(frp) + } +} + +func _ObjTypeCoreV2RoleRefNameHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Name(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Name(frp) + } +} + +func _ObjectTypeCoreV2RoleRefConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "RoleRef maps groups to Roles or ClusterRoles.", + Fields: graphql1.Fields{ + "name": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Name of the resource being referenced", + Name: "name", + Type: graphql1.NewNonNull(graphql1.String), + }, + "type": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Type of role being referenced.", + Name: "type", + Type: graphql1.NewNonNull(graphql1.String), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2RoleRefFieldResolvers.") + }, + Name: "CoreV2RoleRef", + } +} + +// describe CoreV2RoleRef's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2RoleRefDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2RoleRefConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "name": _ObjTypeCoreV2RoleRefNameHandler, + "type": _ObjTypeCoreV2RoleRefTypeHandler, + }, +} + +// +// CoreV2RuleFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2Rule' type. +type CoreV2RuleFieldResolvers interface { + // Verbs implements response to request for 'verbs' field. + Verbs(p graphql.ResolveParams) ([]string, error) + + // Resources implements response to request for 'resources' field. + Resources(p graphql.ResolveParams) ([]string, error) + + // Resource_names implements response to request for 'resource_names' field. + Resource_names(p graphql.ResolveParams) ([]string, error) +} + +// CoreV2RuleAliases implements all methods on CoreV2RuleFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2RuleAliases struct{} + +// Verbs implements response to request for 'verbs' field. +func (_ CoreV2RuleAliases) Verbs(p graphql.ResolveParams) ([]string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.([]string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'verbs'") + } + return ret, err +} + +// Resources implements response to request for 'resources' field. +func (_ CoreV2RuleAliases) Resources(p graphql.ResolveParams) ([]string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.([]string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'resources'") + } + return ret, err +} + +// Resource_names implements response to request for 'resource_names' field. +func (_ CoreV2RuleAliases) Resource_names(p graphql.ResolveParams) ([]string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.([]string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'resource_names'") + } + return ret, err +} + +// CoreV2RuleType Rule holds information that describes an action that can be taken +var CoreV2RuleType = graphql.NewType("CoreV2Rule", graphql.ObjectKind) + +// RegisterCoreV2Rule registers CoreV2Rule object type with given service. +func RegisterCoreV2Rule(svc *graphql.Service, impl CoreV2RuleFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2RuleDesc, impl) +} +func _ObjTypeCoreV2RuleVerbsHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Verbs(p graphql.ResolveParams) ([]string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Verbs(frp) + } +} + +func _ObjTypeCoreV2RuleResourcesHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Resources(p graphql.ResolveParams) ([]string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Resources(frp) + } +} + +func _ObjTypeCoreV2RuleResource_namesHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Resource_names(p graphql.ResolveParams) ([]string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Resource_names(frp) + } +} + +func _ObjectTypeCoreV2RuleConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "Rule holds information that describes an action that can be taken", + Fields: graphql1.Fields{ + "resource_names": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "ResourceNames is an optional list of resource names that the rule applies\nto.", + Name: "resource_names", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), + }, + "resources": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Resources is a list of resources that this rule applies to. \"*\"\nrepresents all resources.", + Name: "resources", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), + }, + "verbs": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Verbs is a list of verbs that apply to all of the listed resources for\nthis rule. These include \"get\", \"list\", \"watch\", \"create\", \"update\",\n\"delete\".\nTODO: add support for \"patch\" (this is expensive and should be delayed\nuntil a further release). TODO: add support for \"watch\" (via websockets)", + Name: "verbs", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2RuleFieldResolvers.") + }, + Name: "CoreV2Rule", + } +} + +// describe CoreV2Rule's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2RuleDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2RuleConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "resource_names": _ObjTypeCoreV2RuleResource_namesHandler, + "resources": _ObjTypeCoreV2RuleResourcesHandler, + "verbs": _ObjTypeCoreV2RuleVerbsHandler, + }, +} + +// +// CoreV2SecretFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2Secret' type. +type CoreV2SecretFieldResolvers interface { + // Name implements response to request for 'name' field. + Name(p graphql.ResolveParams) (string, error) + + // Secret implements response to request for 'secret' field. + Secret(p graphql.ResolveParams) (string, error) +} + +// CoreV2SecretAliases implements all methods on CoreV2SecretFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2SecretAliases struct{} + +// Name implements response to request for 'name' field. +func (_ CoreV2SecretAliases) Name(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'name'") + } + return ret, err +} + +// Secret implements response to request for 'secret' field. +func (_ CoreV2SecretAliases) Secret(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'secret'") + } + return ret, err +} + +// CoreV2SecretType A Secret is a secret specification. +var CoreV2SecretType = graphql.NewType("CoreV2Secret", graphql.ObjectKind) + +// RegisterCoreV2Secret registers CoreV2Secret object type with given service. +func RegisterCoreV2Secret(svc *graphql.Service, impl CoreV2SecretFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2SecretDesc, impl) +} +func _ObjTypeCoreV2SecretNameHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Name(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Name(frp) + } +} + +func _ObjTypeCoreV2SecretSecretHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Secret(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Secret(frp) + } +} + +func _ObjectTypeCoreV2SecretConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "A Secret is a secret specification.", + Fields: graphql1.Fields{ + "name": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Name is the name of the secret referenced in an executable command.", + Name: "name", + Type: graphql1.NewNonNull(graphql1.String), + }, + "secret": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Secret is the name of the Sensu secret resource.", + Name: "secret", + Type: graphql1.NewNonNull(graphql1.String), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2SecretFieldResolvers.") + }, + Name: "CoreV2Secret", + } +} + +// describe CoreV2Secret's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2SecretDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2SecretConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "name": _ObjTypeCoreV2SecretNameHandler, + "secret": _ObjTypeCoreV2SecretSecretHandler, + }, +} + +// +// CoreV2SubjectFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2Subject' type. +type CoreV2SubjectFieldResolvers interface { + // Type implements response to request for 'type' field. + Type(p graphql.ResolveParams) (string, error) + + // Name implements response to request for 'name' field. + Name(p graphql.ResolveParams) (string, error) +} + +// CoreV2SubjectAliases implements all methods on CoreV2SubjectFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2SubjectAliases struct{} + +// Type implements response to request for 'type' field. +func (_ CoreV2SubjectAliases) Type(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'type'") + } + return ret, err +} + +// Name implements response to request for 'name' field. +func (_ CoreV2SubjectAliases) Name(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'name'") + } + return ret, err +} + +// CoreV2SubjectType self descriptive +var CoreV2SubjectType = graphql.NewType("CoreV2Subject", graphql.ObjectKind) + +// RegisterCoreV2Subject registers CoreV2Subject object type with given service. +func RegisterCoreV2Subject(svc *graphql.Service, impl CoreV2SubjectFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2SubjectDesc, impl) +} +func _ObjTypeCoreV2SubjectTypeHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Type(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Type(frp) + } +} + +func _ObjTypeCoreV2SubjectNameHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Name(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Name(frp) + } +} + +func _ObjectTypeCoreV2SubjectConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "self descriptive", + Fields: graphql1.Fields{ + "name": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Name of the referenced object", + Name: "name", + Type: graphql1.NewNonNull(graphql1.String), + }, + "type": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Type of object referenced (user or group)", + Name: "type", + Type: graphql1.NewNonNull(graphql1.String), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2SubjectFieldResolvers.") + }, + Name: "CoreV2Subject", + } +} + +// describe CoreV2Subject's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2SubjectDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2SubjectConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "name": _ObjTypeCoreV2SubjectNameHandler, + "type": _ObjTypeCoreV2SubjectTypeHandler, }, } diff --git a/backend/apid/graphql/schema/corev2.gen.graphql b/backend/apid/graphql/schema/corev2.gen.graphql index aa5098dc38..5e861f81c5 100644 --- a/backend/apid/graphql/schema/corev2.gen.graphql +++ b/backend/apid/graphql/schema/corev2.gen.graphql @@ -26,6 +26,30 @@ type CoreV2AssetBuild { headers: JSON! } +"""ClusterRole applies to all namespaces within a cluster.""" +type CoreV2ClusterRole { + rules: [CoreV2Rule!]! + + """Metadata contains name, namespace, labels and annotations""" + metadata: ObjectMeta! +} + +""" +ClusterRoleBinding grants the permissions defined in a ClusterRole referenced +to a user or a set of users +""" +type CoreV2ClusterRoleBinding { + + """Subjects holds references to the objects the ClusterRole applies to""" + subjects: [CoreV2Subject!]! + + """RoleRef references a ClusterRole in the current namespace""" + role_ref: CoreV2RoleRef! + + """Metadata contains name, namespace, labels and annotations""" + metadata: ObjectMeta! +} + """Pipeline represents a named collection of pipeline workflows.""" type CoreV2Pipeline { @@ -74,6 +98,65 @@ type CoreV2ResourceReference { api_version: String! } +"""Role applies only to a single namespace.""" +type CoreV2Role { + rules: [CoreV2Rule!]! + + """Metadata contains name, namespace, labels and annotations""" + metadata: ObjectMeta! +} + +""" +RoleBinding grants the permissions defined in a Role referenced to a user or +a set of users +""" +type CoreV2RoleBinding { + + """Subjects holds references to the objects the Role applies to""" + subjects: [CoreV2Subject!]! + + """RoleRef references a Role in the current namespace""" + role_ref: CoreV2RoleRef! + + """Metadata contains name, namespace, labels and annotations""" + metadata: ObjectMeta! +} + +"""RoleRef maps groups to Roles or ClusterRoles.""" +type CoreV2RoleRef { + + """Type of role being referenced.""" + type: String! + + """Name of the resource being referenced""" + name: String! +} + +"""Rule holds information that describes an action that can be taken""" +type CoreV2Rule { + + """ + Verbs is a list of verbs that apply to all of the listed resources for + this rule. These include "get", "list", "watch", "create", "update", + "delete". + TODO: add support for "patch" (this is expensive and should be delayed + until a further release). TODO: add support for "watch" (via websockets) + """ + verbs: [String!]! + + """ + Resources is a list of resources that this rule applies to. "*" + represents all resources. + """ + resources: [String!]! + + """ + ResourceNames is an optional list of resource names that the rule applies + to. + """ + resource_names: [String!]! +} + """A Secret is a secret specification.""" type CoreV2Secret { @@ -83,3 +166,12 @@ type CoreV2Secret { """Secret is the name of the Sensu secret resource.""" secret: String! } + +type CoreV2Subject { + + """Type of object referenced (user or group)""" + type: String! + + """Name of the referenced object""" + name: String! +} diff --git a/backend/apid/graphql/schema/corev2.gql.go b/backend/apid/graphql/schema/corev2.gql.go index ee5962f44c..69b948e0e7 100644 --- a/backend/apid/graphql/schema/corev2.gql.go +++ b/backend/apid/graphql/schema/corev2.gql.go @@ -75,3 +75,279 @@ var _ObjectExtensionTypeCoreV2PipelineExtensionOverridesDesc = graphql.ObjectDes "toJSON": _ObjTypeCoreV2PipelineExtensionOverridesToJSONHandler, }, } + +// +// CoreV2RoleExtensionOverridesFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2RoleExtensionOverrides' type. +type CoreV2RoleExtensionOverridesFieldResolvers interface { + // ID implements response to request for 'id' field. + ID(p graphql.ResolveParams) (string, error) + + // ToJSON implements response to request for 'toJSON' field. + ToJSON(p graphql.ResolveParams) (interface{}, error) +} + +// RegisterCoreV2RoleExtensionOverrides registers CoreV2RoleExtensionOverrides object type with given service. +func RegisterCoreV2RoleExtensionOverrides(svc *graphql.Service, impl CoreV2RoleExtensionOverridesFieldResolvers) { + svc.RegisterObjectExtension(_ObjectExtensionTypeCoreV2RoleExtensionOverridesDesc, impl) +} + +func _ObjTypeCoreV2RoleExtensionOverridesIDHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ID(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ID(frp) + } +} + +func _ObjTypeCoreV2RoleExtensionOverridesToJSONHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ToJSON(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ToJSON(frp) + } +} + +func _ObjectExtensionTypeCoreV2RoleExtensionOverridesConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "", + Fields: graphql1.Fields{ + "id": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "The globally unique identifier of the record", + Name: "id", + Type: graphql1.NewNonNull(graphql1.ID), + }, + "toJSON": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "toJSON returns a REST API compatible representation of the resource. Handy for\nsharing snippets that can then be imported with `sensuctl create`.", + Name: "toJSON", + Type: graphql1.NewNonNull(graphql.OutputType("JSON")), + }, + }, + Interfaces: []*graphql1.Interface{ + graphql.Interface("Node"), + graphql.Interface("Resource")}, + Name: "CoreV2Role", + } +} + +// describe CoreV2RoleExtensionOverrides's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectExtensionTypeCoreV2RoleExtensionOverridesDesc = graphql.ObjectDesc{ + Config: _ObjectExtensionTypeCoreV2RoleExtensionOverridesConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "id": _ObjTypeCoreV2RoleExtensionOverridesIDHandler, + "toJSON": _ObjTypeCoreV2RoleExtensionOverridesToJSONHandler, + }, +} + +// +// CoreV2RoleBindingExtensionOverridesFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2RoleBindingExtensionOverrides' type. +type CoreV2RoleBindingExtensionOverridesFieldResolvers interface { + // ID implements response to request for 'id' field. + ID(p graphql.ResolveParams) (string, error) + + // ToJSON implements response to request for 'toJSON' field. + ToJSON(p graphql.ResolveParams) (interface{}, error) +} + +// RegisterCoreV2RoleBindingExtensionOverrides registers CoreV2RoleBindingExtensionOverrides object type with given service. +func RegisterCoreV2RoleBindingExtensionOverrides(svc *graphql.Service, impl CoreV2RoleBindingExtensionOverridesFieldResolvers) { + svc.RegisterObjectExtension(_ObjectExtensionTypeCoreV2RoleBindingExtensionOverridesDesc, impl) +} + +func _ObjTypeCoreV2RoleBindingExtensionOverridesIDHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ID(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ID(frp) + } +} + +func _ObjTypeCoreV2RoleBindingExtensionOverridesToJSONHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ToJSON(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ToJSON(frp) + } +} + +func _ObjectExtensionTypeCoreV2RoleBindingExtensionOverridesConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "", + Fields: graphql1.Fields{ + "id": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "The globally unique identifier of the record", + Name: "id", + Type: graphql1.NewNonNull(graphql1.ID), + }, + "toJSON": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "toJSON returns a REST API compatible representation of the resource. Handy for\nsharing snippets that can then be imported with `sensuctl create`.", + Name: "toJSON", + Type: graphql1.NewNonNull(graphql.OutputType("JSON")), + }, + }, + Interfaces: []*graphql1.Interface{ + graphql.Interface("Node"), + graphql.Interface("Resource")}, + Name: "CoreV2RoleBinding", + } +} + +// describe CoreV2RoleBindingExtensionOverrides's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectExtensionTypeCoreV2RoleBindingExtensionOverridesDesc = graphql.ObjectDesc{ + Config: _ObjectExtensionTypeCoreV2RoleBindingExtensionOverridesConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "id": _ObjTypeCoreV2RoleBindingExtensionOverridesIDHandler, + "toJSON": _ObjTypeCoreV2RoleBindingExtensionOverridesToJSONHandler, + }, +} + +// +// CoreV2ClusterRoleExtensionOverridesFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2ClusterRoleExtensionOverrides' type. +type CoreV2ClusterRoleExtensionOverridesFieldResolvers interface { + // ID implements response to request for 'id' field. + ID(p graphql.ResolveParams) (string, error) + + // ToJSON implements response to request for 'toJSON' field. + ToJSON(p graphql.ResolveParams) (interface{}, error) +} + +// RegisterCoreV2ClusterRoleExtensionOverrides registers CoreV2ClusterRoleExtensionOverrides object type with given service. +func RegisterCoreV2ClusterRoleExtensionOverrides(svc *graphql.Service, impl CoreV2ClusterRoleExtensionOverridesFieldResolvers) { + svc.RegisterObjectExtension(_ObjectExtensionTypeCoreV2ClusterRoleExtensionOverridesDesc, impl) +} + +func _ObjTypeCoreV2ClusterRoleExtensionOverridesIDHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ID(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ID(frp) + } +} + +func _ObjTypeCoreV2ClusterRoleExtensionOverridesToJSONHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ToJSON(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ToJSON(frp) + } +} + +func _ObjectExtensionTypeCoreV2ClusterRoleExtensionOverridesConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "", + Fields: graphql1.Fields{ + "id": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "The globally unique identifier of the record", + Name: "id", + Type: graphql1.NewNonNull(graphql1.ID), + }, + "toJSON": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "toJSON returns a REST API compatible representation of the resource. Handy for\nsharing snippets that can then be imported with `sensuctl create`.", + Name: "toJSON", + Type: graphql1.NewNonNull(graphql.OutputType("JSON")), + }, + }, + Interfaces: []*graphql1.Interface{ + graphql.Interface("Node"), + graphql.Interface("Resource")}, + Name: "CoreV2ClusterRole", + } +} + +// describe CoreV2ClusterRoleExtensionOverrides's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectExtensionTypeCoreV2ClusterRoleExtensionOverridesDesc = graphql.ObjectDesc{ + Config: _ObjectExtensionTypeCoreV2ClusterRoleExtensionOverridesConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "id": _ObjTypeCoreV2ClusterRoleExtensionOverridesIDHandler, + "toJSON": _ObjTypeCoreV2ClusterRoleExtensionOverridesToJSONHandler, + }, +} + +// +// CoreV2ClusterRoleBindingExtensionOverridesFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2ClusterRoleBindingExtensionOverrides' type. +type CoreV2ClusterRoleBindingExtensionOverridesFieldResolvers interface { + // ID implements response to request for 'id' field. + ID(p graphql.ResolveParams) (string, error) + + // ToJSON implements response to request for 'toJSON' field. + ToJSON(p graphql.ResolveParams) (interface{}, error) +} + +// RegisterCoreV2ClusterRoleBindingExtensionOverrides registers CoreV2ClusterRoleBindingExtensionOverrides object type with given service. +func RegisterCoreV2ClusterRoleBindingExtensionOverrides(svc *graphql.Service, impl CoreV2ClusterRoleBindingExtensionOverridesFieldResolvers) { + svc.RegisterObjectExtension(_ObjectExtensionTypeCoreV2ClusterRoleBindingExtensionOverridesDesc, impl) +} + +func _ObjTypeCoreV2ClusterRoleBindingExtensionOverridesIDHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ID(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ID(frp) + } +} + +func _ObjTypeCoreV2ClusterRoleBindingExtensionOverridesToJSONHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ToJSON(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ToJSON(frp) + } +} + +func _ObjectExtensionTypeCoreV2ClusterRoleBindingExtensionOverridesConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "", + Fields: graphql1.Fields{ + "id": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "The globally unique identifier of the record", + Name: "id", + Type: graphql1.NewNonNull(graphql1.ID), + }, + "toJSON": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "toJSON returns a REST API compatible representation of the resource. Handy for\nsharing snippets that can then be imported with `sensuctl create`.", + Name: "toJSON", + Type: graphql1.NewNonNull(graphql.OutputType("JSON")), + }, + }, + Interfaces: []*graphql1.Interface{ + graphql.Interface("Node"), + graphql.Interface("Resource")}, + Name: "CoreV2ClusterRoleBinding", + } +} + +// describe CoreV2ClusterRoleBindingExtensionOverrides's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectExtensionTypeCoreV2ClusterRoleBindingExtensionOverridesDesc = graphql.ObjectDesc{ + Config: _ObjectExtensionTypeCoreV2ClusterRoleBindingExtensionOverridesConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "id": _ObjTypeCoreV2ClusterRoleBindingExtensionOverridesIDHandler, + "toJSON": _ObjTypeCoreV2ClusterRoleBindingExtensionOverridesToJSONHandler, + }, +} diff --git a/backend/apid/graphql/schema/corev2.graphql b/backend/apid/graphql/schema/corev2.graphql index 30908b5ba5..bc05a3559c 100644 --- a/backend/apid/graphql/schema/corev2.graphql +++ b/backend/apid/graphql/schema/corev2.graphql @@ -1,7 +1,74 @@ +# +# Pipeline +# + extend type CoreV2Pipeline implements Node & Resource @named(suffix: "Overrides") { "Unique global identifier used to reference resource." id: ID! + # "metadata contains name, namespace, labels and annotations of the record" + # metadata: ObjectMeta + + """ + toJSON returns a REST API compatible representation of the resource. Handy for + sharing snippets that can then be imported with `sensuctl create`. + """ + toJSON: JSON! +} + +# +# RBAC +# + +extend type CoreV2Role implements Node & Resource @named(suffix: "Overrides") { + "The globally unique identifier of the record" + id: ID! + + # "metadata contains name, namespace, labels and annotations of the record" + # metadata: ObjectMeta + + """ + toJSON returns a REST API compatible representation of the resource. Handy for + sharing snippets that can then be imported with `sensuctl create`. + """ + toJSON: JSON! +} + +extend type CoreV2RoleBinding implements Node & Resource @named(suffix: "Overrides") { + "The globally unique identifier of the record" + id: ID! + + # "metadata contains name, namespace, labels and annotations of the record" + # metadata: ObjectMeta + + """ + toJSON returns a REST API compatible representation of the resource. Handy for + sharing snippets that can then be imported with `sensuctl create`. + """ + toJSON: JSON! +} + +extend type CoreV2ClusterRole implements Node & Resource @named(suffix: "Overrides") { + "The globally unique identifier of the record" + id: ID! + + # "metadata contains name, namespace, labels and annotations of the record" + # metadata: ObjectMeta + + """ + toJSON returns a REST API compatible representation of the resource. Handy for + sharing snippets that can then be imported with `sensuctl create`. + """ + toJSON: JSON! +} + +extend type CoreV2ClusterRoleBinding implements Node & Resource @named(suffix: "Overrides") { + "The globally unique identifier of the record" + id: ID! + + # "metadata contains name, namespace, labels and annotations of the record" + # metadata: ObjectMeta + """ toJSON returns a REST API compatible representation of the resource. Handy for sharing snippets that can then be imported with `sensuctl create`. diff --git a/backend/apid/graphql/schema/rbac.gql.go b/backend/apid/graphql/schema/rbac.gql.go deleted file mode 100644 index d6c52c5c12..0000000000 --- a/backend/apid/graphql/schema/rbac.gql.go +++ /dev/null @@ -1,901 +0,0 @@ -// Code generated by scripts/gengraphql.go. DO NOT EDIT. - -package schema - -import ( - errors "errors" - graphql1 "github.com/graphql-go/graphql" - graphql "github.com/sensu/sensu-go/graphql" -) - -// -// RuleFieldResolvers represents a collection of methods whose products represent the -// response values of the 'Rule' type. -type RuleFieldResolvers interface { - // Verbs implements response to request for 'verbs' field. - Verbs(p graphql.ResolveParams) ([]string, error) - - // Resources implements response to request for 'resources' field. - Resources(p graphql.ResolveParams) ([]string, error) - - // ResourceNames implements response to request for 'resourceNames' field. - ResourceNames(p graphql.ResolveParams) ([]string, error) -} - -// RuleAliases implements all methods on RuleFieldResolvers interface by using reflection to -// match name of field to a field on the given value. Intent is reduce friction -// of writing new resolvers by removing all the instances where you would simply -// have the resolvers method return a field. -type RuleAliases struct{} - -// Verbs implements response to request for 'verbs' field. -func (_ RuleAliases) Verbs(p graphql.ResolveParams) ([]string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.([]string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'verbs'") - } - return ret, err -} - -// Resources implements response to request for 'resources' field. -func (_ RuleAliases) Resources(p graphql.ResolveParams) ([]string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.([]string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'resources'") - } - return ret, err -} - -// ResourceNames implements response to request for 'resourceNames' field. -func (_ RuleAliases) ResourceNames(p graphql.ResolveParams) ([]string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.([]string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'resourceNames'") - } - return ret, err -} - -// RuleType Rule holds information that describes an action that can be taken -var RuleType = graphql.NewType("Rule", graphql.ObjectKind) - -// RegisterRule registers Rule object type with given service. -func RegisterRule(svc *graphql.Service, impl RuleFieldResolvers) { - svc.RegisterObject(_ObjectTypeRuleDesc, impl) -} -func _ObjTypeRuleVerbsHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Verbs(p graphql.ResolveParams) ([]string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Verbs(frp) - } -} - -func _ObjTypeRuleResourcesHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Resources(p graphql.ResolveParams) ([]string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Resources(frp) - } -} - -func _ObjTypeRuleResourceNamesHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - ResourceNames(p graphql.ResolveParams) ([]string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.ResourceNames(frp) - } -} - -func _ObjectTypeRuleConfigFn() graphql1.ObjectConfig { - return graphql1.ObjectConfig{ - Description: "Rule holds information that describes an action that can be taken", - Fields: graphql1.Fields{ - "resourceNames": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "ResourceNames is an optional list of resource names that the rule applies\nto.", - Name: "resourceNames", - Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), - }, - "resources": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Resources is a list of resources that this rule applies to. \"*\" represents\nall resources.", - Name: "resources", - Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), - }, - "verbs": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Verbs is a list of verbs that apply to all of the listed resources for this\nrule. These include \"get\", \"list\", \"watch\", \"create\", \"update\", \"delete\".\nTODO: add support for \"patch\" (this is expensive and should be delayed\nuntil a further release). TODO: add support for \"watch\" (via websockets)", - Name: "verbs", - Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), - }, - }, - Interfaces: []*graphql1.Interface{}, - IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { - // NOTE: - // Panic by default. Intent is that when Service is invoked, values of - // these fields are updated with instantiated resolvers. If these - // defaults are called it is most certainly programmer err. - // If you're see this comment then: 'Whoops! Sorry, my bad.' - panic("Unimplemented; see RuleFieldResolvers.") - }, - Name: "Rule", - } -} - -// describe Rule's configuration; kept private to avoid unintentional tampering of configuration at runtime. -var _ObjectTypeRuleDesc = graphql.ObjectDesc{ - Config: _ObjectTypeRuleConfigFn, - FieldHandlers: map[string]graphql.FieldHandler{ - "resourceNames": _ObjTypeRuleResourceNamesHandler, - "resources": _ObjTypeRuleResourcesHandler, - "verbs": _ObjTypeRuleVerbsHandler, - }, -} - -// -// ClusterRoleFieldResolvers represents a collection of methods whose products represent the -// response values of the 'ClusterRole' type. -type ClusterRoleFieldResolvers interface { - // Rules implements response to request for 'rules' field. - Rules(p graphql.ResolveParams) (interface{}, error) - - // Name implements response to request for 'name' field. - Name(p graphql.ResolveParams) (string, error) -} - -// ClusterRoleAliases implements all methods on ClusterRoleFieldResolvers interface by using reflection to -// match name of field to a field on the given value. Intent is reduce friction -// of writing new resolvers by removing all the instances where you would simply -// have the resolvers method return a field. -type ClusterRoleAliases struct{} - -// Rules implements response to request for 'rules' field. -func (_ ClusterRoleAliases) Rules(p graphql.ResolveParams) (interface{}, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - return val, err -} - -// Name implements response to request for 'name' field. -func (_ ClusterRoleAliases) Name(p graphql.ResolveParams) (string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'name'") - } - return ret, err -} - -// ClusterRoleType ClusterRole applies to all namespaces within a cluster. -var ClusterRoleType = graphql.NewType("ClusterRole", graphql.ObjectKind) - -// RegisterClusterRole registers ClusterRole object type with given service. -func RegisterClusterRole(svc *graphql.Service, impl ClusterRoleFieldResolvers) { - svc.RegisterObject(_ObjectTypeClusterRoleDesc, impl) -} -func _ObjTypeClusterRoleRulesHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Rules(p graphql.ResolveParams) (interface{}, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Rules(frp) - } -} - -func _ObjTypeClusterRoleNameHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Name(p graphql.ResolveParams) (string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Name(frp) - } -} - -func _ObjectTypeClusterRoleConfigFn() graphql1.ObjectConfig { - return graphql1.ObjectConfig{ - Description: "ClusterRole applies to all namespaces within a cluster.", - Fields: graphql1.Fields{ - "name": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Name of the ClusterRole", - Name: "name", - Type: graphql1.NewNonNull(graphql1.String), - }, - "rules": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "self descriptive", - Name: "rules", - Type: graphql1.NewList(graphql1.NewNonNull(graphql.OutputType("Rule"))), - }, - }, - Interfaces: []*graphql1.Interface{}, - IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { - // NOTE: - // Panic by default. Intent is that when Service is invoked, values of - // these fields are updated with instantiated resolvers. If these - // defaults are called it is most certainly programmer err. - // If you're see this comment then: 'Whoops! Sorry, my bad.' - panic("Unimplemented; see ClusterRoleFieldResolvers.") - }, - Name: "ClusterRole", - } -} - -// describe ClusterRole's configuration; kept private to avoid unintentional tampering of configuration at runtime. -var _ObjectTypeClusterRoleDesc = graphql.ObjectDesc{ - Config: _ObjectTypeClusterRoleConfigFn, - FieldHandlers: map[string]graphql.FieldHandler{ - "name": _ObjTypeClusterRoleNameHandler, - "rules": _ObjTypeClusterRoleRulesHandler, - }, -} - -// -// RoleFieldResolvers represents a collection of methods whose products represent the -// response values of the 'Role' type. -type RoleFieldResolvers interface { - // Rules implements response to request for 'rules' field. - Rules(p graphql.ResolveParams) (interface{}, error) - - // Namespace implements response to request for 'namespace' field. - Namespace(p graphql.ResolveParams) (string, error) - - // Name implements response to request for 'name' field. - Name(p graphql.ResolveParams) (string, error) -} - -// RoleAliases implements all methods on RoleFieldResolvers interface by using reflection to -// match name of field to a field on the given value. Intent is reduce friction -// of writing new resolvers by removing all the instances where you would simply -// have the resolvers method return a field. -type RoleAliases struct{} - -// Rules implements response to request for 'rules' field. -func (_ RoleAliases) Rules(p graphql.ResolveParams) (interface{}, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - return val, err -} - -// Namespace implements response to request for 'namespace' field. -func (_ RoleAliases) Namespace(p graphql.ResolveParams) (string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'namespace'") - } - return ret, err -} - -// Name implements response to request for 'name' field. -func (_ RoleAliases) Name(p graphql.ResolveParams) (string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'name'") - } - return ret, err -} - -// RoleType Role applies only to a single namespace. -var RoleType = graphql.NewType("Role", graphql.ObjectKind) - -// RegisterRole registers Role object type with given service. -func RegisterRole(svc *graphql.Service, impl RoleFieldResolvers) { - svc.RegisterObject(_ObjectTypeRoleDesc, impl) -} -func _ObjTypeRoleRulesHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Rules(p graphql.ResolveParams) (interface{}, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Rules(frp) - } -} - -func _ObjTypeRoleNamespaceHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Namespace(p graphql.ResolveParams) (string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Namespace(frp) - } -} - -func _ObjTypeRoleNameHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Name(p graphql.ResolveParams) (string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Name(frp) - } -} - -func _ObjectTypeRoleConfigFn() graphql1.ObjectConfig { - return graphql1.ObjectConfig{ - Description: "Role applies only to a single namespace.", - Fields: graphql1.Fields{ - "name": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Name of the Role", - Name: "name", - Type: graphql1.NewNonNull(graphql1.String), - }, - "namespace": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Namespace of the Role", - Name: "namespace", - Type: graphql1.NewNonNull(graphql1.String), - }, - "rules": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "self descriptive", - Name: "rules", - Type: graphql1.NewList(graphql1.NewNonNull(graphql.OutputType("Rule"))), - }, - }, - Interfaces: []*graphql1.Interface{}, - IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { - // NOTE: - // Panic by default. Intent is that when Service is invoked, values of - // these fields are updated with instantiated resolvers. If these - // defaults are called it is most certainly programmer err. - // If you're see this comment then: 'Whoops! Sorry, my bad.' - panic("Unimplemented; see RoleFieldResolvers.") - }, - Name: "Role", - } -} - -// describe Role's configuration; kept private to avoid unintentional tampering of configuration at runtime. -var _ObjectTypeRoleDesc = graphql.ObjectDesc{ - Config: _ObjectTypeRoleConfigFn, - FieldHandlers: map[string]graphql.FieldHandler{ - "name": _ObjTypeRoleNameHandler, - "namespace": _ObjTypeRoleNamespaceHandler, - "rules": _ObjTypeRoleRulesHandler, - }, -} - -// -// RoleRefFieldResolvers represents a collection of methods whose products represent the -// response values of the 'RoleRef' type. -type RoleRefFieldResolvers interface { - // Type implements response to request for 'type' field. - Type(p graphql.ResolveParams) (string, error) - - // Name implements response to request for 'name' field. - Name(p graphql.ResolveParams) (string, error) -} - -// RoleRefAliases implements all methods on RoleRefFieldResolvers interface by using reflection to -// match name of field to a field on the given value. Intent is reduce friction -// of writing new resolvers by removing all the instances where you would simply -// have the resolvers method return a field. -type RoleRefAliases struct{} - -// Type implements response to request for 'type' field. -func (_ RoleRefAliases) Type(p graphql.ResolveParams) (string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'type'") - } - return ret, err -} - -// Name implements response to request for 'name' field. -func (_ RoleRefAliases) Name(p graphql.ResolveParams) (string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'name'") - } - return ret, err -} - -// RoleRefType RoleRef maps groups to Roles or ClusterRoles. -var RoleRefType = graphql.NewType("RoleRef", graphql.ObjectKind) - -// RegisterRoleRef registers RoleRef object type with given service. -func RegisterRoleRef(svc *graphql.Service, impl RoleRefFieldResolvers) { - svc.RegisterObject(_ObjectTypeRoleRefDesc, impl) -} -func _ObjTypeRoleRefTypeHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Type(p graphql.ResolveParams) (string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Type(frp) - } -} - -func _ObjTypeRoleRefNameHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Name(p graphql.ResolveParams) (string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Name(frp) - } -} - -func _ObjectTypeRoleRefConfigFn() graphql1.ObjectConfig { - return graphql1.ObjectConfig{ - Description: "RoleRef maps groups to Roles or ClusterRoles.", - Fields: graphql1.Fields{ - "name": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Name of the resource being referenced", - Name: "name", - Type: graphql1.NewNonNull(graphql1.String), - }, - "type": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Type of role being referenced.", - Name: "type", - Type: graphql1.NewNonNull(graphql1.String), - }, - }, - Interfaces: []*graphql1.Interface{}, - IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { - // NOTE: - // Panic by default. Intent is that when Service is invoked, values of - // these fields are updated with instantiated resolvers. If these - // defaults are called it is most certainly programmer err. - // If you're see this comment then: 'Whoops! Sorry, my bad.' - panic("Unimplemented; see RoleRefFieldResolvers.") - }, - Name: "RoleRef", - } -} - -// describe RoleRef's configuration; kept private to avoid unintentional tampering of configuration at runtime. -var _ObjectTypeRoleRefDesc = graphql.ObjectDesc{ - Config: _ObjectTypeRoleRefConfigFn, - FieldHandlers: map[string]graphql.FieldHandler{ - "name": _ObjTypeRoleRefNameHandler, - "type": _ObjTypeRoleRefTypeHandler, - }, -} - -// -// SubjectFieldResolvers represents a collection of methods whose products represent the -// response values of the 'Subject' type. -type SubjectFieldResolvers interface { - // Kind implements response to request for 'kind' field. - Kind(p graphql.ResolveParams) (string, error) - - // Name implements response to request for 'name' field. - Name(p graphql.ResolveParams) (string, error) -} - -// SubjectAliases implements all methods on SubjectFieldResolvers interface by using reflection to -// match name of field to a field on the given value. Intent is reduce friction -// of writing new resolvers by removing all the instances where you would simply -// have the resolvers method return a field. -type SubjectAliases struct{} - -// Kind implements response to request for 'kind' field. -func (_ SubjectAliases) Kind(p graphql.ResolveParams) (string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'kind'") - } - return ret, err -} - -// Name implements response to request for 'name' field. -func (_ SubjectAliases) Name(p graphql.ResolveParams) (string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'name'") - } - return ret, err -} - -// SubjectType self descriptive -var SubjectType = graphql.NewType("Subject", graphql.ObjectKind) - -// RegisterSubject registers Subject object type with given service. -func RegisterSubject(svc *graphql.Service, impl SubjectFieldResolvers) { - svc.RegisterObject(_ObjectTypeSubjectDesc, impl) -} -func _ObjTypeSubjectKindHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Kind(p graphql.ResolveParams) (string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Kind(frp) - } -} - -func _ObjTypeSubjectNameHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Name(p graphql.ResolveParams) (string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Name(frp) - } -} - -func _ObjectTypeSubjectConfigFn() graphql1.ObjectConfig { - return graphql1.ObjectConfig{ - Description: "self descriptive", - Fields: graphql1.Fields{ - "kind": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Kind of object referenced (user or group)", - Name: "kind", - Type: graphql1.NewNonNull(graphql1.String), - }, - "name": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Name of the referenced object", - Name: "name", - Type: graphql1.NewNonNull(graphql1.String), - }, - }, - Interfaces: []*graphql1.Interface{}, - IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { - // NOTE: - // Panic by default. Intent is that when Service is invoked, values of - // these fields are updated with instantiated resolvers. If these - // defaults are called it is most certainly programmer err. - // If you're see this comment then: 'Whoops! Sorry, my bad.' - panic("Unimplemented; see SubjectFieldResolvers.") - }, - Name: "Subject", - } -} - -// describe Subject's configuration; kept private to avoid unintentional tampering of configuration at runtime. -var _ObjectTypeSubjectDesc = graphql.ObjectDesc{ - Config: _ObjectTypeSubjectConfigFn, - FieldHandlers: map[string]graphql.FieldHandler{ - "kind": _ObjTypeSubjectKindHandler, - "name": _ObjTypeSubjectNameHandler, - }, -} - -// -// ClusterRoleBindingFieldResolvers represents a collection of methods whose products represent the -// response values of the 'ClusterRoleBinding' type. -type ClusterRoleBindingFieldResolvers interface { - // Subjects implements response to request for 'subjects' field. - Subjects(p graphql.ResolveParams) (interface{}, error) - - // RoleRef implements response to request for 'roleRef' field. - RoleRef(p graphql.ResolveParams) (interface{}, error) - - // Name implements response to request for 'name' field. - Name(p graphql.ResolveParams) (string, error) -} - -// ClusterRoleBindingAliases implements all methods on ClusterRoleBindingFieldResolvers interface by using reflection to -// match name of field to a field on the given value. Intent is reduce friction -// of writing new resolvers by removing all the instances where you would simply -// have the resolvers method return a field. -type ClusterRoleBindingAliases struct{} - -// Subjects implements response to request for 'subjects' field. -func (_ ClusterRoleBindingAliases) Subjects(p graphql.ResolveParams) (interface{}, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - return val, err -} - -// RoleRef implements response to request for 'roleRef' field. -func (_ ClusterRoleBindingAliases) RoleRef(p graphql.ResolveParams) (interface{}, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - return val, err -} - -// Name implements response to request for 'name' field. -func (_ ClusterRoleBindingAliases) Name(p graphql.ResolveParams) (string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'name'") - } - return ret, err -} - -/* -ClusterRoleBindingType ClusterRoleBinding grants the permissions defined in a ClusterRole referenced -to a user or a set of users -*/ -var ClusterRoleBindingType = graphql.NewType("ClusterRoleBinding", graphql.ObjectKind) - -// RegisterClusterRoleBinding registers ClusterRoleBinding object type with given service. -func RegisterClusterRoleBinding(svc *graphql.Service, impl ClusterRoleBindingFieldResolvers) { - svc.RegisterObject(_ObjectTypeClusterRoleBindingDesc, impl) -} -func _ObjTypeClusterRoleBindingSubjectsHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Subjects(p graphql.ResolveParams) (interface{}, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Subjects(frp) - } -} - -func _ObjTypeClusterRoleBindingRoleRefHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - RoleRef(p graphql.ResolveParams) (interface{}, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.RoleRef(frp) - } -} - -func _ObjTypeClusterRoleBindingNameHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Name(p graphql.ResolveParams) (string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Name(frp) - } -} - -func _ObjectTypeClusterRoleBindingConfigFn() graphql1.ObjectConfig { - return graphql1.ObjectConfig{ - Description: "ClusterRoleBinding grants the permissions defined in a ClusterRole referenced\nto a user or a set of users", - Fields: graphql1.Fields{ - "name": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Name of the ClusterRoleBinding", - Name: "name", - Type: graphql1.NewNonNull(graphql1.String), - }, - "roleRef": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "RoleRef references a ClusterRole in the current namespace", - Name: "roleRef", - Type: graphql.OutputType("RoleRef"), - }, - "subjects": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Subjects holds references to the objects the ClusterRole applies to", - Name: "subjects", - Type: graphql1.NewList(graphql1.NewNonNull(graphql.OutputType("Subject"))), - }, - }, - Interfaces: []*graphql1.Interface{}, - IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { - // NOTE: - // Panic by default. Intent is that when Service is invoked, values of - // these fields are updated with instantiated resolvers. If these - // defaults are called it is most certainly programmer err. - // If you're see this comment then: 'Whoops! Sorry, my bad.' - panic("Unimplemented; see ClusterRoleBindingFieldResolvers.") - }, - Name: "ClusterRoleBinding", - } -} - -// describe ClusterRoleBinding's configuration; kept private to avoid unintentional tampering of configuration at runtime. -var _ObjectTypeClusterRoleBindingDesc = graphql.ObjectDesc{ - Config: _ObjectTypeClusterRoleBindingConfigFn, - FieldHandlers: map[string]graphql.FieldHandler{ - "name": _ObjTypeClusterRoleBindingNameHandler, - "roleRef": _ObjTypeClusterRoleBindingRoleRefHandler, - "subjects": _ObjTypeClusterRoleBindingSubjectsHandler, - }, -} - -// -// RoleBindingFieldResolvers represents a collection of methods whose products represent the -// response values of the 'RoleBinding' type. -type RoleBindingFieldResolvers interface { - // Subjects implements response to request for 'subjects' field. - Subjects(p graphql.ResolveParams) (interface{}, error) - - // RoleRef implements response to request for 'roleRef' field. - RoleRef(p graphql.ResolveParams) (interface{}, error) - - // Namespace implements response to request for 'namespace' field. - Namespace(p graphql.ResolveParams) (string, error) - - // Name implements response to request for 'name' field. - Name(p graphql.ResolveParams) (string, error) -} - -// RoleBindingAliases implements all methods on RoleBindingFieldResolvers interface by using reflection to -// match name of field to a field on the given value. Intent is reduce friction -// of writing new resolvers by removing all the instances where you would simply -// have the resolvers method return a field. -type RoleBindingAliases struct{} - -// Subjects implements response to request for 'subjects' field. -func (_ RoleBindingAliases) Subjects(p graphql.ResolveParams) (interface{}, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - return val, err -} - -// RoleRef implements response to request for 'roleRef' field. -func (_ RoleBindingAliases) RoleRef(p graphql.ResolveParams) (interface{}, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - return val, err -} - -// Namespace implements response to request for 'namespace' field. -func (_ RoleBindingAliases) Namespace(p graphql.ResolveParams) (string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'namespace'") - } - return ret, err -} - -// Name implements response to request for 'name' field. -func (_ RoleBindingAliases) Name(p graphql.ResolveParams) (string, error) { - val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) - ret, ok := val.(string) - if err != nil { - return ret, err - } - if !ok { - return ret, errors.New("unable to coerce value for field 'name'") - } - return ret, err -} - -/* -RoleBindingType RoleBinding grants the permissions defined in a Role referenced to a user or -a set of users -*/ -var RoleBindingType = graphql.NewType("RoleBinding", graphql.ObjectKind) - -// RegisterRoleBinding registers RoleBinding object type with given service. -func RegisterRoleBinding(svc *graphql.Service, impl RoleBindingFieldResolvers) { - svc.RegisterObject(_ObjectTypeRoleBindingDesc, impl) -} -func _ObjTypeRoleBindingSubjectsHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Subjects(p graphql.ResolveParams) (interface{}, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Subjects(frp) - } -} - -func _ObjTypeRoleBindingRoleRefHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - RoleRef(p graphql.ResolveParams) (interface{}, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.RoleRef(frp) - } -} - -func _ObjTypeRoleBindingNamespaceHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Namespace(p graphql.ResolveParams) (string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Namespace(frp) - } -} - -func _ObjTypeRoleBindingNameHandler(impl interface{}) graphql1.FieldResolveFn { - resolver := impl.(interface { - Name(p graphql.ResolveParams) (string, error) - }) - return func(frp graphql1.ResolveParams) (interface{}, error) { - return resolver.Name(frp) - } -} - -func _ObjectTypeRoleBindingConfigFn() graphql1.ObjectConfig { - return graphql1.ObjectConfig{ - Description: "RoleBinding grants the permissions defined in a Role referenced to a user or\na set of users", - Fields: graphql1.Fields{ - "name": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Name of the RoleBinding", - Name: "name", - Type: graphql1.NewNonNull(graphql1.String), - }, - "namespace": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Namespace of the RoleBinding", - Name: "namespace", - Type: graphql1.NewNonNull(graphql1.String), - }, - "roleRef": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "RoleRef references a Role in the current namespace", - Name: "roleRef", - Type: graphql.OutputType("RoleRef"), - }, - "subjects": &graphql1.Field{ - Args: graphql1.FieldConfigArgument{}, - DeprecationReason: "", - Description: "Subjects holds references to the objects the Role applies to", - Name: "subjects", - Type: graphql1.NewList(graphql1.NewNonNull(graphql.OutputType("Subject"))), - }, - }, - Interfaces: []*graphql1.Interface{}, - IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { - // NOTE: - // Panic by default. Intent is that when Service is invoked, values of - // these fields are updated with instantiated resolvers. If these - // defaults are called it is most certainly programmer err. - // If you're see this comment then: 'Whoops! Sorry, my bad.' - panic("Unimplemented; see RoleBindingFieldResolvers.") - }, - Name: "RoleBinding", - } -} - -// describe RoleBinding's configuration; kept private to avoid unintentional tampering of configuration at runtime. -var _ObjectTypeRoleBindingDesc = graphql.ObjectDesc{ - Config: _ObjectTypeRoleBindingConfigFn, - FieldHandlers: map[string]graphql.FieldHandler{ - "name": _ObjTypeRoleBindingNameHandler, - "namespace": _ObjTypeRoleBindingNamespaceHandler, - "roleRef": _ObjTypeRoleBindingRoleRefHandler, - "subjects": _ObjTypeRoleBindingSubjectsHandler, - }, -} diff --git a/backend/apid/graphql/schema/rbac.graphql b/backend/apid/graphql/schema/rbac.graphql deleted file mode 100644 index e51c6ddd15..0000000000 --- a/backend/apid/graphql/schema/rbac.graphql +++ /dev/null @@ -1,88 +0,0 @@ -""" -Rule holds information that describes an action that can be taken -""" -type Rule { - """ - Verbs is a list of verbs that apply to all of the listed resources for this - rule. These include "get", "list", "watch", "create", "update", "delete". - TODO: add support for "patch" (this is expensive and should be delayed - until a further release). TODO: add support for "watch" (via websockets) - """ - verbs: [String!]! - """ - Resources is a list of resources that this rule applies to. "*" represents - all resources. - """ - resources: [String!]! - """ - ResourceNames is an optional list of resource names that the rule applies - to. - """ - resourceNames: [String!]! -} - -""" -ClusterRole applies to all namespaces within a cluster. -""" -type ClusterRole { - rules: [Rule!] - "Name of the ClusterRole" - name: String! -} - -""" -Role applies only to a single namespace. -""" -type Role { - rules: [Rule!] - "Namespace of the Role" - namespace: String! - "Name of the Role" - name: String! -} - -""" -RoleRef maps groups to Roles or ClusterRoles. -""" -type RoleRef { - "Type of role being referenced." - type: String! - "Name of the resource being referenced" - name: String! -} - -type Subject { - "Kind of object referenced (user or group)" - kind: String! - "Name of the referenced object" - name: String! -} - -""" -ClusterRoleBinding grants the permissions defined in a ClusterRole referenced -to a user or a set of users -""" -type ClusterRoleBinding { - "Subjects holds references to the objects the ClusterRole applies to" - subjects: [Subject!] - "RoleRef references a ClusterRole in the current namespace" - roleRef: RoleRef - "Name of the ClusterRoleBinding" - name: String! -} - -""" -RoleBinding grants the permissions defined in a Role referenced to a user or -a set of users -""" -type RoleBinding { - "Subjects holds references to the objects the Role applies to" - subjects: [Subject!] - "RoleRef references a Role in the current namespace" - roleRef: RoleRef - "Namespace of the RoleBinding" - namespace: String! - "Name of the RoleBinding" - name: String! -} - diff --git a/backend/apid/graphql/schema/schema_gen.go b/backend/apid/graphql/schema/schema_gen.go index 40d4e19542..9dbdb75431 100644 --- a/backend/apid/graphql/schema/schema_gen.go +++ b/backend/apid/graphql/schema/schema_gen.go @@ -1,4 +1,4 @@ package schema -//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types Secret,Pipeline,PipelineWorkflow,ResourceReference,AssetBuild -pkg-path ../../../../api/core/v2 -o ./corev2.gen.graphql +//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types AssetBuild,ClusterRole,ClusterRoleBinding,Pipeline,PipelineWorkflow,ResourceReference,Role,RoleBinding,RoleRef,Rule,Secret,Subject -pkg-path ../../../../api/core/v2 -o ./corev2.gen.graphql //go:generate go run github.com/sensu/sensu-go/scripts/gengraphql . diff --git a/backend/apid/graphql/service.go b/backend/apid/graphql/service.go index 444f67dde4..850b13f161 100644 --- a/backend/apid/graphql/service.go +++ b/backend/apid/graphql/service.go @@ -162,13 +162,17 @@ func NewService(cfg ServiceConfig) (*Service, error) { schema.RegisterTimeWindowTimeRange(svc, &schema.TimeWindowTimeRangeAliases{}) // Register RBAC types - schema.RegisterClusterRole(svc, &schema.ClusterRoleAliases{}) - schema.RegisterClusterRoleBinding(svc, &schema.ClusterRoleBindingAliases{}) - schema.RegisterRole(svc, &schema.RoleAliases{}) - schema.RegisterRoleBinding(svc, &schema.RoleBindingAliases{}) - schema.RegisterRoleRef(svc, &schema.RoleRefAliases{}) - schema.RegisterRule(svc, &schema.RuleAliases{}) - schema.RegisterSubject(svc, &schema.SubjectAliases{}) + schema.RegisterCoreV2ClusterRole(svc, &clusterRoleImpl{}) + schema.RegisterCoreV2ClusterRoleExtensionOverrides(svc, &clusterRoleImpl{}) + schema.RegisterCoreV2ClusterRoleBinding(svc, &clusterRoleBindingImpl{}) + schema.RegisterCoreV2ClusterRoleBindingExtensionOverrides(svc, &clusterRoleBindingImpl{}) + schema.RegisterCoreV2Role(svc, &roleImpl{}) + schema.RegisterCoreV2RoleExtensionOverrides(svc, &roleImpl{}) + schema.RegisterCoreV2RoleBinding(svc, &roleBindingImpl{}) + schema.RegisterCoreV2RoleBindingExtensionOverrides(svc, &roleBindingImpl{}) + schema.RegisterCoreV2RoleRef(svc, &schema.CoreV2RoleRefAliases{}) + schema.RegisterCoreV2Rule(svc, &schema.CoreV2RuleAliases{}) + schema.RegisterCoreV2Subject(svc, &schema.CoreV2SubjectAliases{}) // Register user types schema.RegisterUser(svc, &userImpl{}) diff --git a/graphql/resolvers.go b/graphql/resolvers.go index 0a97576fbd..27789e9e74 100644 --- a/graphql/resolvers.go +++ b/graphql/resolvers.go @@ -233,8 +233,7 @@ type isTypeOfResolver interface { IsTypeOf(interface{}, IsTypeOfParams) bool } -func newIsTypeOfFn(impl interface{}) graphql.IsTypeOfFn { - resolver := impl.(isTypeOfResolver) +func newIsTypeOfFn(resolver isTypeOfResolver) graphql.IsTypeOfFn { return func(p graphql.IsTypeOfParams) bool { return resolver.IsTypeOf(p.Value, p) } From c6be97f1c2cb6b89731ca37c3134048fb6e14d43 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Tue, 7 Jun 2022 17:20:28 -0700 Subject: [PATCH 042/173] Add store/v2 watcher This commit adds an etcd-based watcher for store/v2. It ports the original store's watcher tests to ensure that the same use cases are addressed. Signed-off-by: Eric Chlebek --- backend/etcd/testing.go | 9 +- backend/store/v2/etcdstore/logger.go | 7 + backend/store/v2/etcdstore/watcher.go | 149 ++++++++++++++ backend/store/v2/etcdstore/watcher_test.go | 218 +++++++++++++++++++++ backend/store/v2/interface.go | 4 + backend/store/v2/proxy.go | 8 + backend/store/v2/storetest/mock.go | 4 + backend/store/v2/watcher.go | 50 +++++ go.mod | 9 +- go.sum | 24 ++- testing/mockstore/v2.go | 5 + 11 files changed, 473 insertions(+), 14 deletions(-) create mode 100644 backend/store/v2/etcdstore/logger.go create mode 100644 backend/store/v2/etcdstore/watcher.go create mode 100644 backend/store/v2/etcdstore/watcher_test.go create mode 100644 backend/store/v2/watcher.go diff --git a/backend/etcd/testing.go b/backend/etcd/testing.go index 5017fd5b31..feb23e93b0 100644 --- a/backend/etcd/testing.go +++ b/backend/etcd/testing.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/sensu/sensu-go/testing/testutil" - "github.com/stretchr/testify/require" ) // NewTestEtcd creates a new Etcd for testing purposes. @@ -21,12 +20,12 @@ func NewTestEtcdWithConfig(t testing.TB, cfg *Config) (*Etcd, func()) { cfg.DataDir = tmpDir e, err := NewEtcd(cfg) - require.NoError(t, err) + if err != nil { + t.Fatal(err) + } return e, func() { defer remove() - defer func() { - require.NoError(t, e.Shutdown()) - }() + defer e.Shutdown() } } diff --git a/backend/store/v2/etcdstore/logger.go b/backend/store/v2/etcdstore/logger.go new file mode 100644 index 0000000000..01680dc823 --- /dev/null +++ b/backend/store/v2/etcdstore/logger.go @@ -0,0 +1,7 @@ +package etcdstore + +import "github.com/sirupsen/logrus" + +var logger = logrus.WithFields(logrus.Fields{ + "component": "store", +}) diff --git a/backend/store/v2/etcdstore/watcher.go b/backend/store/v2/etcdstore/watcher.go new file mode 100644 index 0000000000..b8e82fd79e --- /dev/null +++ b/backend/store/v2/etcdstore/watcher.go @@ -0,0 +1,149 @@ +package etcdstore + +import ( + "context" + "strings" + "time" + + "github.com/gogo/protobuf/proto" + "github.com/prometheus/client_golang/prometheus" + storev2 "github.com/sensu/sensu-go/backend/store/v2" + "github.com/sensu/sensu-go/backend/store/v2/wrap" + "go.etcd.io/etcd/api/v3/mvccpb" + clientv3 "go.etcd.io/etcd/client/v3" +) + +const ( + WatchEventsCounterVec = "sensu_go_watch_events" + + WatchEventsLabelStatus = "status" + WatchEventsLabelResourceType = "resource" + WatchEventsLabelNamespace = "namespace" + + WatchEventsStatusHandled = "handled" + WatchEventsStatusDropped = "dropped" +) + +var ( + WatchEventsProcessed = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Name: WatchEventsCounterVec, + Help: "The total number of store watch notifications", + }, + []string{WatchEventsLabelStatus, WatchEventsLabelResourceType, WatchEventsLabelNamespace}, + ) + + watchOpts = []clientv3.OpOption{ + clientv3.WithCreatedNotify(), + clientv3.WithPrevKV(), + } +) + +func init() { + if err := prometheus.Register(WatchEventsProcessed); err != nil { + panic(err) + } +} + +func (s *Store) Watch(req storev2.ResourceRequest) <-chan []storev2.WatchEvent { + logger.Infof("watching %s: %s/%s", req.StoreName, req.Namespace, req.Name) + outbox := make(chan []storev2.WatchEvent, 1) + go s.watchLoop(req, outbox) + return outbox +} + +func (s *Store) watchLoop(req storev2.ResourceRequest, outbox chan []storev2.WatchEvent) { + defer logger.Infof("stopped watching %s: %s/%s", req.StoreName, req.Namespace, req.Name) + defer close(outbox) + ctx := clientv3.WithRequireLeader(req.Context) + key := StoreKey(req) + prefix := req.Name == "" + if prefix && !strings.HasSuffix(key, "/") { + key += "/" + } + for { + watcher := s.newWatchChan(ctx, key, prefix) + then := time.Now() + for { + select { + case <-ctx.Done(): + return + case e, ok := <-watcher: + if !ok { + goto RESTART + } + if err := e.Err(); err != nil && !e.Canceled { + logger.Error(err) + } + if len(e.Events) == 0 { + continue + } + events := v2WatchEvents(req, e) + var status string + select { + case outbox <- events: + status = WatchEventsStatusHandled + default: + status = WatchEventsStatusDropped + } + WatchEventsProcessed.WithLabelValues( + status, + req.StoreName, + req.Namespace, + ).Add(float64(len(events))) + } + } + RESTART: + logger.Infof("restarting watcher %s: %s/%s", req.StoreName, req.Namespace, req.Name) + // don't permit the creation of more than 1 watcher/s per key + since := time.Since(then) + if since < time.Second { + time.Sleep(time.Second - since) + } + } +} + +func (s *Store) newWatchChan(ctx context.Context, key string, prefix bool) clientv3.WatchChan { + opts := watchOpts + if prefix { + opts = append(opts, clientv3.WithPrefix()) + } + return s.client.Watch(ctx, key, opts...) +} + +func v2WatchEvents(req storev2.ResourceRequest, resp clientv3.WatchResponse) []storev2.WatchEvent { + events := make([]storev2.WatchEvent, len(resp.Events)) + for i, event := range resp.Events { + events[i] = toWatchEvent(req, event) + } + return events +} + +func toWatchEvent(req storev2.ResourceRequest, event *clientv3.Event) storev2.WatchEvent { + result := storev2.WatchEvent{Key: req} + if event.Kv != nil { + var wrapper wrap.Wrapper + if err := proto.Unmarshal(event.Kv.Value, &wrapper); err != nil { + result.Err = err + } + result.Value = &wrapper + } + if event.PrevKv != nil { + var wrapper wrap.Wrapper + if err := proto.Unmarshal(event.PrevKv.Value, &wrapper); err != nil { + result.Err = err + } + result.PreviousValue = &wrapper + } + switch event.Type { + case mvccpb.PUT: + if event.PrevKv == nil { + result.Type = storev2.WatchCreate + } else { + result.Type = storev2.WatchUpdate + } + case mvccpb.DELETE: + result.Type = storev2.WatchDelete + } + return result +} diff --git a/backend/store/v2/etcdstore/watcher_test.go b/backend/store/v2/etcdstore/watcher_test.go new file mode 100644 index 0000000000..dd916a3469 --- /dev/null +++ b/backend/store/v2/etcdstore/watcher_test.go @@ -0,0 +1,218 @@ +package etcdstore_test + +import ( + "context" + "sync" + "testing" + "time" + + "github.com/google/go-cmp/cmp" + corev2 "github.com/sensu/sensu-go/api/core/v2" + corev3 "github.com/sensu/sensu-go/api/core/v3" + "github.com/sensu/sensu-go/backend/etcd" + oldstore "github.com/sensu/sensu-go/backend/store/etcd" + storev2 "github.com/sensu/sensu-go/backend/store/v2" + "github.com/sensu/sensu-go/backend/store/v2/etcdstore" + clientv3 "go.etcd.io/etcd/client/v3" + "go.etcd.io/etcd/tests/v3/integration" +) + +const timeout = 10 + +func TestWatch(t *testing.T) { + type storeFunc func(context.Context, storev2.Interface) + foo := corev3.FixtureEntityConfig("foo") + wrapper, err := storev2.WrapResource(foo) + if err != nil { + t.Fatal(err) + } + bar := corev3.FixtureEntityConfig("foo") + bar.Metadata.Labels["foo"] = "bar" + wrapper2, err := storev2.WrapResource(bar) + if err != nil { + t.Fatal(err) + } + req := storev2.NewResourceRequestFromResource(context.Background(), foo) + req2 := storev2.NewResourceRequestFromResource(context.Background(), bar) + + testWithEtcdClient(t, func(s storev2.Interface, client *clientv3.Client) { + tests := []struct { + name string + storeFunc storeFunc + wantAction storev2.WatchActionType + wantResource corev3.Resource + }{ + { + name: "resource is created", + storeFunc: func(ctx context.Context, s storev2.Interface) { + if err := s.CreateOrUpdate(req, wrapper); err != nil { + t.Fatal(err) + } + }, + wantAction: storev2.WatchCreate, + wantResource: foo, + }, + { + name: "resource is updated", + storeFunc: func(ctx context.Context, s storev2.Interface) { + if err := s.CreateOrUpdate(req2, wrapper2); err != nil { + t.Fatal(err) + } + }, + wantAction: storev2.WatchUpdate, + wantResource: bar, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + req.Context = ctx + + w := s.Watch(req) + + var wg sync.WaitGroup + wg.Add(1) + go testCheckResult(t, w, tt.wantAction, tt.wantResource, &wg) + time.Sleep(time.Second) // forgive me + tt.storeFunc(ctx, s) + wg.Wait() + + cancel() + testCheckStoppedWatcher(t, w) + }) + } + }) +} + +func TestWatchRetry(t *testing.T) { + integration.BeforeTestExternal(t) + c := integration.NewClusterV3(t, &integration.ClusterConfig{GRPCKeepAliveInterval: 1 * time.Second, GRPCKeepAliveTimeout: 2 * time.Second, Size: 3}) + defer c.Terminate(t) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := c.Client(0) + s := etcdstore.NewStore(client) + oldStore := oldstore.NewStore(client) + + ns := &corev2.Namespace{Name: "default"} + + if err := oldStore.CreateNamespace(context.Background(), ns); err != nil { + t.Fatal(err) + } + + // Create resource + foo := corev3.FixtureEntityConfig("foo") + req := storev2.NewResourceRequestFromResource(ctx, foo) + wrapper, err := storev2.WrapResource(foo) + if err != nil { + t.Fatal(err) + } + w := s.Watch(req) + + var wg sync.WaitGroup + wg.Add(1) + go testCheckResult(t, w, storev2.WatchCreate, foo, &wg) + time.Sleep(time.Second) + if err := s.CreateOrUpdate(req, wrapper); err != nil { + t.Fatal(err) + } + wg.Wait() + + // Create a failure with the watcher by partioning our etcd cluster + c.Members[0].InjectPartition(t, c.Members[1], c.Members[2]) + time.Sleep(1 * time.Second) + + c.Members[0].RecoverPartition(t, c.Members[1], c.Members[2]) + c.Members[0].WaitOK(t) + time.Sleep(1 * time.Second) + + // Update resource + foo.Metadata.Labels["foo"] = "acme" + wrapper, err = storev2.WrapResource(foo) + if err != nil { + t.Fatal(err) + } + var wg2 sync.WaitGroup + wg2.Add(1) + go testCheckResult(t, w, storev2.WatchUpdate, foo, &wg2) + time.Sleep(time.Second) + if err := s.CreateOrUpdate(req, wrapper); err != nil { + t.Fatal(err) + } + wg2.Wait() +} + +func testCheckResult(t *testing.T, w <-chan []storev2.WatchEvent, action storev2.WatchActionType, resource corev3.Resource, wg *sync.WaitGroup) { + t.Helper() + defer wg.Done() + + select { + case events, ok := <-w: + if !ok { + panic("channel closed") + } + event := events[0] + if event.Type != action { + t.Errorf("event type = %v, want %v", event.Type, action) + } + + if event.Type == storev2.WatchError { + t.Error("watch error") + return + } + + var got corev3.EntityConfig + if event.Value != nil { + if err := event.Value.UnwrapInto(&got); err != nil { + t.Error(err) + return + } + } else if event.PreviousValue != nil { + if err := event.Value.UnwrapInto(&got); err != nil { + t.Error(err) + return + } + } + + if !cmp.Equal(resource.GetMetadata(), got.GetMetadata()) { + t.Errorf("watch result = %#v, want %#v", got, resource) + return + } + case <-time.After(timeout * time.Second): + t.Fatalf("timeout after waiting %d for the Result() chan", timeout) + } +} + +func testCheckStoppedWatcher(t *testing.T, w <-chan []storev2.WatchEvent) { + t.Helper() + + select { + case _, ok := <-w: + if ok { + t.Fatal("resultChan should have been closed") + } + case <-time.After(timeout * time.Second): + t.Fatalf("timeout after waiting %d for resultChan", timeout) + } +} + +func testWithEtcdClient(t *testing.T, f func(storev2.Interface, *clientv3.Client)) { + e, cleanup := etcd.NewTestEtcd(t) + defer cleanup() + + client := e.NewEmbeddedClient() + + s := etcdstore.NewStore(client) + oldStore := oldstore.NewStore(client) + ns := &corev2.Namespace{Name: "default"} + + if err := oldStore.CreateNamespace(context.Background(), ns); err != nil { + t.Fatal(err) + } + + f(s, client) +} diff --git a/backend/store/v2/interface.go b/backend/store/v2/interface.go index e66a57570a..0338db18ae 100644 --- a/backend/store/v2/interface.go +++ b/backend/store/v2/interface.go @@ -47,4 +47,8 @@ type Interface interface { // Patch patches the resource given in the request Patch(ResourceRequest, Wrapper, patch.Patcher, *store.ETagCondition) error + + // Watch sets up a watcher that responds to updates to the given key or + // keyspace indicated by the ResourceRequest. + Watch(ResourceRequest) <-chan []WatchEvent } diff --git a/backend/store/v2/proxy.go b/backend/store/v2/proxy.go index 3a544ce55a..e2b1909c0b 100644 --- a/backend/store/v2/proxy.go +++ b/backend/store/v2/proxy.go @@ -79,3 +79,11 @@ func (p *Proxy) Patch(req ResourceRequest, wrapper Wrapper, patcher patch.Patche defer p.mu.RUnlock() return p.impl.Patch(req, wrapper, patcher, cond) } + +// Watch sets up a watcher that responds to updates to the given key or +// keyspace indicated by the ResourceRequest. +func (p *Proxy) Watch(req ResourceRequest) <-chan []WatchEvent { + p.mu.RLock() + defer p.mu.RUnlock() + return p.impl.Watch(req) +} diff --git a/backend/store/v2/storetest/mock.go b/backend/store/v2/storetest/mock.go index 22fb64b3b6..162a405d54 100644 --- a/backend/store/v2/storetest/mock.go +++ b/backend/store/v2/storetest/mock.go @@ -53,3 +53,7 @@ func (s *Store) Patch(req storev2.ResourceRequest, w storev2.Wrapper, patcher pa args := s.Called(req, w, patcher, conditions) return args.Error(0) } + +func (s *Store) Watch(req storev2.ResourceRequest) <-chan []storev2.WatchEvent { + return s.Called(req).Get(0).(<-chan []storev2.WatchEvent) +} diff --git a/backend/store/v2/watcher.go b/backend/store/v2/watcher.go new file mode 100644 index 0000000000..3bf45ec754 --- /dev/null +++ b/backend/store/v2/watcher.go @@ -0,0 +1,50 @@ +package v2 + +const ( + // WatchUnknown indicates that we received an unknown watch even tytpe + // from etcd. + WatchUnknown WatchActionType = iota + // WatchCreate indicates that an object was created. + WatchCreate + // WatchUpdate indicates that an object was updated. + WatchUpdate + // WatchDelete indicates that an object was deleted. + WatchDelete + // WatchError indicates that an error was encountered + WatchError +) + +// WatchActionType indicates what type of change was made to an object in the store. +type WatchActionType int + +// WatchEvent represents an event of a watched resource +type WatchEvent struct { + Type WatchActionType + Key ResourceRequest + Value Wrapper + PreviousValue Wrapper + Revision int64 + Err error +} + +// Watcher represents a generic watcher +type Watcher interface { + Result() <-chan []WatchEvent +} + +func (t WatchActionType) String() string { + var s string + switch t { + case WatchUnknown: + s = "Unknown" + case WatchCreate: + s = "Create" + case WatchDelete: + s = "Delete" + case WatchUpdate: + s = "Update" + case WatchError: + s = "Error" + } + return s +} diff --git a/go.mod b/go.mod index b47367727a..03400ed3b0 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/libp2p/go-reuseport v0.0.0-20180416043609-15a1cd37f050 // indirect github.com/libp2p/go-sockaddr v0.1.0 // indirect - github.com/mattn/go-colorable v0.1.4 // indirect + github.com/mattn/go-colorable v0.1.6 // indirect github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b github.com/mholt/archiver/v3 v3.3.1-0.20191129193105-44285f7ed244 github.com/mitchellh/go-homedir v1.1.0 @@ -75,3 +75,10 @@ require ( gopkg.in/h2non/filetype.v1 v1.0.3 gopkg.in/yaml.v2 v2.4.0 ) + +require ( + github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect + github.com/google/go-cmp v0.5.8 + github.com/kr/pty v1.1.8 // indirect + golang.org/x/text v0.3.7 // indirect +) diff --git a/go.sum b/go.sum index 7d0a8b5534..5a3e822293 100644 --- a/go.sum +++ b/go.sum @@ -69,13 +69,16 @@ github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkE github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1 h1:mbMd//7aY7CL51mT/YZ5DJ4yZYA/E4ZKVSgCh5yN7yU= github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= @@ -174,8 +177,9 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -277,8 +281,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/pty v1.1.4 h1:5Myjjh3JY/NaAi4IsUbHADytDyl1VE1Y9PXDlL+P/VQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= 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= @@ -292,11 +297,12 @@ github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzR github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= @@ -621,6 +627,8 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -650,8 +658,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= @@ -687,7 +696,6 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= diff --git a/testing/mockstore/v2.go b/testing/mockstore/v2.go index 80ab197f36..4af38f2e6b 100644 --- a/testing/mockstore/v2.go +++ b/testing/mockstore/v2.go @@ -48,3 +48,8 @@ func (v *V2MockStore) Exists(req storev2.ResourceRequest) (bool, error) { func (v *V2MockStore) Patch(req storev2.ResourceRequest, w storev2.Wrapper, patcher patch.Patcher, cond *store.ETagCondition) error { return v.Called(req, w, patcher, cond).Error(0) } + +func (v *V2MockStore) Watch(req storev2.ResourceRequest) <-chan []storev2.WatchEvent { + args := v.Called(req) + return args.Get(0).(<-chan []storev2.WatchEvent) +} From aad337c841cf2c1fbe2b59333a117d40dd2cee96 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Thu, 16 Jun 2022 12:42:58 -0700 Subject: [PATCH 043/173] Move storev2 watcher metrics to storev2 package Signed-off-by: Eric Chlebek --- backend/store/v2/etcdstore/watcher.go | 33 +++---------------------- backend/store/v2/watcher.go | 35 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/backend/store/v2/etcdstore/watcher.go b/backend/store/v2/etcdstore/watcher.go index b8e82fd79e..b69755df37 100644 --- a/backend/store/v2/etcdstore/watcher.go +++ b/backend/store/v2/etcdstore/watcher.go @@ -6,45 +6,19 @@ import ( "time" "github.com/gogo/protobuf/proto" - "github.com/prometheus/client_golang/prometheus" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/wrap" "go.etcd.io/etcd/api/v3/mvccpb" clientv3 "go.etcd.io/etcd/client/v3" ) -const ( - WatchEventsCounterVec = "sensu_go_watch_events" - - WatchEventsLabelStatus = "status" - WatchEventsLabelResourceType = "resource" - WatchEventsLabelNamespace = "namespace" - - WatchEventsStatusHandled = "handled" - WatchEventsStatusDropped = "dropped" -) - var ( - WatchEventsProcessed = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: WatchEventsCounterVec, - Help: "The total number of store watch notifications", - }, - []string{WatchEventsLabelStatus, WatchEventsLabelResourceType, WatchEventsLabelNamespace}, - ) - watchOpts = []clientv3.OpOption{ clientv3.WithCreatedNotify(), clientv3.WithPrevKV(), } ) -func init() { - if err := prometheus.Register(WatchEventsProcessed); err != nil { - panic(err) - } -} - func (s *Store) Watch(req storev2.ResourceRequest) <-chan []storev2.WatchEvent { logger.Infof("watching %s: %s/%s", req.StoreName, req.Namespace, req.Name) outbox := make(chan []storev2.WatchEvent, 1) @@ -82,14 +56,15 @@ func (s *Store) watchLoop(req storev2.ResourceRequest, outbox chan []storev2.Wat var status string select { case outbox <- events: - status = WatchEventsStatusHandled + status = storev2.WatchEventsStatusHandled default: - status = WatchEventsStatusDropped + status = storev2.WatchEventsStatusDropped } - WatchEventsProcessed.WithLabelValues( + storev2.WatchEventsProcessed.WithLabelValues( status, req.StoreName, req.Namespace, + storev2.WatcherProviderEtcd, ).Add(float64(len(events))) } } diff --git a/backend/store/v2/watcher.go b/backend/store/v2/watcher.go index 3bf45ec754..024b2fcde6 100644 --- a/backend/store/v2/watcher.go +++ b/backend/store/v2/watcher.go @@ -1,5 +1,9 @@ package v2 +import ( + "github.com/prometheus/client_golang/prometheus" +) + const ( // WatchUnknown indicates that we received an unknown watch even tytpe // from etcd. @@ -48,3 +52,34 @@ func (t WatchActionType) String() string { } return s } + +const ( + WatchEventsCounterVec = "sensu_go_watch_events" + + WatchEventsLabelStatus = "status" + WatchEventsLabelResourceType = "resource" + WatchEventsLabelNamespace = "namespace" + + WatchEventsStatusHandled = "handled" + WatchEventsStatusDropped = "dropped" + + WatcherProvider = "provider" + WatcherProviderPG = "postgres" + WatcherProviderEtcd = "etcd" +) + +var ( + WatchEventsProcessed = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Name: WatchEventsCounterVec, + Help: "The total number of store watch notifications", + }, + []string{WatchEventsLabelStatus, WatchEventsLabelResourceType, WatchEventsLabelNamespace, WatcherProvider}, + ) +) + +func init() { + if err := prometheus.Register(WatchEventsProcessed); err != nil { + panic(err) + } +} From 07ad578c78b62a435e5b6e883bf4e799255fec8e Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Fri, 22 Jul 2022 12:08:57 -0700 Subject: [PATCH 044/173] Fix test breakage Signed-off-by: Eric Chlebek --- backend/store/v2/etcdstore/watcher_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/store/v2/etcdstore/watcher_test.go b/backend/store/v2/etcdstore/watcher_test.go index dd916a3469..f94f145054 100644 --- a/backend/store/v2/etcdstore/watcher_test.go +++ b/backend/store/v2/etcdstore/watcher_test.go @@ -96,7 +96,7 @@ func TestWatchRetry(t *testing.T) { client := c.Client(0) s := etcdstore.NewStore(client) - oldStore := oldstore.NewStore(client) + oldStore := oldstore.NewStore(client, "") ns := &corev2.Namespace{Name: "default"} @@ -207,7 +207,7 @@ func testWithEtcdClient(t *testing.T, f func(storev2.Interface, *clientv3.Client client := e.NewEmbeddedClient() s := etcdstore.NewStore(client) - oldStore := oldstore.NewStore(client) + oldStore := oldstore.NewStore(client, "") ns := &corev2.Namespace{Name: "default"} if err := oldStore.CreateNamespace(context.Background(), ns); err != nil { From 72fc19e9baf06f644d5c4ea30fb8d488c22fc6b9 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Fri, 22 Jul 2022 13:45:59 -0700 Subject: [PATCH 045/173] Fix t.Fatalf call in goroutine Signed-off-by: Eric Chlebek --- backend/store/v2/etcdstore/watcher_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/store/v2/etcdstore/watcher_test.go b/backend/store/v2/etcdstore/watcher_test.go index f94f145054..dae3f5b439 100644 --- a/backend/store/v2/etcdstore/watcher_test.go +++ b/backend/store/v2/etcdstore/watcher_test.go @@ -183,7 +183,7 @@ func testCheckResult(t *testing.T, w <-chan []storev2.WatchEvent, action storev2 return } case <-time.After(timeout * time.Second): - t.Fatalf("timeout after waiting %d for the Result() chan", timeout) + t.Errorf("timeout after waiting %d for the Result() chan", timeout) } } From 3d2ffd37d3d5abbe19b67ed9027d94d05ecf7274 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Thu, 28 Jul 2022 08:32:03 -0700 Subject: [PATCH 046/173] Retry Etcd Requests in BackendIDGetter (#4815) * Include retry logic in BackendIDGetter Signed-off-by: Christian Kruse * update changelog Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 4 ++++ backend/etcd/id.go | 10 +++------- backend/etcd/id_test.go | 22 +++++++++++++++++++++- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 2b3db16593..50c9d8f365 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -15,6 +15,10 @@ be marked as global resources. ### Changed - Upgraded CI Go version to 1.17.12 +### Fixed +- Fixed a bug where sensu-backend could crash if the BackendIDGetter +encounters etcd client unavailability. + ## [6.7.3] - 2022-07-07 ### Changed diff --git a/backend/etcd/id.go b/backend/etcd/id.go index b180aa5ab5..d61e0cc6e7 100644 --- a/backend/etcd/id.go +++ b/backend/etcd/id.go @@ -108,7 +108,7 @@ func (b *BackendIDGetter) getLease(ctx context.Context) (int64, <-chan *clientv3 resp, err := b.client.Grant(ctx, backendIDLeasePeriod) LeaseOperationsCounter.WithLabelValues("sensu-etcd", LeaseOperationTypeGrant, LeaseStatusFor(err)).Inc() if err != nil { - return false, err + return kvc.RetryRequest(n, err) } leaseID := resp.ID id = int64(leaseID) @@ -119,17 +119,13 @@ func (b *BackendIDGetter) getLease(ctx context.Context) (int64, <-chan *clientv3 _, err = b.client.Put(b.ctx, key, value, clientv3.WithLease(leaseID)) LeaseOperationsCounter.WithLabelValues("sensu-etcd", LeaseOperationTypePut, LeaseStatusFor(err)).Inc() if err != nil { - return false, err + return kvc.RetryRequest(n, err) } // Keep the lease alive ch, err = b.client.KeepAlive(b.ctx, leaseID) LeaseOperationsCounter.WithLabelValues("sensu-etcd", LeaseOperationTypeKeepalive, LeaseStatusFor(err)).Inc() - if err != nil { - return false, err - } - - return true, nil + return kvc.RetryRequest(n, err) }) if err != nil { diff --git a/backend/etcd/id_test.go b/backend/etcd/id_test.go index 90e5808b53..ec445adf5e 100644 --- a/backend/etcd/id_test.go +++ b/backend/etcd/id_test.go @@ -2,11 +2,13 @@ package etcd import ( "context" + "errors" "fmt" "sync" "testing" + "time" - "go.etcd.io/etcd/client/v3" + clientv3 "go.etcd.io/etcd/client/v3" ) type mockBackendIDGetterClient struct { @@ -64,3 +66,21 @@ func TestBackendIDGetter(t *testing.T) { t.Fatalf("bad backend id: got %d, want %d", got, want) } } + +func TestBackendIDGetterRetires(t *testing.T) { + client := newMockBackendIDGetterClient() + client.grantErr = errors.New("etcdserver: too many requests") + // assert that NewBackendIDGetter blocks retrying getting a lease + newBackendID := make(chan struct{}) + go func() { + NewBackendIDGetter(context.TODO(), client) + close(newBackendID) + }() + + select { + case <-newBackendID: + t.Errorf("did not expect NewBackendIDGetter to finish") + case <-time.After(time.Millisecond * 500): + // OKAY + } +} From b85ae2a031aa929a1d174aa8d4600cf1268693fa Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Wed, 27 Jul 2022 10:29:01 -0700 Subject: [PATCH 047/173] allow override stdin, stdout & stderr in sensuctl use junit test output in ci Signed-off-by: Justin Kolberg fix typo Signed-off-by: Justin Kolberg use single job Signed-off-by: Justin Kolberg avoid using stdout/stderr in sensuctl tests Signed-off-by: Justin Kolberg syntax Signed-off-by: Justin Kolberg --- .circleci/config.yml | 14 ++- cli/cli.go | 20 ++-- cli/commands/apikey/revoke.go | 12 ++- cli/commands/apikey/revoke_test.go | 12 ++- cli/commands/asset/delete.go | 6 +- cli/commands/asset/update.go | 9 +- cli/commands/asset/update_test.go | 48 +++++----- cli/commands/check/delete.go | 6 +- cli/commands/check/interactive.go | 4 +- cli/commands/check/update.go | 6 +- cli/commands/check/update_test.go | 48 +++++----- cli/commands/clusterrole/delete.go | 6 +- cli/commands/entity/delete.go | 6 +- cli/commands/entity/interactive.go | 4 +- cli/commands/entity/update.go | 6 +- cli/commands/entity/update_test.go | 48 +++++----- cli/commands/event/delete.go | 7 +- cli/commands/event/delete_test.go | 14 +-- cli/commands/filter/delete.go | 6 +- cli/commands/filter/delete_test.go | 14 +-- cli/commands/filter/interactive.go | 4 +- cli/commands/filter/update.go | 6 +- cli/commands/filter/update_test.go | 48 +++++----- cli/commands/handler/delete.go | 6 +- cli/commands/handler/delete_test.go | 14 +-- cli/commands/handler/interactive.go | 27 +++--- cli/commands/handler/update.go | 6 +- cli/commands/handler/update_test.go | 48 +++++----- cli/commands/helpers/prompts.go | 39 ++++++-- cli/commands/helpers/prompts_test.go | 34 ++++++- cli/commands/hook/delete.go | 6 +- cli/commands/hook/interactive.go | 4 +- cli/commands/hook/update.go | 6 +- cli/commands/hook/update_test.go | 48 +++++----- cli/commands/mutator/delete.go | 6 +- cli/commands/mutator/interactive.go | 4 +- cli/commands/mutator/update.go | 6 +- cli/commands/mutator/update_test.go | 48 +++++----- cli/commands/namespace/delete.go | 6 +- cli/commands/pipeline/delete.go | 6 +- cli/commands/role/delete.go | 6 +- cli/commands/silenced/delete.go | 6 +- .../silenced/{getName.go => get_name.go} | 0 cli/commands/silenced/interactive.go | 8 +- cli/commands/silenced/update.go | 6 +- cli/commands/silenced/update_test.go | 45 ++++----- cli/commands/testing/cli.go | 95 +++++++++++++++++-- cli/commands/user/delete.go | 6 +- 48 files changed, 551 insertions(+), 289 deletions(-) rename cli/commands/silenced/{getName.go => get_name.go} (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b8c7f4df3..4da8f1f5f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,6 +37,7 @@ jobs: echo "$replaces" exit 1 fi + test: <<: *sensu_go_build_env <<: *sensu_go_test_env @@ -45,8 +46,17 @@ jobs: - go/mod-download-cached # Run tests - - run: ./build.sh unit - - run: ./build.sh integration + - run: >- + gotestsum --junitfile /tmp/junit/unit-tests.xml -- + -timeout=60s -race $(go list ./... | + egrep -v '(testing|vendor|scripts)') + - run: >- + gotestsum --junitfile /tmp/junit/integration-tests.xml -- + -timeout=180s -tags=integration $(go list ./... | + egrep -v '(testing|vendor|scripts)') + + - store_test_results: + path: /tmp/junit test-module: parameters: diff --git a/cli/cli.go b/cli/cli.go index d8fe023f32..6cd61afb21 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -22,10 +22,12 @@ const TypeError = "TypeError" // SensuCli is an instance of the Sensu command line client; // encapsulates API client, logger & general configuration. type SensuCli struct { - Config config.Config - Client client.APIClient - Logger *logrus.Entry - InFile *os.File + Config config.Config + Client client.APIClient + Logger *logrus.Entry + InFile *os.File + OutFile *os.File + ErrFile *os.File } // New SensuCLI given persistent flags from command @@ -58,9 +60,11 @@ func New(flags *pflag.FlagSet) *SensuCli { cliClient.SetTLSClientConfig(&tlsConfig) return &SensuCli{ - Client: cliClient, - Config: conf, - Logger: logger, - InFile: os.Stdin, + Client: cliClient, + Config: conf, + Logger: logger, + InFile: os.Stdin, + OutFile: os.Stdout, + ErrFile: os.Stderr, } } diff --git a/cli/commands/apikey/revoke.go b/cli/commands/apikey/revoke.go index f0e0ffcbc8..0f4579cb4b 100644 --- a/cli/commands/apikey/revoke.go +++ b/cli/commands/apikey/revoke.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" corev2 "github.com/sensu/sensu-go/api/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" @@ -24,8 +25,11 @@ func RevokeCommand(cli *cli.SensuCli) *cobra.Command { name := args[0] if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "apikey"); !confirmed { - fmt.Fprintln(cmd.OutOrStdout(), "Canceled") + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "apikey", opts...); !confirmed { + fmt.Fprintln(cli.OutFile, "Canceled") return nil } } @@ -47,5 +51,9 @@ func RevokeCommand(cli *cli.SensuCli) *cobra.Command { cmd.Flags().Bool("skip-confirm", false, "skip interactive confirmation prompt") + cmd.SetIn(cli.InFile) + cmd.SetOutput(cli.OutFile) + cmd.SetErr(cli.ErrFile) + return cmd } diff --git a/cli/commands/apikey/revoke_test.go b/cli/commands/apikey/revoke_test.go index 85cd88d94d..2ef5afc2f5 100644 --- a/cli/commands/apikey/revoke_test.go +++ b/cli/commands/apikey/revoke_test.go @@ -4,6 +4,7 @@ import ( "errors" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" @@ -71,10 +72,11 @@ func TestDeleteCommandRunEClosureWithServerErr(t *testing.T) { func TestDeleteCommandRunEFailConfirm(t *testing.T) { assert := assert.New(t) - cli := test.NewMockCLI() - cmd := RevokeCommand(cli) - out, err := test.RunCmd(cmd, []string{"my-api-key"}) + test.WithMockCLI(t, func(cli *cli.SensuCli) { + cmd := RevokeCommand(cli) + output, err := test.RunCmdWithOutFile(cmd, []string{"my-api-key"}, cli.OutFile) - require.NoError(t, err) - assert.Contains(out, "Canceled") + require.NoError(t, err) + assert.Contains(output, "Canceled") + }) } diff --git a/cli/commands/asset/delete.go b/cli/commands/asset/delete.go index 39758fb1b0..de0bf91332 100644 --- a/cli/commands/asset/delete.go +++ b/cli/commands/asset/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" corev2 "github.com/sensu/sensu-go/api/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" @@ -25,7 +26,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { name := args[0] if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "asset"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "asset", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/asset/update.go b/cli/commands/asset/update.go index bc2ee33f3b..e2192544a8 100644 --- a/cli/commands/asset/update.go +++ b/cli/commands/asset/update.go @@ -33,7 +33,10 @@ func UpdateCommand(cli *cli.SensuCli) *cobra.Command { // Administer questionnaire opts := newAssetOptions() opts.copyFrom(asset) - if err := opts.administerQuestionnaire(); err != nil { + askOpts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if err := opts.administerQuestionnaire(askOpts...); err != nil { return err } @@ -76,7 +79,7 @@ func (opts *assetOptions) copyTo(a *types.Asset) { a.Sha512 = opts.Sha512 } -func (opts *assetOptions) administerQuestionnaire() error { +func (opts *assetOptions) administerQuestionnaire(askOpts ...survey.AskOpt) error { var qs = []*survey.Question{ { Name: "url", @@ -90,5 +93,5 @@ func (opts *assetOptions) administerQuestionnaire() error { }, } - return survey.Ask(qs, opts) + return survey.Ask(qs, opts, askOpts...) } diff --git a/cli/commands/asset/update_test.go b/cli/commands/asset/update_test.go index 4887d05c61..a86c14dc43 100644 --- a/cli/commands/asset/update_test.go +++ b/cli/commands/asset/update_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/sensu/sensu-go/types" @@ -35,29 +36,30 @@ func TestUpdateCommand(t *testing.T) { name, ) t.Run(testName, func(t *testing.T) { - res := types.FixtureAsset("my-id") - cli := test.NewMockCLI() - - client := cli.Client.(*client.MockClient) - client.On( - "FetchAsset", - name, - ).Return(res, tc.fetchResponse) - - client.On( - "CreateAsset", - mock.Anything, - ).Return(tc.updateResponse) - - cmd := UpdateCommand(cli) - out, err := test.RunCmd(cmd, tc.args) - - assert.Regexp(t, tc.expectedOutput, out) - if tc.expectError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } + test.WithMockCLI(t, func(cli *cli.SensuCli) { + res := types.FixtureAsset("my-id") + + client := cli.Client.(*client.MockClient) + client.On( + "FetchAsset", + name, + ).Return(res, tc.fetchResponse) + + client.On( + "CreateAsset", + mock.Anything, + ).Return(tc.updateResponse) + + cmd := UpdateCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, tc.args, cli.OutFile) + + assert.Regexp(t, tc.expectedOutput, out) + if tc.expectError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + }) }) } } diff --git a/cli/commands/check/delete.go b/cli/commands/check/delete.go index 332bc40e51..2ad9616859 100644 --- a/cli/commands/check/delete.go +++ b/cli/commands/check/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -26,7 +27,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := cli.Config.Namespace() if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "check"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "check", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/check/interactive.go b/cli/commands/check/interactive.go index 02d600e07c..068c435b47 100644 --- a/cli/commands/check/interactive.go +++ b/cli/commands/check/interactive.go @@ -91,7 +91,7 @@ func (opts *checkOpts) withFlags(flags *pflag.FlagSet) { } } -func (opts *checkOpts) administerQuestionnaire(editing bool) error { +func (opts *checkOpts) administerQuestionnaire(editing bool, askOpts ...survey.AskOpt) error { var qs = []*survey.Question{} if !editing { @@ -269,7 +269,7 @@ func (opts *checkOpts) administerQuestionnaire(editing bool) error { }, }...) - return survey.Ask(qs, opts) + return survey.Ask(qs, opts, askOpts...) } func (opts *checkOpts) Copy(check *types.CheckConfig) { diff --git a/cli/commands/check/update.go b/cli/commands/check/update.go index b0101e42cd..4d4d6de599 100644 --- a/cli/commands/check/update.go +++ b/cli/commands/check/update.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) @@ -31,7 +32,10 @@ func UpdateCommand(cli *cli.SensuCli) *cobra.Command { // Administer questionnaire opts := newCheckOpts() opts.withCheck(check) - if err := opts.administerQuestionnaire(true); err != nil { + askOpts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if err := opts.administerQuestionnaire(true, askOpts...); err != nil { return err } diff --git a/cli/commands/check/update_test.go b/cli/commands/check/update_test.go index e1fdf40dbf..d7befd4a01 100644 --- a/cli/commands/check/update_test.go +++ b/cli/commands/check/update_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/sensu/sensu-go/types" @@ -35,29 +36,30 @@ func TestUpdateCommand(t *testing.T) { name, ) t.Run(testName, func(t *testing.T) { - check := types.FixtureCheckConfig("my-id") - cli := test.NewMockCLI() - - client := cli.Client.(*client.MockClient) - client.On( - "FetchCheck", - name, - ).Return(check, tc.fetchResponse) - - client.On( - "UpdateCheck", - mock.Anything, - ).Return(tc.updateResponse) - - cmd := UpdateCommand(cli) - out, err := test.RunCmd(cmd, tc.args) - if tc.expectError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - - assert.Regexp(t, tc.expectedOutput, out) + test.WithMockCLI(t, func(cli *cli.SensuCli) { + check := types.FixtureCheckConfig("my-id") + + client := cli.Client.(*client.MockClient) + client.On( + "FetchCheck", + name, + ).Return(check, tc.fetchResponse) + + client.On( + "UpdateCheck", + mock.Anything, + ).Return(tc.updateResponse) + + cmd := UpdateCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, tc.args, cli.OutFile) + if tc.expectError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + + assert.Regexp(t, tc.expectedOutput, out) + }) }) } } diff --git a/cli/commands/clusterrole/delete.go b/cli/commands/clusterrole/delete.go index cf84f86800..d114343466 100644 --- a/cli/commands/clusterrole/delete.go +++ b/cli/commands/clusterrole/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -23,7 +24,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { } name := args[0] if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "cluster-role"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "cluster-role", opts...); !confirmed { _, err := fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return err } diff --git a/cli/commands/entity/delete.go b/cli/commands/entity/delete.go index c7fe448483..be27dfbcbf 100644 --- a/cli/commands/entity/delete.go +++ b/cli/commands/entity/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -26,7 +27,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := cli.Config.Namespace() if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "entity"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "entity", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/entity/interactive.go b/cli/commands/entity/interactive.go index 175d1df020..dd2ce7f110 100644 --- a/cli/commands/entity/interactive.go +++ b/cli/commands/entity/interactive.go @@ -29,7 +29,7 @@ func (opts *entityOpts) withFlags(flags *pflag.FlagSet) { } } -func (opts *entityOpts) administerQuestionnaire(editing bool) error { +func (opts *entityOpts) administerQuestionnaire(editing bool, askOpts ...survey.AskOpt) error { var qs = []*survey.Question{} if !editing { @@ -73,7 +73,7 @@ func (opts *entityOpts) administerQuestionnaire(editing bool) error { }, }...) - return survey.Ask(qs, opts) + return survey.Ask(qs, opts, askOpts...) } func (opts *entityOpts) copy(entity *types.Entity) { diff --git a/cli/commands/entity/update.go b/cli/commands/entity/update.go index caa42b79f4..d5f482dd53 100644 --- a/cli/commands/entity/update.go +++ b/cli/commands/entity/update.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) @@ -31,7 +32,10 @@ func UpdateCommand(cli *cli.SensuCli) *cobra.Command { // Administer questionnaire opts := newEntityOpts() opts.withEntity(entity) - if err := opts.administerQuestionnaire(true); err != nil { + askOpts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if err := opts.administerQuestionnaire(true, askOpts...); err != nil { return err } diff --git a/cli/commands/entity/update_test.go b/cli/commands/entity/update_test.go index a8040d4dbd..45f58532b2 100644 --- a/cli/commands/entity/update_test.go +++ b/cli/commands/entity/update_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/sensu/sensu-go/types" @@ -35,29 +36,30 @@ func TestUpdateCommand(t *testing.T) { name, ) t.Run(testName, func(t *testing.T) { - check := types.FixtureEntity("foo") - cli := test.NewMockCLI() - - client := cli.Client.(*client.MockClient) - client.On( - "FetchEntity", - name, - ).Return(check, tc.fetchResponse) - - client.On( - "UpdateEntity", - mock.Anything, - ).Return(tc.updateResponse) - - cmd := UpdateCommand(cli) - out, err := test.RunCmd(cmd, tc.args) - if tc.expectError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - - assert.Regexp(t, tc.expectedOutput, out) + test.WithMockCLI(t, func(cli *cli.SensuCli) { + check := types.FixtureEntity("foo") + + client := cli.Client.(*client.MockClient) + client.On( + "FetchEntity", + name, + ).Return(check, tc.fetchResponse) + + client.On( + "UpdateEntity", + mock.Anything, + ).Return(tc.updateResponse) + + cmd := UpdateCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, tc.args, cli.OutFile) + if tc.expectError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + + assert.Regexp(t, tc.expectedOutput, out) + }) }) } } diff --git a/cli/commands/event/delete.go b/cli/commands/event/delete.go index 6f99b176f2..79ff85a541 100644 --- a/cli/commands/event/delete.go +++ b/cli/commands/event/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -27,7 +28,11 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := cli.Config.Namespace() if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(fmt.Sprintf("%s/%s", entity, check), "event"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + name := fmt.Sprintf("%s/%s", entity, check) + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "event", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/event/delete_test.go b/cli/commands/event/delete_test.go index 1a56828842..347399e87e 100644 --- a/cli/commands/event/delete_test.go +++ b/cli/commands/event/delete_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" @@ -62,12 +63,13 @@ func TestDeleteCommandRunEClosureWithErr(t *testing.T) { } func TestDeleteCommandRunEFailConfirm(t *testing.T) { - assert := assert.New(t) + test.WithMockCLI(t, func(cli *cli.SensuCli) { + assert := assert.New(t) - cli := test.NewMockCLI() - cmd := DeleteCommand(cli) - out, err := test.RunCmd(cmd, []string{"foo", "check_foo"}) + cmd := DeleteCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, []string{"foo", "check_foo"}, cli.OutFile) - assert.Contains(out, "Canceled") - assert.NoError(err) + assert.Contains(out, "Canceled") + assert.NoError(err) + }) } diff --git a/cli/commands/filter/delete.go b/cli/commands/filter/delete.go index 20e633193e..c79e43aba9 100644 --- a/cli/commands/filter/delete.go +++ b/cli/commands/filter/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -26,7 +27,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := cli.Config.Namespace() if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "filter"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "filter", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/filter/delete_test.go b/cli/commands/filter/delete_test.go index a0374c7f5a..5b8db7ea72 100644 --- a/cli/commands/filter/delete_test.go +++ b/cli/commands/filter/delete_test.go @@ -4,6 +4,7 @@ import ( "errors" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" @@ -67,12 +68,13 @@ func TestDeleteCommandRunEClosureWithServerErr(t *testing.T) { } func TestDeleteCommandRunEFailConfirm(t *testing.T) { - assert := assert.New(t) + test.WithMockCLI(t, func(cli *cli.SensuCli) { + assert := assert.New(t) - cli := test.NewMockCLI() - cmd := DeleteCommand(cli) - out, err := test.RunCmd(cmd, []string{"foo"}) + cmd := DeleteCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, []string{"foo"}, cli.OutFile) - assert.Contains(out, "Canceled") - assert.NoError(err) + assert.Contains(out, "Canceled") + assert.NoError(err) + }) } diff --git a/cli/commands/filter/interactive.go b/cli/commands/filter/interactive.go index 628e1d7aee..8c3c3d46c3 100644 --- a/cli/commands/filter/interactive.go +++ b/cli/commands/filter/interactive.go @@ -21,7 +21,7 @@ func newFilterOpts() *filterOpts { return &filterOpts{} } -func (opts *filterOpts) administerQuestionnaire(editing bool) error { +func (opts *filterOpts) administerQuestionnaire(editing bool, askOpts ...survey.AskOpt) error { var qs = []*survey.Question{} if !editing { @@ -72,7 +72,7 @@ func (opts *filterOpts) administerQuestionnaire(editing bool) error { }, }...) - return survey.Ask(qs, opts) + return survey.Ask(qs, opts, askOpts...) } func (opts *filterOpts) Copy(filter *types.EventFilter) { diff --git a/cli/commands/filter/update.go b/cli/commands/filter/update.go index 4ce3156b05..ec845aa4a0 100644 --- a/cli/commands/filter/update.go +++ b/cli/commands/filter/update.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) @@ -31,7 +32,10 @@ func UpdateCommand(cli *cli.SensuCli) *cobra.Command { // Administer questionnaire opts := newFilterOpts() opts.withFilter(filter) - if err := opts.administerQuestionnaire(true); err != nil { + askOpts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if err := opts.administerQuestionnaire(true, askOpts...); err != nil { return err } diff --git a/cli/commands/filter/update_test.go b/cli/commands/filter/update_test.go index 558953bbc8..e254fe13f5 100644 --- a/cli/commands/filter/update_test.go +++ b/cli/commands/filter/update_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/sensu/sensu-go/types" @@ -35,29 +36,30 @@ func TestUpdateCommand(t *testing.T) { name, ) t.Run(testName, func(t *testing.T) { - check := types.FixtureEventFilter("my-id") - cli := test.NewMockCLI() - - client := cli.Client.(*client.MockClient) - client.On( - "FetchFilter", - name, - ).Return(check, tc.fetchResponse) - - client.On( - "CreateFilter", - mock.Anything, - ).Return(tc.updateResponse) - - cmd := UpdateCommand(cli) - out, err := test.RunCmd(cmd, tc.args) - if tc.expectError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - - assert.Regexp(t, tc.expectedOutput, out) + test.WithMockCLI(t, func(cli *cli.SensuCli) { + check := types.FixtureEventFilter("my-id") + + client := cli.Client.(*client.MockClient) + client.On( + "FetchFilter", + name, + ).Return(check, tc.fetchResponse) + + client.On( + "CreateFilter", + mock.Anything, + ).Return(tc.updateResponse) + + cmd := UpdateCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, tc.args, cli.OutFile) + if tc.expectError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + + assert.Regexp(t, tc.expectedOutput, out) + }) }) } } diff --git a/cli/commands/handler/delete.go b/cli/commands/handler/delete.go index e850b61402..104d6b1d5a 100644 --- a/cli/commands/handler/delete.go +++ b/cli/commands/handler/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -26,7 +27,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := cli.Config.Namespace() if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "handler"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "handler", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/handler/delete_test.go b/cli/commands/handler/delete_test.go index ffe80b2f66..cfdcb3189b 100644 --- a/cli/commands/handler/delete_test.go +++ b/cli/commands/handler/delete_test.go @@ -4,6 +4,7 @@ import ( "errors" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" @@ -67,12 +68,13 @@ func TestDeleteCommandRunEClosureWithServerErr(t *testing.T) { } func TestDeleteCommandRunEFailConfirm(t *testing.T) { - assert := assert.New(t) + test.WithMockCLI(t, func(cli *cli.SensuCli) { + assert := assert.New(t) - cli := test.NewMockCLI() - cmd := DeleteCommand(cli) - out, err := test.RunCmd(cmd, []string{"meowmix"}) + cmd := DeleteCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, []string{"meowmix"}, cli.OutFile) - assert.Contains(out, "Canceled") - assert.NoError(err) + assert.Contains(out, "Canceled") + assert.NoError(err) + }) } diff --git a/cli/commands/handler/interactive.go b/cli/commands/handler/interactive.go index abefad6421..d9adeb5272 100644 --- a/cli/commands/handler/interactive.go +++ b/cli/commands/handler/interactive.go @@ -71,27 +71,26 @@ func (opts *handlerOpts) withFlags(flags *pflag.FlagSet) { } } -func (opts *handlerOpts) administerQuestionnaire(editing bool) error { - - if err := opts.queryForBaseParameters(editing); err != nil { +func (opts *handlerOpts) administerQuestionnaire(editing bool, askOpts ...survey.AskOpt) error { + if err := opts.queryForBaseParameters(editing, askOpts...); err != nil { return err } switch opts.Type { case types.HandlerPipeType: - return opts.queryForCommand() + return opts.queryForCommand(askOpts...) case types.HandlerTCPType: fallthrough case types.HandlerUDPType: - return opts.queryForSocket() + return opts.queryForSocket(askOpts...) case types.HandlerSetType: - return opts.queryForHandlers() + return opts.queryForHandlers(askOpts...) } return nil } -func (opts *handlerOpts) queryForBaseParameters(editing bool) error { +func (opts *handlerOpts) queryForBaseParameters(editing bool, askOpts ...survey.AskOpt) error { var qs []*survey.Question if !editing { @@ -164,10 +163,10 @@ func (opts *handlerOpts) queryForBaseParameters(editing bool) error { }, }...) - return survey.Ask(qs, opts) + return survey.Ask(qs, opts, askOpts...) } -func (opts *handlerOpts) queryForCommand() error { +func (opts *handlerOpts) queryForCommand(askOpts ...survey.AskOpt) error { var qs = []*survey.Question{ { Name: "command", @@ -179,10 +178,10 @@ func (opts *handlerOpts) queryForCommand() error { }, } - return survey.Ask(qs, opts) + return survey.Ask(qs, opts, askOpts...) } -func (opts *handlerOpts) queryForHandlers() error { +func (opts *handlerOpts) queryForHandlers(askOpts ...survey.AskOpt) error { var qs = []*survey.Question{ { Name: "handlers", @@ -195,10 +194,10 @@ func (opts *handlerOpts) queryForHandlers() error { }, } - return survey.Ask(qs, opts) + return survey.Ask(qs, opts, askOpts...) } -func (opts *handlerOpts) queryForSocket() error { +func (opts *handlerOpts) queryForSocket(askOpts ...survey.AskOpt) error { var qs = []*survey.Question{ { Name: "socketHost", @@ -218,7 +217,7 @@ func (opts *handlerOpts) queryForSocket() error { }, } - return survey.Ask(qs, opts) + return survey.Ask(qs, opts, askOpts...) } func (opts *handlerOpts) Copy(handler *types.Handler) { diff --git a/cli/commands/handler/update.go b/cli/commands/handler/update.go index eb5cbe9bf8..58a1581ac6 100644 --- a/cli/commands/handler/update.go +++ b/cli/commands/handler/update.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) @@ -31,7 +32,10 @@ func UpdateCommand(cli *cli.SensuCli) *cobra.Command { opts := newHandlerOpts() opts.withHandler(handler) - if err := opts.administerQuestionnaire(true); err != nil { + askOpts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if err := opts.administerQuestionnaire(true, askOpts...); err != nil { return err } diff --git a/cli/commands/handler/update_test.go b/cli/commands/handler/update_test.go index f53c102d67..3cebcd0666 100644 --- a/cli/commands/handler/update_test.go +++ b/cli/commands/handler/update_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/sensu/sensu-go/types" @@ -35,29 +36,30 @@ func TestUpdateCommand(t *testing.T) { name, ) t.Run(testName, func(t *testing.T) { - handler := types.FixtureHandler(name) - cli := test.NewMockCLI() - - client := cli.Client.(*client.MockClient) - client.On( - "FetchHandler", - name, - ).Return(handler, tc.fetchResponse) - - client.On( - "CreateHandler", - mock.Anything, - ).Return(tc.updateResponse) - - cmd := UpdateCommand(cli) - out, err := test.RunCmd(cmd, tc.args) - - assert.Regexp(t, tc.expectedOutput, out) - if tc.expectError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } + test.WithMockCLI(t, func(cli *cli.SensuCli) { + handler := types.FixtureHandler(name) + + client := cli.Client.(*client.MockClient) + client.On( + "FetchHandler", + name, + ).Return(handler, tc.fetchResponse) + + client.On( + "CreateHandler", + mock.Anything, + ).Return(tc.updateResponse) + + cmd := UpdateCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, tc.args, cli.OutFile) + + assert.Regexp(t, tc.expectedOutput, out) + if tc.expectError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + }) }) } } diff --git a/cli/commands/helpers/prompts.go b/cli/commands/helpers/prompts.go index 2ba16b3d1a..eff24dbcc2 100644 --- a/cli/commands/helpers/prompts.go +++ b/cli/commands/helpers/prompts.go @@ -8,10 +8,22 @@ import ( ) // ConfirmDelete confirm a deletion operation before it is completed. -func ConfirmDelete(name string) bool { +func ConfirmDelete(name string, opts ...survey.AskOpt) bool { confirm := &ConfirmDestructiveOp{ - Type: "resource", - Op: "delete", + Type: "resource", + Op: "delete", + AskOpts: opts, + } + ok, _ := confirm.Ask(name) + return ok +} + +// ConfirmDelete confirm a deletion operation before it is completed. +func ConfirmDeleteWithOpts(name string, opts ...survey.AskOpt) bool { + confirm := &ConfirmDestructiveOp{ + Type: "resource", + Op: "delete", + AskOpts: opts, } ok, _ := confirm.Ask(name) return ok @@ -19,9 +31,16 @@ func ConfirmDelete(name string) bool { // ConfirmDeleteResource confirm a deletion operation before it is completed. func ConfirmDeleteResource(name string, resourceType string) bool { + return ConfirmDeleteResourceWithOpts(name, resourceType, nil) +} + +// ConfirmDeleteResourceWithOpts confirm a deletion operation before it is +// completed. It accepts a list of survey.AskOpt for customizing behaviour. +func ConfirmDeleteResourceWithOpts(name string, resourceType string, opts ...survey.AskOpt) bool { confirm := &ConfirmDestructiveOp{ - Type: fmt.Sprintf("%s resource", resourceType), - Op: "delete", + Type: fmt.Sprintf("%s resource", resourceType), + Op: "delete", + AskOpts: opts, } ok, _ := confirm.Ask(name) return ok @@ -29,8 +48,9 @@ func ConfirmDeleteResource(name string, resourceType string) bool { // ConfirmDestructiveOp presents prompt for a destructive operation. type ConfirmDestructiveOp struct { - Type string - Op string + Type string + Op string + AskOpts []survey.AskOpt } // Ask presents prompt confirming a destructive operation. @@ -44,6 +64,7 @@ func (c *ConfirmDestructiveOp) Ask(name string) (bool, error) { confirm := &Confirm{ Message: question, Default: false, + AskOpts: c.AskOpts, } return confirm.Ask() } @@ -52,6 +73,7 @@ func (c *ConfirmDestructiveOp) Ask(name string) (bool, error) { type Confirm struct { Message string Default bool + AskOpts []survey.AskOpt } // Ask executes confirmation of operation @@ -62,8 +84,7 @@ func (c *Confirm) Ask() (bool, error) { } confirmation := false - err := survey.AskOne(prompt, &confirmation, nil) - if err != nil { + if err := survey.AskOne(prompt, &confirmation, c.AskOpts...); err != nil { return false, err } diff --git a/cli/commands/helpers/prompts_test.go b/cli/commands/helpers/prompts_test.go index 455be06c85..1a27ac2376 100644 --- a/cli/commands/helpers/prompts_test.go +++ b/cli/commands/helpers/prompts_test.go @@ -1,15 +1,47 @@ package helpers import ( + "io/ioutil" + "os" "testing" + "github.com/AlecAivazis/survey/v2" "github.com/stretchr/testify/assert" ) func TestDeletePrompt(t *testing.T) { assert := assert.New(t) + // Create temporary files for stdin, stdout & stderr to make it easier to + // interact with io. + stdin, err := ioutil.TempFile(os.TempDir(), "sensu-cli-") + if err != nil { + t.Fatal("Error creating stdin file: ", stdin.Name()) + } + defer func() { + _ = os.Remove(stdin.Name()) + }() + + stdout, err := ioutil.TempFile(os.TempDir(), "sensu-cli-") + if err != nil { + t.Fatal("Error creating stdout file: ", stdout.Name()) + } + defer func() { + _ = os.Remove(stdout.Name()) + }() + + stderr, err := ioutil.TempFile(os.TempDir(), "sensu-cli-") + if err != nil { + t.Fatal("Error creating stderr file: ", stderr.Name()) + } + defer func() { + _ = os.Remove(stderr.Name()) + }() + // TODO: How do we test interactive input - confirmed := ConfirmDelete("test") + opts := []survey.AskOpt{ + survey.WithStdio(stdin, stdout, stderr), + } + confirmed := ConfirmDeleteWithOpts("test", opts...) assert.False(confirmed) } diff --git a/cli/commands/hook/delete.go b/cli/commands/hook/delete.go index 05864b0955..ec4c720443 100644 --- a/cli/commands/hook/delete.go +++ b/cli/commands/hook/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -26,7 +27,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := cli.Config.Namespace() if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "hook"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "hook", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/hook/interactive.go b/cli/commands/hook/interactive.go index 1f1d811a93..0f051e39e4 100644 --- a/cli/commands/hook/interactive.go +++ b/cli/commands/hook/interactive.go @@ -53,7 +53,7 @@ func (opts *hookOpts) withFlags(flags *pflag.FlagSet) { } } -func (opts *hookOpts) administerQuestionnaire(editing bool) error { +func (opts *hookOpts) administerQuestionnaire(editing bool, askOpts ...survey.AskOpt) error { var qs = []*survey.Question{} if !editing { @@ -110,7 +110,7 @@ func (opts *hookOpts) administerQuestionnaire(editing bool) error { }, }...) - return survey.Ask(qs, opts) + return survey.Ask(qs, opts, askOpts...) } func (opts *hookOpts) Copy(hook *types.HookConfig) { diff --git a/cli/commands/hook/update.go b/cli/commands/hook/update.go index 475a4b0952..ceb4fd8e26 100644 --- a/cli/commands/hook/update.go +++ b/cli/commands/hook/update.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) @@ -31,7 +32,10 @@ func UpdateCommand(cli *cli.SensuCli) *cobra.Command { // Administer questionnaire opts := newHookOpts() opts.withHook(hook) - if err = opts.administerQuestionnaire(true); err != nil { + askOpts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if err = opts.administerQuestionnaire(true, askOpts...); err != nil { return err } diff --git a/cli/commands/hook/update_test.go b/cli/commands/hook/update_test.go index 61c2757f35..2fd494b1d5 100644 --- a/cli/commands/hook/update_test.go +++ b/cli/commands/hook/update_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/sensu/sensu-go/types" @@ -35,29 +36,30 @@ func TestUpdateCommand(t *testing.T) { name, ) t.Run(testName, func(t *testing.T) { - hook := types.FixtureHookConfig("my-id") - cli := test.NewMockCLI() - - client := cli.Client.(*client.MockClient) - client.On( - "FetchHook", - name, - ).Return(hook, tc.fetchResponse) - - client.On( - "UpdateHook", - mock.Anything, - ).Return(tc.updateResponse) - - cmd := UpdateCommand(cli) - out, err := test.RunCmd(cmd, tc.args) - if tc.expectError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - - assert.Regexp(t, tc.expectedOutput, out) + test.WithMockCLI(t, func(cli *cli.SensuCli) { + hook := types.FixtureHookConfig("my-id") + + client := cli.Client.(*client.MockClient) + client.On( + "FetchHook", + name, + ).Return(hook, tc.fetchResponse) + + client.On( + "UpdateHook", + mock.Anything, + ).Return(tc.updateResponse) + + cmd := UpdateCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, tc.args, cli.OutFile) + if tc.expectError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + + assert.Regexp(t, tc.expectedOutput, out) + }) }) } } diff --git a/cli/commands/mutator/delete.go b/cli/commands/mutator/delete.go index 982c10d18f..a18cc71ae8 100644 --- a/cli/commands/mutator/delete.go +++ b/cli/commands/mutator/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -26,7 +27,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := cli.Config.Namespace() if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "mutator"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "mutator", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/mutator/interactive.go b/cli/commands/mutator/interactive.go index 4dd3bed812..0b2fdf353c 100644 --- a/cli/commands/mutator/interactive.go +++ b/cli/commands/mutator/interactive.go @@ -50,7 +50,7 @@ func (opts *mutatorOpts) withFlags(flags *pflag.FlagSet) { } } -func (opts *mutatorOpts) administerQuestionnaire(editing bool) error { +func (opts *mutatorOpts) administerQuestionnaire(editing bool, askOpts ...survey.AskOpt) error { var qs []*survey.Question if !editing { qs = append(qs, []*survey.Question{ @@ -117,7 +117,7 @@ func (opts *mutatorOpts) administerQuestionnaire(editing bool) error { }, }...) - return survey.Ask(qs, opts) + return survey.Ask(qs, opts, askOpts...) } func (opts *mutatorOpts) Copy(mutator *types.Mutator) { diff --git a/cli/commands/mutator/update.go b/cli/commands/mutator/update.go index c5ad1e2b2d..b942ecb1f1 100644 --- a/cli/commands/mutator/update.go +++ b/cli/commands/mutator/update.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) @@ -31,7 +32,10 @@ func UpdateCommand(cli *cli.SensuCli) *cobra.Command { // Administer questionnaire opts := newMutatorOpts() opts.withMutator(mutator) - if err := opts.administerQuestionnaire(true); err != nil { + askOpts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if err := opts.administerQuestionnaire(true, askOpts...); err != nil { return err } diff --git a/cli/commands/mutator/update_test.go b/cli/commands/mutator/update_test.go index 4490d93a9a..43ec628d0a 100644 --- a/cli/commands/mutator/update_test.go +++ b/cli/commands/mutator/update_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/sensu/sensu-go/types" @@ -35,29 +36,30 @@ func TestUpdateCommand(t *testing.T) { name, ) t.Run(testName, func(t *testing.T) { - mutator := types.FixtureMutator("my-id") - cli := test.NewMockCLI() - - client := cli.Client.(*client.MockClient) - client.On( - "FetchMutator", - name, - ).Return(mutator, tc.fetchResponse) - - client.On( - "CreateMutator", - mock.Anything, - ).Return(tc.updateResponse) - - cmd := UpdateCommand(cli) - out, err := test.RunCmd(cmd, tc.args) - if tc.expectError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - - assert.Regexp(t, tc.expectedOutput, out) + test.WithMockCLI(t, func(cli *cli.SensuCli) { + mutator := types.FixtureMutator("my-id") + + client := cli.Client.(*client.MockClient) + client.On( + "FetchMutator", + name, + ).Return(mutator, tc.fetchResponse) + + client.On( + "CreateMutator", + mock.Anything, + ).Return(tc.updateResponse) + + cmd := UpdateCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, tc.args, cli.OutFile) + if tc.expectError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + + assert.Regexp(t, tc.expectedOutput, out) + }) }) } } diff --git a/cli/commands/namespace/delete.go b/cli/commands/namespace/delete.go index 4b6efc2e28..0953785eb7 100644 --- a/cli/commands/namespace/delete.go +++ b/cli/commands/namespace/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -25,7 +26,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := args[0] if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(namespace, "namespace"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(namespace, "namespace", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/pipeline/delete.go b/cli/commands/pipeline/delete.go index a3df3fc8d9..01effed325 100644 --- a/cli/commands/pipeline/delete.go +++ b/cli/commands/pipeline/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -26,7 +27,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := cli.Config.Namespace() if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(pipeline, "pipeline"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(pipeline, "pipeline", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/role/delete.go b/cli/commands/role/delete.go index e788247e3f..b7e5165493 100644 --- a/cli/commands/role/delete.go +++ b/cli/commands/role/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -25,7 +26,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := cli.Config.Namespace() if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "role"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "role", opts...); !confirmed { _, err := fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return err } diff --git a/cli/commands/silenced/delete.go b/cli/commands/silenced/delete.go index a442dea7fc..1821a3c6d9 100644 --- a/cli/commands/silenced/delete.go +++ b/cli/commands/silenced/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -28,7 +29,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { namespace := cli.Config.Namespace() if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - if confirmed := helpers.ConfirmDeleteResource(name, "silence"); !confirmed { + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if confirmed := helpers.ConfirmDeleteResourceWithOpts(name, "silence", opts...); !confirmed { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil } diff --git a/cli/commands/silenced/getName.go b/cli/commands/silenced/get_name.go similarity index 100% rename from cli/commands/silenced/getName.go rename to cli/commands/silenced/get_name.go diff --git a/cli/commands/silenced/interactive.go b/cli/commands/silenced/interactive.go index 07f8af991e..da1dd23117 100644 --- a/cli/commands/silenced/interactive.go +++ b/cli/commands/silenced/interactive.go @@ -64,7 +64,7 @@ func (o *silencedOpts) withFlags(flags *pflag.FlagSet) { } } -func (o *silencedOpts) administerQuestionnaire(editing bool) error { +func (o *silencedOpts) administerQuestionnaire(editing bool, askOpts ...survey.AskOpt) error { var qs []*survey.Question if !editing { @@ -134,7 +134,7 @@ func (o *silencedOpts) administerQuestionnaire(editing bool) error { }, }}...) - if err := survey.Ask(qs, o); err != nil && err != io.EOF { + if err := survey.Ask(qs, o, askOpts...); err != nil && err != io.EOF { return err } return nil @@ -145,7 +145,7 @@ type silencedName struct { Check string } -func askName(help string) (string, error) { +func askName(help string, askOpts ...survey.AskOpt) (string, error) { questions := []*survey.Question{ { Name: "Subscription", @@ -164,7 +164,7 @@ func askName(help string) (string, error) { } var name silencedName - if err := survey.Ask(questions, &name); err != nil { + if err := survey.Ask(questions, &name, askOpts...); err != nil { return "", err } return types.SilencedName(name.Subscription, name.Check) diff --git a/cli/commands/silenced/update.go b/cli/commands/silenced/update.go index f470738309..f25c08b76d 100644 --- a/cli/commands/silenced/update.go +++ b/cli/commands/silenced/update.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) @@ -31,7 +32,10 @@ func UpdateCommand(cli *cli.SensuCli) *cobra.Command { opts := toOpts(silenced) - if err := opts.administerQuestionnaire(true); err != nil { + askOpts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + if err := opts.administerQuestionnaire(true, askOpts...); err != nil { return err } diff --git a/cli/commands/silenced/update_test.go b/cli/commands/silenced/update_test.go index 28e591023f..7ec39ff65d 100644 --- a/cli/commands/silenced/update_test.go +++ b/cli/commands/silenced/update_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/sensu/sensu-go/types" @@ -36,28 +37,28 @@ func TestUpdateCommand(t *testing.T) { ) t.Run(testName, func(t *testing.T) { silenced := types.FixtureSilenced("foo:bar") - cli := test.NewMockCLI() - - client := cli.Client.(*client.MockClient) - client.On( - "FetchSilenced", - name, - ).Return(silenced, tc.fetchResponse) - - client.On( - "UpdateSilenced", - mock.Anything, - ).Return(tc.updateResponse) - - cmd := UpdateCommand(cli) - out, err := test.RunCmd(cmd, tc.args) - if tc.expectError { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - - assert.Regexp(t, tc.expectedOutput, out) + test.WithMockCLI(t, func(cli *cli.SensuCli) { + client := cli.Client.(*client.MockClient) + client.On( + "FetchSilenced", + name, + ).Return(silenced, tc.fetchResponse) + + client.On( + "UpdateSilenced", + mock.Anything, + ).Return(tc.updateResponse) + + cmd := UpdateCommand(cli) + out, err := test.RunCmdWithOutFile(cmd, tc.args, cli.OutFile) + if tc.expectError { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + + assert.Regexp(t, tc.expectedOutput, out) + }) }) } } diff --git a/cli/commands/testing/cli.go b/cli/commands/testing/cli.go index d84826617c..5728e47637 100644 --- a/cli/commands/testing/cli.go +++ b/cli/commands/testing/cli.go @@ -4,6 +4,7 @@ import ( "io/ioutil" "log" "os" + "testing" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" @@ -21,6 +22,50 @@ func NewCLI() *cli.SensuCli { return cli } +func WithMockCLI(tb testing.TB, fn func(cli *cli.SensuCli)) { + tb.Helper() + + config := &clientmock.MockConfig{} + client := &clientmock.MockClient{} + + // Set defaults ... + config.On("Namespace").Return("default") + + // Create temporary files for stdin, stdout & stderr to make it easier to + // interact with io. + stdin, err := ioutil.TempFile(os.TempDir(), "sensu-cli-") + if err != nil { + tb.Fatal("Error creating stdin file: ", stdin.Name()) + } + defer func() { + _ = os.Remove(stdin.Name()) + }() + + stdout, err := ioutil.TempFile(os.TempDir(), "sensu-cli-") + if err != nil { + tb.Fatal("Error creating stdout file: ", stdout.Name()) + } + defer func() { + _ = os.Remove(stdout.Name()) + }() + + stderr, err := ioutil.TempFile(os.TempDir(), "sensu-cli-") + if err != nil { + tb.Fatal("Error creating stderr file: ", stderr.Name()) + } + defer func() { + _ = os.Remove(stderr.Name()) + }() + + fn(&cli.SensuCli{ + Client: client, + Config: config, + InFile: stdin, + OutFile: stdout, + ErrFile: stderr, + }) +} + // NewMockCLI return SensuCLI instance w/ mocked values func NewMockCLI() *cli.SensuCli { config := &clientmock.MockConfig{} @@ -29,10 +74,38 @@ func NewMockCLI() *cli.SensuCli { // Set defaults ... config.On("Namespace").Return("default") + // Create temporary files for stdin, stdout & stderr to make it easier to + // interact with io. + stdin, err := ioutil.TempFile(os.TempDir(), "sensu-cli-") + if err != nil { + log.Panic("Error creating stdin file: ", stdin.Name()) + } + defer func() { + _ = os.Remove(stdin.Name()) + }() + + stdout, err := ioutil.TempFile(os.TempDir(), "sensu-cli-") + if err != nil { + log.Panic("Error creating stdout file: ", stdout.Name()) + } + defer func() { + _ = os.Remove(stdout.Name()) + }() + + stderr, err := ioutil.TempFile(os.TempDir(), "sensu-cli-") + if err != nil { + log.Panic("Error creating stderr file: ", stderr.Name()) + } + defer func() { + _ = os.Remove(stderr.Name()) + }() + return &cli.SensuCli{ - Client: client, - Config: config, - InFile: os.Stdin, + Client: client, + Config: config, + InFile: stdin, + OutFile: stdout, + ErrFile: stderr, } } @@ -52,17 +125,21 @@ func SimpleSensuCLI(apiClient client.APIClient) *cli.SensuCli { func RunCmd(cmd *cobra.Command, args []string) (string, error) { var err error - // So that we can capture output we reassign cmd.output tmpFile, err := ioutil.TempFile(os.TempDir(), "sensu-cli-") if err != nil { - log.Panic("Error creating tmpFile: ", tmpFile.Name()) + log.Panic("Error creating tmp file: ", tmpFile.Name()) } - defer func() { _ = os.Remove(tmpFile.Name()) }() - cmd.SetOutput(tmpFile) + return RunCmdWithOutFile(cmd, args, tmpFile) +} + +func RunCmdWithOutFile(cmd *cobra.Command, args []string, outFile *os.File) (string, error) { + var err error + + cmd.SetOutput(outFile) // Run given command if cmd.Run != nil { @@ -72,10 +149,10 @@ func RunCmd(cmd *cobra.Command, args []string) (string, error) { } // Close the file so that we can read from it - _ = tmpFile.Close() + _ = outFile.Close() // Store the contents of the reader as a string - bytes, _ := ioutil.ReadFile(tmpFile.Name()) + bytes, _ := ioutil.ReadFile(outFile.Name()) return string(bytes), err } diff --git a/cli/commands/user/delete.go b/cli/commands/user/delete.go index d44100bb4b..f2bfc0da8e 100644 --- a/cli/commands/user/delete.go +++ b/cli/commands/user/delete.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/AlecAivazis/survey/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" @@ -24,7 +25,10 @@ func DeleteCommand(cli *cli.SensuCli) *cobra.Command { username := args[0] if skipConfirm, _ := cmd.Flags().GetBool("skip-confirm"); !skipConfirm { - dialog := helpers.ConfirmDestructiveOp{Op: "disable", Type: "user"} + opts := []survey.AskOpt{ + survey.WithStdio(cli.InFile, cli.OutFile, cli.ErrFile), + } + dialog := helpers.ConfirmDestructiveOp{Op: "disable", Type: "user", AskOpts: opts} if ok, err := dialog.Ask(username); !ok || err != nil { fmt.Fprintln(cmd.OutOrStdout(), "Canceled") return nil From db9a7b28647a6e6e98b4204b85f8eda258dfeb77 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Mon, 1 Aug 2022 12:50:57 -0700 Subject: [PATCH 048/173] Route Keepalive Events to Eventd with High Priority (#4816) * Route Keepalive Events to Eventd with High Priority Signed-off-by: Christian Kruse * update changelog Signed-off-by: Christian Kruse * Treat agent events for checks named keepalive like regular events Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 14 ++++++++++---- backend/agentd/session.go | 3 --- backend/eventd/eventd.go | 14 +++++++++++++- backend/eventd/eventd_test.go | 1 + backend/keepalived/integration_test.go | 2 +- backend/keepalived/keepalived.go | 4 ++-- 6 files changed, 27 insertions(+), 11 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 50c9d8f365..eedcb7f504 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,18 +7,24 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +### Changed +- Eventd now prioritizes keepalive events over other events in order to +mitigate the potential of keepalive event creation storms and mass agent +disconnects. + ### Added - GlobalResource interface in core/v3 allows core/v3 resources to be marked as global resources. -## [6.7.4] - 2022-07-12 - -### Changed -- Upgraded CI Go version to 1.17.12 ### Fixed - Fixed a bug where sensu-backend could crash if the BackendIDGetter encounters etcd client unavailability. +## [6.7.4] - 2022-07-12 + +### Changed +- Upgraded CI Go version to 1.17.12 + ## [6.7.3] - 2022-07-07 ### Changed diff --git a/backend/agentd/session.go b/backend/agentd/session.go index 595651675c..34c270a024 100644 --- a/backend/agentd/session.go +++ b/backend/agentd/session.go @@ -650,9 +650,6 @@ func (s *Session) handleEvent(_ context.Context, payload []byte) error { } else { eventBytesSummary.WithLabelValues(metrics.EventTypeLabelCheck).Observe(float64(len(payload))) } - if event.Check.Name == corev2.KeepaliveCheckName { - return s.bus.Publish(messaging.TopicKeepaliveRaw, event) - } } else if event.HasMetrics() { eventBytesSummary.WithLabelValues(metrics.EventTypeLabelMetrics).Observe(float64(len(payload))) } diff --git a/backend/eventd/eventd.go b/backend/eventd/eventd.go index d3b321eb9c..dd82230b45 100644 --- a/backend/eventd/eventd.go +++ b/backend/eventd/eventd.go @@ -207,6 +207,7 @@ type Eventd struct { eventChan chan interface{} keepaliveChan chan interface{} subscription messaging.Subscription + keepaliveSub messaging.Subscription errChan chan error mu *sync.Mutex shutdownChan chan struct{} @@ -344,6 +345,13 @@ func (e *Eventd) Start() error { return err } + subscriber := messaging.ChanSubscriber(e.keepaliveChan) + kSub, err := e.bus.Subscribe(messaging.TopicKeepaliveRaw, "eventd", subscriber) + e.keepaliveSub = kSub + if err != nil { + return err + } + if logger := e.startFileLogger(); logger != nil { e.Logger = logger } @@ -812,10 +820,14 @@ func (e *Eventd) createFailedCheckEvent(ctx context.Context, event *corev2.Event func (e *Eventd) Stop() error { logger.Info("shutting down eventd") if err := e.subscription.Cancel(); err != nil { - logger.WithError(err).Error("unable to unsubscribe from message bus") + logger.WithError(err).Error("unable to unsubscribe from event message bus") + } + if err := e.keepaliveSub.Cancel(); err != nil { + logger.WithError(err).Error("unable to unsubscribe from keepalive message bus") } e.cancel() close(e.eventChan) + close(e.keepaliveChan) close(e.shutdownChan) e.wg.Wait() if e.Logger != nil { diff --git a/backend/eventd/eventd_test.go b/backend/eventd/eventd_test.go index d366b45e8e..8795d45f5c 100644 --- a/backend/eventd/eventd_test.go +++ b/backend/eventd/eventd_test.go @@ -61,6 +61,7 @@ func newEventd(store storev2.Interface, eventStore store.Store, bus messaging.Me errChan: make(chan error, 1), shutdownChan: make(chan struct{}, 1), eventChan: make(chan interface{}, 100), + keepaliveChan: make(chan interface{}, 100), wg: &sync.WaitGroup{}, mu: &sync.Mutex{}, Logger: NoopLogger{}, diff --git a/backend/keepalived/integration_test.go b/backend/keepalived/integration_test.go index 4f31d2cd2c..a3e9e6492f 100644 --- a/backend/keepalived/integration_test.go +++ b/backend/keepalived/integration_test.go @@ -38,7 +38,7 @@ func TestKeepaliveMonitor(t *testing.T) { tsub := testSubscriber{ ch: eventChan, } - subscription, err := bus.Subscribe(messaging.TopicEventRaw, "testSubscriber", tsub) + subscription, err := bus.Subscribe(messaging.TopicKeepaliveRaw, "testSubscriber", tsub) if err != nil { assert.FailNow(t, "failed to subscribe to message bus topic event raw") } diff --git a/backend/keepalived/keepalived.go b/backend/keepalived/keepalived.go index e0c7089f7f..9a72484062 100644 --- a/backend/keepalived/keepalived.go +++ b/backend/keepalived/keepalived.go @@ -634,7 +634,7 @@ func (k *Keepalived) dead(key string, prev liveness.State, leader bool) bool { } event.Check.Output = fmt.Sprintf("No keepalive sent from %s for %v seconds (>= %v)", event.Entity.Name, timeSinceLastSeen, timeout) - if err := k.bus.Publish(messaging.TopicEventRaw, event); err != nil { + if err := k.bus.Publish(messaging.TopicKeepaliveRaw, event); err != nil { lager.WithError(err).Error("error publishing event") return false } @@ -737,5 +737,5 @@ func (k *Keepalived) handleUpdate(e *corev2.Event) error { } } - return k.bus.Publish(messaging.TopicEventRaw, event) + return k.bus.Publish(messaging.TopicKeepaliveRaw, event) } From dc6db5d79cd4d2c4112805eadf73ff7370d89925 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 9 Aug 2022 16:06:19 -0700 Subject: [PATCH 049/173] Adds API Serve Wait Time Backend Configuration (#4831) * Adds backend option for api-serve-wait-time The api-serve-wait-time setting allows the backend to start up with its non-status (health, metrics) endpoints refusing service with HTTP 503 Temporarily Unavailable until the wait time has expired. Signed-off-by: Christian Kruse Expose ready middleware on apid for use on enterprise routes Signed-off-by: Christian Kruse * Add readiness endpoint Signed-off-by: Christian Kruse * update changelog Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 4 ++ backend/apid/apid.go | 53 +++++++++++++++++++++++- backend/apid/middlewares/awaitstartup.go | 41 ++++++++++++++++++ backend/apid/routers/ready.go | 20 +++++++++ backend/backend.go | 1 + backend/cmd/start.go | 3 ++ backend/config.go | 1 + 7 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 backend/apid/middlewares/awaitstartup.go create mode 100644 backend/apid/routers/ready.go diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index eedcb7f504..0e2bea231f 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -15,6 +15,10 @@ disconnects. ### Added - GlobalResource interface in core/v3 allows core/v3 resources to be marked as global resources. +- Added `--api-serve-wait-time` backend flag to delay serving API requests +for a period of time after startup. +- Added `/ready` endpoint to the sensu-go API. Returns 200 when the API is ready +to serve traffic. ### Fixed - Fixed a bug where sensu-backend could crash if the BackendIDGetter diff --git a/backend/apid/apid.go b/backend/apid/apid.go index 475b2cad82..f80bb59cf8 100644 --- a/backend/apid/apid.go +++ b/backend/apid/apid.go @@ -27,6 +27,10 @@ import ( "github.com/sensu/sensu-go/types" ) +const apidStartupErrorMsg = `API unavailable during startup. +See api-serve-wait-time settings. +` + // APId is the backend HTTP API. type APId struct { Authenticator *authentication.Authenticator @@ -35,6 +39,7 @@ type APId struct { EntityLimitedCoreSubrouter *mux.Router GraphQLSubrouter *mux.Router RequestLimit int64 + ReadyMiddleware middlewares.HTTPMiddleware stopping chan struct{} running *atomic.Value @@ -49,6 +54,9 @@ type APId struct { cluster clientv3.Cluster etcdClientTLSConfig *tls.Config clusterVersion string + + serveWaitTime time.Duration + ready func() } // Option is a functional option. @@ -59,6 +67,7 @@ type Config struct { ListenAddress string RequestLimit int64 WriteTimeout time.Duration + ServeWaitTime time.Duration URL string Bus messaging.MessageBus Store store.Store @@ -92,6 +101,7 @@ func New(c Config, opts ...Option) (*APId, error) { Authenticator: c.Authenticator, clusterVersion: c.ClusterVersion, RequestLimit: c.RequestLimit, + serveWaitTime: c.ServeWaitTime, } // prepare TLS config @@ -107,9 +117,23 @@ func New(c Config, opts ...Option) (*APId, error) { router := NewRouter() _ = PublicSubrouter(router, c) a.GraphQLSubrouter = GraphQLSubrouter(router, c) - _ = AuthenticationSubrouter(router, c) + authSubrouter := AuthenticationSubrouter(router, c) a.CoreSubrouter = CoreSubrouter(router, c) a.EntityLimitedCoreSubrouter = EntityLimitedCoreSubrouter(router, c) + readySubrouter := ReadySubrouter(router, c) + + awaitMiddleware := &middlewares.AwaitStartupMiddleware{ + RetryAfterSeconds: int(c.ServeWaitTime / time.Second), + ResponseText: apidStartupErrorMsg, + } + a.ReadyMiddleware = awaitMiddleware + a.ready = awaitMiddleware.Ready + + a.GraphQLSubrouter.Use(a.ReadyMiddleware.Then) + authSubrouter.Use(a.ReadyMiddleware.Then) + a.CoreSubrouter.Use(a.ReadyMiddleware.Then) + a.EntityLimitedCoreSubrouter.Use(a.ReadyMiddleware.Then) + readySubrouter.Use(a.ReadyMiddleware.Then) a.HTTPServer = &http.Server{ Addr: c.ListenAddress, @@ -271,6 +295,18 @@ func PublicSubrouter(router *mux.Router, cfg Config) *mux.Router { return subrouter } +func ReadySubrouter(router *mux.Router, cfg Config) *mux.Router { + subrouter := NewSubrouter( + router.NewRoute(), + middlewares.SimpleLogger{}, + middlewares.LimitRequest{Limit: cfg.RequestLimit}, + ) + mountRouters(subrouter, + &routers.ReadyRouter{}, + ) + return subrouter +} + func notFoundHandler(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusNotFound) resp := map[string]interface{}{ @@ -281,6 +317,21 @@ func notFoundHandler(w http.ResponseWriter, req *http.Request) { // Start APId. func (a *APId) Start() error { + + if a.serveWaitTime <= 0 { + a.ready() + } else { + logger.Warnf("starting apid as temporarily unavailable for: %s", a.serveWaitTime) + go func() { + select { + case <-time.After(a.serveWaitTime): + a.ready() + logger.Warn("apid is now available") + case <-a.stopping: + } + }() + } + logger.Warn("starting apid on address: ", a.HTTPServer.Addr) ln, err := net.Listen("tcp", a.HTTPServer.Addr) if err != nil { diff --git a/backend/apid/middlewares/awaitstartup.go b/backend/apid/middlewares/awaitstartup.go new file mode 100644 index 0000000000..20e686a1bf --- /dev/null +++ b/backend/apid/middlewares/awaitstartup.go @@ -0,0 +1,41 @@ +package middlewares + +import ( + "fmt" + "net/http" + "sync" +) + +type AwaitStartupMiddleware struct { + RetryAfterSeconds int + ResponseText string + isReady bool + mu sync.RWMutex +} + +func (m *AwaitStartupMiddleware) Ready() { + m.mu.Lock() + m.isReady = true + m.mu.Unlock() +} + +func (m *AwaitStartupMiddleware) Then(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + m.mu.RLock() + ready := m.isReady + m.mu.RUnlock() + if !ready { + logger.Info("apid temporarily unavailable during startup") + if m.RetryAfterSeconds > 0 { + w.Header().Set("Retry-After", fmt.Sprint(m.RetryAfterSeconds)) + } + text := http.StatusText(http.StatusServiceUnavailable) + if m.ResponseText != "" { + text = m.ResponseText + } + http.Error(w, text, http.StatusServiceUnavailable) + return + } + next.ServeHTTP(w, r) + }) +} diff --git a/backend/apid/routers/ready.go b/backend/apid/routers/ready.go new file mode 100644 index 0000000000..c3a7aaf43b --- /dev/null +++ b/backend/apid/routers/ready.go @@ -0,0 +1,20 @@ +package routers + +import ( + "fmt" + "net/http" + + "github.com/gorilla/mux" +) + +type ReadyRouter struct{} + +func (r *ReadyRouter) Mount(parent *mux.Router) { + parent.HandleFunc("/ready", r.ready).Methods(http.MethodGet) +} + +func (r *ReadyRouter) ready(w http.ResponseWriter, req *http.Request) { + w.Header().Set("Content-Type", "text/plain; charset=utf-8") + w.WriteHeader(http.StatusOK) + fmt.Fprintln(w, "ready") +} diff --git a/backend/backend.go b/backend/backend.go index fd74c922ba..83507842bc 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -603,6 +603,7 @@ func Initialize(ctx context.Context, config *Config) (*Backend, error) { ListenAddress: config.APIListenAddress, RequestLimit: config.APIRequestLimit, WriteTimeout: config.APIWriteTimeout, + ServeWaitTime: config.APIServeWaitTime, URL: config.APIURL, Bus: bus, Store: b.Store, diff --git a/backend/cmd/start.go b/backend/cmd/start.go index 2533f454a6..b7c883b022 100644 --- a/backend/cmd/start.go +++ b/backend/cmd/start.go @@ -50,6 +50,7 @@ const ( flagAPIRequestLimit = "api-request-limit" flagAPIURL = "api-url" flagAPIWriteTimeout = "api-write-timeout" + flagAPIServeWaitTime = "api-serve-wait-time" flagAssetsRateLimit = "assets-rate-limit" flagAssetsBurstLimit = "assets-burst-limit" flagDashboardHost = "dashboard-host" @@ -227,6 +228,7 @@ func StartCommand(initialize InitializeFunc) *cobra.Command { APIRequestLimit: viper.GetInt64(flagAPIRequestLimit), APIURL: viper.GetString(flagAPIURL), APIWriteTimeout: viper.GetDuration(flagAPIWriteTimeout), + APIServeWaitTime: viper.GetDuration(flagAPIServeWaitTime), AssetsRateLimit: rate.Limit(viper.GetFloat64(flagAssetsRateLimit)), AssetsBurstLimit: viper.GetInt(flagAssetsBurstLimit), DashboardHost: viper.GetString(flagDashboardHost), @@ -528,6 +530,7 @@ func flagSet(server bool) *pflag.FlagSet { flagSet.Int64(flagAPIRequestLimit, viper.GetInt64(flagAPIRequestLimit), "maximum API request body size, in bytes") flagSet.String(flagAPIURL, viper.GetString(flagAPIURL), "url of the api to connect to") flagSet.Duration(flagAPIWriteTimeout, viper.GetDuration(flagAPIWriteTimeout), "maximum duration before timing out writes of responses") + flagSet.Duration(flagAPIServeWaitTime, viper.GetDuration(flagAPIServeWaitTime), "wait time before serving API requests on startup") flagSet.Float64(flagAssetsRateLimit, viper.GetFloat64(flagAssetsRateLimit), "maximum number of assets fetched per second") flagSet.Int(flagAssetsBurstLimit, viper.GetInt(flagAssetsBurstLimit), "asset fetch burst limit") flagSet.String(flagDashboardHost, viper.GetString(flagDashboardHost), "dashboard listener host") diff --git a/backend/config.go b/backend/config.go index cbcd74e196..4a789c1540 100644 --- a/backend/config.go +++ b/backend/config.go @@ -61,6 +61,7 @@ type Config struct { APIRequestLimit int64 APIURL string APIWriteTimeout time.Duration + APIServeWaitTime time.Duration // AssetsRateLimit is the maximum number of assets per second that will be fetched. AssetsRateLimit rate.Limit From afb1ce7a27e9759acc2266a9fd3cd3993d5cd8cc Mon Sep 17 00:00:00 2001 From: James Phillips Date: Wed, 10 Aug 2022 10:28:03 -0700 Subject: [PATCH 050/173] Update graphql-go package to address issue (#4836) * Implements fix from: https://github.com/graphql-go/graphql/pull/642 * I couldn't use the `replace` directive without a version tag so I've used my own fork. --- Signed-off-by: James Phillips --- go.mod | 1 + go.sum | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 3c870e170e..b6f95e858a 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ replace ( github.com/sensu/sensu-go/api/core/v3 => ./api/core/v3 github.com/sensu/sensu-go/backend/store/v2 => ./backend/store/v2 github.com/sensu/sensu-go/types => ./types + github.com/graphql-go/graphql => github.com/jamesdphillips/graphql v0.8.2 ) require ( diff --git a/go.sum b/go.sum index 775e06a8dc..ee20ce3ebd 100644 --- a/go.sum +++ b/go.sum @@ -194,8 +194,6 @@ github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0U github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c h1:94S+uoVVMpQAEOrqGjCDyUdML4dJDkh6aC4MYmXECg4= github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= -github.com/graphql-go/graphql v0.7.10-0.20200426202700-116f19d099aa h1:4anOZ2o/OTkxszIWihRKw3GvHEtGvcxBpPReF/WbXJQ= -github.com/graphql-go/graphql v0.7.10-0.20200426202700-116f19d099aa/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= @@ -242,6 +240,8 @@ github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= github.com/ipfs/go-log/v2 v2.0.5 h1:fL4YI+1g5V/b1Yxr1qAiXTMg1H8z9vx/VmJxBuQMHvU= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= +github.com/jamesdphillips/graphql v0.8.2 h1:/wM4I7FF9/X3cBqKv8PjfjXSx2FVwxmhr2y9l2JL9rc= +github.com/jamesdphillips/graphql v0.8.2/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= github.com/jbenet/go-reuseport v0.0.0-20180416043609-15a1cd37f050 h1:bfBi3IYMggKaHTwDr42m05AYbG/OQpo21oCQWuNelCg= github.com/jbenet/go-reuseport v0.0.0-20180416043609-15a1cd37f050/go.mod h1:hry/Nwg2mFor95Ql+X52uC4zdrZsdH8a0noOj8BLt9g= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= From 847150f6c81612f39082fef1a6d8cb553ee9e09a Mon Sep 17 00:00:00 2001 From: James Phillips Date: Wed, 10 Aug 2022 10:52:39 -0700 Subject: [PATCH 051/173] Update CHANGELOG for v6.7.5 (#4837) Signed-off-by: James Phillips --- CHANGELOG-6.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 2dbe2a27b4..3fb17323fb 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,7 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## Unreleased +## [6.7.5] - 2022-08-10 + +### Security +- Updated the package graphql-go/graphql to address [CVE-2022-37315](https://nvd.nist.gov/vuln/detail/CVE-2022-37315) ## [6.7.4] - 2022-07-12 From c39b8dfdff3be2361f3d2ee78a65e4fc9a012ab0 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Wed, 10 Aug 2022 11:33:04 -0700 Subject: [PATCH 052/173] bypass semverGreater when modules versions are (devel) Signed-off-by: Justin Kolberg --- types/wrapper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/wrapper.go b/types/wrapper.go index 35e3a24190..d00461bb26 100644 --- a/types/wrapper.go +++ b/types/wrapper.go @@ -342,6 +342,9 @@ func ResolveRaw(apiVersion string, typename string) (interface{}, error) { apiGroup, reqVer := ParseAPIVersion(apiVersion) foundVer, ok := availableModules[apiGroup] if ok { + if foundVer == "(devel)" { + foundVer = reqVer + } if semverGreater(reqVer, foundVer) { return nil, fmt.Errorf("requested version was %s, but only %s is available", reqVer, foundVer) } From 8ded873de68acaf5f39ff2864214d5e70eec4bd3 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Wed, 10 Aug 2022 17:18:32 -0700 Subject: [PATCH 053/173] Fix bad merge Signed-off-by: James Phillips --- CHANGELOG-6.md | 10 ++++++---- go.mod | 10 ++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 172b507622..0dc9393232 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,10 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [6.7.5] - 2022-08-10 - -### Security -- Updated the package graphql-go/graphql to address [CVE-2022-37315](https://nvd.nist.gov/vuln/detail/CVE-2022-37315) +## Unreleased ### Changed - Eventd now prioritizes keepalive events over other events in order to @@ -27,6 +24,11 @@ to serve traffic. - Fixed a bug where sensu-backend could crash if the BackendIDGetter encounters etcd client unavailability. +## [6.7.5] - 2022-08-10 + +### Security +- Updated the package graphql-go/graphql to address [CVE-2022-37315](https://nvd.nist.gov/vuln/detail/CVE-2022-37315) + ## [6.7.4] - 2022-07-12 ### Changed diff --git a/go.mod b/go.mod index 1217fcb33d..d876a025c4 100644 --- a/go.mod +++ b/go.mod @@ -2,14 +2,6 @@ module github.com/sensu/sensu-go go 1.16 -replace ( - github.com/sensu/sensu-go/api/core/v2 => ./api/core/v2 - github.com/sensu/sensu-go/api/core/v3 => ./api/core/v3 - github.com/sensu/sensu-go/backend/store/v2 => ./backend/store/v2 - github.com/sensu/sensu-go/types => ./types - github.com/graphql-go/graphql => github.com/jamesdphillips/graphql v0.8.2 -) - require ( github.com/AlecAivazis/survey/v2 v2.2.14 github.com/ash2k/stager v0.0.0-20170622123058-6e9c7b0eacd4 // indirect @@ -90,3 +82,5 @@ require ( github.com/kr/pty v1.1.8 // indirect golang.org/x/text v0.3.7 // indirect ) + +replace github.com/graphql-go/graphql => github.com/jamesdphillips/graphql v0.8.2 From feb005bd1cea49c336d768a9ffa306a8e32c3d84 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Thu, 11 Aug 2022 10:30:55 -0700 Subject: [PATCH 054/173] Remove CI constraint forbiding go.mod replace (#4840) * Remove CI constraint forbiding go.mod replace Repalce directives can be useful when we need to fork our own version of a dpendency but do not wish to edit all import paths. Signed-off-by: Christian Kruse * remove job def as well Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- .circleci/config.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4da8f1f5f9..a4d2a55f81 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,22 +22,6 @@ go_test_env: &sensu_go_test_env GOPROXY: 'https://proxy.golang.org' jobs: - assert-no-replace: - <<: *sensu_go_build_env - <<: *sensu_go_test_env - steps: - - checkout - - run: - name: Check For Replace Directives - command: | - replaces=$(grep -R --include="go.mod" "^replace " || :) - if [ -n "$replaces" ] - then - echo "replace directives not allowed" - echo "$replaces" - exit 1 - fi - test: <<: *sensu_go_build_env <<: *sensu_go_test_env @@ -115,7 +99,6 @@ workflows: - test-module: name: types path: types - - assert-no-replace build: jobs: # darwin/amd64 From e8cf660211eb08ea6348e8d64b09e9616116a3fc Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Thu, 11 Aug 2022 10:31:33 -0700 Subject: [PATCH 055/173] Revert "Merge pull request #4810 from sensu/backport-watcher" (#4833) * Revert "Merge pull request #4810 from sensu/backport-watcher" This reverts commit 384401b7376181ff04b4b6272bf1d6b5dc924858, reversing changes made to 35d054530faf49d701b25a3bf58f550a4663fdcc. Signed-off-by: Christian Kruse * go mod tidy Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- backend/etcd/testing.go | 9 +- backend/store/v2/etcdstore/logger.go | 7 - backend/store/v2/etcdstore/watcher.go | 124 ------------ backend/store/v2/etcdstore/watcher_test.go | 218 --------------------- backend/store/v2/interface.go | 4 - backend/store/v2/proxy.go | 8 - backend/store/v2/storetest/mock.go | 4 - backend/store/v2/watcher.go | 85 -------- go.mod | 2 +- testing/mockstore/v2.go | 5 - 10 files changed, 6 insertions(+), 460 deletions(-) delete mode 100644 backend/store/v2/etcdstore/logger.go delete mode 100644 backend/store/v2/etcdstore/watcher.go delete mode 100644 backend/store/v2/etcdstore/watcher_test.go delete mode 100644 backend/store/v2/watcher.go diff --git a/backend/etcd/testing.go b/backend/etcd/testing.go index feb23e93b0..5017fd5b31 100644 --- a/backend/etcd/testing.go +++ b/backend/etcd/testing.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/sensu/sensu-go/testing/testutil" + "github.com/stretchr/testify/require" ) // NewTestEtcd creates a new Etcd for testing purposes. @@ -20,12 +21,12 @@ func NewTestEtcdWithConfig(t testing.TB, cfg *Config) (*Etcd, func()) { cfg.DataDir = tmpDir e, err := NewEtcd(cfg) - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) return e, func() { defer remove() - defer e.Shutdown() + defer func() { + require.NoError(t, e.Shutdown()) + }() } } diff --git a/backend/store/v2/etcdstore/logger.go b/backend/store/v2/etcdstore/logger.go deleted file mode 100644 index 01680dc823..0000000000 --- a/backend/store/v2/etcdstore/logger.go +++ /dev/null @@ -1,7 +0,0 @@ -package etcdstore - -import "github.com/sirupsen/logrus" - -var logger = logrus.WithFields(logrus.Fields{ - "component": "store", -}) diff --git a/backend/store/v2/etcdstore/watcher.go b/backend/store/v2/etcdstore/watcher.go deleted file mode 100644 index b69755df37..0000000000 --- a/backend/store/v2/etcdstore/watcher.go +++ /dev/null @@ -1,124 +0,0 @@ -package etcdstore - -import ( - "context" - "strings" - "time" - - "github.com/gogo/protobuf/proto" - storev2 "github.com/sensu/sensu-go/backend/store/v2" - "github.com/sensu/sensu-go/backend/store/v2/wrap" - "go.etcd.io/etcd/api/v3/mvccpb" - clientv3 "go.etcd.io/etcd/client/v3" -) - -var ( - watchOpts = []clientv3.OpOption{ - clientv3.WithCreatedNotify(), - clientv3.WithPrevKV(), - } -) - -func (s *Store) Watch(req storev2.ResourceRequest) <-chan []storev2.WatchEvent { - logger.Infof("watching %s: %s/%s", req.StoreName, req.Namespace, req.Name) - outbox := make(chan []storev2.WatchEvent, 1) - go s.watchLoop(req, outbox) - return outbox -} - -func (s *Store) watchLoop(req storev2.ResourceRequest, outbox chan []storev2.WatchEvent) { - defer logger.Infof("stopped watching %s: %s/%s", req.StoreName, req.Namespace, req.Name) - defer close(outbox) - ctx := clientv3.WithRequireLeader(req.Context) - key := StoreKey(req) - prefix := req.Name == "" - if prefix && !strings.HasSuffix(key, "/") { - key += "/" - } - for { - watcher := s.newWatchChan(ctx, key, prefix) - then := time.Now() - for { - select { - case <-ctx.Done(): - return - case e, ok := <-watcher: - if !ok { - goto RESTART - } - if err := e.Err(); err != nil && !e.Canceled { - logger.Error(err) - } - if len(e.Events) == 0 { - continue - } - events := v2WatchEvents(req, e) - var status string - select { - case outbox <- events: - status = storev2.WatchEventsStatusHandled - default: - status = storev2.WatchEventsStatusDropped - } - storev2.WatchEventsProcessed.WithLabelValues( - status, - req.StoreName, - req.Namespace, - storev2.WatcherProviderEtcd, - ).Add(float64(len(events))) - } - } - RESTART: - logger.Infof("restarting watcher %s: %s/%s", req.StoreName, req.Namespace, req.Name) - // don't permit the creation of more than 1 watcher/s per key - since := time.Since(then) - if since < time.Second { - time.Sleep(time.Second - since) - } - } -} - -func (s *Store) newWatchChan(ctx context.Context, key string, prefix bool) clientv3.WatchChan { - opts := watchOpts - if prefix { - opts = append(opts, clientv3.WithPrefix()) - } - return s.client.Watch(ctx, key, opts...) -} - -func v2WatchEvents(req storev2.ResourceRequest, resp clientv3.WatchResponse) []storev2.WatchEvent { - events := make([]storev2.WatchEvent, len(resp.Events)) - for i, event := range resp.Events { - events[i] = toWatchEvent(req, event) - } - return events -} - -func toWatchEvent(req storev2.ResourceRequest, event *clientv3.Event) storev2.WatchEvent { - result := storev2.WatchEvent{Key: req} - if event.Kv != nil { - var wrapper wrap.Wrapper - if err := proto.Unmarshal(event.Kv.Value, &wrapper); err != nil { - result.Err = err - } - result.Value = &wrapper - } - if event.PrevKv != nil { - var wrapper wrap.Wrapper - if err := proto.Unmarshal(event.PrevKv.Value, &wrapper); err != nil { - result.Err = err - } - result.PreviousValue = &wrapper - } - switch event.Type { - case mvccpb.PUT: - if event.PrevKv == nil { - result.Type = storev2.WatchCreate - } else { - result.Type = storev2.WatchUpdate - } - case mvccpb.DELETE: - result.Type = storev2.WatchDelete - } - return result -} diff --git a/backend/store/v2/etcdstore/watcher_test.go b/backend/store/v2/etcdstore/watcher_test.go deleted file mode 100644 index dae3f5b439..0000000000 --- a/backend/store/v2/etcdstore/watcher_test.go +++ /dev/null @@ -1,218 +0,0 @@ -package etcdstore_test - -import ( - "context" - "sync" - "testing" - "time" - - "github.com/google/go-cmp/cmp" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" - "github.com/sensu/sensu-go/backend/etcd" - oldstore "github.com/sensu/sensu-go/backend/store/etcd" - storev2 "github.com/sensu/sensu-go/backend/store/v2" - "github.com/sensu/sensu-go/backend/store/v2/etcdstore" - clientv3 "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/tests/v3/integration" -) - -const timeout = 10 - -func TestWatch(t *testing.T) { - type storeFunc func(context.Context, storev2.Interface) - foo := corev3.FixtureEntityConfig("foo") - wrapper, err := storev2.WrapResource(foo) - if err != nil { - t.Fatal(err) - } - bar := corev3.FixtureEntityConfig("foo") - bar.Metadata.Labels["foo"] = "bar" - wrapper2, err := storev2.WrapResource(bar) - if err != nil { - t.Fatal(err) - } - req := storev2.NewResourceRequestFromResource(context.Background(), foo) - req2 := storev2.NewResourceRequestFromResource(context.Background(), bar) - - testWithEtcdClient(t, func(s storev2.Interface, client *clientv3.Client) { - tests := []struct { - name string - storeFunc storeFunc - wantAction storev2.WatchActionType - wantResource corev3.Resource - }{ - { - name: "resource is created", - storeFunc: func(ctx context.Context, s storev2.Interface) { - if err := s.CreateOrUpdate(req, wrapper); err != nil { - t.Fatal(err) - } - }, - wantAction: storev2.WatchCreate, - wantResource: foo, - }, - { - name: "resource is updated", - storeFunc: func(ctx context.Context, s storev2.Interface) { - if err := s.CreateOrUpdate(req2, wrapper2); err != nil { - t.Fatal(err) - } - }, - wantAction: storev2.WatchUpdate, - wantResource: bar, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - req.Context = ctx - - w := s.Watch(req) - - var wg sync.WaitGroup - wg.Add(1) - go testCheckResult(t, w, tt.wantAction, tt.wantResource, &wg) - time.Sleep(time.Second) // forgive me - tt.storeFunc(ctx, s) - wg.Wait() - - cancel() - testCheckStoppedWatcher(t, w) - }) - } - }) -} - -func TestWatchRetry(t *testing.T) { - integration.BeforeTestExternal(t) - c := integration.NewClusterV3(t, &integration.ClusterConfig{GRPCKeepAliveInterval: 1 * time.Second, GRPCKeepAliveTimeout: 2 * time.Second, Size: 3}) - defer c.Terminate(t) - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - client := c.Client(0) - s := etcdstore.NewStore(client) - oldStore := oldstore.NewStore(client, "") - - ns := &corev2.Namespace{Name: "default"} - - if err := oldStore.CreateNamespace(context.Background(), ns); err != nil { - t.Fatal(err) - } - - // Create resource - foo := corev3.FixtureEntityConfig("foo") - req := storev2.NewResourceRequestFromResource(ctx, foo) - wrapper, err := storev2.WrapResource(foo) - if err != nil { - t.Fatal(err) - } - w := s.Watch(req) - - var wg sync.WaitGroup - wg.Add(1) - go testCheckResult(t, w, storev2.WatchCreate, foo, &wg) - time.Sleep(time.Second) - if err := s.CreateOrUpdate(req, wrapper); err != nil { - t.Fatal(err) - } - wg.Wait() - - // Create a failure with the watcher by partioning our etcd cluster - c.Members[0].InjectPartition(t, c.Members[1], c.Members[2]) - time.Sleep(1 * time.Second) - - c.Members[0].RecoverPartition(t, c.Members[1], c.Members[2]) - c.Members[0].WaitOK(t) - time.Sleep(1 * time.Second) - - // Update resource - foo.Metadata.Labels["foo"] = "acme" - wrapper, err = storev2.WrapResource(foo) - if err != nil { - t.Fatal(err) - } - var wg2 sync.WaitGroup - wg2.Add(1) - go testCheckResult(t, w, storev2.WatchUpdate, foo, &wg2) - time.Sleep(time.Second) - if err := s.CreateOrUpdate(req, wrapper); err != nil { - t.Fatal(err) - } - wg2.Wait() -} - -func testCheckResult(t *testing.T, w <-chan []storev2.WatchEvent, action storev2.WatchActionType, resource corev3.Resource, wg *sync.WaitGroup) { - t.Helper() - defer wg.Done() - - select { - case events, ok := <-w: - if !ok { - panic("channel closed") - } - event := events[0] - if event.Type != action { - t.Errorf("event type = %v, want %v", event.Type, action) - } - - if event.Type == storev2.WatchError { - t.Error("watch error") - return - } - - var got corev3.EntityConfig - if event.Value != nil { - if err := event.Value.UnwrapInto(&got); err != nil { - t.Error(err) - return - } - } else if event.PreviousValue != nil { - if err := event.Value.UnwrapInto(&got); err != nil { - t.Error(err) - return - } - } - - if !cmp.Equal(resource.GetMetadata(), got.GetMetadata()) { - t.Errorf("watch result = %#v, want %#v", got, resource) - return - } - case <-time.After(timeout * time.Second): - t.Errorf("timeout after waiting %d for the Result() chan", timeout) - } -} - -func testCheckStoppedWatcher(t *testing.T, w <-chan []storev2.WatchEvent) { - t.Helper() - - select { - case _, ok := <-w: - if ok { - t.Fatal("resultChan should have been closed") - } - case <-time.After(timeout * time.Second): - t.Fatalf("timeout after waiting %d for resultChan", timeout) - } -} - -func testWithEtcdClient(t *testing.T, f func(storev2.Interface, *clientv3.Client)) { - e, cleanup := etcd.NewTestEtcd(t) - defer cleanup() - - client := e.NewEmbeddedClient() - - s := etcdstore.NewStore(client) - oldStore := oldstore.NewStore(client, "") - ns := &corev2.Namespace{Name: "default"} - - if err := oldStore.CreateNamespace(context.Background(), ns); err != nil { - t.Fatal(err) - } - - f(s, client) -} diff --git a/backend/store/v2/interface.go b/backend/store/v2/interface.go index 0338db18ae..e66a57570a 100644 --- a/backend/store/v2/interface.go +++ b/backend/store/v2/interface.go @@ -47,8 +47,4 @@ type Interface interface { // Patch patches the resource given in the request Patch(ResourceRequest, Wrapper, patch.Patcher, *store.ETagCondition) error - - // Watch sets up a watcher that responds to updates to the given key or - // keyspace indicated by the ResourceRequest. - Watch(ResourceRequest) <-chan []WatchEvent } diff --git a/backend/store/v2/proxy.go b/backend/store/v2/proxy.go index e2b1909c0b..3a544ce55a 100644 --- a/backend/store/v2/proxy.go +++ b/backend/store/v2/proxy.go @@ -79,11 +79,3 @@ func (p *Proxy) Patch(req ResourceRequest, wrapper Wrapper, patcher patch.Patche defer p.mu.RUnlock() return p.impl.Patch(req, wrapper, patcher, cond) } - -// Watch sets up a watcher that responds to updates to the given key or -// keyspace indicated by the ResourceRequest. -func (p *Proxy) Watch(req ResourceRequest) <-chan []WatchEvent { - p.mu.RLock() - defer p.mu.RUnlock() - return p.impl.Watch(req) -} diff --git a/backend/store/v2/storetest/mock.go b/backend/store/v2/storetest/mock.go index 162a405d54..22fb64b3b6 100644 --- a/backend/store/v2/storetest/mock.go +++ b/backend/store/v2/storetest/mock.go @@ -53,7 +53,3 @@ func (s *Store) Patch(req storev2.ResourceRequest, w storev2.Wrapper, patcher pa args := s.Called(req, w, patcher, conditions) return args.Error(0) } - -func (s *Store) Watch(req storev2.ResourceRequest) <-chan []storev2.WatchEvent { - return s.Called(req).Get(0).(<-chan []storev2.WatchEvent) -} diff --git a/backend/store/v2/watcher.go b/backend/store/v2/watcher.go deleted file mode 100644 index 024b2fcde6..0000000000 --- a/backend/store/v2/watcher.go +++ /dev/null @@ -1,85 +0,0 @@ -package v2 - -import ( - "github.com/prometheus/client_golang/prometheus" -) - -const ( - // WatchUnknown indicates that we received an unknown watch even tytpe - // from etcd. - WatchUnknown WatchActionType = iota - // WatchCreate indicates that an object was created. - WatchCreate - // WatchUpdate indicates that an object was updated. - WatchUpdate - // WatchDelete indicates that an object was deleted. - WatchDelete - // WatchError indicates that an error was encountered - WatchError -) - -// WatchActionType indicates what type of change was made to an object in the store. -type WatchActionType int - -// WatchEvent represents an event of a watched resource -type WatchEvent struct { - Type WatchActionType - Key ResourceRequest - Value Wrapper - PreviousValue Wrapper - Revision int64 - Err error -} - -// Watcher represents a generic watcher -type Watcher interface { - Result() <-chan []WatchEvent -} - -func (t WatchActionType) String() string { - var s string - switch t { - case WatchUnknown: - s = "Unknown" - case WatchCreate: - s = "Create" - case WatchDelete: - s = "Delete" - case WatchUpdate: - s = "Update" - case WatchError: - s = "Error" - } - return s -} - -const ( - WatchEventsCounterVec = "sensu_go_watch_events" - - WatchEventsLabelStatus = "status" - WatchEventsLabelResourceType = "resource" - WatchEventsLabelNamespace = "namespace" - - WatchEventsStatusHandled = "handled" - WatchEventsStatusDropped = "dropped" - - WatcherProvider = "provider" - WatcherProviderPG = "postgres" - WatcherProviderEtcd = "etcd" -) - -var ( - WatchEventsProcessed = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: WatchEventsCounterVec, - Help: "The total number of store watch notifications", - }, - []string{WatchEventsLabelStatus, WatchEventsLabelResourceType, WatchEventsLabelNamespace, WatcherProvider}, - ) -) - -func init() { - if err := prometheus.Register(WatchEventsProcessed); err != nil { - panic(err) - } -} diff --git a/go.mod b/go.mod index d876a025c4..25456d603b 100644 --- a/go.mod +++ b/go.mod @@ -78,7 +78,7 @@ require ( require ( github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect - github.com/google/go-cmp v0.5.8 + github.com/google/go-cmp v0.5.8 // indirect github.com/kr/pty v1.1.8 // indirect golang.org/x/text v0.3.7 // indirect ) diff --git a/testing/mockstore/v2.go b/testing/mockstore/v2.go index 4af38f2e6b..80ab197f36 100644 --- a/testing/mockstore/v2.go +++ b/testing/mockstore/v2.go @@ -48,8 +48,3 @@ func (v *V2MockStore) Exists(req storev2.ResourceRequest) (bool, error) { func (v *V2MockStore) Patch(req storev2.ResourceRequest, w storev2.Wrapper, patcher patch.Patcher, cond *store.ETagCondition) error { return v.Called(req, w, patcher, cond).Error(0) } - -func (v *V2MockStore) Watch(req storev2.ResourceRequest) <-chan []storev2.WatchEvent { - args := v.Called(req) - return args.Get(0).(<-chan []storev2.WatchEvent) -} From 7c477db2446cbfe68252d94880473cbab7e63313 Mon Sep 17 00:00:00 2001 From: Melissa Page <73hl10n@gmail.com> Date: Fri, 12 Aug 2022 14:46:07 -0700 Subject: [PATCH 056/173] [Graphql] Add ability to query for backend (#4844) Signed-off-by: Melissa Page <73hl10n@gmail.com> --- backend/apid/graphql/backendEntity.go | 13 +++++ backend/apid/graphql/query.go | 5 ++ backend/apid/graphql/query_test.go | 47 ++++++++++++++++ backend/apid/graphql/schema/entity.gql.go | 65 ++++++++++++++++++++++ backend/apid/graphql/schema/entity.graphql | 10 ++++ backend/apid/graphql/schema/query.gql.go | 26 +++++++++ backend/apid/graphql/schema/query.graphql | 5 ++ backend/apid/graphql/service.go | 3 + backend/backend.go | 14 +++++ 9 files changed, 188 insertions(+) create mode 100644 backend/apid/graphql/backendEntity.go diff --git a/backend/apid/graphql/backendEntity.go b/backend/apid/graphql/backendEntity.go new file mode 100644 index 0000000000..4cf466dc86 --- /dev/null +++ b/backend/apid/graphql/backendEntity.go @@ -0,0 +1,13 @@ +package graphql + +import ( + corev2 "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/sensu-go/graphql" +) + +type backendEntityImpl struct{} + +func (b *backendEntityImpl) Meta(p graphql.ResolveParams) (interface{}, error) { + v := p.Source.(interface{ GetMetadata() *corev2.ObjectMeta }) + return v.GetMetadata(), nil +} diff --git a/backend/apid/graphql/query.go b/backend/apid/graphql/query.go index 2140a71f30..72a200b7a7 100644 --- a/backend/apid/graphql/query.go +++ b/backend/apid/graphql/query.go @@ -37,6 +37,11 @@ type queryImpl struct { svc ServiceConfig } +// Responder implements response to a request for the 'responder' field. +func (r *queryImpl) Responder(p graphql.ResolveParams) (interface{}, error) { + return r.svc.GetBackendEntity() +} + // Viewer implements response to request for 'viewer' field. func (r *queryImpl) Viewer(p graphql.ResolveParams) (interface{}, error) { return struct{}{}, nil diff --git a/backend/apid/graphql/query_test.go b/backend/apid/graphql/query_test.go index 298938f323..9e0797bc8e 100644 --- a/backend/apid/graphql/query_test.go +++ b/backend/apid/graphql/query_test.go @@ -8,6 +8,7 @@ import ( dto "github.com/prometheus/client_model/go" corev2 "github.com/sensu/sensu-go/api/core/v2" + corev3 "github.com/sensu/sensu-go/api/core/v3" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" @@ -231,3 +232,49 @@ func Test_queryImpl_Metrics(t *testing.T) { }) } } + +func Test_queryImpl_Responder(t *testing.T) { + tests := []struct { + name string + gatherResp corev3.Resource + gatherErr error + params graphql.ResolveParams + want interface{} + wantErr bool + }{ + { + name: "returns backend entity", + gatherResp: corev3.FixtureEntityConfig("backend"), + gatherErr: nil, + want: corev3.FixtureEntityConfig("backend"), + wantErr: false, + }, + { + name: "returns an error", + gatherResp: corev3.FixtureEntityConfig("backend"), + gatherErr: errors.New("Error"), + want: corev3.FixtureEntityConfig("backend"), + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + mock := func() (interface{ GetMetadata() *corev2.ObjectMeta }, error) { + return tt.gatherResp, tt.gatherErr + } + r := &queryImpl{ + svc: ServiceConfig{ + GetBackendEntity: mock, + }, + } + got, err := r.Responder(tt.params) + if (err != nil) != tt.wantErr { + t.Errorf("queryImpl.Responder() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("queryImpl.Responder() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/backend/apid/graphql/schema/entity.gql.go b/backend/apid/graphql/schema/entity.gql.go index a9b000a65c..bd0860c311 100644 --- a/backend/apid/graphql/schema/entity.gql.go +++ b/backend/apid/graphql/schema/entity.gql.go @@ -1535,6 +1535,71 @@ var _ObjectTypeProcessDesc = graphql.ObjectDesc{ }, } +// +// BackendEntityFieldResolvers represents a collection of methods whose products represent the +// response values of the 'BackendEntity' type. +type BackendEntityFieldResolvers interface { + // Meta implements response to request for 'meta' field. + Meta(p graphql.ResolveParams) (interface{}, error) +} + +// BackendEntityAliases implements all methods on BackendEntityFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type BackendEntityAliases struct{} + +// Meta implements response to request for 'meta' field. +func (_ BackendEntityAliases) Meta(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// BackendEntityType BackendEntity contains information about a particular backend. +var BackendEntityType = graphql.NewType("BackendEntity", graphql.ObjectKind) + +// RegisterBackendEntity registers BackendEntity object type with given service. +func RegisterBackendEntity(svc *graphql.Service, impl BackendEntityFieldResolvers) { + svc.RegisterObject(_ObjectTypeBackendEntityDesc, impl) +} +func _ObjTypeBackendEntityMetaHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Meta(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Meta(frp) + } +} + +func _ObjectTypeBackendEntityConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "BackendEntity contains information about a particular backend.", + Fields: graphql1.Fields{"meta": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "meta", + Type: graphql.OutputType("ObjectMeta"), + }}, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see BackendEntityFieldResolvers.") + }, + Name: "BackendEntity", + } +} + +// describe BackendEntity's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeBackendEntityDesc = graphql.ObjectDesc{ + Config: _ObjectTypeBackendEntityConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{"meta": _ObjTypeBackendEntityMetaHandler}, +} + // // NetworkFieldResolvers represents a collection of methods whose products represent the // response values of the 'Network' type. diff --git a/backend/apid/graphql/schema/entity.graphql b/backend/apid/graphql/schema/entity.graphql index c5e8459892..4efc492b53 100644 --- a/backend/apid/graphql/schema/entity.graphql +++ b/backend/apid/graphql/schema/entity.graphql @@ -134,6 +134,16 @@ type Process { memoryPercent: Float! } +""" +BackendEntity contains information about a particular backend. +""" +type BackendEntity { + meta: ObjectMeta + # TODO: implement these + # config: CoreV3EntityConfig + # state: CoreV3EntityState +} + """ Network contains information about the system network interfaces that the Agent process is running on, used for additional Entity diff --git a/backend/apid/graphql/schema/query.gql.go b/backend/apid/graphql/schema/query.gql.go index 7d9d3e22e9..7c8137787e 100644 --- a/backend/apid/graphql/schema/query.gql.go +++ b/backend/apid/graphql/schema/query.gql.go @@ -179,6 +179,9 @@ type QueryWrappedNodeFieldResolverParams struct { // QueryFieldResolvers represents a collection of methods whose products represent the // response values of the 'Query' type. type QueryFieldResolvers interface { + // Responder implements response to request for 'responder' field. + Responder(p graphql.ResolveParams) (interface{}, error) + // Viewer implements response to request for 'viewer' field. Viewer(p graphql.ResolveParams) (interface{}, error) @@ -228,6 +231,12 @@ type QueryFieldResolvers interface { // have the resolvers method return a field. type QueryAliases struct{} +// Responder implements response to request for 'responder' field. +func (_ QueryAliases) Responder(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + // Viewer implements response to request for 'viewer' field. func (_ QueryAliases) Viewer(p graphql.ResolveParams) (interface{}, error) { val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) @@ -319,6 +328,15 @@ var QueryType = graphql.NewType("Query", graphql.ObjectKind) func RegisterQuery(svc *graphql.Service, impl QueryFieldResolvers) { svc.RegisterObject(_ObjectTypeQueryDesc, impl) } +func _ObjTypeQueryResponderHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Responder(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Responder(frp) + } +} + func _ObjTypeQueryViewerHandler(impl interface{}) graphql1.FieldResolveFn { resolver := impl.(interface { Viewer(p graphql.ResolveParams) (interface{}, error) @@ -653,6 +671,13 @@ func _ObjectTypeQueryConfigFn() graphql1.ObjectConfig { Name: "node", Type: graphql.OutputType("Node"), }, + "responder": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Responder is what backend responded to the query.", + Name: "responder", + Type: graphql.OutputType("BackendEntity"), + }, "suggest": &graphql1.Field{ Args: graphql1.FieldConfigArgument{ "filters": &graphql1.ArgumentConfig{ @@ -741,6 +766,7 @@ var _ObjectTypeQueryDesc = graphql.ObjectDesc{ "mutator": _ObjTypeQueryMutatorHandler, "namespace": _ObjTypeQueryNamespaceHandler, "node": _ObjTypeQueryNodeHandler, + "responder": _ObjTypeQueryResponderHandler, "suggest": _ObjTypeQuerySuggestHandler, "versions": _ObjTypeQueryVersionsHandler, "viewer": _ObjTypeQueryViewerHandler, diff --git a/backend/apid/graphql/schema/query.graphql b/backend/apid/graphql/schema/query.graphql index 79e056bb09..0d305ecfbc 100644 --- a/backend/apid/graphql/schema/query.graphql +++ b/backend/apid/graphql/schema/query.graphql @@ -2,6 +2,11 @@ The query root of Sensu's GraphQL interface. """ type Query { + """ + Responder is what backend responded to the query. + """ + responder: BackendEntity + """ Current viewer. """ diff --git a/backend/apid/graphql/service.go b/backend/apid/graphql/service.go index 850b13f161..d45176757c 100644 --- a/backend/apid/graphql/service.go +++ b/backend/apid/graphql/service.go @@ -3,6 +3,7 @@ package graphql import ( "context" + corev2 "github.com/sensu/sensu-go/api/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/cli/client" @@ -28,6 +29,7 @@ type ServiceConfig struct { EntityClient EntityClient EventClient EventClient EventFilterClient EventFilterClient + GetBackendEntity func() (interface{ GetMetadata() *corev2.ObjectMeta }, error) HandlerClient HandlerClient HealthController EtcdHealthController MutatorClient MutatorClient @@ -66,6 +68,7 @@ func NewService(cfg ServiceConfig) (*Service, error) { // Register types schema.RegisterAsset(svc, &assetImpl{}) + schema.RegisterBackendEntity(svc, &backendEntityImpl{}) schema.RegisterCoreV2AssetBuild(svc, &schema.CoreV2AssetBuildAliases{}) schema.RegisterCoreV2Pipeline(svc, &corev2PipelineImpl{}) schema.RegisterCoreV2PipelineExtensionOverrides(svc, &corev2PipelineImpl{}) diff --git a/backend/backend.go b/backend/backend.go index 83507842bc..aac1ee9f92 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -582,6 +582,9 @@ func Initialize(ctx context.Context, config *Config) (*Backend, error) { EntityClient: api.NewEntityClient(b.Store, b.StoreV2, b.Store, auth), EventClient: api.NewEventClient(b.Store, auth, bus), EventFilterClient: api.NewEventFilterClient(b.Store, auth), + GetBackendEntity: func() (interface{ GetMetadata() *corev2.ObjectMeta }, error) { + return &CoreV3MetaAdapter{In: b.getBackendEntity(config)}, nil + }, HandlerClient: api.NewHandlerClient(b.Store, auth), HealthController: actions.NewHealthController(b.Store, b.Client.Cluster, etcdClientTLSConfig), MutatorClient: api.NewMutatorClient(b.Store, auth), @@ -968,3 +971,14 @@ func getSystemInfo() corev2.System { } return info } + +// CoreV3MetaAdapter adapts corev2 meta to corev3 +type CoreV3MetaAdapter struct { + In corev2.Resource +} + +// GetMetadata implements the corev3 resource metadata field +func (a *CoreV3MetaAdapter) GetMetadata() *corev2.ObjectMeta { + v := a.In.GetObjectMeta() + return &v +} From 00d356d95e00fdc5477af71db3bcf5f93dacf672 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 16 Aug 2022 08:42:03 -0700 Subject: [PATCH 057/173] Adds agent-serve-wait-time backend configuration (#4834) * Add agent serve wait time configuration Add agent listen wait time configuration. Include unit test for middleware rename flag to agent serve wait time use durations all the way through Signed-off-by: Christian Kruse * reuse apid middlewares Signed-off-by: Christian Kruse fix tests Signed-off-by: Christian Kruse * add /ready endpoint to agent listener Signed-off-by: Christian Kruse * update changelog Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 4 ++++ backend/agentd/agentd.go | 32 +++++++++++++++++++++++++++++++- backend/agentd/agentd_test.go | 18 +++++++++++++++++- backend/backend.go | 1 + backend/cmd/start.go | 3 +++ backend/config.go | 9 +++++---- 6 files changed, 61 insertions(+), 6 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 0dc9393232..b84b216c8f 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -19,6 +19,10 @@ be marked as global resources. for a period of time after startup. - Added `/ready` endpoint to the sensu-go API. Returns 200 when the API is ready to serve traffic. +- Added `--agent-serve-wait-time` backend flag to delay accepting agent +connections for a period of time after startup. +- Added `/ready` endpoint to the agent listener. Returns 200 when the listener +is ready to accept agent connections. ### Fixed - Fixed a bug where sensu-backend could crash if the BackendIDGetter diff --git a/backend/agentd/agentd.go b/backend/agentd/agentd.go index e713cfc91e..1286ddc781 100644 --- a/backend/agentd/agentd.go +++ b/backend/agentd/agentd.go @@ -102,6 +102,8 @@ type Agentd struct { client *clientv3.Client etcdClientTLSConfig *tls.Config healthRouter *routers.HealthRouter + serveWaitTime time.Duration + ready func() } // Config configures an Agentd. @@ -113,6 +115,7 @@ type Config struct { TLS *corev2.TLSOptions RingPool *ringv2.RingPool WriteTimeout int + ServeWaitTime time.Duration Client *clientv3.Client EtcdClientTLSConfig *tls.Config Watcher <-chan store.WatchEventEntityConfig @@ -142,6 +145,7 @@ func New(c Config, opts ...Option) (*Agentd, error) { watcher: c.Watcher, client: c.Client, etcdClientTLSConfig: c.EtcdClientTLSConfig, + serveWaitTime: c.ServeWaitTime, } // prepare server TLS config @@ -150,6 +154,11 @@ func New(c Config, opts ...Option) (*Agentd, error) { return nil, err } + awaitStart := &middlewares.AwaitStartupMiddleware{ + ResponseText: "agentd temporarily unavailable during startup", + } + a.ready = awaitStart.Ready + // Configure the middlewares used by agentd's HTTP server by assigning them to // public variables so they can be overriden from the enterprise codebase AuthenticationMiddleware = a.AuthenticationMiddleware @@ -170,7 +179,11 @@ func New(c Config, opts ...Option) (*Agentd, error) { route := router.NewRoute().Subrouter() route.HandleFunc("/", a.webSocketHandler) - route.Use(agentLimit, authenticate, authorize) + route.Use(awaitStart.Then, agentLimit, authenticate, authorize) + + readySubRouter := router.NewRoute().Subrouter() + new(routers.ReadyRouter).Mount(readySubRouter) + readySubRouter.Use(awaitStart.Then) a.httpServer = &http.Server{ Addr: fmt.Sprintf("%s:%d", a.Host, a.Port), @@ -211,6 +224,23 @@ func (a *Agentd) Start() error { return fmt.Errorf("failed to start agentd: %s", err) } + if a.serveWaitTime > 0 { + logger.Warnf("agentd waiting %s before accepting traffic", a.serveWaitTime) + timer := time.After(a.serveWaitTime) + go func() { + // wait for wait listen time to expire or stop signal + select { + case <-a.ctx.Done(): + return + case <-timer: + a.ready() + logger.Warn("agentd now ready to accept traffic") + } + }() + } else { + a.ready() + } + a.wg.Add(1) go func() { diff --git a/backend/agentd/agentd_test.go b/backend/agentd/agentd_test.go index 00a3aecead..1da483c7ce 100644 --- a/backend/agentd/agentd_test.go +++ b/backend/agentd/agentd_test.go @@ -13,6 +13,7 @@ import ( corev2 "github.com/sensu/sensu-go/api/core/v2" corev3 "github.com/sensu/sensu-go/api/core/v3" + "github.com/sensu/sensu-go/backend/apid/middlewares" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" etcdstore "github.com/sensu/sensu-go/backend/store/etcd" @@ -34,25 +35,36 @@ func TestAgentdMiddlewares(t *testing.T) { agentName string username string group string + isReady bool storeErr error expectedCode int }{ { + description: "Not ready", + isReady: false, + namespace: "test-rbac", + username: "authorized-user", + group: "group-test-rbac", + expectedCode: http.StatusServiceUnavailable, + }, { description: "Authorized request", namespace: "test-rbac", username: "authorized-user", group: "group-test-rbac", + isReady: true, expectedCode: http.StatusOK, }, { description: "Unauthorized request", namespace: "super-secret", username: "unauthorized-user", + isReady: true, expectedCode: http.StatusForbidden, }, { description: "Invalid user", namespace: "test-rbac", username: "nonexistent-user", storeErr: fmt.Errorf("user not found"), + isReady: true, expectedCode: http.StatusUnauthorized, }, } @@ -98,7 +110,11 @@ func TestAgentdMiddlewares(t *testing.T) { }, }}, nil) agentd := &Agentd{store: stor} - server := httptest.NewServer(agentd.AuthenticationMiddleware(agentd.AuthorizationMiddleware(testHandler))) + readyMiddleware := &middlewares.AwaitStartupMiddleware{} + if tc.isReady { + readyMiddleware.Ready() + } + server := httptest.NewServer(readyMiddleware.Then(agentd.AuthenticationMiddleware(agentd.AuthorizationMiddleware(testHandler)))) defer server.Close() req, _ := http.NewRequest(http.MethodPost, server.URL, bytes.NewBuffer([]byte{})) req.SetBasicAuth(tc.username, "password") diff --git a/backend/backend.go b/backend/backend.go index aac1ee9f92..a16aedc22f 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -651,6 +651,7 @@ func Initialize(ctx context.Context, config *Config) (*Backend, error) { TLS: config.AgentTLSOptions, RingPool: b.RingPool, WriteTimeout: config.AgentWriteTimeout, + ServeWaitTime: config.AgentServeWaitTime, Client: b.Client, Watcher: entityConfigWatcher, EtcdClientTLSConfig: b.EtcdClientTLSConfig, diff --git a/backend/cmd/start.go b/backend/cmd/start.go index b7c883b022..9d319beb69 100644 --- a/backend/cmd/start.go +++ b/backend/cmd/start.go @@ -46,6 +46,7 @@ const ( flagConfigFile = "config-file" flagAgentHost = "agent-host" flagAgentPort = "agent-port" + flagAgentServeWaitTime = "agent-serve-wait-time" flagAPIListenAddress = "api-listen-address" flagAPIRequestLimit = "api-request-limit" flagAPIURL = "api-url" @@ -224,6 +225,7 @@ func StartCommand(initialize InitializeFunc) *cobra.Command { AgentHost: viper.GetString(flagAgentHost), AgentPort: viper.GetInt(flagAgentPort), AgentWriteTimeout: viper.GetInt(backend.FlagAgentWriteTimeout), + AgentServeWaitTime: viper.GetDuration(flagAgentServeWaitTime), APIListenAddress: viper.GetString(flagAPIListenAddress), APIRequestLimit: viper.GetInt64(flagAPIRequestLimit), APIURL: viper.GetString(flagAPIURL), @@ -526,6 +528,7 @@ func flagSet(server bool) *pflag.FlagSet { // Main Flags flagSet.String(flagAgentHost, viper.GetString(flagAgentHost), "agent listener host") flagSet.Int(flagAgentPort, viper.GetInt(flagAgentPort), "agent listener port") + flagSet.Duration(flagAgentServeWaitTime, viper.GetDuration(flagAgentServeWaitTime), "wait time before accepting agent connections on startup") flagSet.String(flagAPIListenAddress, viper.GetString(flagAPIListenAddress), "address to listen on for api traffic") flagSet.Int64(flagAPIRequestLimit, viper.GetInt64(flagAPIRequestLimit), "maximum API request body size, in bytes") flagSet.String(flagAPIURL, viper.GetString(flagAPIURL), "url of the api to connect to") diff --git a/backend/config.go b/backend/config.go index 4a789c1540..03b7d4516a 100644 --- a/backend/config.go +++ b/backend/config.go @@ -51,10 +51,11 @@ type Config struct { CacheDir string // Agentd Configuration - AgentHost string - AgentPort int - AgentTLSOptions *corev2.TLSOptions - AgentWriteTimeout int + AgentHost string + AgentPort int + AgentTLSOptions *corev2.TLSOptions + AgentWriteTimeout int + AgentServeWaitTime time.Duration // Apid Configuration APIListenAddress string From e2d80987dcb4af637f6c7a6ca367bb3469b2a8f9 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Fri, 19 Aug 2022 10:40:02 -0700 Subject: [PATCH 058/173] Update logging for unrunable pipelines (#4843) Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- backend/pipeline/adapter.go | 20 +++++++++++++ backend/pipeline/adapterv1.go | 6 ++++ backend/pipeline/adapterv1_test.go | 47 +++++++++++++++++++++++++++++- backend/pipelined/pipelined.go | 13 +++++---- 4 files changed, 80 insertions(+), 6 deletions(-) diff --git a/backend/pipeline/adapter.go b/backend/pipeline/adapter.go index 024b36db69..60c1f91c99 100644 --- a/backend/pipeline/adapter.go +++ b/backend/pipeline/adapter.go @@ -2,6 +2,7 @@ package pipeline import ( "context" + "fmt" corev2 "github.com/sensu/sensu-go/api/core/v2" ) @@ -14,9 +15,28 @@ type Adapter interface { Run(context.Context, *corev2.ResourceReference, interface{}) error } +// ErrMisconfiguredPipeline interface implemented by errors that indicate +// a misconfigured pipeline that cannot be executed. +type ErrMisconfiguredPipeline interface { + MisconfiguredPipeline() +} + // ErrNoWorkflows is returned when a pipeline has no workflows type ErrNoWorkflows struct{} func (e *ErrNoWorkflows) Error() string { return "pipeline has no workflows" } + +func (e *ErrNoWorkflows) MisconfiguredPipeline() {} + +// ErrNoLegacyHandlers is returned when no legacy handlers exist +type errNoLegacyHandlers struct { + Msg string +} + +func (e *errNoLegacyHandlers) Error() string { + return fmt.Sprintf("legacy pipeline found no existing handlers: %s", e.Msg) +} + +func (e *errNoLegacyHandlers) MisconfiguredPipeline() {} diff --git a/backend/pipeline/adapterv1.go b/backend/pipeline/adapterv1.go index 195bfaf7d5..a35b5c58b0 100644 --- a/backend/pipeline/adapterv1.go +++ b/backend/pipeline/adapterv1.go @@ -285,6 +285,12 @@ func (a *AdapterV1) generateLegacyPipeline(ctx context.Context, event *corev2.Ev return nil, err } + if len(handlers) < 1 { + return nil, &errNoLegacyHandlers{ + Msg: fmt.Sprintf("none of %s exist", legacyHandlerNames), + } + } + pipeline := &corev2.Pipeline{ ObjectMeta: corev2.ObjectMeta{ Name: LegacyPipelineName, diff --git a/backend/pipeline/adapterv1_test.go b/backend/pipeline/adapterv1_test.go index d9b909f08c..4d46921312 100644 --- a/backend/pipeline/adapterv1_test.go +++ b/backend/pipeline/adapterv1_test.go @@ -535,17 +535,62 @@ func TestAdapterV1_resolvePipelineReference(t *testing.T) { }, event: func() *corev2.Event { event := corev2.FixtureEvent("entity1", "check1") + event.Check.Handlers = []string{"myhandler"} return event }(), }, + fields: fields{ + Store: func() store.Store { + handler := &corev2.Handler{ + ObjectMeta: corev2.NewObjectMeta("myhandler", "default"), + } + stor := &mockstore.MockStore{} + stor.On("GetHandlerByName", mock.Anything, handler.GetName()). + Return(handler, nil) + return stor + }(), + }, want: func() *corev2.Pipeline { pipeline := &corev2.Pipeline{ ObjectMeta: corev2.NewObjectMeta("legacy-pipeline", "default"), - Workflows: []*corev2.PipelineWorkflow{}, + Workflows: []*corev2.PipelineWorkflow{ + { + Name: "legacy-pipeline-workflow-myhandler", + Handler: &corev2.ResourceReference{ + Type: "Handler", + APIVersion: "core/v2", + Name: "myhandler", + }, + }, + }, } return pipeline }(), }, + { + name: "returns error when ref name is legacy-pipeline but no handlers exist", + args: args{ + ctx: context.WithValue(context.Background(), corev2.NamespaceKey, "default"), + ref: &corev2.ResourceReference{ + Name: "legacy-pipeline", + }, + event: func() *corev2.Event { + event := corev2.FixtureEvent("entity1", "check1") + event.Check.Handlers = []string{"myhandler"} + return event + }(), + }, + fields: fields{ + Store: func() store.Store { + var missingHandler *corev2.Handler + stor := &mockstore.MockStore{} + stor.On("GetHandlerByName", mock.Anything, mock.Anything). + Return(missingHandler, nil) + return stor + }(), + }, + wantErr: true, + }, { name: "returns a stored pipeline if the ref name is not legacy-pipeline", args: args{ diff --git a/backend/pipelined/pipelined.go b/backend/pipelined/pipelined.go index 2517d0dbd4..3f7fbf8427 100644 --- a/backend/pipelined/pipelined.go +++ b/backend/pipelined/pipelined.go @@ -248,11 +248,14 @@ func (p *Pipelined) handleMessage(ctx context.Context, msg interface{}) (hadPipe return true, err } skipPipelineErr := fmt.Errorf("%w, skipping execution of pipeline", err) - if _, ok := err.(*pipeline.ErrNoWorkflows); ok { - if fields["check_name"] != "keepalive" { - // only warn about empty pipelines if it's not a keepalive. - // this reduces log spam. - logger.WithFields(fields).Warn(skipPipelineErr) + if _, ok := err.(pipeline.ErrMisconfiguredPipeline); ok { + if fields["check_name"] == "keepalive" { + // supress logging for keepalive events to debug. + // default "keepalive" handler is added to keepalive events + // which frequently generates log noise. + logger.WithFields(fields).Debug(skipPipelineErr) + } else { + logger.WithFields(fields).Info(skipPipelineErr) } } else { logger.WithFields(fields).Error(skipPipelineErr) From f3bc8f54708ac01fbb79a7229e8d576c141f3b95 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Mon, 22 Aug 2022 14:01:27 -0700 Subject: [PATCH 059/173] [GraphQL] List entity config & state resources (#4808) * Expose `EntityConfig` & `EntityState` resources through GraphQL service * Add `Fields()` method to `EntityConfig` & `EntityState` resources so that they implement the `Fielder` interface; allows users to filter with field selectors. * Complication: The core/v3 package previous checked that each resource in the package had a unique `RBACName()`, however, since we don't want distinct names for the config & state resources this proved to be problematic. As such I've disabled the uniqueness tests for the time being. (Same as: #4807) Signed-off-by: James Phillips --- api/core/v3/entity_config.go | 33 + api/core/v3/entity_config_test.go | 60 ++ api/core/v3/entity_state.go | 19 + api/core/v3/entity_state_test.go | 36 + api/core/v3/fielder.go | 7 + api/core/v3/resource_generated_test.go | 16 - api/core/v3/resource_generated_test.tmpl | 16 - api/core/v3/typemap.go | 14 +- api/core/v3/typemap.tmpl | 14 +- backend/api/generic.go | 6 + backend/apid/graphql/corev3.go | 134 +++ backend/apid/graphql/corev3_test.go | 389 ++++++++ backend/apid/graphql/globalid/util.go | 70 ++ backend/apid/graphql/globalid/util_test.go | 132 +++ backend/apid/graphql/mock_test.go | 3 + backend/apid/graphql/node.go | 16 + backend/apid/graphql/schema/corev2.gen.gql.go | 852 ++++++++++++++++++ .../apid/graphql/schema/corev2.gen.graphql | 63 ++ backend/apid/graphql/schema/corev3.gen.gql.go | 467 ++++++++++ .../apid/graphql/schema/corev3.gen.graphql | 79 ++ backend/apid/graphql/schema/corev3.gql.go | 226 +++++ backend/apid/graphql/schema/corev3.graphql | 41 + backend/apid/graphql/schema/schema_gen.go | 3 +- backend/apid/graphql/service.go | 9 + backend/apid/graphql/service_test.go | 8 + backend/backend.go | 2 +- graphql/service.go | 23 +- 27 files changed, 2690 insertions(+), 48 deletions(-) create mode 100644 api/core/v3/entity_config.go create mode 100644 api/core/v3/entity_config_test.go create mode 100644 api/core/v3/entity_state.go create mode 100644 api/core/v3/entity_state_test.go create mode 100644 api/core/v3/fielder.go create mode 100644 backend/apid/graphql/corev3.go create mode 100644 backend/apid/graphql/corev3_test.go create mode 100644 backend/apid/graphql/schema/corev3.gen.gql.go create mode 100644 backend/apid/graphql/schema/corev3.gen.graphql create mode 100644 backend/apid/graphql/schema/corev3.gql.go create mode 100644 backend/apid/graphql/schema/corev3.graphql diff --git a/api/core/v3/entity_config.go b/api/core/v3/entity_config.go new file mode 100644 index 0000000000..1549dd4313 --- /dev/null +++ b/api/core/v3/entity_config.go @@ -0,0 +1,33 @@ +package v3 + +import ( + "strconv" + "strings" + + corev2 "github.com/sensu/sensu-go/api/core/v2" +) + +var entityConfigRBACName = (&corev2.Entity{}).RBACName() + +func (e *EntityConfig) rbacName() string { + return entityConfigRBACName +} + +func (e *EntityConfig) Fields() map[string]string { + fields := map[string]string{ + "entity_config.name": e.Metadata.Name, + "entity_config.namespace": e.Metadata.Namespace, + "entity_config.deregister": strconv.FormatBool(e.Deregister), + "entity_config.entity_class": e.EntityClass, + "entity_config.subscriptions": strings.Join(e.Subscriptions, ","), + } + MergeMapWithPrefix(fields, e.Metadata.Labels, "entity_config.labels.") + return fields +} + +// MergeMapWithPrefix merges contents of one map into another using a prefix. +func MergeMapWithPrefix(a map[string]string, b map[string]string, prefix string) { + for k, v := range b { + a[prefix+k] = v + } +} diff --git a/api/core/v3/entity_config_test.go b/api/core/v3/entity_config_test.go new file mode 100644 index 0000000000..568ce1508a --- /dev/null +++ b/api/core/v3/entity_config_test.go @@ -0,0 +1,60 @@ +package v3 + +import ( + "reflect" + "testing" + + v2 "github.com/sensu/sensu-go/api/core/v2" +) + +func TestEntityConfigFields(t *testing.T) { + tests := []struct { + name string + args Fielder + wantKey string + want string + }{ + { + name: "exposes name", + args: FixtureEntityConfig("my-agent"), + wantKey: "entity_config.name", + want: "my-agent", + }, + { + name: "exposes deregister", + args: &EntityConfig{Metadata: &v2.ObjectMeta{}, Deregister: true}, + wantKey: "entity_config.deregister", + want: "true", + }, + { + name: "exposes class", + args: &EntityConfig{Metadata: &v2.ObjectMeta{}, EntityClass: "agent"}, + wantKey: "entity_config.entity_class", + want: "agent", + }, + { + name: "exposes subscriptions", + args: &EntityConfig{Metadata: &v2.ObjectMeta{}, Subscriptions: []string{"www", "unix"}}, + wantKey: "entity_config.subscriptions", + want: "www,unix", + }, + { + name: "exposes labels", + args: &EntityConfig{ + Metadata: &v2.ObjectMeta{ + Labels: map[string]string{"region": "philadelphia"}, + }, + }, + wantKey: "entity_config.labels.region", + want: "philadelphia", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := tt.args.Fields() + if !reflect.DeepEqual(got[tt.wantKey], tt.want) { + t.Errorf("EntityConfig.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + } + }) + } +} diff --git a/api/core/v3/entity_state.go b/api/core/v3/entity_state.go new file mode 100644 index 0000000000..131da36a7a --- /dev/null +++ b/api/core/v3/entity_state.go @@ -0,0 +1,19 @@ +package v3 + +import ( + corev2 "github.com/sensu/sensu-go/api/core/v2" +) + +var entityStateRBACName = (&corev2.Entity{}).RBACName() + +func (*EntityState) rbacName() string { + return entityStateRBACName +} + +func (e *EntityState) Fields() map[string]string { + fields := map[string]string{ + "entity_state.name": e.Metadata.Name, + "entity_state.namespace": e.Metadata.Namespace, + } + return fields +} diff --git a/api/core/v3/entity_state_test.go b/api/core/v3/entity_state_test.go new file mode 100644 index 0000000000..e5b9bce12c --- /dev/null +++ b/api/core/v3/entity_state_test.go @@ -0,0 +1,36 @@ +package v3 + +import ( + "reflect" + "testing" +) + +func TestEntityStateFields(t *testing.T) { + tests := []struct { + name string + args Fielder + wantKey string + want string + }{ + { + name: "exposes name", + args: FixtureEntityState("my-agent"), + wantKey: "entity_state.name", + want: "my-agent", + }, + { + name: "exposes deregister", + args: FixtureEntityState("my-agent"), + wantKey: "entity_state.namespace", + want: "default", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := tt.args.Fields() + if !reflect.DeepEqual(got[tt.wantKey], tt.want) { + t.Errorf("EntityState.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) + } + }) + } +} diff --git a/api/core/v3/fielder.go b/api/core/v3/fielder.go new file mode 100644 index 0000000000..a27c796bd4 --- /dev/null +++ b/api/core/v3/fielder.go @@ -0,0 +1,7 @@ +package v3 + +// Fielder includes a set of fields that represent a resource. +type Fielder interface { + // Fields returns a set of fields that represent the resource. + Fields() map[string]string +} diff --git a/api/core/v3/resource_generated_test.go b/api/core/v3/resource_generated_test.go index 9ab9bf0ae3..9e8e114d8f 100644 --- a/api/core/v3/resource_generated_test.go +++ b/api/core/v3/resource_generated_test.go @@ -484,20 +484,4 @@ func TestResourceUniqueness(t *testing.T) { if got, want := len(types), len(typeMap)/2; got != want { t.Fatalf("bad number of types: got %d, want %d", got, want) } - rbacNames := make(map[string]bool) - for _, v := range types { - if name := v.RBACName(); rbacNames[name] { - t.Errorf("duplicate rbac name: %s", name) - } else { - rbacNames[name] = true - } - } - storeNames := make(map[string]bool) - for _, v := range types { - if name := v.StoreName(); storeNames[name] { - t.Errorf("duplicate store suffix: %s", name) - } else { - storeNames[name] = true - } - } } diff --git a/api/core/v3/resource_generated_test.tmpl b/api/core/v3/resource_generated_test.tmpl index 1c4620aa04..f32a4ba7ee 100644 --- a/api/core/v3/resource_generated_test.tmpl +++ b/api/core/v3/resource_generated_test.tmpl @@ -176,20 +176,4 @@ func TestResourceUniqueness(t *testing.T) { if got, want := len(types), len(typeMap)/2; got != want { t.Fatalf("bad number of types: got %d, want %d", got, want) } - rbacNames := make(map[string]bool) - for _, v := range types { - if name := v.RBACName(); rbacNames[name] { - t.Errorf("duplicate rbac name: %s", name) - } else { - rbacNames[name] = true - } - } - storeNames := make(map[string]bool) - for _, v := range types { - if name := v.StoreName(); storeNames[name] { - t.Errorf("duplicate store suffix: %s", name) - } else { - storeNames[name] = true - } - } } diff --git a/api/core/v3/typemap.go b/api/core/v3/typemap.go index 5c587c8e40..9c6ae8eef0 100644 --- a/api/core/v3/typemap.go +++ b/api/core/v3/typemap.go @@ -15,11 +15,9 @@ func init() { for _, v := range typeMap { if r, ok := v.(Resource); ok { rbacMap[r.RBACName()] = r + storeMap[r.StoreName()] = r } } - for _, v := range rbacMap { - storeMap[v.StoreName()] = v - } types.RegisterResolver("core/v3", ResolveRawResource) } @@ -101,8 +99,14 @@ func ResolveResourceByStoreName(name string) (Resource, error) { // ListResources lists all of the resources in the package. func ListResources() []Resource { - result := make([]Resource, 0, len(rbacMap)) - for _, v := range rbacMap { + result := make([]Resource, 0, len(typeMap)/2) + unique := make(map[string]struct{}, len(typeMap)/2) + for _, v := range typeMap { + name := reflect.ValueOf(v).Elem().Type().Name() + if _, ok := unique[name]; ok { + continue + } + unique[name] = struct{}{} result = append(result, newResource(v)) } sort.Slice(result, func(i, j int) bool { diff --git a/api/core/v3/typemap.tmpl b/api/core/v3/typemap.tmpl index 2798ec3b92..7a46f31306 100644 --- a/api/core/v3/typemap.tmpl +++ b/api/core/v3/typemap.tmpl @@ -15,11 +15,9 @@ func init() { for _, v := range typeMap { if r, ok := v.(Resource); ok { rbacMap[r.RBACName()] = r + storeMap[r.StoreName()] = r } } - for _, v := range rbacMap { - storeMap[v.StoreName()] = v - } types.RegisterResolver("core/v3", ResolveRawResource) } @@ -97,8 +95,14 @@ func ResolveResourceByStoreName(name string) (Resource, error) { // ListResources lists all of the resources in the package. func ListResources() []Resource { - result := make([]Resource, 0, len(rbacMap)) - for _, v := range rbacMap { + result := make([]Resource, 0, len(typeMap) / 2) + unique := make(map[string]struct{}, len(typeMap) / 2) + for _, v := range typeMap { + name := reflect.ValueOf(v).Elem().Type().Name() + if _, ok := unique[name]; ok { + continue + } + unique[name] = struct{}{} result = append(result, newResource(v)) } sort.Slice(result, func(i, j int) bool { diff --git a/backend/api/generic.go b/backend/api/generic.go index a4ec8d60e1..1803fefe61 100644 --- a/backend/api/generic.go +++ b/backend/api/generic.go @@ -192,6 +192,12 @@ func (g *GenericClient) list(ctx context.Context, resources interface{}, pred *s StoreName: g.Kind.StorePrefix(), Context: ctx, } + if pred != nil && pred.Ordering == "NAME" { + req.SortOrder = storev2.SortAscend + if pred.Descending { + req.SortOrder = storev2.SortDescend + } + } list, err := g.StoreV2.List(req, pred) if err != nil { return err diff --git a/backend/apid/graphql/corev3.go b/backend/apid/graphql/corev3.go new file mode 100644 index 0000000000..a62cef86d4 --- /dev/null +++ b/backend/apid/graphql/corev3.go @@ -0,0 +1,134 @@ +package graphql + +import ( + "context" + + corev2 "github.com/sensu/sensu-go/api/core/v2" + corev3 "github.com/sensu/sensu-go/api/core/v3" + "github.com/sensu/sensu-go/backend/apid/graphql/globalid" + "github.com/sensu/sensu-go/backend/apid/graphql/schema" + util_api "github.com/sensu/sensu-go/backend/apid/graphql/util/api" + "github.com/sensu/sensu-go/backend/store" + "github.com/sensu/sensu-go/graphql" +) + +// +// Constants +// + +var ( + // EntityCoreV3ConfigGlobalID can be used to produce a global id + GlobalIDCoreV3EntityConfig = globalid.NewGenericTranslator(&corev3.EntityConfig{}, "") + + // EntityCoreV3StateGlobalID can be used to produce a global id + GlobalIDCoreV3EntityState = globalid.NewGenericTranslator(&corev3.EntityState{}, "") +) + +// +// EntityConfig +// + +type corev3EntityConfigExtImpl struct { + schema.CoreV3EntityConfigAliases + client GenericClient + entityClient EntityClient +} + +// ID implements response to request for 'id' field. +func (i *corev3EntityConfigExtImpl) ID(p graphql.ResolveParams) (string, error) { + return GlobalIDCoreV3EntityConfig.EncodeToString(p.Context, p.Source), nil +} + +// ToJSON implements response to request for 'toJSON' field. +func (i *corev3EntityConfigExtImpl) ToJSON(p graphql.ResolveParams) (interface{}, error) { + return util_api.WrapResource(p.Source), nil +} + +// State implements response to request for 'state' field. +func (i *corev3EntityConfigExtImpl) State(p graphql.ResolveParams) (interface{}, error) { + obj := p.Source.(*corev3.EntityConfig) + val := corev3.EntityState{} + return getEntityComponent(p.Context, i.client, obj.Metadata, &val) +} + +// ToCoreV2Entity implements response to request for 'toCoreV2Entity' field. +func (i *corev3EntityConfigExtImpl) ToCoreV2Entity(p graphql.ResolveParams) (interface{}, error) { + obj := p.Source.(interface{ GetMetadata() *corev2.ObjectMeta }) + ctx := contextWithNamespace(p.Context, obj.GetMetadata().Namespace) + return i.entityClient.FetchEntity(ctx, obj.GetMetadata().Name) +} + +type corev3EntityConfigImpl struct { + schema.CoreV3EntityConfigAliases +} + +// IsTypeOf is used to determine if a given value is associated with the type +func (*corev3EntityConfigImpl) IsTypeOf(s interface{}, p graphql.IsTypeOfParams) bool { + _, ok := s.(*corev3.EntityConfig) + return ok +} + +// +// EntityState +// + +type corev3EntityStateExtImpl struct { + schema.CoreV3EntityStateAliases + client GenericClient + entityClient EntityClient +} + +// ID implements response to request for 'id' field. +func (*corev3EntityStateExtImpl) ID(p graphql.ResolveParams) (string, error) { + return GlobalIDCoreV3EntityState.EncodeToString(p.Context, p.Source), nil +} + +// ToJSON implements response to request for 'toJSON' field. +func (*corev3EntityStateExtImpl) ToJSON(p graphql.ResolveParams) (interface{}, error) { + return util_api.WrapResource(p.Source), nil +} + +// State implements response to request for 'state' field. +func (i *corev3EntityStateExtImpl) Config(p graphql.ResolveParams) (interface{}, error) { + obj := p.Source.(*corev3.EntityState) + val := corev3.EntityConfig{} + return getEntityComponent(p.Context, i.client, obj.Metadata, &val) +} + +// ToCoreV2Entity implements response to request for 'toCoreV2Entity' field. +func (i *corev3EntityStateExtImpl) ToCoreV2Entity(p graphql.ResolveParams) (interface{}, error) { + obj := p.Source.(interface{ GetMetadata() *corev2.ObjectMeta }) + ctx := contextWithNamespace(p.Context, obj.GetMetadata().Namespace) + return i.entityClient.FetchEntity(ctx, obj.GetMetadata().Name) +} + +func getEntityComponent(ctx context.Context, client GenericClient, meta *corev2.ObjectMeta, val corev3.Resource) (interface{}, error) { + wrapper := util_api.WrapResource(val) + err := client.SetTypeMeta(wrapper.TypeMeta) + if err != nil { + return nil, err + } + ctx = contextWithNamespace(ctx, meta.Namespace) + proxy := &corev3.V2ResourceProxy{Resource: val} + if err = client.Get(ctx, meta.Name, proxy); err == nil { + return proxy.Resource, err + } else if _, ok := err.(*store.ErrNotFound); ok { + return nil, nil + } + return nil, err +} + +type corev3EntityStateImpl struct { + schema.CoreV3EntityStateAliases +} + +// IsTypeOf is used to determine if a given value is associated with the type +func (*corev3EntityStateImpl) IsTypeOf(s interface{}, p graphql.IsTypeOfParams) bool { + _, ok := s.(*corev3.EntityState) + return ok +} + +func init() { + globalid.RegisterTranslator(GlobalIDCoreV3EntityConfig) + globalid.RegisterTranslator(GlobalIDCoreV3EntityState) +} diff --git a/backend/apid/graphql/corev3_test.go b/backend/apid/graphql/corev3_test.go new file mode 100644 index 0000000000..c7ea9a4452 --- /dev/null +++ b/backend/apid/graphql/corev3_test.go @@ -0,0 +1,389 @@ +package graphql + +import ( + "context" + "errors" + "fmt" + "reflect" + "testing" + + corev2 "github.com/sensu/sensu-go/api/core/v2" + corev3 "github.com/sensu/sensu-go/api/core/v3" + util_api "github.com/sensu/sensu-go/backend/apid/graphql/util/api" + "github.com/sensu/sensu-go/backend/store" + "github.com/sensu/sensu-go/graphql" + "github.com/stretchr/testify/mock" +) + +func Test_corev3_ID(t *testing.T) { + tests := []struct { + name string + resolver interface { + ID(p graphql.ResolveParams) (string, error) + } + in interface{} + want string + wantErr bool + }{ + { + name: "corev3EntityConfigExtImpl", + resolver: &corev3EntityConfigExtImpl{}, + in: corev3.FixtureEntityConfig("test"), + want: "srn:core/v3.EntityConfig:default:test", + wantErr: false, + }, + { + name: "corev3EntityStateExtImpl", + resolver: &corev3EntityStateExtImpl{}, + in: corev3.FixtureEntityState("test"), + want: "srn:core/v3.EntityState:default:test", + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(fmt.Sprintf("%T/%s", tt.resolver, tt.name), func(t *testing.T) { + params := graphql.ResolveParams{Context: context.Background(), Source: tt.in} + got, err := tt.resolver.ID(params) + if (err != nil) != tt.wantErr { + t.Errorf("%s.ID() error = %v, wantErr %v", tt.name, err, tt.wantErr) + return + } + if got != tt.want { + t.Errorf("%s.ID() = %v, want %v", tt.name, got, tt.want) + } + }) + } +} + +func Test_corev3_ToJSON(t *testing.T) { + tests := []struct { + name string + resolver interface { + ToJSON(p graphql.ResolveParams) (interface{}, error) + } + in interface{} + want interface{} + wantErr bool + }{ + { + name: "corev3EntityConfigExtImpl", + resolver: &corev3EntityConfigExtImpl{}, + in: corev3.FixtureEntityConfig("name"), + want: util_api.WrapResource(corev3.FixtureEntityConfig("name")), + wantErr: false, + }, + { + name: "corev3EntityStateExtImpl", + resolver: &corev3EntityStateExtImpl{}, + in: corev3.FixtureEntityState("name"), + want: util_api.WrapResource(corev3.FixtureEntityState("name")), + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(fmt.Sprintf("%T/%s", tt.resolver, tt.name), func(t *testing.T) { + got, err := tt.resolver.ToJSON(graphql.ResolveParams{Context: context.Background(), Source: tt.in}) + if (err != nil) != tt.wantErr { + t.Errorf("%s.ToJSON() error = %v, wantErr %v", tt.name, err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("%s.ToJSON() = %v, want %v", tt.name, got, tt.want) + } + }) + } +} + +func Test_corev3_IsTypeOf(t *testing.T) { + tests := []struct { + name string + resolver interface { + IsTypeOf(s interface{}, p graphql.IsTypeOfParams) bool + } + in interface{} + want bool + }{ + { + name: "entity_config/match", + resolver: &corev3EntityConfigImpl{}, + in: corev3.FixtureEntityConfig("name"), + want: true, + }, + { + name: "entity_config/no match", + resolver: &corev3EntityConfigImpl{}, + in: corev2.FixtureEntity("name"), + want: false, + }, + { + name: "entity_state/match", + resolver: &corev3EntityStateImpl{}, + in: corev3.FixtureEntityState("name"), + want: true, + }, + { + name: "entity_state/no match", + resolver: &corev3EntityStateImpl{}, + in: corev2.FixtureEntity("name"), + want: false, + }, + } + for _, tt := range tests { + t.Run(fmt.Sprintf("%T/%s", tt.resolver, tt.name), func(t *testing.T) { + got := tt.resolver.IsTypeOf(tt.in, graphql.IsTypeOfParams{Context: context.Background()}) + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("%T.ToJSON() = %v, want %v", tt.resolver, got, tt.want) + } + }) + } +} + +func Test_corev3EntityConfigExtImpl_State(t *testing.T) { + tests := []struct { + name string + setup func(*MockGenericClient) + source interface{} + want interface{} + wantErr bool + }{ + { + name: "success", + setup: func(client *MockGenericClient) { + client.On("SetTypeMeta", mock.Anything).Return(nil) + client.On("Get", mock.Anything, "name", mock.Anything).Run(func(args mock.Arguments) { + arg := args.Get(2).(*corev3.V2ResourceProxy) + *arg = corev3.V2ResourceProxy{Resource: corev3.FixtureEntityConfig("name")} + }).Return(nil).Once() + }, + source: corev3.FixtureEntityConfig("name"), + want: corev3.FixtureEntityConfig("name"), + wantErr: false, + }, + { + name: "not found", + setup: func(client *MockGenericClient) { + client.On("SetTypeMeta", mock.Anything).Return(nil) + client.On("Get", mock.Anything, "name", mock.Anything).Return(&store.ErrNotFound{}).Once() + }, + source: corev3.FixtureEntityConfig("name"), + want: nil, + wantErr: false, + }, + { + name: "bad meta", + setup: func(client *MockGenericClient) { + client.On("SetTypeMeta", mock.Anything).Return(errors.New("unlikely")) + client.On("Get", mock.Anything, "name", mock.Anything).Return(&store.ErrNotFound{}).Once() + }, + source: corev3.FixtureEntityConfig("name"), + want: nil, + wantErr: true, + }, + { + name: "upstream err", + setup: func(client *MockGenericClient) { + client.On("SetTypeMeta", mock.Anything).Return(nil) + client.On("Get", mock.Anything, "name", mock.Anything).Return(errors.New("unlikely")).Once() + }, + source: corev3.FixtureEntityConfig("name"), + want: nil, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + client := new(MockGenericClient) + tt.setup(client) + + impl := &corev3EntityConfigExtImpl{client: client} + got, err := impl.State(graphql.ResolveParams{ + Context: context.Background(), + Source: tt.source, + }) + if (err != nil) != tt.wantErr { + t.Errorf("corev3EntityConfigExtImpl.State() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("corev3EntityConfigExtImpl.State() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_corev3EntityStateExtImpl_State(t *testing.T) { + tests := []struct { + name string + setup func(*MockGenericClient) + source interface{} + want interface{} + wantErr bool + }{ + { + name: "success", + setup: func(client *MockGenericClient) { + client.On("SetTypeMeta", mock.Anything).Return(nil) + client.On("Get", mock.Anything, "name", mock.Anything).Run(func(args mock.Arguments) { + arg := args.Get(2).(*corev3.V2ResourceProxy) + *arg = corev3.V2ResourceProxy{Resource: corev3.FixtureEntityState("name")} + }).Return(nil).Once() + }, + source: corev3.FixtureEntityState("name"), + want: corev3.FixtureEntityState("name"), + wantErr: false, + }, + { + name: "not found", + setup: func(client *MockGenericClient) { + client.On("SetTypeMeta", mock.Anything).Return(nil) + client.On("Get", mock.Anything, "name", mock.Anything).Return(&store.ErrNotFound{}).Once() + }, + source: corev3.FixtureEntityState("name"), + want: nil, + wantErr: false, + }, + { + name: "bad meta", + setup: func(client *MockGenericClient) { + client.On("SetTypeMeta", mock.Anything).Return(errors.New("unlikely")) + client.On("Get", mock.Anything, "name", mock.Anything).Return(&store.ErrNotFound{}).Once() + }, + source: corev3.FixtureEntityState("name"), + want: nil, + wantErr: true, + }, + { + name: "upstream err", + setup: func(client *MockGenericClient) { + client.On("SetTypeMeta", mock.Anything).Return(nil) + client.On("Get", mock.Anything, "name", mock.Anything).Return(errors.New("unlikely")).Once() + }, + source: corev3.FixtureEntityState("name"), + want: nil, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + client := new(MockGenericClient) + tt.setup(client) + + impl := &corev3EntityStateExtImpl{client: client} + got, err := impl.Config(graphql.ResolveParams{ + Context: context.Background(), + Source: tt.source, + }) + if (err != nil) != tt.wantErr { + t.Errorf("corev3EntityStateExtImpl.Config() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("corev3EntityStateExtImpl.Config() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_corev3EntityStateExtImpl_ToCoreV2Entity(t *testing.T) { + tests := []struct { + name string + setup func(*MockEntityClient) + source interface{} + want interface{} + wantErr bool + }{ + { + name: "success", + setup: func(client *MockEntityClient) { + client.On("FetchEntity", mock.Anything, "name"). + Return(corev2.FixtureEntity("name"), nil). + Once() + }, + source: corev3.FixtureEntityState("name"), + want: corev2.FixtureEntity("name"), + wantErr: false, + }, + { + name: "upstream err", + setup: func(client *MockEntityClient) { + client.On("FetchEntity", mock.Anything, "name"). + Return(corev2.FixtureEntity("name"), errors.New("unlikely")). + Once() + }, + source: corev3.FixtureEntityState("name"), + want: corev2.FixtureEntity("name"), + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + client := new(MockEntityClient) + tt.setup(client) + + impl := &corev3EntityStateExtImpl{entityClient: client} + got, err := impl.ToCoreV2Entity(graphql.ResolveParams{ + Context: context.Background(), + Source: tt.source, + }) + if (err != nil) != tt.wantErr { + t.Errorf("corev3EntityStateExtImpl.ToCoreV2Entity() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("corev3EntityStateExtImpl.ToCoreV2Entity() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_corev3EntityConfigExtImpl_ToCoreV2Entity(t *testing.T) { + tests := []struct { + name string + setup func(*MockEntityClient) + source interface{} + want interface{} + wantErr bool + }{ + { + name: "success", + setup: func(client *MockEntityClient) { + client.On("FetchEntity", mock.Anything, "name"). + Return(corev2.FixtureEntity("name"), nil). + Once() + }, + source: corev3.FixtureEntityConfig("name"), + want: corev2.FixtureEntity("name"), + wantErr: false, + }, + { + name: "upstream err", + setup: func(client *MockEntityClient) { + client.On("FetchEntity", mock.Anything, "name"). + Return(corev2.FixtureEntity("name"), errors.New("unlikely")). + Once() + }, + source: corev3.FixtureEntityConfig("name"), + want: corev2.FixtureEntity("name"), + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + client := new(MockEntityClient) + tt.setup(client) + + impl := &corev3EntityConfigExtImpl{entityClient: client} + got, err := impl.ToCoreV2Entity(graphql.ResolveParams{ + Context: context.Background(), + Source: tt.source, + }) + if (err != nil) != tt.wantErr { + t.Errorf("corev3EntityConfigExtImpl.ToCoreV2Entity() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("corev3EntityConfigExtImpl.ToCoreV2Entity() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/backend/apid/graphql/globalid/util.go b/backend/apid/graphql/globalid/util.go index 5a39f16882..49f027c8a3 100644 --- a/backend/apid/graphql/globalid/util.go +++ b/backend/apid/graphql/globalid/util.go @@ -93,3 +93,73 @@ func standardEncoder(name string, fNames ...string) encoderFunc { return components } } + +type tmGetter interface { + GetTypeMeta() types.TypeMeta +} + +type namedResource interface { + RBACName() string +} + +// NewGenericTranslator creates a compatible translator for a given corev2 or +// corev3 resource. +func NewGenericTranslator(kind namedResource, name string) Translator { + return &genericTranslator{kind: kind, name: name} +} + +type genericTranslator struct { + kind interface{} + name string + _kindVal *reflect.Value +} + +func (g *genericTranslator) kindVal() *reflect.Value { + if g._kindVal == nil { + val := reflect.ValueOf(g.kind) + g._kindVal = &val + } + return g._kindVal +} + +// Returns the rbac name for the given resource +func (g *genericTranslator) ForResourceNamed() string { + if g.name != "" { + return g.name + } + tm := types.TypeMeta{} + if getter, ok := g.kind.(tmGetter); ok { + tm = getter.GetTypeMeta() + } else { + typ := reflect.Indirect(reflect.ValueOf(g.kind)).Type() + tm = types.TypeMeta{ + Type: typ.Name(), + APIVersion: types.ApiVersion(typ.PkgPath()), + } + } + g.name = tm.APIVersion + "." + tm.Type + return g.name +} + +// IsResponsible returns true if the given resource matches this translator +func (g *genericTranslator) IsResponsible(r interface{}) bool { + return g.kindVal().Type().String() == reflect.ValueOf(r).Type().String() +} + +// Encode produces id components for a given resource +func (g *genericTranslator) Encode(ctx context.Context, r interface{}) Components { + name := g.ForResourceNamed() + cmp := Encode(ctx, r) + cmp.SetResource(name) + return cmp +} + +// EncodeToString returns a globalid for the given resource +func (g *genericTranslator) EncodeToString(ctx context.Context, r interface{}) string { + return g.Encode(ctx, r).String() +} + +// Decodes the given globalid into components +func (g *genericTranslator) Decode(cmp StandardComponents) Components { + return &cmp +} diff --git a/backend/apid/graphql/globalid/util_test.go b/backend/apid/graphql/globalid/util_test.go index b361a5d734..a8c7abffea 100644 --- a/backend/apid/graphql/globalid/util_test.go +++ b/backend/apid/graphql/globalid/util_test.go @@ -4,6 +4,8 @@ import ( "context" "testing" + corev2 "github.com/sensu/sensu-go/api/core/v2" + corev3 "github.com/sensu/sensu-go/api/core/v3" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" ) @@ -20,3 +22,133 @@ func TestStandardDecoder(t *testing.T) { assert.Equal("default", components.Namespace()) assert.Equal("myHandler", components.UniqueComponent()) } + +func Test_GenericTranslator_ForResourceNamed(t *testing.T) { + type fields struct { + kind namedResource + name string + } + tests := []struct { + name string + fields fields + want string + }{ + { + name: "implicit name", + fields: fields{ + kind: &corev3.EntityConfig{}, + }, + want: "core/v3.EntityConfig", + }, + { + name: "explicit name", + fields: fields{ + kind: &corev3.EntityConfig{}, + name: "custom_entity_config", + }, + want: "custom_entity_config", + }, + { + name: "implicit name AND doesn't implement typemeta interface", + fields: fields{ + kind: &corev2.CheckConfig{}, + }, + want: "core/v2.CheckConfig", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := NewGenericTranslator(tt.fields.kind, tt.fields.name) + if got := g.ForResourceNamed(); got != tt.want { + t.Errorf("genericTranslator.ForResourceNamed() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_GenericTranslator_IsResponsibleFor(t *testing.T) { + type fields struct { + kind namedResource + name string + } + tests := []struct { + name string + fields fields + arg interface{} + want bool + }{ + { + name: "IS responsible", + fields: fields{ + kind: &corev3.EntityConfig{}, + }, + arg: corev3.FixtureEntityConfig("test"), + want: true, + }, + { + name: "is NOT responsible", + fields: fields{ + kind: &corev3.EntityConfig{}, + }, + arg: corev3.FixtureEntityState("test"), + want: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := NewGenericTranslator(tt.fields.kind, tt.fields.name) + if got := g.IsResponsible(tt.arg); got != tt.want { + t.Errorf("genericTranslator.IsResponsible() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_GenericTranslator_EncodeToString(t *testing.T) { + type fields struct { + kind namedResource + name string + } + type args struct { + ctx context.Context + in interface{} + } + tests := []struct { + name string + fields fields + args args + want string + }{ + { + name: "implicit name", + fields: fields{ + kind: &corev3.EntityConfig{}, + }, + args: args{ + ctx: context.Background(), + in: corev3.FixtureEntityState("test"), + }, + want: "srn:core/v3.EntityConfig:default:test", + }, + { + name: "implicit name", + fields: fields{ + kind: &corev3.EntityConfig{}, + name: "custom-name", + }, + args: args{ + ctx: context.Background(), + in: corev3.FixtureEntityState("test"), + }, + want: "srn:custom-name:default:test", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + g := NewGenericTranslator(tt.fields.kind, tt.fields.name) + if got := g.EncodeToString(tt.args.ctx, tt.args.in); got != tt.want { + t.Errorf("genericTranslator.EncodeToString() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/backend/apid/graphql/mock_test.go b/backend/apid/graphql/mock_test.go index fc08475d9f..357a8c7b6b 100644 --- a/backend/apid/graphql/mock_test.go +++ b/backend/apid/graphql/mock_test.go @@ -133,6 +133,9 @@ func (c *MockEntityClient) UpdateEntity(ctx context.Context, entity *corev2.Enti func (c *MockEntityClient) FetchEntity(ctx context.Context, name string) (*corev2.Entity, error) { args := c.Called(ctx, name) + if args.Get(0) == nil { + return nil, args.Error(1) + } return args.Get(0).(*corev2.Entity), args.Error(1) } diff --git a/backend/apid/graphql/node.go b/backend/apid/graphql/node.go index 303dd9521a..a35973e324 100644 --- a/backend/apid/graphql/node.go +++ b/backend/apid/graphql/node.go @@ -27,6 +27,22 @@ func registerNodeResolvers(register relay.NodeRegister, cfg ServiceConfig) { registerRoleBindingNodeResolver(register, cfg.RBACClient) registerUserNodeResolver(register, cfg.UserClient) registerSilencedNodeResolver(register, cfg.SilencedClient) + register.RegisterResolver(relay.NodeResolver{ + Translator: GlobalIDCoreV3EntityConfig, + ObjectType: schema.CoreV3EntityConfigType, + Resolve: util_relay.MakeNodeResolver( + cfg.GenericClient, + corev2.TypeMeta{Type: "EntityConfig", APIVersion: "core/v3"}, + ), + }) + register.RegisterResolver(relay.NodeResolver{ + Translator: GlobalIDCoreV3EntityState, + ObjectType: schema.CoreV3EntityStateType, + Resolve: util_relay.MakeNodeResolver( + cfg.GenericClient, + corev2.TypeMeta{Type: "EntityState", APIVersion: "core/v3"}, + ), + }) } // assets diff --git a/backend/apid/graphql/schema/corev2.gen.gql.go b/backend/apid/graphql/schema/corev2.gen.gql.go index 76486e2775..1108faa126 100644 --- a/backend/apid/graphql/schema/corev2.gen.gql.go +++ b/backend/apid/graphql/schema/corev2.gen.gql.go @@ -398,6 +398,292 @@ var _ObjectTypeCoreV2ClusterRoleBindingDesc = graphql.ObjectDesc{ }, } +// +// CoreV2DeregistrationFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2Deregistration' type. +type CoreV2DeregistrationFieldResolvers interface { + // Handler implements response to request for 'handler' field. + Handler(p graphql.ResolveParams) (string, error) +} + +// CoreV2DeregistrationAliases implements all methods on CoreV2DeregistrationFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2DeregistrationAliases struct{} + +// Handler implements response to request for 'handler' field. +func (_ CoreV2DeregistrationAliases) Handler(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'handler'") + } + return ret, err +} + +// CoreV2DeregistrationType Deregistration contains configuration for Sensu entity de-registration. +var CoreV2DeregistrationType = graphql.NewType("CoreV2Deregistration", graphql.ObjectKind) + +// RegisterCoreV2Deregistration registers CoreV2Deregistration object type with given service. +func RegisterCoreV2Deregistration(svc *graphql.Service, impl CoreV2DeregistrationFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2DeregistrationDesc, impl) +} +func _ObjTypeCoreV2DeregistrationHandlerHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Handler(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Handler(frp) + } +} + +func _ObjectTypeCoreV2DeregistrationConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "Deregistration contains configuration for Sensu entity de-registration.", + Fields: graphql1.Fields{"handler": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "handler", + Type: graphql1.NewNonNull(graphql1.String), + }}, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2DeregistrationFieldResolvers.") + }, + Name: "CoreV2Deregistration", + } +} + +// describe CoreV2Deregistration's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2DeregistrationDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2DeregistrationConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{"handler": _ObjTypeCoreV2DeregistrationHandlerHandler}, +} + +// +// CoreV2NetworkFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2Network' type. +type CoreV2NetworkFieldResolvers interface { + // Interfaces implements response to request for 'interfaces' field. + Interfaces(p graphql.ResolveParams) (interface{}, error) +} + +// CoreV2NetworkAliases implements all methods on CoreV2NetworkFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2NetworkAliases struct{} + +// Interfaces implements response to request for 'interfaces' field. +func (_ CoreV2NetworkAliases) Interfaces(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +/* +CoreV2NetworkType Network contains information about the system network interfaces +that the Agent process is running on, used for additional Entity +context. +*/ +var CoreV2NetworkType = graphql.NewType("CoreV2Network", graphql.ObjectKind) + +// RegisterCoreV2Network registers CoreV2Network object type with given service. +func RegisterCoreV2Network(svc *graphql.Service, impl CoreV2NetworkFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2NetworkDesc, impl) +} +func _ObjTypeCoreV2NetworkInterfacesHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Interfaces(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Interfaces(frp) + } +} + +func _ObjectTypeCoreV2NetworkConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "Network contains information about the system network interfaces\nthat the Agent process is running on, used for additional Entity\ncontext.", + Fields: graphql1.Fields{"interfaces": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "interfaces", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql.OutputType("CoreV2NetworkInterface")))), + }}, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2NetworkFieldResolvers.") + }, + Name: "CoreV2Network", + } +} + +// describe CoreV2Network's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2NetworkDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2NetworkConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{"interfaces": _ObjTypeCoreV2NetworkInterfacesHandler}, +} + +// +// CoreV2NetworkInterfaceFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2NetworkInterface' type. +type CoreV2NetworkInterfaceFieldResolvers interface { + // Name implements response to request for 'name' field. + Name(p graphql.ResolveParams) (string, error) + + // Mac implements response to request for 'mac' field. + Mac(p graphql.ResolveParams) (string, error) + + // Addresses implements response to request for 'addresses' field. + Addresses(p graphql.ResolveParams) ([]string, error) +} + +// CoreV2NetworkInterfaceAliases implements all methods on CoreV2NetworkInterfaceFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2NetworkInterfaceAliases struct{} + +// Name implements response to request for 'name' field. +func (_ CoreV2NetworkInterfaceAliases) Name(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'name'") + } + return ret, err +} + +// Mac implements response to request for 'mac' field. +func (_ CoreV2NetworkInterfaceAliases) Mac(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'mac'") + } + return ret, err +} + +// Addresses implements response to request for 'addresses' field. +func (_ CoreV2NetworkInterfaceAliases) Addresses(p graphql.ResolveParams) ([]string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.([]string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'addresses'") + } + return ret, err +} + +/* +CoreV2NetworkInterfaceType NetworkInterface contains information about a system network +interface. +*/ +var CoreV2NetworkInterfaceType = graphql.NewType("CoreV2NetworkInterface", graphql.ObjectKind) + +// RegisterCoreV2NetworkInterface registers CoreV2NetworkInterface object type with given service. +func RegisterCoreV2NetworkInterface(svc *graphql.Service, impl CoreV2NetworkInterfaceFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2NetworkInterfaceDesc, impl) +} +func _ObjTypeCoreV2NetworkInterfaceNameHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Name(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Name(frp) + } +} + +func _ObjTypeCoreV2NetworkInterfaceMacHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Mac(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Mac(frp) + } +} + +func _ObjTypeCoreV2NetworkInterfaceAddressesHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Addresses(p graphql.ResolveParams) ([]string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Addresses(frp) + } +} + +func _ObjectTypeCoreV2NetworkInterfaceConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "NetworkInterface contains information about a system network\ninterface.", + Fields: graphql1.Fields{ + "addresses": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "addresses", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), + }, + "mac": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "mac", + Type: graphql1.NewNonNull(graphql1.String), + }, + "name": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "name", + Type: graphql1.NewNonNull(graphql1.String), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2NetworkInterfaceFieldResolvers.") + }, + Name: "CoreV2NetworkInterface", + } +} + +// describe CoreV2NetworkInterface's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2NetworkInterfaceDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2NetworkInterfaceConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "addresses": _ObjTypeCoreV2NetworkInterfaceAddressesHandler, + "mac": _ObjTypeCoreV2NetworkInterfaceMacHandler, + "name": _ObjTypeCoreV2NetworkInterfaceNameHandler, + }, +} + // // CoreV2PipelineFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Pipeline' type. @@ -650,6 +936,78 @@ var _ObjectTypeCoreV2PipelineWorkflowDesc = graphql.ObjectDesc{ }, } +// +// CoreV2ProcessFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2Process' type. +type CoreV2ProcessFieldResolvers interface { + // Name implements response to request for 'name' field. + Name(p graphql.ResolveParams) (string, error) +} + +// CoreV2ProcessAliases implements all methods on CoreV2ProcessFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2ProcessAliases struct{} + +// Name implements response to request for 'name' field. +func (_ CoreV2ProcessAliases) Name(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'name'") + } + return ret, err +} + +// CoreV2ProcessType Process contains information about a local process. +var CoreV2ProcessType = graphql.NewType("CoreV2Process", graphql.ObjectKind) + +// RegisterCoreV2Process registers CoreV2Process object type with given service. +func RegisterCoreV2Process(svc *graphql.Service, impl CoreV2ProcessFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2ProcessDesc, impl) +} +func _ObjTypeCoreV2ProcessNameHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Name(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Name(frp) + } +} + +func _ObjectTypeCoreV2ProcessConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "Process contains information about a local process.", + Fields: graphql1.Fields{"name": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "name", + Type: graphql1.NewNonNull(graphql1.String), + }}, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2ProcessFieldResolvers.") + }, + Name: "CoreV2Process", + } +} + +// describe CoreV2Process's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2ProcessDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2ProcessConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{"name": _ObjTypeCoreV2ProcessNameHandler}, +} + // // CoreV2ResourceReferenceFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2ResourceReference' type. @@ -1479,3 +1837,497 @@ var _ObjectTypeCoreV2SubjectDesc = graphql.ObjectDesc{ "type": _ObjTypeCoreV2SubjectTypeHandler, }, } + +// +// CoreV2SystemFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV2System' type. +type CoreV2SystemFieldResolvers interface { + // Hostname implements response to request for 'hostname' field. + Hostname(p graphql.ResolveParams) (string, error) + + // Os implements response to request for 'os' field. + Os(p graphql.ResolveParams) (string, error) + + // Platform implements response to request for 'platform' field. + Platform(p graphql.ResolveParams) (string, error) + + // Platform_family implements response to request for 'platform_family' field. + Platform_family(p graphql.ResolveParams) (string, error) + + // Platform_version implements response to request for 'platform_version' field. + Platform_version(p graphql.ResolveParams) (string, error) + + // Network implements response to request for 'network' field. + Network(p graphql.ResolveParams) (interface{}, error) + + // Arch implements response to request for 'arch' field. + Arch(p graphql.ResolveParams) (string, error) + + // Arm_version implements response to request for 'arm_version' field. + Arm_version(p graphql.ResolveParams) (int, error) + + // Libc_type implements response to request for 'libc_type' field. + Libc_type(p graphql.ResolveParams) (string, error) + + // Vm_system implements response to request for 'vm_system' field. + Vm_system(p graphql.ResolveParams) (string, error) + + // Vm_role implements response to request for 'vm_role' field. + Vm_role(p graphql.ResolveParams) (string, error) + + // Cloud_provider implements response to request for 'cloud_provider' field. + Cloud_provider(p graphql.ResolveParams) (string, error) + + // Float_type implements response to request for 'float_type' field. + Float_type(p graphql.ResolveParams) (string, error) + + // Processes implements response to request for 'processes' field. + Processes(p graphql.ResolveParams) (interface{}, error) +} + +// CoreV2SystemAliases implements all methods on CoreV2SystemFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV2SystemAliases struct{} + +// Hostname implements response to request for 'hostname' field. +func (_ CoreV2SystemAliases) Hostname(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'hostname'") + } + return ret, err +} + +// Os implements response to request for 'os' field. +func (_ CoreV2SystemAliases) Os(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'os'") + } + return ret, err +} + +// Platform implements response to request for 'platform' field. +func (_ CoreV2SystemAliases) Platform(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'platform'") + } + return ret, err +} + +// Platform_family implements response to request for 'platform_family' field. +func (_ CoreV2SystemAliases) Platform_family(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'platform_family'") + } + return ret, err +} + +// Platform_version implements response to request for 'platform_version' field. +func (_ CoreV2SystemAliases) Platform_version(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'platform_version'") + } + return ret, err +} + +// Network implements response to request for 'network' field. +func (_ CoreV2SystemAliases) Network(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// Arch implements response to request for 'arch' field. +func (_ CoreV2SystemAliases) Arch(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'arch'") + } + return ret, err +} + +// Arm_version implements response to request for 'arm_version' field. +func (_ CoreV2SystemAliases) Arm_version(p graphql.ResolveParams) (int, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := graphql1.Int.ParseValue(val).(int) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'arm_version'") + } + return ret, err +} + +// Libc_type implements response to request for 'libc_type' field. +func (_ CoreV2SystemAliases) Libc_type(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'libc_type'") + } + return ret, err +} + +// Vm_system implements response to request for 'vm_system' field. +func (_ CoreV2SystemAliases) Vm_system(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'vm_system'") + } + return ret, err +} + +// Vm_role implements response to request for 'vm_role' field. +func (_ CoreV2SystemAliases) Vm_role(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'vm_role'") + } + return ret, err +} + +// Cloud_provider implements response to request for 'cloud_provider' field. +func (_ CoreV2SystemAliases) Cloud_provider(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'cloud_provider'") + } + return ret, err +} + +// Float_type implements response to request for 'float_type' field. +func (_ CoreV2SystemAliases) Float_type(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'float_type'") + } + return ret, err +} + +// Processes implements response to request for 'processes' field. +func (_ CoreV2SystemAliases) Processes(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +/* +CoreV2SystemType System contains information about the system that the Agent process +is running on, used for additional Entity context. +*/ +var CoreV2SystemType = graphql.NewType("CoreV2System", graphql.ObjectKind) + +// RegisterCoreV2System registers CoreV2System object type with given service. +func RegisterCoreV2System(svc *graphql.Service, impl CoreV2SystemFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV2SystemDesc, impl) +} +func _ObjTypeCoreV2SystemHostnameHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Hostname(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Hostname(frp) + } +} + +func _ObjTypeCoreV2SystemOsHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Os(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Os(frp) + } +} + +func _ObjTypeCoreV2SystemPlatformHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Platform(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Platform(frp) + } +} + +func _ObjTypeCoreV2SystemPlatform_familyHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Platform_family(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Platform_family(frp) + } +} + +func _ObjTypeCoreV2SystemPlatform_versionHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Platform_version(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Platform_version(frp) + } +} + +func _ObjTypeCoreV2SystemNetworkHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Network(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Network(frp) + } +} + +func _ObjTypeCoreV2SystemArchHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Arch(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Arch(frp) + } +} + +func _ObjTypeCoreV2SystemArm_versionHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Arm_version(p graphql.ResolveParams) (int, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Arm_version(frp) + } +} + +func _ObjTypeCoreV2SystemLibc_typeHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Libc_type(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Libc_type(frp) + } +} + +func _ObjTypeCoreV2SystemVm_systemHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Vm_system(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Vm_system(frp) + } +} + +func _ObjTypeCoreV2SystemVm_roleHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Vm_role(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Vm_role(frp) + } +} + +func _ObjTypeCoreV2SystemCloud_providerHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Cloud_provider(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Cloud_provider(frp) + } +} + +func _ObjTypeCoreV2SystemFloat_typeHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Float_type(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Float_type(frp) + } +} + +func _ObjTypeCoreV2SystemProcessesHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Processes(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Processes(frp) + } +} + +func _ObjectTypeCoreV2SystemConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "System contains information about the system that the Agent process\nis running on, used for additional Entity context.", + Fields: graphql1.Fields{ + "arch": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "arch", + Type: graphql1.NewNonNull(graphql1.String), + }, + "arm_version": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "arm_version", + Type: graphql1.NewNonNull(graphql1.Int), + }, + "cloud_provider": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "CloudProvider indicates the public cloud the agent is running on.", + Name: "cloud_provider", + Type: graphql1.NewNonNull(graphql1.String), + }, + "float_type": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "float_type", + Type: graphql1.NewNonNull(graphql1.String), + }, + "hostname": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "hostname", + Type: graphql1.NewNonNull(graphql1.String), + }, + "libc_type": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "LibCType indicates the type of libc the agent has access to (glibc, musl,\netc)", + Name: "libc_type", + Type: graphql1.NewNonNull(graphql1.String), + }, + "network": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "network", + Type: graphql1.NewNonNull(graphql.OutputType("CoreV2Network")), + }, + "os": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "os", + Type: graphql1.NewNonNull(graphql1.String), + }, + "platform": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "platform", + Type: graphql1.NewNonNull(graphql1.String), + }, + "platform_family": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "platform_family", + Type: graphql1.NewNonNull(graphql1.String), + }, + "platform_version": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "self descriptive", + Name: "platform_version", + Type: graphql1.NewNonNull(graphql1.String), + }, + "processes": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Processes contains information about the local processes on the agent.", + Name: "processes", + Type: graphql1.NewNonNull(graphql1.NewList(graphql.OutputType("CoreV2Process"))), + }, + "vm_role": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "VMRole indicates the VM role of the agent (host/guest)", + Name: "vm_role", + Type: graphql1.NewNonNull(graphql1.String), + }, + "vm_system": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "VMSystem indicates the VM system of the agent (kvm, vbox, etc)", + Name: "vm_system", + Type: graphql1.NewNonNull(graphql1.String), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV2SystemFieldResolvers.") + }, + Name: "CoreV2System", + } +} + +// describe CoreV2System's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV2SystemDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV2SystemConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "arch": _ObjTypeCoreV2SystemArchHandler, + "arm_version": _ObjTypeCoreV2SystemArm_versionHandler, + "cloud_provider": _ObjTypeCoreV2SystemCloud_providerHandler, + "float_type": _ObjTypeCoreV2SystemFloat_typeHandler, + "hostname": _ObjTypeCoreV2SystemHostnameHandler, + "libc_type": _ObjTypeCoreV2SystemLibc_typeHandler, + "network": _ObjTypeCoreV2SystemNetworkHandler, + "os": _ObjTypeCoreV2SystemOsHandler, + "platform": _ObjTypeCoreV2SystemPlatformHandler, + "platform_family": _ObjTypeCoreV2SystemPlatform_familyHandler, + "platform_version": _ObjTypeCoreV2SystemPlatform_versionHandler, + "processes": _ObjTypeCoreV2SystemProcessesHandler, + "vm_role": _ObjTypeCoreV2SystemVm_roleHandler, + "vm_system": _ObjTypeCoreV2SystemVm_systemHandler, + }, +} diff --git a/backend/apid/graphql/schema/corev2.gen.graphql b/backend/apid/graphql/schema/corev2.gen.graphql index 5e861f81c5..0e12727f17 100644 --- a/backend/apid/graphql/schema/corev2.gen.graphql +++ b/backend/apid/graphql/schema/corev2.gen.graphql @@ -50,6 +50,30 @@ type CoreV2ClusterRoleBinding { metadata: ObjectMeta! } +"""Deregistration contains configuration for Sensu entity de-registration.""" +type CoreV2Deregistration { + handler: String! +} + +""" +Network contains information about the system network interfaces +that the Agent process is running on, used for additional Entity +context. +""" +type CoreV2Network { + interfaces: [CoreV2NetworkInterface!]! +} + +""" +NetworkInterface contains information about a system network +interface. +""" +type CoreV2NetworkInterface { + name: String! + mac: String! + addresses: [String!]! +} + """Pipeline represents a named collection of pipeline workflows.""" type CoreV2Pipeline { @@ -85,6 +109,11 @@ type CoreV2PipelineWorkflow { handler: CoreV2ResourceReference } +"""Process contains information about a local process.""" +type CoreV2Process { + name: String! +} + """ResourceReference represents a reference to another resource.""" type CoreV2ResourceReference { @@ -175,3 +204,37 @@ type CoreV2Subject { """Name of the referenced object""" name: String! } + +""" +System contains information about the system that the Agent process +is running on, used for additional Entity context. +""" +type CoreV2System { + hostname: String! + os: String! + platform: String! + platform_family: String! + platform_version: String! + network: CoreV2Network! + arch: String! + arm_version: Int! + + """ + LibCType indicates the type of libc the agent has access to (glibc, musl, + etc) + """ + libc_type: String! + + """VMSystem indicates the VM system of the agent (kvm, vbox, etc)""" + vm_system: String! + + """VMRole indicates the VM role of the agent (host/guest)""" + vm_role: String! + + """CloudProvider indicates the public cloud the agent is running on.""" + cloud_provider: String! + float_type: String! + + """Processes contains information about the local processes on the agent.""" + processes: [CoreV2Process]! +} diff --git a/backend/apid/graphql/schema/corev3.gen.gql.go b/backend/apid/graphql/schema/corev3.gen.gql.go new file mode 100644 index 0000000000..929e4b12c5 --- /dev/null +++ b/backend/apid/graphql/schema/corev3.gen.gql.go @@ -0,0 +1,467 @@ +// Code generated by scripts/gengraphql.go. DO NOT EDIT. + +package schema + +import ( + errors "errors" + graphql1 "github.com/graphql-go/graphql" + graphql "github.com/sensu/sensu-go/graphql" +) + +// +// CoreV3EntityConfigFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV3EntityConfig' type. +type CoreV3EntityConfigFieldResolvers interface { + // Metadata implements response to request for 'metadata' field. + Metadata(p graphql.ResolveParams) (interface{}, error) + + // Entity_class implements response to request for 'entity_class' field. + Entity_class(p graphql.ResolveParams) (string, error) + + // User implements response to request for 'user' field. + User(p graphql.ResolveParams) (string, error) + + // Subscriptions implements response to request for 'subscriptions' field. + Subscriptions(p graphql.ResolveParams) ([]string, error) + + // Deregister implements response to request for 'deregister' field. + Deregister(p graphql.ResolveParams) (bool, error) + + // Deregistration implements response to request for 'deregistration' field. + Deregistration(p graphql.ResolveParams) (interface{}, error) + + // Keepalive_handlers implements response to request for 'keepalive_handlers' field. + Keepalive_handlers(p graphql.ResolveParams) ([]string, error) + + // Redact implements response to request for 'redact' field. + Redact(p graphql.ResolveParams) ([]string, error) +} + +// CoreV3EntityConfigAliases implements all methods on CoreV3EntityConfigFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV3EntityConfigAliases struct{} + +// Metadata implements response to request for 'metadata' field. +func (_ CoreV3EntityConfigAliases) Metadata(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// Entity_class implements response to request for 'entity_class' field. +func (_ CoreV3EntityConfigAliases) Entity_class(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'entity_class'") + } + return ret, err +} + +// User implements response to request for 'user' field. +func (_ CoreV3EntityConfigAliases) User(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'user'") + } + return ret, err +} + +// Subscriptions implements response to request for 'subscriptions' field. +func (_ CoreV3EntityConfigAliases) Subscriptions(p graphql.ResolveParams) ([]string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.([]string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'subscriptions'") + } + return ret, err +} + +// Deregister implements response to request for 'deregister' field. +func (_ CoreV3EntityConfigAliases) Deregister(p graphql.ResolveParams) (bool, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(bool) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'deregister'") + } + return ret, err +} + +// Deregistration implements response to request for 'deregistration' field. +func (_ CoreV3EntityConfigAliases) Deregistration(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// Keepalive_handlers implements response to request for 'keepalive_handlers' field. +func (_ CoreV3EntityConfigAliases) Keepalive_handlers(p graphql.ResolveParams) ([]string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.([]string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'keepalive_handlers'") + } + return ret, err +} + +// Redact implements response to request for 'redact' field. +func (_ CoreV3EntityConfigAliases) Redact(p graphql.ResolveParams) ([]string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.([]string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'redact'") + } + return ret, err +} + +// CoreV3EntityConfigType EntityConfig represents entity configuration. +var CoreV3EntityConfigType = graphql.NewType("CoreV3EntityConfig", graphql.ObjectKind) + +// RegisterCoreV3EntityConfig registers CoreV3EntityConfig object type with given service. +func RegisterCoreV3EntityConfig(svc *graphql.Service, impl CoreV3EntityConfigFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV3EntityConfigDesc, impl) +} +func _ObjTypeCoreV3EntityConfigMetadataHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Metadata(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Metadata(frp) + } +} + +func _ObjTypeCoreV3EntityConfigEntity_classHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Entity_class(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Entity_class(frp) + } +} + +func _ObjTypeCoreV3EntityConfigUserHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + User(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.User(frp) + } +} + +func _ObjTypeCoreV3EntityConfigSubscriptionsHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Subscriptions(p graphql.ResolveParams) ([]string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Subscriptions(frp) + } +} + +func _ObjTypeCoreV3EntityConfigDeregisterHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Deregister(p graphql.ResolveParams) (bool, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Deregister(frp) + } +} + +func _ObjTypeCoreV3EntityConfigDeregistrationHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Deregistration(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Deregistration(frp) + } +} + +func _ObjTypeCoreV3EntityConfigKeepalive_handlersHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Keepalive_handlers(p graphql.ResolveParams) ([]string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Keepalive_handlers(frp) + } +} + +func _ObjTypeCoreV3EntityConfigRedactHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Redact(p graphql.ResolveParams) ([]string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Redact(frp) + } +} + +func _ObjectTypeCoreV3EntityConfigConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "EntityConfig represents entity configuration.", + Fields: graphql1.Fields{ + "deregister": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Deregister, if true, will result in the entity being deleted when the\nentity is an agent, and the agent disconnects its session.", + Name: "deregister", + Type: graphql1.NewNonNull(graphql1.Boolean), + }, + "deregistration": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Deregistration contains configuration for Sensu entity de-registration.", + Name: "deregistration", + Type: graphql1.NewNonNull(graphql.OutputType("CoreV2Deregistration")), + }, + "entity_class": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "EntityClass represents the class of the entity. It can be \"agent\",\n\"proxy\", or \"backend\".", + Name: "entity_class", + Type: graphql1.NewNonNull(graphql1.String), + }, + "keepalive_handlers": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "KeepaliveHandlers contains a list of handlers to use for the entity's\nkeepalive events.", + Name: "keepalive_handlers", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), + }, + "metadata": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Metadata contains the name, namespace, labels and annotations of the\nentity.", + Name: "metadata", + Type: graphql.OutputType("ObjectMeta"), + }, + "redact": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Redact contains the fields to redact on the entity, if the entity is an]\nagent entity.", + Name: "redact", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), + }, + "subscriptions": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Subscriptions are a weak relationship between entities and checks. The\nscheduler uses subscriptions to make entities to checks when scheduling.", + Name: "subscriptions", + Type: graphql1.NewNonNull(graphql1.NewList(graphql1.NewNonNull(graphql1.String))), + }, + "user": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "User is the username the entity is connecting as, if the entity is an\nagent entity.", + Name: "user", + Type: graphql1.NewNonNull(graphql1.String), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV3EntityConfigFieldResolvers.") + }, + Name: "CoreV3EntityConfig", + } +} + +// describe CoreV3EntityConfig's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV3EntityConfigDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV3EntityConfigConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "deregister": _ObjTypeCoreV3EntityConfigDeregisterHandler, + "deregistration": _ObjTypeCoreV3EntityConfigDeregistrationHandler, + "entity_class": _ObjTypeCoreV3EntityConfigEntity_classHandler, + "keepalive_handlers": _ObjTypeCoreV3EntityConfigKeepalive_handlersHandler, + "metadata": _ObjTypeCoreV3EntityConfigMetadataHandler, + "redact": _ObjTypeCoreV3EntityConfigRedactHandler, + "subscriptions": _ObjTypeCoreV3EntityConfigSubscriptionsHandler, + "user": _ObjTypeCoreV3EntityConfigUserHandler, + }, +} + +// +// CoreV3EntityStateFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV3EntityState' type. +type CoreV3EntityStateFieldResolvers interface { + // Metadata implements response to request for 'metadata' field. + Metadata(p graphql.ResolveParams) (interface{}, error) + + // System implements response to request for 'system' field. + System(p graphql.ResolveParams) (interface{}, error) + + // Last_seen implements response to request for 'last_seen' field. + Last_seen(p graphql.ResolveParams) (int, error) + + // Sensu_agent_version implements response to request for 'sensu_agent_version' field. + Sensu_agent_version(p graphql.ResolveParams) (string, error) +} + +// CoreV3EntityStateAliases implements all methods on CoreV3EntityStateFieldResolvers interface by using reflection to +// match name of field to a field on the given value. Intent is reduce friction +// of writing new resolvers by removing all the instances where you would simply +// have the resolvers method return a field. +type CoreV3EntityStateAliases struct{} + +// Metadata implements response to request for 'metadata' field. +func (_ CoreV3EntityStateAliases) Metadata(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// System implements response to request for 'system' field. +func (_ CoreV3EntityStateAliases) System(p graphql.ResolveParams) (interface{}, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + return val, err +} + +// Last_seen implements response to request for 'last_seen' field. +func (_ CoreV3EntityStateAliases) Last_seen(p graphql.ResolveParams) (int, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := graphql1.Int.ParseValue(val).(int) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'last_seen'") + } + return ret, err +} + +// Sensu_agent_version implements response to request for 'sensu_agent_version' field. +func (_ CoreV3EntityStateAliases) Sensu_agent_version(p graphql.ResolveParams) (string, error) { + val, err := graphql.DefaultResolver(p.Source, p.Info.FieldName) + ret, ok := val.(string) + if err != nil { + return ret, err + } + if !ok { + return ret, errors.New("unable to coerce value for field 'sensu_agent_version'") + } + return ret, err +} + +/* +CoreV3EntityStateType EntityState represents entity state. Unlike configuration, state is +typically only maintained for agent entities, although it can be maintained +for proxy entities in certain circumstances. +*/ +var CoreV3EntityStateType = graphql.NewType("CoreV3EntityState", graphql.ObjectKind) + +// RegisterCoreV3EntityState registers CoreV3EntityState object type with given service. +func RegisterCoreV3EntityState(svc *graphql.Service, impl CoreV3EntityStateFieldResolvers) { + svc.RegisterObject(_ObjectTypeCoreV3EntityStateDesc, impl) +} +func _ObjTypeCoreV3EntityStateMetadataHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Metadata(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Metadata(frp) + } +} + +func _ObjTypeCoreV3EntityStateSystemHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + System(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.System(frp) + } +} + +func _ObjTypeCoreV3EntityStateLast_seenHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Last_seen(p graphql.ResolveParams) (int, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Last_seen(frp) + } +} + +func _ObjTypeCoreV3EntityStateSensu_agent_versionHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Sensu_agent_version(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Sensu_agent_version(frp) + } +} + +func _ObjectTypeCoreV3EntityStateConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "EntityState represents entity state. Unlike configuration, state is\ntypically only maintained for agent entities, although it can be maintained\nfor proxy entities in certain circumstances.", + Fields: graphql1.Fields{ + "last_seen": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "LastSeen is a unix timestamp that represents when the entity was last\nobserved by the keepalive system.", + Name: "last_seen", + Type: graphql1.NewNonNull(graphql1.Int), + }, + "metadata": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Metadata contains the name, namespace, labels and annotations of the\nentity.", + Name: "metadata", + Type: graphql.OutputType("ObjectMeta"), + }, + "sensu_agent_version": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "SensuAgentVersion is the sensu-agent version.", + Name: "sensu_agent_version", + Type: graphql1.NewNonNull(graphql1.String), + }, + "system": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "System contains information about the system that the Agent process\nis running on, used for additional Entity context.", + Name: "system", + Type: graphql1.NewNonNull(graphql.OutputType("CoreV2System")), + }, + }, + Interfaces: []*graphql1.Interface{}, + IsTypeOf: func(_ graphql1.IsTypeOfParams) bool { + // NOTE: + // Panic by default. Intent is that when Service is invoked, values of + // these fields are updated with instantiated resolvers. If these + // defaults are called it is most certainly programmer err. + // If you're see this comment then: 'Whoops! Sorry, my bad.' + panic("Unimplemented; see CoreV3EntityStateFieldResolvers.") + }, + Name: "CoreV3EntityState", + } +} + +// describe CoreV3EntityState's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectTypeCoreV3EntityStateDesc = graphql.ObjectDesc{ + Config: _ObjectTypeCoreV3EntityStateConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "last_seen": _ObjTypeCoreV3EntityStateLast_seenHandler, + "metadata": _ObjTypeCoreV3EntityStateMetadataHandler, + "sensu_agent_version": _ObjTypeCoreV3EntityStateSensu_agent_versionHandler, + "system": _ObjTypeCoreV3EntityStateSystemHandler, + }, +} diff --git a/backend/apid/graphql/schema/corev3.gen.graphql b/backend/apid/graphql/schema/corev3.gen.graphql new file mode 100644 index 0000000000..8d0cfafdb9 --- /dev/null +++ b/backend/apid/graphql/schema/corev3.gen.graphql @@ -0,0 +1,79 @@ +# automatically generated file, do not edit! + +"""EntityConfig represents entity configuration.""" +type CoreV3EntityConfig { + + """ + Metadata contains the name, namespace, labels and annotations of the + entity. + """ + metadata: ObjectMeta + + """ + EntityClass represents the class of the entity. It can be "agent", + "proxy", or "backend". + """ + entity_class: String! + + """ + User is the username the entity is connecting as, if the entity is an + agent entity. + """ + user: String! + + """ + Subscriptions are a weak relationship between entities and checks. The + scheduler uses subscriptions to make entities to checks when scheduling. + """ + subscriptions: [String!]! + + """ + Deregister, if true, will result in the entity being deleted when the + entity is an agent, and the agent disconnects its session. + """ + deregister: Boolean! + + """Deregistration contains configuration for Sensu entity de-registration.""" + deregistration: CoreV2Deregistration! + + """ + KeepaliveHandlers contains a list of handlers to use for the entity's + keepalive events. + """ + keepalive_handlers: [String!]! + + """ + Redact contains the fields to redact on the entity, if the entity is an] + agent entity. + """ + redact: [String!]! +} + +""" +EntityState represents entity state. Unlike configuration, state is +typically only maintained for agent entities, although it can be maintained +for proxy entities in certain circumstances. +""" +type CoreV3EntityState { + + """ + Metadata contains the name, namespace, labels and annotations of the + entity. + """ + metadata: ObjectMeta + + """ + System contains information about the system that the Agent process + is running on, used for additional Entity context. + """ + system: CoreV2System! + + """ + LastSeen is a unix timestamp that represents when the entity was last + observed by the keepalive system. + """ + last_seen: Int! + + """SensuAgentVersion is the sensu-agent version.""" + sensu_agent_version: String! +} diff --git a/backend/apid/graphql/schema/corev3.gql.go b/backend/apid/graphql/schema/corev3.gql.go new file mode 100644 index 0000000000..d8e3fe2a4f --- /dev/null +++ b/backend/apid/graphql/schema/corev3.gql.go @@ -0,0 +1,226 @@ +// Code generated by scripts/gengraphql.go. DO NOT EDIT. + +package schema + +import ( + graphql1 "github.com/graphql-go/graphql" + graphql "github.com/sensu/sensu-go/graphql" +) + +// +// CoreV3EntityConfigExtensionOverridesFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV3EntityConfigExtensionOverrides' type. +type CoreV3EntityConfigExtensionOverridesFieldResolvers interface { + // ID implements response to request for 'id' field. + ID(p graphql.ResolveParams) (string, error) + + // ToJSON implements response to request for 'toJSON' field. + ToJSON(p graphql.ResolveParams) (interface{}, error) + + // State implements response to request for 'state' field. + State(p graphql.ResolveParams) (interface{}, error) + + // ToCoreV2Entity implements response to request for 'toCoreV2Entity' field. + ToCoreV2Entity(p graphql.ResolveParams) (interface{}, error) +} + +// RegisterCoreV3EntityConfigExtensionOverrides registers CoreV3EntityConfigExtensionOverrides object type with given service. +func RegisterCoreV3EntityConfigExtensionOverrides(svc *graphql.Service, impl CoreV3EntityConfigExtensionOverridesFieldResolvers) { + svc.RegisterObjectExtension(_ObjectExtensionTypeCoreV3EntityConfigExtensionOverridesDesc, impl) +} + +func _ObjTypeCoreV3EntityConfigExtensionOverridesIDHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ID(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ID(frp) + } +} + +func _ObjTypeCoreV3EntityConfigExtensionOverridesToJSONHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ToJSON(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ToJSON(frp) + } +} + +func _ObjTypeCoreV3EntityConfigExtensionOverridesStateHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + State(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.State(frp) + } +} + +func _ObjTypeCoreV3EntityConfigExtensionOverridesToCoreV2EntityHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ToCoreV2Entity(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ToCoreV2Entity(frp) + } +} + +func _ObjectExtensionTypeCoreV3EntityConfigExtensionOverridesConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "", + Fields: graphql1.Fields{ + "id": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Unique global identifier used to reference resource.", + Name: "id", + Type: graphql1.NewNonNull(graphql1.ID), + }, + "state": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Corresponding entity state, if applicable.", + Name: "state", + Type: graphql.OutputType("CoreV3EntityState"), + }, + "toCoreV2Entity": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Represented as core/v2 Entity.", + Name: "toCoreV2Entity", + Type: graphql.OutputType("Entity"), + }, + "toJSON": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "toJSON returns a REST API compatible representation of the resource. Handy for\nsharing snippets that can then be imported with `sensuctl create`.", + Name: "toJSON", + Type: graphql1.NewNonNull(graphql.OutputType("JSON")), + }, + }, + Interfaces: []*graphql1.Interface{ + graphql.Interface("Node"), + graphql.Interface("Resource")}, + Name: "CoreV3EntityConfig", + } +} + +// describe CoreV3EntityConfigExtensionOverrides's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectExtensionTypeCoreV3EntityConfigExtensionOverridesDesc = graphql.ObjectDesc{ + Config: _ObjectExtensionTypeCoreV3EntityConfigExtensionOverridesConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "id": _ObjTypeCoreV3EntityConfigExtensionOverridesIDHandler, + "state": _ObjTypeCoreV3EntityConfigExtensionOverridesStateHandler, + "toCoreV2Entity": _ObjTypeCoreV3EntityConfigExtensionOverridesToCoreV2EntityHandler, + "toJSON": _ObjTypeCoreV3EntityConfigExtensionOverridesToJSONHandler, + }, +} + +// +// CoreV3EntityStateExtensionOverridesFieldResolvers represents a collection of methods whose products represent the +// response values of the 'CoreV3EntityStateExtensionOverrides' type. +type CoreV3EntityStateExtensionOverridesFieldResolvers interface { + // ID implements response to request for 'id' field. + ID(p graphql.ResolveParams) (string, error) + + // ToJSON implements response to request for 'toJSON' field. + ToJSON(p graphql.ResolveParams) (interface{}, error) + + // Config implements response to request for 'config' field. + Config(p graphql.ResolveParams) (interface{}, error) + + // ToCoreV2Entity implements response to request for 'toCoreV2Entity' field. + ToCoreV2Entity(p graphql.ResolveParams) (interface{}, error) +} + +// RegisterCoreV3EntityStateExtensionOverrides registers CoreV3EntityStateExtensionOverrides object type with given service. +func RegisterCoreV3EntityStateExtensionOverrides(svc *graphql.Service, impl CoreV3EntityStateExtensionOverridesFieldResolvers) { + svc.RegisterObjectExtension(_ObjectExtensionTypeCoreV3EntityStateExtensionOverridesDesc, impl) +} + +func _ObjTypeCoreV3EntityStateExtensionOverridesIDHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ID(p graphql.ResolveParams) (string, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ID(frp) + } +} + +func _ObjTypeCoreV3EntityStateExtensionOverridesToJSONHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ToJSON(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ToJSON(frp) + } +} + +func _ObjTypeCoreV3EntityStateExtensionOverridesConfigHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + Config(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.Config(frp) + } +} + +func _ObjTypeCoreV3EntityStateExtensionOverridesToCoreV2EntityHandler(impl interface{}) graphql1.FieldResolveFn { + resolver := impl.(interface { + ToCoreV2Entity(p graphql.ResolveParams) (interface{}, error) + }) + return func(frp graphql1.ResolveParams) (interface{}, error) { + return resolver.ToCoreV2Entity(frp) + } +} + +func _ObjectExtensionTypeCoreV3EntityStateExtensionOverridesConfigFn() graphql1.ObjectConfig { + return graphql1.ObjectConfig{ + Description: "", + Fields: graphql1.Fields{ + "config": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Corresponding entity config, if applicable.", + Name: "config", + Type: graphql.OutputType("CoreV3EntityConfig"), + }, + "id": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Unique global identifier used to reference resource.", + Name: "id", + Type: graphql1.NewNonNull(graphql1.ID), + }, + "toCoreV2Entity": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "Represented as core/v2 Entity.", + Name: "toCoreV2Entity", + Type: graphql.OutputType("Entity"), + }, + "toJSON": &graphql1.Field{ + Args: graphql1.FieldConfigArgument{}, + DeprecationReason: "", + Description: "toJSON returns a REST API compatible representation of the resource. Handy for\nsharing snippets that can then be imported with `sensuctl create`.", + Name: "toJSON", + Type: graphql1.NewNonNull(graphql.OutputType("JSON")), + }, + }, + Interfaces: []*graphql1.Interface{ + graphql.Interface("Node"), + graphql.Interface("Resource")}, + Name: "CoreV3EntityState", + } +} + +// describe CoreV3EntityStateExtensionOverrides's configuration; kept private to avoid unintentional tampering of configuration at runtime. +var _ObjectExtensionTypeCoreV3EntityStateExtensionOverridesDesc = graphql.ObjectDesc{ + Config: _ObjectExtensionTypeCoreV3EntityStateExtensionOverridesConfigFn, + FieldHandlers: map[string]graphql.FieldHandler{ + "config": _ObjTypeCoreV3EntityStateExtensionOverridesConfigHandler, + "id": _ObjTypeCoreV3EntityStateExtensionOverridesIDHandler, + "toCoreV2Entity": _ObjTypeCoreV3EntityStateExtensionOverridesToCoreV2EntityHandler, + "toJSON": _ObjTypeCoreV3EntityStateExtensionOverridesToJSONHandler, + }, +} diff --git a/backend/apid/graphql/schema/corev3.graphql b/backend/apid/graphql/schema/corev3.graphql new file mode 100644 index 0000000000..6b4c7df963 --- /dev/null +++ b/backend/apid/graphql/schema/corev3.graphql @@ -0,0 +1,41 @@ +extend type CoreV3EntityConfig implements Node & Resource @named(suffix: "Overrides") { + "Unique global identifier used to reference resource." + id: ID! + + """ + toJSON returns a REST API compatible representation of the resource. Handy for + sharing snippets that can then be imported with `sensuctl create`. + """ + toJSON: JSON! + + """ + Corresponding entity state, if applicable. + """ + state: CoreV3EntityState + + """ + Represented as core/v2 Entity. + """ + toCoreV2Entity: Entity +} + +extend type CoreV3EntityState implements Node & Resource @named(suffix: "Overrides") { + "Unique global identifier used to reference resource." + id: ID! + + """ + toJSON returns a REST API compatible representation of the resource. Handy for + sharing snippets that can then be imported with `sensuctl create`. + """ + toJSON: JSON! + + """ + Corresponding entity config, if applicable. + """ + config: CoreV3EntityConfig + + """ + Represented as core/v2 Entity. + """ + toCoreV2Entity: Entity +} diff --git a/backend/apid/graphql/schema/schema_gen.go b/backend/apid/graphql/schema/schema_gen.go index 9dbdb75431..f2367eec99 100644 --- a/backend/apid/graphql/schema/schema_gen.go +++ b/backend/apid/graphql/schema/schema_gen.go @@ -1,4 +1,5 @@ package schema -//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types AssetBuild,ClusterRole,ClusterRoleBinding,Pipeline,PipelineWorkflow,ResourceReference,Role,RoleBinding,RoleRef,Rule,Secret,Subject -pkg-path ../../../../api/core/v2 -o ./corev2.gen.graphql +//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types AssetBuild,ClusterRole,ClusterRoleBinding,Deregistration,Network,NetworkInterface,Pipeline,PipelineWorkflow,Process,ResourceReference,Role,RoleBinding,RoleRef,Rule,Secret,Subject,System -pkg-path ../../../../api/core/v2 -o ./corev2.gen.graphql +//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types EntityConfig,EntityState -pkg-path ../../../../api/core/v3 -o ./corev3.gen.graphql //go:generate go run github.com/sensu/sensu-go/scripts/gengraphql . diff --git a/backend/apid/graphql/service.go b/backend/apid/graphql/service.go index d45176757c..5aec88aa86 100644 --- a/backend/apid/graphql/service.go +++ b/backend/apid/graphql/service.go @@ -70,11 +70,20 @@ func NewService(cfg ServiceConfig) (*Service, error) { schema.RegisterAsset(svc, &assetImpl{}) schema.RegisterBackendEntity(svc, &backendEntityImpl{}) schema.RegisterCoreV2AssetBuild(svc, &schema.CoreV2AssetBuildAliases{}) + schema.RegisterCoreV2Deregistration(svc, &schema.CoreV2DeregistrationAliases{}) + schema.RegisterCoreV2Network(svc, &schema.CoreV2NetworkAliases{}) + schema.RegisterCoreV2NetworkInterface(svc, &schema.CoreV2NetworkInterfaceAliases{}) schema.RegisterCoreV2Pipeline(svc, &corev2PipelineImpl{}) schema.RegisterCoreV2PipelineExtensionOverrides(svc, &corev2PipelineImpl{}) schema.RegisterCoreV2PipelineWorkflow(svc, &schema.CoreV2PipelineWorkflowAliases{}) + schema.RegisterCoreV2Process(svc, &schema.CoreV2ProcessAliases{}) schema.RegisterCoreV2ResourceReference(svc, &schema.CoreV2ResourceReferenceAliases{}) schema.RegisterCoreV2Secret(svc, &schema.CoreV2SecretAliases{}) + schema.RegisterCoreV2System(svc, &schema.CoreV2SystemAliases{}) + schema.RegisterCoreV3EntityConfig(svc, &corev3EntityConfigImpl{}) + schema.RegisterCoreV3EntityConfigExtensionOverrides(svc, &corev3EntityConfigExtImpl{client: cfg.GenericClient, entityClient: cfg.EntityClient}) + schema.RegisterCoreV3EntityState(svc, &corev3EntityStateImpl{}) + schema.RegisterCoreV3EntityStateExtensionOverrides(svc, &corev3EntityStateExtImpl{client: cfg.GenericClient, entityClient: cfg.EntityClient}) schema.RegisterNamespace(svc, &namespaceImpl{client: cfg.NamespaceClient, entityClient: cfg.EntityClient, eventClient: cfg.EventClient, serviceConfig: &cfg}) schema.RegisterErrCode(svc) schema.RegisterEvent(svc, &eventImpl{}) diff --git a/backend/apid/graphql/service_test.go b/backend/apid/graphql/service_test.go index 802a43986d..40d1c7e62b 100644 --- a/backend/apid/graphql/service_test.go +++ b/backend/apid/graphql/service_test.go @@ -23,6 +23,14 @@ func TestNewService(t *testing.T) { assert.NotEmpty(t, svc) } +// a smoke test to ensure that the service generation is idempotent +func TestServiceRegenerate(t *testing.T) { + svc, err := NewService(ServiceConfig{}) + require.NoError(t, err) + err = svc.Target.Regenerate() + assert.NoError(t, err) +} + func TestInitHooks(t *testing.T) { flag := false rollback := addHook(func(svc *graphql.Service, cfg ServiceConfig) { diff --git a/backend/backend.go b/backend/backend.go index a16aedc22f..a7c1af23cf 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -595,7 +595,7 @@ func Initialize(ctx context.Context, config *Config) (*Backend, error) { RBACClient: api.NewRBACClient(b.Store, auth), VersionController: actions.NewVersionController(clusterVersion), MetricGatherer: prometheus.DefaultGatherer, - GenericClient: &api.GenericClient{Store: b.Store, Auth: auth}, + GenericClient: &api.GenericClient{Store: b.Store, StoreV2: b.StoreV2, Auth: auth}, }) if err != nil { return nil, fmt.Errorf("error initializing graphql.Service: %s", err) diff --git a/graphql/service.go b/graphql/service.go index 759e6e2f63..ad6bf606c8 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -343,9 +343,24 @@ func mergeObjectConfig(a, b *graphql.ObjectConfig) { af := a.Fields.(graphql.Fields) bf := b.Fields.(graphql.Fields) for n, f := range bf { - af[n] = f + copy := *f + af[n] = © } - ai := a.Interfaces.([]*graphql.Interface) - bi := b.Interfaces.([]*graphql.Interface) - a.Interfaces = append(ai, bi...) + // merge any missing interfaces + ias := a.Interfaces.([]*graphql.Interface) + ibs := b.Interfaces.([]*graphql.Interface) + for _, ib := range ibs { + var ok bool + for _, ia := range ias { + if ia.PrivateName != ib.PrivateName { + continue + } + ok = true + break + } + if !ok { + ias = append(ias, Interface(ib.PrivateName)) + } + } + a.Interfaces = ias } From 7d5ee49ab66e74c1b19164da342ab0b785a55941 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 23 Aug 2022 13:33:59 -0700 Subject: [PATCH 060/173] update changelog for 6.8.0 release (#4851) Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index b84b216c8f..51cfc1f397 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## Unreleased +## [6.8.0] - 2022-08-24 ### Changed - Eventd now prioritizes keepalive events over other events in order to From 25a060dd339e2b9e75bf93c3683f85c30c3e922b Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Fri, 26 Aug 2022 14:46:07 -0700 Subject: [PATCH 061/173] Fix multi-expression "Deny" filters (#4852) This makes it so multi-expression Deny filters are correctly evaluated: their expressions are OR'd together to decide whether to filter or not. (cherry picked from commit 788edc042866cecc2d34a1289a0003cdecb923d4) Signed-off-by: Cyril Cressent --- CHANGELOG-6.md | 6 ++ backend/pipeline/filter/legacy.go | 79 +++++++++++++++----------- backend/pipeline/filter/legacy_test.go | 53 ++++++++++++++++- 3 files changed, 104 insertions(+), 34 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 51cfc1f397..7304207f74 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed +- Fixed an issue where multi-expression exclusive "Deny" filters were not + evaluated as described in the documentation. + ## [6.8.0] - 2022-08-24 ### Changed diff --git a/backend/pipeline/filter/legacy.go b/backend/pipeline/filter/legacy.go index 7d411ce47e..fe644ea687 100644 --- a/backend/pipeline/filter/legacy.go +++ b/backend/pipeline/filter/legacy.go @@ -114,6 +114,7 @@ func evaluateEventFilter(ctx context.Context, event *corev2.Event, filter *corev event.Entity = event.Entity.GetRedactedEntity() fields := event.LogFields(false) + fields["action"] = filter.Action fields["filter"] = filter.Name fields["assets"] = filter.RuntimeAssets fields["pipeline"] = corev2.ContextPipeline(ctx) @@ -132,9 +133,9 @@ func evaluateEventFilter(ctx context.Context, event *corev2.Event, filter *corev return true } - if filter.Action == corev2.EventFilterActionDeny && !inWindows { - logger.WithFields(fields).Debug("allowing event outside of filtering window") - return false + if filter.Action == corev2.EventFilterActionDeny && inWindows { + logger.WithFields(fields).Debug("denying event inside of filtering window") + return true } } @@ -166,43 +167,57 @@ func evaluateEventFilter(ctx context.Context, event *corev2.Event, filter *corev Funcs: PipelineFilterFuncs, } - for _, expression := range filter.Expressions { - match, err := env.Eval(ctx, expression) - if err != nil { - logger.WithFields(fields).WithError(err).Error("error evaluating javascript event filter") - continue - } - - // Allow - One of the expressions did not match, filter the event - if filter.Action == corev2.EventFilterActionAllow && !match { - logger.WithFields(fields).Debug("denying event that does not match filter") - return true - } + switch filter.Action { + // Inclusive "Allow" filters let events through when the AND'd combination + // of their expressions is true. That is, events that match all of the + // expressions are not filtered. + case corev2.EventFilterActionAllow: + + for _, expression := range filter.Expressions { + match, err := env.Eval(ctx, expression) + if err != nil { + logger.WithFields(fields).WithError(err).Error("error evaluating javascript event filter") + continue + } - // Deny - One of the expressions did not match, do not filter the event - if filter.Action == corev2.EventFilterActionDeny && !match { - logger.WithFields(fields).Debug("allowing event that does not match filter") - return false + // One of the expressions did not match, filter the event + if !match { + logger.WithFields(fields).Debug("denying event that does not match filter") + return true + } } - } - // Allow - All of the expressions matched, do not filter the event - if filter.Action == corev2.EventFilterActionAllow { + // All the expressions matched, do not filter the event logger.WithFields(fields).Debug("allowing event that matches filter") return false - } - // Deny - All of the expressions matched, filter the event - if filter.Action == corev2.EventFilterActionDeny { - logger.WithFields(fields).Debug("denying event that matches filter") - return true - } + // Exclusive "Deny" filters let events through when the OR'd combination of + // their expressions is true. That is, events that match one or more of the + // expressions are filtered. + case corev2.EventFilterActionDeny: - // Something weird happened, let's not filter the event and log a warning message - logger.WithFields(fields). - Warn("not filtering event due to unhandled case") + for _, expression := range filter.Expressions { + match, err := env.Eval(ctx, expression) + if err != nil { + logger.WithFields(fields).WithError(err).Error("error evaluating javascript event filter") + continue + } - return false + // One of the expressions matched, filter the event + if match { + logger.WithFields(fields).Debug("denying event that matches filter") + return true + } + } + + // None of the expressions matched, do not filter the event + logger.WithFields(fields).Debug("allowing event that does not match filter") + return false + + default: + logger.WithFields(fields).Error("unrecognized filter action") + return false + } } type FilterExecutionEnvironment struct { diff --git a/backend/pipeline/filter/legacy_test.go b/backend/pipeline/filter/legacy_test.go index d76b0359d5..3a8ac9485f 100644 --- a/backend/pipeline/filter/legacy_test.go +++ b/backend/pipeline/filter/legacy_test.go @@ -219,7 +219,7 @@ func TestLegacyAdapter_Filter(t *testing.T) { wantErr: false, }, { - name: "deny filters allow events that only match some expressions", + name: "deny filters deny events that only match some expressions", args: newArgs(), fields: fields{ Store: func() store.Store { @@ -232,7 +232,7 @@ func TestLegacyAdapter_Filter(t *testing.T) { return stor }(), }, - want: false, + want: true, wantErr: false, }, } @@ -267,6 +267,55 @@ func Test_evaluateEventFilter(t *testing.T) { args args want bool }{ + { + name: "inclusive filter expressions are AND'd", + args: args{ + ctx: context.Background(), + event: corev2.FixtureEvent("entity1", "my-check"), + filter: func() *corev2.EventFilter { + filter := &corev2.EventFilter{ + ObjectMeta: corev2.ObjectMeta{ + Name: "inclusive-filter", + }, + Action: corev2.EventFilterActionAllow, + Expressions: []string{ + "event.check.name != 'check-foo'", + "event.check.name != 'check-bar'", + "event.check.name != 'check-baz'", + }, + } + return filter + }(), + }, + // The event should not be filtered, since the AND combination of + // the filter expressions is true and this is an inclusive "Allow" + // filter + want: false, + }, + { + name: "exclusive filter expressions are OR'd", + args: args{ + ctx: context.Background(), + event: corev2.FixtureEvent("entity1", "check-bar"), + filter: func() *corev2.EventFilter { + filter := &corev2.EventFilter{ + ObjectMeta: corev2.ObjectMeta{ + Name: "exclusive-filter", + }, + Action: corev2.EventFilterActionDeny, + Expressions: []string{ + "event.check.name == 'check-foo'", + "event.check.name == 'check-bar'", + "event.check.name == 'check-baz'", + }, + } + return filter + }(), + }, + // The event should be filtered, since the OR combination of the + // filter expressions is true and this in an exclusive "Deny" filter + want: true, + }, { name: "returns false when an event is within a time window with action allow", args: args{ From 19e416643ccae1821016b8f4e10576237101ff52 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Thu, 8 Sep 2022 13:03:13 -0700 Subject: [PATCH 062/173] Update Check Subdues to allow for overlapping intervals (#4859) Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 6 +++ api/core/v2/time_window.go | 9 ++-- api/core/v2/time_window_test.go | 93 +++++++++++++++++++++------------ 3 files changed, 73 insertions(+), 35 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 51cfc1f397..878c42febd 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed +- Check subdues are now evaluated on a half open interval such that there +should be no unintended gaps between overlapping subdues. + ## [6.8.0] - 2022-08-24 ### Changed diff --git a/api/core/v2/time_window.go b/api/core/v2/time_window.go index 5d82e81460..2e6280af4d 100644 --- a/api/core/v2/time_window.go +++ b/api/core/v2/time_window.go @@ -257,8 +257,9 @@ func (t *TimeWindowRepeated) inAbsoluteTimeRange(actualTime time.Time) bool { if err != nil { return false } + endTime = endTime.Add(time.Second) - return actualTime.After(beginTime) && actualTime.Before(endTime) + return !actualTime.Before(beginTime) && actualTime.Before(endTime) } func (t *TimeWindowRepeated) inDayTimeRange(actualTime time.Time, weekday time.Weekday) bool { @@ -284,9 +285,10 @@ func (t *TimeWindowRepeated) inDayTimeRange(actualTime time.Time, weekday time.W thisWeekBegin = thisWeekBegin.AddDate(0, 0, dayOffset) thisWeekEnd := thisWeekBegin.Add(duration) + thisWeekEnd = thisWeekEnd.Add(time.Second) thisWeekEnd.In(beginTime.Location()) - return actualTime.After(thisWeekBegin) && actualTime.Before(thisWeekEnd) + return !actualTime.Before(thisWeekBegin) && actualTime.Before(thisWeekEnd) } func (t *TimeWindowRepeated) inTimeRange(actualTime time.Time) bool { @@ -310,8 +312,9 @@ func (t *TimeWindowRepeated) inTimeRange(actualTime time.Time) bool { todayBegin := time.Date(actualTime.Year(), actualTime.Month(), actualTime.Day(), beginHour, beginMin, beginSec, 0, beginTime.Location()) todayEnd := todayBegin.Add(duration) todayEnd = todayEnd.In(beginTime.Location()) + todayEnd = todayEnd.Add(time.Second) - return actualTime.After(todayBegin) && actualTime.Before(todayEnd) + return !actualTime.Before(todayBegin) && actualTime.Before(todayEnd) } func (t *TimeWindowRepeated) inWeekdayTimeRange(actualTime time.Time) bool { diff --git a/api/core/v2/time_window_test.go b/api/core/v2/time_window_test.go index b4465b2b92..df691d9f9b 100644 --- a/api/core/v2/time_window_test.go +++ b/api/core/v2/time_window_test.go @@ -275,12 +275,21 @@ func TestTimeWindowRepeated_InWindows(t *testing.T) { assert.NotNil(t, location) } +func parseTime(t *testing.T, s string) time.Time { + ts, err := time.Parse(time.RFC3339, s) + if err != nil { + t.Fatal(err) + } + return ts +} + func TestTimeWindowRepeated_InDayTimeRange(t *testing.T) { + tests := []struct { name string beginTime string endTime string - actualTime string + actualTime time.Time weekday time.Weekday expectedResult bool }{ @@ -288,107 +297,121 @@ func TestTimeWindowRepeated_InDayTimeRange(t *testing.T) { "simple positive", "2022-03-22T09:00:00+00:00", // tuesday "2022-03-22T11:00:00+00:00", - "2022-03-22T10:00:00+00:00", + parseTime(t, "2022-03-22T10:00:00+00:00"), time.Tuesday, true, }, { "simple negative lower hour", "2022-03-22T09:00:00+00:00", "2022-03-22T11:00:00+00:00", - "2022-03-22T08:00:00+00:00", + parseTime(t, "2022-03-22T08:00:00+00:00"), time.Tuesday, false, }, { "simple negative higher hour", "2022-03-22T09:00:00+00:00", "2022-03-22T11:00:00+00:00", - "2022-03-22T13:00:00+00:00", + parseTime(t, "2022-03-22T13:00:00+00:00"), time.Tuesday, false, }, { "simple negative lower minutes", "2022-03-22T09:00:00+00:00", "2022-03-22T11:00:00+00:00", - "2022-03-22T08:59:00+00:00", + parseTime(t, "2022-03-22T08:59:00+00:00"), time.Tuesday, false, }, { "simple negative higher minutes", "2022-03-22T09:00:00+00:00", "2022-03-22T11:00:00+00:00", - "2022-03-22T11:01:00+00:00", + parseTime(t, "2022-03-22T11:01:00+00:00"), time.Tuesday, false, }, { "simple negative lower seconds", "2022-03-22T09:00:00+00:00", "2022-03-22T11:00:00+00:00", - "2022-03-22T08:59:59+00:00", + parseTime(t, "2022-03-22T08:59:59+00:00"), time.Tuesday, false, }, { "simple negative higher seconds", "2022-03-22T09:00:00+00:00", "2022-03-22T11:00:00+00:00", - "2022-03-22T11:00:01+00:00", + parseTime(t, "2022-03-22T11:00:01+00:00"), time.Tuesday, false, }, { "simple negative different day before", "2022-03-22T09:00:00+00:00", "2022-03-22T11:00:00+00:00", - "2022-03-21T10:00:00+00:00", // monday + parseTime(t, "2022-03-21T10:00:00+00:00"), // monday time.Tuesday, false, }, { "simple negative different day after", "2022-03-22T09:00:00+00:00", "2022-03-22T11:00:00+00:00", - "2022-03-23T10:00:00+00:00", // wednesday + parseTime(t, "2022-03-23T10:00:00+00:00"), // wednesday time.Tuesday, false, }, { "positive next week", "2022-03-22T09:00:00-07:00", "2022-03-22T11:00:00-07:00", - "2022-03-29T10:00:00-07:00", // wednesday + parseTime(t, "2022-03-29T10:00:00-07:00"), // wednesday time.Tuesday, true, }, { "negative next week before", "2022-03-22T09:00:00-07:00", "2022-03-22T11:00:00-07:00", - "2022-03-27T10:00:00-07:00", // wednesday + parseTime(t, "2022-03-27T10:00:00-07:00"), // wednesday time.Tuesday, false, }, { "negative next week after", "2022-03-22T09:00:00-07:00", "2022-03-22T11:00:00-07:00", - "2022-03-30T10:00:00-07:00", // wednesday + parseTime(t, "2022-03-30T10:00:00-07:00"), // wednesday time.Tuesday, false, }, { "positive next week different time offset", "2022-03-22T09:00:00+00:00", "2022-03-22T11:00:00+00:00", - "2022-03-29T06:00:00-04:00", // wednesday + parseTime(t, "2022-03-29T06:00:00-04:00"), // wednesday time.Tuesday, true, }, { "positive multi days", "2022-03-22T09:00:00+00:00", "2022-03-24T11:00:00+00:00", - "2022-03-30T06:00:00-04:00", // wednesday + parseTime(t, "2022-03-30T06:00:00-04:00"), // wednesday time.Tuesday, true, }, { "negative previous week", "2022-03-22T09:00:00-04:00", "2022-03-22T11:00:00-04:00", - "2022-03-15T10:00:00-04:00", // tuesday + parseTime(t, "2022-03-15T10:00:00-04:00"), // tuesday time.Tuesday, false, + }, { + "GH-4847 lower bound day time range", + "2022-03-22T09:00:00+00:00", + "2022-03-22T11:00:00+00:00", + parseTime(t, "2022-03-22T09:00:00+00:00"), + time.Tuesday, + true, + }, { + "GH-4847 upper bound day time range", + "2022-03-22T09:00:00+00:00", + "2022-03-22T11:00:00+00:00", + parseTime(t, "2022-03-22T11:00:01+00:00").Add(-1 * time.Nanosecond), + time.Tuesday, + true, }, } @@ -399,10 +422,7 @@ func TestTimeWindowRepeated_InDayTimeRange(t *testing.T) { End: test.endTime, } - actualTime, err := time.Parse(time.RFC3339, test.actualTime) - require.NoError(t, err) - - assert.Equal(t, test.expectedResult, window.inDayTimeRange(actualTime, test.weekday)) + assert.Equal(t, test.expectedResult, window.inDayTimeRange(test.actualTime, test.weekday)) }) } } @@ -412,51 +432,63 @@ func TestTimeWindowRepeated_InTimeRange(t *testing.T) { name string beginTime string endTime string - actualTime string + actualTime time.Time expectedResult bool }{ { "simple positive", "2022-03-22T09:00:00+00:00", // tuesday "2022-03-22T11:00:00+00:00", - "2022-03-22T10:00:00+00:00", + parseTime(t, "2022-03-22T10:00:00+00:00"), true, }, { "negative before valid times", "2022-03-22T09:00:00-07:00", // tuesday "2022-03-22T11:00:00-07:00", - "2022-01-12T10:00:00-07:00", + parseTime(t, "2022-01-12T10:00:00-07:00"), false, }, { "simple negative before", "2022-03-22T09:00:00+00:00", // tuesday "2022-03-22T11:00:00+00:00", - "2022-03-22T08:00:00+00:00", + parseTime(t, "2022-03-22T08:00:00+00:00"), false, }, { "simple negative after", "2022-03-22T09:00:00+00:00", // tuesday "2022-03-22T11:00:00+00:00", - "2022-03-22T11:05:00+00:00", + parseTime(t, "2022-03-22T11:05:00+00:00"), false, }, { "positive after different day", "2022-03-22T09:00:00-07:00", // tuesday "2022-03-22T11:00:00-07:00", - "2023-01-12T10:00:00-07:00", + parseTime(t, "2023-01-12T10:00:00-07:00"), true, }, { "negative before different day", "2022-03-22T09:00:00-07:00", // tuesday "2022-03-22T11:00:00-07:00", - "2021-01-12T12:00:00-07:00", + parseTime(t, "2021-01-12T12:00:00-07:00"), false, }, { "negative after different day", "2022-03-22T09:00:00-07:00", // tuesday "2022-03-22T11:00:00-07:00", - "2023-01-12T08:59:59-07:00", + parseTime(t, "2023-01-12T08:59:59-07:00"), false, + }, { + "GH-4847 lower bound time range", + "2022-03-22T09:00:00+00:00", // tuesday + "2022-03-22T11:00:00+00:00", + parseTime(t, "2022-03-22T09:00:00+00:00"), + true, + }, { + "GH-4847 upper bound time range", + "2022-03-22T09:00:00+00:00", // tuesday + "2022-03-22T11:00:00+00:00", + parseTime(t, "2022-03-22T11:00:01+00:00").Add(-1 * time.Nanosecond), + true, }, } @@ -467,10 +499,7 @@ func TestTimeWindowRepeated_InTimeRange(t *testing.T) { End: test.endTime, } - actualTime, err := time.ParseInLocation(time.RFC3339, test.actualTime, time.UTC) - require.NoError(t, err) - - assert.Equal(t, test.expectedResult, window.inTimeRange(actualTime)) + assert.Equal(t, test.expectedResult, window.inTimeRange(test.actualTime)) }) } } From 7a13587fdcdaacdb94dbf477c375f20f26624d0f Mon Sep 17 00:00:00 2001 From: James Phillips Date: Mon, 12 Sep 2022 13:53:10 -0700 Subject: [PATCH 063/173] Redact entity configuration metadata (#4862) Signed-off-by: James Phillips --- api/core/v3/entity_config.go | 33 ++++++ api/core/v3/entity_config_test.go | 85 ++++++++++++++- api/core/v3/internal/strings/strings.go | 60 +++++++++++ api/core/v3/internal/strings/strings_test.go | 34 ++++++ api/core/v3/redacter.go | 7 ++ backend/api/generic.go | 14 ++- backend/api/generic_test.go | 108 +++++++++++++++++-- go.mod | 2 +- go.sum | 18 +--- 9 files changed, 332 insertions(+), 29 deletions(-) create mode 100644 api/core/v3/internal/strings/strings.go create mode 100644 api/core/v3/internal/strings/strings_test.go create mode 100644 api/core/v3/redacter.go diff --git a/api/core/v3/entity_config.go b/api/core/v3/entity_config.go index 1549dd4313..03e5e6f2b5 100644 --- a/api/core/v3/entity_config.go +++ b/api/core/v3/entity_config.go @@ -5,6 +5,7 @@ import ( "strings" corev2 "github.com/sensu/sensu-go/api/core/v2" + stringutil "github.com/sensu/sensu-go/api/core/v3/internal/strings" ) var entityConfigRBACName = (&corev2.Entity{}).RBACName() @@ -31,3 +32,35 @@ func MergeMapWithPrefix(a map[string]string, b map[string]string, prefix string) a[prefix+k] = v } } + +func redactMap(m map[string]string, redact []string) map[string]string { + if len(redact) == 0 { + redact = corev2.DefaultRedactFields + } + result := make(map[string]string, len(m)) + for k, v := range m { + if stringutil.FoundInArray(k, redact) { + result[k] = corev2.Redacted + } else { + result[k] = v + } + } + return result +} + +// ProduceRedacted redacts the entity according to the entity's Redact fields. +// A redacted copy is returned. The copy contains pointers to the original's +// memory, with different Labels and Annotations. +func (e *EntityConfig) ProduceRedacted() Resource { + if e == nil { + return nil + } + if e.Metadata == nil || (e.Metadata.Labels == nil && e.Metadata.Annotations == nil) { + return e + } + copy := &EntityConfig{} + *copy = *e + copy.Metadata.Annotations = redactMap(e.Metadata.Annotations, e.Redact) + copy.Metadata.Labels = redactMap(e.Metadata.Labels, e.Redact) + return copy +} diff --git a/api/core/v3/entity_config_test.go b/api/core/v3/entity_config_test.go index 568ce1508a..fbc00653ad 100644 --- a/api/core/v3/entity_config_test.go +++ b/api/core/v3/entity_config_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/sensu-go/api/core/v2" ) func TestEntityConfigFields(t *testing.T) { @@ -22,26 +22,26 @@ func TestEntityConfigFields(t *testing.T) { }, { name: "exposes deregister", - args: &EntityConfig{Metadata: &v2.ObjectMeta{}, Deregister: true}, + args: &EntityConfig{Metadata: &corev2.ObjectMeta{}, Deregister: true}, wantKey: "entity_config.deregister", want: "true", }, { name: "exposes class", - args: &EntityConfig{Metadata: &v2.ObjectMeta{}, EntityClass: "agent"}, + args: &EntityConfig{Metadata: &corev2.ObjectMeta{}, EntityClass: "agent"}, wantKey: "entity_config.entity_class", want: "agent", }, { name: "exposes subscriptions", - args: &EntityConfig{Metadata: &v2.ObjectMeta{}, Subscriptions: []string{"www", "unix"}}, + args: &EntityConfig{Metadata: &corev2.ObjectMeta{}, Subscriptions: []string{"www", "unix"}}, wantKey: "entity_config.subscriptions", want: "www,unix", }, { name: "exposes labels", args: &EntityConfig{ - Metadata: &v2.ObjectMeta{ + Metadata: &corev2.ObjectMeta{ Labels: map[string]string{"region": "philadelphia"}, }, }, @@ -58,3 +58,78 @@ func TestEntityConfigFields(t *testing.T) { }) } } + +func TestEntityConfig_ProduceRedacted(t *testing.T) { + tests := []struct { + name string + in *EntityConfig + want *EntityConfig + }{ + { + name: "nil metadata", + in: func() *EntityConfig { + cfg := FixtureEntityConfig("test") + cfg.Metadata = nil + return cfg + }(), + want: func() *EntityConfig { + cfg := FixtureEntityConfig("test") + cfg.Metadata = nil + return cfg + }(), + }, + { + name: "nothing to redact", + in: func() *EntityConfig { + cfg := FixtureEntityConfig("test") + cfg.Metadata.Labels["my_field"] = "test123" + return cfg + }(), + want: func() *EntityConfig { + cfg := FixtureEntityConfig("test") + cfg.Metadata.Labels["my_field"] = "test123" + return cfg + }(), + }, + { + name: "redact default fields", + in: func() *EntityConfig { + cfg := FixtureEntityConfig("test") + cfg.Metadata.Labels["my_field"] = "test123" + cfg.Metadata.Labels["password"] = "test123" + return cfg + }(), + want: func() *EntityConfig { + cfg := FixtureEntityConfig("test") + cfg.Metadata.Labels["my_field"] = "test123" + cfg.Metadata.Labels["password"] = corev2.Redacted + return cfg + }(), + }, + { + name: "redact custom fields", + in: func() *EntityConfig { + cfg := FixtureEntityConfig("test") + cfg.Redact = []string{"my_field"} + cfg.Metadata.Labels["my_field"] = "test123" + cfg.Metadata.Labels["password"] = "test123" + return cfg + }(), + want: func() *EntityConfig { + cfg := FixtureEntityConfig("test") + cfg.Redact = []string{"my_field"} + cfg.Metadata.Labels["my_field"] = corev2.Redacted + cfg.Metadata.Labels["password"] = "test123" + return cfg + }(), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + e := tt.in + if got := e.ProduceRedacted(); !reflect.DeepEqual(got, tt.want) { + t.Errorf("EntityConfig.ProduceRedacted() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/api/core/v3/internal/strings/strings.go b/api/core/v3/internal/strings/strings.go new file mode 100644 index 0000000000..400bb517eb --- /dev/null +++ b/api/core/v3/internal/strings/strings.go @@ -0,0 +1,60 @@ +package strings + +import ( + "strings" + "unicode" +) + +const ( + lowerAlphaStart = 97 + lowerAlphaStop = 122 +) + +func isAlpha(r rune) bool { + return r >= lowerAlphaStart && r <= lowerAlphaStop +} + +func alphaNumeric(s string) bool { + for _, r := range s { + if !(unicode.IsDigit(r) || isAlpha(r)) { + return false + } + } + return true +} + +func normalize(s string) string { + if alphaNumeric(s) { + return s + } + lowered := strings.ToLower(s) + if alphaNumeric(lowered) { + return lowered + } + trimmed := make([]rune, 0, len(lowered)) + for _, r := range lowered { + if isAlpha(r) { + trimmed = append(trimmed, r) + } + } + return string(trimmed) +} + +// FoundInArray searches array for item without distinguishing between uppercase +// and lowercase and non-alphanumeric characters. Returns true if item is a +// value of array +func FoundInArray(item string, array []string) bool { + if item == "" || len(array) == 0 { + return false + } + + item = normalize(item) + + for i := range array { + if normalize(array[i]) == item { + return true + } + } + + return false +} diff --git a/api/core/v3/internal/strings/strings_test.go b/api/core/v3/internal/strings/strings_test.go new file mode 100644 index 0000000000..d1dfc90c10 --- /dev/null +++ b/api/core/v3/internal/strings/strings_test.go @@ -0,0 +1,34 @@ +package strings + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestFoundInArray(t *testing.T) { + var array []string + + found := FoundInArray("Foo", []string{}) + assert.False(t, found) + + array = []string{"foo", "bar"} + found = FoundInArray("Foo", array) + assert.True(t, found) + + array = []string{"foo", "bar"} + found = FoundInArray("FooBar", array) + assert.False(t, found) + + array = []string{"foo", "bar"} + found = FoundInArray("Foo ", array) + assert.True(t, found) + + array = []string{"foo_bar"} + found = FoundInArray("Foo_Bar", array) + assert.True(t, found) + + array = []string{"foobar"} + found = FoundInArray("Foo_Qux", array) + assert.False(t, found) +} diff --git a/api/core/v3/redacter.go b/api/core/v3/redacter.go new file mode 100644 index 0000000000..38d781aedb --- /dev/null +++ b/api/core/v3/redacter.go @@ -0,0 +1,7 @@ +package v3 + +// Redacter can return a redacted copy of the resource +type Redacter interface { + // ProduceRedacted returns a redacted copy of the resource + ProduceRedacted() Resource +} diff --git a/backend/api/generic.go b/backend/api/generic.go index 1803fefe61..625adef719 100644 --- a/backend/api/generic.go +++ b/backend/api/generic.go @@ -169,7 +169,13 @@ func (g *GenericClient) getResource(ctx context.Context, name string, value core if err != nil { return err } - return wrapper.UnwrapInto(value.Resource) + if err := wrapper.UnwrapInto(value.Resource); err != nil { + return err + } + if redacter, ok := value.Resource.(corev3.Redacter); ok { + value.Resource = redacter.ProduceRedacted() + } + return err } return g.Store.GetResource(ctx, name, value) } @@ -209,7 +215,11 @@ func (g *GenericClient) list(ctx context.Context, resources interface{}, pred *s } v2values := make([]corev2.Resource, len(values)) for i := range values { - v2values[i] = corev3.V3ToV2Resource(values[i]) + resource := values[i] + if redacter, ok := resource.(corev3.Redacter); ok { + resource = redacter.ProduceRedacted() + } + v2values[i] = corev3.V3ToV2Resource(resource) } *resourceList = v2values return nil diff --git a/backend/api/generic_test.go b/backend/api/generic_test.go index 963a56f58d..e9117f4bff 100644 --- a/backend/api/generic_test.go +++ b/backend/api/generic_test.go @@ -421,7 +421,7 @@ func TestGenericClientStoreV2(t *testing.T) { APIGroup: "core", APIVersion: "v3", Namespace: "default", - Resource: "entity_configs", + Resource: "entities", ResourceName: "default", UserName: "tom", Verb: "get", @@ -430,7 +430,7 @@ func TestGenericClientStoreV2(t *testing.T) { APIGroup: "core", APIVersion: "v3", Namespace: "default", - Resource: "entity_configs", + Resource: "entities", UserName: "tom", Verb: "list", }: true, @@ -456,7 +456,7 @@ func TestGenericClientStoreV2(t *testing.T) { APIGroup: "core", APIVersion: "v3", Namespace: "default", - Resource: "entity_configs", + Resource: "entities", ResourceName: "default", UserName: "tom", Verb: "get", @@ -465,7 +465,7 @@ func TestGenericClientStoreV2(t *testing.T) { APIGroup: "core", APIVersion: "v3", Namespace: "default", - Resource: "entity_configs", + Resource: "entities", ResourceName: "default", UserName: "tom", Verb: "create", @@ -474,7 +474,7 @@ func TestGenericClientStoreV2(t *testing.T) { APIGroup: "core", APIVersion: "v3", Namespace: "default", - Resource: "entity_configs", + Resource: "entities", ResourceName: "default", UserName: "tom", Verb: "delete", @@ -483,7 +483,7 @@ func TestGenericClientStoreV2(t *testing.T) { APIGroup: "core", APIVersion: "v3", Namespace: "default", - Resource: "entity_configs", + Resource: "entities", ResourceName: "default", UserName: "tom", Verb: "update", @@ -492,7 +492,7 @@ func TestGenericClientStoreV2(t *testing.T) { APIGroup: "core", APIVersion: "v3", Namespace: "default", - Resource: "entity_configs", + Resource: "entities", UserName: "tom", Verb: "list", }: true, @@ -569,6 +569,100 @@ func TestGenericClientStoreV2(t *testing.T) { } } +func TestGenericClientStoreV2_sensu_enterprise_go_GH2484(t *testing.T) { + makeStore := func(entity *corev3.EntityConfig) storev2.Interface { + store := new(storetest.Store) + if entity == nil { + entity = corev3.FixtureEntityConfig("default") + entity.Redact = []string{"password"} + entity.Metadata.Labels["password"] = "test" + entity.Metadata.Labels["my_label"] = "test" + } + wrappedResource, err := storev2.WrapResource(entity) + if err != nil { + panic(err) + } + store.On("Get", mock.Anything).Return(wrappedResource, nil) + store.On("List", mock.Anything, mock.Anything).Return(wrap.List{wrappedResource.(*wrap.Wrapper)}, nil) + return store + } + v3AllAccess := func() authorization.Authorizer { + return &mockAuth{ + attrs: map[authorization.AttributesKey]bool{ + { + APIGroup: "core", + APIVersion: "v3", + Namespace: "default", + Resource: "entities", + ResourceName: "default", + UserName: "tom", + Verb: "get", + }: true, + { + APIGroup: "core", + APIVersion: "v3", + Namespace: "default", + Resource: "entities", + ResourceName: "default", + UserName: "tom", + Verb: "create", + }: true, + { + APIGroup: "core", + APIVersion: "v3", + Namespace: "default", + Resource: "entities", + ResourceName: "default", + UserName: "tom", + Verb: "delete", + }: true, + { + APIGroup: "core", + APIVersion: "v3", + Namespace: "default", + Resource: "entities", + ResourceName: "default", + UserName: "tom", + Verb: "update", + }: true, + { + APIGroup: "core", + APIVersion: "v3", + Namespace: "default", + Resource: "entities", + UserName: "tom", + Verb: "list", + }: true, + }, + } + } + + ctx := contextWithUser(defaultContext(), "tom", nil) + client := defaultV2TestClient(makeStore(nil), v3AllAccess()) + listVal := []corev2.Resource{} + if err := client.List(ctx, &listVal, &store.SelectionPredicate{}); err != nil { + t.Fatal(err) + } + if listVal[0].GetObjectMeta().Labels["password"] != corev2.Redacted { + t.Errorf("Labels['password'] = %s, got: %s", corev2.Redacted, listVal[0].GetObjectMeta().Labels["password"]) + } + if listVal[0].GetObjectMeta().Labels["my_label"] != "test" { + t.Errorf("Labels['my_label'] = %s, got: %s", "test", listVal[0].GetObjectMeta().Labels["my_label"]) + } + + client = defaultV2TestClient(makeStore(nil), v3AllAccess()) + getVal := corev3.V2ResourceProxy{Resource: &corev3.EntityConfig{}} + if err := client.Get(ctx, "default", &getVal); err != nil { + t.Fatal(err) + } + if getVal.GetObjectMeta().Labels["password"] != corev2.Redacted { + t.Errorf("Labels['password'] = %s, got: %s", corev2.Redacted, getVal.GetObjectMeta().Labels["password"]) + } + if getVal.GetObjectMeta().Labels["my_label"] != "test" { + t.Errorf("Labels['my_label'] = %s, got: %s", "test", getVal.GetObjectMeta().Labels["my_label"]) + } +} + func TestSetTypeMetaV3Resource(t *testing.T) { client := &GenericClient{} err := client.SetTypeMeta(corev2.TypeMeta{ diff --git a/go.mod b/go.mod index 25456d603b..5a1d1b5d73 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 github.com/sensu/sensu-go/api/core/v2 v2.14.0 - github.com/sensu/sensu-go/api/core/v3 v3.6.2 + github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912182551-a5a7db519e68 github.com/sensu/sensu-go/types v0.10.0 github.com/shirou/gopsutil/v3 v3.21.12 github.com/sirupsen/logrus v1.7.0 diff --git a/go.sum b/go.sum index 2269ce740a..f525d49320 100644 --- a/go.sum +++ b/go.sum @@ -55,7 +55,6 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E= @@ -65,7 +64,6 @@ github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoC github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -100,7 +98,6 @@ github.com/emicklei/proto v1.1.0 h1:3OWZhkr68eGPyCY1AtNh1u+5IyBiVVDJMXKRX9cOFgY= github.com/emicklei/proto v1.1.0/go.mod h1:Dqn751twH9SasYqvA59Lb9Hz+itoJgmMoivX6k7OPZc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= @@ -181,7 +178,6 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -390,7 +386,6 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= @@ -402,6 +397,10 @@ github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= github.com/sensu/sensu-go/api/core/v3 v3.6.2 h1:NEkHcPxkaYwPlH4gG6kgvdvYLlwBBaswMHscA7X3V+4= github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= +github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912171820-366b64ed1a62 h1:PeP63bXXwwB586EjCb73jg0oqzE3Tg3aOH38g9qG58k= +github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912171820-366b64ed1a62/go.mod h1:n2dhnBTovMrzmE1P0D7gvEbUG7TPH6hdtr7qvoPf/sY= +github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912182551-a5a7db519e68 h1:t5AsMszceHgj4yGHflRi705L3mZbb15yi5pRJfiWmy8= +github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912182551-a5a7db519e68/go.mod h1:n2dhnBTovMrzmE1P0D7gvEbUG7TPH6hdtr7qvoPf/sY= github.com/sensu/sensu-go/types v0.10.0 h1:sm+dLuqEEECVxjW5EfXkU5weGPwrg/Jymbm28HdQpl8= github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= @@ -455,7 +454,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= -github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/willf/pad v0.0.0-20160331131008-b3d780601022 h1:W5wMm7sF44Z3K9bpq+CHOMOipvLHN1ElD6nyQbbiy/0= @@ -470,7 +468,6 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -537,8 +534,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 h1:71vQrMauZZhcTVK6KdYM+rklehEEwb3E+ZhaE5jrPrE= golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -586,7 +581,6 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -634,7 +628,6 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -651,12 +644,9 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210503060354-a79de5458b56 h1:b8jxX3zqjpqb2LklXPzKSGJhzyxCOZSz8ncv8Nv+y7w= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= From f026927f395de36cd18f46fe61ebd84619030a11 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Mon, 12 Sep 2022 15:12:50 -0700 Subject: [PATCH 064/173] Update CHANGELOG for v6.8.1 patch release (#4863) Signed-off-by: James Phillips --- CHANGELOG-6.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 878c42febd..280b335bc7 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,10 +7,16 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +## [6.8.1] - 2022-09-13 + ### Changed - Check subdues are now evaluated on a half open interval such that there should be no unintended gaps between overlapping subdues. +### Security +- Addresses issue where the entity list view would display values of redacted +labels. + ## [6.8.0] - 2022-08-24 ### Changed From 40927676b945f32d891f8f61699ede0302239e6c Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 13 Sep 2022 08:48:33 -0700 Subject: [PATCH 065/173] Include Backend Name with Agent WS Connection (#4854) * Include Backend Name with Agent WS Connection Adds a Backend-ID header to the agent websocket upgrade response and logs it from the agent in order to better correlate agent connections made through a load balancer to their destination backend. Signed-off-by: Christian Kruse * update changelog Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 3 +++ agent/agent.go | 7 ++++++- backend/agentd/agentd.go | 4 ++++ backend/backend.go | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 7304207f74..c5a42b2085 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -11,6 +11,9 @@ Versioning](http://semver.org/spec/v2.0.0.html). - Fixed an issue where multi-expression exclusive "Deny" filters were not evaluated as described in the documentation. +### Added +- Agent websocket connection logging includes backend entity name. + ## [6.8.0] - 2022-08-24 ### Changed diff --git a/agent/agent.go b/agent/agent.go index 9a192182af..f6c8ae18e1 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -777,8 +777,13 @@ func (a *Agent) connectWithBackoff(ctx context.Context) (transport.Transport, er logger.WithError(err).Error("reconnection attempt failed") return false, nil } + backendID := respHeader.Get("Backend-ID") - logger.Info("successfully connected") + fields := logrus.Fields{ + "backend-id": backendID, + "backend-url": backendURL, + } + logger.WithFields(fields).Info("successfully connected") conn = c diff --git a/backend/agentd/agentd.go b/backend/agentd/agentd.go index 1286ddc781..46fb687003 100644 --- a/backend/agentd/agentd.go +++ b/backend/agentd/agentd.go @@ -104,6 +104,7 @@ type Agentd struct { healthRouter *routers.HealthRouter serveWaitTime time.Duration ready func() + backendEntity *corev2.Entity } // Config configures an Agentd. @@ -119,6 +120,7 @@ type Config struct { Client *clientv3.Client EtcdClientTLSConfig *tls.Config Watcher <-chan store.WatchEventEntityConfig + BackendEntity *corev2.Entity } // Option is a functional option. @@ -146,6 +148,7 @@ func New(c Config, opts ...Option) (*Agentd, error) { client: c.Client, etcdClientTLSConfig: c.EtcdClientTLSConfig, serveWaitTime: c.ServeWaitTime, + backendEntity: c.BackendEntity, } // prepare server TLS config @@ -350,6 +353,7 @@ func (a *Agentd) webSocketHandler(w http.ResponseWriter, r *http.Request) { }) responseHeader := make(http.Header) + responseHeader.Add("Backend-ID", a.backendEntity.Name) responseHeader.Add("Accept", agent.ProtobufSerializationHeader) lager.WithField("header", fmt.Sprintf("Accept: %s", agent.ProtobufSerializationHeader)).Debug("setting header") responseHeader.Add("Accept", agent.JSONSerializationHeader) diff --git a/backend/backend.go b/backend/backend.go index a7c1af23cf..2450ee7b3d 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -655,6 +655,7 @@ func Initialize(ctx context.Context, config *Config) (*Backend, error) { Client: b.Client, Watcher: entityConfigWatcher, EtcdClientTLSConfig: b.EtcdClientTLSConfig, + BackendEntity: backendEntity, }) if err != nil { return nil, fmt.Errorf("error initializing %s: %s", agent.Name(), err) From 687daedebd8385a181db25ade76feb008e8ac0b8 Mon Sep 17 00:00:00 2001 From: Eric Chlebek Date: Wed, 14 Sep 2022 14:28:32 -0700 Subject: [PATCH 066/173] Keepalived lease errors on startup no longer fatal This commit modifies how keepalived startup works, so that when lease errors are encountered, sensu-backend does not crash. Signed-off-by: Eric Chlebek --- backend/keepalived/keepalived.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/keepalived/keepalived.go b/backend/keepalived/keepalived.go index 9a72484062..4befeb4172 100644 --- a/backend/keepalived/keepalived.go +++ b/backend/keepalived/keepalived.go @@ -224,7 +224,7 @@ func (k *Keepalived) initFromStore(ctx context.Context) error { tctx, cancel := context.WithTimeout(entityCtx, k.storeTimeout) defer cancel() if err := switches.BuryAndRevokeLease(tctx, id); err != nil { - return err + logger.WithError(err).WithField("keepalive", id).Error("error burying switch") } continue } @@ -243,7 +243,8 @@ func (k *Keepalived) initFromStore(ctx context.Context) error { tctx, cancel = context.WithTimeout(entityCtx, k.storeTimeout) defer cancel() if err := switches.Dead(tctx, id, ttl); err != nil { - return fmt.Errorf("error initializing keepalive %q: %s", id, err) + logger.WithError(err).WithField("keepalive", id).Error("error initializing keepalive") + continue } } From e7deccd4318cd0e501cc2ce531a2786904503189 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Wed, 21 Sep 2022 16:23:52 -0700 Subject: [PATCH 067/173] change api/core/v3 dependency to current develop/6 HEAD (#4869) Signed-off-by: Christian Kruse --- go.mod | 2 +- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 5a1d1b5d73..c3e7401330 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 github.com/sensu/sensu-go/api/core/v2 v2.14.0 - github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912182551-a5a7db519e68 + github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf github.com/sensu/sensu-go/types v0.10.0 github.com/shirou/gopsutil/v3 v3.21.12 github.com/sirupsen/logrus v1.7.0 diff --git a/go.sum b/go.sum index f525d49320..c93b710f88 100644 --- a/go.sum +++ b/go.sum @@ -397,10 +397,8 @@ github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= github.com/sensu/sensu-go/api/core/v3 v3.6.2 h1:NEkHcPxkaYwPlH4gG6kgvdvYLlwBBaswMHscA7X3V+4= github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912171820-366b64ed1a62 h1:PeP63bXXwwB586EjCb73jg0oqzE3Tg3aOH38g9qG58k= -github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912171820-366b64ed1a62/go.mod h1:n2dhnBTovMrzmE1P0D7gvEbUG7TPH6hdtr7qvoPf/sY= -github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912182551-a5a7db519e68 h1:t5AsMszceHgj4yGHflRi705L3mZbb15yi5pRJfiWmy8= -github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912182551-a5a7db519e68/go.mod h1:n2dhnBTovMrzmE1P0D7gvEbUG7TPH6hdtr7qvoPf/sY= +github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf h1:K1VrKHGwQ4UpOQmy2J6IFyv0u17OKTwWrfAGILClpbw= +github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf/go.mod h1:n2dhnBTovMrzmE1P0D7gvEbUG7TPH6hdtr7qvoPf/sY= github.com/sensu/sensu-go/types v0.10.0 h1:sm+dLuqEEECVxjW5EfXkU5weGPwrg/Jymbm28HdQpl8= github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= From c969dcc36d5d1daae1ec61b4e19ebdadc5d1a1f8 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Thu, 22 Sep 2022 14:25:34 -0700 Subject: [PATCH 068/173] Background keepalive reconstruction (#4824) * Run keepalive reconstruction in the background Signed-off-by: Christian Kruse Also spread out event query load Signed-off-by: Christian Kruse * fix bug in switchset usage Signed-off-by: Christian Kruse * update changelog Signed-off-by: Christian Kruse * update error handling Signed-off-by: Christian Kruse * include error handling bugfix Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 4 ++ backend/keepalived/keepalived.go | 53 ++++++++++++++++++++++----- backend/keepalived/keepalived_test.go | 1 + 3 files changed, 49 insertions(+), 9 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 01f8fbeca6..55496aa161 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -23,6 +23,10 @@ should be no unintended gaps between overlapping subdues. - Addresses issue where the entity list view would display values of redacted labels. +### Changed +- Keepalive reconstruction no longer blocks backend startup. Instead runs +gradually in the background. + ## [6.8.0] - 2022-08-24 ### Changed diff --git a/backend/keepalived/keepalived.go b/backend/keepalived/keepalived.go index 9a72484062..9cf5b39c70 100644 --- a/backend/keepalived/keepalived.go +++ b/backend/keepalived/keepalived.go @@ -91,6 +91,7 @@ type Keepalived struct { ctx context.Context cancel context.CancelFunc storeTimeout time.Duration + reconstructionPeriod time.Duration } // Option is a functional option. @@ -142,6 +143,7 @@ func New(c Config, opts ...Option) (*Keepalived, error) { ctx: ctx, cancel: cancel, storeTimeout: c.StoreTimeout, + reconstructionPeriod: time.Second * 120, } for _, o := range opts { if err := o(k); err != nil { @@ -165,12 +167,10 @@ func (k *Keepalived) Start() error { } k.subscription = sub - if err := k.initFromStore(context.Background()); err != nil { - _ = sub.Cancel() - return err - } + k.wg = &sync.WaitGroup{} k.startWorkers() + k.startReconstruction(context.Background()) return nil } @@ -197,6 +197,25 @@ func (k *Keepalived) Name() string { return "keepalived" } +func (k *Keepalived) startReconstruction(ctx context.Context) { + k.wg.Add(1) + go func() { + defer k.wg.Done() + err := k.initFromStore(ctx) + if err != nil { + if _, ok := err.(*store.ErrInternal); ok { + // Fatal error + select { + case k.errChan <- err: + case <-ctx.Done(): + } + return + } + logger.WithError(err).Error("failed to recover failing keepalives") + } + }() +} + func (k *Keepalived) initFromStore(ctx context.Context) error { // For which clients were we previously alerting? tctx, cancel := context.WithTimeout(ctx, k.storeTimeout) @@ -208,7 +227,22 @@ func (k *Keepalived) initFromStore(ctx context.Context) error { switches := k.livenessFactory(k.Name(), k.dead, k.alive, logger) - for _, keepalive := range keepalives { + potentialKeepalives := len(keepalives) + recustructionInterval := float64(k.reconstructionPeriod) / float64(potentialKeepalives) + logger.Infof("recovering %d failing keepalives over %d seconds", + potentialKeepalives, + k.reconstructionPeriod/time.Second, + ) + + for i, keepalive := range keepalives { + if i > 0 { + select { + case <-time.After(time.Duration(recustructionInterval)): + case <-ctx.Done(): + return ctx.Err() + } + } + entityCtx := context.WithValue(ctx, corev2.NamespaceKey, keepalive.Namespace) tctx, cancel := context.WithTimeout(entityCtx, k.storeTimeout) defer cancel() @@ -224,7 +258,7 @@ func (k *Keepalived) initFromStore(ctx context.Context) error { tctx, cancel := context.WithTimeout(entityCtx, k.storeTimeout) defer cancel() if err := switches.BuryAndRevokeLease(tctx, id); err != nil { - return err + logger.WithError(err).WithField("keepalive", id).Error("error burying switch") } continue } @@ -243,15 +277,16 @@ func (k *Keepalived) initFromStore(ctx context.Context) error { tctx, cancel = context.WithTimeout(entityCtx, k.storeTimeout) defer cancel() if err := switches.Dead(tctx, id, ttl); err != nil { - return fmt.Errorf("error initializing keepalive %q: %s", id, err) + logger.WithError(err).WithField("keepalive", id).Error("error initializing keepalive") + continue } } + logger.Info("keepalived reconstruction complete") return nil } func (k *Keepalived) startWorkers() { - k.wg = &sync.WaitGroup{} k.wg.Add(k.workerCount) for i := 0; i < k.workerCount; i++ { @@ -262,7 +297,7 @@ func (k *Keepalived) startWorkers() { func (k *Keepalived) processKeepalives(ctx context.Context) { defer k.wg.Done() - switches := k.livenessFactory(k.Name(), k.alive, k.dead, logger) + switches := k.livenessFactory(k.Name(), k.dead, k.alive, logger) for { select { diff --git a/backend/keepalived/keepalived_test.go b/backend/keepalived/keepalived_test.go index 981e5a9a65..766e5faf5f 100644 --- a/backend/keepalived/keepalived_test.go +++ b/backend/keepalived/keepalived_test.go @@ -80,6 +80,7 @@ func newKeepalivedTest(t *testing.T) *keepalivedTest { StoreTimeout: time.Second, }) require.NoError(t, err) + k.reconstructionPeriod = 0 test := &keepalivedTest{ MessageBus: bus, Store: store, From 21dacbb6c71b43cb2066949d52c23ef5cd7699f0 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Mon, 26 Sep 2022 17:07:32 -0700 Subject: [PATCH 069/173] Agent logs duplicate check name (#4874) Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 3 +++ agent/agent.go | 15 ++++++++++----- agent/check_handler.go | 21 ++++++++++++++++++--- go.mod | 2 +- go.sum | 8 ++------ 5 files changed, 34 insertions(+), 15 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 280b335bc7..d32851ba57 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,6 +7,9 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +### Changed +- Agent logs now include check name when a check request is not executed. + ## [6.8.1] - 2022-09-13 ### Changed diff --git a/agent/agent.go b/agent/agent.go index 9a192182af..3bb9a05708 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -563,12 +563,17 @@ func (a *Agent) receiveLoop(ctx context.Context, cancel context.CancelFunc, conn }).Info("message received") err := a.handler.Handle(ctx, msg.Type, msg.Payload) if err != nil { - switch err { - case errDupCheckRequest: - logger.WithError(err).Warn("error handling message") - default: - logger.WithError(err).Error("error handling message") + severity := logrus.ErrorLevel + logEntry := logger.WithError(err) + if checkErr, ok := err.(checkExecutionError); ok { + logEntry = logEntry.WithField( + "check", checkErr.Check, + ) + if checkErr.error == errDupCheckRequest { + severity = logrus.WarnLevel + } } + logEntry.Log(severity, "error handling message") } }(m) } diff --git a/agent/check_handler.go b/agent/check_handler.go index 76e5484f47..f78433bca6 100644 --- a/agent/check_handler.go +++ b/agent/check_handler.go @@ -36,6 +36,12 @@ var ( errOldCheckRequest = errors.New("check request is older than a previously received check request") ) +type checkExecutionError struct { + error + // Check Name + Check string +} + // handleCheck is the check message handler. // TODO(greg): At some point, we're going to need max parallelism. func (a *Agent) handleCheck(ctx context.Context, payload []byte) error { @@ -52,16 +58,25 @@ func (a *Agent) handleCheck(ctx context.Context, payload []byte) error { // previous executions of the check lastIssued := a.getLastIssued(request) if lastIssued > request.Issued { - return errOldCheckRequest + return checkExecutionError{ + error: errOldCheckRequest, + Check: checkConfig.Name, + } } if lastIssued == request.Issued { - return errDupCheckRequest + return checkExecutionError{ + error: errDupCheckRequest, + Check: checkConfig.Name, + } } // only schedule check execution if its not already in progress // ** check hooks are part of a checks execution if a.checkInProgress(request) { - return fmt.Errorf("check execution still in progress: %s", checkConfig.Name) + return checkExecutionError{ + error: fmt.Errorf("check execution still in progress: %s", checkConfig.Name), + Check: checkConfig.Name, + } } sendFailure := func(err error) { diff --git a/go.mod b/go.mod index 5a1d1b5d73..c3e7401330 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 github.com/sensu/sensu-go/api/core/v2 v2.14.0 - github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912182551-a5a7db519e68 + github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf github.com/sensu/sensu-go/types v0.10.0 github.com/shirou/gopsutil/v3 v3.21.12 github.com/sirupsen/logrus v1.7.0 diff --git a/go.sum b/go.sum index f525d49320..941162f484 100644 --- a/go.sum +++ b/go.sum @@ -395,12 +395,8 @@ github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5 github.com/sensu/sensu-go/api/core/v2 v2.14.0 h1:z4JVqy7z6iFgMDUH0uc1Ns0bqLFKTpc5bi4Iw7qweks= github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.6.2 h1:NEkHcPxkaYwPlH4gG6kgvdvYLlwBBaswMHscA7X3V+4= -github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912171820-366b64ed1a62 h1:PeP63bXXwwB586EjCb73jg0oqzE3Tg3aOH38g9qG58k= -github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912171820-366b64ed1a62/go.mod h1:n2dhnBTovMrzmE1P0D7gvEbUG7TPH6hdtr7qvoPf/sY= -github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912182551-a5a7db519e68 h1:t5AsMszceHgj4yGHflRi705L3mZbb15yi5pRJfiWmy8= -github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220912182551-a5a7db519e68/go.mod h1:n2dhnBTovMrzmE1P0D7gvEbUG7TPH6hdtr7qvoPf/sY= +github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf h1:K1VrKHGwQ4UpOQmy2J6IFyv0u17OKTwWrfAGILClpbw= +github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf/go.mod h1:n2dhnBTovMrzmE1P0D7gvEbUG7TPH6hdtr7qvoPf/sY= github.com/sensu/sensu-go/types v0.10.0 h1:sm+dLuqEEECVxjW5EfXkU5weGPwrg/Jymbm28HdQpl8= github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= From 7147b6980623259737b8db483b9654c7b2cc16a4 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 29 Sep 2022 09:59:16 -0700 Subject: [PATCH 070/173] bump etcd version from 3.5.4 to 3.5.5 Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 1 + go.mod | 14 ++++---- go.sum | 98 ++++++++++++++++++++++++-------------------------- 3 files changed, 54 insertions(+), 59 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 55496aa161..b7c1c90043 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -26,6 +26,7 @@ labels. ### Changed - Keepalive reconstruction no longer blocks backend startup. Instead runs gradually in the background. +- Upgraded etcd version from 3.5.4 to 3.5.5. ## [6.8.0] - 2022-08-24 diff --git a/go.mod b/go.mod index c3e7401330..1388eca3cd 100644 --- a/go.mod +++ b/go.mod @@ -60,18 +60,18 @@ require ( github.com/ulikunitz/xz v0.5.10 // indirect github.com/willf/pad v0.0.0-20160331131008-b3d780601022 go.etcd.io/bbolt v1.3.6 - go.etcd.io/etcd/api/v3 v3.5.4 - go.etcd.io/etcd/client/pkg/v3 v3.5.4 - go.etcd.io/etcd/client/v3 v3.5.4 - go.etcd.io/etcd/server/v3 v3.5.4 - go.etcd.io/etcd/tests/v3 v3.5.4 + go.etcd.io/etcd/api/v3 v3.5.5 + go.etcd.io/etcd/client/pkg/v3 v3.5.5 + go.etcd.io/etcd/client/v3 v3.5.5 + go.etcd.io/etcd/server/v3 v3.5.5 + go.etcd.io/etcd/tests/v3 v3.5.5 go.uber.org/atomic v1.7.0 go.uber.org/zap v1.17.0 - golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 + golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 golang.org/x/sys v0.0.0-20211013075003-97ac67df715c golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba - google.golang.org/grpc v1.38.0 + google.golang.org/grpc v1.41.0 gopkg.in/h2non/filetype.v1 v1.0.3 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index c93b710f88..9c227dafb7 100644 --- a/go.sum +++ b/go.sum @@ -36,8 +36,6 @@ github.com/ash2k/stager v0.0.0-20170622123058-6e9c7b0eacd4 h1:pG7CUDQmAqAxVv4smD github.com/ash2k/stager v0.0.0-20170622123058-6e9c7b0eacd4/go.mod h1:20N8GhJtHSLeRJvNhy5D1SnEHni4Xlt6p13JQMHYdDY= github.com/atlassian/gostatsd v0.0.0-20180514010436-af796620006e h1:6TWp0L2h6cWOtpqdG4TLr6GIUWc/vivgeEkcnkT2bVw= github.com/atlassian/gostatsd v0.0.0-20180514010436-af796620006e/go.mod h1:zLXcNafAnnRRoK1bsbvHLp0yz3uZ2f7oy6WeNwjhqmA= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -46,6 +44,8 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= @@ -57,6 +57,8 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4 h1:Lap807SXTH5tri2TivECb/4abUkMZC9zRoLarvcKDqs= @@ -101,6 +103,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca/go.mod h1:49H/RkXP8pKaZy4h0d+NW16rSLhyVBt4o6VLJbmOqDE= github.com/evanphx/json-patch/v5 v5.1.0 h1:B0aXl1o/1cP8NbviYiBMkcHBtUjIJ1/Ccg6b+SwCLQg= @@ -395,8 +399,6 @@ github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5 github.com/sensu/sensu-go/api/core/v2 v2.14.0 h1:z4JVqy7z6iFgMDUH0uc1Ns0bqLFKTpc5bi4Iw7qweks= github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.6.2 h1:NEkHcPxkaYwPlH4gG6kgvdvYLlwBBaswMHscA7X3V+4= -github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf h1:K1VrKHGwQ4UpOQmy2J6IFyv0u17OKTwWrfAGILClpbw= github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf/go.mod h1:n2dhnBTovMrzmE1P0D7gvEbUG7TPH6hdtr7qvoPf/sY= github.com/sensu/sensu-go/types v0.10.0 h1:sm+dLuqEEECVxjW5EfXkU5weGPwrg/Jymbm28HdQpl8= @@ -469,53 +471,44 @@ go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.4 h1:OHVyt3TopwtUQ2GKdd5wu3PmmipR4FTwCqoEjSyRdIc= -go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/client/pkg/v3 v3.5.4 h1:lrneYvz923dvC14R54XcA7FXoZ3mlGZAgmwhfm7HqOg= -go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.4 h1:Dcx3/MYyfKcPNLpR4VVQUP5KgYrBeJtktBwEKkw08Ao= -go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= -go.etcd.io/etcd/client/v3 v3.5.4 h1:p83BUL3tAYS0OT/r0qglgc3M1JjhM0diV8DSWAhVXv4= -go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= -go.etcd.io/etcd/etcdutl/v3 v3.5.4/go.mod h1:eK9eZfI/BxDQCztpuaJ1E/ufYpMw2Y16dPX1azGWrBU= -go.etcd.io/etcd/pkg/v3 v3.5.4 h1:V5Dvl7S39ZDwjkKqJG2BfXgxZ3QREqqKifWQgIw5IM0= -go.etcd.io/etcd/pkg/v3 v3.5.4/go.mod h1:OI+TtO+Aa3nhQSppMbwE4ld3uF1/fqqwbpfndbbrEe0= -go.etcd.io/etcd/raft/v3 v3.5.4 h1:YGrnAgRfgXloBNuqa+oBI/aRZMcK/1GS6trJePJ/Gqc= -go.etcd.io/etcd/raft/v3 v3.5.4/go.mod h1:SCuunjYvZFC0fBX0vxMSPjuZmpcSk+XaAcMrD6Do03w= -go.etcd.io/etcd/server/v3 v3.5.4 h1:CMAZd0g8Bn5NRhynW6pKhc4FRg41/0QYy3d7aNm9874= -go.etcd.io/etcd/server/v3 v3.5.4/go.mod h1:S5/YTU15KxymM5l3T6b09sNOHPXqGYIZStpuuGbb65c= -go.etcd.io/etcd/tests/v3 v3.5.4 h1:wiYG8vbDwZO2UatQE9Z3GIv2z52jGg5DvEkTDXm090c= -go.etcd.io/etcd/tests/v3 v3.5.4/go.mod h1:ymig8LjkI1zqAxxMsl+nntzG21dND2hh0UQXl9BaJP8= +go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= +go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= +go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= +go.etcd.io/etcd/client/v2 v2.305.5 h1:DktRP60//JJpnPC0VBymAN/7V71GHMdjDCBt4ZPXDjI= +go.etcd.io/etcd/client/v2 v2.305.5/go.mod h1:zQjKllfqfBVyVStbt4FaosoX2iYd8fV/GRy/PbowgP4= +go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI= +go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= +go.etcd.io/etcd/etcdutl/v3 v3.5.5/go.mod h1:7DFbgeccvoOhQLbX7bI4eep9+t8PSKBFheTB7TVf04s= +go.etcd.io/etcd/pkg/v3 v3.5.5 h1:Ablg7T7OkR+AeeeU32kdVhw/AGDsitkKPl7aW73ssjU= +go.etcd.io/etcd/pkg/v3 v3.5.5/go.mod h1:6ksYFxttiUGzC2uxyqiyOEvhAiD0tuIqSZkX3TyPdaE= +go.etcd.io/etcd/raft/v3 v3.5.5 h1:Ibz6XyZ60OYyRopu73lLM/P+qco3YtlZMOhnXNS051I= +go.etcd.io/etcd/raft/v3 v3.5.5/go.mod h1:76TA48q03g1y1VpTue92jZLr9lIHKUNcYdZOOGyx8rI= +go.etcd.io/etcd/server/v3 v3.5.5 h1:jNjYm/9s+f9A9r6+SC4RvNaz6AqixpOvhrFdT0PvIj0= +go.etcd.io/etcd/server/v3 v3.5.5/go.mod h1:rZ95vDw/jrvsbj9XpTqPrTAB9/kzchVdhRirySPkUBc= +go.etcd.io/etcd/tests/v3 v3.5.5 h1:QMfo2twT9Erol77/aypdJGN1vtuQ4VNSGnb5cRiIRo8= +go.etcd.io/etcd/tests/v3 v3.5.5/go.mod h1:WUfOEAmIWBoqOtLmHeCp4WbGw3Q0sRK9ECO24zL1/g8= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 h1:sO4WKdPAudZGKPcpZT4MJn6JaDmpyLrMPDGGyA1SttE= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/otel v0.20.0 h1:eaP0Fqu7SXHwvjiqDq83zImeehOHX8doTvU9AwXON8g= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0 h1:4kzhXFP+btKm4jwxpjIqjs41A7MakRFUS86bqLHTIw8= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0 h1:JsxtGXd06J8jrnya7fdI/U/MR6yXA5DtbZy+qoHQlr8= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0 h1:c5VRjxCXdQlx1HjzwGdQHzZaVI82b5EbBgOu2ljD92g= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0 h1:7ao1wpzHRVKf0OQ7GIxiQJA6X7DLX9o14gmVon7mMK8= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0 h1:1DL6EXUdcg95gukhuRRvLDO/4X5THh/5dIV52lqtnbw= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0 h1:Wx7nFnvCaissIUZxPkBqDz2963Z+Cl+PkYbDKzTxDqQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0/go.mod h1:E5NNboN0UqSAki0Atn9kVwaN7I+l25gGxDqBueo/74E= +go.opentelemetry.io/otel v1.0.1 h1:4XKyXmfqJLOQ7feyV5DB6gsBFZ0ltB8vLtp6pj4JIcc= +go.opentelemetry.io/otel v1.0.1/go.mod h1:OPEOD4jIT2SlZPMmwT6FqZz2C0ZNdQqiWcoK6M0SNFU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1 h1:ofMbch7i29qIUf7VtF+r0HRF6ac0SBaPSziSsKp7wkk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1/go.mod h1:Kv8liBeVNFkkkbilbgWRpV+wWuu+H5xdOT6HAgd30iw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1 h1:CFMFNoz+CGprjFAFy+RJFrfEe4GBia3RRm2a4fREvCA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1/go.mod h1:xOvWoTOrQjxjW61xtOmD/WKGRYb/P4NzRo3bs65U6Rk= +go.opentelemetry.io/otel/sdk v1.0.1 h1:wXxFEWGo7XfXupPwVJvTBOaPBC9FEg0wB8hMNrKk+cA= +go.opentelemetry.io/otel/sdk v1.0.1/go.mod h1:HrdXne+BiwsOHYYkBE5ysIcv2bvdZstxzmCQhxTcZkI= +go.opentelemetry.io/otel/trace v1.0.1 h1:StTeIH6Q3G4r0Fiw34LTokUFESZgIDUr0qIJ7mKmAfw= +go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x7ZTuYBr3sUk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.9.0 h1:C0g6TWmQYvjKRnljRULLWUVJGy8Uvu0NEL/5frY2/t4= +go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= @@ -533,8 +526,8 @@ golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 h1:71vQrMauZZhcTVK6KdYM+rklehEEwb3E+ZhaE5jrPrE= -golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -549,7 +542,6 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -632,6 +624,7 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -673,13 +666,11 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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= @@ -718,9 +709,11 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E= +google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -731,8 +724,9 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From a994851d6cd82ab31747ecc6b48f7184c3dc95f7 Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Fri, 30 Sep 2022 11:54:00 -0700 Subject: [PATCH 071/173] Enhance logging for authentication providers (#4880) An INFO level message is emitted upon successful login, with details about the user and provider used. An ERROR level message is emitted upon authentication failure, with the username that was tried. Signed-off-by: Cyril Cressent --- CHANGELOG-6.md | 5 +++++ backend/authentication/authenticator.go | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 55496aa161..74fe81d418 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,6 +7,11 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased + +### Added +- The authentication module now logs successful (INFO) and unsuccessful (ERROR) + login attempts. + ### Fixed - Fixed an issue where multi-expression exclusive "Deny" filters were not evaluated as described in the documentation. diff --git a/backend/authentication/authenticator.go b/backend/authentication/authenticator.go index 775c7c81c5..218f1048a4 100644 --- a/backend/authentication/authenticator.go +++ b/backend/authentication/authenticator.go @@ -6,6 +6,8 @@ import ( "fmt" "sync" + "github.com/sirupsen/logrus" + corev2 "github.com/sensu/sensu-go/api/core/v2" ) @@ -33,11 +35,20 @@ func (a *Authenticator) Authenticate(ctx context.Context, username, password str continue } + logger.WithFields(logrus.Fields{ + "subject": claims.Subject, + "groups": claims.Groups, + "provider_id": claims.Provider.ProviderID, + "provider_type": claims.Provider.ProviderType, + "provider_userid": claims.Provider.UserID, + }).Info("login successful") return claims, nil } // TODO(palourde): We might want to return a more meaningful and actionnable // error message, but we don't want to leak sensitive information. + + logger.WithField("username", username).Error("authentication failed") return nil, errors.New("authentication failed") } From ac3d0a19ef09497b477e0c673bf153b7a706a3e0 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 3 Oct 2022 15:45:47 -0700 Subject: [PATCH 072/173] autorestart agent svc on windows Signed-off-by: Justin Kolberg --- agent/cmd/install_windows.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/agent/cmd/install_windows.go b/agent/cmd/install_windows.go index 85cb597e9e..4bd472f605 100644 --- a/agent/cmd/install_windows.go +++ b/agent/cmd/install_windows.go @@ -11,6 +11,7 @@ import ( "fmt" "os" "path/filepath" + "time" "golang.org/x/sys/windows/svc" "golang.org/x/sys/windows/svc/eventlog" @@ -68,10 +69,24 @@ func installService(name, displayName, desc string, args ...string) error { return err } defer s.Close() + + // setup recovery actions (how to handle errors from the agent service) + recoveryActions := []mgr.RecoveryAction{ + { + Type: mgr.ServiceRestart, + Delay: 5 * time.Second, + }, + } + if err := s.SetRecoveryActions(recoveryActions, 60); err != nil { + s.Delete() + return fmt.Errorf("SetRecoveryActions() failed: %w", err) + } + + // setup eventlog err = eventlog.InstallAsEventCreate(name, eventlog.Error|eventlog.Warning|eventlog.Info) if err != nil { s.Delete() - return fmt.Errorf("SetupEventLogSource() failed: %s", err) + return fmt.Errorf("SetupEventLogSource() failed: %w", err) } return s.Start(args...) From 65e2faa185713b0ddaf8bce68c75b831404c4d73 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 3 Oct 2022 15:47:44 -0700 Subject: [PATCH 073/173] update changelog Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 00ac677085..e4f8380f4f 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -7,17 +7,18 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased - ### Added - The authentication module now logs successful (INFO) and unsuccessful (ERROR) login attempts. +- Agent websocket connection logging includes backend entity name. + +### Changed +- The Sensu Agent service now auto-restarts after failures on Windows. ### Fixed - Fixed an issue where multi-expression exclusive "Deny" filters were not evaluated as described in the documentation. -### Added -- Agent websocket connection logging includes backend entity name. ## [6.8.1] - 2022-09-13 ### Changed From 93f65de32e61e182ea6abeed8a778b07f5840de1 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 3 Oct 2022 15:45:47 -0700 Subject: [PATCH 074/173] autorestart agent svc on windows Signed-off-by: Justin Kolberg --- agent/cmd/install_windows.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/agent/cmd/install_windows.go b/agent/cmd/install_windows.go index 85cb597e9e..4bd472f605 100644 --- a/agent/cmd/install_windows.go +++ b/agent/cmd/install_windows.go @@ -11,6 +11,7 @@ import ( "fmt" "os" "path/filepath" + "time" "golang.org/x/sys/windows/svc" "golang.org/x/sys/windows/svc/eventlog" @@ -68,10 +69,24 @@ func installService(name, displayName, desc string, args ...string) error { return err } defer s.Close() + + // setup recovery actions (how to handle errors from the agent service) + recoveryActions := []mgr.RecoveryAction{ + { + Type: mgr.ServiceRestart, + Delay: 5 * time.Second, + }, + } + if err := s.SetRecoveryActions(recoveryActions, 60); err != nil { + s.Delete() + return fmt.Errorf("SetRecoveryActions() failed: %w", err) + } + + // setup eventlog err = eventlog.InstallAsEventCreate(name, eventlog.Error|eventlog.Warning|eventlog.Info) if err != nil { s.Delete() - return fmt.Errorf("SetupEventLogSource() failed: %s", err) + return fmt.Errorf("SetupEventLogSource() failed: %w", err) } return s.Start(args...) From c6c554232ca74e38ad43e1684d5ff4059f37ae68 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 3 Oct 2022 15:47:44 -0700 Subject: [PATCH 075/173] update changelog Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index d32851ba57..3818efe518 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -9,6 +9,17 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Changed - Agent logs now include check name when a check request is not executed. +### Added +- The authentication module now logs successful (INFO) and unsuccessful (ERROR) + login attempts. +- Agent websocket connection logging includes backend entity name. + +### Changed +- The Sensu Agent service now auto-restarts after failures on Windows. + +### Fixed +- Fixed an issue where multi-expression exclusive "Deny" filters were not + evaluated as described in the documentation. ## [6.8.1] - 2022-09-13 From 2022bb5e79e6d12a6dd1a1854336bd58f10d96d5 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 4 Oct 2022 09:06:49 -0700 Subject: [PATCH 076/173] Label truncated events (#4876) Apply OutputTruncatedBytes label to truncated events Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 5 +++++ backend/store/etcd/event_store.go | 15 +++++++++++-- .../etcd/event_store_integration_test.go | 21 ++++++++++++++++--- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 3818efe518..01f420cd83 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -21,6 +21,11 @@ Versioning](http://semver.org/spec/v2.0.0.html). - Fixed an issue where multi-expression exclusive "Deny" filters were not evaluated as described in the documentation. +### Added +- A sensu.io/output_truncated_bytes label is now applied to events when +the check output has been truncated due to a check's max_output_size +configuration. + ## [6.8.1] - 2022-09-13 ### Changed diff --git a/backend/store/etcd/event_store.go b/backend/store/etcd/event_store.go index 8abf3c6816..aa39b474f0 100644 --- a/backend/store/etcd/event_store.go +++ b/backend/store/etcd/event_store.go @@ -31,6 +31,8 @@ const ( // EventBytesSummaryHelp is the help message for EventBytesSummary // Prometheus metrics. EventBytesSummaryHelp = "Distribution of event sizes, in bytes, received by the store on this backend" + + eventOutputTruncatedBytesLabel = "sensu.io/output_truncated_bytes" ) var ( @@ -285,14 +287,23 @@ func (s *Store) UpdateEvent(ctx context.Context, event *corev2.Event) (*corev2.E } // Truncate check output if the output is larger than MaxOutputSize - if size := event.Check.MaxOutputSize; size > 0 && int64(len(event.Check.Output)) > size { + + maxSize := event.Check.MaxOutputSize + if truncated := int64(len(event.Check.Output)) - maxSize; maxSize > 0 && truncated > 0 { // Taking pains to not modify our input, set a bound on the check // output size. newEvent := *persistEvent persistEvent = &newEvent check := *persistEvent.Check - check.Output = check.Output[:size] + check.Output = check.Output[:maxSize] persistEvent.Check = &check + + // Be bad and mutate the input event's labels. + if event.Labels == nil { + event.Labels = make(map[string]string) + persistEvent.Labels = event.Labels + } + event.Labels[eventOutputTruncatedBytesLabel] = fmt.Sprint(truncated) } if persistEvent.Timestamp == 0 { diff --git a/backend/store/etcd/event_store_integration_test.go b/backend/store/etcd/event_store_integration_test.go index c224f28cec..833cbc8598 100644 --- a/backend/store/etcd/event_store_integration_test.go +++ b/backend/store/etcd/event_store_integration_test.go @@ -27,12 +27,27 @@ func TestEventStorageMaxOutputSize(t *testing.T) { if _, _, err := store.UpdateEvent(ctx, event); err != nil { t.Fatal(err) } - event, err := store.GetEventByEntityCheck(ctx, "entity1", "check1") + storedEvent, err := store.GetEventByEntityCheck(ctx, "entity1", "check1") if err != nil { t.Fatal(err) } - if got, want := event.Check.Output, "VERY"; got != want { - t.Fatalf("bad check output: got %q, want %q", got, want) + + // persisted event check output was truncated + if got, want := storedEvent.Check.Output, "VERY"; got != want { + t.Errorf("bad persisted check output: got %q, want %q", got, want) + } + + // input event check output not mutated + if got, want := event.Check.Output, "VERY LONG"; got != want { + t.Errorf("input check output was modified: got %q, want %q", got, want) + } + + if got, want := event.Labels[eventOutputTruncatedBytesLabel], "5"; got != want { + t.Errorf("bad input event label: got %q, want %q", got, want) + } + + if got, want := storedEvent.Labels[eventOutputTruncatedBytesLabel], "5"; got != want { + t.Errorf("bad persisted event label: got %q, want %q", got, want) } }) } From 8bae1bc67e05b1e74086bc1dab7633e4ddc6d952 Mon Sep 17 00:00:00 2001 From: Francis Guimond Date: Wed, 5 Oct 2022 15:00:29 -0400 Subject: [PATCH 077/173] Set 6.8.2 build version to CHANGELOG-6.md file (#4886) * Add 6.8.2 version to changelog file Signed-off-by: Francis Guimond --- CHANGELOG-6.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 01f420cd83..1e87c8ed35 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,27 +5,24 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## Unreleased +## [6.8.2] - 2022-10-05 ### Changed - Agent logs now include check name when a check request is not executed. +- The Sensu Agent service now auto-restarts after failures on Windows. + ### Added - The authentication module now logs successful (INFO) and unsuccessful (ERROR) login attempts. - Agent websocket connection logging includes backend entity name. - -### Changed -- The Sensu Agent service now auto-restarts after failures on Windows. +- A sensu.io/output\_truncated\_bytes label is now applied to events when +the check output has been truncated due to a check's max\_output\_size +configuration. ### Fixed - Fixed an issue where multi-expression exclusive "Deny" filters were not evaluated as described in the documentation. -### Added -- A sensu.io/output_truncated_bytes label is now applied to events when -the check output has been truncated due to a check's max_output_size -configuration. - ## [6.8.1] - 2022-09-13 ### Changed From 9710203e6f6ca4a258857df59360433a6c98e6e9 Mon Sep 17 00:00:00 2001 From: Francis Guimond Date: Wed, 5 Oct 2022 16:14:58 -0400 Subject: [PATCH 078/173] Update release date Signed-off-by: Francis Guimond --- CHANGELOG-6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 1e87c8ed35..d0e72a95eb 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [6.8.2] - 2022-10-05 +## [6.8.2] - 2022-10-06 ### Changed - Agent logs now include check name when a check request is not executed. From 0078ef97ba66ea51cbeb94a23fd63eb559f1bfec Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Fri, 7 Oct 2022 09:46:25 -0700 Subject: [PATCH 079/173] Upgrade api modules (#4883) * bump sensu go core and types modules Signed-off-by: Christian Kruse * Patch graphql api util for api/core/v2 compat Signed-off-by: Christian Kruse * add go-test deep dependency Signed-off-by: Christian Kruse * fix cli/resource/TestParse tests Signed-off-by: Justin Kolberg (cherry picked from commit ffbe551112adddb49453051711636187da60348d) * bump to latest prerelease versions Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse Co-authored-by: Justin Kolberg --- backend/apid/graphql/util/api/api.go | 4 +- cli/resource/parse_test.go | 281 ++++++++++++++------------- go.mod | 7 +- go.sum | 19 +- 4 files changed, 164 insertions(+), 147 deletions(-) diff --git a/backend/apid/graphql/util/api/api.go b/backend/apid/graphql/util/api/api.go index a71f28df10..40a505d883 100644 --- a/backend/apid/graphql/util/api/api.go +++ b/backend/apid/graphql/util/api/api.go @@ -107,6 +107,8 @@ func UnwrapResource(r interface{}) interface{} { // WrapResource safely wraps the given resource in a type wrapper func WrapResource(r interface{}) types.Wrapper { switch r := r.(type) { + case corev2.Resource: + return types.WrapResource(r) case corev3.Resource: // maybe we move this into the compat package var tm types.TypeMeta if getter, ok := r.(interface{ GetTypeMeta() types.TypeMeta }); ok { @@ -121,8 +123,6 @@ func WrapResource(r interface{}) types.Wrapper { ObjectMeta: meta, Value: r, } - case corev2.Resource: - return types.WrapResource(r) case *types.Wrapper: if r == nil { return types.Wrapper{} diff --git a/cli/resource/parse_test.go b/cli/resource/parse_test.go index e456ecae50..70fe808dc6 100644 --- a/cli/resource/parse_test.go +++ b/cli/resource/parse_test.go @@ -2,16 +2,15 @@ package resource import ( "bytes" - "fmt" "io" "os" "strings" "testing" + "github.com/go-test/deep" corev2 "github.com/sensu/sensu-go/api/core/v2" "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" - "github.com/stretchr/testify/assert" ) func TestValidate(t *testing.T) { @@ -116,151 +115,157 @@ func TestParse(t *testing.T) { yamlError = "%$^apiVersion: core/v2\ntype: Handler\nmetadata:\n namespace: default\n name: email\nspec:\n type: pipe\n command: sensu-email-handler \n -u USERNAME -p PASSWORD\n timeout: 10\n filters:\n - is_incident\n - not_silenced\n - state_change_only\n runtime_assets:\n - email-handler\n" ) - var ( - checkConfigWrapper = &types.Wrapper{ - ObjectMeta: corev2.ObjectMeta{Name: "foo"}, - TypeMeta: corev2.TypeMeta{ - Type: "CheckConfig", - APIVersion: "core/v2", - }, - Value: &corev2.CheckConfig{ - ObjectMeta: corev2.ObjectMeta{Name: "foo"}, - Command: "echo foo", - Interval: 100, - }, - } - - handlerWrapper = &types.Wrapper{ - ObjectMeta: corev2.ObjectMeta{Name: "email", Namespace: "default"}, - TypeMeta: corev2.TypeMeta{ - Type: "Handler", - APIVersion: "core/v2", - }, - Value: &corev2.Handler{ - ObjectMeta: corev2.ObjectMeta{Name: "email", Namespace: "default"}, - Type: "pipe", - Command: "sensu-email-handler -u USERNAME -p PASSWORD", - Timeout: 10, - Filters: []string{"is_incident", "not_silenced", "state_change_only"}, - RuntimeAssets: []string{"email-handler"}, + checkConfigWrapper := &types.Wrapper{ + ObjectMeta: corev2.ObjectMeta{ + Name: "foo", + }, + TypeMeta: corev2.TypeMeta{ + Type: "CheckConfig", + APIVersion: "core/v2", + }, + Value: &corev2.CheckConfig{ + ObjectMeta: corev2.ObjectMeta{ + Name: "foo", + Labels: map[string]string{}, + Annotations: map[string]string{}, }, - } + Command: "echo foo", + Interval: 100, + }, + } - eventFilterWrapper = &types.Wrapper{ - ObjectMeta: corev2.ObjectMeta{Name: "filter_minimum", Namespace: "default"}, - TypeMeta: corev2.TypeMeta{ - Type: "EventFilter", - APIVersion: "core/v2", - }, - Value: &corev2.EventFilter{ - ObjectMeta: corev2.ObjectMeta{Name: "filter_minimum", Namespace: "default"}, - Action: "allow", - Expressions: []string{"event.check.occurrences == 1"}, + handlerWrapper := &types.Wrapper{ + ObjectMeta: corev2.ObjectMeta{ + Namespace: "default", + Name: "email", + }, + TypeMeta: corev2.TypeMeta{ + Type: "Handler", + APIVersion: "core/v2", + }, + Value: &corev2.Handler{ + ObjectMeta: corev2.ObjectMeta{ + Namespace: "default", + Name: "email", + Labels: map[string]string{}, + Annotations: map[string]string{}, }, - } + Type: "pipe", + Command: "sensu-email-handler -u USERNAME -p PASSWORD", + Timeout: 10, + Filters: []string{"is_incident", "not_silenced", "state_change_only"}, + RuntimeAssets: []string{"email-handler"}, + }, + } - testUnits = []struct { - name string - fileContent string - expectedWrappers []*types.Wrapper - expectedError error - }{ - { - name: "should parse a single unix formatted json resource", - fileContent: jsonUnix, - expectedWrappers: []*types.Wrapper{eventFilterWrapper}, - expectedError: nil, - }, - { - name: "should parse a single windows formatted json resource", - fileContent: jsonWindows, - expectedWrappers: []*types.Wrapper{eventFilterWrapper}, - expectedError: nil, - }, - { - name: "should parse a single unix formatted yaml resource", - fileContent: yamlUnixSingle, - expectedWrappers: []*types.Wrapper{handlerWrapper}, - expectedError: nil, - }, - { - name: "should parse a single windows formatted yaml resource", - fileContent: yamlWindowsSingle, - expectedWrappers: []*types.Wrapper{handlerWrapper}, - expectedError: nil, - }, - { - name: "should parse a single unix formatted yaml resource prefixed with ---", - fileContent: yamlUnixSinglePrefixed, - expectedWrappers: []*types.Wrapper{handlerWrapper}, - expectedError: nil, - }, - { - name: "should parse a single windows formatted yaml resource prefixed with ---", - fileContent: yamlWindowsSinglePrefixed, - expectedWrappers: []*types.Wrapper{handlerWrapper}, - expectedError: nil, - }, - { - name: "should parse multiple unix formatted yaml resources", - fileContent: yamlUnixMulti, - expectedWrappers: []*types.Wrapper{checkConfigWrapper, handlerWrapper}, - expectedError: nil, - }, - { - name: "should parse multiple windows formatted yaml resources", - fileContent: yamlWindowsMulti, - expectedWrappers: []*types.Wrapper{checkConfigWrapper, handlerWrapper}, - expectedError: nil, - }, - { - name: "should parse multiple unix formatted yaml resources prefixed with ---", - fileContent: yamlUnixMultiPrefixed, - expectedWrappers: []*types.Wrapper{checkConfigWrapper, handlerWrapper}, - expectedError: nil, - }, - { - name: "should parse multiple windows formatted yaml resources prefixed with ---", - fileContent: yamlWindowsMultiPrefixed, - expectedWrappers: []*types.Wrapper{checkConfigWrapper, handlerWrapper}, - expectedError: nil, - }, - { - name: "should return an error when parsing a badly formatted json file", - fileContent: jsonError, - expectedWrappers: nil, - expectedError: fmt.Errorf("too many errors"), - }, - { - name: "should return an error when parsing a badly formatted yaml file", - fileContent: yamlError, - expectedWrappers: nil, - expectedError: fmt.Errorf("error parsing resources: yaml: could not find expected directive name"), + eventFilterWrapper := &types.Wrapper{ + ObjectMeta: corev2.ObjectMeta{ + Namespace: "default", + Name: "filter_minimum", + }, + TypeMeta: corev2.TypeMeta{ + Type: "EventFilter", + APIVersion: "core/v2", + }, + Value: &corev2.EventFilter{ + ObjectMeta: corev2.ObjectMeta{ + Namespace: "default", + Name: "filter_minimum", + Labels: map[string]string{}, + Annotations: map[string]string{}, }, - } - ) + Action: "allow", + Expressions: []string{"event.check.occurrences == 1"}, + }, + } - for _, testUnit := range testUnits { - stringReader := strings.NewReader(testUnit.fileContent) - wrappers, err := Parse(stringReader) + tests := []struct { + name string + fileContent string + want []*types.Wrapper + wantErr bool + wantErrMsg string + }{ + { + name: "should parse a single unix formatted json resource", + fileContent: jsonUnix, + want: []*types.Wrapper{eventFilterWrapper}, + }, + { + name: "should parse a single windows formatted json resource", + fileContent: jsonWindows, + want: []*types.Wrapper{eventFilterWrapper}, + }, + { + name: "should parse a single unix formatted yaml resource", + fileContent: yamlUnixSingle, + want: []*types.Wrapper{handlerWrapper}, + }, + { + name: "should parse a single windows formatted yaml resource", + fileContent: yamlWindowsSingle, + want: []*types.Wrapper{handlerWrapper}, + }, + { + name: "should parse a single unix formatted yaml resource prefixed with ---", + fileContent: yamlUnixSinglePrefixed, + want: []*types.Wrapper{handlerWrapper}, + }, + { + name: "should parse a single windows formatted yaml resource prefixed with ---", + fileContent: yamlWindowsSinglePrefixed, + want: []*types.Wrapper{handlerWrapper}, + }, + { + name: "should parse multiple unix formatted yaml resources", + fileContent: yamlUnixMulti, + want: []*types.Wrapper{checkConfigWrapper, handlerWrapper}, + }, + { + name: "should parse multiple windows formatted yaml resources", + fileContent: yamlWindowsMulti, + want: []*types.Wrapper{checkConfigWrapper, handlerWrapper}, + }, + { + name: "should parse multiple unix formatted yaml resources prefixed with ---", + fileContent: yamlUnixMultiPrefixed, + want: []*types.Wrapper{checkConfigWrapper, handlerWrapper}, + }, + { + name: "should parse multiple windows formatted yaml resources prefixed with ---", + fileContent: yamlWindowsMultiPrefixed, + want: []*types.Wrapper{checkConfigWrapper, handlerWrapper}, + }, + { + name: "should return an error when parsing a badly formatted json file", + fileContent: jsonError, + wantErr: true, + wantErrMsg: "too many errors", + }, + { + name: "should return an error when parsing a badly formatted yaml file", + fileContent: yamlError, + wantErr: true, + wantErrMsg: "error parsing resources: yaml: could not find expected directive name", + }, + } - if testUnit.expectedError != nil { - if assert.Errorf(t, err, "missing error when processing '%s'", testUnit.name) { - assert.Equal(t, testUnit.expectedError, err, "invalid error when processing %s", testUnit.name) + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + stringReader := strings.NewReader(tt.fileContent) + got, err := Parse(stringReader) + if (err != nil) != tt.wantErr { + t.Errorf("Parse() error = %v, wantErr %v", err, tt.wantErr) + return } - assert.Equal(t, 0, len(wrappers), - "there should be no wrapper when processing '%s'", testUnit.name) - continue - } else { - if !assert.Nil(t, err, "unexpected error when processing '%s': %v", testUnit.name, err) { - continue + if err != nil && tt.wantErrMsg != err.Error() { + t.Errorf("Parse() error msg = %v, wantErrMsg %v", err.Error(), tt.wantErrMsg) + return } - } - if !assert.Equal(t, len(testUnit.expectedWrappers), len(wrappers), - "wrong number of resources parsed when processing '%s'", testUnit.name) { - continue - } - assert.Equal(t, testUnit.expectedWrappers, wrappers, "wrappers should be equal when processing '%s'", testUnit.name) + if diff := deep.Equal(got, tt.want); diff != nil { + t.Errorf("Parse() got differs from want: %v", diff) + } + }) } } diff --git a/go.mod b/go.mod index 1388eca3cd..62b4b7976b 100644 --- a/go.mod +++ b/go.mod @@ -47,9 +47,9 @@ require ( github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 - github.com/sensu/sensu-go/api/core/v2 v2.14.0 - github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf - github.com/sensu/sensu-go/types v0.10.0 + github.com/sensu/sensu-go/api/core/v2 v2.16.0-alpha1 + github.com/sensu/sensu-go/api/core/v3 v3.8.0-alpha1 + github.com/sensu/sensu-go/types v0.11.0 github.com/shirou/gopsutil/v3 v3.21.12 github.com/sirupsen/logrus v1.7.0 github.com/spf13/cobra v1.1.3 @@ -78,6 +78,7 @@ require ( require ( github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect + github.com/go-test/deep v1.0.8 github.com/google/go-cmp v0.5.8 // indirect github.com/kr/pty v1.1.8 // indirect golang.org/x/text v0.3.7 // indirect diff --git a/go.sum b/go.sum index 9c227dafb7..bbc1d54c4d 100644 --- a/go.sum +++ b/go.sum @@ -133,6 +133,8 @@ github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiU github.com/go-resty/resty/v2 v2.5.0 h1:WFb5bD49/85PO7WgAjZ+/TJQ+Ty1XOcWEfD1zIFCM1c= github.com/go-resty/resty/v2 v2.5.0/go.mod h1:B88+xCTEwvfD94NOuE6GS1wMlnoKNY8eEiNizfNwOwA= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -396,13 +398,21 @@ github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmR github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= -github.com/sensu/sensu-go/api/core/v2 v2.14.0 h1:z4JVqy7z6iFgMDUH0uc1Ns0bqLFKTpc5bi4Iw7qweks= github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= +github.com/sensu/sensu-go/api/core/v2 v2.15.0/go.mod h1:QxGKxqQv4rpweFrR4Jkp1tas3amGzAy0wO0fUwq0suU= +github.com/sensu/sensu-go/api/core/v2 v2.15.1-alpha2 h1:6hUVaCWZkzUPevOXjrSJoGdW4iF3CxdCrahv4m7bPB0= +github.com/sensu/sensu-go/api/core/v2 v2.15.1-alpha2/go.mod h1:MjM7+MCGEyTAgaZ589SiGHwYiaYF7N/58dU0J070u/0= +github.com/sensu/sensu-go/api/core/v2 v2.16.0-alpha1 h1:dZyogoQc9ZMxvbdJ/Vmf2U7a/CHygmDrviiqYH9OoY8= +github.com/sensu/sensu-go/api/core/v2 v2.16.0-alpha1/go.mod h1:MjM7+MCGEyTAgaZ589SiGHwYiaYF7N/58dU0J070u/0= github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf h1:K1VrKHGwQ4UpOQmy2J6IFyv0u17OKTwWrfAGILClpbw= -github.com/sensu/sensu-go/api/core/v3 v3.6.3-0.20220913191107-10ae2ae7d8cf/go.mod h1:n2dhnBTovMrzmE1P0D7gvEbUG7TPH6hdtr7qvoPf/sY= -github.com/sensu/sensu-go/types v0.10.0 h1:sm+dLuqEEECVxjW5EfXkU5weGPwrg/Jymbm28HdQpl8= +github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= +github.com/sensu/sensu-go/api/core/v3 v3.7.1-alpha1 h1:nd6ib+RMRI/e7q++kmtcFt5HrJCBtmz6UGUMH132XhY= +github.com/sensu/sensu-go/api/core/v3 v3.7.1-alpha1/go.mod h1:8io5TBGBcuR9B5MiWUi3bqr2+sGe+qcH5p6NjhAlzy4= +github.com/sensu/sensu-go/api/core/v3 v3.8.0-alpha1 h1:foxUbbuyk2E55CAIzPmunbuCxzgImCjwpPzn9p2T8xQ= +github.com/sensu/sensu-go/api/core/v3 v3.8.0-alpha1/go.mod h1:/elCzc+L10QXYVJeiHnZjCJVWkxSrdSlIxd30hsa7MQ= github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= +github.com/sensu/sensu-go/types v0.11.0 h1:jsVa/apRaJJEdk0Jl7ZUksiBkuEAjCZd/gSBWlrptJA= +github.com/sensu/sensu-go/types v0.11.0/go.mod h1:fhgW3xlvkPFMZiT0IppHySeyN61ZTIKevgSPFSoaQEk= github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -471,6 +481,7 @@ go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= From 5f672b7f07f23cf358dd0420fa206772f7d33da6 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 25 Oct 2022 14:34:11 -0700 Subject: [PATCH 080/173] bump sensu-go api versions to v2.16.0 and v3.8.0 (#4895) Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- go.mod | 4 ++-- go.sum | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 62b4b7976b..e94b7b5435 100644 --- a/go.mod +++ b/go.mod @@ -47,8 +47,8 @@ require ( github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 - github.com/sensu/sensu-go/api/core/v2 v2.16.0-alpha1 - github.com/sensu/sensu-go/api/core/v3 v3.8.0-alpha1 + github.com/sensu/sensu-go/api/core/v2 v2.16.0 + github.com/sensu/sensu-go/api/core/v3 v3.8.0 github.com/sensu/sensu-go/types v0.11.0 github.com/shirou/gopsutil/v3 v3.21.12 github.com/sirupsen/logrus v1.7.0 diff --git a/go.sum b/go.sum index bbc1d54c4d..5a4c3407d3 100644 --- a/go.sum +++ b/go.sum @@ -400,16 +400,12 @@ github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= github.com/sensu/sensu-go/api/core/v2 v2.15.0/go.mod h1:QxGKxqQv4rpweFrR4Jkp1tas3amGzAy0wO0fUwq0suU= -github.com/sensu/sensu-go/api/core/v2 v2.15.1-alpha2 h1:6hUVaCWZkzUPevOXjrSJoGdW4iF3CxdCrahv4m7bPB0= -github.com/sensu/sensu-go/api/core/v2 v2.15.1-alpha2/go.mod h1:MjM7+MCGEyTAgaZ589SiGHwYiaYF7N/58dU0J070u/0= -github.com/sensu/sensu-go/api/core/v2 v2.16.0-alpha1 h1:dZyogoQc9ZMxvbdJ/Vmf2U7a/CHygmDrviiqYH9OoY8= -github.com/sensu/sensu-go/api/core/v2 v2.16.0-alpha1/go.mod h1:MjM7+MCGEyTAgaZ589SiGHwYiaYF7N/58dU0J070u/0= +github.com/sensu/sensu-go/api/core/v2 v2.16.0 h1:HOq4rFkQ1S5ZjxmMTLc5J5mAbECrnKWvtXXbMqr3j9s= +github.com/sensu/sensu-go/api/core/v2 v2.16.0/go.mod h1:MjM7+MCGEyTAgaZ589SiGHwYiaYF7N/58dU0J070u/0= github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.7.1-alpha1 h1:nd6ib+RMRI/e7q++kmtcFt5HrJCBtmz6UGUMH132XhY= -github.com/sensu/sensu-go/api/core/v3 v3.7.1-alpha1/go.mod h1:8io5TBGBcuR9B5MiWUi3bqr2+sGe+qcH5p6NjhAlzy4= -github.com/sensu/sensu-go/api/core/v3 v3.8.0-alpha1 h1:foxUbbuyk2E55CAIzPmunbuCxzgImCjwpPzn9p2T8xQ= -github.com/sensu/sensu-go/api/core/v3 v3.8.0-alpha1/go.mod h1:/elCzc+L10QXYVJeiHnZjCJVWkxSrdSlIxd30hsa7MQ= +github.com/sensu/sensu-go/api/core/v3 v3.8.0 h1:IlHqv/2Yu6dUp2+M1dwxmZu8cJmZ/TMiOhbWMIWCI2o= +github.com/sensu/sensu-go/api/core/v3 v3.8.0/go.mod h1:/elCzc+L10QXYVJeiHnZjCJVWkxSrdSlIxd30hsa7MQ= github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= github.com/sensu/sensu-go/types v0.11.0 h1:jsVa/apRaJJEdk0Jl7ZUksiBkuEAjCZd/gSBWlrptJA= github.com/sensu/sensu-go/types v0.11.0/go.mod h1:fhgW3xlvkPFMZiT0IppHySeyN61ZTIKevgSPFSoaQEk= From 97ecc7e5ca383b471baa8cec33d61905d5d7899d Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 25 Oct 2022 15:55:52 -0700 Subject: [PATCH 081/173] Agent ingests graphite plaintext metric tags (#4897) Graphite has support for storing data in tags to identify series of metrics. This change introduces support for this feature in the graphite text protocol. Presently the agent ingests `my.series;tag1=value1 1 999999999` as a metric point with name "my.series;tag1=value1". Per the graphite spec this will now be ingested as a metric point with name "my.series" and a tag for ("tag1": "value1") Signed-off-by: Christian Kruse reframe changelog as a feature add Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 6 ++++++ agent/transformers/graphite.go | 28 ++++++++++++++++++++++++++-- agent/transformers/graphite_test.go | 14 ++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index e02af7c675..d2e29449e4 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Added +- Include support for handling metric tags in the graphite plaintext + protocol. Agents now respect the new graphite tag specification. + ## [6.8.2] - 2022-10-06 ### Changed diff --git a/agent/transformers/graphite.go b/agent/transformers/graphite.go index 33bde1fda7..777a011a8b 100644 --- a/agent/transformers/graphite.go +++ b/agent/transformers/graphite.go @@ -2,6 +2,7 @@ package transformers import ( "bufio" + "fmt" "strconv" "strings" @@ -64,7 +65,13 @@ func ParseGraphite(event *types.Event) GraphiteList { continue } - g.Path = args[0] + var err error + var tags []*types.MetricTag + g.Path, tags, err = parseSeries(args[0]) + if err != nil { + logger.WithFields(fields).WithError(ErrMetricExtraction).Errorf("metric series name is invalid: %q %s", args[0], err) + continue + } f, err := strconv.ParseFloat(args[1], 64) if err != nil { @@ -79,7 +86,7 @@ func ParseGraphite(event *types.Event) GraphiteList { continue } g.Timestamp = i - g.Tags = event.Check.OutputMetricTags + g.Tags = append(event.Check.OutputMetricTags, tags...) graphiteList = append(graphiteList, g) } if err := s.Err(); err != nil { @@ -88,3 +95,20 @@ func ParseGraphite(event *types.Event) GraphiteList { return graphiteList } + +func parseSeries(series string) (string, []*types.MetricTag, error) { + var tags []*types.MetricTag + parts := strings.Split(series, ";") + if len(parts) == 1 { + return series, tags, nil + } + for i := 1; i < len(parts); i++ { + tagTxt := parts[i] + tagParts := strings.Split(tagTxt, "=") + if len(tagParts) != 2 { + return parts[0], tags, fmt.Errorf("invalid graphite data tag format must be in form of name=value: %s", tagTxt) + } + tags = append(tags, &types.MetricTag{Name: tagParts[0], Value: tagParts[1]}) + } + return parts[0], tags, nil +} diff --git a/agent/transformers/graphite_test.go b/agent/transformers/graphite_test.go index e7af0dab24..12cbe819a0 100644 --- a/agent/transformers/graphite_test.go +++ b/agent/transformers/graphite_test.go @@ -75,6 +75,20 @@ func TestParseGraphite(t *testing.T) { metric: "metric.value 1 noon", expectedFormat: GraphiteList(nil), }, + { + metric: "os.disk.used_bytes;GH=#4677;type=issue 2048 123456789", + expectedFormat: GraphiteList{ + { + Path: "os.disk.used_bytes", + Value: 2048, + Timestamp: 123456789, + Tags: []*types.MetricTag{ + {Name: "GH", Value: "#4677"}, + {Name: "type", Value: "issue"}, + }, + }, + }, + }, } for _, tc := range testCases { From d16d49e791cf4e5a09d66d9b5972b62c511451c4 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Mon, 31 Oct 2022 14:43:09 -0700 Subject: [PATCH 082/173] update changelog for 6.9.0 release (#4907) * update changelog for 6.9.0 release Signed-off-by: Christian Kruse * update release date Signed-off-by: Christian Kruse * Move changelog entry mistakenly in 6.8 Due to a poorly merged CHANGELOG-6.mdentry, a change entry was added to a 6.8 release when it should have been unreleased for 6.9. Signed-off-by: Christian Kruse * fix changelog 6.8 and 6.9 releases Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index d2e29449e4..051afa9fb5 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,41 +5,34 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [6.9.0] - 2022-11-01 ### Added - Include support for handling metric tags in the graphite plaintext protocol. Agents now respect the new graphite tag specification. - -## [6.8.2] - 2022-10-06 - -### Changed -- Agent logs now include check name when a check request is not executed. -- The Sensu Agent service now auto-restarts after failures on Windows. - -### Added +- Agent websocket connection logging includes backend entity name. - The authentication module now logs successful (INFO) and unsuccessful (ERROR) login attempts. -- Agent websocket connection logging includes backend entity name. -- A sensu.io/output\_truncated\_bytes label is now applied to events when -the check output has been truncated due to a check's max\_output\_size -configuration. + +### Changed +- Keepalive reconstruction no longer blocks backend startup. Instead runs + gradually in the background. +- Upgraded etcd version from 3.5.4 to 3.5.5. ### Fixed - Fixed an issue where multi-expression exclusive "Deny" filters were not evaluated as described in the documentation. -### Added -- The authentication module now logs successful (INFO) and unsuccessful (ERROR) - login attempts. -- Agent websocket connection logging includes backend entity name. +## [6.8.2] - 2022-10-06 ### Changed +- Agent logs now include check name when a check request is not executed. - The Sensu Agent service now auto-restarts after failures on Windows. -### Fixed -- Fixed an issue where multi-expression exclusive "Deny" filters were not - evaluated as described in the documentation. +### Added +- A sensu.io/output\_truncated\_bytes label is now applied to events when +the check output has been truncated due to a check's max\_output\_size +configuration. ## [6.8.1] - 2022-09-13 @@ -51,11 +44,6 @@ should be no unintended gaps between overlapping subdues. - Addresses issue where the entity list view would display values of redacted labels. -### Changed -- Keepalive reconstruction no longer blocks backend startup. Instead runs -gradually in the background. -- Upgraded etcd version from 3.5.4 to 3.5.5. - ## [6.8.0] - 2022-08-24 ### Changed From 95cfde22034ee46e6dfd02c69de50e071241127c Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Mon, 7 Nov 2022 15:34:30 -0800 Subject: [PATCH 083/173] Allow Graphql Middleware Init funcs to add to Context (#4910) Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- graphql/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphql/service.go b/graphql/service.go index ad6bf606c8..1fb45ec73c 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -207,7 +207,7 @@ func (service *Service) Do(ctx context.Context, p QueryParams) *Result { Schema: schema, AST: AST, Args: p.Variables, - Context: ctx, + Context: params.Context, }) } From 76c7a167e572bb370438e38b678fa19c3d973de1 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Thu, 10 Nov 2022 09:22:57 -0800 Subject: [PATCH 084/173] Migrate to core modules (#4908) * Migrate to sensu/core modules Signed-off-by: Christian Kruse * Replace usage of sensu-go/api/core with core modules Signed-off-by: Christian Kruse * Migrate type resolution logic to sensu-api-tools Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- agent/agent.go | 4 +- agent/agent_test.go | 2 +- agent/check_handler.go | 2 +- agent/check_handler_internal_test.go | 2 +- agent/cmd/start.go | 2 +- agent/cmd/start_test.go | 2 +- agent/config.go | 2 +- agent/entity.go | 4 +- agent/entity_config_handler.go | 2 +- agent/entity_config_handler_test.go | 2 +- agent/entity_test.go | 4 +- agent/event.go | 2 +- agent/event_test.go | 4 +- agent/hook.go | 2 +- agent/hook_test.go | 2 +- agent/queue_test.go | 2 +- asset/asset.go | 2 +- asset/boltdb_manager.go | 2 +- asset/filtered_manager.go | 2 +- asset/filtered_manager_test.go | 2 +- asset/set_test.go | 2 +- backend/agentd/agentd.go | 2 +- backend/agentd/agentd_test.go | 4 +- backend/agentd/middlewares.go | 2 +- backend/agentd/session.go | 4 +- backend/agentd/session_test.go | 4 +- backend/agentd/watcher.go | 4 +- backend/api/asset.go | 2 +- backend/api/asset_test.go | 2 +- backend/api/authentication.go | 2 +- backend/api/authentication_test.go | 2 +- backend/api/check.go | 2 +- backend/api/check_test.go | 2 +- backend/api/entity.go | 4 +- backend/api/entity_test.go | 2 +- backend/api/event.go | 2 +- backend/api/event_test.go | 2 +- backend/api/filter.go | 2 +- backend/api/filter_test.go | 2 +- backend/api/generic.go | 8 +-- backend/api/generic_test.go | 4 +- backend/api/handler.go | 2 +- backend/api/handler_test.go | 2 +- backend/api/hook.go | 2 +- backend/api/hook_test.go | 2 +- backend/api/meta.go | 2 +- backend/api/mutator.go | 2 +- backend/api/mutator_test.go | 2 +- backend/api/namespace.go | 4 +- backend/api/namespace_test.go | 4 +- backend/api/rbac.go | 2 +- backend/api/rbac_test.go | 2 +- backend/api/silenced.go | 2 +- backend/api/silenced_test.go | 2 +- backend/api/user.go | 2 +- backend/api/user_test.go | 2 +- backend/apid/actions/checks.go | 2 +- backend/apid/actions/entities.go | 4 +- backend/apid/actions/entities_test.go | 2 +- backend/apid/actions/events.go | 2 +- backend/apid/actions/events_test.go | 2 +- backend/apid/actions/health.go | 2 +- backend/apid/actions/silenced.go | 2 +- backend/apid/actions/silenced_test.go | 2 +- backend/apid/actions/tessen.go | 2 +- backend/apid/actions/tessen_test.go | 2 +- backend/apid/actions/users.go | 2 +- backend/apid/actions/version.go | 6 +-- backend/apid/graphql/asset.go | 2 +- backend/apid/graphql/asset_test.go | 2 +- backend/apid/graphql/backendEntity.go | 2 +- backend/apid/graphql/check.go | 2 +- backend/apid/graphql/check_filters.go | 2 +- backend/apid/graphql/check_filters_test.go | 2 +- backend/apid/graphql/check_test.go | 2 +- backend/apid/graphql/context.go | 2 +- backend/apid/graphql/corev2.go | 2 +- backend/apid/graphql/corev2_test.go | 2 +- backend/apid/graphql/corev3.go | 4 +- backend/apid/graphql/corev3_test.go | 4 +- backend/apid/graphql/dataloader.go | 2 +- backend/apid/graphql/dataloader_test.go | 2 +- backend/apid/graphql/entity.go | 2 +- backend/apid/graphql/entity_filters.go | 2 +- backend/apid/graphql/entity_filters_test.go | 2 +- backend/apid/graphql/entity_test.go | 2 +- backend/apid/graphql/event.go | 2 +- backend/apid/graphql/event_filter.go | 2 +- backend/apid/graphql/event_filter_filters.go | 2 +- .../apid/graphql/event_filter_filters_test.go | 2 +- backend/apid/graphql/event_filter_test.go | 2 +- backend/apid/graphql/event_filters.go | 2 +- backend/apid/graphql/event_filters_test.go | 2 +- backend/apid/graphql/event_test.go | 2 +- backend/apid/graphql/filter.go | 2 +- backend/apid/graphql/filter/boolean.go | 2 +- backend/apid/graphql/filter/boolean_test.go | 2 +- backend/apid/graphql/filter/filter.go | 2 +- backend/apid/graphql/filter/filter_test.go | 2 +- backend/apid/graphql/filter/string.go | 2 +- backend/apid/graphql/filter/string_test.go | 2 +- backend/apid/graphql/globalid/encoder.go | 2 +- backend/apid/graphql/globalid/encoder_test.go | 2 +- backend/apid/graphql/globalid/pipeline.go | 2 +- backend/apid/graphql/globalid/util_test.go | 4 +- backend/apid/graphql/handler.go | 2 +- backend/apid/graphql/handler_filters.go | 2 +- backend/apid/graphql/handler_filters_test.go | 2 +- backend/apid/graphql/handler_test.go | 2 +- backend/apid/graphql/health.go | 2 +- backend/apid/graphql/health_test.go | 2 +- backend/apid/graphql/hook.go | 2 +- backend/apid/graphql/hook_test.go | 2 +- backend/apid/graphql/interfaces.go | 2 +- backend/apid/graphql/meta.go | 2 +- backend/apid/graphql/meta_test.go | 2 +- backend/apid/graphql/mock_test.go | 2 +- backend/apid/graphql/mutations.go | 2 +- backend/apid/graphql/mutations_test.go | 2 +- backend/apid/graphql/mutator.go | 2 +- backend/apid/graphql/mutator_test.go | 2 +- backend/apid/graphql/namespace.go | 2 +- backend/apid/graphql/namespace_test.go | 2 +- backend/apid/graphql/node.go | 2 +- backend/apid/graphql/node_test.go | 2 +- backend/apid/graphql/query.go | 5 +- backend/apid/graphql/query_test.go | 4 +- backend/apid/graphql/relay/resolver.go | 2 +- backend/apid/graphql/relay/resolver_test.go | 2 +- backend/apid/graphql/service.go | 2 +- backend/apid/graphql/silence_filters.go | 2 +- backend/apid/graphql/silence_filters_test.go | 2 +- backend/apid/graphql/silenced.go | 2 +- backend/apid/graphql/silenced_test.go | 2 +- backend/apid/graphql/suggest.go | 2 +- backend/apid/graphql/suggest/field.go | 2 +- backend/apid/graphql/suggest/field_test.go | 2 +- backend/apid/graphql/suggest/resource.go | 2 +- backend/apid/graphql/user.go | 2 +- backend/apid/graphql/util.go | 2 +- backend/apid/graphql/util/api/api.go | 4 +- backend/apid/graphql/util/api/api_test.go | 4 +- backend/apid/graphql/util/relay/node.go | 6 +-- backend/apid/graphql/util/relay/node_test.go | 2 +- backend/apid/graphql/viewer_test.go | 2 +- backend/apid/handlers/create.go | 2 +- backend/apid/handlers/create_test.go | 2 +- backend/apid/handlers/create_v3.go | 2 +- backend/apid/handlers/create_v3_test.go | 2 +- backend/apid/handlers/get.go | 2 +- backend/apid/handlers/get_v3.go | 2 +- backend/apid/handlers/get_v3_test.go | 2 +- backend/apid/handlers/handlers.go | 4 +- backend/apid/handlers/handlers_test.go | 2 +- backend/apid/handlers/list.go | 2 +- backend/apid/handlers/list_test.go | 2 +- backend/apid/handlers/list_v3.go | 4 +- backend/apid/handlers/list_v3_test.go | 4 +- backend/apid/handlers/patch.go | 4 +- .../apid/handlers/patch_integration_test.go | 4 +- backend/apid/handlers/update.go | 2 +- backend/apid/handlers/update_test.go | 2 +- backend/apid/handlers/update_v3.go | 2 +- backend/apid/handlers/update_v3_test.go | 2 +- backend/apid/middlewares/authentication.go | 2 +- .../apid/middlewares/authentication_test.go | 2 +- backend/apid/middlewares/authorization.go | 2 +- .../apid/middlewares/authorization_test.go | 2 +- backend/apid/middlewares/pagination.go | 2 +- backend/apid/middlewares/pagination_test.go | 2 +- .../apid/middlewares/refresh_token_test.go | 2 +- backend/apid/routers/apikeys.go | 2 +- backend/apid/routers/apikeys_test.go | 2 +- backend/apid/routers/assets.go | 2 +- backend/apid/routers/assets_test.go | 2 +- backend/apid/routers/authentication.go | 2 +- backend/apid/routers/authentication_test.go | 2 +- backend/apid/routers/checks.go | 2 +- backend/apid/routers/checks_test.go | 2 +- backend/apid/routers/clusterrolebindings.go | 2 +- .../apid/routers/clusterrolebindings_test.go | 2 +- backend/apid/routers/clusterroles.go | 2 +- backend/apid/routers/clusterroles_test.go | 2 +- backend/apid/routers/entities.go | 4 +- backend/apid/routers/entities_test.go | 2 +- backend/apid/routers/events.go | 2 +- backend/apid/routers/events_test.go | 2 +- backend/apid/routers/filters.go | 2 +- backend/apid/routers/filters_test.go | 2 +- backend/apid/routers/graphql.go | 2 +- backend/apid/routers/handlers.go | 2 +- backend/apid/routers/handlers_test.go | 2 +- backend/apid/routers/health.go | 2 +- backend/apid/routers/helpers_test.go | 2 +- backend/apid/routers/hooks.go | 2 +- backend/apid/routers/hooks_test.go | 2 +- backend/apid/routers/lister.go | 2 +- backend/apid/routers/lister_test.go | 2 +- backend/apid/routers/mutators.go | 2 +- backend/apid/routers/mutators_test.go | 2 +- backend/apid/routers/namespaces.go | 2 +- backend/apid/routers/namespaces_test.go | 2 +- backend/apid/routers/pipelines.go | 2 +- backend/apid/routers/pipelines_test.go | 2 +- backend/apid/routers/rolebindings.go | 2 +- backend/apid/routers/rolebindings_test.go | 2 +- backend/apid/routers/roles.go | 2 +- backend/apid/routers/roles_test.go | 2 +- backend/apid/routers/routers.go | 4 +- backend/apid/routers/routers_test.go | 2 +- backend/apid/routers/silenced.go | 2 +- backend/apid/routers/silenced_test.go | 2 +- backend/apid/routers/tessen.go | 2 +- backend/apid/routers/tessen_test.go | 2 +- backend/apid/routers/users.go | 2 +- backend/apid/routers/users_test.go | 2 +- backend/apid/routers/version.go | 2 +- backend/apid/routers/version_test.go | 2 +- backend/authentication/authenticator.go | 2 +- backend/authentication/jwt/jwt.go | 2 +- backend/authentication/jwt/jwt_test.go | 2 +- .../authentication/providers/basic/basic.go | 2 +- backend/authorization/rbac/rbac.go | 2 +- backend/authorization/rbac/rbac_test.go | 2 +- backend/backend.go | 2 +- backend/cmd/init.go | 2 +- backend/cmd/start.go | 2 +- backend/cmd/upgrade.go | 2 +- backend/config.go | 2 +- backend/eventd/entity.go | 4 +- backend/eventd/entity_test.go | 4 +- backend/eventd/eventd.go | 4 +- backend/eventd/eventd_test.go | 4 +- backend/eventd/integration_test.go | 2 +- backend/eventd/silenced.go | 2 +- backend/eventd/silenced_test.go | 4 +- backend/keepalived/deregisterer.go | 2 +- backend/keepalived/integration_test.go | 2 +- backend/keepalived/keepalived.go | 4 +- backend/keepalived/keepalived_test.go | 4 +- backend/pipeline/adapter.go | 2 +- backend/pipeline/adapterv1.go | 2 +- backend/pipeline/adapterv1_test.go | 2 +- backend/pipeline/filter.go | 2 +- backend/pipeline/filter/has_metrics.go | 2 +- backend/pipeline/filter/has_metrics_test.go | 2 +- backend/pipeline/filter/is_incident.go | 2 +- backend/pipeline/filter/is_incident_test.go | 2 +- backend/pipeline/filter/legacy.go | 2 +- backend/pipeline/filter/legacy_test.go | 2 +- backend/pipeline/filter/not_silenced.go | 2 +- backend/pipeline/filter/not_silenced_test.go | 2 +- backend/pipeline/filter_test.go | 2 +- backend/pipeline/handler.go | 2 +- backend/pipeline/handler/legacy.go | 2 +- backend/pipeline/handler/legacy_test.go | 2 +- backend/pipeline/handler_test.go | 2 +- backend/pipeline/mutator.go | 2 +- backend/pipeline/mutator/javascript.go | 2 +- backend/pipeline/mutator/javascript_test.go | 2 +- backend/pipeline/mutator/json.go | 2 +- backend/pipeline/mutator/json_test.go | 2 +- backend/pipeline/mutator/legacy.go | 2 +- backend/pipeline/mutator/legacy_test.go | 2 +- backend/pipeline/mutator/only_check_output.go | 2 +- .../mutator/only_check_output_test.go | 2 +- backend/pipeline/mutator/pipe.go | 2 +- backend/pipeline/mutator/pipe_test.go | 2 +- backend/pipeline/mutator_test.go | 2 +- backend/pipelined/pipelined.go | 2 +- backend/pipelined/pipelined_test.go | 2 +- backend/resource/backend.go | 2 +- backend/resource/backend_test.go | 2 +- backend/schedulerd/check_scheduler_test.go | 2 +- backend/schedulerd/check_watcher.go | 2 +- backend/schedulerd/check_watcher_test.go | 2 +- backend/schedulerd/cron_scheduler.go | 2 +- backend/schedulerd/executor.go | 4 +- backend/schedulerd/executor_test.go | 4 +- backend/schedulerd/interface.go | 2 +- backend/schedulerd/interval_scheduler.go | 2 +- backend/schedulerd/proxy_check.go | 4 +- backend/schedulerd/proxy_check_test.go | 4 +- backend/schedulerd/roundrobin_cron.go | 4 +- backend/schedulerd/roundrobin_interval.go | 4 +- backend/schedulerd/schedulerd.go | 2 +- backend/secrets/broken_provider.go | 2 +- backend/secrets/provider.go | 2 +- backend/secrets/provider_test.go | 2 +- backend/seeds/seeds.go | 2 +- backend/store/cache/cache.go | 2 +- backend/store/cache/cache_integration_test.go | 2 +- backend/store/cache/cache_test.go | 2 +- backend/store/cache/v2/cache.go | 2 +- .../store/cache/v2/cache_integration_test.go | 4 +- backend/store/cache/v2/cache_test.go | 4 +- backend/store/etcd/asset_store.go | 2 +- backend/store/etcd/check_store.go | 2 +- backend/store/etcd/check_store_test.go | 2 +- backend/store/etcd/entity_store.go | 4 +- backend/store/etcd/entity_store_test.go | 2 +- backend/store/etcd/event_store.go | 2 +- .../etcd/event_store_integration_test.go | 2 +- backend/store/etcd/event_store_test.go | 2 +- backend/store/etcd/filter_store.go | 2 +- backend/store/etcd/generic_object.pb.go | 2 +- backend/store/etcd/generic_object_test.go | 2 +- backend/store/etcd/generic_objectpb_test.go | 2 +- backend/store/etcd/handler_store.go | 2 +- backend/store/etcd/handler_store_test.go | 2 +- backend/store/etcd/health_store.go | 2 +- backend/store/etcd/hook_store.go | 2 +- backend/store/etcd/hook_store_test.go | 2 +- backend/store/etcd/keepalive_store.go | 2 +- backend/store/etcd/migrations.go | 2 +- backend/store/etcd/migrations_test.go | 2 +- backend/store/etcd/mutator_store.go | 2 +- backend/store/etcd/mutator_store_test.go | 2 +- backend/store/etcd/namespace_store.go | 2 +- backend/store/etcd/namespace_store_test.go | 2 +- backend/store/etcd/pipeline_store.go | 2 +- backend/store/etcd/resource.go | 2 +- .../store/etcd/resource_integration_test.go | 2 +- backend/store/etcd/silenced_store.go | 2 +- backend/store/etcd/store.go | 2 +- backend/store/etcd/store_test.go | 2 +- backend/store/etcd/tessen_store.go | 2 +- backend/store/etcd/tessen_store_test.go | 2 +- backend/store/etcd/user_store.go | 2 +- backend/store/etcd/user_store_test.go | 2 +- backend/store/etcd/watcher_test.go | 2 +- backend/store/etcd/watchers.go | 2 +- backend/store/key_builder.go | 2 +- backend/store/provider/provider.go | 2 +- backend/store/proxy.go | 2 +- backend/store/store.go | 4 +- backend/store/v2/etcdstore/benchmark_test.go | 4 +- backend/store/v2/etcdstore/fixtures_test.go | 16 ++---- backend/store/v2/etcdstore/store.go | 4 +- backend/store/v2/etcdstore/store_test.go | 2 +- backend/store/v2/interface.go | 2 +- backend/store/v2/resource.go | 4 +- backend/store/v2/resource_test.go | 2 +- backend/store/v2/wrap/wrapper.go | 23 ++++++-- backend/store/v2/wrap/wrapper.pb.go | 2 +- backend/store/v2/wrap/wrapper_test.go | 24 +++------ backend/tessend/data.go | 2 +- backend/tessend/tessend.go | 2 +- backend/tessend/tessend_test.go | 2 +- bonsai/bonsai.go | 2 +- cli/cli.go | 2 +- cli/client/apikey.go | 2 +- cli/client/apikey_test.go | 2 +- cli/client/asset.go | 2 +- cli/client/authentication.go | 2 +- cli/client/authentication_test.go | 2 +- cli/client/check.go | 2 +- cli/client/clusterrole.go | 2 +- cli/client/clusterrolebinding.go | 2 +- cli/client/config/mock.go | 2 +- cli/client/entity.go | 2 +- cli/client/event.go | 2 +- cli/client/filter.go | 2 +- cli/client/generic.go | 4 +- cli/client/handler.go | 2 +- cli/client/health.go | 2 +- cli/client/hook.go | 2 +- cli/client/interface.go | 2 +- cli/client/mutator.go | 2 +- cli/client/namespace.go | 2 +- cli/client/pipeline.go | 2 +- cli/client/role.go | 2 +- cli/client/rolebinding.go | 2 +- cli/client/silenced.go | 2 +- cli/client/testing/mock_asset_client.go | 2 +- .../testing/mock_authentication_client.go | 2 +- cli/client/testing/mock_check_client.go | 2 +- cli/client/testing/mock_clusterrole_client.go | 2 +- .../testing/mock_clusterrolebinding_client.go | 2 +- cli/client/testing/mock_entity_client.go | 2 +- cli/client/testing/mock_event_client.go | 2 +- cli/client/testing/mock_filter_client.go | 2 +- cli/client/testing/mock_handler_client.go | 2 +- cli/client/testing/mock_hook_client.go | 2 +- cli/client/testing/mock_mutator_client.go | 2 +- cli/client/testing/mock_namespace_client.go | 2 +- cli/client/testing/mock_pipeline_client.go | 2 +- cli/client/testing/mock_role_client.go | 2 +- cli/client/testing/mock_rolebinding_client.go | 2 +- cli/client/testing/mock_silenced_client.go | 2 +- cli/client/testing/mock_user_client.go | 2 +- cli/client/user.go | 2 +- cli/cmdmanager/manager.go | 2 +- cli/cmdmanager/manager_test.go | 2 +- cli/commands/apikey/grant.go | 2 +- cli/commands/apikey/info.go | 2 +- cli/commands/apikey/info_test.go | 2 +- cli/commands/apikey/list.go | 2 +- cli/commands/apikey/list_test.go | 2 +- cli/commands/apikey/revoke.go | 2 +- cli/commands/asset/delete.go | 2 +- cli/commands/asset/list.go | 2 +- cli/commands/asset/list_test.go | 2 +- cli/commands/asset/outdated.go | 2 +- cli/commands/asset/outdated_test.go | 2 +- cli/commands/check/execute_test.go | 2 +- cli/commands/check/list.go | 2 +- cli/commands/check/list_test.go | 2 +- cli/commands/clusterrole/create.go | 2 +- cli/commands/clusterrole/list.go | 2 +- cli/commands/clusterrole/list_test.go | 2 +- cli/commands/clusterrolebinding/create.go | 2 +- cli/commands/clusterrolebinding/list.go | 2 +- cli/commands/clusterrolebinding/list_test.go | 2 +- cli/commands/command/list.go | 2 +- cli/commands/config/view_test.go | 2 +- cli/commands/describetype/describe_type.go | 2 +- cli/commands/dump/dump.go | 4 +- cli/commands/edit/edit.go | 2 +- cli/commands/edit/edit_test.go | 2 +- cli/commands/entity/create.go | 2 +- cli/commands/entity/list.go | 2 +- cli/commands/entity/list_test.go | 2 +- cli/commands/env/env_test.go | 2 +- cli/commands/event/list.go | 2 +- cli/commands/event/list_test.go | 2 +- cli/commands/filter/list.go | 2 +- cli/commands/filter/list_test.go | 2 +- cli/commands/handler/list.go | 2 +- cli/commands/handler/list_test.go | 2 +- cli/commands/helpers/user.go | 2 +- cli/commands/hook/list.go | 2 +- cli/commands/hook/list_test.go | 2 +- cli/commands/mutator/list.go | 2 +- cli/commands/mutator/list_test.go | 2 +- cli/commands/namespace/list.go | 2 +- cli/commands/namespace/list_test.go | 2 +- cli/commands/pipeline/info.go | 2 +- cli/commands/pipeline/info_test.go | 2 +- cli/commands/pipeline/list.go | 2 +- cli/commands/pipeline/list_test.go | 2 +- cli/commands/role/create.go | 2 +- cli/commands/role/list.go | 2 +- cli/commands/role/list_test.go | 2 +- cli/commands/rolebinding/create.go | 2 +- cli/commands/rolebinding/list.go | 2 +- cli/commands/rolebinding/list_test.go | 2 +- cli/commands/silenced/list.go | 2 +- cli/commands/silenced/list_test.go | 2 +- cli/commands/tessen/info.go | 2 +- cli/commands/tessen/info_test.go | 2 +- cli/commands/tessen/opt_in.go | 2 +- cli/commands/tessen/opt_out.go | 2 +- cli/commands/user/change_password_test.go | 2 +- cli/commands/user/list.go | 2 +- cli/commands/user/list_test.go | 2 +- cli/resource/parse.go | 5 +- cli/resource/parse_test.go | 2 +- cli/resource/process.go | 2 +- cli/resource/process_test.go | 2 +- cli/resource/resolve.go | 5 +- go.mod | 20 +++---- go.sum | 54 ++++++++++--------- js/js_bench_test.go | 2 +- js/js_test.go | 2 +- process/process.go | 2 +- system/system.go | 2 +- testing/fixture/resource.go | 2 +- testing/fixture/resource.pb.go | 2 +- testing/fixture/resourcepb_test.go | 2 +- testing/fixture/v3resource.go | 13 ++--- testing/mockassetgetter/mockassetgetter.go | 2 +- testing/mockpipeline/filter.go | 2 +- testing/mockpipeline/handler.go | 2 +- testing/mockpipeline/mutator.go | 2 +- testing/mocksecrets/providermanager.go | 2 +- testing/mockstore/events.go | 2 +- testing/mockstore/pipelines.go | 2 +- testing/mockstore/resource.go | 2 +- testing/mockstore/tessen.go | 2 +- token/token.go | 2 +- token/token_test.go | 2 +- 482 files changed, 607 insertions(+), 614 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 8157a3f411..a73f54deed 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -27,8 +27,8 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "golang.org/x/time/rate" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/handler" diff --git a/agent/agent_test.go b/agent/agent_test.go index a9ce1fae60..ed3a8c5316 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" sensutesting "github.com/sensu/sensu-go/testing" "github.com/sensu/sensu-go/transport" "github.com/sensu/sensu-go/types" diff --git a/agent/check_handler.go b/agent/check_handler.go index f78433bca6..03c49a66af 100644 --- a/agent/check_handler.go +++ b/agent/check_handler.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/sensu/sensu-go/agent/transformers" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/token" diff --git a/agent/check_handler_internal_test.go b/agent/check_handler_internal_test.go index f37dd00dea..9c10eda6a0 100644 --- a/agent/check_handler_internal_test.go +++ b/agent/check_handler_internal_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/testing/mockexecutor" "github.com/sensu/sensu-go/token" diff --git a/agent/cmd/start.go b/agent/cmd/start.go index 90ea5572b2..f6bc917643 100644 --- a/agent/cmd/start.go +++ b/agent/cmd/start.go @@ -10,7 +10,7 @@ import ( "time" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/util/path" "github.com/sensu/sensu-go/util/url" diff --git a/agent/cmd/start_test.go b/agent/cmd/start_test.go index 6d7408f05c..c98998ef85 100644 --- a/agent/cmd/start_test.go +++ b/agent/cmd/start_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/agent/config.go b/agent/config.go index d6357e9cdf..9fe959927b 100644 --- a/agent/config.go +++ b/agent/config.go @@ -5,7 +5,7 @@ import ( "os" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "golang.org/x/time/rate" ) diff --git a/agent/entity.go b/agent/entity.go index b684ba9f69..33780a0b31 100644 --- a/agent/entity.go +++ b/agent/entity.go @@ -3,8 +3,8 @@ package agent import ( time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/version" ) diff --git a/agent/entity_config_handler.go b/agent/entity_config_handler.go index d8c0c2fee3..31f4b524da 100644 --- a/agent/entity_config_handler.go +++ b/agent/entity_config_handler.go @@ -4,7 +4,7 @@ import ( "context" time "github.com/echlebek/timeproxy" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" ) func (a *Agent) handleEntityConfig(ctx context.Context, payload []byte) error { diff --git a/agent/entity_config_handler_test.go b/agent/entity_config_handler_test.go index 88f31aa798..136774e946 100644 --- a/agent/entity_config_handler_test.go +++ b/agent/entity_config_handler_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" ) func TestHandleEntityConfig(t *testing.T) { diff --git a/agent/entity_test.go b/agent/entity_test.go index 06ad7484f0..baf1ef076c 100644 --- a/agent/entity_test.go +++ b/agent/entity_test.go @@ -3,8 +3,8 @@ package agent import ( "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/stretchr/testify/assert" ) diff --git a/agent/event.go b/agent/event.go index bb67d266c9..ea4aa2cddd 100644 --- a/agent/event.go +++ b/agent/event.go @@ -6,7 +6,7 @@ import ( time "github.com/echlebek/timeproxy" "github.com/google/uuid" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" corev1 "github.com/sensu/sensu-go/types/v1" ) diff --git a/agent/event_test.go b/agent/event_test.go index 7055a38464..c081347a46 100644 --- a/agent/event_test.go +++ b/agent/event_test.go @@ -7,8 +7,8 @@ import ( time "github.com/echlebek/timeproxy" "github.com/google/uuid" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" corev1 "github.com/sensu/sensu-go/types/v1" ) diff --git a/agent/hook.go b/agent/hook.go index 6e22f4135b..1d3114bafa 100644 --- a/agent/hook.go +++ b/agent/hook.go @@ -10,7 +10,7 @@ import ( "strings" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/token" diff --git a/agent/hook_test.go b/agent/hook_test.go index e1a4b8f51f..e14e034e20 100644 --- a/agent/hook_test.go +++ b/agent/hook_test.go @@ -6,7 +6,7 @@ import ( "testing" time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/testing/mockexecutor" diff --git a/agent/queue_test.go b/agent/queue_test.go index 0294dff20e..290f941547 100644 --- a/agent/queue_test.go +++ b/agent/queue_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestCompressionRoundTrip(t *testing.T) { diff --git a/asset/asset.go b/asset/asset.go index f9e8b2f04d..45c4708413 100644 --- a/asset/asset.go +++ b/asset/asset.go @@ -19,7 +19,7 @@ import ( "path/filepath" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/util/environment" ) diff --git a/asset/boltdb_manager.go b/asset/boltdb_manager.go index 75947413b7..eb9e008db6 100644 --- a/asset/boltdb_manager.go +++ b/asset/boltdb_manager.go @@ -9,7 +9,7 @@ import ( "github.com/dustin/go-humanize" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" metricspkg "github.com/sensu/sensu-go/metrics" bolt "go.etcd.io/bbolt" "golang.org/x/time/rate" diff --git a/asset/filtered_manager.go b/asset/filtered_manager.go index 6f226d6064..556e1574ac 100644 --- a/asset/filtered_manager.go +++ b/asset/filtered_manager.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/js" "github.com/sensu/sensu-go/token" "github.com/sensu/sensu-go/types/dynamic" diff --git a/asset/filtered_manager_test.go b/asset/filtered_manager_test.go index 84aabe507e..697cf6789a 100644 --- a/asset/filtered_manager_test.go +++ b/asset/filtered_manager_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" ) diff --git a/asset/set_test.go b/asset/set_test.go index 1c4efe0200..e9d5634854 100644 --- a/asset/set_test.go +++ b/asset/set_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" ) diff --git a/backend/agentd/agentd.go b/backend/agentd/agentd.go index 46fb687003..54f26eda2d 100644 --- a/backend/agentd/agentd.go +++ b/backend/agentd/agentd.go @@ -18,7 +18,7 @@ import ( "github.com/gorilla/websocket" "github.com/prometheus/client_golang/prometheus" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/middlewares" "github.com/sensu/sensu-go/backend/apid/routers" diff --git a/backend/agentd/agentd_test.go b/backend/agentd/agentd_test.go index 1da483c7ce..27a7549779 100644 --- a/backend/agentd/agentd_test.go +++ b/backend/agentd/agentd_test.go @@ -11,8 +11,8 @@ import ( "net/http/httptest" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/middlewares" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/agentd/middlewares.go b/backend/agentd/middlewares.go index dd7aaa7639..b513cb7287 100644 --- a/backend/agentd/middlewares.go +++ b/backend/agentd/middlewares.go @@ -5,7 +5,7 @@ import ( "net/http" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // AuthenticationMiddleware represents the middleware used for authentication diff --git a/backend/agentd/session.go b/backend/agentd/session.go index 34c270a024..034b801cfc 100644 --- a/backend/agentd/session.go +++ b/backend/agentd/session.go @@ -12,8 +12,8 @@ import ( "github.com/google/uuid" "github.com/prometheus/client_golang/prometheus" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/metrics" "github.com/sensu/sensu-go/backend/ringv2" diff --git a/backend/agentd/session_test.go b/backend/agentd/session_test.go index a5fb5fcc55..35d18b3acf 100644 --- a/backend/agentd/session_test.go +++ b/backend/agentd/session_test.go @@ -11,8 +11,8 @@ import ( "github.com/gogo/protobuf/proto" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/agentd/watcher.go b/backend/agentd/watcher.go index e9adb59aa4..dc38220a74 100644 --- a/backend/agentd/watcher.go +++ b/backend/agentd/watcher.go @@ -5,8 +5,8 @@ import ( "errors" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" etcdstore "github.com/sensu/sensu-go/backend/store/etcd" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/api/asset.go b/backend/api/asset.go index 6546b009bb..ced254f99a 100644 --- a/backend/api/asset.go +++ b/backend/api/asset.go @@ -6,7 +6,7 @@ import ( "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // AssetClient is an API client for assets. diff --git a/backend/api/asset_test.go b/backend/api/asset_test.go index 7fb64f6f57..f4a964355c 100644 --- a/backend/api/asset_test.go +++ b/backend/api/asset_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/authentication.go b/backend/api/authentication.go index 15f0802c76..a09ffe4c34 100644 --- a/backend/api/authentication.go +++ b/backend/api/authentication.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/authentication/providers/basic" diff --git a/backend/api/authentication_test.go b/backend/api/authentication_test.go index ed6901991a..b8652d5f84 100644 --- a/backend/api/authentication_test.go +++ b/backend/api/authentication_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/authentication/providers/basic" diff --git a/backend/api/check.go b/backend/api/check.go index f6090bc330..d8b68db004 100644 --- a/backend/api/check.go +++ b/backend/api/check.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/check_test.go b/backend/api/check_test.go index 84468ced2f..02281a1329 100644 --- a/backend/api/check_test.go +++ b/backend/api/check_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/entity.go b/backend/api/entity.go index f876eccffe..125b4d1202 100644 --- a/backend/api/entity.go +++ b/backend/api/entity.go @@ -6,8 +6,8 @@ import ( "github.com/sirupsen/logrus" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/api/entity_test.go b/backend/api/entity_test.go index e72e5a7432..926f4bd516 100644 --- a/backend/api/entity_test.go +++ b/backend/api/entity_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/mock" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/event.go b/backend/api/event.go index c81d992fa8..43479f9932 100644 --- a/backend/api/event.go +++ b/backend/api/event.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/api/event_test.go b/backend/api/event_test.go index 55ec27ca0b..efed7a58fe 100644 --- a/backend/api/event_test.go +++ b/backend/api/event_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/api/filter.go b/backend/api/filter.go index 647324dbcc..5d5c58f61e 100644 --- a/backend/api/filter.go +++ b/backend/api/filter.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/filter_test.go b/backend/api/filter_test.go index 6df718594d..ced0befc19 100644 --- a/backend/api/filter_test.go +++ b/backend/api/filter_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/generic.go b/backend/api/generic.go index 625adef719..c82e5eb5e6 100644 --- a/backend/api/generic.go +++ b/backend/api/generic.go @@ -6,12 +6,12 @@ import ( "fmt" "path" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" - "github.com/sensu/sensu-go/types" ) type RBACVerb string @@ -89,7 +89,7 @@ func (g *GenericClient) SetTypeMeta(meta corev2.TypeMeta) error { } g.APIGroup = path.Dir(meta.APIVersion) g.APIVersion = path.Base(meta.APIVersion) - kind, err := types.ResolveRaw(meta.APIVersion, meta.Type) + kind, err := apitools.Resolve(meta.APIVersion, meta.Type) if err != nil { return fmt.Errorf("error (SetTypeMeta): %s", err) } diff --git a/backend/api/generic_test.go b/backend/api/generic_test.go index e9117f4bff..2a6c65d69a 100644 --- a/backend/api/generic_test.go +++ b/backend/api/generic_test.go @@ -7,8 +7,8 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/api/handler.go b/backend/api/handler.go index 6e0255ec59..1e8df67cc0 100644 --- a/backend/api/handler.go +++ b/backend/api/handler.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/handler_test.go b/backend/api/handler_test.go index 23c76d63ad..34b819e613 100644 --- a/backend/api/handler_test.go +++ b/backend/api/handler_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/hook.go b/backend/api/hook.go index 220bac8b2a..08463c4058 100644 --- a/backend/api/hook.go +++ b/backend/api/hook.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/hook_test.go b/backend/api/hook_test.go index 0710f76632..f7f0fbedb1 100644 --- a/backend/api/hook_test.go +++ b/backend/api/hook_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/meta.go b/backend/api/meta.go index 0eed96669e..5fe3f90534 100644 --- a/backend/api/meta.go +++ b/backend/api/meta.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" ) diff --git a/backend/api/mutator.go b/backend/api/mutator.go index 2be668715d..7d97415016 100644 --- a/backend/api/mutator.go +++ b/backend/api/mutator.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/mutator_test.go b/backend/api/mutator_test.go index 35120c5cbc..cdb55b9cc2 100644 --- a/backend/api/mutator_test.go +++ b/backend/api/mutator_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/namespace.go b/backend/api/namespace.go index 35d5d3103e..a71e22d7c9 100644 --- a/backend/api/namespace.go +++ b/backend/api/namespace.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/namespace_test.go b/backend/api/namespace_test.go index 99f136e679..7c46a54344 100644 --- a/backend/api/namespace_test.go +++ b/backend/api/namespace_test.go @@ -15,8 +15,8 @@ import ( "github.com/sensu/sensu-go/testing/mockstore" "github.com/stretchr/testify/mock" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" ) func TestFetchNamespace(t *testing.T) { diff --git a/backend/api/rbac.go b/backend/api/rbac.go index c1ace986ac..fbfcc79938 100644 --- a/backend/api/rbac.go +++ b/backend/api/rbac.go @@ -6,7 +6,7 @@ import ( "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) type RBACClient struct { diff --git a/backend/api/rbac_test.go b/backend/api/rbac_test.go index 4551265fee..f340cc9bd8 100644 --- a/backend/api/rbac_test.go +++ b/backend/api/rbac_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/silenced.go b/backend/api/silenced.go index 84c3bc25c4..fffafc8f0e 100644 --- a/backend/api/silenced.go +++ b/backend/api/silenced.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/silenced_test.go b/backend/api/silenced_test.go index 09aefd8617..0d7e36ad29 100644 --- a/backend/api/silenced_test.go +++ b/backend/api/silenced_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/user.go b/backend/api/user.go index fdc2f933e7..989f74c247 100644 --- a/backend/api/user.go +++ b/backend/api/user.go @@ -6,7 +6,7 @@ import ( "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // UserClient is an API client for users. diff --git a/backend/api/user_test.go b/backend/api/user_test.go index a619a54cc8..ac8b0eb57e 100644 --- a/backend/api/user_test.go +++ b/backend/api/user_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/actions/checks.go b/backend/apid/actions/checks.go index 5a8764463b..05b6e60969 100644 --- a/backend/apid/actions/checks.go +++ b/backend/apid/actions/checks.go @@ -5,7 +5,7 @@ import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" utilstrings "github.com/sensu/sensu-go/util/strings" diff --git a/backend/apid/actions/entities.go b/backend/apid/actions/entities.go index c857f6a112..134e5b6c29 100644 --- a/backend/apid/actions/entities.go +++ b/backend/apid/actions/entities.go @@ -4,8 +4,8 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" ) diff --git a/backend/apid/actions/entities_test.go b/backend/apid/actions/entities_test.go index e0de05c53c..4921e32b51 100644 --- a/backend/apid/actions/entities_test.go +++ b/backend/apid/actions/entities_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/v2/storetest" "github.com/sensu/sensu-go/testing/mockstore" diff --git a/backend/apid/actions/events.go b/backend/apid/actions/events.go index 0faaa5ac36..fdc346b08b 100644 --- a/backend/apid/actions/events.go +++ b/backend/apid/actions/events.go @@ -8,7 +8,7 @@ import ( "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const deletedEventSentinel = -1 diff --git a/backend/apid/actions/events_test.go b/backend/apid/actions/events_test.go index 8579f5d657..bd34809f27 100644 --- a/backend/apid/actions/events_test.go +++ b/backend/apid/actions/events_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/actions/health.go b/backend/apid/actions/health.go index bcedbbadf4..bbc3548ace 100644 --- a/backend/apid/actions/health.go +++ b/backend/apid/actions/health.go @@ -3,7 +3,7 @@ package actions import ( "crypto/tls" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "go.etcd.io/etcd/client/v3" "golang.org/x/net/context" diff --git a/backend/apid/actions/silenced.go b/backend/apid/actions/silenced.go index 04808bb982..aa7396dcc7 100644 --- a/backend/apid/actions/silenced.go +++ b/backend/apid/actions/silenced.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/actions/silenced_test.go b/backend/apid/actions/silenced_test.go index 260316ee9d..f2baaa5e87 100644 --- a/backend/apid/actions/silenced_test.go +++ b/backend/apid/actions/silenced_test.go @@ -7,7 +7,7 @@ import ( "testing" jwt "github.com/golang-jwt/jwt/v4" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" coreJWT "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/testing/mockstore" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/actions/tessen.go b/backend/apid/actions/tessen.go index cb462209a9..5320bdcede 100644 --- a/backend/apid/actions/tessen.go +++ b/backend/apid/actions/tessen.go @@ -1,7 +1,7 @@ package actions import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" "golang.org/x/net/context" diff --git a/backend/apid/actions/tessen_test.go b/backend/apid/actions/tessen_test.go index b1575bb8d5..cdd0d1e26d 100644 --- a/backend/apid/actions/tessen_test.go +++ b/backend/apid/actions/tessen_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/mockbus" "github.com/sensu/sensu-go/testing/mockstore" diff --git a/backend/apid/actions/users.go b/backend/apid/actions/users.go index a4e0113d38..deefa8d453 100644 --- a/backend/apid/actions/users.go +++ b/backend/apid/actions/users.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/bcrypt" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/actions/version.go b/backend/apid/actions/version.go index 8b47188681..46956ba2dd 100644 --- a/backend/apid/actions/version.go +++ b/backend/apid/actions/version.go @@ -1,8 +1,8 @@ package actions import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" - "github.com/sensu/sensu-go/types" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/version" etcdVersion "go.etcd.io/etcd/api/v3/version" "golang.org/x/net/context" @@ -28,6 +28,6 @@ func (v VersionController) GetVersion(ctx context.Context) *corev2.Version { Cluster: v.clusterVersion, }, SensuBackend: version.Semver(), - APIGroups: types.APIModuleVersions(), + APIGroups: apitools.APIModuleVersions(), } } diff --git a/backend/apid/graphql/asset.go b/backend/apid/graphql/asset.go index 2f26308fab..31ddeb8344 100644 --- a/backend/apid/graphql/asset.go +++ b/backend/apid/graphql/asset.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/asset_test.go b/backend/apid/graphql/asset_test.go index c0ccbe2154..2cbad42a92 100644 --- a/backend/apid/graphql/asset_test.go +++ b/backend/apid/graphql/asset_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/backendEntity.go b/backend/apid/graphql/backendEntity.go index 4cf466dc86..800371797b 100644 --- a/backend/apid/graphql/backendEntity.go +++ b/backend/apid/graphql/backendEntity.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" ) diff --git a/backend/apid/graphql/check.go b/backend/apid/graphql/check.go index 4d039e6caa..e4558fc1c6 100644 --- a/backend/apid/graphql/check.go +++ b/backend/apid/graphql/check.go @@ -4,7 +4,7 @@ import ( "time" "github.com/graphql-go/graphql" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/graphql/check_filters.go b/backend/apid/graphql/check_filters.go index a897a16626..7c8260f368 100644 --- a/backend/apid/graphql/check_filters.go +++ b/backend/apid/graphql/check_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/sensu/sensu-go/util/strings" ) diff --git a/backend/apid/graphql/check_filters_test.go b/backend/apid/graphql/check_filters_test.go index beab59cc3e..96800972eb 100644 --- a/backend/apid/graphql/check_filters_test.go +++ b/backend/apid/graphql/check_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/check_test.go b/backend/apid/graphql/check_test.go index a31d6da833..055af63f91 100644 --- a/backend/apid/graphql/check_test.go +++ b/backend/apid/graphql/check_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" diff --git a/backend/apid/graphql/context.go b/backend/apid/graphql/context.go index 63cacf18b8..ec84de6f26 100644 --- a/backend/apid/graphql/context.go +++ b/backend/apid/graphql/context.go @@ -3,7 +3,7 @@ package graphql import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" ) diff --git a/backend/apid/graphql/corev2.go b/backend/apid/graphql/corev2.go index fee7ecf679..2062425e58 100644 --- a/backend/apid/graphql/corev2.go +++ b/backend/apid/graphql/corev2.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/corev2_test.go b/backend/apid/graphql/corev2_test.go index 18692c0e79..f89d439027 100644 --- a/backend/apid/graphql/corev2_test.go +++ b/backend/apid/graphql/corev2_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/sensu/sensu-go/types" ) diff --git a/backend/apid/graphql/corev3.go b/backend/apid/graphql/corev3.go index a62cef86d4..bca0504d90 100644 --- a/backend/apid/graphql/corev3.go +++ b/backend/apid/graphql/corev3.go @@ -3,8 +3,8 @@ package graphql import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" util_api "github.com/sensu/sensu-go/backend/apid/graphql/util/api" diff --git a/backend/apid/graphql/corev3_test.go b/backend/apid/graphql/corev3_test.go index c7ea9a4452..ce5a29c56e 100644 --- a/backend/apid/graphql/corev3_test.go +++ b/backend/apid/graphql/corev3_test.go @@ -7,8 +7,8 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" util_api "github.com/sensu/sensu-go/backend/apid/graphql/util/api" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/dataloader.go b/backend/apid/graphql/dataloader.go index 3ee20173f5..9cc087d572 100644 --- a/backend/apid/graphql/dataloader.go +++ b/backend/apid/graphql/dataloader.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/graph-gophers/dataloader" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/graphql/dataloader_test.go b/backend/apid/graphql/dataloader_test.go index 86877a9eff..47a6977d15 100644 --- a/backend/apid/graphql/dataloader_test.go +++ b/backend/apid/graphql/dataloader_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/graph-gophers/dataloader" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/mock" ) diff --git a/backend/apid/graphql/entity.go b/backend/apid/graphql/entity.go index 776795e80e..6f95503ad2 100644 --- a/backend/apid/graphql/entity.go +++ b/backend/apid/graphql/entity.go @@ -5,7 +5,7 @@ import ( "sort" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" diff --git a/backend/apid/graphql/entity_filters.go b/backend/apid/graphql/entity_filters.go index d51eae0bbf..70341aca49 100644 --- a/backend/apid/graphql/entity_filters.go +++ b/backend/apid/graphql/entity_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/sensu/sensu-go/util/strings" ) diff --git a/backend/apid/graphql/entity_filters_test.go b/backend/apid/graphql/entity_filters_test.go index 9b123685c6..1be0a24b1b 100644 --- a/backend/apid/graphql/entity_filters_test.go +++ b/backend/apid/graphql/entity_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/entity_test.go b/backend/apid/graphql/entity_test.go index e912107283..ccd577ddf9 100644 --- a/backend/apid/graphql/entity_test.go +++ b/backend/apid/graphql/entity_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" diff --git a/backend/apid/graphql/event.go b/backend/apid/graphql/event.go index 14089566ef..2bb884afd3 100644 --- a/backend/apid/graphql/event.go +++ b/backend/apid/graphql/event.go @@ -3,7 +3,7 @@ package graphql import ( "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/event_filter.go b/backend/apid/graphql/event_filter.go index 1ecab1af5c..7d42f8b465 100644 --- a/backend/apid/graphql/event_filter.go +++ b/backend/apid/graphql/event_filter.go @@ -4,7 +4,7 @@ import ( "errors" gostrings "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/event_filter_filters.go b/backend/apid/graphql/event_filter_filters.go index 98d23feb94..998a62eed5 100644 --- a/backend/apid/graphql/event_filter_filters.go +++ b/backend/apid/graphql/event_filter_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" ) diff --git a/backend/apid/graphql/event_filter_filters_test.go b/backend/apid/graphql/event_filter_filters_test.go index 482c9e3664..224ae0d912 100644 --- a/backend/apid/graphql/event_filter_filters_test.go +++ b/backend/apid/graphql/event_filter_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/event_filter_test.go b/backend/apid/graphql/event_filter_test.go index 7e086bc910..f7de258ac8 100644 --- a/backend/apid/graphql/event_filter_test.go +++ b/backend/apid/graphql/event_filter_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/event_filters.go b/backend/apid/graphql/event_filters.go index 23709290b4..fa4bb0dd7a 100644 --- a/backend/apid/graphql/event_filters.go +++ b/backend/apid/graphql/event_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" ) diff --git a/backend/apid/graphql/event_filters_test.go b/backend/apid/graphql/event_filters_test.go index 725c57ab01..648b93236c 100644 --- a/backend/apid/graphql/event_filters_test.go +++ b/backend/apid/graphql/event_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/event_test.go b/backend/apid/graphql/event_test.go index 2a1bd1bb9e..94c3d7e72f 100644 --- a/backend/apid/graphql/event_test.go +++ b/backend/apid/graphql/event_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/filter.go b/backend/apid/graphql/filter.go index 19af2abcb8..1e895f0e38 100644 --- a/backend/apid/graphql/filter.go +++ b/backend/apid/graphql/filter.go @@ -1,6 +1,6 @@ package graphql -import corev2 "github.com/sensu/sensu-go/api/core/v2" +import corev2 "github.com/sensu/core/v2" // TODO: It would be more ideal to generate the functions in this package diff --git a/backend/apid/graphql/filter/boolean.go b/backend/apid/graphql/filter/boolean.go index f8131628e6..ebf062aa2c 100644 --- a/backend/apid/graphql/filter/boolean.go +++ b/backend/apid/graphql/filter/boolean.go @@ -4,7 +4,7 @@ import ( "strconv" "strings" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" ) type BooleanMatcher func(v2.Resource, bool) bool diff --git a/backend/apid/graphql/filter/boolean_test.go b/backend/apid/graphql/filter/boolean_test.go index 787b50dea8..3110e2da5a 100644 --- a/backend/apid/graphql/filter/boolean_test.go +++ b/backend/apid/graphql/filter/boolean_test.go @@ -3,7 +3,7 @@ package filter import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/backend/apid/graphql/filter/filter.go b/backend/apid/graphql/filter/filter.go index f7303a14c4..92e44dcd90 100644 --- a/backend/apid/graphql/filter/filter.go +++ b/backend/apid/graphql/filter/filter.go @@ -4,7 +4,7 @@ import ( "errors" "strings" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" ) var ( diff --git a/backend/apid/graphql/filter/filter_test.go b/backend/apid/graphql/filter/filter_test.go index a61112a47c..4497f64608 100644 --- a/backend/apid/graphql/filter/filter_test.go +++ b/backend/apid/graphql/filter/filter_test.go @@ -3,7 +3,7 @@ package filter import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/backend/apid/graphql/filter/string.go b/backend/apid/graphql/filter/string.go index aa5f873606..57a2f2a3b9 100644 --- a/backend/apid/graphql/filter/string.go +++ b/backend/apid/graphql/filter/string.go @@ -1,7 +1,7 @@ package filter import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" ) type StringMatcher func(v2.Resource, string) bool diff --git a/backend/apid/graphql/filter/string_test.go b/backend/apid/graphql/filter/string_test.go index d973fcad6c..d66df6a422 100644 --- a/backend/apid/graphql/filter/string_test.go +++ b/backend/apid/graphql/filter/string_test.go @@ -3,7 +3,7 @@ package filter import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/backend/apid/graphql/globalid/encoder.go b/backend/apid/graphql/globalid/encoder.go index 42e3814092..57ae3762a8 100644 --- a/backend/apid/graphql/globalid/encoder.go +++ b/backend/apid/graphql/globalid/encoder.go @@ -3,7 +3,7 @@ package globalid import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) type EncodeFn func(context.Context, interface{}) *StandardComponents diff --git a/backend/apid/graphql/globalid/encoder_test.go b/backend/apid/graphql/globalid/encoder_test.go index e86af70adf..352f617e26 100644 --- a/backend/apid/graphql/globalid/encoder_test.go +++ b/backend/apid/graphql/globalid/encoder_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/fixture" ) diff --git a/backend/apid/graphql/globalid/pipeline.go b/backend/apid/graphql/globalid/pipeline.go index c7b94e9d00..3d0d7f2439 100644 --- a/backend/apid/graphql/globalid/pipeline.go +++ b/backend/apid/graphql/globalid/pipeline.go @@ -1,6 +1,6 @@ package globalid -import corev2 "github.com/sensu/sensu-go/api/core/v2" +import corev2 "github.com/sensu/core/v2" var pipelineName = "corev2/pipeline" diff --git a/backend/apid/graphql/globalid/util_test.go b/backend/apid/graphql/globalid/util_test.go index a8c7abffea..52dc980249 100644 --- a/backend/apid/graphql/globalid/util_test.go +++ b/backend/apid/graphql/globalid/util_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" ) diff --git a/backend/apid/graphql/handler.go b/backend/apid/graphql/handler.go index ce09261d0b..ce1322c5d3 100644 --- a/backend/apid/graphql/handler.go +++ b/backend/apid/graphql/handler.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/handler_filters.go b/backend/apid/graphql/handler_filters.go index 384c0fd949..f5701f7032 100644 --- a/backend/apid/graphql/handler_filters.go +++ b/backend/apid/graphql/handler_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" ) diff --git a/backend/apid/graphql/handler_filters_test.go b/backend/apid/graphql/handler_filters_test.go index d570f52178..3cc4906be3 100644 --- a/backend/apid/graphql/handler_filters_test.go +++ b/backend/apid/graphql/handler_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/handler_test.go b/backend/apid/graphql/handler_test.go index b94642bac3..6e00622c97 100644 --- a/backend/apid/graphql/handler_test.go +++ b/backend/apid/graphql/handler_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/health.go b/backend/apid/graphql/health.go index 294f0d0242..ac76184160 100644 --- a/backend/apid/graphql/health.go +++ b/backend/apid/graphql/health.go @@ -5,7 +5,7 @@ import ( "strconv" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "go.etcd.io/etcd/api/v3/etcdserverpb" diff --git a/backend/apid/graphql/health_test.go b/backend/apid/graphql/health_test.go index a2a1a1f393..96e9fbacd1 100644 --- a/backend/apid/graphql/health_test.go +++ b/backend/apid/graphql/health_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/hook.go b/backend/apid/graphql/hook.go index 654f208fa5..98d8d0326d 100644 --- a/backend/apid/graphql/hook.go +++ b/backend/apid/graphql/hook.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/hook_test.go b/backend/apid/graphql/hook_test.go index 31d03f69a8..c192636e6e 100644 --- a/backend/apid/graphql/hook_test.go +++ b/backend/apid/graphql/hook_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/interfaces.go b/backend/apid/graphql/interfaces.go index 10982da0e0..e6652b0eaa 100644 --- a/backend/apid/graphql/interfaces.go +++ b/backend/apid/graphql/interfaces.go @@ -4,7 +4,7 @@ import ( "context" dto "github.com/prometheus/client_model/go" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/api" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/graphql/meta.go b/backend/apid/graphql/meta.go index f8583f0441..624d166756 100644 --- a/backend/apid/graphql/meta.go +++ b/backend/apid/graphql/meta.go @@ -3,7 +3,7 @@ package graphql import ( "sort" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" ) diff --git a/backend/apid/graphql/meta_test.go b/backend/apid/graphql/meta_test.go index 3235e70546..f2669e26e8 100644 --- a/backend/apid/graphql/meta_test.go +++ b/backend/apid/graphql/meta_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/mock_test.go b/backend/apid/graphql/mock_test.go index 357a8c7b6b..69323241db 100644 --- a/backend/apid/graphql/mock_test.go +++ b/backend/apid/graphql/mock_test.go @@ -4,7 +4,7 @@ import ( "context" dto "github.com/prometheus/client_model/go" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/api" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/mutations.go b/backend/apid/graphql/mutations.go index 21f7716e61..2a878c743c 100644 --- a/backend/apid/graphql/mutations.go +++ b/backend/apid/graphql/mutations.go @@ -7,7 +7,7 @@ import ( "time" "github.com/mitchellh/mapstructure" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/graphql/mutations_test.go b/backend/apid/graphql/mutations_test.go index d038b9b6a1..116dc1b9aa 100644 --- a/backend/apid/graphql/mutations_test.go +++ b/backend/apid/graphql/mutations_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/mutator.go b/backend/apid/graphql/mutator.go index 519e81979c..5c6280eb28 100644 --- a/backend/apid/graphql/mutator.go +++ b/backend/apid/graphql/mutator.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/mutator_test.go b/backend/apid/graphql/mutator_test.go index 78105ecca4..45f08f9c55 100644 --- a/backend/apid/graphql/mutator_test.go +++ b/backend/apid/graphql/mutator_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/namespace.go b/backend/apid/graphql/namespace.go index 665259a5a8..2b914cbab9 100644 --- a/backend/apid/graphql/namespace.go +++ b/backend/apid/graphql/namespace.go @@ -3,7 +3,7 @@ package graphql import ( "sort" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" diff --git a/backend/apid/graphql/namespace_test.go b/backend/apid/graphql/namespace_test.go index 99aa0c8f5a..7bb9424da1 100644 --- a/backend/apid/graphql/namespace_test.go +++ b/backend/apid/graphql/namespace_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/node.go b/backend/apid/graphql/node.go index a35973e324..3416cba4bb 100644 --- a/backend/apid/graphql/node.go +++ b/backend/apid/graphql/node.go @@ -3,7 +3,7 @@ package graphql import ( "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/sensu/sensu-go/backend/apid/graphql/schema" diff --git a/backend/apid/graphql/node_test.go b/backend/apid/graphql/node_test.go index 71b28c0839..f8ca17265f 100644 --- a/backend/apid/graphql/node_test.go +++ b/backend/apid/graphql/node_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/query.go b/backend/apid/graphql/query.go index 72a200b7a7..08f821db26 100644 --- a/backend/apid/graphql/query.go +++ b/backend/apid/graphql/query.go @@ -9,7 +9,8 @@ import ( "time" dto "github.com/prometheus/client_model/go" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/sensu/sensu-go/backend/apid/graphql/schema" @@ -115,7 +116,7 @@ func (r *queryImpl) Suggest(p schema.QuerySuggestFieldResolverParams) (interface return results, fmt.Errorf("could not find field for '%s'", ref.FieldPath) } - t, err := types.ResolveType(res.Group, res.Name) + t, err := apitools.Resolve(res.Group, res.Name) if err != nil { return results, err } diff --git a/backend/apid/graphql/query_test.go b/backend/apid/graphql/query_test.go index 9e0797bc8e..d6614346d5 100644 --- a/backend/apid/graphql/query_test.go +++ b/backend/apid/graphql/query_test.go @@ -7,8 +7,8 @@ import ( "testing" dto "github.com/prometheus/client_model/go" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" diff --git a/backend/apid/graphql/relay/resolver.go b/backend/apid/graphql/relay/resolver.go index fc9b037172..9c245b9aad 100644 --- a/backend/apid/graphql/relay/resolver.go +++ b/backend/apid/graphql/relay/resolver.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/graphql" ) diff --git a/backend/apid/graphql/relay/resolver_test.go b/backend/apid/graphql/relay/resolver_test.go index e321a8fff9..3fd3b8924f 100644 --- a/backend/apid/graphql/relay/resolver_test.go +++ b/backend/apid/graphql/relay/resolver_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/service.go b/backend/apid/graphql/service.go index 5aec88aa86..2d4794d14f 100644 --- a/backend/apid/graphql/service.go +++ b/backend/apid/graphql/service.go @@ -3,7 +3,7 @@ package graphql import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/cli/client" diff --git a/backend/apid/graphql/silence_filters.go b/backend/apid/graphql/silence_filters.go index 61303a8e53..02a516a6a3 100644 --- a/backend/apid/graphql/silence_filters.go +++ b/backend/apid/graphql/silence_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" ) diff --git a/backend/apid/graphql/silence_filters_test.go b/backend/apid/graphql/silence_filters_test.go index 26fd2b3e98..ebbb349356 100644 --- a/backend/apid/graphql/silence_filters_test.go +++ b/backend/apid/graphql/silence_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/silenced.go b/backend/apid/graphql/silenced.go index 7591149f4c..cfb1d64cb0 100644 --- a/backend/apid/graphql/silenced.go +++ b/backend/apid/graphql/silenced.go @@ -3,7 +3,7 @@ package graphql import ( "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/silenced_test.go b/backend/apid/graphql/silenced_test.go index 4ff7fd30f6..7d9322b62a 100644 --- a/backend/apid/graphql/silenced_test.go +++ b/backend/apid/graphql/silenced_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/suggest.go b/backend/apid/graphql/suggest.go index bd61905628..4875f481d7 100644 --- a/backend/apid/graphql/suggest.go +++ b/backend/apid/graphql/suggest.go @@ -3,7 +3,7 @@ package graphql import ( "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/suggest" ) diff --git a/backend/apid/graphql/suggest/field.go b/backend/apid/graphql/suggest/field.go index 973aba0e5d..cac4566f83 100644 --- a/backend/apid/graphql/suggest/field.go +++ b/backend/apid/graphql/suggest/field.go @@ -1,7 +1,7 @@ package suggest import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" ) var ( diff --git a/backend/apid/graphql/suggest/field_test.go b/backend/apid/graphql/suggest/field_test.go index 3ec2d3fdf4..3b06842da4 100644 --- a/backend/apid/graphql/suggest/field_test.go +++ b/backend/apid/graphql/suggest/field_test.go @@ -4,7 +4,7 @@ import ( "sort" "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/stretchr/testify/assert" ) diff --git a/backend/apid/graphql/suggest/resource.go b/backend/apid/graphql/suggest/resource.go index 0d50f905c7..319dc19b75 100644 --- a/backend/apid/graphql/suggest/resource.go +++ b/backend/apid/graphql/suggest/resource.go @@ -1,6 +1,6 @@ package suggest -import corev2 "github.com/sensu/sensu-go/api/core/v2" +import corev2 "github.com/sensu/core/v2" // Resource represents a Sensu resource type Resource struct { diff --git a/backend/apid/graphql/user.go b/backend/apid/graphql/user.go index 1b5d741cab..dfd6151f2b 100644 --- a/backend/apid/graphql/user.go +++ b/backend/apid/graphql/user.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/util.go b/backend/apid/graphql/util.go index 2f499631c0..61971b2a25 100644 --- a/backend/apid/graphql/util.go +++ b/backend/apid/graphql/util.go @@ -4,7 +4,7 @@ import ( "sort" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" ) diff --git a/backend/apid/graphql/util/api/api.go b/backend/apid/graphql/util/api/api.go index 40a505d883..04652ef592 100644 --- a/backend/apid/graphql/util/api/api.go +++ b/backend/apid/graphql/util/api/api.go @@ -3,8 +3,8 @@ package util_api import ( "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/graphql/util/api/api_test.go b/backend/apid/graphql/util/api/api_test.go index c8855f2dd5..137e8f8e65 100644 --- a/backend/apid/graphql/util/api/api_test.go +++ b/backend/apid/graphql/util/api/api_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/graphql/util/relay/node.go b/backend/apid/graphql/util/relay/node.go index eccdf77b3d..9e9ed94360 100644 --- a/backend/apid/graphql/util/relay/node.go +++ b/backend/apid/graphql/util/relay/node.go @@ -3,11 +3,11 @@ package util_relay import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/relay" util_api "github.com/sensu/sensu-go/backend/apid/graphql/util/api" - "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" ) @@ -23,7 +23,7 @@ func MakeNodeResolver(client Fetcher, tm corev2.TypeMeta) func(relay.NodeResolve if err := client.SetTypeMeta(tm); err != nil { return nil, err } - raw, err := types.ResolveRaw(tm.APIVersion, tm.Type) + raw, err := apitools.Resolve(tm.APIVersion, tm.Type) if err != nil { return nil, err } diff --git a/backend/apid/graphql/util/relay/node_test.go b/backend/apid/graphql/util/relay/node_test.go index c5f1d64741..9a9899d883 100644 --- a/backend/apid/graphql/util/relay/node_test.go +++ b/backend/apid/graphql/util/relay/node_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/viewer_test.go b/backend/apid/graphql/viewer_test.go index 586c1b4440..b367c23e7d 100644 --- a/backend/apid/graphql/viewer_test.go +++ b/backend/apid/graphql/viewer_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/handlers/create.go b/backend/apid/handlers/create.go index 44fc8080b7..4ccdea6b28 100644 --- a/backend/apid/handlers/create.go +++ b/backend/apid/handlers/create.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/handlers/create_test.go b/backend/apid/handlers/create_test.go index f382aafe4d..d2a4b6c035 100644 --- a/backend/apid/handlers/create_test.go +++ b/backend/apid/handlers/create_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" diff --git a/backend/apid/handlers/create_v3.go b/backend/apid/handlers/create_v3.go index c8dbacaffe..c86500f55b 100644 --- a/backend/apid/handlers/create_v3.go +++ b/backend/apid/handlers/create_v3.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/gorilla/mux" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/handlers/create_v3_test.go b/backend/apid/handlers/create_v3_test.go index 3f7a184e6c..b08d816702 100644 --- a/backend/apid/handlers/create_v3_test.go +++ b/backend/apid/handlers/create_v3_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" diff --git a/backend/apid/handlers/get.go b/backend/apid/handlers/get.go index 885d781c96..f3d2d71767 100644 --- a/backend/apid/handlers/get.go +++ b/backend/apid/handlers/get.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/handlers/get_v3.go b/backend/apid/handlers/get_v3.go index 2b736e4979..8d809b6fc6 100644 --- a/backend/apid/handlers/get_v3.go +++ b/backend/apid/handlers/get_v3.go @@ -6,7 +6,7 @@ import ( "github.com/gorilla/mux" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/apid/handlers/get_v3_test.go b/backend/apid/handlers/get_v3_test.go index fdbb802c29..2e2c47f179 100644 --- a/backend/apid/handlers/get_v3_test.go +++ b/backend/apid/handlers/get_v3_test.go @@ -8,7 +8,7 @@ import ( "github.com/gorilla/mux" "github.com/stretchr/testify/mock" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/testing/fixture" diff --git a/backend/apid/handlers/handlers.go b/backend/apid/handlers/handlers.go index 911b60ebf0..dfbbd40eee 100644 --- a/backend/apid/handlers/handlers.go +++ b/backend/apid/handlers/handlers.go @@ -5,8 +5,8 @@ import ( "fmt" "net/url" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" ) diff --git a/backend/apid/handlers/handlers_test.go b/backend/apid/handlers/handlers_test.go index 13da395c73..58e91a09df 100644 --- a/backend/apid/handlers/handlers_test.go +++ b/backend/apid/handlers/handlers_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/fixture" ) diff --git a/backend/apid/handlers/list.go b/backend/apid/handlers/list.go index 65d233bbba..7da450a54f 100644 --- a/backend/apid/handlers/list.go +++ b/backend/apid/handlers/list.go @@ -4,7 +4,7 @@ import ( "context" "reflect" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/handlers/list_test.go b/backend/apid/handlers/list_test.go index 8dc4177e68..892693b1fc 100644 --- a/backend/apid/handlers/list_test.go +++ b/backend/apid/handlers/list_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" "github.com/sensu/sensu-go/testing/mockstore" diff --git a/backend/apid/handlers/list_v3.go b/backend/apid/handlers/list_v3.go index 8537bfb205..eb8866f9e9 100644 --- a/backend/apid/handlers/list_v3.go +++ b/backend/apid/handlers/list_v3.go @@ -3,8 +3,8 @@ package handlers import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" ) diff --git a/backend/apid/handlers/list_v3_test.go b/backend/apid/handlers/list_v3_test.go index 32d3a26365..7675958611 100644 --- a/backend/apid/handlers/list_v3_test.go +++ b/backend/apid/handlers/list_v3_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/wrap" diff --git a/backend/apid/handlers/patch.go b/backend/apid/handlers/patch.go index f0be61789d..bf336c2cca 100644 --- a/backend/apid/handlers/patch.go +++ b/backend/apid/handlers/patch.go @@ -12,8 +12,8 @@ import ( "strings" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/patch" diff --git a/backend/apid/handlers/patch_integration_test.go b/backend/apid/handlers/patch_integration_test.go index df713348b1..8e2ac5ef19 100644 --- a/backend/apid/handlers/patch_integration_test.go +++ b/backend/apid/handlers/patch_integration_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/seeds" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/handlers/update.go b/backend/apid/handlers/update.go index 64dc733a6c..b435e963e7 100644 --- a/backend/apid/handlers/update.go +++ b/backend/apid/handlers/update.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/handlers/update_test.go b/backend/apid/handlers/update_test.go index 1f37c49bd4..7f2fb69227 100644 --- a/backend/apid/handlers/update_test.go +++ b/backend/apid/handlers/update_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" diff --git a/backend/apid/handlers/update_v3.go b/backend/apid/handlers/update_v3.go index c688583293..f2eb47f0a7 100644 --- a/backend/apid/handlers/update_v3.go +++ b/backend/apid/handlers/update_v3.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/gorilla/mux" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/handlers/update_v3_test.go b/backend/apid/handlers/update_v3_test.go index 08e19c83b6..5475b65527 100644 --- a/backend/apid/handlers/update_v3_test.go +++ b/backend/apid/handlers/update_v3_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" diff --git a/backend/apid/middlewares/authentication.go b/backend/apid/middlewares/authentication.go index 7e73e743f2..0e1e09fa56 100644 --- a/backend/apid/middlewares/authentication.go +++ b/backend/apid/middlewares/authentication.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/middlewares/authentication_test.go b/backend/apid/middlewares/authentication_test.go index cb7e909a80..faf159d09f 100644 --- a/backend/apid/middlewares/authentication_test.go +++ b/backend/apid/middlewares/authentication_test.go @@ -7,7 +7,7 @@ import ( "net/http/httptest" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/testing/mockstore" "github.com/stretchr/testify/assert" diff --git a/backend/apid/middlewares/authorization.go b/backend/apid/middlewares/authorization.go index 83aaa99e2f..4d1bf60f63 100644 --- a/backend/apid/middlewares/authorization.go +++ b/backend/apid/middlewares/authorization.go @@ -3,7 +3,7 @@ package middlewares import ( "net/http" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" diff --git a/backend/apid/middlewares/authorization_test.go b/backend/apid/middlewares/authorization_test.go index 2914be3340..d57584f5d7 100644 --- a/backend/apid/middlewares/authorization_test.go +++ b/backend/apid/middlewares/authorization_test.go @@ -11,7 +11,7 @@ import ( "github.com/sirupsen/logrus" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" sensuJWT "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/seeds" diff --git a/backend/apid/middlewares/pagination.go b/backend/apid/middlewares/pagination.go index 2707b8bf77..cbb6544abd 100644 --- a/backend/apid/middlewares/pagination.go +++ b/backend/apid/middlewares/pagination.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // Pagination retrieves the "limit" and "continue" query parameters and add them diff --git a/backend/apid/middlewares/pagination_test.go b/backend/apid/middlewares/pagination_test.go index 3a74243f28..bac6e651b7 100644 --- a/backend/apid/middlewares/pagination_test.go +++ b/backend/apid/middlewares/pagination_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestPaginationMiddleware(t *testing.T) { diff --git a/backend/apid/middlewares/refresh_token_test.go b/backend/apid/middlewares/refresh_token_test.go index 1ba4bb9e99..340429eb38 100644 --- a/backend/apid/middlewares/refresh_token_test.go +++ b/backend/apid/middlewares/refresh_token_test.go @@ -9,7 +9,7 @@ import ( "net/http/httptest" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" diff --git a/backend/apid/routers/apikeys.go b/backend/apid/routers/apikeys.go index 00eabac7d1..c24a90411c 100644 --- a/backend/apid/routers/apikeys.go +++ b/backend/apid/routers/apikeys.go @@ -11,7 +11,7 @@ import ( "github.com/google/uuid" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/apikeys_test.go b/backend/apid/routers/apikeys_test.go index 707894c7f4..e448c96faa 100644 --- a/backend/apid/routers/apikeys_test.go +++ b/backend/apid/routers/apikeys_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/backend/apid/routers/assets.go b/backend/apid/routers/assets.go index 05a3d2a32d..abccf0bc20 100644 --- a/backend/apid/routers/assets.go +++ b/backend/apid/routers/assets.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/assets_test.go b/backend/apid/routers/assets_test.go index ce11aa369f..3df79abbe2 100644 --- a/backend/apid/routers/assets_test.go +++ b/backend/apid/routers/assets_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/authentication.go b/backend/apid/routers/authentication.go index d72337e315..4d75c1bc71 100644 --- a/backend/apid/routers/authentication.go +++ b/backend/apid/routers/authentication.go @@ -12,7 +12,7 @@ import ( "github.com/sensu/sensu-go/backend/authentication" "github.com/sensu/sensu-go/backend/store" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // AuthenticationRouter handles authentication related requests diff --git a/backend/apid/routers/authentication_test.go b/backend/apid/routers/authentication_test.go index 3e698aefcd..86619b7f0e 100644 --- a/backend/apid/routers/authentication_test.go +++ b/backend/apid/routers/authentication_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication" "github.com/sensu/sensu-go/backend/authentication/providers/basic" realStore "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/routers/checks.go b/backend/apid/routers/checks.go index 471dea88ea..b72d8a564d 100644 --- a/backend/apid/routers/checks.go +++ b/backend/apid/routers/checks.go @@ -9,7 +9,7 @@ import ( "time" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/routers/checks_test.go b/backend/apid/routers/checks_test.go index 98dab62de9..120d7a3e05 100644 --- a/backend/apid/routers/checks_test.go +++ b/backend/apid/routers/checks_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/testing/mockqueue" diff --git a/backend/apid/routers/clusterrolebindings.go b/backend/apid/routers/clusterrolebindings.go index 347877f34e..46ad129b80 100644 --- a/backend/apid/routers/clusterrolebindings.go +++ b/backend/apid/routers/clusterrolebindings.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/clusterrolebindings_test.go b/backend/apid/routers/clusterrolebindings_test.go index 9b5ffd9b0f..56085e29ec 100644 --- a/backend/apid/routers/clusterrolebindings_test.go +++ b/backend/apid/routers/clusterrolebindings_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/clusterroles.go b/backend/apid/routers/clusterroles.go index 0c5e21b67c..783fc23b36 100644 --- a/backend/apid/routers/clusterroles.go +++ b/backend/apid/routers/clusterroles.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/clusterroles_test.go b/backend/apid/routers/clusterroles_test.go index 555e48c990..4c6cfc10a9 100644 --- a/backend/apid/routers/clusterroles_test.go +++ b/backend/apid/routers/clusterroles_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/entities.go b/backend/apid/routers/entities.go index 2104632742..1abc1f861f 100644 --- a/backend/apid/routers/entities.go +++ b/backend/apid/routers/entities.go @@ -7,8 +7,8 @@ import ( "net/url" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/routers/entities_test.go b/backend/apid/routers/entities_test.go index 89e4ef892b..17fd25fa92 100644 --- a/backend/apid/routers/entities_test.go +++ b/backend/apid/routers/entities_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/v2/storetest" "github.com/sensu/sensu-go/testing/mockstore" diff --git a/backend/apid/routers/events.go b/backend/apid/routers/events.go index c23ab102d7..dcd2af8ad4 100644 --- a/backend/apid/routers/events.go +++ b/backend/apid/routers/events.go @@ -7,7 +7,7 @@ import ( "path" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/apid/routers/events_test.go b/backend/apid/routers/events_test.go index 6ac2f4570e..f9e708fd6c 100644 --- a/backend/apid/routers/events_test.go +++ b/backend/apid/routers/events_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/mock" diff --git a/backend/apid/routers/filters.go b/backend/apid/routers/filters.go index cb0a78650a..cd771ab51f 100644 --- a/backend/apid/routers/filters.go +++ b/backend/apid/routers/filters.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/filters_test.go b/backend/apid/routers/filters_test.go index 9938518be0..b682676f7a 100644 --- a/backend/apid/routers/filters_test.go +++ b/backend/apid/routers/filters_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/graphql.go b/backend/apid/routers/graphql.go index f52c4fcc4f..836dd0f8f5 100644 --- a/backend/apid/routers/graphql.go +++ b/backend/apid/routers/graphql.go @@ -8,7 +8,7 @@ import ( "time" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/routers/handlers.go b/backend/apid/routers/handlers.go index 67af705eec..f59f68e204 100644 --- a/backend/apid/routers/handlers.go +++ b/backend/apid/routers/handlers.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/handlers_test.go b/backend/apid/routers/handlers_test.go index 27c52a46d9..cf873d1d61 100644 --- a/backend/apid/routers/handlers_test.go +++ b/backend/apid/routers/handlers_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/health.go b/backend/apid/routers/health.go index c07644d2a7..ca789ec12f 100644 --- a/backend/apid/routers/health.go +++ b/backend/apid/routers/health.go @@ -8,7 +8,7 @@ import ( "time" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/helpers_test.go b/backend/apid/routers/helpers_test.go index 5727d65141..d31710cb67 100644 --- a/backend/apid/routers/helpers_test.go +++ b/backend/apid/routers/helpers_test.go @@ -13,7 +13,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/mockstore" "github.com/stretchr/testify/mock" diff --git a/backend/apid/routers/hooks.go b/backend/apid/routers/hooks.go index 91a691c583..8f964f8e81 100644 --- a/backend/apid/routers/hooks.go +++ b/backend/apid/routers/hooks.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/hooks_test.go b/backend/apid/routers/hooks_test.go index f26366d229..6718334b16 100644 --- a/backend/apid/routers/hooks_test.go +++ b/backend/apid/routers/hooks_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/lister.go b/backend/apid/routers/lister.go index 0764c2feed..a8bced6c3a 100644 --- a/backend/apid/routers/lister.go +++ b/backend/apid/routers/lister.go @@ -7,7 +7,7 @@ import ( "net/url" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/lister_test.go b/backend/apid/routers/lister_test.go index b749f05546..e21798ce03 100644 --- a/backend/apid/routers/lister_test.go +++ b/backend/apid/routers/lister_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/middlewares" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/assert" diff --git a/backend/apid/routers/mutators.go b/backend/apid/routers/mutators.go index f0b262fc1a..f0ee73d0c0 100644 --- a/backend/apid/routers/mutators.go +++ b/backend/apid/routers/mutators.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/mutators_test.go b/backend/apid/routers/mutators_test.go index 2540af2733..939c4430b1 100644 --- a/backend/apid/routers/mutators_test.go +++ b/backend/apid/routers/mutators_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/namespaces.go b/backend/apid/routers/namespaces.go index bfdc654c20..c43c929544 100644 --- a/backend/apid/routers/namespaces.go +++ b/backend/apid/routers/namespaces.go @@ -7,7 +7,7 @@ import ( "net/url" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/api" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" diff --git a/backend/apid/routers/namespaces_test.go b/backend/apid/routers/namespaces_test.go index 440bc32842..9fbb9b0209 100644 --- a/backend/apid/routers/namespaces_test.go +++ b/backend/apid/routers/namespaces_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/v2/wrap" diff --git a/backend/apid/routers/pipelines.go b/backend/apid/routers/pipelines.go index f50a4b4b16..663efbc0c8 100644 --- a/backend/apid/routers/pipelines.go +++ b/backend/apid/routers/pipelines.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/pipelines_test.go b/backend/apid/routers/pipelines_test.go index 3ca3a2fc89..ec85ce2476 100644 --- a/backend/apid/routers/pipelines_test.go +++ b/backend/apid/routers/pipelines_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/rolebindings.go b/backend/apid/routers/rolebindings.go index 0afe10773c..c5f8ed7a00 100644 --- a/backend/apid/routers/rolebindings.go +++ b/backend/apid/routers/rolebindings.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/rolebindings_test.go b/backend/apid/routers/rolebindings_test.go index 782d0d8f70..022d77092d 100644 --- a/backend/apid/routers/rolebindings_test.go +++ b/backend/apid/routers/rolebindings_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/roles.go b/backend/apid/routers/roles.go index 2ff68537d4..85c110561b 100644 --- a/backend/apid/routers/roles.go +++ b/backend/apid/routers/roles.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/roles_test.go b/backend/apid/routers/roles_test.go index a39719c76c..65cdaa2556 100644 --- a/backend/apid/routers/roles_test.go +++ b/backend/apid/routers/roles_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/routers.go b/backend/apid/routers/routers.go index a61b700853..abac563d3b 100644 --- a/backend/apid/routers/routers.go +++ b/backend/apid/routers/routers.go @@ -7,8 +7,8 @@ import ( "path" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/routers/routers_test.go b/backend/apid/routers/routers_test.go index 15c0173160..6cdf747aa1 100644 --- a/backend/apid/routers/routers_test.go +++ b/backend/apid/routers/routers_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/types" ) diff --git a/backend/apid/routers/silenced.go b/backend/apid/routers/silenced.go index 0eeb59458c..f11d3824c2 100644 --- a/backend/apid/routers/silenced.go +++ b/backend/apid/routers/silenced.go @@ -6,7 +6,7 @@ import ( "net/url" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/routers/silenced_test.go b/backend/apid/routers/silenced_test.go index d4b5b4e906..eda85cdfc5 100644 --- a/backend/apid/routers/silenced_test.go +++ b/backend/apid/routers/silenced_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/testing/mockstore" "github.com/stretchr/testify/mock" diff --git a/backend/apid/routers/tessen.go b/backend/apid/routers/tessen.go index 1bfe4cfa31..3b14b0aba5 100644 --- a/backend/apid/routers/tessen.go +++ b/backend/apid/routers/tessen.go @@ -5,7 +5,7 @@ import ( "net/http" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // TessenController represents the controller needs of the TessenRouter. diff --git a/backend/apid/routers/tessen_test.go b/backend/apid/routers/tessen_test.go index 334ec24ae0..e4c47ea8b2 100644 --- a/backend/apid/routers/tessen_test.go +++ b/backend/apid/routers/tessen_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/backend/apid/routers/users.go b/backend/apid/routers/users.go index 1df343730f..2b81d4e913 100644 --- a/backend/apid/routers/users.go +++ b/backend/apid/routers/users.go @@ -7,7 +7,7 @@ import ( "net/url" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/users_test.go b/backend/apid/routers/users_test.go index dfd1a2894e..7d8b0cfe59 100644 --- a/backend/apid/routers/users_test.go +++ b/backend/apid/routers/users_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/mock" diff --git a/backend/apid/routers/version.go b/backend/apid/routers/version.go index 24fa535c7a..9268410e0e 100644 --- a/backend/apid/routers/version.go +++ b/backend/apid/routers/version.go @@ -6,7 +6,7 @@ import ( "net/http" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // VersionController represents the controller needs of the VersionRouter diff --git a/backend/apid/routers/version_test.go b/backend/apid/routers/version_test.go index 1fe5418bfc..24c8d9248f 100644 --- a/backend/apid/routers/version_test.go +++ b/backend/apid/routers/version_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/backend/authentication/authenticator.go b/backend/authentication/authenticator.go index 218f1048a4..889b3c4e5e 100644 --- a/backend/authentication/authenticator.go +++ b/backend/authentication/authenticator.go @@ -8,7 +8,7 @@ import ( "github.com/sirupsen/logrus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // Authenticator contains the list of authentication providers diff --git a/backend/authentication/jwt/jwt.go b/backend/authentication/jwt/jwt.go index e431b0f3eb..397fd58257 100644 --- a/backend/authentication/jwt/jwt.go +++ b/backend/authentication/jwt/jwt.go @@ -12,7 +12,7 @@ import ( time "github.com/echlebek/timeproxy" jwt "github.com/golang-jwt/jwt/v4" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" utilbytes "github.com/sensu/sensu-go/util/bytes" diff --git a/backend/authentication/jwt/jwt_test.go b/backend/authentication/jwt/jwt_test.go index 9a347da0d3..7ffaba5878 100644 --- a/backend/authentication/jwt/jwt_test.go +++ b/backend/authentication/jwt/jwt_test.go @@ -8,7 +8,7 @@ import ( "github.com/echlebek/crock" time "github.com/echlebek/timeproxy" jwt "github.com/golang-jwt/jwt/v4" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" diff --git a/backend/authentication/providers/basic/basic.go b/backend/authentication/providers/basic/basic.go index f9081d1ae7..acc29f45a3 100644 --- a/backend/authentication/providers/basic/basic.go +++ b/backend/authentication/providers/basic/basic.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/authorization/rbac/rbac.go b/backend/authorization/rbac/rbac.go index 4f11832e2d..1e19922137 100644 --- a/backend/authorization/rbac/rbac.go +++ b/backend/authorization/rbac/rbac.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" "github.com/sirupsen/logrus" diff --git a/backend/authorization/rbac/rbac_test.go b/backend/authorization/rbac/rbac_test.go index 006ad01b2c..9da8be14c7 100644 --- a/backend/authorization/rbac/rbac_test.go +++ b/backend/authorization/rbac/rbac_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/mockstore" diff --git a/backend/backend.go b/backend/backend.go index 2450ee7b3d..e1ec22f4cf 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -20,7 +20,7 @@ import ( "golang.org/x/time/rate" "google.golang.org/grpc" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/agentd" "github.com/sensu/sensu-go/backend/api" diff --git a/backend/cmd/init.go b/backend/cmd/init.go index 666d4c7d47..d082423155 100644 --- a/backend/cmd/init.go +++ b/backend/cmd/init.go @@ -8,7 +8,7 @@ import ( "time" "github.com/AlecAivazis/survey/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/seeds" diff --git a/backend/cmd/start.go b/backend/cmd/start.go index 9d319beb69..d1ae71a48e 100644 --- a/backend/cmd/start.go +++ b/backend/cmd/start.go @@ -16,7 +16,7 @@ import ( "github.com/sensu/sensu-go/backend/apid/middlewares" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend" "github.com/sensu/sensu-go/backend/etcd" diff --git a/backend/cmd/upgrade.go b/backend/cmd/upgrade.go index 2a929fbaa3..861d540919 100644 --- a/backend/cmd/upgrade.go +++ b/backend/cmd/upgrade.go @@ -8,7 +8,7 @@ import ( "time" "github.com/AlecAivazis/survey/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend" "github.com/sensu/sensu-go/backend/etcd" etcdstore "github.com/sensu/sensu-go/backend/store/etcd" diff --git a/backend/config.go b/backend/config.go index 03b7d4516a..25d1bf153c 100644 --- a/backend/config.go +++ b/backend/config.go @@ -3,7 +3,7 @@ package backend import ( "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/licensing" "golang.org/x/time/rate" diff --git a/backend/eventd/entity.go b/backend/eventd/entity.go index 98cc48c671..969924fa87 100644 --- a/backend/eventd/entity.go +++ b/backend/eventd/entity.go @@ -4,8 +4,8 @@ import ( "context" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" metricspkg "github.com/sensu/sensu-go/metrics" diff --git a/backend/eventd/entity_test.go b/backend/eventd/entity_test.go index 689297cc60..560e5146a9 100644 --- a/backend/eventd/entity_test.go +++ b/backend/eventd/entity_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/mock" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/storetest" diff --git a/backend/eventd/eventd.go b/backend/eventd/eventd.go index dd82230b45..d62dc381f6 100644 --- a/backend/eventd/eventd.go +++ b/backend/eventd/eventd.go @@ -13,8 +13,8 @@ import ( "github.com/sirupsen/logrus" clientv3 "go.etcd.io/etcd/client/v3" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/keepalived" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/eventd/eventd_test.go b/backend/eventd/eventd_test.go index 8795d45f5c..b5410b0bea 100644 --- a/backend/eventd/eventd_test.go +++ b/backend/eventd/eventd_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/eventd/integration_test.go b/backend/eventd/integration_test.go index 55ee179592..373ef69e22 100644 --- a/backend/eventd/integration_test.go +++ b/backend/eventd/integration_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/eventd/silenced.go b/backend/eventd/silenced.go index 3939a0de86..88fc75b77f 100644 --- a/backend/eventd/silenced.go +++ b/backend/eventd/silenced.go @@ -4,7 +4,7 @@ import ( "context" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" stringsutil "github.com/sensu/sensu-go/util/strings" ) diff --git a/backend/eventd/silenced_test.go b/backend/eventd/silenced_test.go index 48c1772574..2610c3fba3 100644 --- a/backend/eventd/silenced_test.go +++ b/backend/eventd/silenced_test.go @@ -5,8 +5,8 @@ import ( "sync" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store/cache" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/keepalived/deregisterer.go b/backend/keepalived/deregisterer.go index dd89af78ae..d5a5b4f206 100644 --- a/backend/keepalived/deregisterer.go +++ b/backend/keepalived/deregisterer.go @@ -6,7 +6,7 @@ import ( "time" "github.com/google/uuid" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/keepalived/integration_test.go b/backend/keepalived/integration_test.go index a3e9e6492f..19f536b5b6 100644 --- a/backend/keepalived/integration_test.go +++ b/backend/keepalived/integration_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/keepalived/keepalived.go b/backend/keepalived/keepalived.go index 9cf5b39c70..58f3ba4d0a 100644 --- a/backend/keepalived/keepalived.go +++ b/backend/keepalived/keepalived.go @@ -11,8 +11,8 @@ import ( "github.com/google/uuid" "github.com/prometheus/client_golang/prometheus" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" diff --git a/backend/keepalived/keepalived_test.go b/backend/keepalived/keepalived_test.go index 766e5faf5f..726997c1af 100644 --- a/backend/keepalived/keepalived_test.go +++ b/backend/keepalived/keepalived_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" stor "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipeline/adapter.go b/backend/pipeline/adapter.go index 60c1f91c99..c1844dbd0a 100644 --- a/backend/pipeline/adapter.go +++ b/backend/pipeline/adapter.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // Adapter specifies an interface for pipeline adapters which are used to diff --git a/backend/pipeline/adapterv1.go b/backend/pipeline/adapterv1.go index a35b5c58b0..caea9e7c98 100644 --- a/backend/pipeline/adapterv1.go +++ b/backend/pipeline/adapterv1.go @@ -8,7 +8,7 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" metricspkg "github.com/sensu/sensu-go/metrics" "github.com/sirupsen/logrus" diff --git a/backend/pipeline/adapterv1_test.go b/backend/pipeline/adapterv1_test.go index 4d46921312..d9c3ac97c4 100644 --- a/backend/pipeline/adapterv1_test.go +++ b/backend/pipeline/adapterv1_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/golang/protobuf/proto" //nolint:staticcheck // ignore SA1019 - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/pipeline/filter" "github.com/sensu/sensu-go/backend/pipeline/handler" "github.com/sensu/sensu-go/backend/pipeline/mutator" diff --git a/backend/pipeline/filter.go b/backend/pipeline/filter.go index 32ae709d36..6064f9f554 100644 --- a/backend/pipeline/filter.go +++ b/backend/pipeline/filter.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" metricspkg "github.com/sensu/sensu-go/metrics" ) diff --git a/backend/pipeline/filter/has_metrics.go b/backend/pipeline/filter/has_metrics.go index 8cc737925c..95716a296b 100644 --- a/backend/pipeline/filter/has_metrics.go +++ b/backend/pipeline/filter/has_metrics.go @@ -3,7 +3,7 @@ package filter import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" utillogging "github.com/sensu/sensu-go/util/logging" ) diff --git a/backend/pipeline/filter/has_metrics_test.go b/backend/pipeline/filter/has_metrics_test.go index 9e3de448cf..cfcd0b6ab3 100644 --- a/backend/pipeline/filter/has_metrics_test.go +++ b/backend/pipeline/filter/has_metrics_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestHasMetricsAdapter_Name(t *testing.T) { diff --git a/backend/pipeline/filter/is_incident.go b/backend/pipeline/filter/is_incident.go index f76f35494d..110a113b69 100644 --- a/backend/pipeline/filter/is_incident.go +++ b/backend/pipeline/filter/is_incident.go @@ -3,7 +3,7 @@ package filter import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" utillogging "github.com/sensu/sensu-go/util/logging" ) diff --git a/backend/pipeline/filter/is_incident_test.go b/backend/pipeline/filter/is_incident_test.go index e42f24fba0..888f907827 100644 --- a/backend/pipeline/filter/is_incident_test.go +++ b/backend/pipeline/filter/is_incident_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestIsIncidentAdapter_Name(t *testing.T) { diff --git a/backend/pipeline/filter/legacy.go b/backend/pipeline/filter/legacy.go index fe644ea687..e2f58f62c5 100644 --- a/backend/pipeline/filter/legacy.go +++ b/backend/pipeline/filter/legacy.go @@ -7,7 +7,7 @@ import ( "time" "github.com/robertkrimen/otto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/js" diff --git a/backend/pipeline/filter/legacy_test.go b/backend/pipeline/filter/legacy_test.go index 3a8ac9485f..6f595337a0 100644 --- a/backend/pipeline/filter/legacy_test.go +++ b/backend/pipeline/filter/legacy_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/api" "github.com/sensu/sensu-go/backend/authorization/rbac" diff --git a/backend/pipeline/filter/not_silenced.go b/backend/pipeline/filter/not_silenced.go index dd8f7ee26c..1640ffc16d 100644 --- a/backend/pipeline/filter/not_silenced.go +++ b/backend/pipeline/filter/not_silenced.go @@ -3,7 +3,7 @@ package filter import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" utillogging "github.com/sensu/sensu-go/util/logging" ) diff --git a/backend/pipeline/filter/not_silenced_test.go b/backend/pipeline/filter/not_silenced_test.go index 3a0952e532..b5af6983af 100644 --- a/backend/pipeline/filter/not_silenced_test.go +++ b/backend/pipeline/filter/not_silenced_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestNotSilencedAdapter_Name(t *testing.T) { diff --git a/backend/pipeline/filter_test.go b/backend/pipeline/filter_test.go index 72d2fd8494..785ee642e3 100644 --- a/backend/pipeline/filter_test.go +++ b/backend/pipeline/filter_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/pipeline/filter" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/pipeline/handler.go b/backend/pipeline/handler.go index 42958a3359..6bcb7f53db 100644 --- a/backend/pipeline/handler.go +++ b/backend/pipeline/handler.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" metricspkg "github.com/sensu/sensu-go/metrics" ) diff --git a/backend/pipeline/handler/legacy.go b/backend/pipeline/handler/legacy.go index 4907e417fb..79e4976295 100644 --- a/backend/pipeline/handler/legacy.go +++ b/backend/pipeline/handler/legacy.go @@ -8,7 +8,7 @@ import ( "os" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/licensing" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/pipeline/handler/legacy_test.go b/backend/pipeline/handler/legacy_test.go index eadfff6a67..9b4ed0abc8 100644 --- a/backend/pipeline/handler/legacy_test.go +++ b/backend/pipeline/handler/legacy_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/licensing" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/pipeline/handler_test.go b/backend/pipeline/handler_test.go index cf171e4e41..f89ea06a64 100644 --- a/backend/pipeline/handler_test.go +++ b/backend/pipeline/handler_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/mockpipeline" "github.com/stretchr/testify/mock" diff --git a/backend/pipeline/mutator.go b/backend/pipeline/mutator.go index 26dc3aacad..a54a202f55 100644 --- a/backend/pipeline/mutator.go +++ b/backend/pipeline/mutator.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" metricspkg "github.com/sensu/sensu-go/metrics" ) diff --git a/backend/pipeline/mutator/javascript.go b/backend/pipeline/mutator/javascript.go index f0127ec7ab..6de0e49a50 100644 --- a/backend/pipeline/mutator/javascript.go +++ b/backend/pipeline/mutator/javascript.go @@ -10,7 +10,7 @@ import ( "time" "github.com/robertkrimen/otto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/js" diff --git a/backend/pipeline/mutator/javascript_test.go b/backend/pipeline/mutator/javascript_test.go index a0e7454afb..b43a717c01 100644 --- a/backend/pipeline/mutator/javascript_test.go +++ b/backend/pipeline/mutator/javascript_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/js" diff --git a/backend/pipeline/mutator/json.go b/backend/pipeline/mutator/json.go index eda3dba60b..ca6b741b2a 100644 --- a/backend/pipeline/mutator/json.go +++ b/backend/pipeline/mutator/json.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/backend/pipeline/mutator/json_test.go b/backend/pipeline/mutator/json_test.go index 075a7a3fc8..bdcc0679da 100644 --- a/backend/pipeline/mutator/json_test.go +++ b/backend/pipeline/mutator/json_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestJSONAdapter_Name(t *testing.T) { diff --git a/backend/pipeline/mutator/legacy.go b/backend/pipeline/mutator/legacy.go index 6b2531a4e2..ce4ae08489 100644 --- a/backend/pipeline/mutator/legacy.go +++ b/backend/pipeline/mutator/legacy.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipeline/mutator/legacy_test.go b/backend/pipeline/mutator/legacy_test.go index 41706a9e7d..57757a8fcf 100644 --- a/backend/pipeline/mutator/legacy_test.go +++ b/backend/pipeline/mutator/legacy_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipeline/mutator/only_check_output.go b/backend/pipeline/mutator/only_check_output.go index 6a1cb44969..b4b3142663 100644 --- a/backend/pipeline/mutator/only_check_output.go +++ b/backend/pipeline/mutator/only_check_output.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/backend/pipeline/mutator/only_check_output_test.go b/backend/pipeline/mutator/only_check_output_test.go index 07ffda26ee..1673f6fee5 100644 --- a/backend/pipeline/mutator/only_check_output_test.go +++ b/backend/pipeline/mutator/only_check_output_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestOnlyCheckOutputAdapter_Name(t *testing.T) { diff --git a/backend/pipeline/mutator/pipe.go b/backend/pipeline/mutator/pipe.go index 39873b07bb..a7c832da78 100644 --- a/backend/pipeline/mutator/pipe.go +++ b/backend/pipeline/mutator/pipe.go @@ -7,7 +7,7 @@ import ( "os" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipeline/mutator/pipe_test.go b/backend/pipeline/mutator/pipe_test.go index 2aca004397..ff8bf7acd7 100644 --- a/backend/pipeline/mutator/pipe_test.go +++ b/backend/pipeline/mutator/pipe_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipeline/mutator_test.go b/backend/pipeline/mutator_test.go index 097b7f427c..c2358986ba 100644 --- a/backend/pipeline/mutator_test.go +++ b/backend/pipeline/mutator_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/mockpipeline" "github.com/stretchr/testify/mock" diff --git a/backend/pipelined/pipelined.go b/backend/pipelined/pipelined.go index 3f7fbf8427..9bd52f277f 100644 --- a/backend/pipelined/pipelined.go +++ b/backend/pipelined/pipelined.go @@ -9,7 +9,7 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/pipeline" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipelined/pipelined_test.go b/backend/pipelined/pipelined_test.go index 25bdc635db..f992ab1fca 100644 --- a/backend/pipelined/pipelined_test.go +++ b/backend/pipelined/pipelined_test.go @@ -4,7 +4,7 @@ package pipelined import ( "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/resource/backend.go b/backend/resource/backend.go index bdf49967b4..a421493454 100644 --- a/backend/resource/backend.go +++ b/backend/resource/backend.go @@ -6,7 +6,7 @@ import ( "time" "github.com/google/uuid" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/system" diff --git a/backend/resource/backend_test.go b/backend/resource/backend_test.go index 9c77367f40..8b2635f2f6 100644 --- a/backend/resource/backend_test.go +++ b/backend/resource/backend_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/schedulerd/check_scheduler_test.go b/backend/schedulerd/check_scheduler_test.go index 382424e347..24154fac79 100644 --- a/backend/schedulerd/check_scheduler_test.go +++ b/backend/schedulerd/check_scheduler_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/queue" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/schedulerd/check_watcher.go b/backend/schedulerd/check_watcher.go index 5815d2d333..1777525bc2 100644 --- a/backend/schedulerd/check_watcher.go +++ b/backend/schedulerd/check_watcher.go @@ -5,7 +5,7 @@ import ( "strings" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/schedulerd/check_watcher_test.go b/backend/schedulerd/check_watcher_test.go index f8bb4b66bd..8eaa77a26e 100644 --- a/backend/schedulerd/check_watcher_test.go +++ b/backend/schedulerd/check_watcher_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/schedulerd/cron_scheduler.go b/backend/schedulerd/cron_scheduler.go index 4c925bc131..b24c7c4311 100644 --- a/backend/schedulerd/cron_scheduler.go +++ b/backend/schedulerd/cron_scheduler.go @@ -10,7 +10,7 @@ import ( cachev2 "github.com/sensu/sensu-go/backend/store/cache/v2" "github.com/sirupsen/logrus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CronScheduler schedules checks to be executed on a cron schedule. diff --git a/backend/schedulerd/executor.go b/backend/schedulerd/executor.go index 2774be71ac..a6b30570e1 100644 --- a/backend/schedulerd/executor.go +++ b/backend/schedulerd/executor.go @@ -7,8 +7,8 @@ import ( "strings" time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/schedulerd/executor_test.go b/backend/schedulerd/executor_test.go index 13a84f9516..d59bf2b69d 100644 --- a/backend/schedulerd/executor_test.go +++ b/backend/schedulerd/executor_test.go @@ -10,8 +10,8 @@ import ( "sync" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/queue" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/schedulerd/interface.go b/backend/schedulerd/interface.go index a845aa89db..1fcf5a07e8 100644 --- a/backend/schedulerd/interface.go +++ b/backend/schedulerd/interface.go @@ -1,6 +1,6 @@ package schedulerd -import corev2 "github.com/sensu/sensu-go/api/core/v2" +import corev2 "github.com/sensu/core/v2" // Scheduler is a check scheduler. It is responsible for determining the // scheduling interval of a check, given a particular configuration. diff --git a/backend/schedulerd/interval_scheduler.go b/backend/schedulerd/interval_scheduler.go index 28b839562b..4942d86b68 100644 --- a/backend/schedulerd/interval_scheduler.go +++ b/backend/schedulerd/interval_scheduler.go @@ -4,7 +4,7 @@ import ( "context" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/schedulerd/proxy_check.go b/backend/schedulerd/proxy_check.go index 57685a257b..8ed419d966 100644 --- a/backend/schedulerd/proxy_check.go +++ b/backend/schedulerd/proxy_check.go @@ -6,8 +6,8 @@ import ( time "github.com/echlebek/timeproxy" cron "github.com/robfig/cron/v3" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" cachev2 "github.com/sensu/sensu-go/backend/store/cache/v2" "github.com/sensu/sensu-go/js" "github.com/sensu/sensu-go/token" diff --git a/backend/schedulerd/proxy_check_test.go b/backend/schedulerd/proxy_check_test.go index 79eede8289..4441a1d9ac 100644 --- a/backend/schedulerd/proxy_check_test.go +++ b/backend/schedulerd/proxy_check_test.go @@ -5,8 +5,8 @@ import ( "testing" time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" cachev2 "github.com/sensu/sensu-go/backend/store/cache/v2" "github.com/stretchr/testify/assert" ) diff --git a/backend/schedulerd/roundrobin_cron.go b/backend/schedulerd/roundrobin_cron.go index 608e3bcf7a..3b76eb466e 100644 --- a/backend/schedulerd/roundrobin_cron.go +++ b/backend/schedulerd/roundrobin_cron.go @@ -4,8 +4,8 @@ import ( "context" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/schedulerd/roundrobin_interval.go b/backend/schedulerd/roundrobin_interval.go index d6f34d9551..3b7d67255a 100644 --- a/backend/schedulerd/roundrobin_interval.go +++ b/backend/schedulerd/roundrobin_interval.go @@ -5,8 +5,8 @@ import ( "reflect" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/schedulerd/schedulerd.go b/backend/schedulerd/schedulerd.go index ac3deb84e2..44c86bf07e 100644 --- a/backend/schedulerd/schedulerd.go +++ b/backend/schedulerd/schedulerd.go @@ -4,7 +4,7 @@ import ( "context" "github.com/prometheus/client_golang/prometheus" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/secrets/broken_provider.go b/backend/secrets/broken_provider.go index 911fb96e6b..e1a7db27bc 100644 --- a/backend/secrets/broken_provider.go +++ b/backend/secrets/broken_provider.go @@ -3,7 +3,7 @@ package secrets import ( "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // BrokenProvider is a sentinel provider that can be used in place of a real diff --git a/backend/secrets/provider.go b/backend/secrets/provider.go index 857198ee94..5379119b98 100644 --- a/backend/secrets/provider.go +++ b/backend/secrets/provider.go @@ -5,7 +5,7 @@ import ( "fmt" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/resource" "github.com/sirupsen/logrus" ) diff --git a/backend/secrets/provider_test.go b/backend/secrets/provider_test.go index 653a0273de..c7ae8cbb42 100644 --- a/backend/secrets/provider_test.go +++ b/backend/secrets/provider_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/backend/seeds/seeds.go b/backend/seeds/seeds.go index 35c93c754f..d762ac1074 100644 --- a/backend/seeds/seeds.go +++ b/backend/seeds/seeds.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/bcrypt" storev1 "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd" diff --git a/backend/store/cache/cache.go b/backend/store/cache/cache.go index 9cb3429794..e171112a37 100644 --- a/backend/store/cache/cache.go +++ b/backend/store/cache/cache.go @@ -9,7 +9,7 @@ import ( "sync/atomic" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd" "github.com/sensu/sensu-go/types/dynamic" diff --git a/backend/store/cache/cache_integration_test.go b/backend/store/cache/cache_integration_test.go index 394e7d8bc9..d3558ac568 100644 --- a/backend/store/cache/cache_integration_test.go +++ b/backend/store/cache/cache_integration_test.go @@ -10,7 +10,7 @@ import ( "github.com/echlebek/crock" time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" store "github.com/sensu/sensu-go/backend/store/etcd" "github.com/sensu/sensu-go/types" diff --git a/backend/store/cache/cache_test.go b/backend/store/cache/cache_test.go index 58f8bde67e..c8228f4dc6 100644 --- a/backend/store/cache/cache_test.go +++ b/backend/store/cache/cache_test.go @@ -9,7 +9,7 @@ import ( "github.com/sensu/sensu-go/backend/store/etcd" "github.com/sensu/sensu-go/types" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" "github.com/sensu/sensu-go/types/dynamic" diff --git a/backend/store/cache/v2/cache.go b/backend/store/cache/v2/cache.go index 36171d6adb..b690876196 100644 --- a/backend/store/cache/v2/cache.go +++ b/backend/store/cache/v2/cache.go @@ -9,7 +9,7 @@ import ( "sync/atomic" "time" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/etcdstore" diff --git a/backend/store/cache/v2/cache_integration_test.go b/backend/store/cache/v2/cache_integration_test.go index 2ba08253d6..6613d10f0f 100644 --- a/backend/store/cache/v2/cache_integration_test.go +++ b/backend/store/cache/v2/cache_integration_test.go @@ -10,8 +10,8 @@ import ( "github.com/echlebek/crock" time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/store/cache/v2/cache_test.go b/backend/store/cache/v2/cache_test.go index e537625b12..9029344e77 100644 --- a/backend/store/cache/v2/cache_test.go +++ b/backend/store/cache/v2/cache_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/etcdstore" diff --git a/backend/store/etcd/asset_store.go b/backend/store/etcd/asset_store.go index 680ad065db..f0fae1d50b 100644 --- a/backend/store/etcd/asset_store.go +++ b/backend/store/etcd/asset_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/check_store.go b/backend/store/etcd/check_store.go index 9e9160f625..1d693ee9b1 100644 --- a/backend/store/etcd/check_store.go +++ b/backend/store/etcd/check_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/check_store_test.go b/backend/store/etcd/check_store_test.go index 153b49c9df..e40fb0157d 100644 --- a/backend/store/etcd/check_store_test.go +++ b/backend/store/etcd/check_store_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/store/etcd/entity_store.go b/backend/store/etcd/entity_store.go index 58f181c194..ca59e9b11b 100644 --- a/backend/store/etcd/entity_store.go +++ b/backend/store/etcd/entity_store.go @@ -6,8 +6,8 @@ import ( "errors" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/store/etcd/entity_store_test.go b/backend/store/etcd/entity_store_test.go index d81ce37f31..aec6a9b76d 100644 --- a/backend/store/etcd/entity_store_test.go +++ b/backend/store/etcd/entity_store_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" diff --git a/backend/store/etcd/event_store.go b/backend/store/etcd/event_store.go index aa39b474f0..bb9620a107 100644 --- a/backend/store/etcd/event_store.go +++ b/backend/store/etcd/event_store.go @@ -16,7 +16,7 @@ import ( "github.com/sensu/sensu-go/backend/store/provider" clientv3 "go.etcd.io/etcd/client/v3" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/backend/store/etcd/event_store_integration_test.go b/backend/store/etcd/event_store_integration_test.go index 833cbc8598..026b281ae0 100644 --- a/backend/store/etcd/event_store_integration_test.go +++ b/backend/store/etcd/event_store_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestEventStorageMaxOutputSize(t *testing.T) { diff --git a/backend/store/etcd/event_store_test.go b/backend/store/etcd/event_store_test.go index fbadf7fc66..048cf0990b 100644 --- a/backend/store/etcd/event_store_test.go +++ b/backend/store/etcd/event_store_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/assert" ) diff --git a/backend/store/etcd/filter_store.go b/backend/store/etcd/filter_store.go index de27e96fc8..b040389ad0 100644 --- a/backend/store/etcd/filter_store.go +++ b/backend/store/etcd/filter_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/generic_object.pb.go b/backend/store/etcd/generic_object.pb.go index 988c424a59..97d4ede6b1 100644 --- a/backend/store/etcd/generic_object.pb.go +++ b/backend/store/etcd/generic_object.pb.go @@ -7,7 +7,7 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" -import v2 "github.com/sensu/sensu-go/api/core/v2" +import v2 "github.com/sensu/core/v2" import bytes "bytes" diff --git a/backend/store/etcd/generic_object_test.go b/backend/store/etcd/generic_object_test.go index 5fff43fca5..568b8ba64c 100644 --- a/backend/store/etcd/generic_object_test.go +++ b/backend/store/etcd/generic_object_test.go @@ -1,6 +1,6 @@ package etcd -import corev2 "github.com/sensu/sensu-go/api/core/v2" +import corev2 "github.com/sensu/core/v2" //go:generate -command protoc protoc --gofast_out=plugins:. -I=${GOPATH}/src:. -I=../../../vendor/ -I=./ -I=../../../vendor/github.com/gogo/protobuf/protobuf/ //go:generate protoc generic_object.proto diff --git a/backend/store/etcd/generic_objectpb_test.go b/backend/store/etcd/generic_objectpb_test.go index 09a27507d6..64bd7553e8 100644 --- a/backend/store/etcd/generic_objectpb_test.go +++ b/backend/store/etcd/generic_objectpb_test.go @@ -12,7 +12,7 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/sensu/sensu-go/api/core/v2" +import _ "github.com/sensu/core/v2" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/backend/store/etcd/handler_store.go b/backend/store/etcd/handler_store.go index cb651e26c9..d58c15243c 100644 --- a/backend/store/etcd/handler_store.go +++ b/backend/store/etcd/handler_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/handler_store_test.go b/backend/store/etcd/handler_store_test.go index a91f64f1fa..0332c6f5c6 100644 --- a/backend/store/etcd/handler_store_test.go +++ b/backend/store/etcd/handler_store_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestHandlerStorage(t *testing.T) { diff --git a/backend/store/etcd/health_store.go b/backend/store/etcd/health_store.go index 8d57e28e90..afde4a0c26 100644 --- a/backend/store/etcd/health_store.go +++ b/backend/store/etcd/health_store.go @@ -9,7 +9,7 @@ import ( "sync" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.etcd.io/etcd/client/v3" diff --git a/backend/store/etcd/hook_store.go b/backend/store/etcd/hook_store.go index 72fa568d2d..5e8916e2ac 100644 --- a/backend/store/etcd/hook_store.go +++ b/backend/store/etcd/hook_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/hook_store_test.go b/backend/store/etcd/hook_store_test.go index 791a11c31d..4e9fb69f4a 100644 --- a/backend/store/etcd/hook_store_test.go +++ b/backend/store/etcd/hook_store_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestHookConfigStorage(t *testing.T) { diff --git a/backend/store/etcd/keepalive_store.go b/backend/store/etcd/keepalive_store.go index 9799ae0d2a..cd7c499664 100644 --- a/backend/store/etcd/keepalive_store.go +++ b/backend/store/etcd/keepalive_store.go @@ -4,7 +4,7 @@ import ( "context" "path" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" "go.etcd.io/etcd/client/v3" diff --git a/backend/store/etcd/migrations.go b/backend/store/etcd/migrations.go index e00461cb18..3a16876fae 100644 --- a/backend/store/etcd/migrations.go +++ b/backend/store/etcd/migrations.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "go.etcd.io/etcd/client/v3" ) diff --git a/backend/store/etcd/migrations_test.go b/backend/store/etcd/migrations_test.go index f4b35ecf99..02b5d0d394 100644 --- a/backend/store/etcd/migrations_test.go +++ b/backend/store/etcd/migrations_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "go.etcd.io/etcd/client/v3" ) diff --git a/backend/store/etcd/mutator_store.go b/backend/store/etcd/mutator_store.go index 3aa14b77ce..3f38e14616 100644 --- a/backend/store/etcd/mutator_store.go +++ b/backend/store/etcd/mutator_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/mutator_store_test.go b/backend/store/etcd/mutator_store_test.go index e04fd8fef0..9aeaf47d71 100644 --- a/backend/store/etcd/mutator_store_test.go +++ b/backend/store/etcd/mutator_store_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestMutatorStorage(t *testing.T) { diff --git a/backend/store/etcd/namespace_store.go b/backend/store/etcd/namespace_store.go index 9a12000a09..d17ea16d69 100644 --- a/backend/store/etcd/namespace_store.go +++ b/backend/store/etcd/namespace_store.go @@ -6,7 +6,7 @@ import ( "path" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" clientv3 "go.etcd.io/etcd/client/v3" diff --git a/backend/store/etcd/namespace_store_test.go b/backend/store/etcd/namespace_store_test.go index 7e5720f2e1..a97d8f63b1 100644 --- a/backend/store/etcd/namespace_store_test.go +++ b/backend/store/etcd/namespace_store_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestNamespaceStorage(t *testing.T) { diff --git a/backend/store/etcd/pipeline_store.go b/backend/store/etcd/pipeline_store.go index 1955c89999..ba98afc721 100644 --- a/backend/store/etcd/pipeline_store.go +++ b/backend/store/etcd/pipeline_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/resource.go b/backend/store/etcd/resource.go index 39538db936..c11c5c25b8 100644 --- a/backend/store/etcd/resource.go +++ b/backend/store/etcd/resource.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" "github.com/sensu/sensu-go/backend/store/patch" diff --git a/backend/store/etcd/resource_integration_test.go b/backend/store/etcd/resource_integration_test.go index a7ad3f8e3b..983fe62653 100644 --- a/backend/store/etcd/resource_integration_test.go +++ b/backend/store/etcd/resource_integration_test.go @@ -8,7 +8,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/patch" "go.etcd.io/etcd/client/v3" diff --git a/backend/store/etcd/silenced_store.go b/backend/store/etcd/silenced_store.go index b5019aa6ed..7c9127f914 100644 --- a/backend/store/etcd/silenced_store.go +++ b/backend/store/etcd/silenced_store.go @@ -7,7 +7,7 @@ import ( "time" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" diff --git a/backend/store/etcd/store.go b/backend/store/etcd/store.go index 3d8311d103..f1bd46c22e 100644 --- a/backend/store/etcd/store.go +++ b/backend/store/etcd/store.go @@ -14,7 +14,7 @@ import ( "github.com/sensu/sensu-go/types" clientv3 "go.etcd.io/etcd/client/v3" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/backend/store/etcd/store_test.go b/backend/store/etcd/store_test.go index 49c79bea3f..58b729c0ff 100644 --- a/backend/store/etcd/store_test.go +++ b/backend/store/etcd/store_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" diff --git a/backend/store/etcd/tessen_store.go b/backend/store/etcd/tessen_store.go index 2c66758e92..a220d5dced 100644 --- a/backend/store/etcd/tessen_store.go +++ b/backend/store/etcd/tessen_store.go @@ -3,7 +3,7 @@ package etcd import ( "context" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/tessen_store_test.go b/backend/store/etcd/tessen_store_test.go index 5d2ad732c5..dc6b9c02fe 100644 --- a/backend/store/etcd/tessen_store_test.go +++ b/backend/store/etcd/tessen_store_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/assert" ) diff --git a/backend/store/etcd/user_store.go b/backend/store/etcd/user_store.go index b249bbade9..12c7bbab60 100644 --- a/backend/store/etcd/user_store.go +++ b/backend/store/etcd/user_store.go @@ -6,7 +6,7 @@ import ( "path" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/bcrypt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" diff --git a/backend/store/etcd/user_store_test.go b/backend/store/etcd/user_store_test.go index d56f3cc979..c7da9657d7 100644 --- a/backend/store/etcd/user_store_test.go +++ b/backend/store/etcd/user_store_test.go @@ -16,7 +16,7 @@ import ( "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestUserStorage(t *testing.T) { diff --git a/backend/store/etcd/watcher_test.go b/backend/store/etcd/watcher_test.go index 52ad29ffe2..a52200604b 100644 --- a/backend/store/etcd/watcher_test.go +++ b/backend/store/etcd/watcher_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" "github.com/sirupsen/logrus/hooks/test" diff --git a/backend/store/etcd/watchers.go b/backend/store/etcd/watchers.go index f582163abd..b0b1ad454b 100644 --- a/backend/store/etcd/watchers.go +++ b/backend/store/etcd/watchers.go @@ -4,7 +4,7 @@ import ( "context" "reflect" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/v2/wrap" "go.etcd.io/etcd/client/v3" diff --git a/backend/store/key_builder.go b/backend/store/key_builder.go index d019656196..fcd7674ea3 100644 --- a/backend/store/key_builder.go +++ b/backend/store/key_builder.go @@ -4,7 +4,7 @@ import ( "context" "path" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" ) diff --git a/backend/store/provider/provider.go b/backend/store/provider/provider.go index 455531b72b..7e354be3e2 100644 --- a/backend/store/provider/provider.go +++ b/backend/store/provider/provider.go @@ -1,7 +1,7 @@ package provider import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // Info represents the config of a store provider. diff --git a/backend/store/proxy.go b/backend/store/proxy.go index f4ad0b82ca..3d93705500 100644 --- a/backend/store/proxy.go +++ b/backend/store/proxy.go @@ -6,7 +6,7 @@ import ( "sync" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store/patch" "github.com/sensu/sensu-go/backend/store/provider" "github.com/sensu/sensu-go/types" diff --git a/backend/store/store.go b/backend/store/store.go index 9aadac63cf..51c5da1d35 100644 --- a/backend/store/store.go +++ b/backend/store/store.go @@ -5,8 +5,8 @@ import ( "crypto/tls" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store/patch" "github.com/sensu/sensu-go/types" clientv3 "go.etcd.io/etcd/client/v3" diff --git a/backend/store/v2/etcdstore/benchmark_test.go b/backend/store/v2/etcdstore/benchmark_test.go index 859c530703..464b62c101 100644 --- a/backend/store/v2/etcdstore/benchmark_test.go +++ b/backend/store/v2/etcdstore/benchmark_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/etcdstore" diff --git a/backend/store/v2/etcdstore/fixtures_test.go b/backend/store/v2/etcdstore/fixtures_test.go index ebfbb9a5cc..c4e97b1812 100644 --- a/backend/store/v2/etcdstore/fixtures_test.go +++ b/backend/store/v2/etcdstore/fixtures_test.go @@ -1,16 +1,15 @@ package etcdstore_test import ( - "errors" "io/ioutil" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" etcdstore "github.com/sensu/sensu-go/backend/store/etcd" etcdstorev2 "github.com/sensu/sensu-go/backend/store/v2/etcdstore" - "github.com/sensu/sensu-go/types" "github.com/sirupsen/logrus" ) @@ -49,17 +48,8 @@ func (t *testResource) GetTypeMeta() corev2.TypeMeta { } } -func fixtureResolver(name string) (interface{}, error) { - switch name { - case "testResource": - return &testResource{}, nil - default: - return nil, errors.New("type does not exist") - } -} - func init() { - types.RegisterResolver("store/wrap_test", fixtureResolver) + apitools.RegisterType("store/wrap_test", new(testResource)) } func testWithEtcdStore(t testing.TB, f func(*etcdstorev2.Store)) { diff --git a/backend/store/v2/etcdstore/store.go b/backend/store/v2/etcdstore/store.go index 3d3669d1f4..4852ef19ad 100644 --- a/backend/store/v2/etcdstore/store.go +++ b/backend/store/v2/etcdstore/store.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" "github.com/sensu/sensu-go/backend/store/patch" diff --git a/backend/store/v2/etcdstore/store_test.go b/backend/store/v2/etcdstore/store_test.go index d4f11131ff..e63b2951a6 100644 --- a/backend/store/v2/etcdstore/store_test.go +++ b/backend/store/v2/etcdstore/store_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/etcdstore" diff --git a/backend/store/v2/interface.go b/backend/store/v2/interface.go index e66a57570a..c06128ff81 100644 --- a/backend/store/v2/interface.go +++ b/backend/store/v2/interface.go @@ -1,7 +1,7 @@ package v2 import ( - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/patch" ) diff --git a/backend/store/v2/resource.go b/backend/store/v2/resource.go index 18c2588572..418456fc6b 100644 --- a/backend/store/v2/resource.go +++ b/backend/store/v2/resource.go @@ -4,8 +4,8 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store/v2/wrap" ) diff --git a/backend/store/v2/resource_test.go b/backend/store/v2/resource_test.go index 5c1d7c978e..6a1536b528 100644 --- a/backend/store/v2/resource_test.go +++ b/backend/store/v2/resource_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) type testResource struct { diff --git a/backend/store/v2/wrap/wrapper.go b/backend/store/v2/wrap/wrapper.go index 9b47f8305f..1ce8d77b11 100644 --- a/backend/store/v2/wrap/wrapper.go +++ b/backend/store/v2/wrap/wrapper.go @@ -4,16 +4,18 @@ import ( "encoding/json" "errors" "fmt" + "path" "reflect" + "strings" //nolint:staticcheck // SA1004 Replacing this will take some planning. "github.com/golang/protobuf/proto" "github.com/golang/snappy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/store" - "github.com/sensu/sensu-go/types" ) //go:generate go run ../../../../scripts/check_protoc/main.go @@ -158,7 +160,7 @@ func wrapWithoutValidation(r interface{}, opts ...Option) (*Wrapper, error) { typ := reflect.Indirect(reflect.ValueOf(r)).Type() tm = corev2.TypeMeta{ Type: typ.Name(), - APIVersion: types.ApiVersion(typ.PkgPath()), + APIVersion: apiVersion(typ.PkgPath()), } } w := Wrapper{ @@ -220,7 +222,7 @@ func (w *Wrapper) Unwrap() (corev3.Resource, error) { // UnwrapRaw is like Unwrap, but returns a raw interface{} value. func (w *Wrapper) UnwrapRaw() (interface{}, error) { - resource, err := types.ResolveRaw(w.TypeMeta.APIVersion, w.TypeMeta.Type) + resource, err := apitools.Resolve(w.TypeMeta.APIVersion, w.TypeMeta.Type) if err != nil { return nil, err } @@ -323,3 +325,14 @@ func (l List) UnwrapInto(ptr interface{}) error { } return nil } + +func apiVersion(version string) string { + parts := strings.Split(version, "/") + if len(parts) == 0 { + return "" + } + if len(parts) == 1 { + return parts[0] + } + return path.Join(parts[len(parts)-2], parts[len(parts)-1]) +} diff --git a/backend/store/v2/wrap/wrapper.pb.go b/backend/store/v2/wrap/wrapper.pb.go index 6dda66cf4e..67d14cd2b4 100644 --- a/backend/store/v2/wrap/wrapper.pb.go +++ b/backend/store/v2/wrap/wrapper.pb.go @@ -8,7 +8,7 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/golang/protobuf/proto" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" io "io" math "math" math_bits "math/bits" diff --git a/backend/store/v2/wrap/wrapper_test.go b/backend/store/v2/wrap/wrapper_test.go index d23bb7fd00..7948dec1c0 100644 --- a/backend/store/v2/wrap/wrapper_test.go +++ b/backend/store/v2/wrap/wrapper_test.go @@ -2,32 +2,22 @@ package wrap_test import ( "encoding/json" - fmt "fmt" "testing" //nolint:staticcheck // SA1004 Replacing this will take some planning. "github.com/golang/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/store/v2/wrap" - "github.com/sensu/sensu-go/types" ) func init() { - types.RegisterResolver("wrap_test/v2", testResolver) - types.RegisterResolver("v2/wrap_test", testResolver) -} - -func testResolver(name string) (interface{}, error) { - switch name { - case "testResource": - return &testResource{}, nil - case "testResource2": - return &testResource2{}, nil - default: - return nil, fmt.Errorf("invalid resource: %s", name) - } + apitools.RegisterType("wrap_test/v2", new(testResource)) + apitools.RegisterType("wrap_test/v2", new(testResource2)) + apitools.RegisterType("v2/wrap_test", new(testResource)) + apitools.RegisterType("v2/wrap_test", new(testResource2)) } type testResource struct { diff --git a/backend/tessend/data.go b/backend/tessend/data.go index e8b586c7f6..fa1348a7e2 100644 --- a/backend/tessend/data.go +++ b/backend/tessend/data.go @@ -1,7 +1,7 @@ package tessend import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/backend/tessend/tessend.go b/backend/tessend/tessend.go index 058bea8c33..6be727d592 100644 --- a/backend/tessend/tessend.go +++ b/backend/tessend/tessend.go @@ -15,7 +15,7 @@ import ( "github.com/google/uuid" dto "github.com/prometheus/client_model/go" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/eventd" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" diff --git a/backend/tessend/tessend_test.go b/backend/tessend/tessend_test.go index b93b8de20c..49d3c761e7 100644 --- a/backend/tessend/tessend_test.go +++ b/backend/tessend/tessend_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" diff --git a/bonsai/bonsai.go b/bonsai/bonsai.go index fc8692d405..158fbc3e73 100644 --- a/bonsai/bonsai.go +++ b/bonsai/bonsai.go @@ -7,7 +7,7 @@ import ( "strings" goversion "github.com/hashicorp/go-version" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/cli/cli.go b/cli/cli.go index 6cd61afb21..dd5c502839 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -4,7 +4,7 @@ import ( "crypto/tls" "os" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/client/config" "github.com/sensu/sensu-go/cli/client/config/basic" diff --git a/cli/client/apikey.go b/cli/client/apikey.go index 6fde3b6a4e..8caa084b62 100644 --- a/cli/client/apikey.go +++ b/cli/client/apikey.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // PostAPIKey sends a POST request with obj as the payload to the given path diff --git a/cli/client/apikey_test.go b/cli/client/apikey_test.go index 7ae464eb13..5c6322c399 100644 --- a/cli/client/apikey_test.go +++ b/cli/client/apikey_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/go-resty/resty/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli/client/config" "github.com/stretchr/testify/assert" ) diff --git a/cli/client/asset.go b/cli/client/asset.go index 49965a28e8..58aefad9cb 100644 --- a/cli/client/asset.go +++ b/cli/client/asset.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // AssetsPath is the api path for assets. diff --git a/cli/client/authentication.go b/cli/client/authentication.go index 8b0917588c..f045416b0e 100644 --- a/cli/client/authentication.go +++ b/cli/client/authentication.go @@ -7,7 +7,7 @@ import ( "github.com/go-resty/resty/v2" jwt "github.com/golang-jwt/jwt/v4" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateAccessToken returns a new access token given userid and password diff --git a/cli/client/authentication_test.go b/cli/client/authentication_test.go index 915d6b7ed6..5c83bc70a1 100644 --- a/cli/client/authentication_test.go +++ b/cli/client/authentication_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/go-resty/resty/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli/client/config" "github.com/stretchr/testify/assert" ) diff --git a/cli/client/check.go b/cli/client/check.go index 0453ca908e..3f9b51e912 100644 --- a/cli/client/check.go +++ b/cli/client/check.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // ChecksPath is the api path for checks. diff --git a/cli/client/clusterrole.go b/cli/client/clusterrole.go index 1e358f8c06..bee45c225f 100644 --- a/cli/client/clusterrole.go +++ b/cli/client/clusterrole.go @@ -1,7 +1,7 @@ package client import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // ClusterRolesPath is the api path for cluster roles. diff --git a/cli/client/clusterrolebinding.go b/cli/client/clusterrolebinding.go index 7a01ed9ac2..21bc1a9197 100644 --- a/cli/client/clusterrolebinding.go +++ b/cli/client/clusterrolebinding.go @@ -1,7 +1,7 @@ package client import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // ClusterRoleBindingsPath is the api path for cluster role bindings. diff --git a/cli/client/config/mock.go b/cli/client/config/mock.go index 6225944759..21360f75e7 100644 --- a/cli/client/config/mock.go +++ b/cli/client/config/mock.go @@ -3,7 +3,7 @@ package config import ( "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/cli/client/entity.go b/cli/client/entity.go index b38c66e695..7f36f66cea 100644 --- a/cli/client/entity.go +++ b/cli/client/entity.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // EntitiesPath is the api path for entities. diff --git a/cli/client/event.go b/cli/client/event.go index f453ba9411..a6f1da16bf 100644 --- a/cli/client/event.go +++ b/cli/client/event.go @@ -4,7 +4,7 @@ import ( "encoding/json" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // EventsPath is the api path for events. diff --git a/cli/client/filter.go b/cli/client/filter.go index 5a5c1edd22..b9fa609997 100644 --- a/cli/client/filter.go +++ b/cli/client/filter.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // FiltersPath is the api path for filters. diff --git a/cli/client/generic.go b/cli/client/generic.go index c50180e671..b34a1a7c4b 100644 --- a/cli/client/generic.go +++ b/cli/client/generic.go @@ -7,8 +7,8 @@ import ( "reflect" "github.com/go-resty/resty/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/types" ) diff --git a/cli/client/handler.go b/cli/client/handler.go index 0adb147269..c9bdfd7555 100644 --- a/cli/client/handler.go +++ b/cli/client/handler.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // HandlersPath is the api path for handlers. diff --git a/cli/client/health.go b/cli/client/health.go index c3ee619034..ba277a45fd 100644 --- a/cli/client/health.go +++ b/cli/client/health.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const healthPath = "/health" diff --git a/cli/client/hook.go b/cli/client/hook.go index 896d597411..e9e5782a67 100644 --- a/cli/client/hook.go +++ b/cli/client/hook.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // HooksPath is the api path for hooks. diff --git a/cli/client/interface.go b/cli/client/interface.go index 836c28d378..53063c2609 100644 --- a/cli/client/interface.go +++ b/cli/client/interface.go @@ -4,7 +4,7 @@ import ( "net/http" "github.com/go-resty/resty/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" clientv3 "go.etcd.io/etcd/client/v3" ) diff --git a/cli/client/mutator.go b/cli/client/mutator.go index 77bf415e59..57ce989898 100644 --- a/cli/client/mutator.go +++ b/cli/client/mutator.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // MutatorsPath is the api path for mutators. diff --git a/cli/client/namespace.go b/cli/client/namespace.go index 2ac06611fc..ca986d03ac 100644 --- a/cli/client/namespace.go +++ b/cli/client/namespace.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // NamespacesPath is the api path for namespaces. diff --git a/cli/client/pipeline.go b/cli/client/pipeline.go index 2610704753..83f6a745b1 100644 --- a/cli/client/pipeline.go +++ b/cli/client/pipeline.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // PipelinesPath is the api path for pipelines. diff --git a/cli/client/role.go b/cli/client/role.go index f7eb20a777..2cc24a2566 100644 --- a/cli/client/role.go +++ b/cli/client/role.go @@ -1,7 +1,7 @@ package client import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // RolesPath is the api path for roles. diff --git a/cli/client/rolebinding.go b/cli/client/rolebinding.go index d759c80851..4aeb1522d1 100644 --- a/cli/client/rolebinding.go +++ b/cli/client/rolebinding.go @@ -1,7 +1,7 @@ package client import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // RoleBindingsPath is the api path for role bindings. diff --git a/cli/client/silenced.go b/cli/client/silenced.go index 0e2d1052c9..6a045bd917 100644 --- a/cli/client/silenced.go +++ b/cli/client/silenced.go @@ -4,7 +4,7 @@ import ( "encoding/json" "net/http" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) var silencedPath = createNSBasePath(coreAPIGroup, coreAPIVersion, "silenced") diff --git a/cli/client/testing/mock_asset_client.go b/cli/client/testing/mock_asset_client.go index be7b2c1247..17f545781f 100644 --- a/cli/client/testing/mock_asset_client.go +++ b/cli/client/testing/mock_asset_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // FetchAsset for use with mock lib diff --git a/cli/client/testing/mock_authentication_client.go b/cli/client/testing/mock_authentication_client.go index 163cce0c09..7a9ac5b929 100644 --- a/cli/client/testing/mock_authentication_client.go +++ b/cli/client/testing/mock_authentication_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateAccessToken for use with mock lib diff --git a/cli/client/testing/mock_check_client.go b/cli/client/testing/mock_check_client.go index 7a3312d7d5..3aa3949e11 100644 --- a/cli/client/testing/mock_check_client.go +++ b/cli/client/testing/mock_check_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateCheck for use with mock lib diff --git a/cli/client/testing/mock_clusterrole_client.go b/cli/client/testing/mock_clusterrole_client.go index 661d81415a..ab5df935be 100644 --- a/cli/client/testing/mock_clusterrole_client.go +++ b/cli/client/testing/mock_clusterrole_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateClusterRole ... diff --git a/cli/client/testing/mock_clusterrolebinding_client.go b/cli/client/testing/mock_clusterrolebinding_client.go index 83e3abc66b..b60cffdf4c 100644 --- a/cli/client/testing/mock_clusterrolebinding_client.go +++ b/cli/client/testing/mock_clusterrolebinding_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateClusterRoleBinding ... diff --git a/cli/client/testing/mock_entity_client.go b/cli/client/testing/mock_entity_client.go index 951fc44a74..dcb8ace722 100644 --- a/cli/client/testing/mock_entity_client.go +++ b/cli/client/testing/mock_entity_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // FetchEntity for use with mock lib diff --git a/cli/client/testing/mock_event_client.go b/cli/client/testing/mock_event_client.go index bbab085fdf..c3ca2f66cf 100644 --- a/cli/client/testing/mock_event_client.go +++ b/cli/client/testing/mock_event_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // FetchEvent for use with mock lib diff --git a/cli/client/testing/mock_filter_client.go b/cli/client/testing/mock_filter_client.go index 3fb381d3cf..6ce56eb6f7 100644 --- a/cli/client/testing/mock_filter_client.go +++ b/cli/client/testing/mock_filter_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateFilter for use with mock lib diff --git a/cli/client/testing/mock_handler_client.go b/cli/client/testing/mock_handler_client.go index 85824a9329..a833bd44e6 100644 --- a/cli/client/testing/mock_handler_client.go +++ b/cli/client/testing/mock_handler_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateHandler for use with mock package diff --git a/cli/client/testing/mock_hook_client.go b/cli/client/testing/mock_hook_client.go index 7bfafd2d04..295ad82d77 100644 --- a/cli/client/testing/mock_hook_client.go +++ b/cli/client/testing/mock_hook_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateHook for use with mock lib diff --git a/cli/client/testing/mock_mutator_client.go b/cli/client/testing/mock_mutator_client.go index 1a4e4a22b3..4faa3771a4 100644 --- a/cli/client/testing/mock_mutator_client.go +++ b/cli/client/testing/mock_mutator_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateMutator for use with mock package diff --git a/cli/client/testing/mock_namespace_client.go b/cli/client/testing/mock_namespace_client.go index b663335eef..2e81140150 100644 --- a/cli/client/testing/mock_namespace_client.go +++ b/cli/client/testing/mock_namespace_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateNamespace for use with mock lib diff --git a/cli/client/testing/mock_pipeline_client.go b/cli/client/testing/mock_pipeline_client.go index 90bf677ddd..ccce6b13df 100644 --- a/cli/client/testing/mock_pipeline_client.go +++ b/cli/client/testing/mock_pipeline_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // FetchPipeline for use with mock lib diff --git a/cli/client/testing/mock_role_client.go b/cli/client/testing/mock_role_client.go index 83fa1a4af5..131a31d858 100644 --- a/cli/client/testing/mock_role_client.go +++ b/cli/client/testing/mock_role_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateRole ... diff --git a/cli/client/testing/mock_rolebinding_client.go b/cli/client/testing/mock_rolebinding_client.go index 17f43708f8..c321beac9b 100644 --- a/cli/client/testing/mock_rolebinding_client.go +++ b/cli/client/testing/mock_rolebinding_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateRoleBinding ... diff --git a/cli/client/testing/mock_silenced_client.go b/cli/client/testing/mock_silenced_client.go index 5a9d35eaf1..d9de3c455c 100644 --- a/cli/client/testing/mock_silenced_client.go +++ b/cli/client/testing/mock_silenced_client.go @@ -6,7 +6,7 @@ import ( "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/types" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateSilenced for use with mock lib diff --git a/cli/client/testing/mock_user_client.go b/cli/client/testing/mock_user_client.go index 34b7abf02f..63f094df7b 100644 --- a/cli/client/testing/mock_user_client.go +++ b/cli/client/testing/mock_user_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // AddGroupToUser for use with mock lib diff --git a/cli/client/user.go b/cli/client/user.go index 67ce8dabf8..acbe6a656b 100644 --- a/cli/client/user.go +++ b/cli/client/user.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // UsersPath is the api path for users. diff --git a/cli/cmdmanager/manager.go b/cli/cmdmanager/manager.go index 49bd474b9e..386cb1c6aa 100644 --- a/cli/cmdmanager/manager.go +++ b/cli/cmdmanager/manager.go @@ -21,7 +21,7 @@ import ( sensupath "github.com/sensu/sensu-go/util/path" goversion "github.com/hashicorp/go-version" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" bolt "go.etcd.io/bbolt" ) diff --git a/cli/cmdmanager/manager_test.go b/cli/cmdmanager/manager_test.go index e5f0bed1f3..355a4b2bf4 100644 --- a/cli/cmdmanager/manager_test.go +++ b/cli/cmdmanager/manager_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/bonsai" "github.com/sensu/sensu-go/testing/mockassetgetter" diff --git a/cli/commands/apikey/grant.go b/cli/commands/apikey/grant.go index 98c4e3ce8d..9ffc625150 100644 --- a/cli/commands/apikey/grant.go +++ b/cli/commands/apikey/grant.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) diff --git a/cli/commands/apikey/info.go b/cli/commands/apikey/info.go index fb04fd490e..086b7aadc8 100644 --- a/cli/commands/apikey/info.go +++ b/cli/commands/apikey/info.go @@ -6,7 +6,7 @@ import ( "io" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/cli/elements/list" diff --git a/cli/commands/apikey/info_test.go b/cli/commands/apikey/info_test.go index 8e9735a65b..f23015af61 100644 --- a/cli/commands/apikey/info_test.go +++ b/cli/commands/apikey/info_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" diff --git a/cli/commands/apikey/list.go b/cli/commands/apikey/list.go index d19495ffb7..c26dad1d50 100644 --- a/cli/commands/apikey/list.go +++ b/cli/commands/apikey/list.go @@ -5,7 +5,7 @@ import ( "io" "net/http" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/cli/commands/timeutil" diff --git a/cli/commands/apikey/list_test.go b/cli/commands/apikey/list_test.go index bcd60db5fc..e9b840d06b 100644 --- a/cli/commands/apikey/list_test.go +++ b/cli/commands/apikey/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/apikey/revoke.go b/cli/commands/apikey/revoke.go index 0f4579cb4b..131b81e836 100644 --- a/cli/commands/apikey/revoke.go +++ b/cli/commands/apikey/revoke.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/AlecAivazis/survey/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" diff --git a/cli/commands/asset/delete.go b/cli/commands/asset/delete.go index de0bf91332..ce2078c8dd 100644 --- a/cli/commands/asset/delete.go +++ b/cli/commands/asset/delete.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/AlecAivazis/survey/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" diff --git a/cli/commands/asset/list.go b/cli/commands/asset/list.go index fbe7abc49c..d976642234 100644 --- a/cli/commands/asset/list.go +++ b/cli/commands/asset/list.go @@ -8,7 +8,7 @@ import ( "net/url" "path" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/client/config" diff --git a/cli/commands/asset/list_test.go b/cli/commands/asset/list_test.go index 1ab9b508e3..d23dfc406a 100644 --- a/cli/commands/asset/list_test.go +++ b/cli/commands/asset/list_test.go @@ -6,7 +6,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/asset/outdated.go b/cli/commands/asset/outdated.go index d019c16ce4..9aeb8433e0 100644 --- a/cli/commands/asset/outdated.go +++ b/cli/commands/asset/outdated.go @@ -7,7 +7,7 @@ import ( "net/http" goversion "github.com/hashicorp/go-version" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/bonsai" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" diff --git a/cli/commands/asset/outdated_test.go b/cli/commands/asset/outdated_test.go index 5137281fbf..51c1c88b9d 100644 --- a/cli/commands/asset/outdated_test.go +++ b/cli/commands/asset/outdated_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/bonsai" cliClient "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/check/execute_test.go b/cli/commands/check/execute_test.go index 6398be665d..9ccc5444d9 100644 --- a/cli/commands/check/execute_test.go +++ b/cli/commands/check/execute_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" clientmock "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/check/list.go b/cli/commands/check/list.go index aec03212a7..000e5a6b09 100644 --- a/cli/commands/check/list.go +++ b/cli/commands/check/list.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/check/list_test.go b/cli/commands/check/list_test.go index 043c80f2a4..402d150ce3 100644 --- a/cli/commands/check/list_test.go +++ b/cli/commands/check/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/clusterrole/create.go b/cli/commands/clusterrole/create.go index 9eeb842578..1c0aeca08d 100644 --- a/cli/commands/clusterrole/create.go +++ b/cli/commands/clusterrole/create.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/types" diff --git a/cli/commands/clusterrole/list.go b/cli/commands/clusterrole/list.go index ec3cde6cda..1c0801b9f5 100644 --- a/cli/commands/clusterrole/list.go +++ b/cli/commands/clusterrole/list.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/clusterrole/list_test.go b/cli/commands/clusterrole/list_test.go index 12825e4fe2..92d6aa901f 100644 --- a/cli/commands/clusterrole/list_test.go +++ b/cli/commands/clusterrole/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/clusterrolebinding/create.go b/cli/commands/clusterrolebinding/create.go index 416e674a4e..d5ac973747 100644 --- a/cli/commands/clusterrolebinding/create.go +++ b/cli/commands/clusterrolebinding/create.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/types" diff --git a/cli/commands/clusterrolebinding/list.go b/cli/commands/clusterrolebinding/list.go index ea5dda59d6..1a6f1886b6 100644 --- a/cli/commands/clusterrolebinding/list.go +++ b/cli/commands/clusterrolebinding/list.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/clusterrolebinding/list_test.go b/cli/commands/clusterrolebinding/list_test.go index 8b63ec4872..c20cf47c09 100644 --- a/cli/commands/clusterrolebinding/list_test.go +++ b/cli/commands/clusterrolebinding/list_test.go @@ -4,7 +4,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/command/list.go b/cli/commands/command/list.go index 3dde4ffc61..87d6aa6895 100644 --- a/cli/commands/command/list.go +++ b/cli/commands/command/list.go @@ -8,7 +8,7 @@ import ( "net/url" "path" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/cmdmanager" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/config/view_test.go b/cli/commands/config/view_test.go index 12ed9082bf..1d21b8eba0 100644 --- a/cli/commands/config/view_test.go +++ b/cli/commands/config/view_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" clienttest "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" diff --git a/cli/commands/describetype/describe_type.go b/cli/commands/describetype/describe_type.go index 4b54a36b23..c6b79cab27 100644 --- a/cli/commands/describetype/describe_type.go +++ b/cli/commands/describetype/describe_type.go @@ -6,7 +6,7 @@ import ( "io" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client/config" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/dump/dump.go b/cli/commands/dump/dump.go index c415ef7ffb..bd1b03efb0 100644 --- a/cli/commands/dump/dump.go +++ b/cli/commands/dump/dump.go @@ -8,8 +8,8 @@ import ( "os" "reflect" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" diff --git a/cli/commands/edit/edit.go b/cli/commands/edit/edit.go index 7fa6afe6e6..be8387059a 100644 --- a/cli/commands/edit/edit.go +++ b/cli/commands/edit/edit.go @@ -14,7 +14,7 @@ import ( "runtime" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client/config" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/edit/edit_test.go b/cli/commands/edit/edit_test.go index 42bfa586f2..13e83c752e 100644 --- a/cli/commands/edit/edit_test.go +++ b/cli/commands/edit/edit_test.go @@ -7,7 +7,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "gopkg.in/yaml.v2" ) diff --git a/cli/commands/entity/create.go b/cli/commands/entity/create.go index ee2388bb34..859744ca39 100644 --- a/cli/commands/entity/create.go +++ b/cli/commands/entity/create.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/entity/list.go b/cli/commands/entity/list.go index 526d90a4a4..ae5a1c8e26 100644 --- a/cli/commands/entity/list.go +++ b/cli/commands/entity/list.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/entity/list_test.go b/cli/commands/entity/list_test.go index 464b6d3dc0..1fcf164a2e 100644 --- a/cli/commands/entity/list_test.go +++ b/cli/commands/entity/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/env/env_test.go b/cli/commands/env/env_test.go index 651b202821..b582767909 100644 --- a/cli/commands/env/env_test.go +++ b/cli/commands/env/env_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" mockclient "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" diff --git a/cli/commands/event/list.go b/cli/commands/event/list.go index e3ece0d61a..5ab4d5bda8 100644 --- a/cli/commands/event/list.go +++ b/cli/commands/event/list.go @@ -8,7 +8,7 @@ import ( "time" "github.com/google/uuid" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/event/list_test.go b/cli/commands/event/list_test.go index d385c6273f..9ad8e04225 100644 --- a/cli/commands/event/list_test.go +++ b/cli/commands/event/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/filter/list.go b/cli/commands/filter/list.go index fa8ec7a38f..51bd688534 100644 --- a/cli/commands/filter/list.go +++ b/cli/commands/filter/list.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/filter/list_test.go b/cli/commands/filter/list_test.go index a978944d4d..399b03abf9 100644 --- a/cli/commands/filter/list_test.go +++ b/cli/commands/filter/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/handler/list.go b/cli/commands/handler/list.go index ba662160ad..f72e248e65 100644 --- a/cli/commands/handler/list.go +++ b/cli/commands/handler/list.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/handler/list_test.go b/cli/commands/handler/list_test.go index 9423612777..5e13e81a20 100644 --- a/cli/commands/handler/list_test.go +++ b/cli/commands/handler/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/helpers/user.go b/cli/commands/helpers/user.go index f73772ce14..58db00911c 100644 --- a/cli/commands/helpers/user.go +++ b/cli/commands/helpers/user.go @@ -2,7 +2,7 @@ package helpers import ( jwt "github.com/golang-jwt/jwt/v4" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli/client/config" ) diff --git a/cli/commands/hook/list.go b/cli/commands/hook/list.go index 89f354012b..3ac0dc6980 100644 --- a/cli/commands/hook/list.go +++ b/cli/commands/hook/list.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/hook/list_test.go b/cli/commands/hook/list_test.go index 1d8e3348ca..842358b0f9 100644 --- a/cli/commands/hook/list_test.go +++ b/cli/commands/hook/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/mutator/list.go b/cli/commands/mutator/list.go index 31648699e9..ebec3422ae 100644 --- a/cli/commands/mutator/list.go +++ b/cli/commands/mutator/list.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/mutator/list_test.go b/cli/commands/mutator/list_test.go index c06d92f7ee..d69e97e6ba 100644 --- a/cli/commands/mutator/list_test.go +++ b/cli/commands/mutator/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/namespace/list.go b/cli/commands/namespace/list.go index 92ae15b7ff..aea4957b23 100644 --- a/cli/commands/namespace/list.go +++ b/cli/commands/namespace/list.go @@ -5,7 +5,7 @@ import ( "io" "net/http" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/namespace/list_test.go b/cli/commands/namespace/list_test.go index fb8db17a53..6bc1ab6ad8 100644 --- a/cli/commands/namespace/list_test.go +++ b/cli/commands/namespace/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/pipeline/info.go b/cli/commands/pipeline/info.go index 2c397b0c32..24e20d84e4 100644 --- a/cli/commands/pipeline/info.go +++ b/cli/commands/pipeline/info.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/cli/elements/list" diff --git a/cli/commands/pipeline/info_test.go b/cli/commands/pipeline/info_test.go index 7a321fe506..d0add6d657 100644 --- a/cli/commands/pipeline/info_test.go +++ b/cli/commands/pipeline/info_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" diff --git a/cli/commands/pipeline/list.go b/cli/commands/pipeline/list.go index 196d772b8c..9169295142 100644 --- a/cli/commands/pipeline/list.go +++ b/cli/commands/pipeline/list.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/pipeline/list_test.go b/cli/commands/pipeline/list_test.go index cf38fe905f..5d29c039f7 100644 --- a/cli/commands/pipeline/list_test.go +++ b/cli/commands/pipeline/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/role/create.go b/cli/commands/role/create.go index 2e8f5d80db..475a890e4f 100644 --- a/cli/commands/role/create.go +++ b/cli/commands/role/create.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" diff --git a/cli/commands/role/list.go b/cli/commands/role/list.go index ef4f1b9709..568a836656 100644 --- a/cli/commands/role/list.go +++ b/cli/commands/role/list.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/role/list_test.go b/cli/commands/role/list_test.go index b7b8ed2e4f..4a05e6dbd5 100644 --- a/cli/commands/role/list_test.go +++ b/cli/commands/role/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/rolebinding/create.go b/cli/commands/rolebinding/create.go index 3ac0873f5a..1c762eec45 100644 --- a/cli/commands/rolebinding/create.go +++ b/cli/commands/rolebinding/create.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" diff --git a/cli/commands/rolebinding/list.go b/cli/commands/rolebinding/list.go index bb89d3b297..b61f1bea93 100644 --- a/cli/commands/rolebinding/list.go +++ b/cli/commands/rolebinding/list.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/rolebinding/list_test.go b/cli/commands/rolebinding/list_test.go index 3c8832832e..949077b9f2 100644 --- a/cli/commands/rolebinding/list_test.go +++ b/cli/commands/rolebinding/list_test.go @@ -4,7 +4,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/silenced/list.go b/cli/commands/silenced/list.go index 54dfa6dd6d..0d8a1ff5dd 100644 --- a/cli/commands/silenced/list.go +++ b/cli/commands/silenced/list.go @@ -7,7 +7,7 @@ import ( "net/http" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/silenced/list_test.go b/cli/commands/silenced/list_test.go index dcf08312bd..f3f8f86943 100644 --- a/cli/commands/silenced/list_test.go +++ b/cli/commands/silenced/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/tessen/info.go b/cli/commands/tessen/info.go index a75f2aefd3..eb660c0dff 100644 --- a/cli/commands/tessen/info.go +++ b/cli/commands/tessen/info.go @@ -6,7 +6,7 @@ import ( "io" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/cli/elements/list" diff --git a/cli/commands/tessen/info_test.go b/cli/commands/tessen/info_test.go index 78b31d24a8..8fe81293e1 100644 --- a/cli/commands/tessen/info_test.go +++ b/cli/commands/tessen/info_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" diff --git a/cli/commands/tessen/opt_in.go b/cli/commands/tessen/opt_in.go index 47dc2b4443..1d6765e03d 100644 --- a/cli/commands/tessen/opt_in.go +++ b/cli/commands/tessen/opt_in.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) diff --git a/cli/commands/tessen/opt_out.go b/cli/commands/tessen/opt_out.go index 0f1e41012d..5f43acf29a 100644 --- a/cli/commands/tessen/opt_out.go +++ b/cli/commands/tessen/opt_out.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" diff --git a/cli/commands/user/change_password_test.go b/cli/commands/user/change_password_test.go index dfceccab50..f13a7f68b5 100644 --- a/cli/commands/user/change_password_test.go +++ b/cli/commands/user/change_password_test.go @@ -3,7 +3,7 @@ package user import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/user/list.go b/cli/commands/user/list.go index 2f7f69d4ce..fcc45652c6 100644 --- a/cli/commands/user/list.go +++ b/cli/commands/user/list.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/user/list_test.go b/cli/commands/user/list_test.go index f7543cd399..3c657a1a57 100644 --- a/cli/commands/user/list_test.go +++ b/cli/commands/user/list_test.go @@ -6,7 +6,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/resource/parse.go b/cli/resource/parse.go index edc91dac30..92d5d290f9 100644 --- a/cli/resource/parse.go +++ b/cli/resource/parse.go @@ -12,7 +12,8 @@ import ( "strings" "github.com/ghodss/yaml" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" ) @@ -94,7 +95,7 @@ func stripWrapperAndMaybeWarn(dec *json.Decoder, wrapper *types.Wrapper, count i if msg == nil { return } - resource, err := types.ResolveRaw(wrapper.APIVersion, wrapper.Type) + resource, err := apitools.Resolve(wrapper.APIVersion, wrapper.Type) if err != nil { return } diff --git a/cli/resource/parse_test.go b/cli/resource/parse_test.go index 70fe808dc6..83ca7d4e35 100644 --- a/cli/resource/parse_test.go +++ b/cli/resource/parse_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/go-test/deep" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" ) diff --git a/cli/resource/process.go b/cli/resource/process.go index 7cc6279849..9c06e0019e 100644 --- a/cli/resource/process.go +++ b/cli/resource/process.go @@ -12,7 +12,7 @@ import ( "path/filepath" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/types" diff --git a/cli/resource/process_test.go b/cli/resource/process_test.go index f10f1c4280..2168f6fd90 100644 --- a/cli/resource/process_test.go +++ b/cli/resource/process_test.go @@ -11,7 +11,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" "github.com/stretchr/testify/assert" diff --git a/cli/resource/resolve.go b/cli/resource/resolve.go index 20c3e8947f..e1ec0fb1c7 100644 --- a/cli/resource/resolve.go +++ b/cli/resource/resolve.go @@ -6,7 +6,8 @@ import ( "regexp" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" ) @@ -65,7 +66,7 @@ func Resolve(resource string) (corev2.Resource, error) { if apiVersion == "" { apiVersion = "core/v2" } - value, err := types.ResolveRaw(apiVersion, typeName) + value, err := apitools.Resolve(apiVersion, typeName) if err != nil { return nil, err } diff --git a/go.mod b/go.mod index e94b7b5435..48a05ca070 100644 --- a/go.mod +++ b/go.mod @@ -17,10 +17,10 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/go-resty/resty/v2 v2.5.0 github.com/gogo/protobuf v1.3.2 - github.com/golang-jwt/jwt/v4 v4.0.0 + github.com/golang-jwt/jwt/v4 v4.4.2 github.com/golang/protobuf v1.5.2 github.com/golang/snappy v0.0.4 - github.com/google/uuid v1.1.2 + github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.4.2 github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c @@ -44,19 +44,15 @@ require ( github.com/prometheus/client_golang v1.11.1 github.com/prometheus/client_model v0.2.0 github.com/prometheus/common v0.26.0 - github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff + github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 - github.com/sensu/sensu-go/api/core/v2 v2.16.0 - github.com/sensu/sensu-go/api/core/v3 v3.8.0 - github.com/sensu/sensu-go/types v0.11.0 github.com/shirou/gopsutil/v3 v3.21.12 - github.com/sirupsen/logrus v1.7.0 + github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.0 - github.com/stretchr/objx v0.2.0 // indirect - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.8.0 github.com/ulikunitz/xz v0.5.10 // indirect github.com/willf/pad v0.0.0-20160331131008-b3d780601022 go.etcd.io/bbolt v1.3.6 @@ -69,7 +65,7 @@ require ( go.uber.org/zap v1.17.0 golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 - golang.org/x/sys v0.0.0-20211013075003-97ac67df715c + golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba google.golang.org/grpc v1.41.0 gopkg.in/h2non/filetype.v1 v1.0.3 @@ -81,6 +77,10 @@ require ( github.com/go-test/deep v1.0.8 github.com/google/go-cmp v0.5.8 // indirect github.com/kr/pty v1.1.8 // indirect + github.com/sensu/core/v2 v2.16.0-alpha6 + github.com/sensu/core/v3 v3.8.0-alpha6 + github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 + github.com/sensu/sensu-go/types v0.12.0-alpha6 golang.org/x/text v0.3.7 // indirect ) diff --git a/go.sum b/go.sum index 5a4c3407d3..eae22096a0 100644 --- a/go.sum +++ b/go.sum @@ -54,6 +54,8 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -141,8 +143,8 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -188,8 +190,9 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= @@ -385,8 +388,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff h1:+6NUiITWwE5q1KO6SAfUX918c+Tab0+tGAM/mtdlUyA= -github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= +github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 h1:AFhmAXZqMm6PgNkco+BTBk//EQS8NLE1YLc2EO3bcLE= +github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52/go.mod h1:/mK7FZ3mFYEn9zvNPhpngTyatyehSwte5bJZ4ehL5Xw= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -396,27 +399,26 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= +github.com/sensu/core/v2 v2.16.0-alpha6 h1:6WTEevm2tQEgCx50IL4aXomAXQip7s6kX4xR3uNVYlI= +github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= +github.com/sensu/core/v3 v3.8.0-alpha6 h1:ywO14aIHippeIAe2HBHrPhSdyBMs1pQtjvkYaHmEwGw= +github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= -github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= -github.com/sensu/sensu-go/api/core/v2 v2.15.0/go.mod h1:QxGKxqQv4rpweFrR4Jkp1tas3amGzAy0wO0fUwq0suU= -github.com/sensu/sensu-go/api/core/v2 v2.16.0 h1:HOq4rFkQ1S5ZjxmMTLc5J5mAbECrnKWvtXXbMqr3j9s= -github.com/sensu/sensu-go/api/core/v2 v2.16.0/go.mod h1:MjM7+MCGEyTAgaZ589SiGHwYiaYF7N/58dU0J070u/0= -github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.8.0 h1:IlHqv/2Yu6dUp2+M1dwxmZu8cJmZ/TMiOhbWMIWCI2o= -github.com/sensu/sensu-go/api/core/v3 v3.8.0/go.mod h1:/elCzc+L10QXYVJeiHnZjCJVWkxSrdSlIxd30hsa7MQ= -github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= -github.com/sensu/sensu-go/types v0.11.0 h1:jsVa/apRaJJEdk0Jl7ZUksiBkuEAjCZd/gSBWlrptJA= -github.com/sensu/sensu-go/types v0.11.0/go.mod h1:fhgW3xlvkPFMZiT0IppHySeyN61ZTIKevgSPFSoaQEk= +github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= +github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= +github.com/sensu/sensu-go/types v0.12.0-alpha6 h1:tPuPysl6Ew0x0u5USLeSk/3NMMt7GLJh2uO1kVFRwQY= +github.com/sensu/sensu-go/types v0.12.0-alpha6/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= @@ -440,16 +442,17 @@ github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= @@ -476,8 +479,6 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= @@ -636,8 +637,9 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211013075003-97ac67df715c h1:taxlMj0D/1sOAuv/CbSD+MMDof2vbyPTqz5FNYKpXt8= golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210503060354-a79de5458b56 h1:b8jxX3zqjpqb2LklXPzKSGJhzyxCOZSz8ncv8Nv+y7w= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= @@ -747,6 +749,7 @@ gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/readline.v1 v1.0.0-20160726135117-62c6fe619375/go.mod h1:lNEQeAhU009zbRxng+XOj5ITVgY24WcbNnQopyfKoYQ= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= @@ -762,8 +765,9 @@ 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= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/js/js_bench_test.go b/js/js_bench_test.go index 0468d3750b..ca71f325f4 100644 --- a/js/js_bench_test.go +++ b/js/js_bench_test.go @@ -3,7 +3,7 @@ package js_test import ( "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/js" "github.com/sensu/sensu-go/types/dynamic" ) diff --git a/js/js_test.go b/js/js_test.go index bd7b665a55..6e5e04b9fb 100644 --- a/js/js_test.go +++ b/js/js_test.go @@ -3,7 +3,7 @@ package js import ( "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types/dynamic" "github.com/stretchr/testify/assert" ) diff --git a/process/process.go b/process/process.go index 11863d1518..458ac46f77 100644 --- a/process/process.go +++ b/process/process.go @@ -3,7 +3,7 @@ package process import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // A Getter is responsible for getting the process info of an agent. diff --git a/system/system.go b/system/system.go index 572766776f..41e72beb09 100644 --- a/system/system.go +++ b/system/system.go @@ -15,7 +15,7 @@ import ( "strings" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" "github.com/shirou/gopsutil/v3/host" shirounet "github.com/shirou/gopsutil/v3/net" diff --git a/testing/fixture/resource.go b/testing/fixture/resource.go index d24d0f8e71..d995a2d9b5 100644 --- a/testing/fixture/resource.go +++ b/testing/fixture/resource.go @@ -3,7 +3,7 @@ package fixture import ( "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // GetObjectMeta ... diff --git a/testing/fixture/resource.pb.go b/testing/fixture/resource.pb.go index 7f1cbe141a..7e6f10d07f 100644 --- a/testing/fixture/resource.pb.go +++ b/testing/fixture/resource.pb.go @@ -7,7 +7,7 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" -import v2 "github.com/sensu/sensu-go/api/core/v2" +import v2 "github.com/sensu/core/v2" import bytes "bytes" diff --git a/testing/fixture/resourcepb_test.go b/testing/fixture/resourcepb_test.go index 34c38a2e0e..cedf452b4e 100644 --- a/testing/fixture/resourcepb_test.go +++ b/testing/fixture/resourcepb_test.go @@ -12,7 +12,7 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/sensu/sensu-go/api/core/v2" +import _ "github.com/sensu/core/v2" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/testing/fixture/v3resource.go b/testing/fixture/v3resource.go index 181c9b596a..2ec1c8f44b 100644 --- a/testing/fixture/v3resource.go +++ b/testing/fixture/v3resource.go @@ -3,19 +3,12 @@ package fixture import ( "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" - "github.com/sensu/sensu-go/types" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" ) func init() { - types.RegisterResolver("testing/fixture", func(name string) (interface{}, error) { - switch name { - case "V3Resource", "v3_resource": - return new(V3Resource), nil - default: - return nil, fmt.Errorf("invalid resource: %s", name) - } - }) + apitools.RegisterType("testing/fixture", new(V3Resource), apitools.WithAlias("v3_resource")) } type V3Resource struct { diff --git a/testing/mockassetgetter/mockassetgetter.go b/testing/mockassetgetter/mockassetgetter.go index ffddf06860..db33c6eb2b 100644 --- a/testing/mockassetgetter/mockassetgetter.go +++ b/testing/mockassetgetter/mockassetgetter.go @@ -3,7 +3,7 @@ package mockassetgetter import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/stretchr/testify/mock" ) diff --git a/testing/mockpipeline/filter.go b/testing/mockpipeline/filter.go index 31267d915f..a4576a50e8 100644 --- a/testing/mockpipeline/filter.go +++ b/testing/mockpipeline/filter.go @@ -3,7 +3,7 @@ package mockpipeline import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/testing/mockpipeline/handler.go b/testing/mockpipeline/handler.go index 947d6567c5..b3c2a763cc 100644 --- a/testing/mockpipeline/handler.go +++ b/testing/mockpipeline/handler.go @@ -3,7 +3,7 @@ package mockpipeline import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/testing/mockpipeline/mutator.go b/testing/mockpipeline/mutator.go index 0bac65e7b1..c0de02baf6 100644 --- a/testing/mockpipeline/mutator.go +++ b/testing/mockpipeline/mutator.go @@ -3,7 +3,7 @@ package mockpipeline import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/testing/mocksecrets/providermanager.go b/testing/mocksecrets/providermanager.go index 818d154b68..79b69d3f9d 100644 --- a/testing/mocksecrets/providermanager.go +++ b/testing/mocksecrets/providermanager.go @@ -3,7 +3,7 @@ package mocksecrets import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/secrets" "github.com/stretchr/testify/mock" ) diff --git a/testing/mockstore/events.go b/testing/mockstore/events.go index 543d3b6db3..73b443a29c 100644 --- a/testing/mockstore/events.go +++ b/testing/mockstore/events.go @@ -3,7 +3,7 @@ package mockstore import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/testing/mockstore/pipelines.go b/testing/mockstore/pipelines.go index bfc7802bd2..09c0cda94a 100644 --- a/testing/mockstore/pipelines.go +++ b/testing/mockstore/pipelines.go @@ -3,7 +3,7 @@ package mockstore import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/testing/mockstore/resource.go b/testing/mockstore/resource.go index 035fd3c1e6..b07330953d 100644 --- a/testing/mockstore/resource.go +++ b/testing/mockstore/resource.go @@ -3,7 +3,7 @@ package mockstore import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/patch" ) diff --git a/testing/mockstore/tessen.go b/testing/mockstore/tessen.go index afd7ba4a6d..9eb9664cf4 100644 --- a/testing/mockstore/tessen.go +++ b/testing/mockstore/tessen.go @@ -3,7 +3,7 @@ package mockstore import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/token/token.go b/token/token.go index 43103d82e5..d509a557b4 100644 --- a/token/token.go +++ b/token/token.go @@ -7,7 +7,7 @@ import ( "strings" "text/template" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types/dynamic" ) diff --git a/token/token_test.go b/token/token_test.go index 5418f2cb6b..52bee376f3 100644 --- a/token/token_test.go +++ b/token/token_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/testutil" "github.com/sensu/sensu-go/types/dynamic" "github.com/stretchr/testify/assert" From 5c1b32992ed6ca1727760f445197f51caa7a41e2 Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Wed, 30 Nov 2022 14:32:44 -0700 Subject: [PATCH 085/173] update changelog for 6.9.1 patch release Signed-off-by: Gustav Danielsson --- CHANGELOG-6.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 051afa9fb5..21a0c4f7aa 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [6.9.1] - 2022-12-01 + +### Changed +- Allow Graphql Middleware Init funcs to add to Context + ## [6.9.0] - 2022-11-01 ### Added From a864a74a27028f7cccdb7d5a2e0bb1573306354f Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Mon, 12 Dec 2022 12:25:44 -0800 Subject: [PATCH 086/173] Update Graphql Generation for sensu/core migration (#4923) * Update graphql type genration to use sensu/core Signed-off-by: Christian Kruse fix package name prefixing Signed-off-by: Christian Kruse * rerun graphql type generation Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse (cherry picked from commit c66ebffbcb7e8bd9f26c9e3a0fe181165d9b251d) --- backend/apid/graphql/schema/asset.gql.go | 1 - backend/apid/graphql/schema/check.gql.go | 5 -- backend/apid/graphql/schema/corev2.gen.gql.go | 17 ----- backend/apid/graphql/schema/corev2.gql.go | 1 - backend/apid/graphql/schema/corev3.gen.gql.go | 2 - backend/apid/graphql/schema/corev3.gql.go | 2 - backend/apid/graphql/schema/errors.gql.go | 1 - backend/apid/graphql/schema/event.gql.go | 2 - .../apid/graphql/schema/event_filter.gql.go | 2 - backend/apid/graphql/schema/handler.gql.go | 3 - backend/apid/graphql/schema/health.gql.go | 4 - backend/apid/graphql/schema/hook.gql.go | 3 - backend/apid/graphql/schema/meta.gql.go | 2 - backend/apid/graphql/schema/metrics.gql.go | 8 -- backend/apid/graphql/schema/mutations.gql.go | 8 -- backend/apid/graphql/schema/mutator.gql.go | 2 - backend/apid/graphql/schema/namespace.gql.go | 1 - backend/apid/graphql/schema/pagination.gql.go | 1 - backend/apid/graphql/schema/query.gql.go | 1 - backend/apid/graphql/schema/scalars.gql.go | 6 +- backend/apid/graphql/schema/schema_gen.go | 4 +- backend/apid/graphql/schema/silenced.gql.go | 2 - backend/apid/graphql/schema/suggest.gql.go | 1 - .../apid/graphql/schema/time_window.gql.go | 3 - backend/apid/graphql/schema/user.gql.go | 1 - backend/apid/graphql/schema/version.gql.go | 3 - backend/apid/graphql/schema/viewer.gql.go | 1 - go.mod | 9 ++- go.sum | 36 +++++++-- scripts/gen_gqltype/helper.go | 74 +++++++++++++++++++ scripts/gen_gqltype/main.go | 37 ++++++---- 31 files changed, 138 insertions(+), 105 deletions(-) create mode 100644 scripts/gen_gqltype/helper.go diff --git a/backend/apid/graphql/schema/asset.gql.go b/backend/apid/graphql/schema/asset.gql.go index cd3b5d0137..f4042c2865 100644 --- a/backend/apid/graphql/schema/asset.gql.go +++ b/backend/apid/graphql/schema/asset.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // AssetFieldResolvers represents a collection of methods whose products represent the // response values of the 'Asset' type. type AssetFieldResolvers interface { diff --git a/backend/apid/graphql/schema/check.gql.go b/backend/apid/graphql/schema/check.gql.go index c2b46a8026..984e7f9e80 100644 --- a/backend/apid/graphql/schema/check.gql.go +++ b/backend/apid/graphql/schema/check.gql.go @@ -10,7 +10,6 @@ import ( time "time" ) -// // CheckConfigFieldResolvers represents a collection of methods whose products represent the // response values of the 'CheckConfig' type. type CheckConfigFieldResolvers interface { @@ -908,7 +907,6 @@ type CheckOutputFieldResolverParams struct { Args CheckOutputFieldResolverArgs } -// // CheckFieldResolvers represents a collection of methods whose products represent the // response values of the 'Check' type. type CheckFieldResolvers interface { @@ -2184,7 +2182,6 @@ var _ObjectTypeCheckDesc = graphql.ObjectDesc{ }, } -// // CheckHistoryFieldResolvers represents a collection of methods whose products represent the // response values of the 'CheckHistory' type. type CheckHistoryFieldResolvers interface { @@ -2286,7 +2283,6 @@ var _ObjectTypeCheckHistoryDesc = graphql.ObjectDesc{ }, } -// // ProxyRequestsFieldResolvers represents a collection of methods whose products represent the // response values of the 'ProxyRequests' type. type ProxyRequestsFieldResolvers interface { @@ -2421,7 +2417,6 @@ var _ObjectTypeProxyRequestsDesc = graphql.ObjectDesc{ }, } -// // CheckConfigConnectionFieldResolvers represents a collection of methods whose products represent the // response values of the 'CheckConfigConnection' type. type CheckConfigConnectionFieldResolvers interface { diff --git a/backend/apid/graphql/schema/corev2.gen.gql.go b/backend/apid/graphql/schema/corev2.gen.gql.go index 1108faa126..90d2279cee 100644 --- a/backend/apid/graphql/schema/corev2.gen.gql.go +++ b/backend/apid/graphql/schema/corev2.gen.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // CoreV2AssetBuildFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2AssetBuild' type. type CoreV2AssetBuildFieldResolvers interface { @@ -179,7 +178,6 @@ var _ObjectTypeCoreV2AssetBuildDesc = graphql.ObjectDesc{ }, } -// // CoreV2ClusterRoleFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2ClusterRole' type. type CoreV2ClusterRoleFieldResolvers interface { @@ -274,7 +272,6 @@ var _ObjectTypeCoreV2ClusterRoleDesc = graphql.ObjectDesc{ }, } -// // CoreV2ClusterRoleBindingFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2ClusterRoleBinding' type. type CoreV2ClusterRoleBindingFieldResolvers interface { @@ -398,7 +395,6 @@ var _ObjectTypeCoreV2ClusterRoleBindingDesc = graphql.ObjectDesc{ }, } -// // CoreV2DeregistrationFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Deregistration' type. type CoreV2DeregistrationFieldResolvers interface { @@ -470,7 +466,6 @@ var _ObjectTypeCoreV2DeregistrationDesc = graphql.ObjectDesc{ FieldHandlers: map[string]graphql.FieldHandler{"handler": _ObjTypeCoreV2DeregistrationHandlerHandler}, } -// // CoreV2NetworkFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Network' type. type CoreV2NetworkFieldResolvers interface { @@ -539,7 +534,6 @@ var _ObjectTypeCoreV2NetworkDesc = graphql.ObjectDesc{ FieldHandlers: map[string]graphql.FieldHandler{"interfaces": _ObjTypeCoreV2NetworkInterfacesHandler}, } -// // CoreV2NetworkInterfaceFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2NetworkInterface' type. type CoreV2NetworkInterfaceFieldResolvers interface { @@ -684,7 +678,6 @@ var _ObjectTypeCoreV2NetworkInterfaceDesc = graphql.ObjectDesc{ }, } -// // CoreV2PipelineFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Pipeline' type. type CoreV2PipelineFieldResolvers interface { @@ -779,7 +772,6 @@ var _ObjectTypeCoreV2PipelineDesc = graphql.ObjectDesc{ }, } -// // CoreV2PipelineWorkflowFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2PipelineWorkflow' type. type CoreV2PipelineWorkflowFieldResolvers interface { @@ -936,7 +928,6 @@ var _ObjectTypeCoreV2PipelineWorkflowDesc = graphql.ObjectDesc{ }, } -// // CoreV2ProcessFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Process' type. type CoreV2ProcessFieldResolvers interface { @@ -1008,7 +999,6 @@ var _ObjectTypeCoreV2ProcessDesc = graphql.ObjectDesc{ FieldHandlers: map[string]graphql.FieldHandler{"name": _ObjTypeCoreV2ProcessNameHandler}, } -// // CoreV2ResourceReferenceFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2ResourceReference' type. type CoreV2ResourceReferenceFieldResolvers interface { @@ -1150,7 +1140,6 @@ var _ObjectTypeCoreV2ResourceReferenceDesc = graphql.ObjectDesc{ }, } -// // CoreV2RoleFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Role' type. type CoreV2RoleFieldResolvers interface { @@ -1245,7 +1234,6 @@ var _ObjectTypeCoreV2RoleDesc = graphql.ObjectDesc{ }, } -// // CoreV2RoleBindingFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2RoleBinding' type. type CoreV2RoleBindingFieldResolvers interface { @@ -1369,7 +1357,6 @@ var _ObjectTypeCoreV2RoleBindingDesc = graphql.ObjectDesc{ }, } -// // CoreV2RoleRefFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2RoleRef' type. type CoreV2RoleRefFieldResolvers interface { @@ -1478,7 +1465,6 @@ var _ObjectTypeCoreV2RoleRefDesc = graphql.ObjectDesc{ }, } -// // CoreV2RuleFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Rule' type. type CoreV2RuleFieldResolvers interface { @@ -1620,7 +1606,6 @@ var _ObjectTypeCoreV2RuleDesc = graphql.ObjectDesc{ }, } -// // CoreV2SecretFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Secret' type. type CoreV2SecretFieldResolvers interface { @@ -1729,7 +1714,6 @@ var _ObjectTypeCoreV2SecretDesc = graphql.ObjectDesc{ }, } -// // CoreV2SubjectFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2Subject' type. type CoreV2SubjectFieldResolvers interface { @@ -1838,7 +1822,6 @@ var _ObjectTypeCoreV2SubjectDesc = graphql.ObjectDesc{ }, } -// // CoreV2SystemFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2System' type. type CoreV2SystemFieldResolvers interface { diff --git a/backend/apid/graphql/schema/corev2.gql.go b/backend/apid/graphql/schema/corev2.gql.go index 69b948e0e7..01fd8e8b59 100644 --- a/backend/apid/graphql/schema/corev2.gql.go +++ b/backend/apid/graphql/schema/corev2.gql.go @@ -7,7 +7,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // CoreV2PipelineExtensionOverridesFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV2PipelineExtensionOverrides' type. type CoreV2PipelineExtensionOverridesFieldResolvers interface { diff --git a/backend/apid/graphql/schema/corev3.gen.gql.go b/backend/apid/graphql/schema/corev3.gen.gql.go index 929e4b12c5..43c2fb02e7 100644 --- a/backend/apid/graphql/schema/corev3.gen.gql.go +++ b/backend/apid/graphql/schema/corev3.gen.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // CoreV3EntityConfigFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV3EntityConfig' type. type CoreV3EntityConfigFieldResolvers interface { @@ -301,7 +300,6 @@ var _ObjectTypeCoreV3EntityConfigDesc = graphql.ObjectDesc{ }, } -// // CoreV3EntityStateFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV3EntityState' type. type CoreV3EntityStateFieldResolvers interface { diff --git a/backend/apid/graphql/schema/corev3.gql.go b/backend/apid/graphql/schema/corev3.gql.go index d8e3fe2a4f..7ecb8f09e9 100644 --- a/backend/apid/graphql/schema/corev3.gql.go +++ b/backend/apid/graphql/schema/corev3.gql.go @@ -7,7 +7,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // CoreV3EntityConfigExtensionOverridesFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV3EntityConfigExtensionOverrides' type. type CoreV3EntityConfigExtensionOverridesFieldResolvers interface { @@ -116,7 +115,6 @@ var _ObjectExtensionTypeCoreV3EntityConfigExtensionOverridesDesc = graphql.Objec }, } -// // CoreV3EntityStateExtensionOverridesFieldResolvers represents a collection of methods whose products represent the // response values of the 'CoreV3EntityStateExtensionOverrides' type. type CoreV3EntityStateExtensionOverridesFieldResolvers interface { diff --git a/backend/apid/graphql/schema/errors.gql.go b/backend/apid/graphql/schema/errors.gql.go index f5c4ad45b1..c78d38ae39 100644 --- a/backend/apid/graphql/schema/errors.gql.go +++ b/backend/apid/graphql/schema/errors.gql.go @@ -52,7 +52,6 @@ func _InterfaceTypeErrorConfigFn() graphql1.InterfaceConfig { // describe Error's configuration; kept private to avoid unintentional tampering of configuration at runtime. var _InterfaceTypeErrorDesc = graphql.InterfaceDesc{Config: _InterfaceTypeErrorConfigFn} -// // StandardErrorFieldResolvers represents a collection of methods whose products represent the // response values of the 'StandardError' type. type StandardErrorFieldResolvers interface { diff --git a/backend/apid/graphql/schema/event.gql.go b/backend/apid/graphql/schema/event.gql.go index cbef039e82..7008604cfc 100644 --- a/backend/apid/graphql/schema/event.gql.go +++ b/backend/apid/graphql/schema/event.gql.go @@ -9,7 +9,6 @@ import ( time "time" ) -// // EventFieldResolvers represents a collection of methods whose products represent the // response values of the 'Event' type. type EventFieldResolvers interface { @@ -509,7 +508,6 @@ var _ObjectTypeEventDesc = graphql.ObjectDesc{ }, } -// // EventConnectionFieldResolvers represents a collection of methods whose products represent the // response values of the 'EventConnection' type. type EventConnectionFieldResolvers interface { diff --git a/backend/apid/graphql/schema/event_filter.gql.go b/backend/apid/graphql/schema/event_filter.gql.go index 61c9c27b90..3c9d4fc517 100644 --- a/backend/apid/graphql/schema/event_filter.gql.go +++ b/backend/apid/graphql/schema/event_filter.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // EventFilterFieldResolvers represents a collection of methods whose products represent the // response values of the 'EventFilter' type. type EventFilterFieldResolvers interface { @@ -344,7 +343,6 @@ type _EnumTypeEventFilterActionValues struct { DENY EventFilterAction } -// // EventFilterConnectionFieldResolvers represents a collection of methods whose products represent the // response values of the 'EventFilterConnection' type. type EventFilterConnectionFieldResolvers interface { diff --git a/backend/apid/graphql/schema/handler.gql.go b/backend/apid/graphql/schema/handler.gql.go index cd0e698238..57b13e73cb 100644 --- a/backend/apid/graphql/schema/handler.gql.go +++ b/backend/apid/graphql/schema/handler.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // HandlerFieldResolvers represents a collection of methods whose products represent the // response values of the 'Handler' type. type HandlerFieldResolvers interface { @@ -448,7 +447,6 @@ var _ObjectTypeHandlerDesc = graphql.ObjectDesc{ }, } -// // HandlerSocketFieldResolvers represents a collection of methods whose products represent the // response values of the 'HandlerSocket' type. type HandlerSocketFieldResolvers interface { @@ -557,7 +555,6 @@ var _ObjectTypeHandlerSocketDesc = graphql.ObjectDesc{ }, } -// // HandlerConnectionFieldResolvers represents a collection of methods whose products represent the // response values of the 'HandlerConnection' type. type HandlerConnectionFieldResolvers interface { diff --git a/backend/apid/graphql/schema/health.gql.go b/backend/apid/graphql/schema/health.gql.go index a24bf6d3a7..29ae9b6815 100644 --- a/backend/apid/graphql/schema/health.gql.go +++ b/backend/apid/graphql/schema/health.gql.go @@ -9,7 +9,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // EtcdClusterMemberHealthFieldResolvers represents a collection of methods whose products represent the // response values of the 'EtcdClusterMemberHealth' type. type EtcdClusterMemberHealthFieldResolvers interface { @@ -184,7 +183,6 @@ var _ObjectTypeEtcdClusterMemberHealthDesc = graphql.ObjectDesc{ }, } -// // EtcdClusterHealthFieldResolvers represents a collection of methods whose products represent the // response values of the 'EtcdClusterHealth' type. type EtcdClusterHealthFieldResolvers interface { @@ -279,7 +277,6 @@ var _ObjectTypeEtcdClusterHealthDesc = graphql.ObjectDesc{ }, } -// // EtcdAlarmMemberFieldResolvers represents a collection of methods whose products represent the // response values of the 'EtcdAlarmMember' type. type EtcdAlarmMemberFieldResolvers interface { @@ -454,7 +451,6 @@ type ClusterHealthEtcdFieldResolverParams struct { Args ClusterHealthEtcdFieldResolverArgs } -// // ClusterHealthFieldResolvers represents a collection of methods whose products represent the // response values of the 'ClusterHealth' type. type ClusterHealthFieldResolvers interface { diff --git a/backend/apid/graphql/schema/hook.gql.go b/backend/apid/graphql/schema/hook.gql.go index 92e563fddf..dbd2c9ede5 100644 --- a/backend/apid/graphql/schema/hook.gql.go +++ b/backend/apid/graphql/schema/hook.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // HookConfigFieldResolvers represents a collection of methods whose products represent the // response values of the 'HookConfig' type. type HookConfigFieldResolvers interface { @@ -304,7 +303,6 @@ var _ObjectTypeHookConfigDesc = graphql.ObjectDesc{ }, } -// // HookFieldResolvers represents a collection of methods whose products represent the // response values of the 'Hook' type. type HookFieldResolvers interface { @@ -541,7 +539,6 @@ var _ObjectTypeHookDesc = graphql.ObjectDesc{ }, } -// // HookListFieldResolvers represents a collection of methods whose products represent the // response values of the 'HookList' type. type HookListFieldResolvers interface { diff --git a/backend/apid/graphql/schema/meta.gql.go b/backend/apid/graphql/schema/meta.gql.go index 9076d83728..bc516da160 100644 --- a/backend/apid/graphql/schema/meta.gql.go +++ b/backend/apid/graphql/schema/meta.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // KVPairStringFieldResolvers represents a collection of methods whose products represent the // response values of the 'KVPairString' type. type KVPairStringFieldResolvers interface { @@ -120,7 +119,6 @@ var _ObjectTypeKVPairStringDesc = graphql.ObjectDesc{ }, } -// // ObjectMetaFieldResolvers represents a collection of methods whose products represent the // response values of the 'ObjectMeta' type. type ObjectMetaFieldResolvers interface { diff --git a/backend/apid/graphql/schema/metrics.gql.go b/backend/apid/graphql/schema/metrics.gql.go index 12f7472407..6a9055590f 100644 --- a/backend/apid/graphql/schema/metrics.gql.go +++ b/backend/apid/graphql/schema/metrics.gql.go @@ -119,7 +119,6 @@ type _EnumTypeMetricKindValues struct { HISTOGRAM MetricKind } -// // QuantileMetricFieldResolvers represents a collection of methods whose products represent the // response values of the 'QuantileMetric' type. type QuantileMetricFieldResolvers interface { @@ -228,7 +227,6 @@ var _ObjectTypeQuantileMetricDesc = graphql.ObjectDesc{ }, } -// // BucketMetricFieldResolvers represents a collection of methods whose products represent the // response values of the 'BucketMetric' type. type BucketMetricFieldResolvers interface { @@ -337,7 +335,6 @@ var _ObjectTypeBucketMetricDesc = graphql.ObjectDesc{ }, } -// // CounterMetricFieldResolvers represents a collection of methods whose products represent the // response values of the 'CounterMetric' type. type CounterMetricFieldResolvers interface { @@ -473,7 +470,6 @@ var _ObjectTypeCounterMetricDesc = graphql.ObjectDesc{ }, } -// // GaugeMetricFieldResolvers represents a collection of methods whose products represent the // response values of the 'GaugeMetric' type. type GaugeMetricFieldResolvers interface { @@ -609,7 +605,6 @@ var _ObjectTypeGaugeMetricDesc = graphql.ObjectDesc{ }, } -// // SummaryMetricFieldResolvers represents a collection of methods whose products represent the // response values of the 'SummaryMetric' type. type SummaryMetricFieldResolvers interface { @@ -804,7 +799,6 @@ var _ObjectTypeSummaryMetricDesc = graphql.ObjectDesc{ }, } -// // UntypedMetricFieldResolvers represents a collection of methods whose products represent the // response values of the 'UntypedMetric' type. type UntypedMetricFieldResolvers interface { @@ -940,7 +934,6 @@ var _ObjectTypeUntypedMetricDesc = graphql.ObjectDesc{ }, } -// // HistogramMetricFieldResolvers represents a collection of methods whose products represent the // response values of the 'HistogramMetric' type. type HistogramMetricFieldResolvers interface { @@ -1135,7 +1128,6 @@ var _ObjectTypeHistogramMetricDesc = graphql.ObjectDesc{ }, } -// // MetricFamilyFieldResolvers represents a collection of methods whose products represent the // response values of the 'MetricFamily' type. type MetricFamilyFieldResolvers interface { diff --git a/backend/apid/graphql/schema/mutations.gql.go b/backend/apid/graphql/schema/mutations.gql.go index 3f29427db2..95d03c7c69 100644 --- a/backend/apid/graphql/schema/mutations.gql.go +++ b/backend/apid/graphql/schema/mutations.gql.go @@ -158,7 +158,6 @@ type MutationDeleteSilenceFieldResolverParams struct { Args MutationDeleteSilenceFieldResolverArgs } -// // MutationFieldResolvers represents a collection of methods whose products represent the // response values of the 'Mutation' type. type MutationFieldResolvers interface { @@ -663,7 +662,6 @@ var _ObjectTypeMutationDesc = graphql.ObjectDesc{ }, } -// // PutWrappedPayloadFieldResolvers represents a collection of methods whose products represent the // response values of the 'PutWrappedPayload' type. type PutWrappedPayloadFieldResolvers interface { @@ -758,7 +756,6 @@ var _ObjectTypePutWrappedPayloadDesc = graphql.ObjectDesc{ }, } -// // DeleteRecordPayloadFieldResolvers represents a collection of methods whose products represent the // response values of the 'DeleteRecordPayload' type. type DeleteRecordPayloadFieldResolvers interface { @@ -1027,7 +1024,6 @@ func _InputTypeCreateCheckInputConfigFn() graphql1.InputObjectConfig { // describe CreateCheckInput's configuration; kept private to avoid unintentional tampering of configuration at runtime. var _InputTypeCreateCheckInputDesc = graphql.InputDesc{Config: _InputTypeCreateCheckInputConfigFn} -// // CreateCheckPayloadFieldResolvers represents a collection of methods whose products represent the // response values of the 'CreateCheckPayload' type. type CreateCheckPayloadFieldResolvers interface { @@ -1170,7 +1166,6 @@ func _InputTypeUpdateCheckInputConfigFn() graphql1.InputObjectConfig { // describe UpdateCheckInput's configuration; kept private to avoid unintentional tampering of configuration at runtime. var _InputTypeUpdateCheckInputDesc = graphql.InputDesc{Config: _InputTypeUpdateCheckInputConfigFn} -// // UpdateCheckPayloadFieldResolvers represents a collection of methods whose products represent the // response values of the 'UpdateCheckPayload' type. type UpdateCheckPayloadFieldResolvers interface { @@ -1321,7 +1316,6 @@ func _InputTypeExecuteCheckInputConfigFn() graphql1.InputObjectConfig { // describe ExecuteCheckInput's configuration; kept private to avoid unintentional tampering of configuration at runtime. var _InputTypeExecuteCheckInputDesc = graphql.InputDesc{Config: _InputTypeExecuteCheckInputConfigFn} -// // ExecuteCheckPayloadFieldResolvers represents a collection of methods whose products represent the // response values of the 'ExecuteCheckPayload' type. type ExecuteCheckPayloadFieldResolvers interface { @@ -1465,7 +1459,6 @@ func _InputTypeResolveEventInputConfigFn() graphql1.InputObjectConfig { // describe ResolveEventInput's configuration; kept private to avoid unintentional tampering of configuration at runtime. var _InputTypeResolveEventInputDesc = graphql.InputDesc{Config: _InputTypeResolveEventInputConfigFn} -// // ResolveEventPayloadFieldResolvers represents a collection of methods whose products represent the // response values of the 'ResolveEventPayload' type. type ResolveEventPayloadFieldResolvers interface { @@ -1683,7 +1676,6 @@ func _InputTypeSilenceInputsConfigFn() graphql1.InputObjectConfig { // describe SilenceInputs's configuration; kept private to avoid unintentional tampering of configuration at runtime. var _InputTypeSilenceInputsDesc = graphql.InputDesc{Config: _InputTypeSilenceInputsConfigFn} -// // CreateSilencePayloadFieldResolvers represents a collection of methods whose products represent the // response values of the 'CreateSilencePayload' type. type CreateSilencePayloadFieldResolvers interface { diff --git a/backend/apid/graphql/schema/mutator.gql.go b/backend/apid/graphql/schema/mutator.gql.go index 466f86d71b..09fd07ef37 100644 --- a/backend/apid/graphql/schema/mutator.gql.go +++ b/backend/apid/graphql/schema/mutator.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // MutatorFieldResolvers represents a collection of methods whose products represent the // response values of the 'Mutator' type. type MutatorFieldResolvers interface { @@ -370,7 +369,6 @@ var _ObjectTypeMutatorDesc = graphql.ObjectDesc{ }, } -// // MutatorConnectionFieldResolvers represents a collection of methods whose products represent the // response values of the 'MutatorConnection' type. type MutatorConnectionFieldResolvers interface { diff --git a/backend/apid/graphql/schema/namespace.gql.go b/backend/apid/graphql/schema/namespace.gql.go index 7bd783661b..d37d7d181c 100644 --- a/backend/apid/graphql/schema/namespace.gql.go +++ b/backend/apid/graphql/schema/namespace.gql.go @@ -204,7 +204,6 @@ type NamespaceSilencesFieldResolverParams struct { Args NamespaceSilencesFieldResolverArgs } -// // NamespaceFieldResolvers represents a collection of methods whose products represent the // response values of the 'Namespace' type. type NamespaceFieldResolvers interface { diff --git a/backend/apid/graphql/schema/pagination.gql.go b/backend/apid/graphql/schema/pagination.gql.go index b770702e35..69c3af3dc7 100644 --- a/backend/apid/graphql/schema/pagination.gql.go +++ b/backend/apid/graphql/schema/pagination.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // OffsetPageInfoFieldResolvers represents a collection of methods whose products represent the // response values of the 'OffsetPageInfo' type. type OffsetPageInfoFieldResolvers interface { diff --git a/backend/apid/graphql/schema/query.gql.go b/backend/apid/graphql/schema/query.gql.go index 7c8137787e..1bd0141bdb 100644 --- a/backend/apid/graphql/schema/query.gql.go +++ b/backend/apid/graphql/schema/query.gql.go @@ -175,7 +175,6 @@ type QueryWrappedNodeFieldResolverParams struct { Args QueryWrappedNodeFieldResolverArgs } -// // QueryFieldResolvers represents a collection of methods whose products represent the // response values of the 'Query' type. type QueryFieldResolvers interface { diff --git a/backend/apid/graphql/schema/scalars.gql.go b/backend/apid/graphql/schema/scalars.gql.go index 52a199034e..f21138273b 100644 --- a/backend/apid/graphql/schema/scalars.gql.go +++ b/backend/apid/graphql/schema/scalars.gql.go @@ -11,9 +11,9 @@ import ( /* JSONType ... JSON The JSON type describes any arbitrary JSON compatible data. -- Roughly equilevant to `union JSON = Int | Float | String | Boolean` however - can also be a map or list of arbitrary length. -- Despite looking like an an object it's fields **cannot** be selected. + - Roughly equilevant to `union JSON = Int | Float | String | Boolean` however + can also be a map or list of arbitrary length. + - Despite looking like an an object it's fields **cannot** be selected. */ var JSONType = graphql.NewType("JSON", graphql.ScalarKind) diff --git a/backend/apid/graphql/schema/schema_gen.go b/backend/apid/graphql/schema/schema_gen.go index f2367eec99..a5fc4d2c6d 100644 --- a/backend/apid/graphql/schema/schema_gen.go +++ b/backend/apid/graphql/schema/schema_gen.go @@ -1,5 +1,5 @@ package schema -//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types AssetBuild,ClusterRole,ClusterRoleBinding,Deregistration,Network,NetworkInterface,Pipeline,PipelineWorkflow,Process,ResourceReference,Role,RoleBinding,RoleRef,Rule,Secret,Subject,System -pkg-path ../../../../api/core/v2 -o ./corev2.gen.graphql -//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types EntityConfig,EntityState -pkg-path ../../../../api/core/v3 -o ./corev3.gen.graphql +//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types AssetBuild,ClusterRole,ClusterRoleBinding,Deregistration,Network,NetworkInterface,Pipeline,PipelineWorkflow,Process,ResourceReference,Role,RoleBinding,RoleRef,Rule,Secret,Subject,System -pkg-path github.com/sensu/core/v2 -o ./corev2.gen.graphql +//go:generate go run github.com/sensu/sensu-go/scripts/gen_gqltype -types EntityConfig,EntityState -pkg-path github.com/sensu/core/v3 -o ./corev3.gen.graphql //go:generate go run github.com/sensu/sensu-go/scripts/gengraphql . diff --git a/backend/apid/graphql/schema/silenced.gql.go b/backend/apid/graphql/schema/silenced.gql.go index 6228e2712e..12b2bbdebf 100644 --- a/backend/apid/graphql/schema/silenced.gql.go +++ b/backend/apid/graphql/schema/silenced.gql.go @@ -9,7 +9,6 @@ import ( time "time" ) -// // SilencedFieldResolvers represents a collection of methods whose products represent the // response values of the 'Silenced' type. type SilencedFieldResolvers interface { @@ -537,7 +536,6 @@ func _InterfaceTypeSilenceableConfigFn() graphql1.InterfaceConfig { // describe Silenceable's configuration; kept private to avoid unintentional tampering of configuration at runtime. var _InterfaceTypeSilenceableDesc = graphql.InterfaceDesc{Config: _InterfaceTypeSilenceableConfigFn} -// // SilencedConnectionFieldResolvers represents a collection of methods whose products represent the // response values of the 'SilencedConnection' type. type SilencedConnectionFieldResolvers interface { diff --git a/backend/apid/graphql/schema/suggest.gql.go b/backend/apid/graphql/schema/suggest.gql.go index dc91ae66eb..dab4de0292 100644 --- a/backend/apid/graphql/schema/suggest.gql.go +++ b/backend/apid/graphql/schema/suggest.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // SuggestionResultSetFieldResolvers represents a collection of methods whose products represent the // response values of the 'SuggestionResultSet' type. type SuggestionResultSetFieldResolvers interface { diff --git a/backend/apid/graphql/schema/time_window.gql.go b/backend/apid/graphql/schema/time_window.gql.go index 4503fb9f7a..6b597cbaec 100644 --- a/backend/apid/graphql/schema/time_window.gql.go +++ b/backend/apid/graphql/schema/time_window.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // TimeWindowWhenFieldResolvers represents a collection of methods whose products represent the // response values of the 'TimeWindowWhen' type. type TimeWindowWhenFieldResolvers interface { @@ -73,7 +72,6 @@ var _ObjectTypeTimeWindowWhenDesc = graphql.ObjectDesc{ FieldHandlers: map[string]graphql.FieldHandler{"days": _ObjTypeTimeWindowWhenDaysHandler}, } -// // TimeWindowDaysFieldResolvers represents a collection of methods whose products represent the // response values of the 'TimeWindowDays' type. type TimeWindowDaysFieldResolvers interface { @@ -324,7 +322,6 @@ var _ObjectTypeTimeWindowDaysDesc = graphql.ObjectDesc{ }, } -// // TimeWindowTimeRangeFieldResolvers represents a collection of methods whose products represent the // response values of the 'TimeWindowTimeRange' type. type TimeWindowTimeRangeFieldResolvers interface { diff --git a/backend/apid/graphql/schema/user.gql.go b/backend/apid/graphql/schema/user.gql.go index 07d6d9972e..e97fbf234b 100644 --- a/backend/apid/graphql/schema/user.gql.go +++ b/backend/apid/graphql/schema/user.gql.go @@ -8,7 +8,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // UserFieldResolvers represents a collection of methods whose products represent the // response values of the 'User' type. type UserFieldResolvers interface { diff --git a/backend/apid/graphql/schema/version.gql.go b/backend/apid/graphql/schema/version.gql.go index 3b8a007430..3a17c91b16 100644 --- a/backend/apid/graphql/schema/version.gql.go +++ b/backend/apid/graphql/schema/version.gql.go @@ -9,7 +9,6 @@ import ( time "time" ) -// // VersionsFieldResolvers represents a collection of methods whose products represent the // response values of the 'Versions' type. type VersionsFieldResolvers interface { @@ -104,7 +103,6 @@ var _ObjectTypeVersionsDesc = graphql.ObjectDesc{ }, } -// // EtcdVersionsFieldResolvers represents a collection of methods whose products represent the // response values of the 'EtcdVersions' type. type EtcdVersionsFieldResolvers interface { @@ -213,7 +211,6 @@ var _ObjectTypeEtcdVersionsDesc = graphql.ObjectDesc{ }, } -// // SensuBackendVersionFieldResolvers represents a collection of methods whose products represent the // response values of the 'SensuBackendVersion' type. type SensuBackendVersionFieldResolvers interface { diff --git a/backend/apid/graphql/schema/viewer.gql.go b/backend/apid/graphql/schema/viewer.gql.go index 742f43838b..bece599424 100644 --- a/backend/apid/graphql/schema/viewer.gql.go +++ b/backend/apid/graphql/schema/viewer.gql.go @@ -7,7 +7,6 @@ import ( graphql "github.com/sensu/sensu-go/graphql" ) -// // ViewerFieldResolvers represents a collection of methods whose products represent the // response values of the 'Viewer' type. type ViewerFieldResolvers interface { diff --git a/go.mod b/go.mod index 48a05ca070..75e5b6ddc2 100644 --- a/go.mod +++ b/go.mod @@ -63,10 +63,12 @@ require ( go.etcd.io/etcd/tests/v3 v3.5.5 go.uber.org/atomic v1.7.0 go.uber.org/zap v1.17.0 - golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 - golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 - golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 + golang.org/x/crypto v0.3.0 + golang.org/x/mod v0.7.0 + golang.org/x/net v0.3.0 + golang.org/x/sys v0.3.0 golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba + golang.org/x/tools v0.4.0 google.golang.org/grpc v1.41.0 gopkg.in/h2non/filetype.v1 v1.0.3 gopkg.in/yaml.v2 v2.4.0 @@ -81,7 +83,6 @@ require ( github.com/sensu/core/v3 v3.8.0-alpha6 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/sensu/sensu-go/types v0.12.0-alpha6 - golang.org/x/text v0.3.7 // indirect ) replace github.com/graphql-go/graphql => github.com/jamesdphillips/graphql v0.8.2 diff --git a/go.sum b/go.sum index eae22096a0..ebbb6dd5a5 100644 --- a/go.sum +++ b/go.sum @@ -474,6 +474,7 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -534,8 +535,10 @@ golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -559,6 +562,9 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -581,9 +587,13 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -597,8 +607,10 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/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.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -638,19 +650,28 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210503060354-a79de5458b56 h1:b8jxX3zqjpqb2LklXPzKSGJhzyxCOZSz8ncv8Nv+y7w= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -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/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= @@ -681,6 +702,9 @@ golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/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.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= 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= diff --git a/scripts/gen_gqltype/helper.go b/scripts/gen_gqltype/helper.go new file mode 100644 index 0000000000..86e2024593 --- /dev/null +++ b/scripts/gen_gqltype/helper.go @@ -0,0 +1,74 @@ +package main + +import ( + "bytes" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "os" + "os/exec" + "path" + "sort" + "strings" + + "golang.org/x/tools/go/vcs" +) + +type goModule struct { + Require []struct { + Path string + Version string + } +} + +func noop() {} + +func WithGoModuleSource(packagePath string) (string, func(), error) { + + cleanup := noop + + cmd := exec.Command("go", "mod", "edit", "-json") + + var stdout bytes.Buffer + cmd.Stdout = &stdout + if err := cmd.Run(); err != nil { + return "", cleanup, err + } + decoder := json.NewDecoder(&stdout) + var module goModule + if err := decoder.Decode(&module); err != nil { + return "", cleanup, err + } + // order by module path length desc + sort.Slice(module.Require, func(i, j int) bool { return len(module.Require[i].Path) > len(module.Require[j].Path) }) + + var modPath, version string + found := false + for _, dep := range module.Require { + if strings.HasPrefix(packagePath, dep.Path) { + modPath, version = dep.Path, dep.Version + found = true + break + } + } + if !found { + return "", cleanup, fmt.Errorf("could not find package %s in go.mod", packagePath) + } + repo, err := vcs.RepoRootForImportPath(modPath, false) + if err != nil { + return "", cleanup, err + } + dir := base64.StdEncoding.EncodeToString([]byte(modPath + version)) + repodir := path.Join("./", dir) + if err := repo.VCS.CreateAtRev(repodir, repo.Repo, version); err != nil { + return "", cleanup, err + } + cleanup = func() { + if err := os.RemoveAll(repodir); err != nil { + log.Fatal(err) + } + } + result := strings.Replace(packagePath, repo.Root, repodir, 1) + return result, cleanup, nil +} diff --git a/scripts/gen_gqltype/main.go b/scripts/gen_gqltype/main.go index e60f0a37da..5042f03050 100644 --- a/scripts/gen_gqltype/main.go +++ b/scripts/gen_gqltype/main.go @@ -16,6 +16,7 @@ import ( gqlkind "github.com/graphql-go/graphql/language/kinds" gqlprinter "github.com/graphql-go/graphql/language/printer" "github.com/sensu/sensu-go/util/strings" + "golang.org/x/mod/semver" ) // @@ -27,7 +28,7 @@ import ( // var ( - pkgPath = flag.String("pkg-path", "", "path to target package") + pkgPath = flag.String("pkg-path", "", "path to target package; may be a path to the source or a go import path from a required module") output = flag.String("o", "", "path to output file") types = flag.String("types", "", "comma separated list of types to export; optional") noPkg = flag.Bool("no-pkg", false, "by default types are prefix'd with its package name; use this flag to diable this behaviour") @@ -46,7 +47,20 @@ func main() { if *types != "" { validTypes = gostrings.Split(*types, ",") } - structs, err := discoverStructs(*pkgPath) + + srcDir := *pkgPath + // check if exists, otherwise attempt to downlaod go module source + + if _, err := os.Stat(*pkgPath); err != nil { + dir, cleanup, modErr := WithGoModuleSource(*pkgPath) + if modErr != nil { + log.Fatalf("could not find package source %v\n", modErr) + } + defer cleanup() + log.Printf("go module source cloned to %s\n", dir) + srcDir = dir + } + structs, err := discoverStructs(srcDir) if err != nil { log.Fatal(err) } @@ -54,7 +68,7 @@ func main() { if !*noPkg { prefix = pathToPackageName(*pkgPath) } - imports, err := discoverImports(*pkgPath) + imports, err := discoverImports(srcDir) if err != nil { log.Fatal(err) } @@ -311,18 +325,15 @@ func pathToPackageName(path string) (prefix string) { if len(segs) == 1 { return gostrings.Title(segs[0]) } - segs = segs[1:] // snip: module - for _, p := range segs[max(len(segs)-2, 0):] { - prefix += gostrings.Title(p) - } - return -} -func max(a, b int) int { - if a > b { - return a + // prefix is package name + // unless it is versioned i.e. core/v2 + packageName := segs[len(segs)-1] + prefix = gostrings.Title(packageName) + if semver.IsValid(packageName) && len(segs) > 1 { + prefix = gostrings.Title(segs[len(segs)-2]) + prefix } - return b + return } // https://github.com/asaskevich/govalidator/blob/3153c74/utils.go#L101 From a271a264e438451f457589a4c0cac52b6249f826 Mon Sep 17 00:00:00 2001 From: Luc Dandoy Date: Sat, 17 Dec 2022 03:27:02 +0100 Subject: [PATCH 087/173] Adding an agent flag to avoid collecting network information In order to solve #4787, adding a flag to instruct the agent not to retrieve network information. Signed-off-by: Luc Dandoy --- CHANGELOG-6.md | 5 +++++ agent/agent.go | 6 ++++++ agent/cmd/start.go | 4 ++++ agent/config.go | 4 ++++ system/system.go | 5 ----- system/system_test.go | 13 +++++++++---- 6 files changed, 28 insertions(+), 9 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 21a0c4f7aa..7f5a48c106 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unrealased] + +### Added +- Adding a flag at agent level to avoid collecting system.networks property in the agent entity state + ## [6.9.1] - 2022-12-01 ### Changed diff --git a/agent/agent.go b/agent/agent.go index 8157a3f411..2dee6c90e5 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -257,6 +257,12 @@ func (a *Agent) RefreshSystemInfo(ctx context.Context) error { if err != nil { return err } + if !a.config.StripNetworks { + network, err := system.NetworkInfo() + if err == nil { + info.Network = network + } + } if a.config.DetectCloudProvider { info.CloudProvider = system.GetCloudProvider(ctx) diff --git a/agent/cmd/start.go b/agent/cmd/start.go index 90ea5572b2..71bf5f89a8 100644 --- a/agent/cmd/start.go +++ b/agent/cmd/start.go @@ -83,6 +83,7 @@ const ( flagRetryMax = "retry-max" flagRetryMultiplier = "retry-multiplier" flagMaxSessionLength = "max-session-length" + flagStripNetworks = "strip-networks" // TLS flags flagTrustedCAFile = "trusted-ca-file" @@ -148,6 +149,7 @@ func NewAgentConfig(cmd *cobra.Command) (*agent.Config, error) { cfg.RetryMax = viper.GetDuration(flagRetryMax) cfg.RetryMultiplier = viper.GetFloat64(flagRetryMultiplier) cfg.MaxSessionLength = viper.GetDuration(flagMaxSessionLength) + cfg.StripNetworks = viper.GetBool(flagStripNetworks) // Set the labels & annotations using values defined configuration files // and/or environment variables for now @@ -331,6 +333,7 @@ func handleConfig(cmd *cobra.Command, arguments []string) error { viper.SetDefault(flagRetryMax, 120*time.Second) viper.SetDefault(flagRetryMultiplier, 2.0) viper.SetDefault(flagMaxSessionLength, 0*time.Second) + viper.SetDefault(flagStripNetworks, false) // Merge in flag set so that it appears in command usage flags := flagSet() @@ -456,6 +459,7 @@ func flagSet() *pflag.FlagSet { flagSet.Duration(flagRetryMax, viper.GetDuration(flagRetryMax), "maximum amount of time to wait before retrying an agent connection to the backend") flagSet.Float64(flagRetryMultiplier, viper.GetFloat64(flagRetryMultiplier), "value multiplied with the current retry delay to produce a longer retry delay (bounded by --retry-max)") flagSet.Duration(flagMaxSessionLength, viper.GetDuration(flagMaxSessionLength), "maximum amount of time after which the agent will reconnect to one of the configured backends (no maximum by default)") + flagSet.Bool(flagStripNetworks, viper.GetBool(flagStripNetworks), "do not include Network info in agent entity state") flagSet.SetOutput(ioutil.Discard) diff --git a/agent/config.go b/agent/config.go index d6357e9cdf..d1aa05fa85 100644 --- a/agent/config.go +++ b/agent/config.go @@ -223,6 +223,10 @@ type Config struct { // MaxSessionLength is the maximum duration after which the agent will // reconnect to one of the backends. MaxSessionLength time.Duration + + // StripNetworks is a boolean to specify if we need to strip network + // information from the agent entity state + StripNetworks bool } // StatsdServerConfig contains the statsd server configuration diff --git a/system/system.go b/system/system.go index 572766776f..36981e1d15 100644 --- a/system/system.go +++ b/system/system.go @@ -53,11 +53,6 @@ func Info() (types.System, error) { system.Hostname = defaultHostname } - network, err := NetworkInfo() - if err == nil { - system.Network = network - } - vmSystem, vmRole, err := host.Virtualization() if err == nil { system.VMSystem = vmSystem diff --git a/system/system_test.go b/system/system_test.go index 2bb3ec64a9..d76c2f79e4 100644 --- a/system/system_test.go +++ b/system/system_test.go @@ -19,9 +19,14 @@ func TestInfo(t *testing.T) { assert.NotEmpty(t, info.PlatformFamily) } assert.NotEmpty(t, info.PlatformVersion) - assert.NotEmpty(t, info.Network.Interfaces) - nInterface := info.Network.Interfaces[0] + +} + +func TestNetworkInfo(t *testing.T) { + network, err := NetworkInfo() + assert.NoError(t, err) + assert.NotEmpty(t, network.Interfaces) + nInterface := network.Interfaces[0] assert.NotEmpty(t, nInterface.Name) - //assert.NotEmpty(t, nInterface.MAC) // can be empty - assert.NotEmpty(t, nInterface.Addresses) + // assert.NotEmpty(t, nInterface.MAC) // can be empty } From 8f852056f0ad5c7df9ef62648a6b063f668cee5a Mon Sep 17 00:00:00 2001 From: Luc Dandoy Date: Mon, 19 Dec 2022 19:31:49 +0100 Subject: [PATCH 088/173] Correcting typo in changelog Signed-off-by: Luc Dandoy --- CHANGELOG-6.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 7f5a48c106..4f4b355998 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -1,11 +1,12 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unrealased] +## [Unreleased] ### Added - Adding a flag at agent level to avoid collecting system.networks property in the agent entity state From aa0e3fececa336e28aaeb4e616a4035d78c97f46 Mon Sep 17 00:00:00 2001 From: Luc Dandoy Date: Sun, 22 Jan 2023 10:09:57 +0100 Subject: [PATCH 089/173] Changing the way to collect or not the network data as asked Signed-off-by: Luc Dandoy --- agent/agent.go | 8 +------- system/system.go | 8 +++++++- system/system_test.go | 20 +++++++++++++++++++- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 2dee6c90e5..28c8edcc98 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -253,16 +253,10 @@ func (a *Agent) RefreshSystemInfo(ctx context.Context) error { var info corev2.System var err error - info, err = system.Info() + info, err = system.Info(!a.config.StripNetworks) if err != nil { return err } - if !a.config.StripNetworks { - network, err := system.NetworkInfo() - if err == nil { - info.Network = network - } - } if a.config.DetectCloudProvider { info.CloudProvider = system.GetCloudProvider(ctx) diff --git a/system/system.go b/system/system.go index 36981e1d15..40fb8ded01 100644 --- a/system/system.go +++ b/system/system.go @@ -32,7 +32,7 @@ type azureMetadata struct { // Info describes the local system, hostname, OS, platform, platform // family, platform version, and network interfaces. -func Info() (types.System, error) { +func Info(includeNetworks bool) (types.System, error) { info, err := host.Info() if err != nil { return types.System{}, err @@ -52,6 +52,12 @@ func Info() (types.System, error) { if system.Hostname == "" { system.Hostname = defaultHostname } + if includeNetworks { + network, err := NetworkInfo() + if err == nil { + system.Network = network + } + } vmSystem, vmRole, err := host.Virtualization() if err == nil { diff --git a/system/system_test.go b/system/system_test.go index d76c2f79e4..9869e784ef 100644 --- a/system/system_test.go +++ b/system/system_test.go @@ -9,7 +9,8 @@ import ( ) func TestInfo(t *testing.T) { - info, err := Info() + // Test first with network information included + info, err := Info(true) assert.NoError(t, err) assert.NotEmpty(t, info.Arch) assert.NotEmpty(t, info.Hostname) @@ -19,7 +20,24 @@ func TestInfo(t *testing.T) { assert.NotEmpty(t, info.PlatformFamily) } assert.NotEmpty(t, info.PlatformVersion) + assert.NoError(t, err) + assert.NotEmpty(t, info.Network.Interfaces) + nInterface := info.Network.Interfaces[0] + assert.NotEmpty(t, nInterface.Name) + // Then we have to test if with network data stripped + infoWithoutNet, err := Info(false) + assert.NoError(t, err) + assert.NotEmpty(t, infoWithoutNet.Arch) + assert.NotEmpty(t, infoWithoutNet.Hostname) + assert.NotEmpty(t, infoWithoutNet.OS) + assert.NotEmpty(t, infoWithoutNet.Platform) + if info.Platform == "linux" { + assert.NotEmpty(t, infoWithoutNet.PlatformFamily) + } + assert.NotEmpty(t, infoWithoutNet.PlatformVersion) + assert.NoError(t, err) + assert.Empty(t, infoWithoutNet.Network.Interfaces) } func TestNetworkInfo(t *testing.T) { From 7afc62fdf096f9c7f501d6d9736091f67d8efd0a Mon Sep 17 00:00:00 2001 From: Luc Dandoy Date: Sun, 22 Jan 2023 10:15:35 +0100 Subject: [PATCH 090/173] Updating the call to System.Info function for backend and cli Signed-off-by: Luc Dandoy --- backend/backend.go | 2 +- backend/resource/backend.go | 2 +- cli/cmdmanager/manager.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/backend.go b/backend/backend.go index 2450ee7b3d..65e69eb8c2 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -967,7 +967,7 @@ func getDefaultBackendID() string { // getSystemInfo returns the system info of the backend func getSystemInfo() corev2.System { - info, err := system.Info() + info, err := system.Info(true) if err != nil { logger.WithError(err).Error("error getting system info") } diff --git a/backend/resource/backend.go b/backend/resource/backend.go index bdf49967b4..bd5b9a8610 100644 --- a/backend/resource/backend.go +++ b/backend/resource/backend.go @@ -110,7 +110,7 @@ func (br *BackendResource) GenerateBackendEvent(component string, status uint32, } func getEntity() (*corev2.Entity, error) { - systemInfo, err := system.Info() + systemInfo, err := system.Info(true) if err != nil { return nil, err } diff --git a/cli/cmdmanager/manager.go b/cli/cmdmanager/manager.go index 49bd474b9e..bcf8b7346f 100644 --- a/cli/cmdmanager/manager.go +++ b/cli/cmdmanager/manager.go @@ -79,7 +79,7 @@ func (p *CommandPlugin) SetObjectMeta(meta corev2.ObjectMeta) { func getEntity() (*corev2.Entity, error) { // create an entity for using with command asset filtering - systemInfo, err := system.Info() + systemInfo, err := system.Info(true) if err != nil { return nil, err } From 124efeffacdc1bbcc4008ca3c770e9b715a5c755 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 24 Jan 2023 10:11:57 -0800 Subject: [PATCH 091/173] Update CONTRIBUTING.md for Core Migration (#4944) Signed-off-by: Christian Kruse Signed-off-by: Christian Kruse --- CONTRIBUTING.md | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a07863b52b..1442142cc9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -218,29 +218,9 @@ Once you make a change to any `*.proto` file within the **types** package, you w Sensu uses [Go modules](https://github.com/golang/go/wiki/Modules) for managing its dependencies. -The sensu-go repository contains multiple go modules. `github.com/sensu/sensu-go` is the main module containing the bulk of sensu's logic, and has dependencies on the other sensu-go modules. -`github.com/sensu/sensu-go/types`, `github.com/sensu/sensu-go/api/core/v2` and `github.com/sensu/sensu-go/api/core/v3` are supporting modules that define sensu's API resources. - -#### Working with local dependencies - -When developing changes across multiple modules in the sensu-go repository it can be helpful to use [workspaces](https://go.dev/ref/mod#workspaces) (go 1.18+) locally. - -Example: -``` -$ go work init && go work use . ./types ./api/core/v2 ./api/core/v3 -``` - -#### Staging PRs changing multiple modules - -If it is most convenient to review changes to multiple modules in the sensu-go repository in a single PR, we recommend that you organize commits by module. -You may then `go get` a dependency by either commit sha or pushed `-dev` tag in a subsequent commit to the dependent module. - -Example CL for a PR: -``` -bad91f2 (HEAD -> razzle-dazzle-feat) Add RazzleDazzle HTTP Routes to sensu-go -8171511 Bump sensu-go /api/core/v3 dependency to v1.0.1-dev -76e86d0 (tag: v1.0.1-dev) Add /api/core/v3/RazzleDazzle Resource -``` +**Note:** +Historically, sensu-go contained several modules. The main application `gihub.com/sensu/sensu-go`, our api definitions `github.com/sensu/sensu-go/core/v2` and `github.com/sensu/sensu-go/core/v3`, and `github.com/sensu/sensu-go/types`. +Presently `github.com/sensu/sensu-go` is the only actively developed module in this repository, with the api definitions migrated to `github.com/sensu/core`, and the types module deprecated. ## Testing From 6c2fc93404a04f98131ead5d587effea12b5dc1f Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Fri, 3 Feb 2023 14:46:44 -0700 Subject: [PATCH 092/173] add silences sort by expiration to graphql service Signed-off-by: Gustav Danielsson --- backend/apid/graphql/namespace.go | 4 +++ backend/apid/graphql/schema/silenced.gql.go | 26 +++++++++++++++++--- backend/apid/graphql/schema/silenced.graphql | 2 ++ go.mod | 2 +- go.sum | 2 ++ 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/backend/apid/graphql/namespace.go b/backend/apid/graphql/namespace.go index 2b914cbab9..60a2479eec 100644 --- a/backend/apid/graphql/namespace.go +++ b/backend/apid/graphql/namespace.go @@ -227,6 +227,10 @@ func (r *namespaceImpl) Silences(p schema.NamespaceSilencesFieldResolverParams) sort.Sort(sort.Reverse(corev2.SortSilencedByBegin(filteredResults))) case schema.SilencesListOrders.BEGIN: sort.Sort(corev2.SortSilencedByBegin(filteredResults)) + case schema.SilencesListOrders.EXPIRE_AT_DESC: + sort.Sort(sort.Reverse(corev2.SortSilencedByExpireAt(filteredResults))) + case schema.SilencesListOrders.EXPIRE_AT: + sort.Sort(corev2.SortSilencedByExpireAt(filteredResults)) case schema.SilencesListOrders.ID_DESC: sort.Sort(sort.Reverse(corev2.SortSilencedByName(filteredResults))) case schema.SilencesListOrders.ID: diff --git a/backend/apid/graphql/schema/silenced.gql.go b/backend/apid/graphql/schema/silenced.gql.go index 12b2bbdebf..f7769a4840 100644 --- a/backend/apid/graphql/schema/silenced.gql.go +++ b/backend/apid/graphql/schema/silenced.gql.go @@ -9,6 +9,7 @@ import ( time "time" ) +// // SilencedFieldResolvers represents a collection of methods whose products represent the // response values of the 'Silenced' type. type SilencedFieldResolvers interface { @@ -536,6 +537,7 @@ func _InterfaceTypeSilenceableConfigFn() graphql1.InterfaceConfig { // describe Silenceable's configuration; kept private to avoid unintentional tampering of configuration at runtime. var _InterfaceTypeSilenceableDesc = graphql.InterfaceDesc{Config: _InterfaceTypeSilenceableConfigFn} +// // SilencedConnectionFieldResolvers represents a collection of methods whose products represent the // response values of the 'SilencedConnection' type. type SilencedConnectionFieldResolvers interface { @@ -635,10 +637,12 @@ type SilencesListOrder string // SilencesListOrders holds enum values var SilencesListOrders = _EnumTypeSilencesListOrderValues{ - BEGIN: "BEGIN", - BEGIN_DESC: "BEGIN_DESC", - ID: "ID", - ID_DESC: "ID_DESC", + BEGIN: "BEGIN", + BEGIN_DESC: "BEGIN_DESC", + EXPIRE_AT: "EXPIRE_AT", + EXPIRE_AT_DESC: "EXPIRE_AT_DESC", + ID: "ID", + ID_DESC: "ID_DESC", } // SilencesListOrderType Describes ways in which a list of silences can be ordered. @@ -663,6 +667,16 @@ func _EnumTypeSilencesListOrderConfigFn() graphql1.EnumConfig { Description: "self descriptive", Value: "BEGIN_DESC", }, + "EXPIRE_AT": &graphql1.EnumValueConfig{ + DeprecationReason: "", + Description: "self descriptive", + Value: "EXPIRE_AT", + }, + "EXPIRE_AT_DESC": &graphql1.EnumValueConfig{ + DeprecationReason: "", + Description: "self descriptive", + Value: "EXPIRE_AT_DESC", + }, "ID": &graphql1.EnumValueConfig{ DeprecationReason: "", Description: "self descriptive", @@ -689,4 +703,8 @@ type _EnumTypeSilencesListOrderValues struct { BEGIN SilencesListOrder // BEGIN_DESC - self descriptive BEGIN_DESC SilencesListOrder + // EXPIRE_AT - self descriptive + EXPIRE_AT SilencesListOrder + // EXPIRE_AT_DESC - self descriptive + EXPIRE_AT_DESC SilencesListOrder } diff --git a/backend/apid/graphql/schema/silenced.graphql b/backend/apid/graphql/schema/silenced.graphql index c4875ac9f7..179acd9115 100644 --- a/backend/apid/graphql/schema/silenced.graphql +++ b/backend/apid/graphql/schema/silenced.graphql @@ -69,4 +69,6 @@ enum SilencesListOrder { ID_DESC BEGIN BEGIN_DESC + EXPIRE_AT + EXPIRE_AT_DESC } diff --git a/go.mod b/go.mod index 75e5b6ddc2..f533a7cfc2 100644 --- a/go.mod +++ b/go.mod @@ -79,7 +79,7 @@ require ( github.com/go-test/deep v1.0.8 github.com/google/go-cmp v0.5.8 // indirect github.com/kr/pty v1.1.8 // indirect - github.com/sensu/core/v2 v2.16.0-alpha6 + github.com/sensu/core/v2 v2.16.1 github.com/sensu/core/v3 v3.8.0-alpha6 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/sensu/sensu-go/types v0.12.0-alpha6 diff --git a/go.sum b/go.sum index ebbb6dd5a5..6073c6b0ae 100644 --- a/go.sum +++ b/go.sum @@ -402,6 +402,8 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= github.com/sensu/core/v2 v2.16.0-alpha6 h1:6WTEevm2tQEgCx50IL4aXomAXQip7s6kX4xR3uNVYlI= github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= +github.com/sensu/core/v2 v2.16.1 h1:lYicLM1PXq5Zwj5h7akXMFXvWcja12qMLzKsJr3qM4Q= +github.com/sensu/core/v2 v2.16.1/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= github.com/sensu/core/v3 v3.8.0-alpha6 h1:ywO14aIHippeIAe2HBHrPhSdyBMs1pQtjvkYaHmEwGw= github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= From 3713959b66f7fd0321f2585b49b4f23e19a5c67b Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Fri, 3 Feb 2023 14:52:55 -0700 Subject: [PATCH 093/173] update changelog for silences sort Signed-off-by: Gustav Danielsson --- CHANGELOG-6.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 4f4b355998..4160218445 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -10,6 +10,7 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Added - Adding a flag at agent level to avoid collecting system.networks property in the agent entity state +- Added silences sorting by expiration to GraphQL service ## [6.9.1] - 2022-12-01 From 7e0014926d9220aa31798a8323eb731440a86def Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Thu, 23 Feb 2023 17:14:52 -0700 Subject: [PATCH 094/173] add graphql query validation for max depth on unauthed requests Signed-off-by: Gustav Danielsson --- backend/apid/routers/graphql.go | 1 + graphql/service.go | 9 ++++ graphql/validators.go | 92 +++++++++++++++++++++++++++++++++ graphql/validators_test.go | 35 +++++++++++++ 4 files changed, 137 insertions(+) create mode 100644 graphql/validators.go create mode 100644 graphql/validators_test.go diff --git a/backend/apid/routers/graphql.go b/backend/apid/routers/graphql.go index f52c4fcc4f..d1c4137c96 100644 --- a/backend/apid/routers/graphql.go +++ b/backend/apid/routers/graphql.go @@ -83,6 +83,7 @@ func (r *GraphQLRouter) query(req *http.Request) (interface{}, error) { Query: query, Variables: queryVars, SkipValidation: skipValidate, + IsAuthed: claims != nil, }) results = append(results, map[string]interface{}{ "data": result.Data, diff --git a/graphql/service.go b/graphql/service.go index 1fb45ec73c..cbc9391121 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -158,6 +158,7 @@ func (service *Service) Middleware() []Middleware { // QueryParams describe parameters of a GraphQL query. type QueryParams struct { + IsAuthed bool OperationName string Query string RootObject map[string]interface{} @@ -192,6 +193,14 @@ func (service *Service) Do(ctx context.Context, p QueryParams) *Result { return &graphql.Result{Errors: gqlerrors.FormatErrors(err)} } + if !p.IsAuthed { + rules := []graphql.ValidationRuleFn{ProvideMaxDepthRule} + validationResult := graphql.ValidateDocument(&schema, AST, rules) + if !validationResult.IsValid { + return &graphql.Result{Errors: validationResult.Errors} + } + } + // validate document if !p.SkipValidation { validationFinishFn := MiddlewareHandleValidationDidStart(service, ¶ms) diff --git a/graphql/validators.go b/graphql/validators.go new file mode 100644 index 0000000000..47a30922d2 --- /dev/null +++ b/graphql/validators.go @@ -0,0 +1,92 @@ +package graphql + +import ( + "github.com/graphql-go/graphql" + "github.com/graphql-go/graphql/gqlerrors" + "github.com/graphql-go/graphql/language/ast" + "github.com/graphql-go/graphql/language/kinds" + "github.com/graphql-go/graphql/language/visitor" +) + +func reportError(context *graphql.ValidationContext, message string, nodes []ast.Node) (string, interface{}) { + context.ReportError(gqlerrors.NewError(message, nodes, "", nil, []int{}, nil)) + return visitor.ActionNoChange, nil +} + +func validateMaxDepth(context *graphql.ValidationContext, node ast.Node, currentDepth int, depthLimit int) int { + // end recursion early if error reported + if errors := context.Errors(); len(errors) > 0 { + return -1 + } + + if currentDepth > depthLimit { + reportError(context, "Max depth exceeded", []ast.Node{node}) + return -1 + } + + var selectionSet *ast.SelectionSet + + switch node.GetKind() { + case kinds.Field: + selectionSet = node.(*ast.Field).GetSelectionSet() + if selectionSet != nil { + selections := selectionSet.Selections + maxDepth := currentDepth + for _, selection := range selections { + nextDepth := validateMaxDepth(context, selection.(ast.Node), currentDepth+1, depthLimit) + if nextDepth > maxDepth { + maxDepth = nextDepth + } + } + return maxDepth + } + return 0 + case kinds.FragmentSpread: + fragName := node.(*ast.FragmentSpread).Name.Value + spreadFragment := context.Fragment(fragName) + if spreadFragment != nil { + return validateMaxDepth(context, spreadFragment, currentDepth, depthLimit) + } + return 0 + case kinds.InlineFragment: + selectionSet = node.(*ast.InlineFragment).GetSelectionSet() + case kinds.FragmentDefinition: + selectionSet = node.(*ast.FragmentDefinition).GetSelectionSet() + case kinds.OperationDefinition: + selectionSet = node.(*ast.OperationDefinition).GetSelectionSet() + } + + if selectionSet != nil { + selections := selectionSet.Selections + maxDepth := currentDepth + for _, selection := range selections { + nextDepth := validateMaxDepth(context, selection.(ast.Node), currentDepth, depthLimit) + if nextDepth > maxDepth { + maxDepth = nextDepth + } + } + return maxDepth + } + return 0 +} + +func ProvideMaxDepthRule(ctx *graphql.ValidationContext) *graphql.ValidationRuleInstance { + + visitorOpts := &visitor.VisitorOptions{ + KindFuncMap: map[string]visitor.NamedVisitFuncs{ + kinds.OperationDefinition: { + Kind: func(p visitor.VisitFuncParams) (string, interface{}) { + node := p.Node.(ast.Node) + if node != nil { + validateMaxDepth(ctx, node, 0, 8) + } + return visitor.ActionNoChange, nil + }, + }, + }, + } + + return &graphql.ValidationRuleInstance{ + VisitorOpts: visitorOpts, + } +} diff --git a/graphql/validators_test.go b/graphql/validators_test.go new file mode 100644 index 0000000000..0aaac100f4 --- /dev/null +++ b/graphql/validators_test.go @@ -0,0 +1,35 @@ +package graphql + +import ( + "testing" + + "github.com/graphql-go/graphql/gqlerrors" + "github.com/graphql-go/graphql/testutil" +) + +func TestValidateMaxDepth(t *testing.T) { + testutil.ExpectPassesRule(t, ProvideMaxDepthRule, ` + query MyQuery { + forwardTo(cluster: "~") { + forwardTo(cluster: "~") { + forwardTo(cluster: "~") { + forwardTo(cluster: "~") { + health { + postgresql { + healthy + } + } + } + } + } + } + }`) + + // NOTE: the graphql-go testutil requires a line and column in the query document + // of the error node. The query is formatted this way to easily find the `healthy` + // node which breaks the max depth rule + testutil.ExpectFailsRule(t, ProvideMaxDepthRule, `query MyQuery{forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {health {postgresql { +healthy # <-- max depth exceeded here at line 2, column 1 of the query document +}}}}}}}}}}`, + []gqlerrors.FormattedError{testutil.RuleError("Max depth exceeded", 2, 1)}) +} From 9304692c34a8639cfe9d38a9ef9466822096fae0 Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Thu, 23 Feb 2023 18:20:23 -0700 Subject: [PATCH 095/173] update changelog Signed-off-by: Gustav Danielsson --- CHANGELOG-6.md | 7 +++++++ graphql/validators.go | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 21a0c4f7aa..1e509f259b 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Added +- Adding a flag at agent level to avoid collecting system.networks property in the agent entity state +- Added silences sorting by expiration to GraphQL service +- Added GraphQL validator for query node depth + ## [6.9.1] - 2022-12-01 ### Changed diff --git a/graphql/validators.go b/graphql/validators.go index 47a30922d2..ac87fd21bf 100644 --- a/graphql/validators.go +++ b/graphql/validators.go @@ -8,6 +8,10 @@ import ( "github.com/graphql-go/graphql/language/visitor" ) +const ( + MaxQueryNodeDepth = 8 +) + func reportError(context *graphql.ValidationContext, message string, nodes []ast.Node) (string, interface{}) { context.ReportError(gqlerrors.NewError(message, nodes, "", nil, []int{}, nil)) return visitor.ActionNoChange, nil @@ -78,7 +82,7 @@ func ProvideMaxDepthRule(ctx *graphql.ValidationContext) *graphql.ValidationRule Kind: func(p visitor.VisitFuncParams) (string, interface{}) { node := p.Node.(ast.Node) if node != nil { - validateMaxDepth(ctx, node, 0, 8) + validateMaxDepth(ctx, node, 0, MaxQueryNodeDepth) } return visitor.ActionNoChange, nil }, From 6a60c16ef3c2b0d115c7f5ed4f2017e546bfef61 Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Thu, 23 Feb 2023 18:44:36 -0700 Subject: [PATCH 096/173] update graph query depth limit Signed-off-by: Gustav Danielsson --- graphql/validators.go | 3 ++- graphql/validators_test.go | 16 ++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/graphql/validators.go b/graphql/validators.go index ac87fd21bf..a286be50d6 100644 --- a/graphql/validators.go +++ b/graphql/validators.go @@ -9,7 +9,7 @@ import ( ) const ( - MaxQueryNodeDepth = 8 + MaxQueryNodeDepth = 5 ) func reportError(context *graphql.ValidationContext, message string, nodes []ast.Node) (string, interface{}) { @@ -17,6 +17,7 @@ func reportError(context *graphql.ValidationContext, message string, nodes []ast return visitor.ActionNoChange, nil } +// validate max depth of a GraphQL query with a depthLimit func validateMaxDepth(context *graphql.ValidationContext, node ast.Node, currentDepth int, depthLimit int) int { // end recursion early if error reported if errors := context.Errors(); len(errors) > 0 { diff --git a/graphql/validators_test.go b/graphql/validators_test.go index 0aaac100f4..c57d873bdb 100644 --- a/graphql/validators_test.go +++ b/graphql/validators_test.go @@ -12,13 +12,9 @@ func TestValidateMaxDepth(t *testing.T) { query MyQuery { forwardTo(cluster: "~") { forwardTo(cluster: "~") { - forwardTo(cluster: "~") { - forwardTo(cluster: "~") { - health { - postgresql { - healthy - } - } + health { + postgresql { + healthy } } } @@ -28,8 +24,8 @@ func TestValidateMaxDepth(t *testing.T) { // NOTE: the graphql-go testutil requires a line and column in the query document // of the error node. The query is formatted this way to easily find the `healthy` // node which breaks the max depth rule - testutil.ExpectFailsRule(t, ProvideMaxDepthRule, `query MyQuery{forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {health {postgresql { -healthy # <-- max depth exceeded here at line 2, column 1 of the query document -}}}}}}}}}}`, + testutil.ExpectFailsRule(t, ProvideMaxDepthRule, `query MyQuery {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {health {postgresql { +healthy # <-- this node is at depth six, breaking the max depth of 5 rule + }}}}}}}`, []gqlerrors.FormattedError{testutil.RuleError("Max depth exceeded", 2, 1)}) } From cd923b7004ceb7c1aef1942cca15d5e35fb6ffa4 Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Fri, 24 Feb 2023 11:38:09 -0700 Subject: [PATCH 097/173] update graphql-max-depth rule provider Signed-off-by: Gustav Danielsson --- graphql/service.go | 3 ++- graphql/validators.go | 40 ++++++++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/graphql/service.go b/graphql/service.go index cbc9391121..7ff00a3b83 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -193,8 +193,9 @@ func (service *Service) Do(ctx context.Context, p QueryParams) *Result { return &graphql.Result{Errors: gqlerrors.FormatErrors(err)} } + // run validators for unauthorized requests if !p.IsAuthed { - rules := []graphql.ValidationRuleFn{ProvideMaxDepthRule} + rules := ProvideUnauthedValidators(UnauthedValidatorOpts{DepthLimit: 5}) validationResult := graphql.ValidateDocument(&schema, AST, rules) if !validationResult.IsValid { return &graphql.Result{Errors: validationResult.Errors} diff --git a/graphql/validators.go b/graphql/validators.go index a286be50d6..9d3a57f30f 100644 --- a/graphql/validators.go +++ b/graphql/validators.go @@ -75,23 +75,51 @@ func validateMaxDepth(context *graphql.ValidationContext, node ast.Node, current return 0 } -func ProvideMaxDepthRule(ctx *graphql.ValidationContext) *graphql.ValidationRuleInstance { - - visitorOpts := &visitor.VisitorOptions{ +func (rule *maxDepthRule) maxDepthVisitorOptions() *visitor.VisitorOptions { + return &visitor.VisitorOptions{ KindFuncMap: map[string]visitor.NamedVisitFuncs{ kinds.OperationDefinition: { Kind: func(p visitor.VisitFuncParams) (string, interface{}) { node := p.Node.(ast.Node) if node != nil { - validateMaxDepth(ctx, node, 0, MaxQueryNodeDepth) + validateMaxDepth(rule.context, node, 0, rule.depthLimit) } return visitor.ActionNoChange, nil }, }, }, } +} + +type maxDepthRule struct { + context *graphql.ValidationContext + depthLimit int +} + +func newMaxDepthRule(context *graphql.ValidationContext, depthLimit int) *maxDepthRule { + return &maxDepthRule{ + context: context, + depthLimit: depthLimit, + } +} - return &graphql.ValidationRuleInstance{ - VisitorOpts: visitorOpts, +func MaxDepthRule(depthLimit int) graphql.ValidationRuleFn { + rule := &maxDepthRule{ + depthLimit: depthLimit, } + return rule.validateRule +} + +func (r *maxDepthRule) validateRule(context *graphql.ValidationContext) *graphql.ValidationRuleInstance { + rule := newMaxDepthRule(context, r.depthLimit) + return &graphql.ValidationRuleInstance{VisitorOpts: rule.maxDepthVisitorOptions()} +} + +type UnauthedValidatorOpts struct { + DepthLimit int +} + +func ProvideUnauthedValidators(opts UnauthedValidatorOpts) []graphql.ValidationRuleFn { + rules := []graphql.ValidationRuleFn{MaxDepthRule(opts.DepthLimit)} + return rules } From 2570c5301a7907df81273d80f60feae3fbcad93f Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Fri, 24 Feb 2023 16:24:57 -0700 Subject: [PATCH 098/173] make graphql-depth-limit validator parameterized Signed-off-by: Gustav Danielsson --- graphql/service.go | 2 +- graphql/validators.go | 123 +++++++++++++++++++------------------ graphql/validators_test.go | 20 +++--- 3 files changed, 76 insertions(+), 69 deletions(-) diff --git a/graphql/service.go b/graphql/service.go index 7ff00a3b83..e1bad1c08c 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -195,7 +195,7 @@ func (service *Service) Do(ctx context.Context, p QueryParams) *Result { // run validators for unauthorized requests if !p.IsAuthed { - rules := ProvideUnauthedValidators(UnauthedValidatorOpts{DepthLimit: 5}) + rules := UnauthedValidators() validationResult := graphql.ValidateDocument(&schema, AST, rules) if !validationResult.IsValid { return &graphql.Result{Errors: validationResult.Errors} diff --git a/graphql/validators.go b/graphql/validators.go index 9d3a57f30f..53d5a10f54 100644 --- a/graphql/validators.go +++ b/graphql/validators.go @@ -12,13 +12,55 @@ const ( MaxQueryNodeDepth = 5 ) -func reportError(context *graphql.ValidationContext, message string, nodes []ast.Node) (string, interface{}) { - context.ReportError(gqlerrors.NewError(message, nodes, "", nil, []int{}, nil)) - return visitor.ActionNoChange, nil +type maxDepthRule struct { + context *graphql.ValidationContext + depthLimit int +} + +func UnauthedValidators() []graphql.ValidationRuleFn { + rules := []graphql.ValidationRuleFn{MaxDepthRule(MaxQueryNodeDepth)} + return rules +} + +func MaxDepthRule(depthLimit int) graphql.ValidationRuleFn { + rule := &maxDepthRule{ + depthLimit: depthLimit, + } + return rule.maxDepthRuleWithContext +} + +func (r *maxDepthRule) maxDepthRuleWithContext(context *graphql.ValidationContext) *graphql.ValidationRuleInstance { + rule := &maxDepthRule{ + context: context, + depthLimit: r.depthLimit, + } + return &graphql.ValidationRuleInstance{VisitorOpts: rule.maxDepthVisitorOptions()} +} + +func (rule *maxDepthRule) maxDepthVisitorOptions() *visitor.VisitorOptions { + return &visitor.VisitorOptions{ + KindFuncMap: map[string]visitor.NamedVisitFuncs{ + kinds.OperationDefinition: { + Kind: func(p visitor.VisitFuncParams) (string, interface{}) { + node := p.Node.(ast.Node) + if node != nil { + validateMaxDepth(rule.context, node, 1, rule.depthLimit, nil) + } + return visitor.ActionNoChange, nil + }, + }, + }, + } } // validate max depth of a GraphQL query with a depthLimit -func validateMaxDepth(context *graphql.ValidationContext, node ast.Node, currentDepth int, depthLimit int) int { +func validateMaxDepth( + context *graphql.ValidationContext, + node ast.Node, + currentDepth int, + depthLimit int, + visited map[*ast.FragmentDefinition]bool, +) int { // end recursion early if error reported if errors := context.Errors(); len(errors) > 0 { return -1 @@ -29,6 +71,11 @@ func validateMaxDepth(context *graphql.ValidationContext, node ast.Node, current return -1 } + // keep map of visited fragment spreads to prevent infinite loop + if visited == nil { + visited = map[*ast.FragmentDefinition]bool{} + } + var selectionSet *ast.SelectionSet switch node.GetKind() { @@ -38,21 +85,23 @@ func validateMaxDepth(context *graphql.ValidationContext, node ast.Node, current selections := selectionSet.Selections maxDepth := currentDepth for _, selection := range selections { - nextDepth := validateMaxDepth(context, selection.(ast.Node), currentDepth+1, depthLimit) + nextDepth := validateMaxDepth(context, selection.(ast.Node), currentDepth+1, depthLimit, visited) if nextDepth > maxDepth { maxDepth = nextDepth } } return maxDepth } - return 0 + return currentDepth case kinds.FragmentSpread: fragName := node.(*ast.FragmentSpread).Name.Value - spreadFragment := context.Fragment(fragName) - if spreadFragment != nil { - return validateMaxDepth(context, spreadFragment, currentDepth, depthLimit) + fragment := context.Fragment(fragName) + if fragment == nil || visited[fragment] { + return currentDepth } - return 0 + visited[fragment] = true + // fragment spreads don't increase the depth + return validateMaxDepth(context, fragment, currentDepth, depthLimit, visited) case kinds.InlineFragment: selectionSet = node.(*ast.InlineFragment).GetSelectionSet() case kinds.FragmentDefinition: @@ -65,61 +114,17 @@ func validateMaxDepth(context *graphql.ValidationContext, node ast.Node, current selections := selectionSet.Selections maxDepth := currentDepth for _, selection := range selections { - nextDepth := validateMaxDepth(context, selection.(ast.Node), currentDepth, depthLimit) + // inline fragments, fragment definitions and operation definitions don't increase the depth + nextDepth := validateMaxDepth(context, selection.(ast.Node), currentDepth, depthLimit, visited) if nextDepth > maxDepth { maxDepth = nextDepth } } return maxDepth } - return 0 -} - -func (rule *maxDepthRule) maxDepthVisitorOptions() *visitor.VisitorOptions { - return &visitor.VisitorOptions{ - KindFuncMap: map[string]visitor.NamedVisitFuncs{ - kinds.OperationDefinition: { - Kind: func(p visitor.VisitFuncParams) (string, interface{}) { - node := p.Node.(ast.Node) - if node != nil { - validateMaxDepth(rule.context, node, 0, rule.depthLimit) - } - return visitor.ActionNoChange, nil - }, - }, - }, - } -} - -type maxDepthRule struct { - context *graphql.ValidationContext - depthLimit int + return currentDepth } -func newMaxDepthRule(context *graphql.ValidationContext, depthLimit int) *maxDepthRule { - return &maxDepthRule{ - context: context, - depthLimit: depthLimit, - } -} - -func MaxDepthRule(depthLimit int) graphql.ValidationRuleFn { - rule := &maxDepthRule{ - depthLimit: depthLimit, - } - return rule.validateRule -} - -func (r *maxDepthRule) validateRule(context *graphql.ValidationContext) *graphql.ValidationRuleInstance { - rule := newMaxDepthRule(context, r.depthLimit) - return &graphql.ValidationRuleInstance{VisitorOpts: rule.maxDepthVisitorOptions()} -} - -type UnauthedValidatorOpts struct { - DepthLimit int -} - -func ProvideUnauthedValidators(opts UnauthedValidatorOpts) []graphql.ValidationRuleFn { - rules := []graphql.ValidationRuleFn{MaxDepthRule(opts.DepthLimit)} - return rules +func reportError(context *graphql.ValidationContext, message string, nodes []ast.Node) { + context.ReportError(gqlerrors.NewError(message, nodes, "", nil, []int{}, nil)) } diff --git a/graphql/validators_test.go b/graphql/validators_test.go index c57d873bdb..72911a6c37 100644 --- a/graphql/validators_test.go +++ b/graphql/validators_test.go @@ -7,8 +7,9 @@ import ( "github.com/graphql-go/graphql/testutil" ) -func TestValidateMaxDepth(t *testing.T) { - testutil.ExpectPassesRule(t, ProvideMaxDepthRule, ` +// use graphql-go testutil to confirm validator provided correctly +func TestMaxDepthRule(t *testing.T) { + testutil.ExpectPassesRule(t, MaxDepthRule(5), ` query MyQuery { forwardTo(cluster: "~") { forwardTo(cluster: "~") { @@ -21,11 +22,12 @@ func TestValidateMaxDepth(t *testing.T) { } }`) - // NOTE: the graphql-go testutil requires a line and column in the query document - // of the error node. The query is formatted this way to easily find the `healthy` - // node which breaks the max depth rule - testutil.ExpectFailsRule(t, ProvideMaxDepthRule, `query MyQuery {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {forwardTo(cluster: "~") {health {postgresql { -healthy # <-- this node is at depth six, breaking the max depth of 5 rule - }}}}}}}`, - []gqlerrors.FormattedError{testutil.RuleError("Max depth exceeded", 2, 1)}) + testutil.ExpectFailsRule(t, MaxDepthRule(1), ` + query MyQuery { # depth 0 + health { # depth 1 + healthy # depth 2 <-- exceeds max depth of 1 + } + }`, + // `healthy` node which breaks rule is on line 4, column 5 of the query document + []gqlerrors.FormattedError{testutil.RuleError("Max depth exceeded", 4, 5)}) } From 23514524362ca4e47099e3f7d2d213c54ad1aa49 Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Fri, 24 Feb 2023 17:30:45 -0700 Subject: [PATCH 099/173] update graphql depth test cases Signed-off-by: Gustav Danielsson --- graphql/validators.go | 11 ++- graphql/validators_test.go | 142 ++++++++++++++++++++++++++++++------- 2 files changed, 127 insertions(+), 26 deletions(-) diff --git a/graphql/validators.go b/graphql/validators.go index 53d5a10f54..8b3829a437 100644 --- a/graphql/validators.go +++ b/graphql/validators.go @@ -14,6 +14,7 @@ const ( type maxDepthRule struct { context *graphql.ValidationContext + depth int depthLimit int } @@ -22,10 +23,15 @@ func UnauthedValidators() []graphql.ValidationRuleFn { return rules } -func MaxDepthRule(depthLimit int) graphql.ValidationRuleFn { +func newMaxDepthRule(depthLimit int) *maxDepthRule { rule := &maxDepthRule{ depthLimit: depthLimit, } + return rule +} + +func MaxDepthRule(depthLimit int) graphql.ValidationRuleFn { + rule := newMaxDepthRule(depthLimit) return rule.maxDepthRuleWithContext } @@ -44,7 +50,8 @@ func (rule *maxDepthRule) maxDepthVisitorOptions() *visitor.VisitorOptions { Kind: func(p visitor.VisitFuncParams) (string, interface{}) { node := p.Node.(ast.Node) if node != nil { - validateMaxDepth(rule.context, node, 1, rule.depthLimit, nil) + maxDepth := validateMaxDepth(rule.context, node, 1, rule.depthLimit, nil) + rule.depth = maxDepth } return visitor.ActionNoChange, nil }, diff --git a/graphql/validators_test.go b/graphql/validators_test.go index 72911a6c37..a31455e285 100644 --- a/graphql/validators_test.go +++ b/graphql/validators_test.go @@ -3,31 +3,125 @@ package graphql import ( "testing" - "github.com/graphql-go/graphql/gqlerrors" - "github.com/graphql-go/graphql/testutil" + "github.com/graphql-go/graphql" + "github.com/graphql-go/graphql/language/ast" + "github.com/graphql-go/graphql/language/parser" + "github.com/graphql-go/graphql/language/visitor" ) -// use graphql-go testutil to confirm validator provided correctly -func TestMaxDepthRule(t *testing.T) { - testutil.ExpectPassesRule(t, MaxDepthRule(5), ` - query MyQuery { - forwardTo(cluster: "~") { - forwardTo(cluster: "~") { - health { - postgresql { - healthy - } - } - } +var ( + schema *graphql.Schema + typeInfo *graphql.TypeInfo +) + +// init stubbed GraphQL schema +func init() { + // NOTE: the max-depth validator doesn't care about a valid schema, only depth of nodes in the graph + queryType := graphql.NewObject(graphql.ObjectConfig{ + Name: "Query", + Fields: graphql.Fields{ + "foobar": &graphql.Field{ + Type: graphql.String, + }, + }, + }) + + schema, err := graphql.NewSchema(graphql.SchemaConfig{Query: queryType}) + if err != nil { + panic(err) + } + typeInfo = graphql.NewTypeInfo(&graphql.TypeInfoConfig{Schema: &schema}) +} + +// helper to parse a graphql query document +func parseQuery(t *testing.T, q string) *ast.Document { + t.Helper() + astDoc, err := parser.Parse(parser.ParseParams{Source: q}) + if err != nil { + t.Fatalf("parse failed: %s", err) + } + return astDoc +} + +// helper to assert query depth matches expected +func testDepth(t *testing.T, query string, depthLimit int, expectedDepth int) *maxDepthRule { + t.Helper() + astDoc := parseQuery(t, query) + context := graphql.NewValidationContext(schema, astDoc, typeInfo) + rule := newMaxDepthRule(depthLimit) + rule.context = context + visitor.Visit(astDoc, rule.maxDepthVisitorOptions(), nil) + if rule.depth != expectedDepth { + t.Fatalf("wrong depth expected: want=%d got=%d", expectedDepth, rule.depth) + } + return rule +} + +// helper to assert errors set when depth limit reached +func testMaxDepthError(t *testing.T, query string, depthLimit int) *maxDepthRule { + t.Helper() + astDoc := parseQuery(t, query) + context := graphql.NewValidationContext(schema, astDoc, typeInfo) + rule := newMaxDepthRule(depthLimit) + rule.context = context + visitor.Visit(astDoc, rule.maxDepthVisitorOptions(), nil) + if len(context.Errors()) == 0 { + t.Fatalf("expected errors but none returned") + } + return rule +} + +func TestMaxDepth(t *testing.T) { + testDepth(t, `query MyQuery { # depth 0 + postgres { # depth 1 + healthy # depth 2 + } + }`, 5, 2) +} + +func TestMaxDepthFragment(t *testing.T) { + testDepth(t, ` + query MyQuery { # depth 0 + pet { # depth 1 + breed # depth 2 + ...dog # depth 2 + } + } + fragment dog on Pet { + name # depth 2 + owner { + name # depth 3 + } + }`, 5, 3) +} + +// test don't break on cyclical fragment spread +func TestMaxDepthFragmentCycle(t *testing.T) { + testDepth(t, ` + fragment X on Query { ...Y } + fragment Y on Query { ...X } + query { + ...X + } + `, 5, 1) +} + +func TestMaxDepthInlineFragment(t *testing.T) { + testDepth(t, ` + query MyQuery { # depth 0 + pet { # depth 1 + breed # depth 2 + ... on Pet { # depth 2 + name # depth 2 + } + } + }`, 5, 2) +} + +func TestMaxDepthFail(t *testing.T) { + testMaxDepthError(t, `query MyQuery { # depth 0 + postgres { # depth 1 + healthy # depth 2 <-- max depth reached here } - }`) - - testutil.ExpectFailsRule(t, MaxDepthRule(1), ` - query MyQuery { # depth 0 - health { # depth 1 - healthy # depth 2 <-- exceeds max depth of 1 - } - }`, - // `healthy` node which breaks rule is on line 4, column 5 of the query document - []gqlerrors.FormattedError{testutil.RuleError("Max depth exceeded", 4, 5)}) + }`, 1) } From ace6968261f1e70cb275ea7b355d2b54c263d0eb Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Mon, 27 Feb 2023 11:13:45 -0700 Subject: [PATCH 100/173] add more test cases and comments to graphql max-depth validator Signed-off-by: Gustav Danielsson --- graphql/validators.go | 12 +++++---- graphql/validators_test.go | 53 +++++++++++++++++++++++++++++++++++--- 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/graphql/validators.go b/graphql/validators.go index 8b3829a437..fa4051b66f 100644 --- a/graphql/validators.go +++ b/graphql/validators.go @@ -18,11 +18,18 @@ type maxDepthRule struct { depthLimit int } +// These GraphQL validators will be run on unauthed requests func UnauthedValidators() []graphql.ValidationRuleFn { rules := []graphql.ValidationRuleFn{MaxDepthRule(MaxQueryNodeDepth)} return rules } +func MaxDepthRule(depthLimit int) graphql.ValidationRuleFn { + rule := newMaxDepthRule(depthLimit) + return rule.maxDepthRuleWithContext +} + +// provide MaxDepthRule with depth limit func newMaxDepthRule(depthLimit int) *maxDepthRule { rule := &maxDepthRule{ depthLimit: depthLimit, @@ -30,11 +37,6 @@ func newMaxDepthRule(depthLimit int) *maxDepthRule { return rule } -func MaxDepthRule(depthLimit int) graphql.ValidationRuleFn { - rule := newMaxDepthRule(depthLimit) - return rule.maxDepthRuleWithContext -} - func (r *maxDepthRule) maxDepthRuleWithContext(context *graphql.ValidationContext) *graphql.ValidationRuleInstance { rule := &maxDepthRule{ context: context, diff --git a/graphql/validators_test.go b/graphql/validators_test.go index a31455e285..69501da2db 100644 --- a/graphql/validators_test.go +++ b/graphql/validators_test.go @@ -72,9 +72,10 @@ func testMaxDepthError(t *testing.T, query string, depthLimit int) *maxDepthRule } func TestMaxDepth(t *testing.T) { - testDepth(t, `query MyQuery { # depth 0 - postgres { # depth 1 - healthy # depth 2 + testDepth(t, ` + query MyQuery { # depth 0 + postgres { # depth 1 + healthy # depth 2 } }`, 5, 2) } @@ -118,6 +119,20 @@ func TestMaxDepthInlineFragment(t *testing.T) { }`, 5, 2) } +func TestMaxDepthInlineFragmentNested(t *testing.T) { + testDepth(t, ` + query MyQuery { # depth 0 + pet { # depth 1 + breed # depth 2 + children { # depth 2 + ... on Pet { # depth 3 + name # depth 3 + } + } + } + }`, 5, 3) +} + func TestMaxDepthFail(t *testing.T) { testMaxDepthError(t, `query MyQuery { # depth 0 postgres { # depth 1 @@ -125,3 +140,35 @@ func TestMaxDepthFail(t *testing.T) { } }`, 1) } + +func TestMaxDepthFailWithFragment(t *testing.T) { + testMaxDepthError(t, ` + query MyQuery { # depth 0 + pet { # depth 1 + breed # depth 2 + children { + ...dog # depth 3 + } + } + } + fragment dog on Pet { + name # depth 3 + owner { + name # depth 4 <-- max depth reached here + } + }`, 3) +} + +func TestMaxDepthFailWithNestedInlineFragment(t *testing.T) { + testMaxDepthError(t, ` + query MyQuery { # depth 0 + pet { # depth 1 + breed # depth 2 + children { # depth 2 + ... on Pet { # depth 3 + name # depth 3 + } + } + } + }`, 2) +} From 0ea9789f3c30644ae2ccc62da97c413623c0f828 Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Mon, 27 Feb 2023 11:20:21 -0700 Subject: [PATCH 101/173] convert graphql validators test indents to spaces for readability Signed-off-by: Gustav Danielsson --- graphql/validators_test.go | 138 ++++++++++++++++++------------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/graphql/validators_test.go b/graphql/validators_test.go index 69501da2db..e17adeeb68 100644 --- a/graphql/validators_test.go +++ b/graphql/validators_test.go @@ -73,102 +73,102 @@ func testMaxDepthError(t *testing.T, query string, depthLimit int) *maxDepthRule func TestMaxDepth(t *testing.T) { testDepth(t, ` - query MyQuery { # depth 0 - postgres { # depth 1 - healthy # depth 2 - } - }`, 5, 2) + query MyQuery { # depth 0 + postgres { # depth 1 + healthy # depth 2 + } + }`, 5, 2) } func TestMaxDepthFragment(t *testing.T) { testDepth(t, ` - query MyQuery { # depth 0 - pet { # depth 1 - breed # depth 2 - ...dog # depth 2 - } - } - fragment dog on Pet { - name # depth 2 - owner { - name # depth 3 - } - }`, 5, 3) + query MyQuery { # depth 0 + pet { # depth 1 + breed # depth 2 + ...dog # depth 2 + } + } + fragment dog on Pet { + name # depth 2 + owner { + name # depth 3 + } + }`, 5, 3) } // test don't break on cyclical fragment spread func TestMaxDepthFragmentCycle(t *testing.T) { testDepth(t, ` - fragment X on Query { ...Y } - fragment Y on Query { ...X } - query { - ...X - } - `, 5, 1) + fragment X on Query { ...Y } + fragment Y on Query { ...X } + query { + ...X + } + `, 5, 1) } func TestMaxDepthInlineFragment(t *testing.T) { testDepth(t, ` - query MyQuery { # depth 0 - pet { # depth 1 - breed # depth 2 - ... on Pet { # depth 2 - name # depth 2 - } - } - }`, 5, 2) + query MyQuery { # depth 0 + pet { # depth 1 + breed # depth 2 + ... on Pet { # depth 2 + name # depth 2 + } + } + }`, 5, 2) } func TestMaxDepthInlineFragmentNested(t *testing.T) { testDepth(t, ` - query MyQuery { # depth 0 - pet { # depth 1 - breed # depth 2 - children { # depth 2 - ... on Pet { # depth 3 - name # depth 3 - } - } - } - }`, 5, 3) + query MyQuery { # depth 0 + pet { # depth 1 + breed # depth 2 + children { # depth 2 + ... on Pet { # depth 3 + name # depth 3 + } + } + } + }`, 5, 3) } func TestMaxDepthFail(t *testing.T) { testMaxDepthError(t, `query MyQuery { # depth 0 - postgres { # depth 1 - healthy # depth 2 <-- max depth reached here - } - }`, 1) + postgres { # depth 1 + healthy # depth 2 <-- max depth reached here + } + }`, 1) } func TestMaxDepthFailWithFragment(t *testing.T) { testMaxDepthError(t, ` - query MyQuery { # depth 0 - pet { # depth 1 - breed # depth 2 - children { - ...dog # depth 3 - } - } - } - fragment dog on Pet { - name # depth 3 - owner { - name # depth 4 <-- max depth reached here - } - }`, 3) + query MyQuery { # depth 0 + pet { # depth 1 + breed # depth 2 + children { + ...dog # depth 3 + } + } + } + fragment dog on Pet { + name # depth 3 + owner { + name # depth 4 <-- max depth reached here + } + }`, 3) } func TestMaxDepthFailWithNestedInlineFragment(t *testing.T) { testMaxDepthError(t, ` - query MyQuery { # depth 0 - pet { # depth 1 - breed # depth 2 - children { # depth 2 - ... on Pet { # depth 3 - name # depth 3 - } - } - } - }`, 2) + query MyQuery { # depth 0 + pet { # depth 1 + breed # depth 2 + children { # depth 2 + ... on Pet { # depth 3 + name # depth 3 + } + } + } + }`, 2) } From 70fe5f6b967b1b88cd2e25bcbd5dd42058c6704c Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Mon, 27 Feb 2023 13:48:23 -0700 Subject: [PATCH 102/173] update changelog for 6.9.x Signed-off-by: Gustav Danielsson --- CHANGELOG-6.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 1e509f259b..f5a978cdc8 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -8,8 +8,6 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Added -- Adding a flag at agent level to avoid collecting system.networks property in the agent entity state -- Added silences sorting by expiration to GraphQL service - Added GraphQL validator for query node depth ## [6.9.1] - 2022-12-01 From 56525e5df6d9008be6208ae65896aef8d5bb7357 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Fri, 3 Mar 2023 08:42:48 -0800 Subject: [PATCH 103/173] Add log-millisecond-timestamps backend configuration flag (#4961) * Add log-precision-time backend configuration flag The log-precision-time configuration allows users to configure a sensu backend to use RFC3339 formatted timestamp strings with millisecond precision in its backend logs. Signed-off-by: Christian Kruse * update flag name to log-millisecond-timestamps Signed-off-by: Christian Kruse s/log-millisecond-time/log-millisecond-timestamp/ Signed-off-by: Christian Kruse update changelog Signed-off-by: Christian Kruse --------- Signed-off-by: Christian Kruse --- CHANGELOG-6.md | 1 + backend/backend.go | 5 +++++ backend/cmd/start.go | 18 ++++++++++++++++++ backend/config.go | 7 ++++--- backend/etcd/etcd.go | 10 ++++++++-- 5 files changed, 36 insertions(+), 5 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 4160218445..6a75e55fd6 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -11,6 +11,7 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Added - Adding a flag at agent level to avoid collecting system.networks property in the agent entity state - Added silences sorting by expiration to GraphQL service +- Added log-millisecond-timestamps backend configuration flag ## [6.9.1] - 2022-12-01 diff --git a/backend/backend.go b/backend/backend.go index 346500b0ee..ab2ae5e95c 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -17,6 +17,7 @@ import ( "go.etcd.io/etcd/client/pkg/v3/logutil" "go.etcd.io/etcd/client/pkg/v3/transport" clientv3 "go.etcd.io/etcd/client/v3" + "go.uber.org/zap/zapcore" "golang.org/x/time/rate" "google.golang.org/grpc" @@ -224,6 +225,9 @@ func newClient(ctx context.Context, config *Config, backend *Backend) (*clientv3 // Set etcd client log level logConfig := logutil.DefaultZapLoggerConfig logConfig.Level.SetLevel(etcd.LogLevelToZap(config.EtcdClientLogLevel)) + if config.EtcdLogTimestampLayout != "" { + logConfig.EncoderConfig.EncodeTime = zapcore.TimeEncoderOfLayout(config.EtcdLogTimestampLayout) + } clientv3Config.LogConfig = &logConfig // Don't start up an embedded etcd, return a client that connects to an @@ -252,6 +256,7 @@ func newClient(ctx context.Context, config *Config, backend *Backend) (*clientv3 cfg.DiscoverySrv = config.EtcdDiscoverySrv cfg.Name = config.EtcdName cfg.LogLevel = config.EtcdLogLevel + cfg.LogTimestampLayout = config.EtcdLogTimestampLayout cfg.ClientLogLevel = config.EtcdClientLogLevel // Heartbeat interval diff --git a/backend/cmd/start.go b/backend/cmd/start.go index d1ae71a48e..1d0d28d044 100644 --- a/backend/cmd/start.go +++ b/backend/cmd/start.go @@ -68,6 +68,7 @@ const ( flagInsecureSkipTLSVerify = "insecure-skip-tls-verify" flagDebug = "debug" flagLogLevel = "log-level" + flagLogMillisecondTime = "log-millisecond-timestamps" flagLabels = "labels" flagAnnotations = "annotations" @@ -141,6 +142,8 @@ const ( // URLs to advertise to the rest of the cluster defaultEtcdAdvertiseClientURL = "http://localhost:2379" + timestampFormatMillisecond = "2006-01-02T15:04:05.999Z07:00" + // Start command usage template startUsageTemplate = `Usage:{{if .Runnable}} {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}} @@ -211,6 +214,16 @@ func StartCommand(initialize InitializeFunc) *cobra.Command { } logrus.SetLevel(level) + if millisecondTime := viper.GetBool(flagLogMillisecondTime); millisecondTime { + formatter := logrus.StandardLogger().Formatter + var copy logrus.JSONFormatter + if orig, ok := formatter.(*logrus.JSONFormatter); ok { + copy = *orig + copy.TimestampFormat = timestampFormatMillisecond + logrus.SetFormatter(©) + } + } + // If no clustering options are provided, default to a static // cluster 'defaultEtcdName=defaultEtcdPeerURL'. initialCluster := viper.GetString(flagEtcdInitialCluster) @@ -336,6 +349,10 @@ func StartCommand(initialize InitializeFunc) *cobra.Command { } } + if viper.GetBool(flagLogMillisecondTime) { + cfg.EtcdLogTimestampLayout = timestampFormatMillisecond + } + ctx, cancel := context.WithCancel(context.Background()) defer cancel() sensuBackend, err := initialize(ctx, cfg) @@ -550,6 +567,7 @@ func flagSet(server bool) *pflag.FlagSet { flagSet.Bool(flagInsecureSkipTLSVerify, viper.GetBool(flagInsecureSkipTLSVerify), "skip TLS verification (not recommended!)") flagSet.Bool(flagDebug, false, "enable debugging and profiling features") flagSet.String(flagLogLevel, viper.GetString(flagLogLevel), "logging level [panic, fatal, error, warn, info, debug, trace]") + flagSet.Bool(flagLogMillisecondTime, false, "use millisecond precision timestamps in logging output") flagSet.Int(backend.FlagEventdWorkers, viper.GetInt(backend.FlagEventdWorkers), "number of workers spawned for processing incoming events") flagSet.Int(backend.FlagEventdBufferSize, viper.GetInt(backend.FlagEventdBufferSize), "number of incoming events that can be buffered") flagSet.Int(backend.FlagKeepalivedWorkers, viper.GetInt(backend.FlagKeepalivedWorkers), "number of workers spawned for processing incoming keepalives") diff --git a/backend/config.go b/backend/config.go index 25d1bf153c..1c353f7f9e 100644 --- a/backend/config.go +++ b/backend/config.go @@ -114,9 +114,10 @@ type Config struct { TLS *corev2.TLSOptions - LogLevel string - EtcdLogLevel string - EtcdClientLogLevel string + LogLevel string + EtcdLogTimestampLayout string + EtcdLogLevel string + EtcdClientLogLevel string // Etcd unsafe configuration EtcdUnsafeNoFsync bool diff --git a/backend/etcd/etcd.go b/backend/etcd/etcd.go index 6b721b9403..4c809ed6e6 100644 --- a/backend/etcd/etcd.go +++ b/backend/etcd/etcd.go @@ -102,8 +102,9 @@ type Config struct { MaxRequestBytes uint QuotaBackendBytes int64 - LogLevel string - ClientLogLevel string + LogLevel string + ClientLogLevel string + LogTimestampLayout string UnsafeNoFsync bool } @@ -276,6 +277,11 @@ func NewEtcd(config *Config) (*Etcd, error) { logutil.DefaultZapLoggerConfig.Level.SetLevel(LogLevelToZap(config.LogLevel)) } + if config.LogTimestampLayout != "" { + encoder := zapcore.TimeEncoderOfLayout(config.LogTimestampLayout) + logutil.DefaultZapLoggerConfig.EncoderConfig.EncodeTime = encoder + } + // Unsafe options. cfg.UnsafeNoFsync = config.UnsafeNoFsync From 3c8e9ef0f090531558ba9117a3c88a887344c51a Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Tue, 7 Mar 2023 15:03:42 -0700 Subject: [PATCH 104/173] update changelog for 6.9.2 release Signed-off-by: Gustav Danielsson --- CHANGELOG-6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index f5a978cdc8..8cd5b4e584 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [6.9.2] - 2023-03-08 ### Added - Added GraphQL validator for query node depth From 8c6fa4cf7ecee37986b53f40cad4336651749849 Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Wed, 8 Mar 2023 16:03:15 -0700 Subject: [PATCH 105/173] update sensu/core/v2 sensu/core/v3 modules Signed-off-by: Gustav Danielsson --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index f533a7cfc2..11aae5523e 100644 --- a/go.mod +++ b/go.mod @@ -79,8 +79,8 @@ require ( github.com/go-test/deep v1.0.8 github.com/google/go-cmp v0.5.8 // indirect github.com/kr/pty v1.1.8 // indirect - github.com/sensu/core/v2 v2.16.1 - github.com/sensu/core/v3 v3.8.0-alpha6 + github.com/sensu/core/v2 v2.17.0 + github.com/sensu/core/v3 v3.8.1 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/sensu/sensu-go/types v0.12.0-alpha6 ) diff --git a/go.sum b/go.sum index 6073c6b0ae..08e521cc46 100644 --- a/go.sum +++ b/go.sum @@ -400,12 +400,12 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= -github.com/sensu/core/v2 v2.16.0-alpha6 h1:6WTEevm2tQEgCx50IL4aXomAXQip7s6kX4xR3uNVYlI= github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= -github.com/sensu/core/v2 v2.16.1 h1:lYicLM1PXq5Zwj5h7akXMFXvWcja12qMLzKsJr3qM4Q= -github.com/sensu/core/v2 v2.16.1/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= -github.com/sensu/core/v3 v3.8.0-alpha6 h1:ywO14aIHippeIAe2HBHrPhSdyBMs1pQtjvkYaHmEwGw= +github.com/sensu/core/v2 v2.17.0 h1:f8apafxkAqvnFTOMnlTFdFbDrmuW9/MC5lgvgC8UmWs= +github.com/sensu/core/v2 v2.17.0/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= +github.com/sensu/core/v3 v3.8.1 h1:RhSlvUUOmIR2SF3AqtjVvowSLgRVAaAKAh1SOQRDx5E= +github.com/sensu/core/v3 v3.8.1/go.mod h1:pxfUL8YOhebsaE2SUBov/gsUUqIzkeLM61yFpTeavhs= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= From cc066dfc9f27162bb371f779645747024ede0909 Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Thu, 16 Mar 2023 16:30:40 -0600 Subject: [PATCH 106/173] run graphql depth limit query on authenticated requests Signed-off-by: Gustav Danielsson --- graphql/service.go | 12 ++---------- graphql/validators.go | 9 ++++----- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/graphql/service.go b/graphql/service.go index e1bad1c08c..c5c341442f 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -193,19 +193,11 @@ func (service *Service) Do(ctx context.Context, p QueryParams) *Result { return &graphql.Result{Errors: gqlerrors.FormatErrors(err)} } - // run validators for unauthorized requests - if !p.IsAuthed { - rules := UnauthedValidators() - validationResult := graphql.ValidateDocument(&schema, AST, rules) - if !validationResult.IsValid { - return &graphql.Result{Errors: validationResult.Errors} - } - } - // validate document if !p.SkipValidation { validationFinishFn := MiddlewareHandleValidationDidStart(service, ¶ms) - validationResult := graphql.ValidateDocument(&schema, AST, nil) + rules := Validators() + validationResult := graphql.ValidateDocument(&schema, AST, rules) validationFinishFn(validationResult.Errors) if !validationResult.IsValid { return &graphql.Result{Errors: validationResult.Errors} diff --git a/graphql/validators.go b/graphql/validators.go index fa4051b66f..21a22fd60a 100644 --- a/graphql/validators.go +++ b/graphql/validators.go @@ -9,7 +9,7 @@ import ( ) const ( - MaxQueryNodeDepth = 5 + MaxQueryDepthLimit = 10 ) type maxDepthRule struct { @@ -18,10 +18,9 @@ type maxDepthRule struct { depthLimit int } -// These GraphQL validators will be run on unauthed requests -func UnauthedValidators() []graphql.ValidationRuleFn { - rules := []graphql.ValidationRuleFn{MaxDepthRule(MaxQueryNodeDepth)} - return rules +func Validators() []graphql.ValidationRuleFn { + customRules := []graphql.ValidationRuleFn{MaxDepthRule(MaxQueryDepthLimit)} + return append(graphql.SpecifiedRules, customRules...) } func MaxDepthRule(depthLimit int) graphql.ValidationRuleFn { From 8e74650b6d2787d39daf65867fed0478e8503221 Mon Sep 17 00:00:00 2001 From: Gustav Danielsson Date: Mon, 20 Mar 2023 10:51:05 -0600 Subject: [PATCH 107/173] make graphql query depth limit validation unskippable Signed-off-by: Gustav Danielsson --- graphql/service.go | 12 +++++++++--- graphql/validators.go | 7 +++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/graphql/service.go b/graphql/service.go index c5c341442f..7910b77337 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -193,11 +193,17 @@ func (service *Service) Do(ctx context.Context, p QueryParams) *Result { return &graphql.Result{Errors: gqlerrors.FormatErrors(err)} } - // validate document + // run mandatory (un-skippable) validators + rules := MandatoryValidators() + validationResult := graphql.ValidateDocument(&schema, AST, rules) + if !validationResult.IsValid { + return &graphql.Result{Errors: validationResult.Errors} + } + + // run built-in validators e.g. schema type validation if !p.SkipValidation { validationFinishFn := MiddlewareHandleValidationDidStart(service, ¶ms) - rules := Validators() - validationResult := graphql.ValidateDocument(&schema, AST, rules) + validationResult := graphql.ValidateDocument(&schema, AST, nil) validationFinishFn(validationResult.Errors) if !validationResult.IsValid { return &graphql.Result{Errors: validationResult.Errors} diff --git a/graphql/validators.go b/graphql/validators.go index 21a22fd60a..40d2994159 100644 --- a/graphql/validators.go +++ b/graphql/validators.go @@ -9,7 +9,7 @@ import ( ) const ( - MaxQueryDepthLimit = 10 + MaxQueryDepthLimit = 15 ) type maxDepthRule struct { @@ -18,9 +18,8 @@ type maxDepthRule struct { depthLimit int } -func Validators() []graphql.ValidationRuleFn { - customRules := []graphql.ValidationRuleFn{MaxDepthRule(MaxQueryDepthLimit)} - return append(graphql.SpecifiedRules, customRules...) +func MandatoryValidators() []graphql.ValidationRuleFn { + return []graphql.ValidationRuleFn{MaxDepthRule(MaxQueryDepthLimit)} } func MaxDepthRule(depthLimit int) graphql.ValidationRuleFn { From 00c1d8925b1c23888d71dc80ae61b1d10c9d8f9b Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Mon, 17 Apr 2023 13:29:49 -0700 Subject: [PATCH 108/173] Update gopsutil to 3.23.2 (#4981) Signed-off-by: Cyril Cressent --- go.mod | 7 +++---- go.sum | 27 ++++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index 11aae5523e..acd39652df 100644 --- a/go.mod +++ b/go.mod @@ -47,12 +47,12 @@ require ( github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 - github.com/shirou/gopsutil/v3 v3.21.12 + github.com/shirou/gopsutil/v3 v3.23.2 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.0 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.2 github.com/ulikunitz/xz v0.5.10 // indirect github.com/willf/pad v0.0.0-20160331131008-b3d780601022 go.etcd.io/bbolt v1.3.6 @@ -66,7 +66,7 @@ require ( golang.org/x/crypto v0.3.0 golang.org/x/mod v0.7.0 golang.org/x/net v0.3.0 - golang.org/x/sys v0.3.0 + golang.org/x/sys v0.5.0 golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba golang.org/x/tools v0.4.0 google.golang.org/grpc v1.41.0 @@ -77,7 +77,6 @@ require ( require ( github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect github.com/go-test/deep v1.0.8 - github.com/google/go-cmp v0.5.8 // indirect github.com/kr/pty v1.1.8 // indirect github.com/sensu/core/v2 v2.17.0 github.com/sensu/core/v3 v3.8.1 diff --git a/go.sum b/go.sum index 08e521cc46..0226f0ea72 100644 --- a/go.sum +++ b/go.sum @@ -183,8 +183,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -412,8 +412,8 @@ github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiT github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= github.com/sensu/sensu-go/types v0.12.0-alpha6 h1:tPuPysl6Ew0x0u5USLeSk/3NMMt7GLJh2uO1kVFRwQY= github.com/sensu/sensu-go/types v0.12.0-alpha6/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= -github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= -github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= +github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= +github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -444,8 +444,9 @@ github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= 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 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -453,14 +454,15 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 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/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= -github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= -github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= +github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= +github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -650,14 +652,13 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= From 2a6ab6e3fa430e45b7a3dbd2352e3eb0c417f5c2 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 20 Apr 2023 14:18:18 -0700 Subject: [PATCH 109/173] bump graphql-go to v0.8.1 Signed-off-by: Justin Kolberg --- go.mod | 4 +--- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index acd39652df..b00f193b14 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.4.2 github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c - github.com/graphql-go/graphql v0.7.10-0.20200426202700-116f19d099aa + github.com/graphql-go/graphql v0.8.1 github.com/gxed/GoEndian v0.0.0-20160916112711-0f5c6873267e // indirect github.com/gxed/eventfd v0.0.0-20160916113412-80a92cca79a8 // indirect github.com/hashicorp/go-version v1.2.0 @@ -83,5 +83,3 @@ require ( github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/sensu/sensu-go/types v0.12.0-alpha6 ) - -replace github.com/graphql-go/graphql => github.com/jamesdphillips/graphql v0.8.2 diff --git a/go.sum b/go.sum index 0226f0ea72..96f5994c73 100644 --- a/go.sum +++ b/go.sum @@ -203,6 +203,8 @@ github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0U github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c h1:94S+uoVVMpQAEOrqGjCDyUdML4dJDkh6aC4MYmXECg4= github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= +github.com/graphql-go/graphql v0.8.1 h1:p7/Ou/WpmulocJeEx7wjQy611rtXGQaAcXGqanuMMgc= +github.com/graphql-go/graphql v0.8.1/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= @@ -249,8 +251,6 @@ github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= github.com/ipfs/go-log/v2 v2.0.5 h1:fL4YI+1g5V/b1Yxr1qAiXTMg1H8z9vx/VmJxBuQMHvU= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/jamesdphillips/graphql v0.8.2 h1:/wM4I7FF9/X3cBqKv8PjfjXSx2FVwxmhr2y9l2JL9rc= -github.com/jamesdphillips/graphql v0.8.2/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= github.com/jbenet/go-reuseport v0.0.0-20180416043609-15a1cd37f050 h1:bfBi3IYMggKaHTwDr42m05AYbG/OQpo21oCQWuNelCg= github.com/jbenet/go-reuseport v0.0.0-20180416043609-15a1cd37f050/go.mod h1:hry/Nwg2mFor95Ql+X52uC4zdrZsdH8a0noOj8BLt9g= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= From 267fecc4374bac62bd54cead49c20ac61d167c8c Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 20 Apr 2023 14:40:21 -0700 Subject: [PATCH 110/173] typecast cfg.Types to *graphql.Object slice Signed-off-by: Justin Kolberg --- graphql/service.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/graphql/service.go b/graphql/service.go index 7910b77337..f7b6684a67 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -116,8 +116,9 @@ func (service *Service) RegisterUnion(t UnionDesc, impl UnionTypeResolver) { cfg := t.Config() registrar := func(m graphql.TypeMap) graphql.Type { cfg = t.Config() - newTypes := make([]*graphql.Object, len(cfg.Types)) - for i, t := range cfg.Types { + cfgTypes := cfg.Types.([]*graphql.Object) + newTypes := make([]*graphql.Object, len(cfgTypes)) + for i, t := range cfgTypes { objType := m[t.PrivateName].(*graphql.Object) newTypes[i] = objType } From cedb7a3547cf7463a728c1fce1531f33e253ec30 Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Wed, 17 May 2023 10:44:10 -0700 Subject: [PATCH 111/173] JWT Authentication Rework (#5007) * Implement refresh token reuse detection using a new Session store * Implement JWT refresh token rotation Instead of never expiring, 2 changes are made to refresh tokens: 1. A new refresh token is issued with each access token renewal This can serve as the basis to implement token "revocation" strategies for old refresh tokens, mitigating the impact of a stolen refresh token. 2. Refresh tokens have an expiration timestamp Paired with 1. above, this means that there is now a concept of "inactivity" baked into refresh tokens: if a user doesn't renew their access token before the refresh token expires, they will be forced to re-authenticate. This defaults to 12 hours of inactivity. Signed-off-by: Cyril Cressent --- CHANGELOG-6.md | 5 + backend/api/authentication.go | 118 ++++++++++++++++---- backend/api/authentication_test.go | 36 ++++-- backend/apid/routers/authentication.go | 8 +- backend/apid/routers/authentication_test.go | 3 + backend/authentication/authenticator.go | 2 +- backend/authentication/jwt/jwt.go | 34 ++++-- backend/authentication/jwt/jwt_test.go | 6 +- backend/store/etcd/session.go | 50 +++++++++ backend/store/etcd/session_test.go | 41 +++++++ backend/store/proxy.go | 18 +++ backend/store/store.go | 18 +++ go.mod | 2 +- go.sum | 3 +- testing/mockstore/session.go | 18 +++ 15 files changed, 311 insertions(+), 51 deletions(-) create mode 100644 backend/store/etcd/session.go create mode 100644 backend/store/etcd/session_test.go create mode 100644 testing/mockstore/session.go diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 09befd6b1b..2eac66588d 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -12,6 +12,11 @@ Versioning](http://semver.org/spec/v2.0.0.html). - Adding a flag at agent level to avoid collecting system.networks property in the agent entity state - Added silences sorting by expiration to GraphQL service - Added log-millisecond-timestamps backend configuration flag +- Added a session store, used to detect and prevent refresh token reuse + +### Changed +- Users are now automatically logged out after a period of inactivity (12h) + ## [6.9.2] - 2023-03-08 ### Added diff --git a/backend/api/authentication.go b/backend/api/authentication.go index a09ffe4c34..61d54e47fb 100644 --- a/backend/api/authentication.go +++ b/backend/api/authentication.go @@ -6,21 +6,25 @@ import ( "fmt" corev2 "github.com/sensu/core/v2" + "github.com/sensu/sensu-go/backend/authentication" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/authentication/providers/basic" + "github.com/sensu/sensu-go/backend/store" ) // AuthenticationClient is an API client for authentication. type AuthenticationClient struct { - auth *authentication.Authenticator + auth *authentication.Authenticator + sessionStore store.SessionStore } -// NewAuthenticationClient creates a new AuthenticationClient, given a a store -// and an authenticator. -func NewAuthenticationClient(auth *authentication.Authenticator) *AuthenticationClient { +// NewAuthenticationClient creates a new AuthenticationClient, given an +// authenticator and a session store. +func NewAuthenticationClient(auth *authentication.Authenticator, sessionStore store.SessionStore) *AuthenticationClient { return &AuthenticationClient{ - auth: auth, + auth: auth, + sessionStore: sessionStore, } } @@ -32,6 +36,13 @@ func (a *AuthenticationClient) CreateAccessToken(ctx context.Context, username, return nil, corev2.ErrUnauthorized } + // Initialize a new session for this user + sessionID, err := jwt.InitSession(claims.Subject) + if err != nil { + return nil, err + } + claims.SessionID = sessionID + // Add the 'system:users' group to this user claims.Groups = append(claims.Groups, "system:users") @@ -47,10 +58,23 @@ func (a *AuthenticationClient) CreateAccessToken(ctx context.Context, username, } // Create a refresh token and its signed version - refreshClaims := &corev2.Claims{StandardClaims: corev2.StandardClaims(claims.Subject)} - _, refreshTokenString, err := jwt.RefreshToken(refreshClaims) + refreshClaims := &corev2.Claims{ + StandardClaims: corev2.StandardClaims(claims.Subject), + SessionID: sessionID, + } + refreshToken, refreshTokenString, err := jwt.RefreshToken(refreshClaims) if err != nil { - return nil, fmt.Errorf("error creating access token: %s", err) + return nil, fmt.Errorf("error creating refresh token: %s", err) + } + + refreshTokenClaims, err := jwt.GetClaims(refreshToken) + if err != nil { + return nil, err + } + + // Store the refresh token's unique ID as part of this user's session + if err := a.sessionStore.UpdateSession(ctx, refreshTokenClaims.Subject, refreshTokenClaims.SessionID, refreshTokenClaims.Id); err != nil { + return nil, err } result := &corev2.Tokens{ @@ -60,7 +84,6 @@ func (a *AuthenticationClient) CreateAccessToken(ctx context.Context, username, } return result, nil - } // TestCreds detects if the username and password are valid. @@ -84,19 +107,37 @@ func (a *AuthenticationClient) TestCreds(ctx context.Context, username, password // // corev2.AccessTokenClaims -> *corev2.Claims // corev2.RefreshTokenClaims -> *corev2.Claims +// +// Given that we use JWTs for authentication, logging out just destroys the +// server side session such that it's not possible to get a new access token +// anymore, regardless of the refresh token presented by the user. +// +// Again, because we use JWTs, even after logging out, the access token bearer +// can still interact with the system until the token expires (up to 5 minutes +// by default). func (a *AuthenticationClient) Logout(ctx context.Context) error { - return nil + var accessClaims *corev2.Claims + + // Retrieve the access token's claims + if value := ctx.Value(corev2.AccessTokenClaims); value != nil { + accessClaims = value.(*corev2.Claims) + } else { + return corev2.ErrInvalidToken + } + + return a.sessionStore.DeleteSession(ctx, accessClaims.Subject, accessClaims.SessionID) } -// RefreshAccessToken refreshes an access token. The context must carry the -// user's access and refresh claims, as well as the previous token value, -// with the following context key-values: +// RefreshAccessToken refreshes an access/refresh token pair. The context must +// carry the user's access and refresh claims, as well as the previous token +// value, with the following context key-values: // // corev2.AccessTokenClaims -> *corev2.Claims // corev2.RefreshTokenClaims -> *corev2.Claims // corev2.RefreshTokenString -> string func (a *AuthenticationClient) RefreshAccessToken(ctx context.Context) (*corev2.Tokens, error) { var accessClaims *corev2.Claims + var refreshClaims *corev2.Claims // Get the access token claims if value := ctx.Value(corev2.AccessTokenClaims); value != nil { @@ -106,15 +147,25 @@ func (a *AuthenticationClient) RefreshAccessToken(ctx context.Context) (*corev2. } // Get the refresh token claims - if value := ctx.Value(corev2.RefreshTokenClaims); value == nil { + if value := ctx.Value(corev2.RefreshTokenClaims); value != nil { + refreshClaims = value.(*corev2.Claims) + } else { return nil, corev2.ErrInvalidToken } - // Get the refresh token string - var refreshTokenString string - if value := ctx.Value(corev2.RefreshTokenString); value != nil { - refreshTokenString = value.(string) - } else { + sessionID := accessClaims.SessionID + + storedRefreshTokenID, err := a.sessionStore.GetSession(ctx, refreshClaims.Subject, refreshClaims.SessionID) + if err != nil { + return nil, err + } + + // If the supplied refresh token's ID doesn't match what the session + // expected it to be. Whatever the reason for that, be it refresh token + // reuse or otherwise, we just tear down that session, forcing the user to + // fully reauthenticate. + if refreshClaims.Id != storedRefreshTokenID { + a.Logout(ctx) return nil, corev2.ErrInvalidToken } @@ -136,6 +187,9 @@ func (a *AuthenticationClient) RefreshAccessToken(ctx context.Context) (*corev2. return nil, err } + // Carry over the session ID + claims.SessionID = sessionID + // Ensure the 'system:users' group is present claims.Groups = append(claims.Groups, "system:users") @@ -145,14 +199,34 @@ func (a *AuthenticationClient) RefreshAccessToken(ctx context.Context) (*corev2. } // Issue a new access token - _, accessTokenString, err := jwt.AccessToken(claims) + _, newAccessTokenString, err := jwt.AccessToken(claims) + if err != nil { + return nil, err + } + + // Create a new refresh token, carrying over the session ID + newRefreshClaims := &corev2.Claims{ + StandardClaims: corev2.StandardClaims(claims.Subject), + SessionID: sessionID, + } + newRefreshToken, newRefreshTokenString, err := jwt.RefreshToken(newRefreshClaims) + if err != nil { + return nil, fmt.Errorf("error creating refresh token: %s", err) + } + + newRefreshTokenClaims, err := jwt.GetClaims(newRefreshToken) if err != nil { return nil, err } + // Update the session with the new refresh token's unique ID + if err := a.sessionStore.UpdateSession(ctx, claims.Subject, refreshClaims.SessionID, newRefreshTokenClaims.Id); err != nil { + return nil, err + } + return &corev2.Tokens{ - Access: accessTokenString, + Access: newAccessTokenString, ExpiresAt: claims.ExpiresAt, - Refresh: refreshTokenString, + Refresh: newRefreshTokenString, }, nil } diff --git a/backend/api/authentication_test.go b/backend/api/authentication_test.go index b8652d5f84..6951e8b47a 100644 --- a/backend/api/authentication_test.go +++ b/backend/api/authentication_test.go @@ -26,7 +26,10 @@ func defaultStore() store.Store { } func contextWithClaims(claims *corev2.Claims) context.Context { - refreshClaims := &corev2.Claims{StandardClaims: corev2.StandardClaims(claims.Subject)} + refreshClaims := &corev2.Claims{ + StandardClaims: corev2.StandardClaims(claims.Subject), + SessionID: claims.SessionID, + } ctx := context.Background() ctx = context.WithValue(ctx, corev2.AccessTokenClaims, claims) ctx = context.WithValue(ctx, corev2.RefreshTokenClaims, refreshClaims) @@ -60,6 +63,7 @@ func TestCreateAccessToken(t *testing.T) { user := corev2.FixtureUser("foo") store := &mockstore.MockStore{} store.On("AuthenticateUser", mock.Anything, "foo", "P@ssw0rd!").Return(user, errors.New("error")) + store.On("UpdateSession", mock.Anything, "foo", mock.Anything, mock.Anything).Return(nil) return store }, Authenticator: defaultAuth, @@ -76,6 +80,7 @@ func TestCreateAccessToken(t *testing.T) { store := &mockstore.MockStore{} user := corev2.FixtureUser("foo") store.On("AuthenticateUser", mock.Anything, "foo", "P@ssw0rd!").Return(user, nil) + store.On("UpdateSession", mock.Anything, "foo", mock.Anything, mock.Anything).Return(nil) return store }, Authenticator: defaultAuth, @@ -85,7 +90,7 @@ func TestCreateAccessToken(t *testing.T) { for _, test := range tests { t.Run(test.Name, func(t *testing.T) { store := test.Store() - authn := NewAuthenticationClient(test.Authenticator(store)) + authn := NewAuthenticationClient(test.Authenticator(store), store) tokens, err := authn.CreateAccessToken(test.Context(), test.Username, test.Password) if test.WantError && err == nil { t.Fatal("want error, got nil") @@ -158,7 +163,7 @@ func TestTestCreds(t *testing.T) { for _, test := range tests { t.Run(test.Name, func(t *testing.T) { store := test.Store() - authn := NewAuthenticationClient(test.Authenticator(store)) + authn := NewAuthenticationClient(test.Authenticator(store), store) err := authn.TestCreds(test.Context(), test.Username, test.Password) if test.WantError && test.Error != err { @@ -175,28 +180,35 @@ func TestTestCreds(t *testing.T) { func TestRefreshAccessToken(t *testing.T) { tests := []struct { Name string - Store func() store.Store + Store func(string) store.Store Authenticator func(store.Store) *authentication.Authenticator - Context func(*corev2.Claims) context.Context + Context func(*corev2.Claims) (context.Context, string) WantError bool Error error }{ { Name: "success", - Store: func() store.Store { + Store: func(refreshTokenId string) store.Store { st := &mockstore.MockStore{} user := &corev2.User{Username: "foo"} st.On("GetUser", mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("string"), ).Return(user, nil) + st.On("GetSession", + mock.AnythingOfType("*context.valueCtx"), user.Username, mock.AnythingOfType("string"), + ).Return(refreshTokenId, nil) + st.On("UpdateSession", + mock.AnythingOfType("*context.valueCtx"), user.Username, mock.AnythingOfType("string"), mock.AnythingOfType("string"), + ).Return(nil) return st }, Authenticator: defaultAuth, - Context: func(claims *corev2.Claims) context.Context { + Context: func(claims *corev2.Claims) (context.Context, string) { ctx := contextWithClaims(claims) - _, refreshTokenString, _ := jwt.RefreshToken(ctx.Value(corev2.RefreshTokenClaims).(*corev2.Claims)) + refreshToken, refreshTokenString, _ := jwt.RefreshToken(ctx.Value(corev2.RefreshTokenClaims).(*corev2.Claims)) + refreshTokenClaims, _ := jwt.GetClaims(refreshToken) ctx = context.WithValue(ctx, corev2.RefreshTokenString, refreshTokenString) - return ctx + return ctx, refreshTokenClaims.Id }, }, } @@ -204,10 +216,10 @@ func TestRefreshAccessToken(t *testing.T) { for _, test := range tests { t.Run(test.Name, func(t *testing.T) { claims := corev2.FixtureClaims("foo", nil) - ctx := test.Context(claims) - store := test.Store() + ctx, refreshTokenId := test.Context(claims) + store := test.Store(refreshTokenId) authenticator := test.Authenticator(store) - auth := NewAuthenticationClient(authenticator) + auth := NewAuthenticationClient(authenticator, store) _, err := auth.RefreshAccessToken(ctx) if err == nil && test.WantError { t.Fatal("got non-nil error") diff --git a/backend/apid/routers/authentication.go b/backend/apid/routers/authentication.go index 4d75c1bc71..9f05338c52 100644 --- a/backend/apid/routers/authentication.go +++ b/backend/apid/routers/authentication.go @@ -47,7 +47,7 @@ func (a *AuthenticationRouter) login(w http.ResponseWriter, r *http.Request) { // issuer URL ctx := context.WithValue(r.Context(), jwt.IssuerURLKey, issuerURL(r)) - client := api.NewAuthenticationClient(a.authenticator) + client := api.NewAuthenticationClient(a.authenticator, a.store) tokens, err := client.CreateAccessToken(ctx, username, password) if err != nil { if err == corev2.ErrUnauthorized { @@ -76,7 +76,7 @@ func (a *AuthenticationRouter) test(w http.ResponseWriter, r *http.Request) { return } - client := api.NewAuthenticationClient(a.authenticator) + client := api.NewAuthenticationClient(a.authenticator, a.store) err := client.TestCreds(r.Context(), username, password) if err == nil { return @@ -90,7 +90,7 @@ func (a *AuthenticationRouter) test(w http.ResponseWriter, r *http.Request) { // logout handles the logout flow func (a *AuthenticationRouter) logout(w http.ResponseWriter, r *http.Request) { - client := api.NewAuthenticationClient(a.authenticator) + client := api.NewAuthenticationClient(a.authenticator, a.store) if err := client.Logout(r.Context()); err == nil { return } @@ -100,7 +100,7 @@ func (a *AuthenticationRouter) logout(w http.ResponseWriter, r *http.Request) { // token handles logic for issuing new access tokens func (a *AuthenticationRouter) token(w http.ResponseWriter, r *http.Request) { - client := api.NewAuthenticationClient(a.authenticator) + client := api.NewAuthenticationClient(a.authenticator, a.store) // Determine the URL that serves this request so it can be later used as the // issuer URL diff --git a/backend/apid/routers/authentication_test.go b/backend/apid/routers/authentication_test.go index 86619b7f0e..1b97a4c51e 100644 --- a/backend/apid/routers/authentication_test.go +++ b/backend/apid/routers/authentication_test.go @@ -52,6 +52,9 @@ func TestLoginSuccessful(t *testing.T) { store. On("AuthenticateUser", mock.Anything, "foo", "P@ssw0rd!"). Return(user, nil) + store. + On("UpdateSession", mock.Anything, "foo", mock.Anything, mock.Anything). + Return(nil) req, _ := http.NewRequest(http.MethodGet, "/auth", nil) req.SetBasicAuth("foo", "P@ssw0rd!") diff --git a/backend/authentication/authenticator.go b/backend/authentication/authenticator.go index 889b3c4e5e..0aa59d12d0 100644 --- a/backend/authentication/authenticator.go +++ b/backend/authentication/authenticator.go @@ -25,7 +25,7 @@ func (a *Authenticator) Authenticate(ctx context.Context, username, password str // TODO(palourde): The Go runtime randomizes map iteration order so the // providers resolution order might vary on each authentication, and // consequently provoke weird behavior if the same username/password - // combinaison exists in multiple providers. + // combination exists in multiple providers. for _, provider := range a.providers { claims, err := provider.Authenticate(ctx, username, password) if err != nil || claims == nil { diff --git a/backend/authentication/jwt/jwt.go b/backend/authentication/jwt/jwt.go index 397fd58257..09c65d526f 100644 --- a/backend/authentication/jwt/jwt.go +++ b/backend/authentication/jwt/jwt.go @@ -26,11 +26,12 @@ const ( ) var ( - defaultExpiration = time.Minute * 5 - secret []byte - privateKey *ecdsa.PrivateKey - publicKey *ecdsa.PublicKey - signingMethod jwt.SigningMethod + defaultAccessTokenLifespan = 5 * time.Minute + defaultRefreshTokenLifespan = 12 * time.Hour + secret []byte + privateKey *ecdsa.PrivateKey + publicKey *ecdsa.PublicKey + signingMethod jwt.SigningMethod ) func init() { @@ -57,7 +58,7 @@ func AccessToken(claims *corev2.Claims) (*jwt.Token, string, error) { claims.Id = jti // Add an expiration to the token - claims.ExpiresAt = time.Now().Add(defaultExpiration).Unix() + claims.ExpiresAt = time.Now().Add(defaultAccessTokenLifespan).Unix() token := jwt.NewWithClaims(signingMethod, claims) @@ -86,8 +87,11 @@ func NewClaims(user *corev2.User) (*corev2.Claims, error) { } claims := &corev2.Claims{ + // NOTE(ccressent): StandardClaims is deprecated according to the + // library's documentation. We should replace its usage with + // RegisteredClaims. StandardClaims: jwt.StandardClaims{ - ExpiresAt: time.Now().Add(defaultExpiration).Unix(), + ExpiresAt: time.Now().Add(defaultAccessTokenLifespan).Unix(), Id: jti, Subject: user.Username, }, @@ -194,6 +198,17 @@ func InitSecret(store store.Store) error { return nil } +// InitSession initializes a new session for the given username, returning a +// unique identifier for the new session. +func InitSession(username string) (string, error) { + sessionID, err := GenJTI() + if err != nil { + return "", err + } + + return sessionID, nil +} + // parseToken takes a signed token and parse it to verify its integrity func parseToken(tokenString string) (*jwt.Token, error) { t, err := jwt.ParseWithClaims(tokenString, &types.Claims{}, func(token *jwt.Token) (interface{}, error) { @@ -239,6 +254,11 @@ func RefreshToken(claims *corev2.Claims) (*jwt.Token, string, error) { } claims.Id = jti + // Add issuance and expiration timestamps to the token + now := time.Now() + claims.IssuedAt = now.Unix() + claims.ExpiresAt = now.Add(defaultRefreshTokenLifespan).Unix() + token := jwt.NewWithClaims(signingMethod, claims) // Determine which key to use to sign the token diff --git a/backend/authentication/jwt/jwt_test.go b/backend/authentication/jwt/jwt_test.go index 7ffaba5878..0abc6ba5ec 100644 --- a/backend/authentication/jwt/jwt_test.go +++ b/backend/authentication/jwt/jwt_test.go @@ -121,7 +121,7 @@ func TestValidateTokenError(t *testing.T) { assert.NoError(t, err) // The token should expire after the expiration time - testTime.Set(time.Now().Add(defaultExpiration + time.Hour)) + testTime.Set(time.Now().Add(defaultAccessTokenLifespan + time.Hour)) _, err = ValidateToken(tokenString) assert.Error(t, err) } @@ -134,7 +134,7 @@ func TestValidateExpiredToken(t *testing.T) { _, tokenString, _ := AccessToken(claims) // Wait for the token to expire - testTime.Set(time.Now().Add(defaultExpiration + time.Second)) + testTime.Set(time.Now().Add(defaultAccessTokenLifespan + time.Second)) _, err := ValidateExpiredToken(tokenString) assert.NoError(t, err, "An expired token should not be considered as invalid") } @@ -158,7 +158,7 @@ func TestValidateExpiredTokenInvalid(t *testing.T) { _, tokenString, _ := AccessToken(claims) // The token will expire - testTime.Set(time.Now().Add(defaultExpiration + time.Second)) + testTime.Set(time.Now().Add(defaultAccessTokenLifespan + time.Second)) // Modify the secret so it's no longer valid secret = []byte("qux") diff --git a/backend/store/etcd/session.go b/backend/store/etcd/session.go new file mode 100644 index 0000000000..9f95b85bf1 --- /dev/null +++ b/backend/store/etcd/session.go @@ -0,0 +1,50 @@ +package etcd + +import ( + "context" + "fmt" + + "github.com/sensu/sensu-go/backend/store" + "go.etcd.io/etcd/client/v3" +) + +func userSessionPath(username, sessionID string) string { + return fmt.Sprintf("%s/user_sessions/%s/%s", EtcdRoot, username, sessionID) +} + +// GetSession retrieves the session state uniquely identified by the given +// username and session ID. +func (s *Store) GetSession(ctx context.Context, username, sessionID string) (string, error) { + sessionPath := userSessionPath(username, sessionID) + + resp, err := s.client.Get(ctx, sessionPath, clientv3.WithLimit(1)) + if err != nil { + return "", err + } + + if len(resp.Kvs) == 0 { + return "", &store.ErrNotFound{Key: sessionPath} + } + + return string(resp.Kvs[0].Value), nil +} + +// UpdateSession applies the supplied state to the session uniquely identified +// by the given username and session ID. +func (s *Store) UpdateSession(ctx context.Context, username, sessionID, state string) error { + if _, err := s.client.Put(ctx, userSessionPath(username, sessionID), state); err != nil { + return err + } + + return nil +} + +// DeleteSession deletes the session uniquely identified by the given username +// and session ID. +func (s *Store) DeleteSession(ctx context.Context, username, sessionID string) error { + if _, err := s.client.Delete(ctx, userSessionPath(username, sessionID)); err != nil { + return err + } + + return nil +} diff --git a/backend/store/etcd/session_test.go b/backend/store/etcd/session_test.go new file mode 100644 index 0000000000..b43e400404 --- /dev/null +++ b/backend/store/etcd/session_test.go @@ -0,0 +1,41 @@ +//go:build integration && !race +// +build integration,!race + +package etcd + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/sensu/sensu-go/backend/store" +) + +func TestSessionStore(t *testing.T) { + testWithEtcd(t, func(s store.Store) { + ctx := context.Background() + username := "user1" + sessionID := "abcdefghijklmnopqrstuvwxyz" + state := "some stored state" + + // Create some new session state + err := s.UpdateSession(ctx, username, sessionID, state) + assert.NoError(t, err) + + // Retrieve session + retrievedState, err := s.GetSession(ctx, username, sessionID) + assert.NoError(t, err) + assert.Equal(t, retrievedState, state) + + // Delete session + err = s.DeleteSession(ctx, username, sessionID) + assert.NoError(t, err) + + // Retrieve non existent session + unknownUser := "unknown_user" + unknownSessionID := "unknown_session_id" + _, err = s.GetSession(ctx, unknownUser, unknownSessionID) + assert.Error(t, err) + }) +} diff --git a/backend/store/proxy.go b/backend/store/proxy.go index 3d93705500..b678f12d4c 100644 --- a/backend/store/proxy.go +++ b/backend/store/proxy.go @@ -463,6 +463,24 @@ func (s *StoreProxy) UpdateRole(ctx context.Context, role *types.Role) error { return s.do().UpdateRole(ctx, role) } +// GetSession retrieves the session state uniquely identified by the given +// username and session ID. +func (s *StoreProxy) GetSession(ctx context.Context, username, sessionID string) (string, error) { + return s.do().GetSession(ctx, username, sessionID) +} + +// UpdateSession applies the supplied state to the session uniquely identified +// by the given username and session ID. +func (s *StoreProxy) UpdateSession(ctx context.Context, username, sessionID, state string) error { + return s.do().UpdateSession(ctx, username, sessionID, state) +} + +// DeleteSession deletes the session uniquely identified by the give username +// and session ID. +func (s *StoreProxy) DeleteSession(ctx context.Context, username, sessionID string) error { + return s.do().DeleteSession(ctx, username, sessionID) +} + // DeleteSilencedEntryByName deletes an entry using the given id. func (s *StoreProxy) DeleteSilencedEntryByName(ctx context.Context, id ...string) error { return s.do().DeleteSilencedEntryByName(ctx, id...) diff --git a/backend/store/store.go b/backend/store/store.go index 51c5da1d35..8953242c89 100644 --- a/backend/store/store.go +++ b/backend/store/store.go @@ -214,6 +214,9 @@ type Store interface { // RoleBindingStore provides an interface for managing role bindings RoleBindingStore + // SessionStore provides an interface for managing user sessions + SessionStore + // SilencedStore provides an interface for managing silenced entries, // consisting of entities, subscriptions and/or checks SilencedStore @@ -263,6 +266,21 @@ type AuthenticationStore interface { UpdateJWTSecret(secret []byte) error } +// SessionStore provides methods for managing user sessions +type SessionStore interface { + // GetSession retrieves the session state uniquely identified by the given + // username and session ID. + GetSession(ctx context.Context, username, sessionID string) (string, error) + + // UpdateSession applies the supplied state to the session uniquely + // identified by the given username and session ID. + UpdateSession(ctx context.Context, username, sessionID string, state string) error + + // DeleteSession deletes the session uniquely identified by the given + // username and session ID. + DeleteSession(ctx context.Context, username, sessionID string) error +} + // CheckConfigStore provides methods for managing checks configuration type CheckConfigStore interface { // DeleteCheckConfigByName deletes a check's configuration using the given name diff --git a/go.mod b/go.mod index b00f193b14..bfec74409c 100644 --- a/go.mod +++ b/go.mod @@ -78,7 +78,7 @@ require ( github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect github.com/go-test/deep v1.0.8 github.com/kr/pty v1.1.8 // indirect - github.com/sensu/core/v2 v2.17.0 + github.com/sensu/core/v2 v2.19.0 github.com/sensu/core/v3 v3.8.1 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/sensu/sensu-go/types v0.12.0-alpha6 diff --git a/go.sum b/go.sum index 96f5994c73..25de548a6a 100644 --- a/go.sum +++ b/go.sum @@ -401,8 +401,9 @@ github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmR github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= -github.com/sensu/core/v2 v2.17.0 h1:f8apafxkAqvnFTOMnlTFdFbDrmuW9/MC5lgvgC8UmWs= github.com/sensu/core/v2 v2.17.0/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= +github.com/sensu/core/v2 v2.19.0 h1:EoCOYr1sNFUXNTrN5WcYcsc77N+Jbhliz8XnAXiSi7o= +github.com/sensu/core/v2 v2.19.0/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= github.com/sensu/core/v3 v3.8.1 h1:RhSlvUUOmIR2SF3AqtjVvowSLgRVAaAKAh1SOQRDx5E= github.com/sensu/core/v3 v3.8.1/go.mod h1:pxfUL8YOhebsaE2SUBov/gsUUqIzkeLM61yFpTeavhs= diff --git a/testing/mockstore/session.go b/testing/mockstore/session.go new file mode 100644 index 0000000000..d69de31ca7 --- /dev/null +++ b/testing/mockstore/session.go @@ -0,0 +1,18 @@ +package mockstore + +import "context" + +func (s *MockStore) GetSession(ctx context.Context, username, sessionID string) (string, error) { + args := s.Called(ctx, username, sessionID) + return args.Get(0).(string), args.Error(1) +} + +func (s *MockStore) UpdateSession(ctx context.Context, username, sessionID, state string) error { + args := s.Called(ctx, username, sessionID, state) + return args.Error(0) +} + +func (s *MockStore) DeleteSession(ctx context.Context, username, sessionID string) error { + args := s.Called(ctx, username, sessionID) + return args.Error(0) +} From 1065c3dc447789948eaef50f63f260ddda9b6c6e Mon Sep 17 00:00:00 2001 From: Francis Guimond Date: Wed, 17 May 2023 14:16:40 -0400 Subject: [PATCH 112/173] Log handler error at error level instead of info level (#5011) Signed-off-by: Francis Guimond --- CHANGELOG-6.md | 1 + backend/pipeline/handler/legacy.go | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 2eac66588d..6e4569471b 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -15,6 +15,7 @@ Versioning](http://semver.org/spec/v2.0.0.html). - Added a session store, used to detect and prevent refresh token reuse ### Changed +- Log handler error at error level instead of info level - Users are now automatically logged out after a period of inactivity (12h) ## [6.9.2] - 2023-03-08 diff --git a/backend/pipeline/handler/legacy.go b/backend/pipeline/handler/legacy.go index 79e4976295..aef06ba748 100644 --- a/backend/pipeline/handler/legacy.go +++ b/backend/pipeline/handler/legacy.go @@ -84,7 +84,11 @@ func (l *LegacyAdapter) Handle(ctx context.Context, ref *corev2.ResourceReferenc } fields["status"] = result.Status fields["output"] = result.Output - logger.WithFields(fields).Info("event pipe handler executed") + if result.Status == 0 { + logger.WithFields(fields).Info("event pipe handler executed") + } else { + logger.WithFields(fields).Error("event pipe handler returned non ok status code") + } case "tcp", "udp": err := l.socketHandler(ctx, handler, event, mutatedData) if err != nil { From 04a69af618fe1cbfda51cae08bdec64a4713b500 Mon Sep 17 00:00:00 2001 From: Cyril Cressent Date: Mon, 22 May 2023 11:42:31 -0700 Subject: [PATCH 113/173] Update CHANGELOG for 6.10.0 (#5015) Signed-off-by: Cyril Cressent --- CHANGELOG-6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 6e4569471b..6def9d8e1a 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [6.10.0] - 2023-05-23 ### Added - Adding a flag at agent level to avoid collecting system.networks property in the agent entity state From f6be2372bf0ac539ea4f51158332b274af8f02ac Mon Sep 17 00:00:00 2001 From: jadiunr Date: Tue, 11 Jul 2023 09:05:28 +0900 Subject: [PATCH 114/173] Add support escape special characters in InfluxDB Line Signed-off-by: jadiunr --- CHANGELOG-6.md | 1 + agent/transformers/influx_db.go | 34 ++++++++++++++++------- agent/transformers/influx_db_test.go | 40 ++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 9 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 6e4569471b..e899421b34 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -13,6 +13,7 @@ Versioning](http://semver.org/spec/v2.0.0.html). - Added silences sorting by expiration to GraphQL service - Added log-millisecond-timestamps backend configuration flag - Added a session store, used to detect and prevent refresh token reuse +- Added support escape special characters in InfluxDB Line ### Changed - Log handler error at error level instead of info level diff --git a/agent/transformers/influx_db.go b/agent/transformers/influx_db.go index 016583e45d..0c0911d6c5 100644 --- a/agent/transformers/influx_db.go +++ b/agent/transformers/influx_db.go @@ -57,28 +57,28 @@ OUTER: fields["line"] = l l++ i := Influx{} - args := strings.Split(line, " ") + args := splitWithoutEscaped(line, " ") if len(args) != 3 && len(args) != 2 { logger.WithFields(fields).WithError(ErrMetricExtraction).Error("influxdb line format requires 2 arguments with a 3rd (optional) timestamp") continue } - measurementTag := strings.Split(args[0], ",") - i.Measurement = measurementTag[0] + measurementTag := splitWithoutEscaped(args[0], ",") + i.Measurement = unescape(measurementTag[0]) tagList := []*types.MetricTag{} if len(measurementTag) == 1 { i.TagSet = tagList } else { for i, tagSet := range measurementTag { if i != 0 { - ts := strings.Split(tagSet, "=") + ts := splitWithoutEscaped(tagSet, "=") if len(ts) != 2 { logger.WithFields(fields).WithError(ErrMetricExtraction).Error("metric tag set is invalid, must contain a key=value pair") continue OUTER } tag := &types.MetricTag{ - Name: ts[0], - Value: ts[1], + Name: unescape(ts[0]), + Value: unescape(ts[1]), } tagList = append(tagList, tag) } @@ -90,10 +90,10 @@ OUTER: i.TagSet = append(i.TagSet, event.Check.OutputMetricTags...) } - fieldSets := strings.Split(args[1], ",") + fieldSets := splitWithoutEscaped(args[1], ",") fieldList := []*Field{} for _, fieldSet := range fieldSets { - fs := strings.Split(fieldSet, "=") + fs := splitWithoutEscaped(fieldSet, "=") if len(fs) != 2 { logger.WithFields(fields).WithError(ErrMetricExtraction).Error("metric field set is invalid, must contain a key=value pair") continue OUTER @@ -104,7 +104,7 @@ OUTER: continue OUTER } field := &Field{ - Key: fs[0], + Key: unescape(fs[0]), Value: f, } fieldList = append(fieldList, field) @@ -133,3 +133,19 @@ OUTER: return influxList } + +func splitWithoutEscaped(s, sep string) []string { + s = strings.ReplaceAll(s, `\` + sep, "\x00") + segments := strings.Split(s, sep) + for i := range segments { + segments[i] = strings.ReplaceAll(segments[i], "\x00", sep) + } + return segments +} + +func unescape(s string) string { + s = strings.ReplaceAll(s, `\\`, "\x00") + s = strings.ReplaceAll(s, `\`, "") + s = strings.ReplaceAll(s, "\x00", `\`) + return s +} diff --git a/agent/transformers/influx_db_test.go b/agent/transformers/influx_db_test.go index 43ecd8b542..6f0dcf0f38 100644 --- a/agent/transformers/influx_db_test.go +++ b/agent/transformers/influx_db_test.go @@ -129,6 +129,46 @@ func TestParseInflux(t *testing.T) { }, }, }, + { + metric: "wea\\ ther,locat\\,ion=us-mid\\=west,sea\"son=sum\\\\mer te\\ mp\\,er\\=at\"ure=82,h\\ um\\,id\\=it\"y=30 1465839830100400200\nw\\ e\\,a\\=t\"her te\\ mp\\,er\\=at\"ure=82 1465839830100400200\n", + expectedFormat: InfluxList{ + { + Measurement: "wea ther", + TagSet: []*types.MetricTag{ + { + Name: "locat,ion", + Value: "us-mid=west", + }, + { + Name: `sea"son`, + Value: `sum\mer`, + }, + }, + FieldSet: []*Field{ + { + Key: `te mp,er=at"ure`, + Value: 82, + }, + { + Key: `h um,id=it"y`, + Value: 30, + }, + }, + Timestamp: 1465839830, + }, + { + Measurement: `w e,a=t"her`, + TagSet: []*types.MetricTag{}, + FieldSet: []*Field{ + { + Key: `te mp,er=at"ure`, + Value: 82, + }, + }, + Timestamp: 1465839830, + }, + }, + }, { metric: "weather temperature=82", timeInconclusive: true, From fa78bc51ebc1941bbd63ba68f828259cd8070e42 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Mon, 23 Oct 2023 10:29:07 -0700 Subject: [PATCH 115/173] Update the types package to last published release state (#5032) * git co types/v0.12.0-alpha8 ./types Signed-off-by: Christian Kruse * remove broken integration tests Signed-off-by: Christian Kruse --------- Signed-off-by: Christian Kruse --- backend/backend_test.go | 147 ------------------------------------ types/aliases.go | 2 +- types/compat/compat.go | 4 +- types/compat/compat_test.go | 4 +- types/go.mod | 10 +-- types/go.sum | 66 +++++++++------- types/versions.go | 64 ---------------- types/versions_test.go | 67 ---------------- types/wrapper.go | 112 +++------------------------ types/wrapper_test.go | 109 +------------------------- 10 files changed, 62 insertions(+), 523 deletions(-) delete mode 100644 backend/backend_test.go delete mode 100644 types/versions.go delete mode 100644 types/versions_test.go diff --git a/backend/backend_test.go b/backend/backend_test.go deleted file mode 100644 index 6ceeb22785..0000000000 --- a/backend/backend_test.go +++ /dev/null @@ -1,147 +0,0 @@ -//go:build integration -// +build integration - -package backend - -import ( - "context" - "encoding/base64" - "fmt" - "net" - "net/http" - "sync" - "testing" - "time" - - "github.com/sensu/sensu-go/backend/etcd" - "github.com/sensu/sensu-go/backend/seeds" - etcdstore "github.com/sensu/sensu-go/backend/store/etcd" - "github.com/sensu/sensu-go/testing/testutil" - "github.com/sensu/sensu-go/transport" - "github.com/sensu/sensu-go/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func retryConnect(t *testing.T, address string) { - var err error - var conn net.Conn - for i := 0; i < 5; i++ { - conn, err = net.Dial("tcp", address) - if err == nil { - _ = conn.Close() - continue - } - time.Sleep(time.Duration(i) * time.Second) - } - if err != nil { - t.Fatal(err) - } -} - -func TestBackendHTTPListener(t *testing.T) { - // tt = Test Table - tt := []struct { - name string - httpScheme string - wsScheme string - tls *types.TLSOptions - }{ - {"HTTP", "http", "ws", nil}, - {"HTTPS", "https", "wss", &types.TLSOptions{ - CertFile: "../util/ssl/etcd1.pem", - KeyFile: "../util/ssl/etcd1-key.pem", - TrustedCAFile: "../util/ssl/ca.pem", - InsecureSkipVerify: false}}, - } - // tc = Test Case - for _, tc := range tt { - t.Run(tc.name, func(t *testing.T) { - dataPath, remove := testutil.TempDir(t) - defer remove() - - cachePath, cleanup := testutil.TempDir(t) - defer cleanup() - - clURL := fmt.Sprintf("%s://127.0.0.1:0", tc.httpScheme) - apURL := fmt.Sprintf("%s://127.0.0.1:0", tc.httpScheme) - agentPort := 8081 - apiPort := 8080 - initCluster := fmt.Sprintf("default=%s", apURL) - - var tlsInfo etcd.TLSInfo - if tc.tls != nil { - tlsInfo = etcd.TLSInfo{ - ClientCertAuth: true, - CertFile: tc.tls.CertFile, - KeyFile: tc.tls.KeyFile, - TrustedCAFile: tc.tls.TrustedCAFile, - } - } - - cfg := &Config{ - AgentHost: "127.0.0.1", - AgentPort: agentPort, - APIListenAddress: fmt.Sprintf("127.0.0.1:%d", apiPort), - StateDir: dataPath, - CacheDir: cachePath, - TLS: tc.tls, - EtcdAdvertiseClientURLs: []string{clURL}, - EtcdListenClientURLs: []string{clURL}, - EtcdListenPeerURLs: []string{apURL}, - EtcdInitialCluster: initCluster, - EtcdInitialClusterState: etcd.ClusterStateNew, - EtcdInitialAdvertisePeerURLs: []string{apURL}, - EtcdName: "default", - EtcdClientTLSInfo: tlsInfo, - EtcdPeerTLSInfo: tlsInfo, - EtcdUseEmbeddedClient: true, - EtcdLogLevel: "info", - EtcdClientLogLevel: "error", - DisablePlatformMetrics: true, - } - ctx, cancel := context.WithCancel(context.Background()) - b, err := Initialize(ctx, cfg) - if err != nil { - t.Fatalf("failed to start backend: %s", err) - } - - store := etcdstore.NewStore(b.Client, cfg.EtcdName) - if err := seeds.SeedInitialData(store); err != nil { - t.Fatal(err) - } - - var runError error - var runWg sync.WaitGroup - runWg.Add(1) - go func() { - defer runWg.Done() - runError = b.Run() - }() - defer func() { - runWg.Wait() - assert.NoError(t, runError) - }() - - retryConnect(t, fmt.Sprintf("127.0.0.1:%d", agentPort)) - retryConnect(t, fmt.Sprintf("127.0.0.1:%d", apiPort)) - - userCredentials := base64.StdEncoding.EncodeToString([]byte("agent:P@ssw0rd!")) - - hdr := http.Header{ - "Authorization": {"Basic " + userCredentials}, - transport.HeaderKeyUser: {"agent"}, - transport.HeaderKeyNamespace: {"default"}, - transport.HeaderKeyAgentName: {"agent"}, - transport.HeaderKeySubscriptions: {}, - } - time.Sleep(5 * time.Second) - client, _, err := transport.Connect(fmt.Sprintf("%s://127.0.0.1:%d/", tc.wsScheme, agentPort), tc.tls, hdr, 5) - require.NoError(t, err) - require.NotNil(t, client) - - assert.NoError(t, client.Close()) - cancel() - }) - } -} diff --git a/types/aliases.go b/types/aliases.go index d84c84fc90..eed8f658e6 100644 --- a/types/aliases.go +++ b/types/aliases.go @@ -1,6 +1,6 @@ package types -import v2 "github.com/sensu/sensu-go/api/core/v2" +import v2 "github.com/sensu/core/v2" type ( AdhocRequest = v2.AdhocRequest diff --git a/types/compat/compat.go b/types/compat/compat.go index 3f35a35bfa..e6e58d2f3f 100644 --- a/types/compat/compat.go +++ b/types/compat/compat.go @@ -1,8 +1,8 @@ package compat import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" ) // URIPath gets the URIPath from either a core/v2 resource or a core/v3 resource. diff --git a/types/compat/compat_test.go b/types/compat/compat_test.go index 0be12b1ebf..f00fd44bf9 100644 --- a/types/compat/compat_test.go +++ b/types/compat/compat_test.go @@ -3,8 +3,8 @@ package compat import ( "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" ) func TestSetNamespace(t *testing.T) { diff --git a/types/go.mod b/types/go.mod index 31c615cd61..08cb9dbb28 100644 --- a/types/go.mod +++ b/types/go.mod @@ -3,9 +3,9 @@ module github.com/sensu/sensu-go/types go 1.16 require ( - github.com/blang/semver/v4 v4.0.0 - github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff - github.com/sensu/sensu-go/api/core/v2 v2.14.0 - github.com/sensu/sensu-go/api/core/v3 v3.6.2 - github.com/stretchr/testify v1.6.0 + github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 + github.com/sensu/core/v2 v2.16.0-alpha6 + github.com/sensu/core/v3 v3.8.0-alpha6 + github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 + github.com/stretchr/testify v1.8.0 ) diff --git a/types/go.sum b/types/go.sum index 8bf654b7c0..b4f2c8d3cc 100644 --- a/types/go.sum +++ b/types/go.sum @@ -5,9 +5,13 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -20,13 +24,15 @@ github.com/echlebek/timeproxy v1.0.0/go.mod h1:0dg2Lnb8no/jFwoMQKMTU6iAivgoMptGq github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -39,6 +45,7 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 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= @@ -49,39 +56,42 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff h1:+6NUiITWwE5q1KO6SAfUX918c+Tab0+tGAM/mtdlUyA= -github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= +github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 h1:AFhmAXZqMm6PgNkco+BTBk//EQS8NLE1YLc2EO3bcLE= +github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52/go.mod h1:/mK7FZ3mFYEn9zvNPhpngTyatyehSwte5bJZ4ehL5Xw= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/sensu/sensu-go/api/core/v2 v2.14.0 h1:z4JVqy7z6iFgMDUH0uc1Ns0bqLFKTpc5bi4Iw7qweks= -github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= -github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.6.2 h1:NEkHcPxkaYwPlH4gG6kgvdvYLlwBBaswMHscA7X3V+4= -github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= +github.com/sensu/core/v2 v2.16.0-alpha6 h1:6WTEevm2tQEgCx50IL4aXomAXQip7s6kX4xR3uNVYlI= +github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= +github.com/sensu/core/v3 v3.8.0-alpha6 h1:ywO14aIHippeIAe2HBHrPhSdyBMs1pQtjvkYaHmEwGw= +github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= +github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= +github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= -github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +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/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.0 h1:GsV3S+OfZEOCNXdtNkBSR7kgLobAa/SO6tCxRa0GAYw= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -118,13 +128,13 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -158,8 +168,10 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E= +google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -174,13 +186,15 @@ google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/l google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/readline.v1 v1.0.0-20160726135117-62c6fe619375/go.mod h1:lNEQeAhU009zbRxng+XOj5ITVgY24WcbNnQopyfKoYQ= gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -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.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/types/versions.go b/types/versions.go deleted file mode 100644 index 1ca80de271..0000000000 --- a/types/versions.go +++ /dev/null @@ -1,64 +0,0 @@ -package types - -import ( - "fmt" - "path" - "runtime/debug" - "strings" - - "github.com/blang/semver/v4" -) - -// APIModuleVersions returns a map of Sensu API modules that are compiled into -// the product. -func APIModuleVersions() map[string]string { - buildInfo, ok := debug.ReadBuildInfo() - if !ok { - // fallback case - ReadBuildInfo() not available in tests. Remove later. - return map[string]string{ - "core/v2": "v2.6.0", - "core/v3": "v3.3.0", - } - } - apiModuleVersions := make(map[string]string) - packageMapMu.Lock() - defer packageMapMu.Unlock() - for k := range packageMap { - for _, mod := range buildInfo.Deps { - if strings.HasSuffix(mod.Path, path.Join("api", k)) { - apiModuleVersions[k] = mod.Version - break - } - } - } - return apiModuleVersions -} - -// ParseAPIVersion parses an api_version that looks like the following: -// -// core/v2 -// core/v2.2 -// core/v2.2.1 -// -// It returns the name of the apiGroup (core/v2), and the semantic version -// (v2.0.0, v2.2.0, v2.2.1). A leading 'v' is included, keeping with how Go -// modules express their versions. -// -// If ParseAPIVersion can't determine the version, for instance if it's passed -// a string that does not seem to be a versioned API group, it will return its -// input as the apiGroup, and v0.0.0 as the version. -func ParseAPIVersion(apiVersion string) (apiGroup, semVer string) { - group, version := path.Split(apiVersion) - if version == "" { - // There is no version for the API group, which is fine. - return group, "v0.0.0" - } - semver, err := semver.ParseTolerant(version) - if err != nil { - // It's not the expected format - return apiVersion, "v0.0.0" - } - apiGroup = path.Join(group, fmt.Sprintf("v%d", semver.Major)) - semVer = fmt.Sprintf("v%d.%d.%d", semver.Major, semver.Minor, semver.Patch) - return apiGroup, semVer -} diff --git a/types/versions_test.go b/types/versions_test.go deleted file mode 100644 index 23430e9b63..0000000000 --- a/types/versions_test.go +++ /dev/null @@ -1,67 +0,0 @@ -package types_test - -import ( - "testing" - - "runtime/debug" - - types "github.com/sensu/sensu-go/types" -) - -// TODO(eric): This test doesn't work yet because of https://github.com/golang/go/issues/33976 -func TestAPIModuleVersions(t *testing.T) { - _, ok := debug.ReadBuildInfo() - if ok { - t.Fatal("remove this if block, the test works now") - } else { - t.Skip() - } - modVersions := types.APIModuleVersions() - if _, ok := modVersions["core/v2"]; !ok { - t.Errorf("missing core/v2 module version") - } - if _, ok := modVersions["core/v3"]; !ok { - t.Errorf("missing core/v3 module version") - } -} - -func TestParseAPIVersion(t *testing.T) { - tests := []struct { - Input string - ExpAPIGroup string - ExpSemVer string - }{ - { - Input: "core/v2", - ExpAPIGroup: "core/v2", - ExpSemVer: "v2.0.0", - }, - { - Input: "core/v2.1", - ExpAPIGroup: "core/v2", - ExpSemVer: "v2.1.0", - }, - { - Input: "core/v2.1.2", - ExpAPIGroup: "core/v2", - ExpSemVer: "v2.1.2", - }, - { - Input: "corev2.0.0", - ExpAPIGroup: "corev2.0.0", - ExpSemVer: "v0.0.0", - }, - } - - for _, test := range tests { - t.Run(test.Input, func(t *testing.T) { - group, version := types.ParseAPIVersion(test.Input) - if got, want := group, test.ExpAPIGroup; got != want { - t.Errorf("bad API group: got %q, want %q", got, want) - } - if got, want := version, test.ExpSemVer; got != want { - t.Errorf("bad semver: got %q, want %q", got, want) - } - }) - } -} diff --git a/types/wrapper.go b/types/wrapper.go index d00461bb26..f3d2aa07b9 100644 --- a/types/wrapper.go +++ b/types/wrapper.go @@ -3,19 +3,15 @@ package types import ( "bytes" "encoding/json" - "errors" "fmt" "path" "reflect" "strings" - "sync" - "github.com/blang/semver/v4" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" ) -var ErrAPINotFound = errors.New("api not found") - // compatibility shim - can't import core/v3 type corev3Resource interface { GetMetadata() *corev2.ObjectMeta @@ -30,7 +26,11 @@ func getObjectMeta(value interface{}) *corev2.ObjectMeta { meta := value.GetObjectMeta() return &meta case corev3Resource: - return value.GetMetadata() + meta := value.GetMetadata() + if meta != nil { + return meta + } + return &corev2.ObjectMeta{} } // impossible unless the type resolver is broken. fatal error. panic("got neither corev2 resource nor corev3 resource") @@ -65,15 +65,8 @@ type rawWrapper struct { Value *json.RawMessage `json:"spec" yaml:"spec"` } -// PackageMap contains a list of packages with their Resource Resolver func -var packageMap = map[string]interface{}{ - "core/v2": corev2.ResolveResource, -} - -var packageMapMu = &sync.RWMutex{} - type lifter interface { - Lift() Resource + Lift() corev3Resource } // toMap produces a map from a struct by serializing it to JSON and then @@ -160,7 +153,7 @@ func (w *Wrapper) UnmarshalJSON(b []byte) error { // Use the TypeMeta to resolve the type of the resource contained in the Value // field as a *json.RawMessage - resource, err := ResolveRaw(w.TypeMeta.APIVersion, w.TypeMeta.Type) + resource, err := apitools.Resolve(w.TypeMeta.APIVersion, w.TypeMeta.Type) if err != nil { return fmt.Errorf("error parsing spec: %s", err) } @@ -259,7 +252,7 @@ type tmGetter interface { // WrapResource wraps a Resource in a Wrapper that contains TypeMeta and // ObjectMeta. -func WrapResource(r Resource) Wrapper { +func WrapResource(r interface{}) Wrapper { var tm TypeMeta if getter, ok := r.(tmGetter); ok { tm = getter.GetTypeMeta() @@ -277,91 +270,6 @@ func WrapResource(r Resource) Wrapper { } } -// RegisterTypeResolver adds a package to packageMap with its resolver. Deprecated. -func RegisterTypeResolver(key string, resolver func(string) (Resource, error)) { - packageMapMu.Lock() - defer packageMapMu.Unlock() - packageMap[key] = resolver -} - -// RegisterResolver adds a package to packageMap with its resolver. -func RegisterResolver(key string, resolver func(string) (interface{}, error)) { - packageMapMu.Lock() - defer packageMapMu.Unlock() - packageMap[key] = resolver -} - -// ResolveType returns the Resource associated with the given package and type. -func ResolveType(apiVersion string, typename string) (Resource, error) { - availableModules := APIModuleVersions() - - // Guard read access to packageMap - packageMapMu.RLock() - defer packageMapMu.RUnlock() - apiGroup, reqVer := ParseAPIVersion(apiVersion) - foundVer, ok := availableModules[apiGroup] - if ok { - if semverGreater(reqVer, foundVer) { - return nil, fmt.Errorf("requested version was %s, but only %s is available", reqVer, foundVer) - } - } - resolver, ok := packageMap[apiGroup] - if !ok { - return nil, fmt.Errorf("invalid API version: %s", apiVersion) - } - switch resolver := resolver.(type) { - case func(string) (Resource, error): - v, err := resolver(typename) - return v, err - default: - return nil, fmt.Errorf("%s does not implement v2.Resource", apiVersion) - } -} - -func semverGreater(s1, s2 string) bool { - s1Ver, err := semver.ParseTolerant(s1) - if err != nil { - // semver should be validated before being passed here - panic(err) - } - s2Ver, err := semver.ParseTolerant(s2) - if err != nil { - // semver should be validated before being passed here - panic(err) - } - return s1Ver.GT(s2Ver) -} - -// ResolveRaw resolves the raw type for the requested type. -func ResolveRaw(apiVersion string, typename string) (interface{}, error) { - availableModules := APIModuleVersions() - - // Guard read access to packageMap - packageMapMu.RLock() - defer packageMapMu.RUnlock() - apiGroup, reqVer := ParseAPIVersion(apiVersion) - foundVer, ok := availableModules[apiGroup] - if ok { - if foundVer == "(devel)" { - foundVer = reqVer - } - if semverGreater(reqVer, foundVer) { - return nil, fmt.Errorf("requested version was %s, but only %s is available", reqVer, foundVer) - } - } - resolver, ok := packageMap[apiGroup] - if !ok { - return nil, ErrAPINotFound - } - switch resolver := resolver.(type) { - case func(string) (Resource, error): - return resolver(typename) - case func(string) (interface{}, error): - return resolver(typename) - } - return nil, fmt.Errorf("bad resolver: %T", resolver) -} - func ApiVersion(version string) string { parts := strings.Split(version, "/") if len(parts) == 0 { diff --git a/types/wrapper_test.go b/types/wrapper_test.go index 965baf0c80..96483afe6d 100644 --- a/types/wrapper_test.go +++ b/types/wrapper_test.go @@ -1,12 +1,11 @@ package types_test import ( - "fmt" "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" types "github.com/sensu/sensu-go/types" ) @@ -115,107 +114,3 @@ func TestWrapResourceObjectMeta(t *testing.T) { t.Fatal("objectmeta not equal") } } - -func TestResolveType(t *testing.T) { - testCases := []struct { - ApiVersion string - Type string - ExpRet interface{} - ExpErr bool - }{ - { - ApiVersion: "core/v2", - Type: "asset", - ExpRet: &corev2.Asset{}, - ExpErr: false, - }, - { - ApiVersion: "non/existence", - Type: "null", - ExpRet: nil, - ExpErr: true, - }, - { - ApiVersion: "core/v2.2", - Type: "asset", - ExpRet: &corev2.Asset{}, - }, - { - ApiVersion: "core/v2.2.2", - Type: "asset", - ExpRet: &corev2.Asset{}, - }, - { - ApiVersion: "core/v2.1000.0", - Type: "asset", - ExpErr: true, - }, - } - - for _, tc := range testCases { - t.Run(fmt.Sprintf("%s/%s", tc.ApiVersion, tc.Type), func(t *testing.T) { - r, err := types.ResolveType(tc.ApiVersion, tc.Type) - if !reflect.DeepEqual(r, tc.ExpRet) { - t.Fatal("unexpected type") - } - if err != nil && !tc.ExpErr { - t.Fatal(err) - } - if err == nil && tc.ExpErr { - t.Fatal("expected an error") - } - }) - } -} - -func TestResolveRaw(t *testing.T) { - testCases := []struct { - ApiVersion string - Type string - ExpRet interface{} - ExpErr bool - }{ - { - ApiVersion: "core/v2", - Type: "asset", - ExpRet: &corev2.Asset{}, - ExpErr: false, - }, - { - ApiVersion: "non/existence", - Type: "null", - ExpRet: nil, - ExpErr: true, - }, - { - ApiVersion: "core/v2.2", - Type: "asset", - ExpRet: &corev2.Asset{}, - }, - { - ApiVersion: "core/v2.2.2", - Type: "asset", - ExpRet: &corev2.Asset{}, - }, - { - ApiVersion: "core/v2.1000.0", - Type: "asset", - ExpErr: true, - }, - } - - for _, tc := range testCases { - t.Run(fmt.Sprintf("%s/%s", tc.ApiVersion, tc.Type), func(t *testing.T) { - r, err := types.ResolveRaw(tc.ApiVersion, tc.Type) - if !reflect.DeepEqual(r, tc.ExpRet) { - t.Fatal("unexpected type") - } - if err != nil && !tc.ExpErr { - t.Fatal(err) - } - if err == nil && tc.ExpErr { - t.Fatal("expected an error") - } - }) - } -} From bc5cf24d4eae0e5a48eeb2294a943fa66b7231a5 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Tue, 17 Oct 2023 10:03:53 -0700 Subject: [PATCH 116/173] bump go version to 1.21.3 Signed-off-by: Justin Kolberg --- .circleci/config.yml | 2 +- CHANGELOG-6.md | 6 ++++ backend/authorization/rbac/rbac_test.go | 42 ++++++++++++------------- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a4d2a55f81..a40499de31 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ orbs: parameters: go_version: type: string - default: "1.17.12" + default: "1.21.3" sensu_go_build_env: &sensu_go_build_env docker: diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 1c1003c98e..879b7560d8 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed +- Upgraded CI Go version to 1.21.3 + + ## [6.10.0] - 2023-05-23 ### Added diff --git a/backend/authorization/rbac/rbac_test.go b/backend/authorization/rbac/rbac_test.go index 9da8be14c7..79cad6d6d5 100644 --- a/backend/authorization/rbac/rbac_test.go +++ b/backend/authorization/rbac/rbac_test.go @@ -27,9 +27,9 @@ func TestAuthorize(t *testing.T) { name: "no bindings", attrs: &authorization.Attributes{Namespace: "acme"}, storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilClusterRoleBindings, nil) - s.On("ListRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilRoleBindings, nil) }, want: false, @@ -37,7 +37,7 @@ func TestAuthorize(t *testing.T) { { name: "ClusterRoleBindings store err", storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilClusterRoleBindings, errors.New("error")) }, wantErr: true, @@ -51,13 +51,13 @@ func TestAuthorize(t *testing.T) { }, }, storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return([]*corev2.ClusterRoleBinding{{ Subjects: []corev2.Subject{ {Type: corev2.UserType, Name: "bar"}, }, }}, nil) - s.On("ListRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilRoleBindings, nil) }, want: false, @@ -70,7 +70,7 @@ func TestAuthorize(t *testing.T) { }, }, storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return([]*corev2.ClusterRoleBinding{{ RoleRef: corev2.RoleRef{ Type: "ClusterRole", @@ -96,7 +96,7 @@ func TestAuthorize(t *testing.T) { }, }, storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return([]*corev2.ClusterRoleBinding{{ RoleRef: corev2.RoleRef{ Type: "ClusterRole", @@ -121,9 +121,9 @@ func TestAuthorize(t *testing.T) { name: "RoleBindings store err", attrs: &authorization.Attributes{Namespace: "acme"}, storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilClusterRoleBindings, nil) - s.On("ListRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilRoleBindings, errors.New("error")) }, wantErr: true, @@ -137,9 +137,9 @@ func TestAuthorize(t *testing.T) { }, }, storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilClusterRoleBindings, nil) - s.On("ListRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return([]*corev2.RoleBinding{{ RoleRef: corev2.RoleRef{ Type: "Role", @@ -164,9 +164,9 @@ func TestAuthorize(t *testing.T) { }, }, storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilClusterRoleBindings, nil) - s.On("ListRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return([]*corev2.RoleBinding{{ RoleRef: corev2.RoleRef{ Type: "Role", @@ -193,10 +193,10 @@ func TestAuthorize(t *testing.T) { ResourceName: "check-cpu", }, storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilClusterRoleBindings, nil) - s.On("ListRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return([]*corev2.RoleBinding{{ RoleRef: corev2.RoleRef{ Type: "Role", @@ -227,10 +227,10 @@ func TestAuthorize(t *testing.T) { Resource: "users", }, storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilClusterRoleBindings, nil) - s.On("ListRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return([]*corev2.RoleBinding{{ RoleRef: corev2.RoleRef{ Type: "ClusterRole", @@ -262,10 +262,10 @@ func TestAuthorize(t *testing.T) { ResourceName: "check-cpu", }, storeFunc: func(s *mockstore.MockStore) { - s.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return(nilClusterRoleBindings, nil) - s.On("ListRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + s.On("ListRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return([]*corev2.RoleBinding{{ RoleRef: corev2.RoleRef{ Type: "Role", @@ -442,7 +442,7 @@ func TestVisitRulesFor(t *testing.T) { a := &Authorizer{ Store: stor, } - stor.On("ListClusterRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + stor.On("ListClusterRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return([]*corev2.ClusterRoleBinding{{ RoleRef: corev2.RoleRef{ Type: "ClusterRole", @@ -453,7 +453,7 @@ func TestVisitRulesFor(t *testing.T) { }, }}, nil) - stor.On("ListRoleBindings", mock.AnythingOfType("*context.emptyCtx"), &store.SelectionPredicate{}). + stor.On("ListRoleBindings", mock.Anything, &store.SelectionPredicate{}). Return([]*corev2.RoleBinding{{ RoleRef: corev2.RoleRef{ Type: "Role", From 09a9e1ce338e1e30ab5feff01020dec81567109d Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 23 Oct 2023 15:05:09 -0700 Subject: [PATCH 117/173] bump jwt version to 4.4.3 Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 2 +- api/core/v2/go.mod | 2 +- api/core/v2/go.sum | 4 ++-- go.mod | 2 +- go.sum | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 879b7560d8..552662d103 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -10,7 +10,7 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Changed - Upgraded CI Go version to 1.21.3 - +- Upgraded jwt version to 4.4.3 ## [6.10.0] - 2023-05-23 diff --git a/api/core/v2/go.mod b/api/core/v2/go.mod index d47d72c19c..c92ea0894e 100644 --- a/api/core/v2/go.mod +++ b/api/core/v2/go.mod @@ -6,7 +6,7 @@ require ( github.com/echlebek/crock v1.0.1 github.com/echlebek/timeproxy v1.0.0 github.com/gogo/protobuf v1.3.2 - github.com/golang-jwt/jwt/v4 v4.0.0 + github.com/golang-jwt/jwt/v4 v4.4.3 github.com/golang/protobuf v1.5.2 github.com/google/uuid v1.1.2 github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff diff --git a/api/core/v2/go.sum b/api/core/v2/go.sum index 1958a31ec1..cb670dd47a 100644 --- a/api/core/v2/go.sum +++ b/api/core/v2/go.sum @@ -23,8 +23,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= +github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/go.mod b/go.mod index bfec74409c..94d91eb132 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/go-resty/resty/v2 v2.5.0 github.com/gogo/protobuf v1.3.2 - github.com/golang-jwt/jwt/v4 v4.4.2 + github.com/golang-jwt/jwt/v4 v4.4.3 github.com/golang/protobuf v1.5.2 github.com/golang/snappy v0.0.4 github.com/google/uuid v1.3.0 diff --git a/go.sum b/go.sum index 25de548a6a..1b2545917e 100644 --- a/go.sum +++ b/go.sum @@ -143,8 +143,9 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= +github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= From 956c85103c3879db24e844b51f1740acb5c4df37 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 23 Oct 2023 15:10:00 -0700 Subject: [PATCH 118/173] bump logrus version to 1.9.3 Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 1 + api/core/v2/go.mod | 4 ++-- api/core/v2/go.sum | 15 ++++++--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 552662d103..5551cd6094 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -11,6 +11,7 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Changed - Upgraded CI Go version to 1.21.3 - Upgraded jwt version to 4.4.3 +- Upgraded logrus version to 1.9.3 ## [6.10.0] - 2023-05-23 diff --git a/api/core/v2/go.mod b/api/core/v2/go.mod index c92ea0894e..0b1a52a1e6 100644 --- a/api/core/v2/go.mod +++ b/api/core/v2/go.mod @@ -11,8 +11,8 @@ require ( github.com/google/uuid v1.1.2 github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff github.com/robfig/cron/v3 v3.0.1 - github.com/sirupsen/logrus v1.6.0 - github.com/stretchr/testify v1.6.0 + github.com/sirupsen/logrus v1.9.3 + github.com/stretchr/testify v1.7.0 go.etcd.io/etcd/api/v3 v3.5.0 gopkg.in/sourcemap.v1 v1.0.5 // indirect gopkg.in/yaml.v2 v2.3.0 // indirect diff --git a/api/core/v2/go.sum b/api/core/v2/go.sum index cb670dd47a..f61d1c40a5 100644 --- a/api/core/v2/go.sum +++ b/api/core/v2/go.sum @@ -52,8 +52,6 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -62,13 +60,12 @@ github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspo github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= -github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -110,13 +107,13 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= From dd9b1b97528f346f36a0bdeb4200bc48630fd2e5 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Tue, 24 Oct 2023 14:21:18 -0700 Subject: [PATCH 119/173] remove core apis Signed-off-by: Justin Kolberg --- api/core/doc.go | 2 - api/core/go.mod | 3 - api/core/v2/LICENSE | 20 - api/core/v2/adhoc.go | 41 - api/core/v2/adhoc.pb.go | 625 -- api/core/v2/adhoc.proto | 29 - api/core/v2/adhocpb_test.go | 147 - api/core/v2/any.pb.go | 501 -- api/core/v2/any.proto | 18 - api/core/v2/anypb_test.go | 147 - api/core/v2/apikey.go | 80 - api/core/v2/apikey.pb.go | 567 -- api/core/v2/apikey.proto | 30 - api/core/v2/apikey_test.go | 82 - api/core/v2/apikeypb_test.go | 155 - api/core/v2/asset.go | 167 - api/core/v2/asset.pb.go | 1456 ---- api/core/v2/asset.proto | 65 - api/core/v2/asset_test.go | 102 - api/core/v2/assetpb_test.go | 287 - api/core/v2/authentication.go | 33 - api/core/v2/authentication.pb.go | 546 -- api/core/v2/authentication.proto | 26 - api/core/v2/authentication_test.go | 32 - api/core/v2/authenticationpb_test.go | 147 - api/core/v2/benchmark_test.go | 55 - api/core/v2/check.go | 352 - api/core/v2/check.pb.go | 6635 ----------------- api/core/v2/check.proto | 354 - api/core/v2/check_config.go | 258 - api/core/v2/check_config_test.go | 200 - api/core/v2/check_proxy_requests.go | 32 - api/core/v2/check_request.go | 16 - api/core/v2/check_request_test.go | 37 - api/core/v2/check_test.go | 226 - api/core/v2/checkpb_test.go | 783 -- api/core/v2/context.go | 89 - api/core/v2/context_test.go | 64 - api/core/v2/core.go | 14 - api/core/v2/edition.go | 11 - api/core/v2/entity.go | 219 - api/core/v2/entity.pb.go | 3113 -------- api/core/v2/entity.proto | 91 - api/core/v2/entity_sort.go | 79 - api/core/v2/entity_sort_test.go | 80 - api/core/v2/entity_test.go | 123 - api/core/v2/entitypb_test.go | 775 -- api/core/v2/env_vars.go | 41 - api/core/v2/env_vars_test.go | 81 - api/core/v2/event.go | 467 -- api/core/v2/event.pb.go | 904 --- api/core/v2/event.proto | 53 - api/core/v2/event_sort.go | 211 - api/core/v2/event_sort_test.go | 352 - api/core/v2/event_test.go | 867 --- api/core/v2/eventpb_test.go | 155 - api/core/v2/extension.go | 81 - api/core/v2/extension.pb.go | 523 -- api/core/v2/extension.proto | 27 - api/core/v2/extension_test.go | 40 - api/core/v2/extensionpb_test.go | 155 - api/core/v2/fielder.go | 7 - api/core/v2/filter.go | 196 - api/core/v2/filter.pb.go | 735 -- api/core/v2/filter.proto | 40 - api/core/v2/filter_test.go | 87 - api/core/v2/filterpb_test.go | 155 - api/core/v2/flapping.go | 62 - api/core/v2/flapping_test.go | 196 - api/core/v2/go.mod | 19 - api/core/v2/go.sum | 175 - api/core/v2/handler.go | 215 - api/core/v2/handler.pb.go | 1363 ---- api/core/v2/handler.proto | 66 - api/core/v2/handler_test.go | 276 - api/core/v2/handlerpb_test.go | 279 - api/core/v2/health.go | 99 - api/core/v2/hook.go | 206 - api/core/v2/hook.pb.go | 1413 ---- api/core/v2/hook.proto | 65 - api/core/v2/hook_test.go | 144 - api/core/v2/hookpb_test.go | 403 - .../v2/internal/codegen/check_protoc/LICENSE | 20 - .../v2/internal/codegen/check_protoc/main.go | 19 - .../v2/internal/codegen/generate_type/LICENSE | 20 - .../codegen/generate_type/generate_type.go | 139 - .../generate_type/generate_type_test.go | 49 - api/core/v2/internal/js/LICENSE | 20 - api/core/v2/internal/js/doc.go | 3 - api/core/v2/internal/js/js.go | 209 - api/core/v2/internal/js/js_bench_test.go | 66 - api/core/v2/internal/js/time_funcs_test.go | 24 - api/core/v2/internal/js/toint64.go | 95 - api/core/v2/internal/js/vm_cache.go | 91 - api/core/v2/internal/js/vm_cache_test.go | 49 - api/core/v2/internal/stringutil/LICENSE | 20 - api/core/v2/internal/stringutil/map.go | 8 - api/core/v2/internal/stringutil/map_test.go | 55 - .../v2/internal/stringutil/occurrences.go | 60 - .../internal/stringutil/occurrences_test.go | 45 - api/core/v2/internal/stringutil/strings.go | 105 - .../v2/internal/stringutil/strings_test.go | 84 - api/core/v2/internal/types/dynamic/LICENSE | 20 - api/core/v2/internal/types/dynamic/dynamic.go | 222 - .../types/dynamic/dynamic_bench_test.go | 25 - .../v2/internal/types/dynamic/dynamic_test.go | 191 - .../v2/internal/types/dynamic/encoding.go | 70 - .../internal/types/dynamic/encoding_test.go | 44 - .../v2/internal/types/dynamic/structfield.go | 44 - .../internal/types/dynamic/synthesize_test.go | 17 - api/core/v2/internal/types/dynamic/util.go | 54 - .../v2/internal/types/dynamic/util_test.go | 50 - api/core/v2/keepalive.go | 13 - api/core/v2/keepalive.pb.go | 511 -- api/core/v2/keepalive.proto | 26 - api/core/v2/keepalivepb_test.go | 155 - api/core/v2/meta.go | 71 - api/core/v2/meta.pb.go | 1215 --- api/core/v2/meta.proto | 49 - api/core/v2/metric_threshold.go | 94 - api/core/v2/metric_threshold.pb.go | 1239 --- api/core/v2/metric_threshold.proto | 50 - api/core/v2/metric_threshold_test.go | 274 - api/core/v2/metric_thresholdpb_test.go | 395 - api/core/v2/metrics.go | 36 - api/core/v2/metrics.pb.go | 1194 --- api/core/v2/metrics.proto | 46 - api/core/v2/metricspb_test.go | 395 - api/core/v2/multitenant.go | 15 - api/core/v2/mutator.go | 180 - api/core/v2/mutator.pb.go | 902 --- api/core/v2/mutator.proto | 53 - api/core/v2/mutator_test.go | 142 - api/core/v2/mutatorpb_test.go | 155 - api/core/v2/namespace.go | 73 - api/core/v2/namespace.pb.go | 440 -- api/core/v2/namespace.proto | 19 - api/core/v2/namespace_test.go | 30 - api/core/v2/namespacepb_test.go | 147 - api/core/v2/pipeline.go | 101 - api/core/v2/pipeline.pb.go | 523 -- api/core/v2/pipeline.proto | 25 - api/core/v2/pipeline_test.go | 319 - api/core/v2/pipeline_workflow.go | 158 - api/core/v2/pipeline_workflow.pb.go | 668 -- api/core/v2/pipeline_workflow.proto | 33 - api/core/v2/pipeline_workflowpb_test.go | 147 - api/core/v2/pipelinepb_test.go | 147 - api/core/v2/protocol.go | 19 - api/core/v2/provider.go | 20 - api/core/v2/rbac.go | 518 -- api/core/v2/rbac.pb.go | 2548 ------- api/core/v2/rbac.proto | 103 - api/core/v2/rbac_test.go | 458 -- api/core/v2/rbacpb_test.go | 923 --- api/core/v2/resource.go | 25 - api/core/v2/resource_reference.go | 61 - api/core/v2/resource_reference.pb.go | 560 -- api/core/v2/resource_reference.proto | 26 - api/core/v2/resource_reference_test.go | 72 - api/core/v2/resource_referencepb_test.go | 147 - api/core/v2/secret.pb.go | 515 -- api/core/v2/secret.proto | 26 - api/core/v2/secretpb_test.go | 155 - api/core/v2/silenced.go | 221 - api/core/v2/silenced.pb.go | 870 --- api/core/v2/silenced.proto | 49 - api/core/v2/silenced_test.go | 203 - api/core/v2/silencedpb_test.go | 155 - api/core/v2/status.go | 28 - api/core/v2/tessen.go | 67 - api/core/v2/tessen.pb.go | 450 -- api/core/v2/tessen.proto | 22 - api/core/v2/tessen_test.go | 14 - api/core/v2/tessenpb_test.go | 155 - api/core/v2/time_window.go | 368 - api/core/v2/time_window.pb.go | 1860 ----- api/core/v2/time_window.proto | 55 - api/core/v2/time_window_test.go | 652 -- api/core/v2/time_windowpb_test.go | 519 -- api/core/v2/tls.go | 123 - api/core/v2/tls.pb.go | 650 -- api/core/v2/tls.proto | 23 - api/core/v2/tlspb_test.go | 147 - api/core/v2/token.go | 50 - api/core/v2/typemap.go | 156 - api/core/v2/typemap.tmpl | 34 - api/core/v2/typemap_test.go | 1068 --- api/core/v2/typemap_test.tmpl | 33 - api/core/v2/types_gen.go | 16 - api/core/v2/user.go | 89 - api/core/v2/user.pb.go | 671 -- api/core/v2/user.proto | 25 - api/core/v2/user_test.go | 71 - api/core/v2/userpb_test.go | 147 - api/core/v2/util.go | 42 - api/core/v2/validators.go | 56 - api/core/v2/validators_test.go | 33 - api/core/v2/version.go | 24 - api/core/v3/entity.go | 223 - api/core/v3/entity_config.go | 66 - api/core/v3/entity_config.pb.go | 898 --- api/core/v3/entity_config.proto | 49 - api/core/v3/entity_config_test.go | 135 - api/core/v3/entity_configpb_test.go | 148 - api/core/v3/entity_state.go | 19 - api/core/v3/entity_state.pb.go | 626 -- api/core/v3/entity_state.proto | 35 - api/core/v3/entity_state_test.go | 36 - api/core/v3/entity_statepb_test.go | 148 - api/core/v3/entity_test.go | 147 - api/core/v3/fielder.go | 7 - api/core/v3/go.mod | 10 - api/core/v3/go.sum | 184 - .../v3/internal/codegen/check_protoc/LICENSE | 20 - .../v3/internal/codegen/check_protoc/main.go | 19 - .../v3/internal/codegen/generate_type/LICENSE | 20 - .../codegen/generate_type/generate_type.go | 149 - .../generate_type/generate_type_test.go | 49 - api/core/v3/internal/strings/strings.go | 60 - api/core/v3/internal/strings/strings_test.go | 34 - api/core/v3/redacter.go | 7 - api/core/v3/resource.go | 122 - api/core/v3/resource_generated.go | 363 - api/core/v3/resource_generated.tmpl | 153 - api/core/v3/resource_generated_test.go | 487 -- api/core/v3/resource_generated_test.tmpl | 179 - api/core/v3/resource_template.go | 64 - api/core/v3/resource_template_test.go | 100 - api/core/v3/resource_test.go | 105 - api/core/v3/typemap.go | 116 - api/core/v3/typemap.tmpl | 112 - api/core/v3/typemap_test.go | 303 - api/core/v3/typemap_test.tmpl | 121 - api/core/v3/types_gen.go | 19 - api/core/v3/validation.go | 39 - api/core/v3/validation_test.go | 37 - 237 files changed, 61761 deletions(-) delete mode 100644 api/core/doc.go delete mode 100644 api/core/go.mod delete mode 100644 api/core/v2/LICENSE delete mode 100644 api/core/v2/adhoc.go delete mode 100644 api/core/v2/adhoc.pb.go delete mode 100644 api/core/v2/adhoc.proto delete mode 100644 api/core/v2/adhocpb_test.go delete mode 100644 api/core/v2/any.pb.go delete mode 100644 api/core/v2/any.proto delete mode 100644 api/core/v2/anypb_test.go delete mode 100644 api/core/v2/apikey.go delete mode 100644 api/core/v2/apikey.pb.go delete mode 100644 api/core/v2/apikey.proto delete mode 100644 api/core/v2/apikey_test.go delete mode 100644 api/core/v2/apikeypb_test.go delete mode 100644 api/core/v2/asset.go delete mode 100644 api/core/v2/asset.pb.go delete mode 100644 api/core/v2/asset.proto delete mode 100644 api/core/v2/asset_test.go delete mode 100644 api/core/v2/assetpb_test.go delete mode 100644 api/core/v2/authentication.go delete mode 100644 api/core/v2/authentication.pb.go delete mode 100644 api/core/v2/authentication.proto delete mode 100644 api/core/v2/authentication_test.go delete mode 100644 api/core/v2/authenticationpb_test.go delete mode 100644 api/core/v2/benchmark_test.go delete mode 100644 api/core/v2/check.go delete mode 100644 api/core/v2/check.pb.go delete mode 100644 api/core/v2/check.proto delete mode 100644 api/core/v2/check_config.go delete mode 100644 api/core/v2/check_config_test.go delete mode 100644 api/core/v2/check_proxy_requests.go delete mode 100644 api/core/v2/check_request.go delete mode 100644 api/core/v2/check_request_test.go delete mode 100644 api/core/v2/check_test.go delete mode 100644 api/core/v2/checkpb_test.go delete mode 100644 api/core/v2/context.go delete mode 100644 api/core/v2/context_test.go delete mode 100644 api/core/v2/core.go delete mode 100644 api/core/v2/edition.go delete mode 100644 api/core/v2/entity.go delete mode 100644 api/core/v2/entity.pb.go delete mode 100644 api/core/v2/entity.proto delete mode 100644 api/core/v2/entity_sort.go delete mode 100644 api/core/v2/entity_sort_test.go delete mode 100644 api/core/v2/entity_test.go delete mode 100644 api/core/v2/entitypb_test.go delete mode 100644 api/core/v2/env_vars.go delete mode 100644 api/core/v2/env_vars_test.go delete mode 100644 api/core/v2/event.go delete mode 100644 api/core/v2/event.pb.go delete mode 100644 api/core/v2/event.proto delete mode 100644 api/core/v2/event_sort.go delete mode 100644 api/core/v2/event_sort_test.go delete mode 100644 api/core/v2/event_test.go delete mode 100644 api/core/v2/eventpb_test.go delete mode 100644 api/core/v2/extension.go delete mode 100644 api/core/v2/extension.pb.go delete mode 100644 api/core/v2/extension.proto delete mode 100644 api/core/v2/extension_test.go delete mode 100644 api/core/v2/extensionpb_test.go delete mode 100644 api/core/v2/fielder.go delete mode 100644 api/core/v2/filter.go delete mode 100644 api/core/v2/filter.pb.go delete mode 100644 api/core/v2/filter.proto delete mode 100644 api/core/v2/filter_test.go delete mode 100644 api/core/v2/filterpb_test.go delete mode 100644 api/core/v2/flapping.go delete mode 100644 api/core/v2/flapping_test.go delete mode 100644 api/core/v2/go.mod delete mode 100644 api/core/v2/go.sum delete mode 100644 api/core/v2/handler.go delete mode 100644 api/core/v2/handler.pb.go delete mode 100644 api/core/v2/handler.proto delete mode 100644 api/core/v2/handler_test.go delete mode 100644 api/core/v2/handlerpb_test.go delete mode 100644 api/core/v2/health.go delete mode 100644 api/core/v2/hook.go delete mode 100644 api/core/v2/hook.pb.go delete mode 100644 api/core/v2/hook.proto delete mode 100644 api/core/v2/hook_test.go delete mode 100644 api/core/v2/hookpb_test.go delete mode 100644 api/core/v2/internal/codegen/check_protoc/LICENSE delete mode 100644 api/core/v2/internal/codegen/check_protoc/main.go delete mode 100644 api/core/v2/internal/codegen/generate_type/LICENSE delete mode 100644 api/core/v2/internal/codegen/generate_type/generate_type.go delete mode 100644 api/core/v2/internal/codegen/generate_type/generate_type_test.go delete mode 100644 api/core/v2/internal/js/LICENSE delete mode 100644 api/core/v2/internal/js/doc.go delete mode 100644 api/core/v2/internal/js/js.go delete mode 100644 api/core/v2/internal/js/js_bench_test.go delete mode 100644 api/core/v2/internal/js/time_funcs_test.go delete mode 100644 api/core/v2/internal/js/toint64.go delete mode 100644 api/core/v2/internal/js/vm_cache.go delete mode 100644 api/core/v2/internal/js/vm_cache_test.go delete mode 100644 api/core/v2/internal/stringutil/LICENSE delete mode 100644 api/core/v2/internal/stringutil/map.go delete mode 100644 api/core/v2/internal/stringutil/map_test.go delete mode 100644 api/core/v2/internal/stringutil/occurrences.go delete mode 100644 api/core/v2/internal/stringutil/occurrences_test.go delete mode 100644 api/core/v2/internal/stringutil/strings.go delete mode 100644 api/core/v2/internal/stringutil/strings_test.go delete mode 100644 api/core/v2/internal/types/dynamic/LICENSE delete mode 100644 api/core/v2/internal/types/dynamic/dynamic.go delete mode 100644 api/core/v2/internal/types/dynamic/dynamic_bench_test.go delete mode 100644 api/core/v2/internal/types/dynamic/dynamic_test.go delete mode 100644 api/core/v2/internal/types/dynamic/encoding.go delete mode 100644 api/core/v2/internal/types/dynamic/encoding_test.go delete mode 100644 api/core/v2/internal/types/dynamic/structfield.go delete mode 100644 api/core/v2/internal/types/dynamic/synthesize_test.go delete mode 100644 api/core/v2/internal/types/dynamic/util.go delete mode 100644 api/core/v2/internal/types/dynamic/util_test.go delete mode 100644 api/core/v2/keepalive.go delete mode 100644 api/core/v2/keepalive.pb.go delete mode 100644 api/core/v2/keepalive.proto delete mode 100644 api/core/v2/keepalivepb_test.go delete mode 100644 api/core/v2/meta.go delete mode 100644 api/core/v2/meta.pb.go delete mode 100644 api/core/v2/meta.proto delete mode 100644 api/core/v2/metric_threshold.go delete mode 100644 api/core/v2/metric_threshold.pb.go delete mode 100644 api/core/v2/metric_threshold.proto delete mode 100644 api/core/v2/metric_threshold_test.go delete mode 100644 api/core/v2/metric_thresholdpb_test.go delete mode 100644 api/core/v2/metrics.go delete mode 100644 api/core/v2/metrics.pb.go delete mode 100644 api/core/v2/metrics.proto delete mode 100644 api/core/v2/metricspb_test.go delete mode 100644 api/core/v2/multitenant.go delete mode 100644 api/core/v2/mutator.go delete mode 100644 api/core/v2/mutator.pb.go delete mode 100644 api/core/v2/mutator.proto delete mode 100644 api/core/v2/mutator_test.go delete mode 100644 api/core/v2/mutatorpb_test.go delete mode 100644 api/core/v2/namespace.go delete mode 100644 api/core/v2/namespace.pb.go delete mode 100644 api/core/v2/namespace.proto delete mode 100644 api/core/v2/namespace_test.go delete mode 100644 api/core/v2/namespacepb_test.go delete mode 100644 api/core/v2/pipeline.go delete mode 100644 api/core/v2/pipeline.pb.go delete mode 100644 api/core/v2/pipeline.proto delete mode 100644 api/core/v2/pipeline_test.go delete mode 100644 api/core/v2/pipeline_workflow.go delete mode 100644 api/core/v2/pipeline_workflow.pb.go delete mode 100644 api/core/v2/pipeline_workflow.proto delete mode 100644 api/core/v2/pipeline_workflowpb_test.go delete mode 100644 api/core/v2/pipelinepb_test.go delete mode 100644 api/core/v2/protocol.go delete mode 100644 api/core/v2/provider.go delete mode 100644 api/core/v2/rbac.go delete mode 100644 api/core/v2/rbac.pb.go delete mode 100644 api/core/v2/rbac.proto delete mode 100644 api/core/v2/rbac_test.go delete mode 100644 api/core/v2/rbacpb_test.go delete mode 100644 api/core/v2/resource.go delete mode 100644 api/core/v2/resource_reference.go delete mode 100644 api/core/v2/resource_reference.pb.go delete mode 100644 api/core/v2/resource_reference.proto delete mode 100644 api/core/v2/resource_reference_test.go delete mode 100644 api/core/v2/resource_referencepb_test.go delete mode 100644 api/core/v2/secret.pb.go delete mode 100644 api/core/v2/secret.proto delete mode 100644 api/core/v2/secretpb_test.go delete mode 100644 api/core/v2/silenced.go delete mode 100644 api/core/v2/silenced.pb.go delete mode 100644 api/core/v2/silenced.proto delete mode 100644 api/core/v2/silenced_test.go delete mode 100644 api/core/v2/silencedpb_test.go delete mode 100644 api/core/v2/status.go delete mode 100644 api/core/v2/tessen.go delete mode 100644 api/core/v2/tessen.pb.go delete mode 100644 api/core/v2/tessen.proto delete mode 100644 api/core/v2/tessen_test.go delete mode 100644 api/core/v2/tessenpb_test.go delete mode 100644 api/core/v2/time_window.go delete mode 100644 api/core/v2/time_window.pb.go delete mode 100644 api/core/v2/time_window.proto delete mode 100644 api/core/v2/time_window_test.go delete mode 100644 api/core/v2/time_windowpb_test.go delete mode 100644 api/core/v2/tls.go delete mode 100644 api/core/v2/tls.pb.go delete mode 100644 api/core/v2/tls.proto delete mode 100644 api/core/v2/tlspb_test.go delete mode 100644 api/core/v2/token.go delete mode 100644 api/core/v2/typemap.go delete mode 100644 api/core/v2/typemap.tmpl delete mode 100644 api/core/v2/typemap_test.go delete mode 100644 api/core/v2/typemap_test.tmpl delete mode 100644 api/core/v2/types_gen.go delete mode 100644 api/core/v2/user.go delete mode 100644 api/core/v2/user.pb.go delete mode 100644 api/core/v2/user.proto delete mode 100644 api/core/v2/user_test.go delete mode 100644 api/core/v2/userpb_test.go delete mode 100644 api/core/v2/util.go delete mode 100644 api/core/v2/validators.go delete mode 100644 api/core/v2/validators_test.go delete mode 100644 api/core/v2/version.go delete mode 100644 api/core/v3/entity.go delete mode 100644 api/core/v3/entity_config.go delete mode 100644 api/core/v3/entity_config.pb.go delete mode 100644 api/core/v3/entity_config.proto delete mode 100644 api/core/v3/entity_config_test.go delete mode 100644 api/core/v3/entity_configpb_test.go delete mode 100644 api/core/v3/entity_state.go delete mode 100644 api/core/v3/entity_state.pb.go delete mode 100644 api/core/v3/entity_state.proto delete mode 100644 api/core/v3/entity_state_test.go delete mode 100644 api/core/v3/entity_statepb_test.go delete mode 100644 api/core/v3/entity_test.go delete mode 100644 api/core/v3/fielder.go delete mode 100644 api/core/v3/go.mod delete mode 100644 api/core/v3/go.sum delete mode 100644 api/core/v3/internal/codegen/check_protoc/LICENSE delete mode 100644 api/core/v3/internal/codegen/check_protoc/main.go delete mode 100644 api/core/v3/internal/codegen/generate_type/LICENSE delete mode 100644 api/core/v3/internal/codegen/generate_type/generate_type.go delete mode 100644 api/core/v3/internal/codegen/generate_type/generate_type_test.go delete mode 100644 api/core/v3/internal/strings/strings.go delete mode 100644 api/core/v3/internal/strings/strings_test.go delete mode 100644 api/core/v3/redacter.go delete mode 100644 api/core/v3/resource.go delete mode 100644 api/core/v3/resource_generated.go delete mode 100644 api/core/v3/resource_generated.tmpl delete mode 100644 api/core/v3/resource_generated_test.go delete mode 100644 api/core/v3/resource_generated_test.tmpl delete mode 100644 api/core/v3/resource_template.go delete mode 100644 api/core/v3/resource_template_test.go delete mode 100644 api/core/v3/resource_test.go delete mode 100644 api/core/v3/typemap.go delete mode 100644 api/core/v3/typemap.tmpl delete mode 100644 api/core/v3/typemap_test.go delete mode 100644 api/core/v3/typemap_test.tmpl delete mode 100644 api/core/v3/types_gen.go delete mode 100644 api/core/v3/validation.go delete mode 100644 api/core/v3/validation_test.go diff --git a/api/core/doc.go b/api/core/doc.go deleted file mode 100644 index 19e60d4e47..0000000000 --- a/api/core/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// package core is empty -package core diff --git a/api/core/go.mod b/api/core/go.mod deleted file mode 100644 index 023aaeca52..0000000000 --- a/api/core/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/sensu/sensu-go/api/core - -go 1.13 diff --git a/api/core/v2/LICENSE b/api/core/v2/LICENSE deleted file mode 100644 index 72ab74dfd2..0000000000 --- a/api/core/v2/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2017 Sensu Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/api/core/v2/adhoc.go b/api/core/v2/adhoc.go deleted file mode 100644 index db0c2d8807..0000000000 --- a/api/core/v2/adhoc.go +++ /dev/null @@ -1,41 +0,0 @@ -package v2 - -import ( - "errors" - "fmt" - "net/url" -) - -// FixtureAdhocRequest returns a testing fixture for an AdhocRequest struct. -func FixtureAdhocRequest(name string, subscriptions []string) *AdhocRequest { - return &AdhocRequest{ - ObjectMeta: NewObjectMeta(name, "default"), - Subscriptions: subscriptions, - } -} - -// SetNamespace sets the namespace of the resource. -func (a *AdhocRequest) SetNamespace(namespace string) { -} - -// StorePrefix returns the path prefix to this resource in the store -func (a *AdhocRequest) StorePrefix() string { - return "" -} - -// Validate returns an error if the name is not provided. -func (a *AdhocRequest) Validate() error { - if a.Name == "" { - return errors.New("must provide check name") - } - return nil -} - -// URIPath is the URI path component to the adhoc request. -func (a *AdhocRequest) URIPath() string { - return fmt.Sprintf("/api/core/v2/namespaces/%s/checks/%s/execute", url.PathEscape(a.Namespace), url.PathEscape(a.Name)) -} - -func (a *AdhocRequest) RBACName() string { - return "checks" -} diff --git a/api/core/v2/adhoc.pb.go b/api/core/v2/adhoc.pb.go deleted file mode 100644 index 0245af3853..0000000000 --- a/api/core/v2/adhoc.pb.go +++ /dev/null @@ -1,625 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/adhoc.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type AdhocRequest struct { - // Subscriptions is the list of entity subscriptions. - Subscriptions []string `protobuf:"bytes,2,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` - // Creator is the author of the adhoc request. - Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"` - // Reason is used to provide context to the request. - Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` - // Metadata contains the name, namespace, labels and annotations of the - // AdhocCheck - ObjectMeta `protobuf:"bytes,5,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AdhocRequest) Reset() { *m = AdhocRequest{} } -func (m *AdhocRequest) String() string { return proto.CompactTextString(m) } -func (*AdhocRequest) ProtoMessage() {} -func (*AdhocRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6d3914f26535f0a3, []int{0} -} -func (m *AdhocRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AdhocRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AdhocRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AdhocRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AdhocRequest.Merge(m, src) -} -func (m *AdhocRequest) XXX_Size() int { - return m.Size() -} -func (m *AdhocRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AdhocRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AdhocRequest proto.InternalMessageInfo - -func (m *AdhocRequest) GetSubscriptions() []string { - if m != nil { - return m.Subscriptions - } - return nil -} - -func (m *AdhocRequest) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *AdhocRequest) GetReason() string { - if m != nil { - return m.Reason - } - return "" -} - -func init() { - proto.RegisterType((*AdhocRequest)(nil), "sensu.core.v2.AdhocRequest") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/adhoc.proto", fileDescriptor_6d3914f26535f0a3) -} - -var fileDescriptor_6d3914f26535f0a3 = []byte{ - // 295 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4c, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0x89, 0x29, - 0x19, 0xf9, 0xc9, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, 0x15, 0x7a, 0x20, 0x29, - 0xbd, 0x32, 0x23, 0x29, 0x13, 0x24, 0x13, 0xd2, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xaa, 0x92, 0x4a, - 0xd3, 0x1c, 0xca, 0x0c, 0xf5, 0x8c, 0xf5, 0x0c, 0xc1, 0x82, 0x60, 0x31, 0x30, 0x0b, 0x62, 0x88, - 0x94, 0x01, 0x71, 0xf6, 0xe6, 0xa6, 0x96, 0x24, 0x42, 0x74, 0x28, 0x1d, 0x65, 0xe4, 0xe2, 0x71, - 0x04, 0x39, 0x23, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x8b, 0x8b, 0xb7, 0xb8, 0x34, - 0xa9, 0x38, 0xb9, 0x28, 0xb3, 0xa0, 0x24, 0x33, 0x3f, 0xaf, 0x58, 0x82, 0x49, 0x81, 0x59, 0x83, - 0xd3, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0xc6, 0x20, 0x54, 0x29, 0x21, 0x39, 0x2e, 0xf6, 0xe4, 0xa2, - 0xd4, 0xc4, 0x92, 0xfc, 0x22, 0x09, 0x66, 0x05, 0x46, 0xb8, 0x2a, 0x98, 0xa0, 0x90, 0x0c, 0x17, - 0x5b, 0x51, 0x6a, 0x62, 0x71, 0x7e, 0x9e, 0x04, 0x0b, 0x92, 0x34, 0x54, 0x4c, 0xc8, 0x9b, 0x8b, - 0x03, 0xe4, 0x90, 0x94, 0xc4, 0x92, 0x44, 0x09, 0x56, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x49, 0x3d, - 0x94, 0x40, 0xd0, 0xf3, 0x4f, 0xca, 0x4a, 0x4d, 0x2e, 0xf1, 0x4d, 0x2d, 0x49, 0x74, 0x12, 0x39, - 0x71, 0x4f, 0x9e, 0xe1, 0xc2, 0x3d, 0x79, 0xc6, 0x57, 0xf7, 0xe4, 0xe1, 0xda, 0x82, 0xe0, 0x2c, - 0x27, 0x85, 0x1f, 0x0f, 0xe5, 0x18, 0x57, 0x3c, 0x92, 0x63, 0xdc, 0xf1, 0x48, 0x8e, 0xf1, 0xc4, - 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf1, 0x58, 0x8e, 0x21, - 0x8a, 0xa9, 0xcc, 0x28, 0x89, 0x0d, 0xec, 0x61, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcb, - 0x32, 0xb5, 0xd8, 0x9c, 0x01, 0x00, 0x00, -} - -func (this *AdhocRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AdhocRequest) - if !ok { - that2, ok := that.(AdhocRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Subscriptions) != len(that1.Subscriptions) { - return false - } - for i := range this.Subscriptions { - if this.Subscriptions[i] != that1.Subscriptions[i] { - return false - } - } - if this.Creator != that1.Creator { - return false - } - if this.Reason != that1.Reason { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *AdhocRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AdhocRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AdhocRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAdhoc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintAdhoc(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintAdhoc(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0x1a - } - if len(m.Subscriptions) > 0 { - for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Subscriptions[iNdEx]) - copy(dAtA[i:], m.Subscriptions[iNdEx]) - i = encodeVarintAdhoc(dAtA, i, uint64(len(m.Subscriptions[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - return len(dAtA) - i, nil -} - -func encodeVarintAdhoc(dAtA []byte, offset int, v uint64) int { - offset -= sovAdhoc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedAdhocRequest(r randyAdhoc, easy bool) *AdhocRequest { - this := &AdhocRequest{} - v1 := r.Intn(10) - this.Subscriptions = make([]string, v1) - for i := 0; i < v1; i++ { - this.Subscriptions[i] = string(randStringAdhoc(r)) - } - this.Creator = string(randStringAdhoc(r)) - this.Reason = string(randStringAdhoc(r)) - v2 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v2 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAdhoc(r, 6) - } - return this -} - -type randyAdhoc interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneAdhoc(r randyAdhoc) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringAdhoc(r randyAdhoc) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneAdhoc(r) - } - return string(tmps) -} -func randUnrecognizedAdhoc(r randyAdhoc, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldAdhoc(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldAdhoc(dAtA []byte, r randyAdhoc, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(v4)) - case 1: - dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateAdhoc(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateAdhoc(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *AdhocRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Subscriptions) > 0 { - for _, s := range m.Subscriptions { - l = len(s) - n += 1 + l + sovAdhoc(uint64(l)) - } - } - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovAdhoc(uint64(l)) - } - l = len(m.Reason) - if l > 0 { - n += 1 + l + sovAdhoc(uint64(l)) - } - l = m.ObjectMeta.Size() - n += 1 + l + sovAdhoc(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAdhoc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAdhoc(x uint64) (n int) { - return sovAdhoc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AdhocRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdhoc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdhocRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdhocRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdhoc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdhoc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdhoc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subscriptions = append(m.Subscriptions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdhoc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdhoc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdhoc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdhoc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAdhoc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAdhoc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAdhoc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAdhoc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAdhoc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAdhoc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAdhoc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAdhoc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAdhoc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAdhoc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAdhoc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAdhoc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAdhoc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAdhoc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAdhoc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAdhoc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAdhoc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/adhoc.proto b/api/core/v2/adhoc.proto deleted file mode 100644 index 08eaa31d32..0000000000 --- a/api/core/v2/adhoc.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -message AdhocRequest { - // Subscriptions is the list of entity subscriptions. - repeated string subscriptions = 2 [ (gogoproto.nullable) = true ]; - - // Creator is the author of the adhoc request. - string creator = 3 [ (gogoproto.nullable) = true ]; - - // Reason is used to provide context to the request. - string reason = 4 [ (gogoproto.nullable) = true ]; - - // Metadata contains the name, namespace, labels and annotations of the - // AdhocCheck - ObjectMeta metadata = 5 [ (gogoproto.jsontag) = "metadata", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; -} diff --git a/api/core/v2/adhocpb_test.go b/api/core/v2/adhocpb_test.go deleted file mode 100644 index 6924f8c9d9..0000000000 --- a/api/core/v2/adhocpb_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/adhoc.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestAdhocRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAdhocRequest(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AdhocRequest{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAdhocRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAdhocRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AdhocRequest{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAdhocRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAdhocRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AdhocRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAdhocRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAdhocRequest(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &AdhocRequest{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAdhocRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAdhocRequest(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &AdhocRequest{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAdhocRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAdhocRequest(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/any.pb.go b/api/core/v2/any.pb.go deleted file mode 100644 index c626c531e0..0000000000 --- a/api/core/v2/any.pb.go +++ /dev/null @@ -1,501 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/any.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type Any struct { - TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Any) Reset() { *m = Any{} } -func (m *Any) String() string { return proto.CompactTextString(m) } -func (*Any) ProtoMessage() {} -func (*Any) Descriptor() ([]byte, []int) { - return fileDescriptor_d0705a5d34572259, []int{0} -} -func (m *Any) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Any.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Any) XXX_Merge(src proto.Message) { - xxx_messageInfo_Any.Merge(m, src) -} -func (m *Any) XXX_Size() int { - return m.Size() -} -func (m *Any) XXX_DiscardUnknown() { - xxx_messageInfo_Any.DiscardUnknown(m) -} - -var xxx_messageInfo_Any proto.InternalMessageInfo - -func (m *Any) GetTypeUrl() string { - if m != nil { - return m.TypeUrl - } - return "" -} - -func (m *Any) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func init() { - proto.RegisterType((*Any)(nil), "sensu.core.v2.Any") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/any.proto", fileDescriptor_d0705a5d34572259) -} - -var fileDescriptor_d0705a5d34572259 = []byte{ - // 198 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4f, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0x89, 0x79, - 0x95, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, 0x79, 0x3d, 0x90, 0x84, 0x5e, 0x99, - 0x91, 0x94, 0x09, 0x92, 0xfe, 0xf4, 0xfc, 0xf4, 0x7c, 0x7d, 0xb0, 0xaa, 0xa4, 0xd2, 0x34, 0x87, - 0x32, 0x43, 0x3d, 0x63, 0x3d, 0x43, 0xb0, 0x20, 0x58, 0x0c, 0xcc, 0x82, 0x18, 0xa2, 0x64, 0xc6, - 0xc5, 0xec, 0x98, 0x57, 0x29, 0x24, 0xc9, 0xc5, 0x51, 0x52, 0x59, 0x90, 0x1a, 0x5f, 0x5a, 0x94, - 0x23, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0xc4, 0x0e, 0xe2, 0x87, 0x16, 0xe5, 0x08, 0x89, 0x70, - 0xb1, 0x96, 0x25, 0xe6, 0x94, 0xa6, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x04, 0x41, 0x38, 0x4e, - 0x0a, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0xb8, 0xe3, 0x91, 0x1c, 0xe3, 0x89, 0x47, - 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe3, 0xb1, 0x1c, 0x43, 0x14, - 0x53, 0x99, 0x51, 0x12, 0x1b, 0xd8, 0x02, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xed, - 0xf0, 0xc3, 0xd8, 0x00, 0x00, 0x00, -} - -func (this *Any) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Any) - if !ok { - that2, ok := that.(Any) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.TypeUrl != that1.TypeUrl { - return false - } - if !bytes.Equal(this.Value, that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *Any) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Any) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Any) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintAny(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.TypeUrl) > 0 { - i -= len(m.TypeUrl) - copy(dAtA[i:], m.TypeUrl) - i = encodeVarintAny(dAtA, i, uint64(len(m.TypeUrl))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAny(dAtA []byte, offset int, v uint64) int { - offset -= sovAny(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedAny(r randyAny, easy bool) *Any { - this := &Any{} - this.TypeUrl = string(randStringAny(r)) - v1 := r.Intn(100) - this.Value = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Value[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAny(r, 3) - } - return this -} - -type randyAny interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneAny(r randyAny) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringAny(r randyAny) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneAny(r) - } - return string(tmps) -} -func randUnrecognizedAny(r randyAny, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldAny(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldAny(dAtA []byte, r randyAny, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateAny(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateAny(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateAny(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Any) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TypeUrl) - if l > 0 { - n += 1 + l + sovAny(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovAny(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAny(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAny(x uint64) (n int) { - return sovAny(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Any) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAny - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Any: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Any: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAny - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAny - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAny - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAny - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAny - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAny - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAny(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAny - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAny(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAny - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAny - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAny - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAny - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAny - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAny - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAny = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAny = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAny = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/any.proto b/api/core/v2/any.proto deleted file mode 100644 index 97a5b9a327..0000000000 --- a/api/core/v2/any.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -message Any { - string type_url = 1; - bytes value = 2; -} diff --git a/api/core/v2/anypb_test.go b/api/core/v2/anypb_test.go deleted file mode 100644 index cf1d71b5a6..0000000000 --- a/api/core/v2/anypb_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/any.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestAnyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAny(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Any{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAny(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Any{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAny(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Any{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAnyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAny(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Any{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAny(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Any{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAnySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAny(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/apikey.go b/api/core/v2/apikey.go deleted file mode 100644 index 3740a46766..0000000000 --- a/api/core/v2/apikey.go +++ /dev/null @@ -1,80 +0,0 @@ -package v2 - -import ( - "fmt" - "net/url" - "path" - - "github.com/google/uuid" - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // APIKeysResource is the name of this resource type. - APIKeysResource = "apikeys" -) - -// StorePrefix returns the path prefix to this resource in the store. -func (a *APIKey) StorePrefix() string { - return APIKeysResource -} - -// URIPath returns the path component of an api key URI. -func (a *APIKey) URIPath() string { - return path.Join(URLPrefix, APIKeysResource, url.PathEscape(a.Name)) -} - -// Validate returns an error if the CheckName and Subscription fields are not -// provided. -func (a *APIKey) Validate() error { - if a.Namespace != "" { - return fmt.Errorf("api key cannot have a namespace") - } - - if a.Username == "" { - return fmt.Errorf("api key must have a username") - } - - if _, err := uuid.Parse(a.Name); err != nil { - return fmt.Errorf("api key name: %s", err) - } - - return nil -} - -// FixtureAPIKey returns a testing fixture for an APIKey struct. -func FixtureAPIKey(name string, username string) *APIKey { - return &APIKey{ - Username: username, - ObjectMeta: NewObjectMeta(name, ""), - } -} - -// APIKeyFields returns a set of fields that represent that resource. -func APIKeyFields(r Resource) map[string]string { - resource := r.(*APIKey) - fields := map[string]string{ - "api_key.name": resource.ObjectMeta.Name, - "api_key.username": resource.Username, - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "api_key.labels.") - return fields -} - -// Fields returns a set of fields that represent the resource. -func (a *APIKey) Fields() map[string]string { - return APIKeyFields(a) -} - -// SetNamespace sets the namespace of the resource. -func (a *APIKey) SetNamespace(namespace string) {} - -// SetObjectMeta sets the meta of the resource. -func (a *APIKey) SetObjectMeta(meta ObjectMeta) { - a.ObjectMeta = meta -} - -// RBACName gets the rbac name of the resource. -func (*APIKey) RBACName() string { - return APIKeysResource -} diff --git a/api/core/v2/apikey.pb.go b/api/core/v2/apikey.pb.go deleted file mode 100644 index 5ea0581cc6..0000000000 --- a/api/core/v2/apikey.pb.go +++ /dev/null @@ -1,567 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/apikey.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// An APIKey is an api key specification. -type APIKey struct { - // Metadata contains the name, namespace (N/A), labels and annotations of - // the APIKey. - ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // Username is the username associated with the API key. - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - // CreatedAt is a timestamp which the API key was created. - CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *APIKey) Reset() { *m = APIKey{} } -func (m *APIKey) String() string { return proto.CompactTextString(m) } -func (*APIKey) ProtoMessage() {} -func (*APIKey) Descriptor() ([]byte, []int) { - return fileDescriptor_c805b5e2d9435d9b, []int{0} -} -func (m *APIKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *APIKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_APIKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *APIKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_APIKey.Merge(m, src) -} -func (m *APIKey) XXX_Size() int { - return m.Size() -} -func (m *APIKey) XXX_DiscardUnknown() { - xxx_messageInfo_APIKey.DiscardUnknown(m) -} - -var xxx_messageInfo_APIKey proto.InternalMessageInfo - -func init() { - proto.RegisterType((*APIKey)(nil), "sensu.core.v2.APIKey") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/apikey.proto", fileDescriptor_c805b5e2d9435d9b) -} - -var fileDescriptor_c805b5e2d9435d9b = []byte{ - // 290 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4a, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0x20, 0x76, 0x76, - 0x6a, 0xa5, 0x5e, 0x41, 0x51, 0x7e, 0x49, 0xbe, 0x10, 0x2f, 0x58, 0x89, 0x1e, 0x48, 0x4e, 0xaf, - 0xcc, 0x48, 0xca, 0x04, 0xc9, 0x88, 0xf4, 0xfc, 0xf4, 0x7c, 0x7d, 0xb0, 0xaa, 0xa4, 0xd2, 0x34, - 0x87, 0x32, 0x43, 0x3d, 0x63, 0x3d, 0x43, 0xb0, 0x20, 0x58, 0x0c, 0xcc, 0x82, 0x18, 0x22, 0x65, - 0x40, 0x9c, 0xc5, 0xb9, 0xa9, 0x25, 0x89, 0x10, 0x1d, 0x4a, 0x4b, 0x18, 0xb9, 0xd8, 0x1c, 0x03, - 0x3c, 0xbd, 0x53, 0x2b, 0x85, 0x42, 0xb9, 0x38, 0x40, 0x12, 0x29, 0x89, 0x25, 0x89, 0x12, 0x8c, - 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x92, 0x7a, 0x28, 0x8e, 0xd2, 0xf3, 0x4f, 0xca, 0x4a, 0x4d, 0x2e, - 0xf1, 0x4d, 0x2d, 0x49, 0x74, 0x92, 0x3b, 0x71, 0x4f, 0x9e, 0xe1, 0xc2, 0x3d, 0x79, 0xc6, 0x57, - 0xf7, 0xe4, 0x85, 0x60, 0xda, 0x74, 0xf2, 0x73, 0x33, 0x4b, 0x52, 0x73, 0x0b, 0x4a, 0x2a, 0x83, - 0xe0, 0x46, 0x09, 0x49, 0x71, 0x71, 0x94, 0x16, 0xa7, 0x16, 0xe5, 0x25, 0xe6, 0xa6, 0x4a, 0x30, - 0x29, 0x30, 0x6a, 0x70, 0x06, 0xc1, 0xf9, 0x42, 0xb2, 0x5c, 0x5c, 0xc9, 0x45, 0xa9, 0x89, 0x25, - 0xa9, 0x29, 0xf1, 0x89, 0x25, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x9c, 0x50, 0x11, 0xc7, - 0x12, 0x2b, 0x8e, 0x8e, 0x05, 0xf2, 0x0c, 0x2b, 0x16, 0xc8, 0x33, 0x3a, 0x29, 0xfc, 0x78, 0x28, - 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x8e, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, - 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x51, 0x4c, 0x65, 0x46, 0x49, - 0x6c, 0x60, 0xff, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x05, 0x2e, 0x64, 0x7c, 0x01, - 0x00, 0x00, -} - -func (this *APIKey) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*APIKey) - if !ok { - that2, ok := that.(APIKey) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.Username != that1.Username { - return false - } - if this.CreatedAt != that1.CreatedAt { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type APIKeyFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetObjectMeta() ObjectMeta - GetUsername() string - GetCreatedAt() int64 -} - -func (this *APIKey) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *APIKey) TestProto() github_com_golang_protobuf_proto.Message { - return NewAPIKeyFromFace(this) -} - -func (this *APIKey) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *APIKey) GetUsername() string { - return this.Username -} - -func (this *APIKey) GetCreatedAt() int64 { - return this.CreatedAt -} - -func NewAPIKeyFromFace(that APIKeyFace) *APIKey { - this := &APIKey{} - this.ObjectMeta = that.GetObjectMeta() - this.Username = that.GetUsername() - this.CreatedAt = that.GetCreatedAt() - return this -} - -func (m *APIKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.CreatedAt != 0 { - i = encodeVarintApikey(dAtA, i, uint64(m.CreatedAt)) - i-- - dAtA[i] = 0x18 - } - if len(m.Username) > 0 { - i -= len(m.Username) - copy(dAtA[i:], m.Username) - i = encodeVarintApikey(dAtA, i, uint64(len(m.Username))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApikey(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintApikey(dAtA []byte, offset int, v uint64) int { - offset -= sovApikey(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedAPIKey(r randyApikey, easy bool) *APIKey { - this := &APIKey{} - v1 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v1 - this.Username = string(randStringApikey(r)) - this.CreatedAt = int64(r.Int63()) - if r.Intn(2) == 0 { - this.CreatedAt *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedApikey(r, 4) - } - return this -} - -type randyApikey interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneApikey(r randyApikey) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringApikey(r randyApikey) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneApikey(r) - } - return string(tmps) -} -func randUnrecognizedApikey(r randyApikey, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldApikey(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldApikey(dAtA []byte, r randyApikey, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateApikey(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateApikey(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateApikey(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateApikey(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateApikey(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateApikey(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateApikey(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *APIKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovApikey(uint64(l)) - l = len(m.Username) - if l > 0 { - n += 1 + l + sovApikey(uint64(l)) - } - if m.CreatedAt != 0 { - n += 1 + sovApikey(uint64(m.CreatedAt)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovApikey(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozApikey(x uint64) (n int) { - return sovApikey(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *APIKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApikey - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApikey - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApikey - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApikey - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApikey - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApikey - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApikey - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - m.CreatedAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApikey - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreatedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipApikey(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApikey - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipApikey(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApikey - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApikey - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApikey - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthApikey - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupApikey - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthApikey - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthApikey = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowApikey = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupApikey = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/apikey.proto b/api/core/v2/apikey.proto deleted file mode 100644 index dd174e0fb4..0000000000 --- a/api/core/v2/apikey.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// An APIKey is an api key specification. -message APIKey { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Metadata contains the name, namespace (N/A), labels and annotations of - // the APIKey. - ObjectMeta metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - - // Username is the username associated with the API key. - string username = 2; - - // CreatedAt is a timestamp which the API key was created. - int64 created_at = 3; -} diff --git a/api/core/v2/apikey_test.go b/api/core/v2/apikey_test.go deleted file mode 100644 index 5165ae197a..0000000000 --- a/api/core/v2/apikey_test.go +++ /dev/null @@ -1,82 +0,0 @@ -package v2 - -import ( - "reflect" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestFixtureAPIKey(t *testing.T) { - a := FixtureAPIKey("226f9e06-9d54-45c6-a9f6-4206bfa7ccf6", "bar") - assert.NoError(t, a.Validate()) - assert.Equal(t, "226f9e06-9d54-45c6-a9f6-4206bfa7ccf6", a.Name) - assert.Equal(t, "bar", a.Username) - assert.Equal(t, "", a.Namespace) -} - -func TestAPIKeyValidate(t *testing.T) { - a := &APIKey{} - - // Namespace - a.Namespace = "foo" - assert.Error(t, a.Validate()) - a.Namespace = "" - - // Empty username - assert.Error(t, a.Validate()) - a.Username = "bar" - - // Empty name - assert.Error(t, a.Validate()) - a.Name = "foo" - - // Invalid name - assert.Error(t, a.Validate()) - a.Name = "226f9e06-9d54-45c6-a9f6-4206bfa7ccf6" - - assert.NoError(t, a.Validate()) - assert.Equal(t, "226f9e06-9d54-45c6-a9f6-4206bfa7ccf6", a.Name) - assert.Equal(t, "bar", a.Username) - assert.Equal(t, "", a.Namespace) -} - -func TestAPIKeyFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureAPIKey("circle-ci-access", "admin"), - wantKey: "api_key.name", - want: "circle-ci-access", - }, - { - name: "exposes username", - args: FixtureAPIKey("circle-ci-access", "admin"), - wantKey: "api_key.username", - want: "admin", - }, - { - name: "exposes labels", - args: &APIKey{ - ObjectMeta: ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "api_key.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("APIKey.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/apikeypb_test.go b/api/core/v2/apikeypb_test.go deleted file mode 100644 index 4feeca84ea..0000000000 --- a/api/core/v2/apikeypb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/apikey.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestAPIKeyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAPIKey(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &APIKey{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAPIKeyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAPIKey(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &APIKey{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAPIKeyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAPIKey(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &APIKey{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAPIKeyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAPIKey(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &APIKey{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAPIKeyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAPIKey(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &APIKey{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAPIKeyFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAPIKey(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAPIKeySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAPIKey(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/asset.go b/api/core/v2/asset.go deleted file mode 100644 index 04da501294..0000000000 --- a/api/core/v2/asset.go +++ /dev/null @@ -1,167 +0,0 @@ -package v2 - -import ( - "crypto/rand" - "encoding/hex" - "errors" - "net/url" - "path" - "regexp" - "strings" - - "github.com/sensu/sensu-go/api/core/v2/internal/js" - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // AssetsResource is the name of this resource type - AssetsResource = "assets" -) - -var ( - // AssetNameRegexStr used to validate name of asset - AssetNameRegexStr = `[\w\/\_\.\-\:]+` - - // AssetNameRegex used to validate name of asset - AssetNameRegex = regexp.MustCompile("^" + AssetNameRegexStr + "$") -) - -// StorePrefix returns the path prefix to this resource in the store -func (a *Asset) StorePrefix() string { - return AssetsResource -} - -// URIPath returns the path component of an asset URI. -func (a *Asset) URIPath() string { - if a.Namespace == "" { - return path.Join(URLPrefix, AssetsResource, url.PathEscape(a.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(a.Namespace), AssetsResource, url.PathEscape(a.Name)) -} - -// Validate returns an error if the asset contains invalid values. -func (a *Asset) Validate() error { - if err := ValidateAssetName(a.Name); err != nil { - return err - } - - if a.Namespace == "" { - return errors.New("namespace cannot be empty") - } - - if len(a.Builds) == 0 { - if a.Sha512 == "" { - return errors.New("SHA-512 checksum cannot be empty") - } - - if len(a.Sha512) < 128 { - return errors.New("SHA-512 checksum must be at least 128 characters") - } - - if a.URL == "" { - return errors.New("URL cannot be empty") - } - - return js.ParseExpressions(a.Filters) - } - for _, build := range a.Builds { - if err := build.Validate(); err != nil { - return err - } - } - - return nil -} - -// Validate returns an error if the asset contains invalid values. -func (a *AssetBuild) Validate() error { - if a.Sha512 == "" { - return errors.New("SHA-512 checksum cannot be empty") - } - - if len(a.Sha512) < 128 { - return errors.New("SHA-512 checksum must be at least 128 characters") - } - - if a.URL == "" { - return errors.New("URL cannot be empty") - } - - return js.ParseExpressions(a.Filters) -} - -// ValidateAssetName validates that asset's name is valid -func ValidateAssetName(name string) error { - if name == "" { - return errors.New("name cannot be empty") - } - - if !AssetNameRegex.MatchString(name) { - return errors.New( - "name may only contain letters, forward slashes, underscores, dashes and numbers", - ) - } - - return nil -} - -// Filename returns the filename of the underlying asset; pulled from the URL -func (a *Asset) Filename() string { - u, err := url.Parse(a.URL) - if err != nil { - return "" - } - - _, file := path.Split(u.EscapedPath()) - return file -} - -// FixtureAsset given a name returns a valid asset for use in tests -func FixtureAsset(name string) *Asset { - bytes := make([]byte, 10) - _, _ = rand.Read(bytes) - hash := hex.EncodeToString(bytes) - - asset := &Asset{ - ObjectMeta: NewObjectMeta(name, "default"), - Sha512: "25e01b962045f4f5b624c3e47e782bef65c6c82602524dc569a8431b76cc1f57639d267380a7ec49f70876339ae261704fc51ed2fc520513cf94bc45ed7f6e17", - URL: "https://localhost/" + hash + ".zip", - } - return asset -} - -// NewAsset creates a new Asset. -func NewAsset(meta ObjectMeta) *Asset { - return &Asset{ObjectMeta: meta} -} - -// AssetFields returns a set of fields that represent that resource -func AssetFields(r Resource) map[string]string { - resource := r.(*Asset) - fields := map[string]string{ - "asset.name": resource.ObjectMeta.Name, - "asset.namespace": resource.ObjectMeta.Namespace, - "asset.filters": strings.Join(resource.Filters, ","), - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "asset.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (a *Asset) Fields() map[string]string { - return AssetFields(a) -} - -// SetNamespace sets the namespace of the resource. -func (a *Asset) SetNamespace(namespace string) { - a.Namespace = namespace -} - -func (a *Asset) RBACName() string { - return "assets" -} - -// SetObjectMeta sets the meta of the resource. -func (a *Asset) SetObjectMeta(meta ObjectMeta) { - a.ObjectMeta = meta -} diff --git a/api/core/v2/asset.pb.go b/api/core/v2/asset.pb.go deleted file mode 100644 index 54c0188668..0000000000 --- a/api/core/v2/asset.pb.go +++ /dev/null @@ -1,1456 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/asset.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Asset defines an asset and optionally a list of assets (builds) that agents -// install as a dependency for a check, handler, mutator, etc. -type Asset struct { - // URL is the location of the asset - URL string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // Sha512 is the SHA-512 checksum of the asset - Sha512 string `protobuf:"bytes,3,opt,name=sha512,proto3" json:"sha512,omitempty"` - // Filters are a collection of sensu queries, used by the system to - // determine if the asset should be installed. If more than one filter is - // present the queries are joined by the "AND" operator. - Filters []string `protobuf:"bytes,5,rep,name=filters,proto3" json:"filters"` - // AssetBuilds are a list of one or more assets to install. - Builds []*AssetBuild `protobuf:"bytes,6,rep,name=builds,proto3" json:"builds"` - // Metadata contains the name, namespace, labels and annotations of the - // asset - ObjectMeta `protobuf:"bytes,8,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // Headers is a collection of key/value string pairs used as HTTP headers - // for asset retrieval. - Headers map[string]string `protobuf:"bytes,9,rep,name=headers,proto3" json:"headers" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Asset) Reset() { *m = Asset{} } -func (m *Asset) String() string { return proto.CompactTextString(m) } -func (*Asset) ProtoMessage() {} -func (*Asset) Descriptor() ([]byte, []int) { - return fileDescriptor_d39ff00b5fd89710, []int{0} -} -func (m *Asset) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Asset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Asset.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Asset) XXX_Merge(src proto.Message) { - xxx_messageInfo_Asset.Merge(m, src) -} -func (m *Asset) XXX_Size() int { - return m.Size() -} -func (m *Asset) XXX_DiscardUnknown() { - xxx_messageInfo_Asset.DiscardUnknown(m) -} - -var xxx_messageInfo_Asset proto.InternalMessageInfo - -// AssetBuild defines an individual asset that an asset can install as a -// dependency for a check, handler, mutator, etc. -type AssetBuild struct { - // URL is the location of the asset - URL string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // Sha512 is the SHA-512 checksum of the asset - Sha512 string `protobuf:"bytes,3,opt,name=sha512,proto3" json:"sha512,omitempty"` - // Filters are a collection of sensu queries, used by the system to - // determine if the asset should be installed. If more than one filter is - // present the queries are joined by the "AND" operator. - Filters []string `protobuf:"bytes,5,rep,name=filters,proto3" json:"filters"` - // Headers is a collection of key/value string pairs used as HTTP headers - // for asset retrieval. - Headers map[string]string `protobuf:"bytes,9,rep,name=headers,proto3" json:"headers" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AssetBuild) Reset() { *m = AssetBuild{} } -func (m *AssetBuild) String() string { return proto.CompactTextString(m) } -func (*AssetBuild) ProtoMessage() {} -func (*AssetBuild) Descriptor() ([]byte, []int) { - return fileDescriptor_d39ff00b5fd89710, []int{1} -} -func (m *AssetBuild) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetBuild) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetBuild.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AssetBuild) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetBuild.Merge(m, src) -} -func (m *AssetBuild) XXX_Size() int { - return m.Size() -} -func (m *AssetBuild) XXX_DiscardUnknown() { - xxx_messageInfo_AssetBuild.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetBuild proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Asset)(nil), "sensu.core.v2.Asset") - proto.RegisterMapType((map[string]string)(nil), "sensu.core.v2.Asset.HeadersEntry") - proto.RegisterType((*AssetBuild)(nil), "sensu.core.v2.AssetBuild") - proto.RegisterMapType((map[string]string)(nil), "sensu.core.v2.AssetBuild.HeadersEntry") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/asset.proto", fileDescriptor_d39ff00b5fd89710) -} - -var fileDescriptor_d39ff00b5fd89710 = []byte{ - // 433 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4c, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0x89, 0xc5, - 0xc5, 0xa9, 0x25, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, 0x15, 0x7a, 0x20, 0x29, - 0xbd, 0x32, 0x23, 0x29, 0x13, 0x24, 0x13, 0xd2, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xaa, 0x92, 0x4a, - 0xd3, 0x1c, 0xca, 0x0c, 0xf5, 0x8c, 0xf5, 0x0c, 0xc1, 0x82, 0x60, 0x31, 0x30, 0x0b, 0x62, 0x88, - 0x94, 0x01, 0x71, 0xf6, 0xe6, 0xa6, 0x96, 0x24, 0x42, 0x74, 0x28, 0xb5, 0x33, 0x73, 0xb1, 0x3a, - 0x82, 0x9c, 0x21, 0x24, 0xc9, 0xc5, 0x5c, 0x5a, 0x94, 0x23, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe9, - 0xc4, 0xfe, 0xe8, 0x9e, 0x3c, 0x73, 0x68, 0x90, 0x4f, 0x10, 0x48, 0x4c, 0x48, 0x8c, 0x8b, 0xad, - 0x38, 0x23, 0xd1, 0xd4, 0xd0, 0x48, 0x82, 0x19, 0x24, 0x1b, 0x04, 0xe5, 0x09, 0xa9, 0x72, 0xb1, - 0xa7, 0x65, 0xe6, 0x94, 0xa4, 0x16, 0x15, 0x4b, 0xb0, 0x2a, 0x30, 0x6b, 0x70, 0x3a, 0x71, 0xbf, - 0xba, 0x27, 0x0f, 0x13, 0x0a, 0x82, 0x31, 0x84, 0x6c, 0xb9, 0xd8, 0x92, 0x4a, 0x33, 0x73, 0x52, - 0x8a, 0x25, 0xd8, 0x14, 0x98, 0x35, 0xb8, 0x8d, 0x24, 0xf5, 0x50, 0xfc, 0xaa, 0x07, 0xb6, 0xdf, - 0x09, 0xa4, 0xc2, 0x89, 0xeb, 0xd5, 0x3d, 0x79, 0xa8, 0xe2, 0x20, 0x28, 0x2d, 0x14, 0xca, 0xc5, - 0x01, 0x72, 0x70, 0x4a, 0x62, 0x49, 0xa2, 0x04, 0x87, 0x02, 0x23, 0x16, 0x03, 0xfc, 0x93, 0xb2, - 0x52, 0x93, 0x4b, 0x7c, 0x53, 0x4b, 0x12, 0x9d, 0xe4, 0x4e, 0xdc, 0x93, 0x67, 0xb8, 0x70, 0x4f, - 0x9e, 0xf1, 0xd5, 0x3d, 0x79, 0x21, 0x98, 0x36, 0x9d, 0xfc, 0xdc, 0xcc, 0x92, 0xd4, 0xdc, 0x82, - 0x92, 0xca, 0x20, 0xb8, 0x51, 0x42, 0x1e, 0x5c, 0xec, 0x19, 0xa9, 0x89, 0x29, 0x20, 0xc7, 0x73, - 0x82, 0x9d, 0xa5, 0x88, 0xcd, 0x59, 0x7a, 0x1e, 0x10, 0x35, 0xae, 0x79, 0x25, 0x45, 0x95, 0x10, - 0xff, 0x41, 0x75, 0x05, 0xc1, 0x18, 0x52, 0x56, 0x5c, 0x3c, 0xc8, 0xaa, 0x84, 0x04, 0xb8, 0x98, - 0xb3, 0x53, 0x2b, 0x25, 0x18, 0xc1, 0x61, 0x05, 0x62, 0x0a, 0x89, 0x70, 0xb1, 0x96, 0x25, 0xe6, - 0x94, 0xa6, 0x42, 0x42, 0x37, 0x08, 0xc2, 0xb1, 0x62, 0xb2, 0x60, 0xb4, 0xe2, 0xe8, 0x58, 0x20, - 0xcf, 0xb0, 0x62, 0x81, 0x3c, 0xa3, 0xd2, 0x6f, 0x46, 0x2e, 0x2e, 0x44, 0x48, 0xd0, 0x30, 0x3a, - 0x7c, 0xd1, 0x3d, 0xae, 0x86, 0x33, 0x3e, 0xe8, 0xe6, 0x7b, 0x27, 0x85, 0x1f, 0x0f, 0xe5, 0x18, - 0x57, 0x3c, 0x92, 0x63, 0xdc, 0xf1, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, - 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf1, 0x58, 0x8e, 0x21, 0x8a, 0xa9, 0xcc, 0x28, 0x89, 0x0d, - 0x9c, 0x60, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x79, 0xce, 0x68, 0x5c, 0x03, 0x00, - 0x00, -} - -func (this *Asset) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Asset) - if !ok { - that2, ok := that.(Asset) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.URL != that1.URL { - return false - } - if this.Sha512 != that1.Sha512 { - return false - } - if len(this.Filters) != len(that1.Filters) { - return false - } - for i := range this.Filters { - if this.Filters[i] != that1.Filters[i] { - return false - } - } - if len(this.Builds) != len(that1.Builds) { - return false - } - for i := range this.Builds { - if !this.Builds[i].Equal(that1.Builds[i]) { - return false - } - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if len(this.Headers) != len(that1.Headers) { - return false - } - for i := range this.Headers { - if this.Headers[i] != that1.Headers[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AssetBuild) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AssetBuild) - if !ok { - that2, ok := that.(AssetBuild) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.URL != that1.URL { - return false - } - if this.Sha512 != that1.Sha512 { - return false - } - if len(this.Filters) != len(that1.Filters) { - return false - } - for i := range this.Filters { - if this.Filters[i] != that1.Filters[i] { - return false - } - } - if len(this.Headers) != len(that1.Headers) { - return false - } - for i := range this.Headers { - if this.Headers[i] != that1.Headers[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type AssetFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetURL() string - GetSha512() string - GetFilters() []string - GetBuilds() []*AssetBuild - GetObjectMeta() ObjectMeta - GetHeaders() map[string]string -} - -func (this *Asset) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *Asset) TestProto() github_com_golang_protobuf_proto.Message { - return NewAssetFromFace(this) -} - -func (this *Asset) GetURL() string { - return this.URL -} - -func (this *Asset) GetSha512() string { - return this.Sha512 -} - -func (this *Asset) GetFilters() []string { - return this.Filters -} - -func (this *Asset) GetBuilds() []*AssetBuild { - return this.Builds -} - -func (this *Asset) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *Asset) GetHeaders() map[string]string { - return this.Headers -} - -func NewAssetFromFace(that AssetFace) *Asset { - this := &Asset{} - this.URL = that.GetURL() - this.Sha512 = that.GetSha512() - this.Filters = that.GetFilters() - this.Builds = that.GetBuilds() - this.ObjectMeta = that.GetObjectMeta() - this.Headers = that.GetHeaders() - return this -} - -type AssetBuildFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetURL() string - GetSha512() string - GetFilters() []string - GetHeaders() map[string]string -} - -func (this *AssetBuild) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *AssetBuild) TestProto() github_com_golang_protobuf_proto.Message { - return NewAssetBuildFromFace(this) -} - -func (this *AssetBuild) GetURL() string { - return this.URL -} - -func (this *AssetBuild) GetSha512() string { - return this.Sha512 -} - -func (this *AssetBuild) GetFilters() []string { - return this.Filters -} - -func (this *AssetBuild) GetHeaders() map[string]string { - return this.Headers -} - -func NewAssetBuildFromFace(that AssetBuildFace) *AssetBuild { - this := &AssetBuild{} - this.URL = that.GetURL() - this.Sha512 = that.GetSha512() - this.Filters = that.GetFilters() - this.Headers = that.GetHeaders() - return this -} - -func (m *Asset) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Asset) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Asset) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Headers) > 0 { - for k := range m.Headers { - v := m.Headers[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintAsset(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintAsset(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintAsset(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x4a - } - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - if len(m.Builds) > 0 { - for iNdEx := len(m.Builds) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Builds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.Filters) > 0 { - for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Filters[iNdEx]) - copy(dAtA[i:], m.Filters[iNdEx]) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Filters[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Sha512) > 0 { - i -= len(m.Sha512) - copy(dAtA[i:], m.Sha512) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Sha512))) - i-- - dAtA[i] = 0x1a - } - if len(m.URL) > 0 { - i -= len(m.URL) - copy(dAtA[i:], m.URL) - i = encodeVarintAsset(dAtA, i, uint64(len(m.URL))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *AssetBuild) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AssetBuild) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetBuild) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Headers) > 0 { - for k := range m.Headers { - v := m.Headers[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintAsset(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintAsset(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintAsset(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x4a - } - } - if len(m.Filters) > 0 { - for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Filters[iNdEx]) - copy(dAtA[i:], m.Filters[iNdEx]) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Filters[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Sha512) > 0 { - i -= len(m.Sha512) - copy(dAtA[i:], m.Sha512) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Sha512))) - i-- - dAtA[i] = 0x1a - } - if len(m.URL) > 0 { - i -= len(m.URL) - copy(dAtA[i:], m.URL) - i = encodeVarintAsset(dAtA, i, uint64(len(m.URL))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func encodeVarintAsset(dAtA []byte, offset int, v uint64) int { - offset -= sovAsset(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedAsset(r randyAsset, easy bool) *Asset { - this := &Asset{} - this.URL = string(randStringAsset(r)) - this.Sha512 = string(randStringAsset(r)) - v1 := r.Intn(10) - this.Filters = make([]string, v1) - for i := 0; i < v1; i++ { - this.Filters[i] = string(randStringAsset(r)) - } - if r.Intn(5) != 0 { - v2 := r.Intn(5) - this.Builds = make([]*AssetBuild, v2) - for i := 0; i < v2; i++ { - this.Builds[i] = NewPopulatedAssetBuild(r, easy) - } - } - v3 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v3 - if r.Intn(5) != 0 { - v4 := r.Intn(10) - this.Headers = make(map[string]string) - for i := 0; i < v4; i++ { - this.Headers[randStringAsset(r)] = randStringAsset(r) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAsset(r, 10) - } - return this -} - -func NewPopulatedAssetBuild(r randyAsset, easy bool) *AssetBuild { - this := &AssetBuild{} - this.URL = string(randStringAsset(r)) - this.Sha512 = string(randStringAsset(r)) - v5 := r.Intn(10) - this.Filters = make([]string, v5) - for i := 0; i < v5; i++ { - this.Filters[i] = string(randStringAsset(r)) - } - if r.Intn(5) != 0 { - v6 := r.Intn(10) - this.Headers = make(map[string]string) - for i := 0; i < v6; i++ { - this.Headers[randStringAsset(r)] = randStringAsset(r) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAsset(r, 10) - } - return this -} - -type randyAsset interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneAsset(r randyAsset) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringAsset(r randyAsset) string { - v7 := r.Intn(100) - tmps := make([]rune, v7) - for i := 0; i < v7; i++ { - tmps[i] = randUTF8RuneAsset(r) - } - return string(tmps) -} -func randUnrecognizedAsset(r randyAsset, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldAsset(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldAsset(dAtA []byte, r randyAsset, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateAsset(dAtA, uint64(key)) - v8 := r.Int63() - if r.Intn(2) == 0 { - v8 *= -1 - } - dAtA = encodeVarintPopulateAsset(dAtA, uint64(v8)) - case 1: - dAtA = encodeVarintPopulateAsset(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateAsset(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateAsset(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateAsset(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateAsset(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Asset) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.URL) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - l = len(m.Sha512) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - if len(m.Filters) > 0 { - for _, s := range m.Filters { - l = len(s) - n += 1 + l + sovAsset(uint64(l)) - } - } - if len(m.Builds) > 0 { - for _, e := range m.Builds { - l = e.Size() - n += 1 + l + sovAsset(uint64(l)) - } - } - l = m.ObjectMeta.Size() - n += 1 + l + sovAsset(uint64(l)) - if len(m.Headers) > 0 { - for k, v := range m.Headers { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovAsset(uint64(len(k))) + 1 + len(v) + sovAsset(uint64(len(v))) - n += mapEntrySize + 1 + sovAsset(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AssetBuild) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.URL) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - l = len(m.Sha512) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - if len(m.Filters) > 0 { - for _, s := range m.Filters { - l = len(s) - n += 1 + l + sovAsset(uint64(l)) - } - } - if len(m.Headers) > 0 { - for k, v := range m.Headers { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovAsset(uint64(len(k))) + 1 + len(v) + sovAsset(uint64(len(v))) - n += mapEntrySize + 1 + sovAsset(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAsset(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAsset(x uint64) (n int) { - return sovAsset(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Asset) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Asset: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Asset: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.URL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sha512", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sha512 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Builds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Builds = append(m.Builds, &AssetBuild{}) - if err := m.Builds[len(m.Builds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Headers == nil { - m.Headers = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthAsset - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthAsset - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthAsset - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthAsset - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Headers[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetBuild) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AssetBuild: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetBuild: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.URL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sha512", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sha512 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Headers == nil { - m.Headers = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthAsset - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthAsset - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthAsset - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthAsset - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Headers[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAsset(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsset - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsset - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsset - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAsset - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAsset - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAsset - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAsset = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAsset = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAsset = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/asset.proto b/api/core/v2/asset.proto deleted file mode 100644 index 1cad1caee5..0000000000 --- a/api/core/v2/asset.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// Asset defines an asset and optionally a list of assets (builds) that agents -// install as a dependency for a check, handler, mutator, etc. -message Asset { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // URL is the location of the asset - string url = 2 [ (gogoproto.customname) = "URL" ]; - - // Sha512 is the SHA-512 checksum of the asset - string sha512 = 3; - - // Filters are a collection of sensu queries, used by the system to - // determine if the asset should be installed. If more than one filter is - // present the queries are joined by the "AND" operator. - repeated string filters = 5 [ (gogoproto.jsontag) = "filters" ]; - - // AssetBuilds are a list of one or more assets to install. - repeated AssetBuild builds = 6 [ (gogoproto.jsontag) = "builds" ]; - - // Metadata contains the name, namespace, labels and annotations of the - // asset - ObjectMeta metadata = 8 [ (gogoproto.embed) = true, (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.nullable) = false ]; - - // Headers is a collection of key/value string pairs used as HTTP headers - // for asset retrieval. - map headers = 9 [ (gogoproto.jsontag) = "headers" ]; -}; - -// AssetBuild defines an individual asset that an asset can install as a -// dependency for a check, handler, mutator, etc. -message AssetBuild { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // URL is the location of the asset - string url = 2 [ (gogoproto.customname) = "URL" ]; - - // Sha512 is the SHA-512 checksum of the asset - string sha512 = 3; - - // Filters are a collection of sensu queries, used by the system to - // determine if the asset should be installed. If more than one filter is - // present the queries are joined by the "AND" operator. - repeated string filters = 5 [ (gogoproto.jsontag) = "filters" ]; - - // Headers is a collection of key/value string pairs used as HTTP headers - // for asset retrieval. - map headers = 9 [ (gogoproto.jsontag) = "headers" ]; -}; diff --git a/api/core/v2/asset_test.go b/api/core/v2/asset_test.go deleted file mode 100644 index 8c89137a45..0000000000 --- a/api/core/v2/asset_test.go +++ /dev/null @@ -1,102 +0,0 @@ -package v2 - -import ( - "reflect" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestFixtureCreatesValidAsset(t *testing.T) { - assert := assert.New(t) - a := FixtureAsset("one") - assert.Equal("one", a.Name) - assert.NoError(a.Validate()) -} - -func TestValidator(t *testing.T) { - assert := assert.New(t) - asset := FixtureAsset("one") - - // Given valid asset it should pass - assert.NoError(asset.Validate()) - - // Given asset without a name it should not pass - asset = FixtureAsset("") - assert.Error(asset.Validate()) - - // Given asset without a URL it should not pass - asset = FixtureAsset("name") - asset.URL = "" - assert.Error(asset.Validate()) - - // Given asset without an namespace it should not pass - asset = FixtureAsset("name") - asset.Namespace = "" - assert.Error(asset.Validate()) - - // Given asset with valid filters - asset = FixtureAsset("name") - asset.Filters = []string{`entity.OS in ("macos", "linux")`} - assert.NoError(asset.Validate()) - - // Given asset without a Sha512 it should not pass - asset = FixtureAsset("name") - asset.Sha512 = "" - assert.Error(asset.Validate()) - - // Given asset with an invalid Sha512 it should not pass - asset = FixtureAsset("name") - asset.Sha512 = "nope" - assert.Error(asset.Validate()) - - // Bonsai assets with uppercases should pass - asset = FixtureAsset("Username/asset_name:0.0.1") - assert.NoError(asset.Validate()) -} - -func TestValidateName_GH3344(t *testing.T) { - assert := assert.New(t) - asset := FixtureAsset("my-asset:1.0.2") - assert.NoError(asset.Validate()) -} - -func TestAssetFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureAsset("curl"), - wantKey: "asset.name", - want: "curl", - }, - { - name: "exposes filters", - args: &Asset{Filters: []string{"test"}}, - wantKey: "asset.filters", - want: "test", - }, - { - name: "exposes labels", - args: &Asset{ - ObjectMeta: ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "asset.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("AssetFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/assetpb_test.go b/api/core/v2/assetpb_test.go deleted file mode 100644 index 4c6f266fd9..0000000000 --- a/api/core/v2/assetpb_test.go +++ /dev/null @@ -1,287 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/asset.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestAssetProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAsset(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Asset{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAssetMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAsset(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Asset{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAssetBuildProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetBuild(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AssetBuild{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAssetBuildMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetBuild(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AssetBuild{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAssetJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAsset(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Asset{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAssetBuildJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetBuild(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AssetBuild{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAssetProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAsset(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Asset{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAssetProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAsset(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Asset{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAssetBuildProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetBuild(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &AssetBuild{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAssetBuildProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetBuild(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &AssetBuild{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAssetFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAsset(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAssetBuildFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAssetBuild(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAssetSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAsset(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAssetBuildSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetBuild(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/authentication.go b/api/core/v2/authentication.go deleted file mode 100644 index 95c498316d..0000000000 --- a/api/core/v2/authentication.go +++ /dev/null @@ -1,33 +0,0 @@ -package v2 - -import ( - "errors" - "time" -) - -// Validate returns an error if the tokens contain invalid values. -func (t *Tokens) Validate() error { - if t.Access == "" { - return errors.New("Access token cannot be empty") - } - - if t.ExpiresAt == 0 { - return errors.New("Expiration must be set") - } - - if t.Refresh == "" { - return errors.New("Refresh token cannot be empty") - } - - return nil -} - -// FixtureTokens given an access and refresh tokens returns valid tokens for use -// in tests -func FixtureTokens(accessToken, refreshToken string) *Tokens { - return &Tokens{ - Access: accessToken, - ExpiresAt: time.Now().Unix(), - Refresh: refreshToken, - } -} diff --git a/api/core/v2/authentication.pb.go b/api/core/v2/authentication.pb.go deleted file mode 100644 index bd67200736..0000000000 --- a/api/core/v2/authentication.pb.go +++ /dev/null @@ -1,546 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/authentication.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Tokens contains the structure for exchanging tokens with the API -type Tokens struct { - // Access token is used by client to make request - Access string `protobuf:"bytes,1,opt,name=access,proto3" json:"access_token"` - // ExpiresAt unix timestamp describing when the access token is no longer - // valid - ExpiresAt int64 `protobuf:"varint,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at"` - // Refresh token is used by client to request a new access token - Refresh string `protobuf:"bytes,3,opt,name=refresh,proto3" json:"refresh_token"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Tokens) Reset() { *m = Tokens{} } -func (m *Tokens) String() string { return proto.CompactTextString(m) } -func (*Tokens) ProtoMessage() {} -func (*Tokens) Descriptor() ([]byte, []int) { - return fileDescriptor_bff1baf5955c2888, []int{0} -} -func (m *Tokens) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Tokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Tokens.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Tokens) XXX_Merge(src proto.Message) { - xxx_messageInfo_Tokens.Merge(m, src) -} -func (m *Tokens) XXX_Size() int { - return m.Size() -} -func (m *Tokens) XXX_DiscardUnknown() { - xxx_messageInfo_Tokens.DiscardUnknown(m) -} - -var xxx_messageInfo_Tokens proto.InternalMessageInfo - -func (m *Tokens) GetAccess() string { - if m != nil { - return m.Access - } - return "" -} - -func (m *Tokens) GetExpiresAt() int64 { - if m != nil { - return m.ExpiresAt - } - return 0 -} - -func (m *Tokens) GetRefresh() string { - if m != nil { - return m.Refresh - } - return "" -} - -func init() { - proto.RegisterType((*Tokens)(nil), "sensu.core.v2.Tokens") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/authentication.proto", fileDescriptor_bff1baf5955c2888) -} - -var fileDescriptor_bff1baf5955c2888 = []byte{ - // 261 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4a, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0x89, 0xa5, - 0x25, 0x19, 0xa9, 0x79, 0x25, 0x99, 0xc9, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x7a, 0x05, 0x45, 0xf9, - 0x25, 0xf9, 0x42, 0xbc, 0x60, 0xa5, 0x7a, 0x20, 0x35, 0x7a, 0x65, 0x46, 0x52, 0x26, 0x48, 0x46, - 0xa5, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x25, 0x95, 0xa6, 0x39, 0x94, 0x19, 0xea, 0x19, 0xeb, - 0x19, 0x82, 0x05, 0xc1, 0x62, 0x60, 0x16, 0xc4, 0x10, 0xa5, 0x3e, 0x46, 0x2e, 0xb6, 0x90, 0xfc, - 0xec, 0xd4, 0xbc, 0x62, 0x21, 0x0d, 0x2e, 0xb6, 0xc4, 0xe4, 0xe4, 0xd4, 0xe2, 0x62, 0x09, 0x46, - 0x05, 0x46, 0x0d, 0x4e, 0x27, 0x81, 0x57, 0xf7, 0xe4, 0x79, 0x20, 0x22, 0xf1, 0x25, 0x20, 0x25, - 0x41, 0x50, 0x79, 0x21, 0x5d, 0x2e, 0xae, 0xd4, 0x8a, 0x82, 0xcc, 0xa2, 0xd4, 0xe2, 0xf8, 0xc4, - 0x12, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x66, 0x27, 0xbe, 0x57, 0xf7, 0xe4, 0x91, 0x44, 0x83, 0x38, - 0xa1, 0x6c, 0xc7, 0x12, 0x21, 0x6d, 0x2e, 0xf6, 0xa2, 0xd4, 0xb4, 0xa2, 0xd4, 0xe2, 0x0c, 0x09, - 0x66, 0xb0, 0xc9, 0x82, 0xaf, 0xee, 0xc9, 0xf3, 0x42, 0x85, 0xa0, 0x46, 0xc3, 0x54, 0x38, 0x29, - 0xfc, 0x78, 0x28, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x8e, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, - 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x51, 0x4c, - 0x65, 0x46, 0x49, 0x6c, 0x60, 0x97, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x56, 0x8a, - 0x64, 0x3c, 0x01, 0x00, 0x00, -} - -func (this *Tokens) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Tokens) - if !ok { - that2, ok := that.(Tokens) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Access != that1.Access { - return false - } - if this.ExpiresAt != that1.ExpiresAt { - return false - } - if this.Refresh != that1.Refresh { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *Tokens) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Tokens) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Tokens) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Refresh) > 0 { - i -= len(m.Refresh) - copy(dAtA[i:], m.Refresh) - i = encodeVarintAuthentication(dAtA, i, uint64(len(m.Refresh))) - i-- - dAtA[i] = 0x1a - } - if m.ExpiresAt != 0 { - i = encodeVarintAuthentication(dAtA, i, uint64(m.ExpiresAt)) - i-- - dAtA[i] = 0x10 - } - if len(m.Access) > 0 { - i -= len(m.Access) - copy(dAtA[i:], m.Access) - i = encodeVarintAuthentication(dAtA, i, uint64(len(m.Access))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAuthentication(dAtA []byte, offset int, v uint64) int { - offset -= sovAuthentication(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedTokens(r randyAuthentication, easy bool) *Tokens { - this := &Tokens{} - this.Access = string(randStringAuthentication(r)) - this.ExpiresAt = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ExpiresAt *= -1 - } - this.Refresh = string(randStringAuthentication(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAuthentication(r, 4) - } - return this -} - -type randyAuthentication interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneAuthentication(r randyAuthentication) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringAuthentication(r randyAuthentication) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneAuthentication(r) - } - return string(tmps) -} -func randUnrecognizedAuthentication(r randyAuthentication, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldAuthentication(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldAuthentication(dAtA []byte, r randyAuthentication, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateAuthentication(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateAuthentication(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateAuthentication(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateAuthentication(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateAuthentication(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateAuthentication(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateAuthentication(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Tokens) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Access) - if l > 0 { - n += 1 + l + sovAuthentication(uint64(l)) - } - if m.ExpiresAt != 0 { - n += 1 + sovAuthentication(uint64(m.ExpiresAt)) - } - l = len(m.Refresh) - if l > 0 { - n += 1 + l + sovAuthentication(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAuthentication(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAuthentication(x uint64) (n int) { - return sovAuthentication(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Tokens) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthentication - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tokens: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tokens: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Access", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthentication - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthentication - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAuthentication - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Access = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) - } - m.ExpiresAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthentication - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiresAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Refresh", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuthentication - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuthentication - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAuthentication - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Refresh = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuthentication(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuthentication - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAuthentication(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAuthentication - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAuthentication - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAuthentication - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAuthentication - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAuthentication - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAuthentication - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAuthentication = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAuthentication = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAuthentication = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/authentication.proto b/api/core/v2/authentication.proto deleted file mode 100644 index e78ce1e832..0000000000 --- a/api/core/v2/authentication.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// Tokens contains the structure for exchanging tokens with the API -message Tokens { - // Access token is used by client to make request - string access = 1 [ (gogoproto.jsontag) = "access_token" ]; - - // ExpiresAt unix timestamp describing when the access token is no longer - // valid - int64 expires_at = 2 [ (gogoproto.jsontag) = "expires_at" ]; - - // Refresh token is used by client to request a new access token - string refresh = 3 [ (gogoproto.jsontag) = "refresh_token" ]; -} diff --git a/api/core/v2/authentication_test.go b/api/core/v2/authentication_test.go deleted file mode 100644 index e6083a1fe3..0000000000 --- a/api/core/v2/authentication_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package v2 - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestFixtureCreatesValidTokens(t *testing.T) { - tokens := FixtureTokens("foo", "bar") - assert.NoError(t, tokens.Validate()) -} - -func TestTokensValidator(t *testing.T) { - tokens := FixtureTokens("foo", "bar") - - // Given valid tokens it should pass - assert.NoError(t, tokens.Validate()) - - // Given asset without an access token it should not pass - tokens = FixtureTokens("", "foo") - assert.Error(t, tokens.Validate()) - - // Given asset without a refresh token it should not pass - tokens = FixtureTokens("foo", "") - assert.Error(t, tokens.Validate()) - - // Given asset without an expiration it should not pass - tokens = FixtureTokens("foo", "") - tokens.ExpiresAt = 0 - assert.Error(t, tokens.Validate()) -} diff --git a/api/core/v2/authenticationpb_test.go b/api/core/v2/authenticationpb_test.go deleted file mode 100644 index 79083c8577..0000000000 --- a/api/core/v2/authenticationpb_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/authentication.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestTokensProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTokens(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tokens{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTokensMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTokens(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tokens{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTokensJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTokens(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tokens{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTokensProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTokens(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Tokens{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTokensProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTokens(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Tokens{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTokensSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTokens(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/benchmark_test.go b/api/core/v2/benchmark_test.go deleted file mode 100644 index 11c07c80ce..0000000000 --- a/api/core/v2/benchmark_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package v2 - -import ( - "encoding/json" - "testing" -) - -func BenchmarkCheckRequestMarshal(b *testing.B) { - req := FixtureCheckRequest("cake") - b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - _, _ = json.Marshal(req) - } - }) -} - -func BenchmarkCheckRequestUnmarshal(b *testing.B) { - req := FixtureCheckRequest("cake") - data, err := json.Marshal(req) - if err != nil { - b.Fatal(err) - } - b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - var req CheckRequest - _ = json.Unmarshal(data, &req) - } - }) -} - -func BenchmarkCheckConfigMarshal(b *testing.B) { - req := FixtureCheckConfig("cake") - b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - _, _ = json.Marshal(req) - } - }) -} - -func BenchmarkCheckConfigUnmarshal(b *testing.B) { - req := FixtureCheckConfig("cake") - data, err := json.Marshal(req) - if err != nil { - b.Fatal(err) - } - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - var req CheckConfig - _ = json.Unmarshal(data, &req) - } - }) -} diff --git a/api/core/v2/check.go b/api/core/v2/check.go deleted file mode 100644 index cea42ca01b..0000000000 --- a/api/core/v2/check.go +++ /dev/null @@ -1,352 +0,0 @@ -package v2 - -import ( - "encoding/json" - "errors" - "fmt" - "net/url" - "path" - "time" - - cron "github.com/robfig/cron/v3" - utilstrings "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // CheckRequestType is the message type string for check request. - CheckRequestType = "check_request" - - // ChecksResource is the name of this resource type - ChecksResource = "checks" - - // DefaultSplayCoverage is the default splay coverage for proxy check requests - DefaultSplayCoverage = 90.0 - - // NagiosOutputMetricFormat is the accepted string to represent the output metric format of - // Nagios Perf Data - NagiosOutputMetricFormat = "nagios_perfdata" - - // GraphiteOutputMetricFormat is the accepted string to represent the output metric format of - // Graphite Plain Text - GraphiteOutputMetricFormat = "graphite_plaintext" - - // OpenTSDBOutputMetricFormat is the accepted string to represent the output metric format of - // OpenTSDB Line - OpenTSDBOutputMetricFormat = "opentsdb_line" - - // InfluxDBOutputMetricFormat is the accepted string to represent the output metric format of - // InfluxDB Line - InfluxDBOutputMetricFormat = "influxdb_line" - - // PrometheusOutputMetricFormat is the accepted string to represent the output metric format of - // Prometheus Exposition Text Format - PrometheusOutputMetricFormat = "prometheus_text" - - // KeepaliveCheckName is the name of the check that is created when a - // keepalive timeout occurs. - KeepaliveCheckName = "keepalive" - - // RegistrationCheckName is the name of the check that is created when an - // entity sends a keepalive and the entity does not yet exist in the store. - RegistrationCheckName = "registration" - - // BackendCheckName is the name fo the check that is created when a backend - // event is generated from an error. - BackendCheckName = "backend" - - // MemoryScheduler indicates that a check is scheduled in-memory. - MemoryScheduler = "memory" - - // EtcdScheduler indicates that a check is scheduled with etcd leases and - // watchers. - EtcdScheduler = "etcd" - - // PostgresScheduler indicates that a check is scheduled with postgresql, - // using transactions and asynchronous notification (NOTIFY). - PostgresScheduler = "postgres" -) - -// OutputMetricFormats represents all the accepted output_metric_format's a check can have -var OutputMetricFormats = []string{NagiosOutputMetricFormat, GraphiteOutputMetricFormat, OpenTSDBOutputMetricFormat, InfluxDBOutputMetricFormat, PrometheusOutputMetricFormat} - -// FixtureCheck returns a fixture for a Check object. -func FixtureCheck(id string) *Check { - t := time.Now().Unix() - config := FixtureCheckConfig(id) - history := make([]CheckHistory, 21) - for i := 0; i < 21; i++ { - history[i] = CheckHistory{ - Status: 0, - Executed: t - (60 * int64(i+1)), - } - } - - c := NewCheck(config) - c.Issued = t - c.Executed = t + 1 - c.Duration = 1.0 - c.History = history - c.State = EventPassingState - - return c -} - -// NewCheck creates a new Check. It copies the fields from CheckConfig that -// match with Check's fields. -// -// Because CheckConfig uses extended attributes, embedding CheckConfig was -// deemed to be too complicated, due to interactions between promoted methods -// and encoding/json. -func NewCheck(c *CheckConfig) *Check { - check := &Check{ - ObjectMeta: ObjectMeta{ - Name: c.Name, - Namespace: c.Namespace, - Labels: c.Labels, - Annotations: c.Annotations, - }, - Command: c.Command, - Handlers: c.Handlers, - HighFlapThreshold: c.HighFlapThreshold, - Interval: c.Interval, - LowFlapThreshold: c.LowFlapThreshold, - Publish: c.Publish, - RuntimeAssets: c.RuntimeAssets, - Subscriptions: c.Subscriptions, - ProxyEntityName: c.ProxyEntityName, - CheckHooks: c.CheckHooks, - Stdin: c.Stdin, - Subdue: c.Subdue, - Cron: c.Cron, - Ttl: c.Ttl, - Timeout: c.Timeout, - ProxyRequests: c.ProxyRequests, - RoundRobin: c.RoundRobin, - OutputMetricFormat: c.OutputMetricFormat, - OutputMetricHandlers: c.OutputMetricHandlers, - OutputMetricTags: c.OutputMetricTags, - OutputMetricThresholds: c.OutputMetricThresholds, - EnvVars: c.EnvVars, - DiscardOutput: c.DiscardOutput, - MaxOutputSize: c.MaxOutputSize, - Scheduler: c.Scheduler, - Pipelines: c.Pipelines, - } - if check.Labels == nil { - check.Labels = make(map[string]string) - } - if check.Annotations == nil { - check.Annotations = make(map[string]string) - } - return check -} - -// SetNamespace sets the namespace of the resource. -func (c *Check) SetNamespace(namespace string) { - c.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (c *Check) SetObjectMeta(meta ObjectMeta) { - c.ObjectMeta = meta -} - -// SetName sets the name of the resource. -func (c *Check) SetName(name string) { - c.Name = name -} - -// StorePrefix returns the path prefix to this resource in the store -func (c *Check) StorePrefix() string { - return ChecksResource -} - -// URIPath returns the path component of a check URI. -func (c *Check) URIPath() string { - if c.Namespace == "" { - return path.Join(URLPrefix, ChecksResource, url.PathEscape(c.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(c.Namespace), ChecksResource, url.PathEscape(c.Name)) -} - -// Validate returns an error if the check does not pass validation tests. -func (c *Check) Validate() error { - if err := ValidateName(c.Name); err != nil { - return errors.New("check name " + err.Error()) - } - if c.Publish { - if c.Cron != "" { - if c.Interval > 0 { - return errors.New("must only specify either an interval or a cron schedule") - } - - if _, err := cron.ParseStandard(c.Cron); err != nil { - return fmt.Errorf("check cron string is invalid: %w", err) - } - } else { - if c.Interval < 1 { - return errors.New("check interval must be greater than or equal to 1") - } - } - } - - if c.Ttl > 0 && c.Ttl <= int64(c.Interval) { - return errors.New("ttl must be greater than check interval") - } - if c.Ttl > 0 && c.Ttl < 5 { - return errors.New("minimum ttl is 5 seconds") - } - - for _, assetName := range c.RuntimeAssets { - if err := ValidateAssetName(assetName); err != nil { - return fmt.Errorf("asset's %s", err) - } - } - - for _, subscription := range c.Subscriptions { - if subscription == "" { - return fmt.Errorf("subscriptions cannot be empty strings") - } - } - - // The entity can be empty but can't contain invalid characters (only - // alphanumeric string) - if c.ProxyEntityName != "" { - if err := ValidateName(c.ProxyEntityName); err != nil { - return errors.New("proxy entity name " + err.Error()) - } - } - - if c.ProxyRequests != nil { - if err := c.ProxyRequests.Validate(); err != nil { - return err - } - } - - if c.OutputMetricFormat != "" { - if err := ValidateOutputMetricFormat(c.OutputMetricFormat); err != nil { - return err - } - } - - if c.LowFlapThreshold != 0 && c.HighFlapThreshold != 0 && c.LowFlapThreshold >= c.HighFlapThreshold { - return errors.New("invalid flap thresholds") - } - - if err := ValidateEnvVars(c.EnvVars); err != nil { - return err - } - - if c.MaxOutputSize < 0 { - return fmt.Errorf("MaxOutputSize must be >= 0") - } - - if c.OutputMetricThresholds != nil { - if err := MetricThresholds(c.OutputMetricThresholds).Validate(); err != nil { - return err - } - } - - if err := ValidateSubdues(c.Subdues); err != nil { - return err - } - - return c.Subdue.Validate() -} - -// MarshalJSON implements the json.Marshaler interface. -func (c *Check) MarshalJSON() ([]byte, error) { - if c == nil { - return []byte("null"), nil - } - if c.Subscriptions == nil { - c.Subscriptions = []string{} - } - if c.Handlers == nil { - c.Handlers = []string{} - } - if c.Pipelines == nil { - c.Pipelines = []*ResourceReference{} - } - - type Clone Check - clone := &Clone{} - *clone = Clone(*c) - - return json.Marshal(clone) -} - -// MergeWith updates the current Check with the history of the check given as -// an argument, updating the current check's history appropriately. -func (c *Check) MergeWith(prevCheck *Check) { - history := prevCheck.History - histEntry := CheckHistory{ - Status: c.Status, - Executed: c.Executed, - } - - history = append(history, histEntry) - if len(history) > 21 { - history = history[1:] - } - - c.History = history - c.LastOK = prevCheck.LastOK - c.Occurrences = prevCheck.Occurrences - c.OccurrencesWatermark = prevCheck.OccurrencesWatermark - updateCheckState(c) - - // This has to be done after the call to updateCheckState, as that function is what - // sets the value for c.State that is used below, but the order can't be switched - // around as updateCheckState relies on the latest item (specifically, its status) - // being present in c.History. - // NB! This has been disabled for 5.x releases. - // c.History[len(c.History)-1].Flapping = c.State == EventFlappingState -} - -// ValidateOutputMetricFormat returns an error if the string is not a valid metric -// format -func ValidateOutputMetricFormat(format string) error { - if utilstrings.InArray(format, OutputMetricFormats) { - return nil - } - return errors.New("output metric format is not valid") -} - -func ValidateSubdues(subdues []*TimeWindowRepeated) error { - for i, subdue := range subdues { - if err := subdue.Validate(); err != nil { - return fmt.Errorf("subdue %d invalid: %s", i, err) - } - } - return nil -} - -// previousOccurrence returns the most recent CheckHistory item, excluding the current result. -func (c *Check) previousOccurrence() *CheckHistory { - if len(c.History) < 2 { - return nil - } - return &c.History[len(c.History)-2] -} - -// DEPRECATED, DO NOT USE! Events should be ordered FIFO. -// ByExecuted implements the sort.Interface for []CheckHistory based on the -// Executed field. -// -// Example: -// -// sort.Sort(ByExecuted(check.History)) -type ByExecuted []CheckHistory - -func (b ByExecuted) Len() int { return len(b) } -func (b ByExecuted) Swap(i, j int) { b[i], b[j] = b[j], b[i] } -func (b ByExecuted) Less(i, j int) bool { return b[i].Executed < b[j].Executed } - -func (c *Check) RBACName() string { - return "checks" -} - -func (c *CheckConfig) RBACName() string { - return "checks" -} diff --git a/api/core/v2/check.pb.go b/api/core/v2/check.pb.go deleted file mode 100644 index ab1a0d1d3e..0000000000 --- a/api/core/v2/check.pb.go +++ /dev/null @@ -1,6635 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/check.proto - -package v2 - -import ( - bytes "bytes" - encoding_binary "encoding/binary" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// A CheckRequest represents a request to execute a check -type CheckRequest struct { - // Config is the specification of a check. - Config *CheckConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - // Assets are a list of assets required to execute check. - Assets []Asset `protobuf:"bytes,2,rep,name=assets,proto3" json:"assets"` - // Hooks are a list of hooks to be executed after a check. - Hooks []HookConfig `protobuf:"bytes,3,rep,name=hooks,proto3" json:"hooks"` - // Issued describes the time in which the check request was issued - Issued int64 `protobuf:"varint,4,opt,name=Issued,proto3" json:"issued"` - // HookAssets is a map of assets required to execute hooks. - HookAssets map[string]*AssetList `protobuf:"bytes,5,rep,name=hook_assets,json=hookAssets,proto3" json:"hook_assets" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Secrets is a list of kv to be added to the env vars of a check. - Secrets []string `protobuf:"bytes,6,rep,name=secrets,proto3" json:"secrets,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CheckRequest) Reset() { *m = CheckRequest{} } -func (m *CheckRequest) String() string { return proto.CompactTextString(m) } -func (*CheckRequest) ProtoMessage() {} -func (*CheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6b843265b29f5373, []int{0} -} -func (m *CheckRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CheckRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CheckRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckRequest.Merge(m, src) -} -func (m *CheckRequest) XXX_Size() int { - return m.Size() -} -func (m *CheckRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CheckRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CheckRequest proto.InternalMessageInfo - -func (m *CheckRequest) GetConfig() *CheckConfig { - if m != nil { - return m.Config - } - return nil -} - -func (m *CheckRequest) GetAssets() []Asset { - if m != nil { - return m.Assets - } - return nil -} - -func (m *CheckRequest) GetHooks() []HookConfig { - if m != nil { - return m.Hooks - } - return nil -} - -func (m *CheckRequest) GetIssued() int64 { - if m != nil { - return m.Issued - } - return 0 -} - -func (m *CheckRequest) GetHookAssets() map[string]*AssetList { - if m != nil { - return m.HookAssets - } - return nil -} - -func (m *CheckRequest) GetSecrets() []string { - if m != nil { - return m.Secrets - } - return nil -} - -// An AssetList represents a list of assets for a CheckRequest. -type AssetList struct { - // Assets are a list of assets required to execute check or hook. - Assets []Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AssetList) Reset() { *m = AssetList{} } -func (m *AssetList) String() string { return proto.CompactTextString(m) } -func (*AssetList) ProtoMessage() {} -func (*AssetList) Descriptor() ([]byte, []int) { - return fileDescriptor_6b843265b29f5373, []int{1} -} -func (m *AssetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AssetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetList.Merge(m, src) -} -func (m *AssetList) XXX_Size() int { - return m.Size() -} -func (m *AssetList) XXX_DiscardUnknown() { - xxx_messageInfo_AssetList.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetList proto.InternalMessageInfo - -func (m *AssetList) GetAssets() []Asset { - if m != nil { - return m.Assets - } - return nil -} - -// A ProxyRequests represents a request to execute a proxy check -type ProxyRequests struct { - // EntityAttributes store serialized arbitrary JSON-encoded data to match - // entities in the registry. - EntityAttributes []string `protobuf:"bytes,1,rep,name=entity_attributes,json=entityAttributes,proto3" json:"entity_attributes"` - // Splay indicates if proxy check requests should be splayed, published - // evenly over a window of time. - Splay bool `protobuf:"varint,2,opt,name=splay,proto3" json:"splay"` - // SplayCoverage is the percentage used for proxy check request splay - // calculation. - SplayCoverage uint32 `protobuf:"varint,3,opt,name=splay_coverage,json=splayCoverage,proto3" json:"splay_coverage"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProxyRequests) Reset() { *m = ProxyRequests{} } -func (m *ProxyRequests) String() string { return proto.CompactTextString(m) } -func (*ProxyRequests) ProtoMessage() {} -func (*ProxyRequests) Descriptor() ([]byte, []int) { - return fileDescriptor_6b843265b29f5373, []int{2} -} -func (m *ProxyRequests) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProxyRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProxyRequests.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProxyRequests) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProxyRequests.Merge(m, src) -} -func (m *ProxyRequests) XXX_Size() int { - return m.Size() -} -func (m *ProxyRequests) XXX_DiscardUnknown() { - xxx_messageInfo_ProxyRequests.DiscardUnknown(m) -} - -var xxx_messageInfo_ProxyRequests proto.InternalMessageInfo - -func (m *ProxyRequests) GetEntityAttributes() []string { - if m != nil { - return m.EntityAttributes - } - return nil -} - -func (m *ProxyRequests) GetSplay() bool { - if m != nil { - return m.Splay - } - return false -} - -func (m *ProxyRequests) GetSplayCoverage() uint32 { - if m != nil { - return m.SplayCoverage - } - return 0 -} - -// CheckConfig is the specification of a check. -type CheckConfig struct { - // Command is the command to be executed. - Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` - // Handlers are the event handler for the check (incidents and/or metrics). - Handlers []string `protobuf:"bytes,3,rep,name=handlers,proto3" json:"handlers"` - // HighFlapThreshold is the flap detection high threshold (% state change) - // for the check. Sensu uses the same flap detection algorithm as Nagios. - HighFlapThreshold uint32 `protobuf:"varint,4,opt,name=high_flap_threshold,json=highFlapThreshold,proto3" json:"high_flap_threshold"` - // Interval is the interval, in seconds, at which the check should be run. - Interval uint32 `protobuf:"varint,5,opt,name=interval,proto3" json:"interval"` - // LowFlapThreshold is the flap detection low threshold (% state change) for - // the check. Sensu uses the same flap detection algorithm as Nagios. - LowFlapThreshold uint32 `protobuf:"varint,6,opt,name=low_flap_threshold,json=lowFlapThreshold,proto3" json:"low_flap_threshold"` - // Publish indicates if check requests are published for the check - Publish bool `protobuf:"varint,9,opt,name=publish,proto3" json:"publish"` - // RuntimeAssets are a list of assets required to execute check. - RuntimeAssets []string `protobuf:"bytes,10,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"` - // Subscriptions is the list of subscribers for the check. - Subscriptions []string `protobuf:"bytes,11,rep,name=subscriptions,proto3" json:"subscriptions"` - // ExtendedAttributes store serialized arbitrary JSON-encoded data - ExtendedAttributes []byte `protobuf:"bytes,12,opt,name=ExtendedAttributes,proto3" json:"-"` - // Sources indicates the name of the entity representing an external - // resource - ProxyEntityName string `protobuf:"bytes,13,opt,name=proxy_entity_name,json=proxyEntityName,proto3" json:"proxy_entity_name"` - // CheckHooks is the list of check hooks for the check - CheckHooks []HookList `protobuf:"bytes,14,rep,name=check_hooks,json=checkHooks,proto3" json:"check_hooks"` - // STDIN indicates if the check command accepts JSON via stdin from the - // agent - Stdin bool `protobuf:"varint,15,opt,name=stdin,proto3" json:"stdin"` - // Subdue represents one or more time windows when the check should be - // subdued. - Subdue *TimeWindowWhen `protobuf:"bytes,16,opt,name=subdue,proto3" json:"subdue"` - // Cron is the cron string at which the check should be run. - Cron string `protobuf:"bytes,17,opt,name=cron,proto3" json:"cron,omitempty"` - // TTL represents the length of time in seconds for which a check result is - // valid. - Ttl int64 `protobuf:"varint,18,opt,name=ttl,proto3" json:"ttl"` - // Timeout is the timeout, in seconds, at which the check has to run - Timeout uint32 `protobuf:"varint,19,opt,name=timeout,proto3" json:"timeout"` - // ProxyRequests represents a request to execute a proxy check - ProxyRequests *ProxyRequests `protobuf:"bytes,20,opt,name=proxy_requests,json=proxyRequests,proto3" json:"proxy_requests,omitempty"` - // RoundRobin enables round-robin scheduling if set true. - RoundRobin bool `protobuf:"varint,21,opt,name=round_robin,json=roundRobin,proto3" json:"round_robin"` - // OutputOutputMetricFormat is the metric protocol that the check's output - // will be expected to follow in order to be extracted. - OutputMetricFormat string `protobuf:"bytes,22,opt,name=output_metric_format,json=outputMetricFormat,proto3" json:"output_metric_format"` - // OutputOutputMetricHandlers is the list of event handlers that will - // respond to metrics that have been extracted from the check. - OutputMetricHandlers []string `protobuf:"bytes,23,rep,name=output_metric_handlers,json=outputMetricHandlers,proto3" json:"output_metric_handlers"` - // EnvVars is the list of environment variables to set for the check's - // execution environment. - EnvVars []string `protobuf:"bytes,24,rep,name=env_vars,json=envVars,proto3" json:"env_vars"` - // Metadata contains the name, namespace, labels and annotations of the - // check - ObjectMeta `protobuf:"bytes,26,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // MaxOutputSize is the maximum size in bytes that will be stored for check - // output. If check output is larger than MaxOutputSize, it will be - // truncated when stored. Filters, mutators, and handlers will still have - // access to the full check output at the time the event occurs. - MaxOutputSize int64 `protobuf:"varint,27,opt,name=max_output_size,json=maxOutputSize,proto3" json:"max_output_size,omitempty"` - // DiscardOutput causes agents to discard check output. No check output is - // written to the backend, but metrics extraction is still performed. - DiscardOutput bool `protobuf:"varint,28,opt,name=discard_output,json=discardOutput,proto3" json:"discard_output,omitempty"` - // Secrets is the list of Sensu secrets to set for the check's - // execution environment. - Secrets []*Secret `protobuf:"bytes,29,rep,name=secrets,proto3" json:"secrets"` - // OutputMetricTags is list of metric tags to apply to metrics extracted from check output. - OutputMetricTags []*MetricTag `protobuf:"bytes,30,rep,name=output_metric_tags,json=outputMetricTags,proto3" json:"output_metric_tags,omitempty" yaml: "output_metric_tags,omitempty"` - // Scheduler is the type of scheduler the check is scheduled by. The scheduler - // can be "memory", "etcd", or "postgres". Scheduler is set by Sensu - any - // setting by the user will be overridden. - Scheduler string `protobuf:"bytes,31,opt,name=scheduler,proto3" json:"-" yaml: "-"` - // Pipelines are the pipelines this check will use to process its events. - Pipelines []*ResourceReference `protobuf:"bytes,32,rep,name=pipelines,proto3" json:"pipelines"` - OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,33,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` - Subdues []*TimeWindowRepeated `protobuf:"bytes,34,rep,name=subdues,proto3" json:"subdues,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CheckConfig) Reset() { *m = CheckConfig{} } -func (m *CheckConfig) String() string { return proto.CompactTextString(m) } -func (*CheckConfig) ProtoMessage() {} -func (*CheckConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_6b843265b29f5373, []int{3} -} -func (m *CheckConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CheckConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CheckConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CheckConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckConfig.Merge(m, src) -} -func (m *CheckConfig) XXX_Size() int { - return m.Size() -} -func (m *CheckConfig) XXX_DiscardUnknown() { - xxx_messageInfo_CheckConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_CheckConfig proto.InternalMessageInfo - -// A Check is a check specification and optionally the results of the check's -// execution. -type Check struct { - // Command is the command to be executed. - Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` - // Handlers are the event handler for the check (incidents and/or metrics). - Handlers []string `protobuf:"bytes,3,rep,name=handlers,proto3" json:"handlers"` - // HighFlapThreshold is the flap detection high threshold (% state change) - // for the check. Sensu uses the same flap detection algorithm as Nagios. - HighFlapThreshold uint32 `protobuf:"varint,4,opt,name=high_flap_threshold,json=highFlapThreshold,proto3" json:"high_flap_threshold"` - // Interval is the interval, in seconds, at which the check should be run. - Interval uint32 `protobuf:"varint,5,opt,name=interval,proto3" json:"interval"` - // LowFlapThreshold is the flap detection low threshold (% state change) for - // the check. Sensu uses the same flap detection algorithm as Nagios. - LowFlapThreshold uint32 `protobuf:"varint,6,opt,name=low_flap_threshold,json=lowFlapThreshold,proto3" json:"low_flap_threshold"` - // Publish indicates if check requests are published for the check - Publish bool `protobuf:"varint,9,opt,name=publish,proto3" json:"publish"` - // RuntimeAssets are a list of assets required to execute check. - RuntimeAssets []string `protobuf:"bytes,10,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"` - // Subscriptions is the list of subscribers for the check. - Subscriptions []string `protobuf:"bytes,11,rep,name=subscriptions,proto3" json:"subscriptions"` - // Sources indicates the name of the entity representing an external - // resource - ProxyEntityName string `protobuf:"bytes,13,opt,name=proxy_entity_name,json=proxyEntityName,proto3" json:"proxy_entity_name"` - // CheckHooks is the list of check hooks for the check - CheckHooks []HookList `protobuf:"bytes,14,rep,name=check_hooks,json=checkHooks,proto3" json:"check_hooks"` - // STDIN indicates if the check command accepts JSON via stdin from the - // agent - Stdin bool `protobuf:"varint,15,opt,name=stdin,proto3" json:"stdin"` - // Subdue represents one or more time windows when the check should be - // subdued. - Subdue *TimeWindowWhen `protobuf:"bytes,16,opt,name=subdue,proto3" json:"subdue"` - // Cron is the cron string at which the check should be run. - Cron string `protobuf:"bytes,17,opt,name=cron,proto3" json:"cron,omitempty"` - // TTL represents the length of time in seconds for which a check result is - // valid. - Ttl int64 `protobuf:"varint,18,opt,name=ttl,proto3" json:"ttl"` - // Timeout is the timeout, in seconds, at which the check has to run - Timeout uint32 `protobuf:"varint,19,opt,name=timeout,proto3" json:"timeout"` - // ProxyRequests represents a request to execute a proxy check - ProxyRequests *ProxyRequests `protobuf:"bytes,20,opt,name=proxy_requests,json=proxyRequests,proto3" json:"proxy_requests,omitempty"` - // RoundRobin enables round-robin scheduling if set true. - RoundRobin bool `protobuf:"varint,21,opt,name=round_robin,json=roundRobin,proto3" json:"round_robin"` - // Duration of execution - Duration float64 `protobuf:"fixed64,22,opt,name=duration,proto3" json:"duration,omitempty"` - // Executed describes the time in which the check request was executed - Executed int64 `protobuf:"varint,23,opt,name=executed,proto3" json:"executed"` - // History is the check state history. - History []CheckHistory `protobuf:"bytes,24,rep,name=history,proto3" json:"history"` - // Issued describes the time in which the check request was issued - Issued int64 `protobuf:"varint,25,opt,name=issued,proto3" json:"issued"` - // Output from the execution of Command - Output string `protobuf:"bytes,26,opt,name=output,proto3" json:"output"` - // State provides handlers with more information about the state change - State string `protobuf:"bytes,27,opt,name=state,proto3" json:"state,omitempty"` - // Status is the exit status code produced by the check - Status uint32 `protobuf:"varint,28,opt,name=status,proto3" json:"status"` - // TotalStateChange indicates the total state change percentage for the - // check's history - TotalStateChange uint32 `protobuf:"varint,29,opt,name=total_state_change,json=totalStateChange,proto3" json:"total_state_change"` - // LastOK displays last time this check was ok; if event status is 0 this is - // set to timestamp - LastOK int64 `protobuf:"varint,30,opt,name=last_ok,json=lastOk,proto3" json:"last_ok"` - // Occurrences indicates the number of times an event has occurred for a - // client/check pair with the same check status - Occurrences int64 `protobuf:"varint,31,opt,name=occurrences,proto3" json:"occurrences"` - // OccurrencesWatermark indicates the high water mark tracking number of - // occurrences at the current severity - OccurrencesWatermark int64 `protobuf:"varint,32,opt,name=occurrences_watermark,json=occurrencesWatermark,proto3" json:"occurrences_watermark"` - // Silenced is a list of silenced entry ids (subscription and check name) - Silenced []string `protobuf:"bytes,33,rep,name=silenced,proto3" json:"silenced,omitempty"` - // Hooks describes the results of multiple hooks; if event is associated to - // hook execution. - Hooks []*Hook `protobuf:"bytes,34,rep,name=hooks,proto3" json:"hooks,omitempty"` - // OutputMetricFormat is the metric protocol that the check's output - // will be expected to follow in order to be extracted. - OutputMetricFormat string `protobuf:"bytes,35,opt,name=output_metric_format,json=outputMetricFormat,proto3" json:"output_metric_format"` - // OutputMetricHandlers is the list of event handlers that will - // respond to metrics that have been extracted from the check. - OutputMetricHandlers []string `protobuf:"bytes,36,rep,name=output_metric_handlers,json=outputMetricHandlers,proto3" json:"output_metric_handlers"` - // EnvVars is the list of environment variables to set for the check's - // execution environment. - EnvVars []string `protobuf:"bytes,37,rep,name=env_vars,json=envVars,proto3" json:"env_vars"` - // Metadata contains the name, namespace, labels and annotations of the - // check - ObjectMeta `protobuf:"bytes,38,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // MaxOutputSize is the maximum size in bytes that will be stored for check - // output. If check output is larger than MaxOutputSize, it will be - // truncated when stored. Filters, mutators, and handlers will still have - // access to the full check output at the time the event occurs. - MaxOutputSize int64 `protobuf:"varint,39,opt,name=max_output_size,json=maxOutputSize,proto3" json:"max_output_size,omitempty"` - // DiscardOutput causes agents to discard check output. No check output is - // written to the backend, but metrics extraction is still performed. - DiscardOutput bool `protobuf:"varint,40,opt,name=discard_output,json=discardOutput,proto3" json:"discard_output,omitempty"` - // Secrets is the list of Sensu secrets to set for the check's - // execution environment. - Secrets []*Secret `protobuf:"bytes,41,rep,name=secrets,proto3" json:"secrets"` - // IsSilenced indicates whether the check is silenced or not - IsSilenced bool `protobuf:"varint,42,opt,name=is_silenced,json=isSilenced,proto3" json:"is_silenced"` - // OutputMetricTags is list of metric tags to apply to metrics extracted from check output. - OutputMetricTags []*MetricTag `protobuf:"bytes,43,rep,name=output_metric_tags,json=outputMetricTags,proto3" json:"output_metric_tags,omitempty" yaml: "output_metric_tags,omitempty"` - // Scheduler is the type of scheduler the check is scheduled by. The scheduler - // can be "memory", "etcd", or "postgres". Scheduler is set by Sensu - any - // setting by the user will be overridden. - Scheduler string `protobuf:"bytes,44,opt,name=scheduler,proto3" json:"scheduler"` - // ProcessedBy indicates the name of the agent that processed the event. This - // is mainly useful for determining which agent executed a proxy check request. - ProcessedBy string `protobuf:"bytes,45,opt,name=ProcessedBy,proto3" json:"processed_by,omitempty" yaml: "processed_by"` - // Pipelines are the pipelines this check will use to process its events. - Pipelines []*ResourceReference `protobuf:"bytes,46,rep,name=pipelines,proto3" json:"pipelines"` - // MetricThresholds are a list of thresholds to apply to metrics in order to determine - // the check status. - OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,47,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` - Subdues []*TimeWindowRepeated `protobuf:"bytes,48,rep,name=subdues,proto3" json:"subdues,omitempty"` - // ExtendedAttributes store serialized arbitrary JSON-encoded data - ExtendedAttributes []byte `protobuf:"bytes,99,opt,name=ExtendedAttributes,proto3" json:"-"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Check) Reset() { *m = Check{} } -func (m *Check) String() string { return proto.CompactTextString(m) } -func (*Check) ProtoMessage() {} -func (*Check) Descriptor() ([]byte, []int) { - return fileDescriptor_6b843265b29f5373, []int{4} -} -func (m *Check) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Check) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Check.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Check) XXX_Merge(src proto.Message) { - xxx_messageInfo_Check.Merge(m, src) -} -func (m *Check) XXX_Size() int { - return m.Size() -} -func (m *Check) XXX_DiscardUnknown() { - xxx_messageInfo_Check.DiscardUnknown(m) -} - -var xxx_messageInfo_Check proto.InternalMessageInfo - -// CheckHistory is a record of a check execution and its status -type CheckHistory struct { - // Status is the exit status code produced by the check. - Status uint32 `protobuf:"varint,1,opt,name=status,proto3" json:"status"` - // Executed describes the time in which the check request was executed - Executed int64 `protobuf:"varint,2,opt,name=executed,proto3" json:"executed"` - // Flapping describes whether the check was flapping at this particular - // point in time. Comparing this value to the current flapping status allows - // filters to trigger only on start and end of flapping. NB! This has been - // disabled for 5.x releases. - Flapping bool `protobuf:"varint,3,opt,name=flapping,proto3" json:"-"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CheckHistory) Reset() { *m = CheckHistory{} } -func (m *CheckHistory) String() string { return proto.CompactTextString(m) } -func (*CheckHistory) ProtoMessage() {} -func (*CheckHistory) Descriptor() ([]byte, []int) { - return fileDescriptor_6b843265b29f5373, []int{5} -} -func (m *CheckHistory) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CheckHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CheckHistory.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CheckHistory) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckHistory.Merge(m, src) -} -func (m *CheckHistory) XXX_Size() int { - return m.Size() -} -func (m *CheckHistory) XXX_DiscardUnknown() { - xxx_messageInfo_CheckHistory.DiscardUnknown(m) -} - -var xxx_messageInfo_CheckHistory proto.InternalMessageInfo - -func (m *CheckHistory) GetStatus() uint32 { - if m != nil { - return m.Status - } - return 0 -} - -func (m *CheckHistory) GetExecuted() int64 { - if m != nil { - return m.Executed - } - return 0 -} - -func (m *CheckHistory) GetFlapping() bool { - if m != nil { - return m.Flapping - } - return false -} - -func init() { - proto.RegisterType((*CheckRequest)(nil), "sensu.core.v2.CheckRequest") - proto.RegisterMapType((map[string]*AssetList)(nil), "sensu.core.v2.CheckRequest.HookAssetsEntry") - proto.RegisterType((*AssetList)(nil), "sensu.core.v2.AssetList") - proto.RegisterType((*ProxyRequests)(nil), "sensu.core.v2.ProxyRequests") - proto.RegisterType((*CheckConfig)(nil), "sensu.core.v2.CheckConfig") - proto.RegisterType((*Check)(nil), "sensu.core.v2.Check") - proto.RegisterType((*CheckHistory)(nil), "sensu.core.v2.CheckHistory") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/check.proto", fileDescriptor_6b843265b29f5373) -} - -var fileDescriptor_6b843265b29f5373 = []byte{ - // 1812 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x73, 0xdb, 0xc6, - 0xf5, 0x37, 0x24, 0x8b, 0x12, 0x97, 0xa6, 0x7e, 0xac, 0x25, 0x7b, 0xad, 0xd8, 0x04, 0xcd, 0x6f, - 0x9c, 0xf0, 0x1b, 0xc7, 0x94, 0x4d, 0x37, 0x93, 0xd4, 0xe3, 0xe9, 0xd4, 0x50, 0xed, 0x2a, 0x6d, - 0x1c, 0x7b, 0xd6, 0x6a, 0x3d, 0xd3, 0x99, 0x0e, 0x66, 0x09, 0xac, 0x48, 0x54, 0x24, 0xc0, 0x62, - 0x17, 0x94, 0x98, 0x4b, 0x7b, 0xec, 0xb1, 0xc7, 0x1e, 0x73, 0x4c, 0x2f, 0xed, 0xb5, 0x7f, 0x42, - 0x8e, 0xb9, 0xf6, 0x82, 0x69, 0xd5, 0x1b, 0x8e, 0x39, 0xf5, 0xd8, 0xd9, 0x87, 0x05, 0x08, 0x52, - 0x94, 0x23, 0xcf, 0x38, 0xd3, 0x4c, 0x27, 0x17, 0x62, 0xf7, 0xb3, 0xef, 0xb3, 0x3f, 0xde, 0x7e, - 0x76, 0xdf, 0x5b, 0xa2, 0x7b, 0x5d, 0x4f, 0xf6, 0xa2, 0x4e, 0xcb, 0x09, 0x06, 0x3b, 0x82, 0xfb, - 0x22, 0x4a, 0x7f, 0xef, 0x74, 0x83, 0x1d, 0x36, 0xf4, 0x76, 0x9c, 0x20, 0xe4, 0x3b, 0xa3, 0xf6, - 0x8e, 0xd3, 0xe3, 0xce, 0x61, 0x6b, 0x18, 0x06, 0x32, 0xc0, 0x55, 0xb0, 0x68, 0xa9, 0xa6, 0xd6, - 0xa8, 0xbd, 0xfd, 0x83, 0x42, 0x0f, 0xdd, 0xa0, 0x1b, 0xec, 0x80, 0x55, 0x27, 0x3a, 0xf8, 0xf1, - 0xe8, 0x5e, 0xeb, 0x7e, 0xeb, 0x1e, 0x80, 0x80, 0x41, 0x29, 0xed, 0x64, 0xfb, 0x9c, 0xe3, 0x32, - 0x21, 0xb8, 0xd4, 0x94, 0xbb, 0xe7, 0xa3, 0xf4, 0x82, 0xe0, 0xf0, 0xf5, 0x18, 0x03, 0x2e, 0x99, - 0x66, 0x3c, 0x3c, 0x37, 0x23, 0xf4, 0x1c, 0x5b, 0xf6, 0x42, 0x2e, 0x7a, 0x41, 0xdf, 0xd5, 0xec, - 0xfb, 0xaf, 0xc3, 0x16, 0x9a, 0xf4, 0xa3, 0xf3, 0x91, 0x42, 0x2e, 0x82, 0x28, 0x74, 0xb8, 0x1d, - 0xf2, 0x03, 0x1e, 0x72, 0xdf, 0xe1, 0x9a, 0xdf, 0x3e, 0x1f, 0x5f, 0x70, 0x27, 0xcc, 0x5d, 0xf9, - 0xe1, 0xf9, 0x38, 0xd2, 0x1b, 0x70, 0xfb, 0xc8, 0xf3, 0xdd, 0xe0, 0x28, 0x25, 0x36, 0xfe, 0xbc, - 0x88, 0x2e, 0xed, 0x2a, 0x2d, 0x50, 0xfe, 0xdb, 0x88, 0x0b, 0x89, 0x3f, 0x42, 0x25, 0x27, 0xf0, - 0x0f, 0xbc, 0x2e, 0x31, 0xea, 0x46, 0xb3, 0xd2, 0xde, 0x6e, 0x4d, 0xa9, 0xa3, 0x05, 0xc6, 0xbb, - 0x60, 0x61, 0x5d, 0xfc, 0x32, 0x36, 0x0d, 0xaa, 0xed, 0x71, 0x1b, 0x95, 0x60, 0x77, 0x05, 0x59, - 0xa8, 0x2f, 0x36, 0x2b, 0xed, 0xcd, 0x19, 0xe6, 0x23, 0xd5, 0x08, 0x9c, 0x0b, 0x54, 0x5b, 0xe2, - 0x0f, 0xd0, 0x92, 0xda, 0x5e, 0x41, 0x16, 0x81, 0x72, 0x6d, 0x86, 0xb2, 0x17, 0x04, 0xc5, 0xb1, - 0x2e, 0xd0, 0xd4, 0x1a, 0x37, 0x50, 0xe9, 0x63, 0x21, 0x22, 0xee, 0x92, 0x8b, 0x75, 0xa3, 0xb9, - 0x68, 0xa1, 0x24, 0x36, 0x4b, 0x1e, 0x20, 0x54, 0xb7, 0xe0, 0x5f, 0xa3, 0x8a, 0x32, 0xb6, 0xf5, - 0x9c, 0x96, 0x60, 0x80, 0xdb, 0xf3, 0x56, 0xa3, 0x97, 0x0e, 0xa3, 0xc1, 0x24, 0xc5, 0x63, 0x5f, - 0x86, 0x63, 0x6b, 0x2d, 0x89, 0xcd, 0x62, 0x1f, 0x14, 0xf5, 0x72, 0x0b, 0x4c, 0xd0, 0x72, 0xba, - 0x03, 0x82, 0x94, 0xea, 0x8b, 0xcd, 0x32, 0xcd, 0xaa, 0xdb, 0x2f, 0xd1, 0xda, 0x4c, 0x4f, 0x78, - 0x1d, 0x2d, 0x1e, 0xf2, 0x31, 0x78, 0xb4, 0x4c, 0x55, 0x11, 0xb7, 0xd0, 0xd2, 0x88, 0xf5, 0x23, - 0x4e, 0x16, 0xc0, 0xcb, 0x64, 0x9e, 0xaf, 0x3e, 0xf1, 0x84, 0xa4, 0xa9, 0xd9, 0x83, 0x85, 0x8f, - 0x8c, 0xc6, 0xc7, 0xa8, 0x9c, 0xe3, 0xf8, 0x61, 0xee, 0x6d, 0xe3, 0x15, 0xde, 0x5e, 0x55, 0x5e, - 0x53, 0xce, 0xd1, 0x2b, 0xd0, 0xdf, 0xc6, 0x5f, 0x0d, 0x54, 0x7d, 0x1e, 0x06, 0xc7, 0x63, 0xbd, - 0x76, 0x81, 0x2d, 0xb4, 0xc1, 0x7d, 0xe9, 0xc9, 0xb1, 0xcd, 0xa4, 0x0c, 0xbd, 0x4e, 0x24, 0x79, - 0xda, 0x75, 0xd9, 0xda, 0x4a, 0x62, 0xf3, 0x74, 0x23, 0x5d, 0x4f, 0xa1, 0x47, 0x39, 0x82, 0x4d, - 0xb4, 0x24, 0x86, 0x7d, 0x36, 0x86, 0x45, 0xad, 0x58, 0xe5, 0x24, 0x36, 0x53, 0x80, 0xa6, 0x1f, - 0xfc, 0x43, 0xb4, 0x0a, 0x05, 0xdb, 0x09, 0x46, 0x3c, 0x64, 0x5d, 0x4e, 0x16, 0xeb, 0x46, 0xb3, - 0x6a, 0xe1, 0x24, 0x36, 0x67, 0x5a, 0x68, 0x15, 0xea, 0xbb, 0xba, 0xda, 0xf8, 0xfd, 0x1a, 0xaa, - 0x14, 0xb4, 0xa7, 0xfc, 0xef, 0x04, 0x83, 0x01, 0xf3, 0x5d, 0xed, 0xd6, 0xac, 0x8a, 0x9b, 0x68, - 0xa5, 0xc7, 0x7c, 0xb7, 0xcf, 0xc3, 0x54, 0x56, 0x65, 0xeb, 0x52, 0x12, 0x9b, 0x39, 0x46, 0xf3, - 0x12, 0xfe, 0x29, 0xba, 0xdc, 0xf3, 0xba, 0x3d, 0xfb, 0xa0, 0xcf, 0x86, 0x93, 0xb3, 0x0f, 0x9a, - 0xaa, 0x5a, 0x57, 0x93, 0xd8, 0x9c, 0xd7, 0x4c, 0x37, 0x14, 0xf8, 0xa4, 0xcf, 0x86, 0xfb, 0x19, - 0xa4, 0x86, 0xf4, 0x7c, 0xc9, 0xc3, 0x11, 0xeb, 0x93, 0x25, 0x60, 0xc3, 0x90, 0x19, 0x46, 0xf3, - 0x12, 0xfe, 0x09, 0xc2, 0xfd, 0xe0, 0x68, 0x76, 0xc4, 0x12, 0x70, 0xae, 0x24, 0xb1, 0x39, 0xa7, - 0x95, 0xae, 0xf7, 0x83, 0xa3, 0xe9, 0xf1, 0x6e, 0xa1, 0xe5, 0x61, 0xd4, 0xe9, 0x7b, 0xa2, 0x47, - 0xca, 0xe0, 0xea, 0x4a, 0x12, 0x9b, 0x19, 0x44, 0xb3, 0x82, 0x72, 0x77, 0x18, 0xf9, 0x70, 0xe8, - 0xb5, 0x56, 0x10, 0xf8, 0x03, 0xdc, 0x3d, 0xdd, 0x42, 0xab, 0xba, 0xae, 0xe5, 0xfd, 0x21, 0xaa, - 0x8a, 0xa8, 0x23, 0x9c, 0xd0, 0x1b, 0x4a, 0x2f, 0xf0, 0x05, 0xa9, 0x00, 0x73, 0x23, 0x89, 0xcd, - 0xe9, 0x06, 0x3a, 0x5d, 0xc5, 0x1f, 0x20, 0xfc, 0xf8, 0x58, 0x72, 0xdf, 0xe5, 0xee, 0x44, 0x19, - 0xe4, 0x52, 0xdd, 0x68, 0x5e, 0xb2, 0x96, 0x92, 0xd8, 0x34, 0xee, 0xd0, 0x39, 0x06, 0x78, 0x1f, - 0x6d, 0x0c, 0x95, 0x1e, 0x6d, 0xad, 0x33, 0x9f, 0x0d, 0x38, 0xa9, 0xaa, 0x8d, 0xb5, 0x9a, 0x27, - 0xb1, 0xb9, 0x06, 0x62, 0x7d, 0x0c, 0x6d, 0x9f, 0xb2, 0x01, 0x57, 0x8a, 0x3c, 0x65, 0x4f, 0xd7, - 0x86, 0xd3, 0x56, 0xf8, 0x29, 0xaa, 0x40, 0xa0, 0xb3, 0xd3, 0x4b, 0x66, 0x15, 0x4e, 0xca, 0xd5, - 0x39, 0x97, 0x8c, 0x3a, 0x52, 0xd6, 0x65, 0x7d, 0x58, 0x8a, 0x1c, 0x8a, 0xa0, 0xb2, 0x07, 0xd7, - 0x8e, 0xd2, 0xb7, 0x74, 0x3d, 0x9f, 0xac, 0x15, 0xf4, 0xad, 0x00, 0x9a, 0x7e, 0xf0, 0x23, 0x54, - 0x12, 0x51, 0xc7, 0x8d, 0x38, 0x59, 0x87, 0x63, 0x7d, 0x63, 0x66, 0xa8, 0x7d, 0x6f, 0xc0, 0x5f, - 0xc2, 0xf5, 0xfb, 0xb2, 0xc7, 0xfd, 0xf4, 0xda, 0x4a, 0x09, 0x54, 0x7f, 0x31, 0x46, 0x17, 0x9d, - 0x30, 0xf0, 0xc9, 0x06, 0x88, 0x1a, 0xca, 0xf8, 0x1a, 0x5a, 0x94, 0xb2, 0x4f, 0x30, 0xdc, 0x75, - 0xcb, 0x49, 0x6c, 0xaa, 0x2a, 0x55, 0x3f, 0x4a, 0x09, 0x6a, 0xd7, 0x82, 0x48, 0x92, 0xcb, 0x20, - 0x22, 0x50, 0x82, 0x86, 0x68, 0x56, 0xc0, 0xbb, 0x68, 0x35, 0x75, 0x57, 0xa8, 0xcf, 0x3b, 0xd9, - 0x84, 0x09, 0x5e, 0x9f, 0x99, 0xe0, 0xd4, 0x9d, 0x40, 0xab, 0xc3, 0xa9, 0x2b, 0xe2, 0x2e, 0xaa, - 0x84, 0x41, 0xe4, 0xbb, 0x76, 0x18, 0x74, 0x3c, 0x9f, 0x6c, 0x81, 0x13, 0xe0, 0x92, 0x2c, 0xc0, - 0x14, 0x41, 0x85, 0xaa, 0x32, 0xfe, 0x19, 0xda, 0x0c, 0x22, 0x39, 0x8c, 0xa4, 0xad, 0x03, 0xec, - 0x41, 0x10, 0x0e, 0x98, 0x24, 0x57, 0x60, 0x63, 0x49, 0x12, 0x9b, 0x73, 0xdb, 0x29, 0x4e, 0xd1, - 0xa7, 0x00, 0x3e, 0x01, 0x0c, 0x3f, 0x47, 0x57, 0xa6, 0x6d, 0xf3, 0x43, 0x7e, 0x15, 0xa4, 0xb9, - 0x9d, 0xc4, 0xe6, 0x19, 0x16, 0x74, 0xb3, 0xd8, 0xdf, 0x5e, 0x76, 0xfc, 0xdf, 0x45, 0x2b, 0xdc, - 0x1f, 0xd9, 0x23, 0x16, 0x0a, 0x42, 0x26, 0x17, 0x45, 0x86, 0xd1, 0x65, 0xee, 0x8f, 0x7e, 0xc9, - 0x42, 0x81, 0x7f, 0x81, 0x56, 0x54, 0x4a, 0xe1, 0x32, 0xc9, 0xc8, 0x36, 0xf8, 0x6d, 0x36, 0x50, - 0x3d, 0xeb, 0xfc, 0x86, 0x3b, 0xaa, 0x7f, 0x66, 0xd5, 0x94, 0x8a, 0xbe, 0x8a, 0x4d, 0x43, 0x9d, - 0xe6, 0x8c, 0xf6, 0x7e, 0x30, 0xf0, 0x24, 0x1f, 0x0c, 0xe5, 0x98, 0xe6, 0x5d, 0xe1, 0x77, 0xd0, - 0xda, 0x80, 0x1d, 0xdb, 0x7a, 0xce, 0xc2, 0xfb, 0x8c, 0x93, 0xb7, 0xd4, 0x16, 0xd3, 0xea, 0x80, - 0x1d, 0x3f, 0x03, 0xf4, 0x85, 0xf7, 0x19, 0xc7, 0xb7, 0xd0, 0xaa, 0xeb, 0x09, 0x87, 0x85, 0xae, - 0xb6, 0x25, 0xd7, 0x95, 0xeb, 0x69, 0x55, 0xa3, 0xa9, 0x29, 0x7e, 0x38, 0x89, 0x48, 0x37, 0x40, - 0xe8, 0x5b, 0x33, 0x93, 0x7c, 0x01, 0xad, 0xa9, 0x42, 0xb4, 0x65, 0x1e, 0xb5, 0xf0, 0x1f, 0x0d, - 0x84, 0xa7, 0xbd, 0x27, 0x59, 0x57, 0x90, 0x1a, 0xf4, 0x34, 0x1b, 0x9e, 0x52, 0x47, 0xee, 0xb3, - 0xae, 0xb5, 0x97, 0xc4, 0xe6, 0xf5, 0xd3, 0xbc, 0xc9, 0x7a, 0xbf, 0x8e, 0xcd, 0xb7, 0xc7, 0x6c, - 0xd0, 0x7f, 0x50, 0x6f, 0xbc, 0xca, 0xac, 0x41, 0xd7, 0x8b, 0x7b, 0xb4, 0xcf, 0xba, 0x4a, 0x6f, - 0x65, 0xe1, 0xf4, 0xb8, 0x1b, 0xf5, 0x79, 0x48, 0x4c, 0x90, 0x0c, 0x86, 0x1b, 0xe4, 0xeb, 0xd8, - 0x2c, 0xeb, 0x3e, 0xef, 0x34, 0xe8, 0xc4, 0x08, 0x3f, 0x45, 0xe5, 0xa1, 0x37, 0xe4, 0x7d, 0xcf, - 0xe7, 0x82, 0xd4, 0x61, 0xea, 0xf5, 0x99, 0xa9, 0x53, 0x9d, 0x76, 0xd1, 0x2c, 0xeb, 0xb2, 0xaa, - 0x49, 0x6c, 0x4e, 0x68, 0x74, 0x52, 0xc4, 0x7f, 0x31, 0x10, 0x99, 0x99, 0x74, 0x76, 0x05, 0x0b, - 0x72, 0x13, 0xba, 0xaf, 0xcd, 0xf7, 0x4c, 0x66, 0x66, 0xed, 0x27, 0xb1, 0xd9, 0x38, 0xab, 0x8f, - 0x29, 0x2f, 0xbd, 0x37, 0xdf, 0x4b, 0x73, 0x8c, 0x1b, 0xf4, 0xca, 0x94, 0xaf, 0x72, 0x13, 0x4c, - 0xd1, 0x72, 0x7a, 0x8d, 0x08, 0xd2, 0x80, 0xe9, 0xdd, 0x3c, 0xf3, 0x02, 0xa2, 0x7c, 0xc8, 0x99, - 0xe4, 0x6e, 0x1a, 0xdd, 0x35, 0xab, 0x20, 0xd3, 0xac, 0xa3, 0x07, 0x2b, 0x7f, 0xf8, 0xdc, 0xbc, - 0xf0, 0xc5, 0xe7, 0xa6, 0xd1, 0xf8, 0xfb, 0x26, 0x5a, 0x82, 0x10, 0xfc, 0x7d, 0xf0, 0xfd, 0x8e, - 0x06, 0xdf, 0xef, 0xa3, 0xe8, 0xff, 0x62, 0x14, 0xdd, 0x46, 0x2b, 0x6e, 0x14, 0x32, 0xb5, 0xc5, - 0x10, 0x39, 0x0d, 0x9a, 0xd7, 0x95, 0xf8, 0xf9, 0x31, 0x77, 0x22, 0xc9, 0x5d, 0x72, 0x15, 0x56, - 0x96, 0xc6, 0x30, 0x8d, 0xd1, 0xbc, 0x84, 0x9f, 0xa0, 0xe5, 0x9e, 0x27, 0x64, 0x10, 0x8e, 0x21, - 0xd8, 0x55, 0xda, 0x6f, 0xcd, 0x7b, 0x0b, 0xed, 0xa5, 0x26, 0xd6, 0x9a, 0xde, 0xc5, 0x8c, 0x43, - 0xb3, 0x82, 0x7a, 0x7b, 0xa5, 0x2f, 0x2d, 0x72, 0xed, 0xf4, 0xdb, 0x2b, 0xfd, 0x2a, 0x1b, 0x1d, - 0xa9, 0xb6, 0x41, 0x7c, 0x60, 0x93, 0x22, 0x54, 0x7f, 0xf1, 0xa6, 0x92, 0x01, 0x93, 0x69, 0xcc, - 0x2b, 0xd3, 0xb4, 0xa2, 0x98, 0xaa, 0x10, 0x09, 0x88, 0x71, 0x55, 0xbd, 0xb9, 0x80, 0x50, 0xfd, - 0x55, 0xc7, 0x58, 0x06, 0x92, 0xf5, 0x6d, 0xa0, 0xd8, 0x4e, 0x8f, 0xf9, 0x5d, 0x4e, 0x6e, 0x4c, - 0x8e, 0xf1, 0xe9, 0x56, 0xba, 0x0e, 0xd8, 0x0b, 0x05, 0xed, 0x02, 0x82, 0x5b, 0x68, 0xb9, 0xcf, - 0x84, 0xb4, 0x83, 0x43, 0x52, 0x83, 0x85, 0x6c, 0x9d, 0xc4, 0x66, 0xe9, 0x13, 0x26, 0xe4, 0xb3, - 0x9f, 0xab, 0x85, 0xeb, 0x46, 0x5a, 0x52, 0x85, 0x67, 0x87, 0xf8, 0x1e, 0xaa, 0x04, 0x8e, 0x13, - 0x85, 0x10, 0x34, 0x04, 0xc4, 0xa3, 0xc5, 0x74, 0xdf, 0x0a, 0x30, 0x2d, 0x56, 0xf0, 0xa7, 0x68, - 0xab, 0x50, 0xb5, 0x8f, 0x98, 0xe4, 0xe1, 0x80, 0x85, 0x87, 0xa4, 0x0e, 0xe4, 0x6b, 0x49, 0x6c, - 0xce, 0x37, 0xa0, 0x9b, 0x05, 0xf8, 0x65, 0x86, 0xe2, 0x3a, 0x5a, 0x11, 0x5e, 0x5f, 0x81, 0x2e, - 0x84, 0x9f, 0xb2, 0x7e, 0x81, 0xe7, 0x28, 0xde, 0xc9, 0xde, 0xd3, 0xe9, 0xf5, 0x7f, 0x79, 0xce, - 0x21, 0xd5, 0x1c, 0xfd, 0x92, 0x3e, 0x2b, 0x43, 0xfb, 0xbf, 0x37, 0x9a, 0xa1, 0xbd, 0xfd, 0x06, - 0x32, 0xb4, 0x5b, 0xe7, 0xcd, 0xd0, 0xde, 0xf9, 0x56, 0x33, 0xb4, 0x77, 0xcf, 0x97, 0xa1, 0x35, - 0xbf, 0x21, 0x43, 0xfb, 0xff, 0xd7, 0xcf, 0xd0, 0xee, 0xa2, 0x8a, 0x27, 0xec, 0x5c, 0x00, 0xef, - 0x4d, 0x2e, 0x8e, 0x02, 0x4c, 0x91, 0x27, 0x5e, 0x64, 0x6a, 0x38, 0x23, 0xa7, 0xbb, 0xfd, 0x5f, - 0xcc, 0xe9, 0x6e, 0x17, 0x73, 0xba, 0xf7, 0x41, 0x64, 0x90, 0x7f, 0xe5, 0x60, 0x31, 0x9d, 0xdb, - 0x47, 0x95, 0xe7, 0x61, 0xe0, 0x70, 0x21, 0xb8, 0x6b, 0x8d, 0xc9, 0x1d, 0x30, 0x6f, 0x2b, 0x15, - 0x0d, 0x33, 0xd8, 0xee, 0x8c, 0xa7, 0xe6, 0xb5, 0xa9, 0xe7, 0x55, 0x34, 0x68, 0xd0, 0x62, 0x37, - 0xd3, 0x49, 0x62, 0xeb, 0xdb, 0x4d, 0x12, 0x77, 0xbe, 0xdb, 0x49, 0xe2, 0xdd, 0x37, 0x94, 0x24, - 0x9e, 0xf1, 0xea, 0x77, 0xbe, 0xe1, 0xd5, 0x5f, 0xc8, 0x2d, 0x7f, 0xa7, 0xff, 0x86, 0xdc, 0x9b, - 0x44, 0x19, 0x1d, 0x07, 0x8c, 0x33, 0xe3, 0x40, 0x31, 0xf6, 0x2d, 0xbc, 0x32, 0xf6, 0xdd, 0x44, - 0x2b, 0x2a, 0xad, 0x1b, 0x7a, 0x7e, 0x17, 0xfe, 0x71, 0x5a, 0xc9, 0x26, 0x95, 0xc3, 0x56, 0xfd, - 0xdf, 0xff, 0xac, 0x19, 0x5f, 0x9c, 0xd4, 0x8c, 0xbf, 0x9d, 0xd4, 0x8c, 0x2f, 0x4f, 0x6a, 0xc6, - 0x57, 0x27, 0x35, 0xe3, 0x1f, 0x27, 0x35, 0xe3, 0x4f, 0xff, 0xaa, 0x5d, 0xf8, 0xd5, 0xc2, 0xa8, - 0xdd, 0x29, 0xc1, 0x3f, 0xa6, 0xf7, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x42, 0x79, 0x0e, 0x39, - 0x62, 0x17, 0x00, 0x00, -} - -func (this *CheckRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CheckRequest) - if !ok { - that2, ok := that.(CheckRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Config.Equal(that1.Config) { - return false - } - if len(this.Assets) != len(that1.Assets) { - return false - } - for i := range this.Assets { - if !this.Assets[i].Equal(&that1.Assets[i]) { - return false - } - } - if len(this.Hooks) != len(that1.Hooks) { - return false - } - for i := range this.Hooks { - if !this.Hooks[i].Equal(&that1.Hooks[i]) { - return false - } - } - if this.Issued != that1.Issued { - return false - } - if len(this.HookAssets) != len(that1.HookAssets) { - return false - } - for i := range this.HookAssets { - if !this.HookAssets[i].Equal(that1.HookAssets[i]) { - return false - } - } - if len(this.Secrets) != len(that1.Secrets) { - return false - } - for i := range this.Secrets { - if this.Secrets[i] != that1.Secrets[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *AssetList) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AssetList) - if !ok { - that2, ok := that.(AssetList) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Assets) != len(that1.Assets) { - return false - } - for i := range this.Assets { - if !this.Assets[i].Equal(&that1.Assets[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ProxyRequests) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ProxyRequests) - if !ok { - that2, ok := that.(ProxyRequests) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.EntityAttributes) != len(that1.EntityAttributes) { - return false - } - for i := range this.EntityAttributes { - if this.EntityAttributes[i] != that1.EntityAttributes[i] { - return false - } - } - if this.Splay != that1.Splay { - return false - } - if this.SplayCoverage != that1.SplayCoverage { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CheckConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CheckConfig) - if !ok { - that2, ok := that.(CheckConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Command != that1.Command { - return false - } - if len(this.Handlers) != len(that1.Handlers) { - return false - } - for i := range this.Handlers { - if this.Handlers[i] != that1.Handlers[i] { - return false - } - } - if this.HighFlapThreshold != that1.HighFlapThreshold { - return false - } - if this.Interval != that1.Interval { - return false - } - if this.LowFlapThreshold != that1.LowFlapThreshold { - return false - } - if this.Publish != that1.Publish { - return false - } - if len(this.RuntimeAssets) != len(that1.RuntimeAssets) { - return false - } - for i := range this.RuntimeAssets { - if this.RuntimeAssets[i] != that1.RuntimeAssets[i] { - return false - } - } - if len(this.Subscriptions) != len(that1.Subscriptions) { - return false - } - for i := range this.Subscriptions { - if this.Subscriptions[i] != that1.Subscriptions[i] { - return false - } - } - if !bytes.Equal(this.ExtendedAttributes, that1.ExtendedAttributes) { - return false - } - if this.ProxyEntityName != that1.ProxyEntityName { - return false - } - if len(this.CheckHooks) != len(that1.CheckHooks) { - return false - } - for i := range this.CheckHooks { - if !this.CheckHooks[i].Equal(&that1.CheckHooks[i]) { - return false - } - } - if this.Stdin != that1.Stdin { - return false - } - if !this.Subdue.Equal(that1.Subdue) { - return false - } - if this.Cron != that1.Cron { - return false - } - if this.Ttl != that1.Ttl { - return false - } - if this.Timeout != that1.Timeout { - return false - } - if !this.ProxyRequests.Equal(that1.ProxyRequests) { - return false - } - if this.RoundRobin != that1.RoundRobin { - return false - } - if this.OutputMetricFormat != that1.OutputMetricFormat { - return false - } - if len(this.OutputMetricHandlers) != len(that1.OutputMetricHandlers) { - return false - } - for i := range this.OutputMetricHandlers { - if this.OutputMetricHandlers[i] != that1.OutputMetricHandlers[i] { - return false - } - } - if len(this.EnvVars) != len(that1.EnvVars) { - return false - } - for i := range this.EnvVars { - if this.EnvVars[i] != that1.EnvVars[i] { - return false - } - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.MaxOutputSize != that1.MaxOutputSize { - return false - } - if this.DiscardOutput != that1.DiscardOutput { - return false - } - if len(this.Secrets) != len(that1.Secrets) { - return false - } - for i := range this.Secrets { - if !this.Secrets[i].Equal(that1.Secrets[i]) { - return false - } - } - if len(this.OutputMetricTags) != len(that1.OutputMetricTags) { - return false - } - for i := range this.OutputMetricTags { - if !this.OutputMetricTags[i].Equal(that1.OutputMetricTags[i]) { - return false - } - } - if this.Scheduler != that1.Scheduler { - return false - } - if len(this.Pipelines) != len(that1.Pipelines) { - return false - } - for i := range this.Pipelines { - if !this.Pipelines[i].Equal(that1.Pipelines[i]) { - return false - } - } - if len(this.OutputMetricThresholds) != len(that1.OutputMetricThresholds) { - return false - } - for i := range this.OutputMetricThresholds { - if !this.OutputMetricThresholds[i].Equal(that1.OutputMetricThresholds[i]) { - return false - } - } - if len(this.Subdues) != len(that1.Subdues) { - return false - } - for i := range this.Subdues { - if !this.Subdues[i].Equal(that1.Subdues[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Check) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Check) - if !ok { - that2, ok := that.(Check) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Command != that1.Command { - return false - } - if len(this.Handlers) != len(that1.Handlers) { - return false - } - for i := range this.Handlers { - if this.Handlers[i] != that1.Handlers[i] { - return false - } - } - if this.HighFlapThreshold != that1.HighFlapThreshold { - return false - } - if this.Interval != that1.Interval { - return false - } - if this.LowFlapThreshold != that1.LowFlapThreshold { - return false - } - if this.Publish != that1.Publish { - return false - } - if len(this.RuntimeAssets) != len(that1.RuntimeAssets) { - return false - } - for i := range this.RuntimeAssets { - if this.RuntimeAssets[i] != that1.RuntimeAssets[i] { - return false - } - } - if len(this.Subscriptions) != len(that1.Subscriptions) { - return false - } - for i := range this.Subscriptions { - if this.Subscriptions[i] != that1.Subscriptions[i] { - return false - } - } - if this.ProxyEntityName != that1.ProxyEntityName { - return false - } - if len(this.CheckHooks) != len(that1.CheckHooks) { - return false - } - for i := range this.CheckHooks { - if !this.CheckHooks[i].Equal(&that1.CheckHooks[i]) { - return false - } - } - if this.Stdin != that1.Stdin { - return false - } - if !this.Subdue.Equal(that1.Subdue) { - return false - } - if this.Cron != that1.Cron { - return false - } - if this.Ttl != that1.Ttl { - return false - } - if this.Timeout != that1.Timeout { - return false - } - if !this.ProxyRequests.Equal(that1.ProxyRequests) { - return false - } - if this.RoundRobin != that1.RoundRobin { - return false - } - if this.Duration != that1.Duration { - return false - } - if this.Executed != that1.Executed { - return false - } - if len(this.History) != len(that1.History) { - return false - } - for i := range this.History { - if !this.History[i].Equal(&that1.History[i]) { - return false - } - } - if this.Issued != that1.Issued { - return false - } - if this.Output != that1.Output { - return false - } - if this.State != that1.State { - return false - } - if this.Status != that1.Status { - return false - } - if this.TotalStateChange != that1.TotalStateChange { - return false - } - if this.LastOK != that1.LastOK { - return false - } - if this.Occurrences != that1.Occurrences { - return false - } - if this.OccurrencesWatermark != that1.OccurrencesWatermark { - return false - } - if len(this.Silenced) != len(that1.Silenced) { - return false - } - for i := range this.Silenced { - if this.Silenced[i] != that1.Silenced[i] { - return false - } - } - if len(this.Hooks) != len(that1.Hooks) { - return false - } - for i := range this.Hooks { - if !this.Hooks[i].Equal(that1.Hooks[i]) { - return false - } - } - if this.OutputMetricFormat != that1.OutputMetricFormat { - return false - } - if len(this.OutputMetricHandlers) != len(that1.OutputMetricHandlers) { - return false - } - for i := range this.OutputMetricHandlers { - if this.OutputMetricHandlers[i] != that1.OutputMetricHandlers[i] { - return false - } - } - if len(this.EnvVars) != len(that1.EnvVars) { - return false - } - for i := range this.EnvVars { - if this.EnvVars[i] != that1.EnvVars[i] { - return false - } - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.MaxOutputSize != that1.MaxOutputSize { - return false - } - if this.DiscardOutput != that1.DiscardOutput { - return false - } - if len(this.Secrets) != len(that1.Secrets) { - return false - } - for i := range this.Secrets { - if !this.Secrets[i].Equal(that1.Secrets[i]) { - return false - } - } - if this.IsSilenced != that1.IsSilenced { - return false - } - if len(this.OutputMetricTags) != len(that1.OutputMetricTags) { - return false - } - for i := range this.OutputMetricTags { - if !this.OutputMetricTags[i].Equal(that1.OutputMetricTags[i]) { - return false - } - } - if this.Scheduler != that1.Scheduler { - return false - } - if this.ProcessedBy != that1.ProcessedBy { - return false - } - if len(this.Pipelines) != len(that1.Pipelines) { - return false - } - for i := range this.Pipelines { - if !this.Pipelines[i].Equal(that1.Pipelines[i]) { - return false - } - } - if len(this.OutputMetricThresholds) != len(that1.OutputMetricThresholds) { - return false - } - for i := range this.OutputMetricThresholds { - if !this.OutputMetricThresholds[i].Equal(that1.OutputMetricThresholds[i]) { - return false - } - } - if len(this.Subdues) != len(that1.Subdues) { - return false - } - for i := range this.Subdues { - if !this.Subdues[i].Equal(that1.Subdues[i]) { - return false - } - } - if !bytes.Equal(this.ExtendedAttributes, that1.ExtendedAttributes) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *CheckHistory) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CheckHistory) - if !ok { - that2, ok := that.(CheckHistory) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Status != that1.Status { - return false - } - if this.Executed != that1.Executed { - return false - } - if this.Flapping != that1.Flapping { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type CheckConfigFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetCommand() string - GetHandlers() []string - GetHighFlapThreshold() uint32 - GetInterval() uint32 - GetLowFlapThreshold() uint32 - GetPublish() bool - GetRuntimeAssets() []string - GetSubscriptions() []string - GetExtendedAttributes() []byte - GetProxyEntityName() string - GetCheckHooks() []HookList - GetStdin() bool - GetSubdue() *TimeWindowWhen - GetCron() string - GetTtl() int64 - GetTimeout() uint32 - GetProxyRequests() *ProxyRequests - GetRoundRobin() bool - GetOutputMetricFormat() string - GetOutputMetricHandlers() []string - GetEnvVars() []string - GetObjectMeta() ObjectMeta - GetMaxOutputSize() int64 - GetDiscardOutput() bool - GetSecrets() []*Secret - GetOutputMetricTags() []*MetricTag - GetScheduler() string - GetPipelines() []*ResourceReference - GetOutputMetricThresholds() []*MetricThreshold - GetSubdues() []*TimeWindowRepeated -} - -func (this *CheckConfig) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *CheckConfig) TestProto() github_com_golang_protobuf_proto.Message { - return NewCheckConfigFromFace(this) -} - -func (this *CheckConfig) GetCommand() string { - return this.Command -} - -func (this *CheckConfig) GetHandlers() []string { - return this.Handlers -} - -func (this *CheckConfig) GetHighFlapThreshold() uint32 { - return this.HighFlapThreshold -} - -func (this *CheckConfig) GetInterval() uint32 { - return this.Interval -} - -func (this *CheckConfig) GetLowFlapThreshold() uint32 { - return this.LowFlapThreshold -} - -func (this *CheckConfig) GetPublish() bool { - return this.Publish -} - -func (this *CheckConfig) GetRuntimeAssets() []string { - return this.RuntimeAssets -} - -func (this *CheckConfig) GetSubscriptions() []string { - return this.Subscriptions -} - -func (this *CheckConfig) GetExtendedAttributes() []byte { - return this.ExtendedAttributes -} - -func (this *CheckConfig) GetProxyEntityName() string { - return this.ProxyEntityName -} - -func (this *CheckConfig) GetCheckHooks() []HookList { - return this.CheckHooks -} - -func (this *CheckConfig) GetStdin() bool { - return this.Stdin -} - -func (this *CheckConfig) GetSubdue() *TimeWindowWhen { - return this.Subdue -} - -func (this *CheckConfig) GetCron() string { - return this.Cron -} - -func (this *CheckConfig) GetTtl() int64 { - return this.Ttl -} - -func (this *CheckConfig) GetTimeout() uint32 { - return this.Timeout -} - -func (this *CheckConfig) GetProxyRequests() *ProxyRequests { - return this.ProxyRequests -} - -func (this *CheckConfig) GetRoundRobin() bool { - return this.RoundRobin -} - -func (this *CheckConfig) GetOutputMetricFormat() string { - return this.OutputMetricFormat -} - -func (this *CheckConfig) GetOutputMetricHandlers() []string { - return this.OutputMetricHandlers -} - -func (this *CheckConfig) GetEnvVars() []string { - return this.EnvVars -} - -func (this *CheckConfig) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *CheckConfig) GetMaxOutputSize() int64 { - return this.MaxOutputSize -} - -func (this *CheckConfig) GetDiscardOutput() bool { - return this.DiscardOutput -} - -func (this *CheckConfig) GetSecrets() []*Secret { - return this.Secrets -} - -func (this *CheckConfig) GetOutputMetricTags() []*MetricTag { - return this.OutputMetricTags -} - -func (this *CheckConfig) GetScheduler() string { - return this.Scheduler -} - -func (this *CheckConfig) GetPipelines() []*ResourceReference { - return this.Pipelines -} - -func (this *CheckConfig) GetOutputMetricThresholds() []*MetricThreshold { - return this.OutputMetricThresholds -} - -func (this *CheckConfig) GetSubdues() []*TimeWindowRepeated { - return this.Subdues -} - -func NewCheckConfigFromFace(that CheckConfigFace) *CheckConfig { - this := &CheckConfig{} - this.Command = that.GetCommand() - this.Handlers = that.GetHandlers() - this.HighFlapThreshold = that.GetHighFlapThreshold() - this.Interval = that.GetInterval() - this.LowFlapThreshold = that.GetLowFlapThreshold() - this.Publish = that.GetPublish() - this.RuntimeAssets = that.GetRuntimeAssets() - this.Subscriptions = that.GetSubscriptions() - this.ExtendedAttributes = that.GetExtendedAttributes() - this.ProxyEntityName = that.GetProxyEntityName() - this.CheckHooks = that.GetCheckHooks() - this.Stdin = that.GetStdin() - this.Subdue = that.GetSubdue() - this.Cron = that.GetCron() - this.Ttl = that.GetTtl() - this.Timeout = that.GetTimeout() - this.ProxyRequests = that.GetProxyRequests() - this.RoundRobin = that.GetRoundRobin() - this.OutputMetricFormat = that.GetOutputMetricFormat() - this.OutputMetricHandlers = that.GetOutputMetricHandlers() - this.EnvVars = that.GetEnvVars() - this.ObjectMeta = that.GetObjectMeta() - this.MaxOutputSize = that.GetMaxOutputSize() - this.DiscardOutput = that.GetDiscardOutput() - this.Secrets = that.GetSecrets() - this.OutputMetricTags = that.GetOutputMetricTags() - this.Scheduler = that.GetScheduler() - this.Pipelines = that.GetPipelines() - this.OutputMetricThresholds = that.GetOutputMetricThresholds() - this.Subdues = that.GetSubdues() - return this -} - -type CheckFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetCommand() string - GetHandlers() []string - GetHighFlapThreshold() uint32 - GetInterval() uint32 - GetLowFlapThreshold() uint32 - GetPublish() bool - GetRuntimeAssets() []string - GetSubscriptions() []string - GetProxyEntityName() string - GetCheckHooks() []HookList - GetStdin() bool - GetSubdue() *TimeWindowWhen - GetCron() string - GetTtl() int64 - GetTimeout() uint32 - GetProxyRequests() *ProxyRequests - GetRoundRobin() bool - GetDuration() float64 - GetExecuted() int64 - GetHistory() []CheckHistory - GetIssued() int64 - GetOutput() string - GetState() string - GetStatus() uint32 - GetTotalStateChange() uint32 - GetLastOK() int64 - GetOccurrences() int64 - GetOccurrencesWatermark() int64 - GetSilenced() []string - GetHooks() []*Hook - GetOutputMetricFormat() string - GetOutputMetricHandlers() []string - GetEnvVars() []string - GetObjectMeta() ObjectMeta - GetMaxOutputSize() int64 - GetDiscardOutput() bool - GetSecrets() []*Secret - GetIsSilenced() bool - GetOutputMetricTags() []*MetricTag - GetScheduler() string - GetProcessedBy() string - GetPipelines() []*ResourceReference - GetOutputMetricThresholds() []*MetricThreshold - GetSubdues() []*TimeWindowRepeated - GetExtendedAttributes() []byte -} - -func (this *Check) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *Check) TestProto() github_com_golang_protobuf_proto.Message { - return NewCheckFromFace(this) -} - -func (this *Check) GetCommand() string { - return this.Command -} - -func (this *Check) GetHandlers() []string { - return this.Handlers -} - -func (this *Check) GetHighFlapThreshold() uint32 { - return this.HighFlapThreshold -} - -func (this *Check) GetInterval() uint32 { - return this.Interval -} - -func (this *Check) GetLowFlapThreshold() uint32 { - return this.LowFlapThreshold -} - -func (this *Check) GetPublish() bool { - return this.Publish -} - -func (this *Check) GetRuntimeAssets() []string { - return this.RuntimeAssets -} - -func (this *Check) GetSubscriptions() []string { - return this.Subscriptions -} - -func (this *Check) GetProxyEntityName() string { - return this.ProxyEntityName -} - -func (this *Check) GetCheckHooks() []HookList { - return this.CheckHooks -} - -func (this *Check) GetStdin() bool { - return this.Stdin -} - -func (this *Check) GetSubdue() *TimeWindowWhen { - return this.Subdue -} - -func (this *Check) GetCron() string { - return this.Cron -} - -func (this *Check) GetTtl() int64 { - return this.Ttl -} - -func (this *Check) GetTimeout() uint32 { - return this.Timeout -} - -func (this *Check) GetProxyRequests() *ProxyRequests { - return this.ProxyRequests -} - -func (this *Check) GetRoundRobin() bool { - return this.RoundRobin -} - -func (this *Check) GetDuration() float64 { - return this.Duration -} - -func (this *Check) GetExecuted() int64 { - return this.Executed -} - -func (this *Check) GetHistory() []CheckHistory { - return this.History -} - -func (this *Check) GetIssued() int64 { - return this.Issued -} - -func (this *Check) GetOutput() string { - return this.Output -} - -func (this *Check) GetState() string { - return this.State -} - -func (this *Check) GetStatus() uint32 { - return this.Status -} - -func (this *Check) GetTotalStateChange() uint32 { - return this.TotalStateChange -} - -func (this *Check) GetLastOK() int64 { - return this.LastOK -} - -func (this *Check) GetOccurrences() int64 { - return this.Occurrences -} - -func (this *Check) GetOccurrencesWatermark() int64 { - return this.OccurrencesWatermark -} - -func (this *Check) GetSilenced() []string { - return this.Silenced -} - -func (this *Check) GetHooks() []*Hook { - return this.Hooks -} - -func (this *Check) GetOutputMetricFormat() string { - return this.OutputMetricFormat -} - -func (this *Check) GetOutputMetricHandlers() []string { - return this.OutputMetricHandlers -} - -func (this *Check) GetEnvVars() []string { - return this.EnvVars -} - -func (this *Check) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *Check) GetMaxOutputSize() int64 { - return this.MaxOutputSize -} - -func (this *Check) GetDiscardOutput() bool { - return this.DiscardOutput -} - -func (this *Check) GetSecrets() []*Secret { - return this.Secrets -} - -func (this *Check) GetIsSilenced() bool { - return this.IsSilenced -} - -func (this *Check) GetOutputMetricTags() []*MetricTag { - return this.OutputMetricTags -} - -func (this *Check) GetScheduler() string { - return this.Scheduler -} - -func (this *Check) GetProcessedBy() string { - return this.ProcessedBy -} - -func (this *Check) GetPipelines() []*ResourceReference { - return this.Pipelines -} - -func (this *Check) GetOutputMetricThresholds() []*MetricThreshold { - return this.OutputMetricThresholds -} - -func (this *Check) GetSubdues() []*TimeWindowRepeated { - return this.Subdues -} - -func (this *Check) GetExtendedAttributes() []byte { - return this.ExtendedAttributes -} - -func NewCheckFromFace(that CheckFace) *Check { - this := &Check{} - this.Command = that.GetCommand() - this.Handlers = that.GetHandlers() - this.HighFlapThreshold = that.GetHighFlapThreshold() - this.Interval = that.GetInterval() - this.LowFlapThreshold = that.GetLowFlapThreshold() - this.Publish = that.GetPublish() - this.RuntimeAssets = that.GetRuntimeAssets() - this.Subscriptions = that.GetSubscriptions() - this.ProxyEntityName = that.GetProxyEntityName() - this.CheckHooks = that.GetCheckHooks() - this.Stdin = that.GetStdin() - this.Subdue = that.GetSubdue() - this.Cron = that.GetCron() - this.Ttl = that.GetTtl() - this.Timeout = that.GetTimeout() - this.ProxyRequests = that.GetProxyRequests() - this.RoundRobin = that.GetRoundRobin() - this.Duration = that.GetDuration() - this.Executed = that.GetExecuted() - this.History = that.GetHistory() - this.Issued = that.GetIssued() - this.Output = that.GetOutput() - this.State = that.GetState() - this.Status = that.GetStatus() - this.TotalStateChange = that.GetTotalStateChange() - this.LastOK = that.GetLastOK() - this.Occurrences = that.GetOccurrences() - this.OccurrencesWatermark = that.GetOccurrencesWatermark() - this.Silenced = that.GetSilenced() - this.Hooks = that.GetHooks() - this.OutputMetricFormat = that.GetOutputMetricFormat() - this.OutputMetricHandlers = that.GetOutputMetricHandlers() - this.EnvVars = that.GetEnvVars() - this.ObjectMeta = that.GetObjectMeta() - this.MaxOutputSize = that.GetMaxOutputSize() - this.DiscardOutput = that.GetDiscardOutput() - this.Secrets = that.GetSecrets() - this.IsSilenced = that.GetIsSilenced() - this.OutputMetricTags = that.GetOutputMetricTags() - this.Scheduler = that.GetScheduler() - this.ProcessedBy = that.GetProcessedBy() - this.Pipelines = that.GetPipelines() - this.OutputMetricThresholds = that.GetOutputMetricThresholds() - this.Subdues = that.GetSubdues() - this.ExtendedAttributes = that.GetExtendedAttributes() - return this -} - -func (m *CheckRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CheckRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Secrets) > 0 { - for iNdEx := len(m.Secrets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Secrets[iNdEx]) - copy(dAtA[i:], m.Secrets[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Secrets[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.HookAssets) > 0 { - for k := range m.HookAssets { - v := m.HookAssets[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintCheck(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintCheck(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if m.Issued != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Issued)) - i-- - dAtA[i] = 0x20 - } - if len(m.Hooks) > 0 { - for iNdEx := len(m.Hooks) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Hooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Assets) > 0 { - for iNdEx := len(m.Assets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Assets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Config != nil { - { - size, err := m.Config.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AssetList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AssetList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Assets) > 0 { - for iNdEx := len(m.Assets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Assets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ProxyRequests) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProxyRequests) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProxyRequests) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.SplayCoverage != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.SplayCoverage)) - i-- - dAtA[i] = 0x18 - } - if m.Splay { - i-- - if m.Splay { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.EntityAttributes) > 0 { - for iNdEx := len(m.EntityAttributes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.EntityAttributes[iNdEx]) - copy(dAtA[i:], m.EntityAttributes[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.EntityAttributes[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *CheckConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CheckConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Subdues) > 0 { - for iNdEx := len(m.Subdues) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subdues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x92 - } - } - if len(m.OutputMetricThresholds) > 0 { - for iNdEx := len(m.OutputMetricThresholds) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OutputMetricThresholds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x8a - } - } - if len(m.Pipelines) > 0 { - for iNdEx := len(m.Pipelines) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Pipelines[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x82 - } - } - if len(m.Scheduler) > 0 { - i -= len(m.Scheduler) - copy(dAtA[i:], m.Scheduler) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Scheduler))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - if len(m.OutputMetricTags) > 0 { - for iNdEx := len(m.OutputMetricTags) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OutputMetricTags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - } - if len(m.Secrets) > 0 { - for iNdEx := len(m.Secrets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Secrets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xea - } - } - if m.DiscardOutput { - i-- - if m.DiscardOutput { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe0 - } - if m.MaxOutputSize != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.MaxOutputSize)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd8 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd2 - if len(m.EnvVars) > 0 { - for iNdEx := len(m.EnvVars) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.EnvVars[iNdEx]) - copy(dAtA[i:], m.EnvVars[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.EnvVars[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - } - if len(m.OutputMetricHandlers) > 0 { - for iNdEx := len(m.OutputMetricHandlers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.OutputMetricHandlers[iNdEx]) - copy(dAtA[i:], m.OutputMetricHandlers[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.OutputMetricHandlers[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - } - } - if len(m.OutputMetricFormat) > 0 { - i -= len(m.OutputMetricFormat) - copy(dAtA[i:], m.OutputMetricFormat) - i = encodeVarintCheck(dAtA, i, uint64(len(m.OutputMetricFormat))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - if m.RoundRobin { - i-- - if m.RoundRobin { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa8 - } - if m.ProxyRequests != nil { - { - size, err := m.ProxyRequests.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if m.Timeout != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Timeout)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if m.Ttl != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Ttl)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if len(m.Cron) > 0 { - i -= len(m.Cron) - copy(dAtA[i:], m.Cron) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Cron))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if m.Subdue != nil { - { - size, err := m.Subdue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if m.Stdin { - i-- - if m.Stdin { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x78 - } - if len(m.CheckHooks) > 0 { - for iNdEx := len(m.CheckHooks) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CheckHooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - } - if len(m.ProxyEntityName) > 0 { - i -= len(m.ProxyEntityName) - copy(dAtA[i:], m.ProxyEntityName) - i = encodeVarintCheck(dAtA, i, uint64(len(m.ProxyEntityName))) - i-- - dAtA[i] = 0x6a - } - if len(m.ExtendedAttributes) > 0 { - i -= len(m.ExtendedAttributes) - copy(dAtA[i:], m.ExtendedAttributes) - i = encodeVarintCheck(dAtA, i, uint64(len(m.ExtendedAttributes))) - i-- - dAtA[i] = 0x62 - } - if len(m.Subscriptions) > 0 { - for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Subscriptions[iNdEx]) - copy(dAtA[i:], m.Subscriptions[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Subscriptions[iNdEx]))) - i-- - dAtA[i] = 0x5a - } - } - if len(m.RuntimeAssets) > 0 { - for iNdEx := len(m.RuntimeAssets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RuntimeAssets[iNdEx]) - copy(dAtA[i:], m.RuntimeAssets[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.RuntimeAssets[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if m.Publish { - i-- - if m.Publish { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.LowFlapThreshold != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.LowFlapThreshold)) - i-- - dAtA[i] = 0x30 - } - if m.Interval != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Interval)) - i-- - dAtA[i] = 0x28 - } - if m.HighFlapThreshold != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.HighFlapThreshold)) - i-- - dAtA[i] = 0x20 - } - if len(m.Handlers) > 0 { - for iNdEx := len(m.Handlers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Handlers[iNdEx]) - copy(dAtA[i:], m.Handlers[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Handlers[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Command) > 0 { - i -= len(m.Command) - copy(dAtA[i:], m.Command) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Command))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Check) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Check) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Check) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ExtendedAttributes) > 0 { - i -= len(m.ExtendedAttributes) - copy(dAtA[i:], m.ExtendedAttributes) - i = encodeVarintCheck(dAtA, i, uint64(len(m.ExtendedAttributes))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0x9a - } - if len(m.Subdues) > 0 { - for iNdEx := len(m.Subdues) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subdues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x82 - } - } - if len(m.OutputMetricThresholds) > 0 { - for iNdEx := len(m.OutputMetricThresholds) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OutputMetricThresholds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xfa - } - } - if len(m.Pipelines) > 0 { - for iNdEx := len(m.Pipelines) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Pipelines[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xf2 - } - } - if len(m.ProcessedBy) > 0 { - i -= len(m.ProcessedBy) - copy(dAtA[i:], m.ProcessedBy) - i = encodeVarintCheck(dAtA, i, uint64(len(m.ProcessedBy))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xea - } - if len(m.Scheduler) > 0 { - i -= len(m.Scheduler) - copy(dAtA[i:], m.Scheduler) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Scheduler))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xe2 - } - if len(m.OutputMetricTags) > 0 { - for iNdEx := len(m.OutputMetricTags) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OutputMetricTags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xda - } - } - if m.IsSilenced { - i-- - if m.IsSilenced { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xd0 - } - if len(m.Secrets) > 0 { - for iNdEx := len(m.Secrets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Secrets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xca - } - } - if m.DiscardOutput { - i-- - if m.DiscardOutput { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc0 - } - if m.MaxOutputSize != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.MaxOutputSize)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xb8 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xb2 - if len(m.EnvVars) > 0 { - for iNdEx := len(m.EnvVars) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.EnvVars[iNdEx]) - copy(dAtA[i:], m.EnvVars[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.EnvVars[iNdEx]))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xaa - } - } - if len(m.OutputMetricHandlers) > 0 { - for iNdEx := len(m.OutputMetricHandlers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.OutputMetricHandlers[iNdEx]) - copy(dAtA[i:], m.OutputMetricHandlers[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.OutputMetricHandlers[iNdEx]))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xa2 - } - } - if len(m.OutputMetricFormat) > 0 { - i -= len(m.OutputMetricFormat) - copy(dAtA[i:], m.OutputMetricFormat) - i = encodeVarintCheck(dAtA, i, uint64(len(m.OutputMetricFormat))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x9a - } - if len(m.Hooks) > 0 { - for iNdEx := len(m.Hooks) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Hooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x92 - } - } - if len(m.Silenced) > 0 { - for iNdEx := len(m.Silenced) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Silenced[iNdEx]) - copy(dAtA[i:], m.Silenced[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Silenced[iNdEx]))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x8a - } - } - if m.OccurrencesWatermark != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.OccurrencesWatermark)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x80 - } - if m.Occurrences != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Occurrences)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf8 - } - if m.LastOK != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.LastOK)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf0 - } - if m.TotalStateChange != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.TotalStateChange)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe8 - } - if m.Status != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe0 - } - if len(m.State) > 0 { - i -= len(m.State) - copy(dAtA[i:], m.State) - i = encodeVarintCheck(dAtA, i, uint64(len(m.State))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xda - } - if len(m.Output) > 0 { - i -= len(m.Output) - copy(dAtA[i:], m.Output) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Output))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd2 - } - if m.Issued != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Issued)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc8 - } - if len(m.History) > 0 { - for iNdEx := len(m.History) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.History[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - } - if m.Executed != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Executed)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 - } - if m.Duration != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Duration)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb1 - } - if m.RoundRobin { - i-- - if m.RoundRobin { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa8 - } - if m.ProxyRequests != nil { - { - size, err := m.ProxyRequests.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if m.Timeout != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Timeout)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if m.Ttl != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Ttl)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if len(m.Cron) > 0 { - i -= len(m.Cron) - copy(dAtA[i:], m.Cron) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Cron))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if m.Subdue != nil { - { - size, err := m.Subdue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if m.Stdin { - i-- - if m.Stdin { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x78 - } - if len(m.CheckHooks) > 0 { - for iNdEx := len(m.CheckHooks) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CheckHooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCheck(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - } - if len(m.ProxyEntityName) > 0 { - i -= len(m.ProxyEntityName) - copy(dAtA[i:], m.ProxyEntityName) - i = encodeVarintCheck(dAtA, i, uint64(len(m.ProxyEntityName))) - i-- - dAtA[i] = 0x6a - } - if len(m.Subscriptions) > 0 { - for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Subscriptions[iNdEx]) - copy(dAtA[i:], m.Subscriptions[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Subscriptions[iNdEx]))) - i-- - dAtA[i] = 0x5a - } - } - if len(m.RuntimeAssets) > 0 { - for iNdEx := len(m.RuntimeAssets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RuntimeAssets[iNdEx]) - copy(dAtA[i:], m.RuntimeAssets[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.RuntimeAssets[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if m.Publish { - i-- - if m.Publish { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.LowFlapThreshold != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.LowFlapThreshold)) - i-- - dAtA[i] = 0x30 - } - if m.Interval != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Interval)) - i-- - dAtA[i] = 0x28 - } - if m.HighFlapThreshold != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.HighFlapThreshold)) - i-- - dAtA[i] = 0x20 - } - if len(m.Handlers) > 0 { - for iNdEx := len(m.Handlers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Handlers[iNdEx]) - copy(dAtA[i:], m.Handlers[iNdEx]) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Handlers[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Command) > 0 { - i -= len(m.Command) - copy(dAtA[i:], m.Command) - i = encodeVarintCheck(dAtA, i, uint64(len(m.Command))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CheckHistory) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CheckHistory) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CheckHistory) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Flapping { - i-- - if m.Flapping { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.Executed != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Executed)) - i-- - dAtA[i] = 0x10 - } - if m.Status != 0 { - i = encodeVarintCheck(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintCheck(dAtA []byte, offset int, v uint64) int { - offset -= sovCheck(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedCheckRequest(r randyCheck, easy bool) *CheckRequest { - this := &CheckRequest{} - if r.Intn(5) != 0 { - this.Config = NewPopulatedCheckConfig(r, easy) - } - if r.Intn(5) != 0 { - v1 := r.Intn(5) - this.Assets = make([]Asset, v1) - for i := 0; i < v1; i++ { - v2 := NewPopulatedAsset(r, easy) - this.Assets[i] = *v2 - } - } - if r.Intn(5) != 0 { - v3 := r.Intn(5) - this.Hooks = make([]HookConfig, v3) - for i := 0; i < v3; i++ { - v4 := NewPopulatedHookConfig(r, easy) - this.Hooks[i] = *v4 - } - } - this.Issued = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Issued *= -1 - } - if r.Intn(5) != 0 { - v5 := r.Intn(10) - this.HookAssets = make(map[string]*AssetList) - for i := 0; i < v5; i++ { - this.HookAssets[randStringCheck(r)] = NewPopulatedAssetList(r, easy) - } - } - v6 := r.Intn(10) - this.Secrets = make([]string, v6) - for i := 0; i < v6; i++ { - this.Secrets[i] = string(randStringCheck(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCheck(r, 7) - } - return this -} - -func NewPopulatedAssetList(r randyCheck, easy bool) *AssetList { - this := &AssetList{} - if r.Intn(5) != 0 { - v7 := r.Intn(5) - this.Assets = make([]Asset, v7) - for i := 0; i < v7; i++ { - v8 := NewPopulatedAsset(r, easy) - this.Assets[i] = *v8 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCheck(r, 2) - } - return this -} - -func NewPopulatedProxyRequests(r randyCheck, easy bool) *ProxyRequests { - this := &ProxyRequests{} - v9 := r.Intn(10) - this.EntityAttributes = make([]string, v9) - for i := 0; i < v9; i++ { - this.EntityAttributes[i] = string(randStringCheck(r)) - } - this.Splay = bool(bool(r.Intn(2) == 0)) - this.SplayCoverage = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCheck(r, 4) - } - return this -} - -func NewPopulatedCheckConfig(r randyCheck, easy bool) *CheckConfig { - this := &CheckConfig{} - this.Command = string(randStringCheck(r)) - v10 := r.Intn(10) - this.Handlers = make([]string, v10) - for i := 0; i < v10; i++ { - this.Handlers[i] = string(randStringCheck(r)) - } - this.HighFlapThreshold = uint32(r.Uint32()) - this.Interval = uint32(r.Uint32()) - this.LowFlapThreshold = uint32(r.Uint32()) - this.Publish = bool(bool(r.Intn(2) == 0)) - v11 := r.Intn(10) - this.RuntimeAssets = make([]string, v11) - for i := 0; i < v11; i++ { - this.RuntimeAssets[i] = string(randStringCheck(r)) - } - v12 := r.Intn(10) - this.Subscriptions = make([]string, v12) - for i := 0; i < v12; i++ { - this.Subscriptions[i] = string(randStringCheck(r)) - } - v13 := r.Intn(100) - this.ExtendedAttributes = make([]byte, v13) - for i := 0; i < v13; i++ { - this.ExtendedAttributes[i] = byte(r.Intn(256)) - } - this.ProxyEntityName = string(randStringCheck(r)) - if r.Intn(5) != 0 { - v14 := r.Intn(5) - this.CheckHooks = make([]HookList, v14) - for i := 0; i < v14; i++ { - v15 := NewPopulatedHookList(r, easy) - this.CheckHooks[i] = *v15 - } - } - this.Stdin = bool(bool(r.Intn(2) == 0)) - if r.Intn(5) != 0 { - this.Subdue = NewPopulatedTimeWindowWhen(r, easy) - } - this.Cron = string(randStringCheck(r)) - this.Ttl = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Ttl *= -1 - } - this.Timeout = uint32(r.Uint32()) - if r.Intn(5) != 0 { - this.ProxyRequests = NewPopulatedProxyRequests(r, easy) - } - this.RoundRobin = bool(bool(r.Intn(2) == 0)) - this.OutputMetricFormat = string(randStringCheck(r)) - v16 := r.Intn(10) - this.OutputMetricHandlers = make([]string, v16) - for i := 0; i < v16; i++ { - this.OutputMetricHandlers[i] = string(randStringCheck(r)) - } - v17 := r.Intn(10) - this.EnvVars = make([]string, v17) - for i := 0; i < v17; i++ { - this.EnvVars[i] = string(randStringCheck(r)) - } - v18 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v18 - this.MaxOutputSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MaxOutputSize *= -1 - } - this.DiscardOutput = bool(bool(r.Intn(2) == 0)) - if r.Intn(5) != 0 { - v19 := r.Intn(5) - this.Secrets = make([]*Secret, v19) - for i := 0; i < v19; i++ { - this.Secrets[i] = NewPopulatedSecret(r, easy) - } - } - if r.Intn(5) != 0 { - v20 := r.Intn(5) - this.OutputMetricTags = make([]*MetricTag, v20) - for i := 0; i < v20; i++ { - this.OutputMetricTags[i] = NewPopulatedMetricTag(r, easy) - } - } - this.Scheduler = string(randStringCheck(r)) - if r.Intn(5) != 0 { - v21 := r.Intn(5) - this.Pipelines = make([]*ResourceReference, v21) - for i := 0; i < v21; i++ { - this.Pipelines[i] = NewPopulatedResourceReference(r, easy) - } - } - if r.Intn(5) != 0 { - v22 := r.Intn(5) - this.OutputMetricThresholds = make([]*MetricThreshold, v22) - for i := 0; i < v22; i++ { - this.OutputMetricThresholds[i] = NewPopulatedMetricThreshold(r, easy) - } - } - if r.Intn(5) != 0 { - v23 := r.Intn(5) - this.Subdues = make([]*TimeWindowRepeated, v23) - for i := 0; i < v23; i++ { - this.Subdues[i] = NewPopulatedTimeWindowRepeated(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCheck(r, 35) - } - return this -} - -func NewPopulatedCheck(r randyCheck, easy bool) *Check { - this := &Check{} - this.Command = string(randStringCheck(r)) - v24 := r.Intn(10) - this.Handlers = make([]string, v24) - for i := 0; i < v24; i++ { - this.Handlers[i] = string(randStringCheck(r)) - } - this.HighFlapThreshold = uint32(r.Uint32()) - this.Interval = uint32(r.Uint32()) - this.LowFlapThreshold = uint32(r.Uint32()) - this.Publish = bool(bool(r.Intn(2) == 0)) - v25 := r.Intn(10) - this.RuntimeAssets = make([]string, v25) - for i := 0; i < v25; i++ { - this.RuntimeAssets[i] = string(randStringCheck(r)) - } - v26 := r.Intn(10) - this.Subscriptions = make([]string, v26) - for i := 0; i < v26; i++ { - this.Subscriptions[i] = string(randStringCheck(r)) - } - this.ProxyEntityName = string(randStringCheck(r)) - if r.Intn(5) != 0 { - v27 := r.Intn(5) - this.CheckHooks = make([]HookList, v27) - for i := 0; i < v27; i++ { - v28 := NewPopulatedHookList(r, easy) - this.CheckHooks[i] = *v28 - } - } - this.Stdin = bool(bool(r.Intn(2) == 0)) - if r.Intn(5) != 0 { - this.Subdue = NewPopulatedTimeWindowWhen(r, easy) - } - this.Cron = string(randStringCheck(r)) - this.Ttl = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Ttl *= -1 - } - this.Timeout = uint32(r.Uint32()) - if r.Intn(5) != 0 { - this.ProxyRequests = NewPopulatedProxyRequests(r, easy) - } - this.RoundRobin = bool(bool(r.Intn(2) == 0)) - this.Duration = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Duration *= -1 - } - this.Executed = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Executed *= -1 - } - if r.Intn(5) != 0 { - v29 := r.Intn(5) - this.History = make([]CheckHistory, v29) - for i := 0; i < v29; i++ { - v30 := NewPopulatedCheckHistory(r, easy) - this.History[i] = *v30 - } - } - this.Issued = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Issued *= -1 - } - this.Output = string(randStringCheck(r)) - this.State = string(randStringCheck(r)) - this.Status = uint32(r.Uint32()) - this.TotalStateChange = uint32(r.Uint32()) - this.LastOK = int64(r.Int63()) - if r.Intn(2) == 0 { - this.LastOK *= -1 - } - this.Occurrences = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Occurrences *= -1 - } - this.OccurrencesWatermark = int64(r.Int63()) - if r.Intn(2) == 0 { - this.OccurrencesWatermark *= -1 - } - v31 := r.Intn(10) - this.Silenced = make([]string, v31) - for i := 0; i < v31; i++ { - this.Silenced[i] = string(randStringCheck(r)) - } - if r.Intn(5) != 0 { - v32 := r.Intn(5) - this.Hooks = make([]*Hook, v32) - for i := 0; i < v32; i++ { - this.Hooks[i] = NewPopulatedHook(r, easy) - } - } - this.OutputMetricFormat = string(randStringCheck(r)) - v33 := r.Intn(10) - this.OutputMetricHandlers = make([]string, v33) - for i := 0; i < v33; i++ { - this.OutputMetricHandlers[i] = string(randStringCheck(r)) - } - v34 := r.Intn(10) - this.EnvVars = make([]string, v34) - for i := 0; i < v34; i++ { - this.EnvVars[i] = string(randStringCheck(r)) - } - v35 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v35 - this.MaxOutputSize = int64(r.Int63()) - if r.Intn(2) == 0 { - this.MaxOutputSize *= -1 - } - this.DiscardOutput = bool(bool(r.Intn(2) == 0)) - if r.Intn(5) != 0 { - v36 := r.Intn(5) - this.Secrets = make([]*Secret, v36) - for i := 0; i < v36; i++ { - this.Secrets[i] = NewPopulatedSecret(r, easy) - } - } - this.IsSilenced = bool(bool(r.Intn(2) == 0)) - if r.Intn(5) != 0 { - v37 := r.Intn(5) - this.OutputMetricTags = make([]*MetricTag, v37) - for i := 0; i < v37; i++ { - this.OutputMetricTags[i] = NewPopulatedMetricTag(r, easy) - } - } - this.Scheduler = string(randStringCheck(r)) - this.ProcessedBy = string(randStringCheck(r)) - if r.Intn(5) != 0 { - v38 := r.Intn(5) - this.Pipelines = make([]*ResourceReference, v38) - for i := 0; i < v38; i++ { - this.Pipelines[i] = NewPopulatedResourceReference(r, easy) - } - } - if r.Intn(5) != 0 { - v39 := r.Intn(5) - this.OutputMetricThresholds = make([]*MetricThreshold, v39) - for i := 0; i < v39; i++ { - this.OutputMetricThresholds[i] = NewPopulatedMetricThreshold(r, easy) - } - } - if r.Intn(5) != 0 { - v40 := r.Intn(5) - this.Subdues = make([]*TimeWindowRepeated, v40) - for i := 0; i < v40; i++ { - this.Subdues[i] = NewPopulatedTimeWindowRepeated(r, easy) - } - } - v41 := r.Intn(100) - this.ExtendedAttributes = make([]byte, v41) - for i := 0; i < v41; i++ { - this.ExtendedAttributes[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCheck(r, 100) - } - return this -} - -func NewPopulatedCheckHistory(r randyCheck, easy bool) *CheckHistory { - this := &CheckHistory{} - this.Status = uint32(r.Uint32()) - this.Executed = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Executed *= -1 - } - this.Flapping = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCheck(r, 4) - } - return this -} - -type randyCheck interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneCheck(r randyCheck) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringCheck(r randyCheck) string { - v42 := r.Intn(100) - tmps := make([]rune, v42) - for i := 0; i < v42; i++ { - tmps[i] = randUTF8RuneCheck(r) - } - return string(tmps) -} -func randUnrecognizedCheck(r randyCheck, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldCheck(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldCheck(dAtA []byte, r randyCheck, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateCheck(dAtA, uint64(key)) - v43 := r.Int63() - if r.Intn(2) == 0 { - v43 *= -1 - } - dAtA = encodeVarintPopulateCheck(dAtA, uint64(v43)) - case 1: - dAtA = encodeVarintPopulateCheck(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateCheck(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateCheck(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateCheck(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateCheck(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *CheckRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovCheck(uint64(l)) - } - if len(m.Assets) > 0 { - for _, e := range m.Assets { - l = e.Size() - n += 1 + l + sovCheck(uint64(l)) - } - } - if len(m.Hooks) > 0 { - for _, e := range m.Hooks { - l = e.Size() - n += 1 + l + sovCheck(uint64(l)) - } - } - if m.Issued != 0 { - n += 1 + sovCheck(uint64(m.Issued)) - } - if len(m.HookAssets) > 0 { - for k, v := range m.HookAssets { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovCheck(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovCheck(uint64(len(k))) + l - n += mapEntrySize + 1 + sovCheck(uint64(mapEntrySize)) - } - } - if len(m.Secrets) > 0 { - for _, s := range m.Secrets { - l = len(s) - n += 1 + l + sovCheck(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AssetList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Assets) > 0 { - for _, e := range m.Assets { - l = e.Size() - n += 1 + l + sovCheck(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ProxyRequests) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.EntityAttributes) > 0 { - for _, s := range m.EntityAttributes { - l = len(s) - n += 1 + l + sovCheck(uint64(l)) - } - } - if m.Splay { - n += 2 - } - if m.SplayCoverage != 0 { - n += 1 + sovCheck(uint64(m.SplayCoverage)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CheckConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Command) - if l > 0 { - n += 1 + l + sovCheck(uint64(l)) - } - if len(m.Handlers) > 0 { - for _, s := range m.Handlers { - l = len(s) - n += 1 + l + sovCheck(uint64(l)) - } - } - if m.HighFlapThreshold != 0 { - n += 1 + sovCheck(uint64(m.HighFlapThreshold)) - } - if m.Interval != 0 { - n += 1 + sovCheck(uint64(m.Interval)) - } - if m.LowFlapThreshold != 0 { - n += 1 + sovCheck(uint64(m.LowFlapThreshold)) - } - if m.Publish { - n += 2 - } - if len(m.RuntimeAssets) > 0 { - for _, s := range m.RuntimeAssets { - l = len(s) - n += 1 + l + sovCheck(uint64(l)) - } - } - if len(m.Subscriptions) > 0 { - for _, s := range m.Subscriptions { - l = len(s) - n += 1 + l + sovCheck(uint64(l)) - } - } - l = len(m.ExtendedAttributes) - if l > 0 { - n += 1 + l + sovCheck(uint64(l)) - } - l = len(m.ProxyEntityName) - if l > 0 { - n += 1 + l + sovCheck(uint64(l)) - } - if len(m.CheckHooks) > 0 { - for _, e := range m.CheckHooks { - l = e.Size() - n += 1 + l + sovCheck(uint64(l)) - } - } - if m.Stdin { - n += 2 - } - if m.Subdue != nil { - l = m.Subdue.Size() - n += 2 + l + sovCheck(uint64(l)) - } - l = len(m.Cron) - if l > 0 { - n += 2 + l + sovCheck(uint64(l)) - } - if m.Ttl != 0 { - n += 2 + sovCheck(uint64(m.Ttl)) - } - if m.Timeout != 0 { - n += 2 + sovCheck(uint64(m.Timeout)) - } - if m.ProxyRequests != nil { - l = m.ProxyRequests.Size() - n += 2 + l + sovCheck(uint64(l)) - } - if m.RoundRobin { - n += 3 - } - l = len(m.OutputMetricFormat) - if l > 0 { - n += 2 + l + sovCheck(uint64(l)) - } - if len(m.OutputMetricHandlers) > 0 { - for _, s := range m.OutputMetricHandlers { - l = len(s) - n += 2 + l + sovCheck(uint64(l)) - } - } - if len(m.EnvVars) > 0 { - for _, s := range m.EnvVars { - l = len(s) - n += 2 + l + sovCheck(uint64(l)) - } - } - l = m.ObjectMeta.Size() - n += 2 + l + sovCheck(uint64(l)) - if m.MaxOutputSize != 0 { - n += 2 + sovCheck(uint64(m.MaxOutputSize)) - } - if m.DiscardOutput { - n += 3 - } - if len(m.Secrets) > 0 { - for _, e := range m.Secrets { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - if len(m.OutputMetricTags) > 0 { - for _, e := range m.OutputMetricTags { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - l = len(m.Scheduler) - if l > 0 { - n += 2 + l + sovCheck(uint64(l)) - } - if len(m.Pipelines) > 0 { - for _, e := range m.Pipelines { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - if len(m.OutputMetricThresholds) > 0 { - for _, e := range m.OutputMetricThresholds { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - if len(m.Subdues) > 0 { - for _, e := range m.Subdues { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Check) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Command) - if l > 0 { - n += 1 + l + sovCheck(uint64(l)) - } - if len(m.Handlers) > 0 { - for _, s := range m.Handlers { - l = len(s) - n += 1 + l + sovCheck(uint64(l)) - } - } - if m.HighFlapThreshold != 0 { - n += 1 + sovCheck(uint64(m.HighFlapThreshold)) - } - if m.Interval != 0 { - n += 1 + sovCheck(uint64(m.Interval)) - } - if m.LowFlapThreshold != 0 { - n += 1 + sovCheck(uint64(m.LowFlapThreshold)) - } - if m.Publish { - n += 2 - } - if len(m.RuntimeAssets) > 0 { - for _, s := range m.RuntimeAssets { - l = len(s) - n += 1 + l + sovCheck(uint64(l)) - } - } - if len(m.Subscriptions) > 0 { - for _, s := range m.Subscriptions { - l = len(s) - n += 1 + l + sovCheck(uint64(l)) - } - } - l = len(m.ProxyEntityName) - if l > 0 { - n += 1 + l + sovCheck(uint64(l)) - } - if len(m.CheckHooks) > 0 { - for _, e := range m.CheckHooks { - l = e.Size() - n += 1 + l + sovCheck(uint64(l)) - } - } - if m.Stdin { - n += 2 - } - if m.Subdue != nil { - l = m.Subdue.Size() - n += 2 + l + sovCheck(uint64(l)) - } - l = len(m.Cron) - if l > 0 { - n += 2 + l + sovCheck(uint64(l)) - } - if m.Ttl != 0 { - n += 2 + sovCheck(uint64(m.Ttl)) - } - if m.Timeout != 0 { - n += 2 + sovCheck(uint64(m.Timeout)) - } - if m.ProxyRequests != nil { - l = m.ProxyRequests.Size() - n += 2 + l + sovCheck(uint64(l)) - } - if m.RoundRobin { - n += 3 - } - if m.Duration != 0 { - n += 10 - } - if m.Executed != 0 { - n += 2 + sovCheck(uint64(m.Executed)) - } - if len(m.History) > 0 { - for _, e := range m.History { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - if m.Issued != 0 { - n += 2 + sovCheck(uint64(m.Issued)) - } - l = len(m.Output) - if l > 0 { - n += 2 + l + sovCheck(uint64(l)) - } - l = len(m.State) - if l > 0 { - n += 2 + l + sovCheck(uint64(l)) - } - if m.Status != 0 { - n += 2 + sovCheck(uint64(m.Status)) - } - if m.TotalStateChange != 0 { - n += 2 + sovCheck(uint64(m.TotalStateChange)) - } - if m.LastOK != 0 { - n += 2 + sovCheck(uint64(m.LastOK)) - } - if m.Occurrences != 0 { - n += 2 + sovCheck(uint64(m.Occurrences)) - } - if m.OccurrencesWatermark != 0 { - n += 2 + sovCheck(uint64(m.OccurrencesWatermark)) - } - if len(m.Silenced) > 0 { - for _, s := range m.Silenced { - l = len(s) - n += 2 + l + sovCheck(uint64(l)) - } - } - if len(m.Hooks) > 0 { - for _, e := range m.Hooks { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - l = len(m.OutputMetricFormat) - if l > 0 { - n += 2 + l + sovCheck(uint64(l)) - } - if len(m.OutputMetricHandlers) > 0 { - for _, s := range m.OutputMetricHandlers { - l = len(s) - n += 2 + l + sovCheck(uint64(l)) - } - } - if len(m.EnvVars) > 0 { - for _, s := range m.EnvVars { - l = len(s) - n += 2 + l + sovCheck(uint64(l)) - } - } - l = m.ObjectMeta.Size() - n += 2 + l + sovCheck(uint64(l)) - if m.MaxOutputSize != 0 { - n += 2 + sovCheck(uint64(m.MaxOutputSize)) - } - if m.DiscardOutput { - n += 3 - } - if len(m.Secrets) > 0 { - for _, e := range m.Secrets { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - if m.IsSilenced { - n += 3 - } - if len(m.OutputMetricTags) > 0 { - for _, e := range m.OutputMetricTags { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - l = len(m.Scheduler) - if l > 0 { - n += 2 + l + sovCheck(uint64(l)) - } - l = len(m.ProcessedBy) - if l > 0 { - n += 2 + l + sovCheck(uint64(l)) - } - if len(m.Pipelines) > 0 { - for _, e := range m.Pipelines { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - if len(m.OutputMetricThresholds) > 0 { - for _, e := range m.OutputMetricThresholds { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - if len(m.Subdues) > 0 { - for _, e := range m.Subdues { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } - l = len(m.ExtendedAttributes) - if l > 0 { - n += 2 + l + sovCheck(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CheckHistory) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != 0 { - n += 1 + sovCheck(uint64(m.Status)) - } - if m.Executed != 0 { - n += 1 + sovCheck(uint64(m.Executed)) - } - if m.Flapping { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovCheck(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCheck(x uint64) (n int) { - return sovCheck(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CheckRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Config == nil { - m.Config = &CheckConfig{} - } - if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Assets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Assets = append(m.Assets, Asset{}) - if err := m.Assets[len(m.Assets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hooks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hooks = append(m.Hooks, HookConfig{}) - if err := m.Hooks[len(m.Hooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Issued", wireType) - } - m.Issued = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Issued |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HookAssets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HookAssets == nil { - m.HookAssets = make(map[string]*AssetList) - } - var mapkey string - var mapvalue *AssetList - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthCheck - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthCheck - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthCheck - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthCheck - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &AssetList{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.HookAssets[mapkey] = mapvalue - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secrets = append(m.Secrets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AssetList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Assets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Assets = append(m.Assets, Asset{}) - if err := m.Assets[len(m.Assets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProxyRequests) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProxyRequests: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProxyRequests: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EntityAttributes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EntityAttributes = append(m.EntityAttributes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Splay", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Splay = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SplayCoverage", wireType) - } - m.SplayCoverage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SplayCoverage |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CheckConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Command = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handlers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Handlers = append(m.Handlers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HighFlapThreshold", wireType) - } - m.HighFlapThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HighFlapThreshold |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) - } - m.Interval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Interval |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LowFlapThreshold", wireType) - } - m.LowFlapThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LowFlapThreshold |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Publish", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Publish = bool(v != 0) - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeAssets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeAssets = append(m.RuntimeAssets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subscriptions = append(m.Subscriptions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendedAttributes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExtendedAttributes = append(m.ExtendedAttributes[:0], dAtA[iNdEx:postIndex]...) - if m.ExtendedAttributes == nil { - m.ExtendedAttributes = []byte{} - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyEntityName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProxyEntityName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CheckHooks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CheckHooks = append(m.CheckHooks, HookList{}) - if err := m.CheckHooks[len(m.CheckHooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Stdin = bool(v != 0) - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subdue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Subdue == nil { - m.Subdue = &TimeWindowWhen{} - } - if err := m.Subdue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cron", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cron = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Ttl", wireType) - } - m.Ttl = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Ttl |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - m.Timeout = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timeout |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyRequests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ProxyRequests == nil { - m.ProxyRequests = &ProxyRequests{} - } - if err := m.ProxyRequests.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 21: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RoundRobin", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RoundRobin = bool(v != 0) - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricFormat", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputMetricFormat = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricHandlers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputMetricHandlers = append(m.OutputMetricHandlers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnvVars", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EnvVars = append(m.EnvVars, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 26: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 27: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxOutputSize", wireType) - } - m.MaxOutputSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxOutputSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 28: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiscardOutput", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DiscardOutput = bool(v != 0) - case 29: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secrets = append(m.Secrets, &Secret{}) - if err := m.Secrets[len(m.Secrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricTags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputMetricTags = append(m.OutputMetricTags, &MetricTag{}) - if err := m.OutputMetricTags[len(m.OutputMetricTags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scheduler", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scheduler = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 32: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pipelines", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pipelines = append(m.Pipelines, &ResourceReference{}) - if err := m.Pipelines[len(m.Pipelines)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 33: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricThresholds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputMetricThresholds = append(m.OutputMetricThresholds, &MetricThreshold{}) - if err := m.OutputMetricThresholds[len(m.OutputMetricThresholds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subdues", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subdues = append(m.Subdues, &TimeWindowRepeated{}) - if err := m.Subdues[len(m.Subdues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Check) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Check: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Check: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Command = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handlers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Handlers = append(m.Handlers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HighFlapThreshold", wireType) - } - m.HighFlapThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HighFlapThreshold |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) - } - m.Interval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Interval |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LowFlapThreshold", wireType) - } - m.LowFlapThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LowFlapThreshold |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Publish", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Publish = bool(v != 0) - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeAssets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeAssets = append(m.RuntimeAssets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subscriptions = append(m.Subscriptions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyEntityName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProxyEntityName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CheckHooks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CheckHooks = append(m.CheckHooks, HookList{}) - if err := m.CheckHooks[len(m.CheckHooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Stdin = bool(v != 0) - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subdue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Subdue == nil { - m.Subdue = &TimeWindowWhen{} - } - if err := m.Subdue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cron", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cron = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Ttl", wireType) - } - m.Ttl = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Ttl |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - m.Timeout = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timeout |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyRequests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ProxyRequests == nil { - m.ProxyRequests = &ProxyRequests{} - } - if err := m.ProxyRequests.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 21: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RoundRobin", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RoundRobin = bool(v != 0) - case 22: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Duration = float64(math.Float64frombits(v)) - case 23: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Executed", wireType) - } - m.Executed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Executed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field History", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.History = append(m.History, CheckHistory{}) - if err := m.History[len(m.History)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 25: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Issued", wireType) - } - m.Issued = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Issued |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 26: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Output = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 27: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.State = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 28: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 29: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalStateChange", wireType) - } - m.TotalStateChange = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalStateChange |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 30: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastOK", wireType) - } - m.LastOK = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastOK |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 31: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Occurrences", wireType) - } - m.Occurrences = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Occurrences |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 32: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OccurrencesWatermark", wireType) - } - m.OccurrencesWatermark = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OccurrencesWatermark |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 33: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Silenced", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Silenced = append(m.Silenced, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hooks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hooks = append(m.Hooks, &Hook{}) - if err := m.Hooks[len(m.Hooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricFormat", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputMetricFormat = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricHandlers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputMetricHandlers = append(m.OutputMetricHandlers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 37: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnvVars", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EnvVars = append(m.EnvVars, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 38: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 39: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxOutputSize", wireType) - } - m.MaxOutputSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxOutputSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 40: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiscardOutput", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DiscardOutput = bool(v != 0) - case 41: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secrets = append(m.Secrets, &Secret{}) - if err := m.Secrets[len(m.Secrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 42: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSilenced", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSilenced = bool(v != 0) - case 43: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricTags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputMetricTags = append(m.OutputMetricTags, &MetricTag{}) - if err := m.OutputMetricTags[len(m.OutputMetricTags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 44: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scheduler", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scheduler = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 45: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessedBy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProcessedBy = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 46: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pipelines", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pipelines = append(m.Pipelines, &ResourceReference{}) - if err := m.Pipelines[len(m.Pipelines)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 47: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricThresholds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputMetricThresholds = append(m.OutputMetricThresholds, &MetricThreshold{}) - if err := m.OutputMetricThresholds[len(m.OutputMetricThresholds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 48: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subdues", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subdues = append(m.Subdues, &TimeWindowRepeated{}) - if err := m.Subdues[len(m.Subdues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 99: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendedAttributes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCheck - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCheck - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExtendedAttributes = append(m.ExtendedAttributes[:0], dAtA[iNdEx:postIndex]...) - if m.ExtendedAttributes == nil { - m.ExtendedAttributes = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CheckHistory) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CheckHistory: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CheckHistory: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Executed", wireType) - } - m.Executed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Executed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flapping", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCheck - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Flapping = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCheck(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCheck - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCheck(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCheck - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCheck - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCheck - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCheck - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCheck - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCheck - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCheck = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCheck = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCheck = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/check.proto b/api/core/v2/check.proto deleted file mode 100644 index a6dadb850b..0000000000 --- a/api/core/v2/check.proto +++ /dev/null @@ -1,354 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/asset.proto"; -import "github.com/sensu/sensu-go/api/core/v2/hook.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; -import "github.com/sensu/sensu-go/api/core/v2/metric_threshold.proto"; -import "github.com/sensu/sensu-go/api/core/v2/metrics.proto"; -import "github.com/sensu/sensu-go/api/core/v2/resource_reference.proto"; -import "github.com/sensu/sensu-go/api/core/v2/secret.proto"; -import "github.com/sensu/sensu-go/api/core/v2/time_window.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// A CheckRequest represents a request to execute a check -message CheckRequest { - // Config is the specification of a check. - CheckConfig config = 1 [ (gogoproto.nullable) = true ]; - - // Assets are a list of assets required to execute check. - repeated Asset assets = 2 [ (gogoproto.nullable) = false ]; - - // Hooks are a list of hooks to be executed after a check. - repeated HookConfig hooks = 3 [ (gogoproto.nullable) = false ]; - - // Issued describes the time in which the check request was issued - int64 Issued = 4 [ (gogoproto.jsontag) = "issued" ]; - - // HookAssets is a map of assets required to execute hooks. - map hook_assets = 5 [ (gogoproto.jsontag) = "hook_assets" ]; - - // Secrets is a list of kv to be added to the env vars of a check. - repeated string secrets = 6; -} - -// An AssetList represents a list of assets for a CheckRequest. -message AssetList { - // Assets are a list of assets required to execute check or hook. - repeated Asset assets = 1 [ (gogoproto.jsontag) = "assets", (gogoproto.nullable) = false ]; -} - -// A ProxyRequests represents a request to execute a proxy check -message ProxyRequests { - // EntityAttributes store serialized arbitrary JSON-encoded data to match - // entities in the registry. - repeated string entity_attributes = 1 [ (gogoproto.jsontag) = "entity_attributes" ]; - - // Splay indicates if proxy check requests should be splayed, published - // evenly over a window of time. - bool splay = 2 [ (gogoproto.jsontag) = "splay" ]; - - // SplayCoverage is the percentage used for proxy check request splay - // calculation. - uint32 splay_coverage = 3 [ (gogoproto.jsontag) = "splay_coverage" ]; -} - -// CheckConfig is the specification of a check. -message CheckConfig { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Command is the command to be executed. - string command = 1; - - // Handlers are the event handler for the check (incidents and/or metrics). - repeated string handlers = 3 [ (gogoproto.jsontag) = "handlers" ]; - - // HighFlapThreshold is the flap detection high threshold (% state change) - // for the check. Sensu uses the same flap detection algorithm as Nagios. - uint32 high_flap_threshold = 4 [ (gogoproto.jsontag) = "high_flap_threshold" ]; - - // Interval is the interval, in seconds, at which the check should be run. - uint32 interval = 5 [ (gogoproto.jsontag) = "interval" ]; - - // LowFlapThreshold is the flap detection low threshold (% state change) for - // the check. Sensu uses the same flap detection algorithm as Nagios. - uint32 low_flap_threshold = 6 [ (gogoproto.jsontag) = "low_flap_threshold" ]; - - // Publish indicates if check requests are published for the check - bool publish = 9 [ (gogoproto.jsontag) = "publish" ]; - - // RuntimeAssets are a list of assets required to execute check. - repeated string runtime_assets = 10 [ (gogoproto.jsontag) = "runtime_assets" ]; - - // Subscriptions is the list of subscribers for the check. - repeated string subscriptions = 11 [ (gogoproto.jsontag) = "subscriptions" ]; - - // ExtendedAttributes store serialized arbitrary JSON-encoded data - bytes ExtendedAttributes = 12 [ (gogoproto.jsontag) = "-" ]; - - // Sources indicates the name of the entity representing an external - // resource - string proxy_entity_name = 13 [ (gogoproto.jsontag) = "proxy_entity_name", (gogoproto.customname) = "ProxyEntityName" ]; - - // CheckHooks is the list of check hooks for the check - repeated HookList check_hooks = 14 [ (gogoproto.jsontag) = "check_hooks", (gogoproto.nullable) = false ]; - - // STDIN indicates if the check command accepts JSON via stdin from the - // agent - bool stdin = 15 [ (gogoproto.jsontag) = "stdin" ]; - - // Subdue represents one or more time windows when the check should be - // subdued. - TimeWindowWhen subdue = 16 [ (gogoproto.jsontag) = "subdue" ]; - - // Cron is the cron string at which the check should be run. - string cron = 17; - - // TTL represents the length of time in seconds for which a check result is - // valid. - int64 ttl = 18 [ (gogoproto.jsontag) = "ttl" ]; - - // Timeout is the timeout, in seconds, at which the check has to run - uint32 timeout = 19 [ (gogoproto.jsontag) = "timeout" ]; - - // ProxyRequests represents a request to execute a proxy check - ProxyRequests proxy_requests = 20; - - // RoundRobin enables round-robin scheduling if set true. - bool round_robin = 21 [ (gogoproto.jsontag) = "round_robin" ]; - - // OutputOutputMetricFormat is the metric protocol that the check's output - // will be expected to follow in order to be extracted. - string output_metric_format = 22 [ (gogoproto.jsontag) = "output_metric_format" ]; - - // OutputOutputMetricHandlers is the list of event handlers that will - // respond to metrics that have been extracted from the check. - repeated string output_metric_handlers = 23 [ (gogoproto.jsontag) = "output_metric_handlers" ]; - - // EnvVars is the list of environment variables to set for the check's - // execution environment. - repeated string env_vars = 24 [ (gogoproto.jsontag) = "env_vars" ]; - - // Metadata contains the name, namespace, labels and annotations of the - // check - ObjectMeta metadata = 26 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - - // MaxOutputSize is the maximum size in bytes that will be stored for check - // output. If check output is larger than MaxOutputSize, it will be - // truncated when stored. Filters, mutators, and handlers will still have - // access to the full check output at the time the event occurs. - int64 max_output_size = 27; - - // DiscardOutput causes agents to discard check output. No check output is - // written to the backend, but metrics extraction is still performed. - bool discard_output = 28; - - // Secrets is the list of Sensu secrets to set for the check's - // execution environment. - repeated Secret secrets = 29 [ (gogoproto.jsontag) = "secrets" ]; - - // OutputMetricTags is list of metric tags to apply to metrics extracted from check output. - repeated MetricTag output_metric_tags = 30 [ (gogoproto.jsontag) = "output_metric_tags,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_tags,omitempty\"" ]; - - // Scheduler is the type of scheduler the check is scheduled by. The scheduler - // can be "memory", "etcd", or "postgres". Scheduler is set by Sensu - any - // setting by the user will be overridden. - string scheduler = 31 [ (gogoproto.jsontag) = "-", (gogoproto.moretags) = "yaml: \"-\"" ]; - - // Pipelines are the pipelines this check will use to process its events. - repeated ResourceReference pipelines = 32 [ (gogoproto.jsontag) = "pipelines" ]; - - repeated MetricThreshold output_metric_thresholds = 33 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; - - repeated TimeWindowRepeated subdues = 34 [ (gogoproto.jsontag) = "subdues,omitempty" ]; -} - -// A Check is a check specification and optionally the results of the check's -// execution. -message Check { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Command is the command to be executed. - string command = 1; - - // Handlers are the event handler for the check (incidents and/or metrics). - repeated string handlers = 3 [ (gogoproto.jsontag) = "handlers" ]; - - // HighFlapThreshold is the flap detection high threshold (% state change) - // for the check. Sensu uses the same flap detection algorithm as Nagios. - uint32 high_flap_threshold = 4 [ (gogoproto.jsontag) = "high_flap_threshold" ]; - - // Interval is the interval, in seconds, at which the check should be run. - uint32 interval = 5 [ (gogoproto.jsontag) = "interval" ]; - - // LowFlapThreshold is the flap detection low threshold (% state change) for - // the check. Sensu uses the same flap detection algorithm as Nagios. - uint32 low_flap_threshold = 6 [ (gogoproto.jsontag) = "low_flap_threshold" ]; - - // Publish indicates if check requests are published for the check - bool publish = 9 [ (gogoproto.jsontag) = "publish" ]; - - // RuntimeAssets are a list of assets required to execute check. - repeated string runtime_assets = 10 [ (gogoproto.jsontag) = "runtime_assets" ]; - - // Subscriptions is the list of subscribers for the check. - repeated string subscriptions = 11 [ (gogoproto.jsontag) = "subscriptions" ]; - - // Sources indicates the name of the entity representing an external - // resource - string proxy_entity_name = 13 [ (gogoproto.jsontag) = "proxy_entity_name", (gogoproto.customname) = "ProxyEntityName" ]; - - // CheckHooks is the list of check hooks for the check - repeated HookList check_hooks = 14 [ (gogoproto.jsontag) = "check_hooks", (gogoproto.nullable) = false ]; - - // STDIN indicates if the check command accepts JSON via stdin from the - // agent - bool stdin = 15 [ (gogoproto.jsontag) = "stdin" ]; - - // Subdue represents one or more time windows when the check should be - // subdued. - TimeWindowWhen subdue = 16 [ (gogoproto.jsontag) = "subdue" ]; - - // Cron is the cron string at which the check should be run. - string cron = 17; - - // TTL represents the length of time in seconds for which a check result is - // valid. - int64 ttl = 18 [ (gogoproto.jsontag) = "ttl" ]; - - // Timeout is the timeout, in seconds, at which the check has to run - uint32 timeout = 19 [ (gogoproto.jsontag) = "timeout" ]; - - // ProxyRequests represents a request to execute a proxy check - ProxyRequests proxy_requests = 20; - - // RoundRobin enables round-robin scheduling if set true. - bool round_robin = 21 [ (gogoproto.jsontag) = "round_robin" ]; - - // Duration of execution - double duration = 22; - - // Executed describes the time in which the check request was executed - int64 executed = 23 [ (gogoproto.jsontag) = "executed" ]; - - // History is the check state history. - repeated CheckHistory history = 24 [ (gogoproto.jsontag) = "history", (gogoproto.nullable) = false ]; - - // Issued describes the time in which the check request was issued - int64 issued = 25 [ (gogoproto.jsontag) = "issued" ]; - - // Output from the execution of Command - string output = 26 [ (gogoproto.jsontag) = "output" ]; - - // State provides handlers with more information about the state change - string state = 27; - - // Status is the exit status code produced by the check - uint32 status = 28 [ (gogoproto.jsontag) = "status" ]; - - // TotalStateChange indicates the total state change percentage for the - // check's history - uint32 total_state_change = 29 [ (gogoproto.jsontag) = "total_state_change" ]; - - // LastOK displays last time this check was ok; if event status is 0 this is - // set to timestamp - int64 last_ok = 30 [ (gogoproto.customname) = "LastOK", (gogoproto.jsontag) = "last_ok" ]; - - // Occurrences indicates the number of times an event has occurred for a - // client/check pair with the same check status - int64 occurrences = 31 [ (gogoproto.jsontag) = "occurrences" ]; - - // OccurrencesWatermark indicates the high water mark tracking number of - // occurrences at the current severity - int64 occurrences_watermark = 32 [ (gogoproto.jsontag) = "occurrences_watermark" ]; - - // Silenced is a list of silenced entry ids (subscription and check name) - repeated string silenced = 33 [ (gogoproto.nullable) = true ]; - - // Hooks describes the results of multiple hooks; if event is associated to - // hook execution. - repeated Hook hooks = 34 [ (gogoproto.nullable) = true ]; - - // OutputMetricFormat is the metric protocol that the check's output - // will be expected to follow in order to be extracted. - string output_metric_format = 35 [ (gogoproto.jsontag) = "output_metric_format" ]; - - // OutputMetricHandlers is the list of event handlers that will - // respond to metrics that have been extracted from the check. - repeated string output_metric_handlers = 36 [ (gogoproto.jsontag) = "output_metric_handlers" ]; - - // EnvVars is the list of environment variables to set for the check's - // execution environment. - repeated string env_vars = 37 [ (gogoproto.jsontag) = "env_vars" ]; - - // Metadata contains the name, namespace, labels and annotations of the - // check - ObjectMeta metadata = 38 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - - // MaxOutputSize is the maximum size in bytes that will be stored for check - // output. If check output is larger than MaxOutputSize, it will be - // truncated when stored. Filters, mutators, and handlers will still have - // access to the full check output at the time the event occurs. - int64 max_output_size = 39; - - // DiscardOutput causes agents to discard check output. No check output is - // written to the backend, but metrics extraction is still performed. - bool discard_output = 40; - - // Secrets is the list of Sensu secrets to set for the check's - // execution environment. - repeated Secret secrets = 41 [ (gogoproto.jsontag) = "secrets" ]; - - // IsSilenced indicates whether the check is silenced or not - bool is_silenced = 42 [ (gogoproto.jsontag) = "is_silenced" ]; - - // OutputMetricTags is list of metric tags to apply to metrics extracted from check output. - repeated MetricTag output_metric_tags = 43 [ (gogoproto.jsontag) = "output_metric_tags,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_tags,omitempty\"" ]; - - // Scheduler is the type of scheduler the check is scheduled by. The scheduler - // can be "memory", "etcd", or "postgres". Scheduler is set by Sensu - any - // setting by the user will be overridden. - string scheduler = 44 [ (gogoproto.jsontag) = "scheduler" ]; - - // ProcessedBy indicates the name of the agent that processed the event. This - // is mainly useful for determining which agent executed a proxy check request. - string ProcessedBy = 45 [ (gogoproto.jsontag) = "processed_by,omitempty", (gogoproto.moretags) = "yaml: \"processed_by\"" ]; - - // Pipelines are the pipelines this check will use to process its events. - repeated ResourceReference pipelines = 46 [ (gogoproto.jsontag) = "pipelines" ]; - - // MetricThresholds are a list of thresholds to apply to metrics in order to determine - // the check status. - repeated MetricThreshold output_metric_thresholds = 47 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; - - repeated TimeWindowRepeated subdues = 48 [ (gogoproto.jsontag) = "subdues,omitempty" ]; - - // ExtendedAttributes store serialized arbitrary JSON-encoded data - bytes ExtendedAttributes = 99 [ (gogoproto.jsontag) = "-" ]; -} - -// CheckHistory is a record of a check execution and its status -message CheckHistory { - // Status is the exit status code produced by the check. - uint32 status = 1 [ (gogoproto.jsontag) = "status" ]; - - // Executed describes the time in which the check request was executed - int64 executed = 2 [ (gogoproto.jsontag) = "executed" ]; - - // Flapping describes whether the check was flapping at this particular - // point in time. Comparing this value to the current flapping status allows - // filters to trigger only on start and end of flapping. NB! This has been - // disabled for 5.x releases. - bool flapping = 3 [ (gogoproto.jsontag) = "-" ]; -} diff --git a/api/core/v2/check_config.go b/api/core/v2/check_config.go deleted file mode 100644 index 448ad4f98d..0000000000 --- a/api/core/v2/check_config.go +++ /dev/null @@ -1,258 +0,0 @@ -package v2 - -import ( - "encoding/json" - "errors" - fmt "fmt" - "net/url" - "path" - "sort" - "strconv" - "strings" - "time" - - cron "github.com/robfig/cron/v3" - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -// FixtureCheckConfig returns a fixture for a CheckConfig object. -func FixtureCheckConfig(id string) *CheckConfig { - interval := uint32(60) - timeout := uint32(0) - - check := &CheckConfig{ - ObjectMeta: NewObjectMeta(id, "default"), - Interval: interval, - Subscriptions: []string{"linux"}, - Command: "command", - RuntimeAssets: []string{"ruby-2-4-2"}, - CheckHooks: []HookList{*FixtureHookList("hook1")}, - Publish: true, - Ttl: 0, - Timeout: timeout, - LowFlapThreshold: 20, - HighFlapThreshold: 60, - } - return check -} - -// NewCheckConfig creates a new CheckConfig. -func NewCheckConfig(meta ObjectMeta) *CheckConfig { - return &CheckConfig{ObjectMeta: meta} -} - -// MarshalJSON implements the json.Marshaler interface. -func (c *CheckConfig) MarshalJSON() ([]byte, error) { - if c == nil { - return []byte("null"), nil - } - if c.Subscriptions == nil { - c.Subscriptions = []string{} - } - if c.Handlers == nil { - c.Handlers = []string{} - } - if c.Pipelines == nil { - c.Pipelines = []*ResourceReference{} - } - - for _, ref := range c.Pipelines { - // default to core/v2 for APIVersion when not set - if ref.APIVersion == "" { - ref.APIVersion = "core/v2" - } - // default to Pipeline for Type when not set - if ref.Type == "" { - ref.Type = "Pipeline" - } - } - - type Clone CheckConfig - clone := &Clone{} - *clone = Clone(*c) - - return json.Marshal(clone) -} - -// SetNamespace sets the namespace of the resource. -func (c *CheckConfig) SetNamespace(namespace string) { - c.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (c *CheckConfig) SetObjectMeta(meta ObjectMeta) { - c.ObjectMeta = meta -} - -// StorePrefix returns the path prefix to this resource in the store -func (c *CheckConfig) StorePrefix() string { - return ChecksResource -} - -// URIPath returns the path component of a CheckConfig URI. -func (c *CheckConfig) URIPath() string { - if c.Namespace == "" { - return path.Join(URLPrefix, ChecksResource, url.PathEscape(c.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(c.Namespace), ChecksResource, url.PathEscape(c.Name)) -} - -// Validate returns an error if the check does not pass validation tests. -func (c *CheckConfig) Validate() error { - if err := ValidateName(c.Name); err != nil { - return errors.New("check name " + err.Error()) - } - - if c.Cron != "" { - if c.Interval > 0 { - return errors.New("must only specify either an interval or a cron schedule") - } - - if _, err := cron.ParseStandard(c.Cron); err != nil { - return fmt.Errorf("check cron string is invalid: %w", err) - } - } - - if c.Interval == 0 && c.Cron == "" { - return errors.New("check interval must be greater than 0 or a valid cron schedule must be provided") - } - - if c.Namespace == "" { - return errors.New("namespace must be set") - } - - if c.Ttl > 0 && c.Ttl <= int64(c.Interval) { - return errors.New("ttl must be greater than check interval") - } - - for _, assetName := range c.RuntimeAssets { - if err := ValidateAssetName(assetName); err != nil { - return fmt.Errorf("asset's %s", err) - } - } - - for _, subscription := range c.Subscriptions { - if subscription == "" { - return fmt.Errorf("subscriptions cannot be empty strings") - } - } - - // The entity can be empty but can't contain invalid characters (only - // alphanumeric string) - if c.ProxyEntityName != "" { - if err := ValidateName(c.ProxyEntityName); err != nil { - return errors.New("proxy entity name " + err.Error()) - } - } - - if c.ProxyRequests != nil { - if err := c.ProxyRequests.Validate(); err != nil { - return err - } - } - - if c.OutputMetricFormat != "" { - if err := ValidateOutputMetricFormat(c.OutputMetricFormat); err != nil { - return err - } - } - - if c.LowFlapThreshold != 0 && c.HighFlapThreshold != 0 && c.LowFlapThreshold >= c.HighFlapThreshold { - return errors.New("invalid flap thresholds") - } - - if err := ValidateEnvVars(c.EnvVars); err != nil { - return err - } - - if err := ValidateSubdues(c.Subdues); err != nil { - return err - } - - return c.Subdue.Validate() -} - -// IsSubdued returns true if the check is subdued at the current time. -// It returns false otherwise. -func (c *CheckConfig) IsSubdued() bool { - for _, subdue := range c.Subdues { - subdued := subdue.InWindows(time.Now()) - if subdued { - return true - } - } - return false -} - -// -// Sorting -// - -type cmpCheckConfig func(a, b *CheckConfig) bool - -// SortCheckConfigsByPredicate can be used to sort a given collection using a given -// predicate. -func SortCheckConfigsByPredicate(cs []*CheckConfig, fn cmpCheckConfig) sort.Interface { - return &checkSorter{checks: cs, byFn: fn} -} - -// SortCheckConfigsByName can be used to sort a given collection of checks by their -// names. -func SortCheckConfigsByName(es []*CheckConfig, asc bool) sort.Interface { - if asc { - return SortCheckConfigsByPredicate(es, func(a, b *CheckConfig) bool { - return a.Name < b.Name - }) - } - return SortCheckConfigsByPredicate(es, func(a, b *CheckConfig) bool { - return a.Name > b.Name - }) -} - -type checkSorter struct { - checks []*CheckConfig - byFn cmpCheckConfig -} - -// Len implements sort.Interface. -func (s *checkSorter) Len() int { - return len(s.checks) -} - -// Swap implements sort.Interface. -func (s *checkSorter) Swap(i, j int) { - s.checks[i], s.checks[j] = s.checks[j], s.checks[i] -} - -// Less implements sort.Interface. -func (s *checkSorter) Less(i, j int) bool { - return s.byFn(s.checks[i], s.checks[j]) -} - -// CheckConfigFields returns a set of fields that represent that resource -func CheckConfigFields(r Resource) map[string]string { - resource := r.(*CheckConfig) - fields := map[string]string{ - "check.name": resource.ObjectMeta.Name, - "check.namespace": resource.ObjectMeta.Namespace, - "check.handlers": strings.Join(resource.Handlers, ","), - "check.publish": strconv.FormatBool(resource.Publish), - "check.round_robin": strconv.FormatBool(resource.RoundRobin), - "check.runtime_assets": strings.Join(resource.RuntimeAssets, ","), - "check.subscriptions": strings.Join(resource.Subscriptions, ","), - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "check.labels.") - - pipelineIDs := []string{} - for _, pipeline := range resource.Pipelines { - pipelineIDs = append(pipelineIDs, pipeline.ResourceID()) - } - fields["check.pipelines"] = strings.Join(pipelineIDs, ",") - - return fields -} - -// CheckConfigFields returns a set of fields that represent that resource -func (c *CheckConfig) Fields() map[string]string { - return CheckConfigFields(c) -} diff --git a/api/core/v2/check_config_test.go b/api/core/v2/check_config_test.go deleted file mode 100644 index 9ea76cfd3f..0000000000 --- a/api/core/v2/check_config_test.go +++ /dev/null @@ -1,200 +0,0 @@ -package v2 - -import ( - "encoding/json" - "reflect" - "sort" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestCheckConfig(t *testing.T) { - var c CheckConfig - - // Invalid name - assert.Error(t, c.Validate()) - c.Name = "foo" - - // Invalid interval - assert.Error(t, c.Validate()) - c.Interval = 60 - - // Invalid command - assert.Error(t, c.Validate()) - c.Command = "echo 'foo'" - - // Invalid namespace - assert.Error(t, c.Validate()) - c.Namespace = "default" - - // Invalid ttl - c.Ttl = 10 - assert.Error(t, c.Validate()) - - // Invalid output metric format - c.OutputMetricFormat = "foo" - assert.Error(t, c.Validate()) - c.OutputMetricFormat = "" - - // Valid check - c.Ttl = 90 - assert.NoError(t, c.Validate()) -} - -func TestCheckConfigHasNonNilSubscriptions(t *testing.T) { - var c CheckConfig - b, err := json.Marshal(&c) - require.NoError(t, err) - require.NoError(t, json.Unmarshal(b, &c)) - require.NotNil(t, c.Subscriptions) -} - -func TestCheckConfigHasNonNilHandlers(t *testing.T) { - var c CheckConfig - b, err := json.Marshal(&c) - require.NoError(t, err) - require.NoError(t, json.Unmarshal(b, &c)) - require.NotNil(t, c.Handlers) -} - -func TestCheckConfigHasNonNilPipelines(t *testing.T) { - var c CheckConfig - b, err := json.Marshal(&c) - require.NoError(t, err) - require.NoError(t, json.Unmarshal(b, &c)) - require.NotNil(t, c.Pipelines) -} - -func TestCheckConfigHasNoEmptyStringsInSub(t *testing.T) { - c := FixtureCheckConfig("foo") - c.Subscriptions = append(c.Subscriptions, "demo", "foo") - assert.NoError(t, c.Validate()) -} - -func TestCheckConfigErrIfHasEmptyStringsInSub(t *testing.T) { - c := FixtureCheckConfig("foo") - c.Subscriptions = append(c.Subscriptions, "") - - assert.Error(t, c.Validate()) -} - -func TestCheckConfigErrMsgIfHasEmptyStringsInSub(t *testing.T) { - c := FixtureCheckConfig("foo") - c.Subscriptions = append(c.Subscriptions, "") - - err := c.Validate() - assert.EqualError(t, err, "subscriptions cannot be empty strings") -} - -func TestCheckConfigFlapThresholdValidation(t *testing.T) { - c := FixtureCheckConfig("foo") - // zero-valued flap threshold is valid - c.LowFlapThreshold, c.HighFlapThreshold = 0, 0 - assert.NoError(t, c.Validate()) - - // low flap threshold < high flap threshold is valid - c.LowFlapThreshold, c.HighFlapThreshold = 5, 10 - assert.NoError(t, c.Validate()) - - // low flap threshold = high flap threshold is invalid - c.LowFlapThreshold, c.HighFlapThreshold = 10, 10 - assert.Error(t, c.Validate()) - - // low flap threshold > high flap threshold is invalid - c.LowFlapThreshold, c.HighFlapThreshold = 11, 10 - assert.Error(t, c.Validate()) -} - -func TestSortCheckConfigsByName(t *testing.T) { - a := FixtureCheckConfig("Abernathy") - b := FixtureCheckConfig("Bernard") - c := FixtureCheckConfig("Clementine") - d := FixtureCheckConfig("Dolores") - - testCases := []struct { - name string - inDir bool - inChecks []*CheckConfig - expected []*CheckConfig - }{ - { - name: "Sorts ascending", - inDir: true, - inChecks: []*CheckConfig{d, c, a, b}, - expected: []*CheckConfig{a, b, c, d}, - }, - { - name: "Sorts descending", - inDir: false, - inChecks: []*CheckConfig{d, a, c, b}, - expected: []*CheckConfig{d, c, b, a}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - sort.Sort(SortCheckConfigsByName(tc.inChecks, tc.inDir)) - assert.EqualValues(t, tc.expected, tc.inChecks) - }) - } -} - -func TestCheckConfigFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureCheckConfig("check-disk"), - wantKey: "check.name", - want: "check-disk", - }, - { - name: "exposes publish", - args: &CheckConfig{Publish: true}, - wantKey: "check.publish", - want: "true", - }, - { - name: "exposes round robin", - args: &CheckConfig{RoundRobin: true}, - wantKey: "check.round_robin", - want: "true", - }, - { - name: "exposes pipelines", - args: &CheckConfig{ - Pipelines: []*ResourceReference{{ - Name: "xxx", - Type: "yyy", - APIVersion: "zzz", - }}, - }, - wantKey: "check.pipelines", - want: "zzz.yyy(Name=xxx)", - }, - { - name: "exposes labels", - args: &CheckConfig{ - ObjectMeta: ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "check.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("CheckConfig.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/check_proxy_requests.go b/api/core/v2/check_proxy_requests.go deleted file mode 100644 index 381f5bff85..0000000000 --- a/api/core/v2/check_proxy_requests.go +++ /dev/null @@ -1,32 +0,0 @@ -package v2 - -import ( - "errors" - - "github.com/sensu/sensu-go/api/core/v2/internal/js" -) - -// FixtureProxyRequests returns a fixture for a ProxyRequests object. -func FixtureProxyRequests(splay bool) *ProxyRequests { - splayCoverage := uint32(0) - if splay { - splayCoverage = DefaultSplayCoverage - } - return &ProxyRequests{ - Splay: splay, - SplayCoverage: splayCoverage, - } -} - -// Validate returns an error if the ProxyRequests does not pass validation tests -func (p *ProxyRequests) Validate() error { - if p.SplayCoverage > 100 { - return errors.New("proxy request splay coverage must be between 0 and 100") - } - - if (p.Splay) && (p.SplayCoverage == 0) { - return errors.New("proxy request splay coverage must be greater than 0 if splay is enabled") - } - - return js.ParseExpressions(p.EntityAttributes) -} diff --git a/api/core/v2/check_request.go b/api/core/v2/check_request.go deleted file mode 100644 index fa27cca79f..0000000000 --- a/api/core/v2/check_request.go +++ /dev/null @@ -1,16 +0,0 @@ -package v2 - -// FixtureCheckRequest returns a fixture for a CheckRequest object. -func FixtureCheckRequest(id string) *CheckRequest { - config := FixtureCheckConfig(id) - - return &CheckRequest{ - Config: config, - Assets: []Asset{ - *FixtureAsset("ruby-2-4-2"), - }, - Hooks: []HookConfig{ - *FixtureHookConfig("hook1"), - }, - } -} diff --git a/api/core/v2/check_request_test.go b/api/core/v2/check_request_test.go deleted file mode 100644 index 6c0bc0b54c..0000000000 --- a/api/core/v2/check_request_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package v2 - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestProxyRequestsValidate(t *testing.T) { - var p ProxyRequests - - // Invalid splay coverage - p.SplayCoverage = 150 - assert.Error(t, p.Validate()) - p.SplayCoverage = 0 - - // Invalid splay and splay coverage - p.Splay = true - assert.Error(t, p.Validate()) - p.SplayCoverage = 90 - - p.EntityAttributes = []string{`entity.EntityClass == "proxy"`} - - // Valid proxy request - assert.NoError(t, p.Validate()) -} - -func TestFixtureProxyRequests(t *testing.T) { - p := FixtureProxyRequests(true) - - assert.Equal(t, true, p.Splay) - assert.Equal(t, uint32(90), p.SplayCoverage) - assert.NoError(t, p.Validate()) - - p.SplayCoverage = 0 - assert.Error(t, p.Validate()) -} diff --git a/api/core/v2/check_test.go b/api/core/v2/check_test.go deleted file mode 100644 index f0503ed474..0000000000 --- a/api/core/v2/check_test.go +++ /dev/null @@ -1,226 +0,0 @@ -package v2 - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestCheckValidate(t *testing.T) { - var c Check - - // Invalid interval - c.Interval = 0 - assert.Error(t, c.Validate()) - c.Interval = 10 - - c.Name = "test" - c.Command = "command" - - assert.NoError(t, c.Validate()) -} - -func TestScheduleValidation(t *testing.T) { - c := FixtureCheck("check") - - // Fixture comes with valid interval-based schedule - assert.NoError(t, c.Validate()) - - c.Cron = "* * * * *" - assert.Error(t, c.Validate()) - - c.Interval = 0 - assert.NoError(t, c.Validate()) - - c.Cron = "this is an invalid cron" - assert.Error(t, c.Validate()) - - c.Publish = false - assert.NoError(t, c.Validate()) -} - -func TestFixtureCheckIsValid(t *testing.T) { - c := FixtureCheck("check") - - assert.Equal(t, "check", c.Name) - assert.NoError(t, c.Validate()) - - c.RuntimeAssets = []string{"good"} - assert.NoError(t, c.Validate()) - - c.RuntimeAssets = []string{"BAD--a!!!---ASDFASDF$$$$"} - assert.Error(t, c.Validate()) -} - -func TestMergeWith(t *testing.T) { - originalCheck := FixtureCheck("check") - originalCheck.Status = 1 - - newCheck := FixtureCheck("check") - newCheck.History = []CheckHistory{} - - newCheck.MergeWith(originalCheck) - - assert.NotEmpty(t, newCheck.History) - assert.Equal(t, newCheck.Status, newCheck.History[20].Status) - assert.False(t, newCheck.History[20].Flapping) -} - -func TestCheckHasNoEmptyStringsInSub(t *testing.T) { - c := FixtureCheck("foo") - c.Subscriptions = append(c.Subscriptions, "demo", "foo") - assert.NoError(t, c.Validate()) -} - -func TestCheckErrIfHasEmptyStringsInSub(t *testing.T) { - c := FixtureCheck("foo") - c.Subscriptions = append(c.Subscriptions, "") - - assert.Error(t, c.Validate()) -} - -func TestCheckErrMsgIfHasEmptyStringsInSub(t *testing.T) { - c := FixtureCheck("foo") - c.Subscriptions = append(c.Subscriptions, "") - - err := c.Validate() - assert.EqualError(t, err, "subscriptions cannot be empty strings") -} - -// NB: re-enable this test for sensu-go 6.0 -//func TestMergeWithFlappingEvent(t *testing.T) { -// originalCheck := FixtureCheck("check") -// originalCheck.Status = 1 -// -// newCheck := FixtureCheck("check") -// newCheck.History = []CheckHistory{} -// -// // Make sure the check history flaps by alternating all historic event statuses -// var status uint32 = 0 -// for i := range originalCheck.History { -// originalCheck.History[i].Status = status -// status = (status + 1) % 2 -// } -// -// // Set flap thresholds to non-zero so we actually trigger the flap logic -// newCheck.HighFlapThreshold = 25 -// newCheck.LowFlapThreshold = 10 -// -// newCheck.MergeWith(originalCheck) -// -// assert.NotEmpty(t, newCheck.History) -// assert.Equal(t, newCheck.Status, newCheck.History[20].Status) -// assert.True(t, newCheck.History[20].Flapping) -// assert.False(t, newCheck.History[19].Flapping) -//} - -func TestOutputMetricFormatValidate(t *testing.T) { - assert.NoError(t, ValidateOutputMetricFormat("nagios_perfdata")) - assert.NoError(t, ValidateOutputMetricFormat(NagiosOutputMetricFormat)) - assert.NoError(t, ValidateOutputMetricFormat(GraphiteOutputMetricFormat)) - assert.NoError(t, ValidateOutputMetricFormat(InfluxDBOutputMetricFormat)) - assert.NoError(t, ValidateOutputMetricFormat(OpenTSDBOutputMetricFormat)) - assert.NoError(t, ValidateOutputMetricFormat(PrometheusOutputMetricFormat)) - assert.Error(t, ValidateOutputMetricFormat("anything_else")) - assert.Error(t, ValidateOutputMetricFormat("NAGIOS_PERFDATA")) -} - -func TestCheckHasZeroIssuedMarshaled(t *testing.T) { - check := FixtureCheck("foo") - check.Issued = 0 - b, err := json.Marshal(check) - if err != nil { - t.Fatal(err) - } - var m map[string]interface{} - if err := json.Unmarshal(b, &m); err != nil { - t.Fatal(err) - } - if _, ok := m["issued"]; !ok { - t.Error("issued not present") - } -} - -func TestCheckHasNonNilSubscriptions(t *testing.T) { - var c Check - b, err := json.Marshal(&c) - require.NoError(t, err) - require.NoError(t, json.Unmarshal(b, &c)) - require.NotNil(t, c.Subscriptions) -} - -func TestCheckHasNonNilHandlers(t *testing.T) { - var c Check - b, err := json.Marshal(&c) - require.NoError(t, err) - require.NoError(t, json.Unmarshal(b, &c)) - require.NotNil(t, c.Handlers) -} - -func TestCheckHasNonNilPipelines(t *testing.T) { - var c Check - b, err := json.Marshal(&c) - require.NoError(t, err) - require.NoError(t, json.Unmarshal(b, &c)) - require.NotNil(t, c.Pipelines) -} - -func TestCheckFlapThresholdValidation(t *testing.T) { - c := FixtureCheck("foo") - // zero-valued flap threshold is valid - c.LowFlapThreshold, c.HighFlapThreshold = 0, 0 - assert.NoError(t, c.Validate()) - - // low flap threshold < high flap threshold is valid - c.LowFlapThreshold, c.HighFlapThreshold = 5, 10 - assert.NoError(t, c.Validate()) - - // low flap threshold = high flap threshold is invalid - c.LowFlapThreshold, c.HighFlapThreshold = 10, 10 - assert.Error(t, c.Validate()) - - // low flap threshold > high flap threshold is invalid - c.LowFlapThreshold, c.HighFlapThreshold = 11, 10 - assert.Error(t, c.Validate()) -} - -func TestCheckMerge(t *testing.T) { - a := FixtureCheck("check") - b := FixtureCheck("check") - - for i := range a.History { - if i%2 == 0 { - a.History[i].Status = 1 - } - } - - a.Occurrences = 1 - a.OccurrencesWatermark = 1 - - b.History = nil - b.TotalStateChange = 0 - b.State = "" - b.Occurrences = 0 - b.OccurrencesWatermark = 0 - - b.MergeWith(a) - - if got, want := b.TotalStateChange, uint32(98); got != want { - t.Errorf("bad TotalStateChange: got %d, want %d", got, want) - } - - if got, want := b.State, EventFlappingState; got != want { - t.Errorf("bad State: got %s, want %s", got, want) - } - - if got, want := b.Occurrences, int64(1); got != want { - t.Errorf("bad Occurrences: got %d, want %d", got, want) - } - - if got, want := b.OccurrencesWatermark, int64(1); got != want { - t.Errorf("bad OccurrencesWatermark: got %d, want %d", got, want) - } - -} diff --git a/api/core/v2/checkpb_test.go b/api/core/v2/checkpb_test.go deleted file mode 100644 index cf9788a5cc..0000000000 --- a/api/core/v2/checkpb_test.go +++ /dev/null @@ -1,783 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/check.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestCheckRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckRequest{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCheckRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckRequest{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAssetListProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetList(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AssetList{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAssetListMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetList(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AssetList{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProxyRequestsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProxyRequests(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProxyRequests{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestProxyRequestsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProxyRequests(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProxyRequests{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckConfigProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckConfig(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckConfig{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCheckConfigMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckConfig(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckConfig{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheck(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Check{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCheckMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheck(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Check{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckHistoryProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckHistory(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckHistory{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCheckHistoryMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckHistory(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckHistory{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAssetListJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetList(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AssetList{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProxyRequestsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProxyRequests(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProxyRequests{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCheckConfigJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckConfig(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckConfig{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCheckJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheck(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Check{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCheckHistoryJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckHistory(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CheckHistory{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCheckRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &CheckRequest{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &CheckRequest{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAssetListProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetList(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &AssetList{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAssetListProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetList(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &AssetList{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProxyRequestsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProxyRequests(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &ProxyRequests{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProxyRequestsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProxyRequests(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &ProxyRequests{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckConfigProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckConfig(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &CheckConfig{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckConfigProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckConfig(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &CheckConfig{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheck(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Check{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheck(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Check{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckHistoryProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckHistory(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &CheckHistory{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckHistoryProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckHistory(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &CheckHistory{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCheckConfigFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCheckConfig(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCheckFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCheck(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestCheckRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckRequest(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAssetListSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAssetList(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestProxyRequestsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProxyRequests(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCheckConfigSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckConfig(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCheckSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheck(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestCheckHistorySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedCheckHistory(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/context.go b/api/core/v2/context.go deleted file mode 100644 index 1b386bfd42..0000000000 --- a/api/core/v2/context.go +++ /dev/null @@ -1,89 +0,0 @@ -package v2 - -import ( - "context" -) - -// Define the key type to avoid key collisions in context -type key int - -const ( - // AccessTokenString is the key name used to retrieve the access token string - AccessTokenString key = iota - - // AccessTokenClaims contains the key name to retrieve the access token claims - AccessTokenClaims - - // ClaimsKey contains key name to retrieve the jwt claims from context - ClaimsKey - - // NamespaceKey contains the key name to retrieve the namespace from context - NamespaceKey - - // RefreshTokenClaims contains the key name to retrieve the refresh token claims - RefreshTokenClaims - - // RefreshTokenString contains the key name to retrieve the refresh token string - RefreshTokenString - - // AuthorizationAttributesKey is the key name used to store authorization - // attributes extracted from a request - AuthorizationAttributesKey - - // StoreKey contains the key name to retrieve the etcd store from within a context - StoreKey - - // PageContinueKey contains the continue token used in pagination - PageContinueKey - - // PageSizeKey contains the page size used in pagination - PageSizeKey - - // PipelineKey contains the key name to retrieve the pipeline from context - PipelineKey - - // PipelineWorkflowKey contains the key name to retrieve the pipeline workflow from context - PipelineWorkflowKey -) - -// ContextNamespace returns the namespace injected in the context -func ContextNamespace(ctx context.Context) string { - if value := ctx.Value(NamespaceKey); value != nil { - return value.(string) - } - return "" -} - -// ContextPipeline returns the pipeline injected in the context -func ContextPipeline(ctx context.Context) string { - if value := ctx.Value(PipelineKey); value != nil { - return value.(string) - } - return "" -} - -// ContextPipelineWorkflow returns the pipeline workflow injected in the context -func ContextPipelineWorkflow(ctx context.Context) string { - if value := ctx.Value(PipelineWorkflowKey); value != nil { - return value.(string) - } - return "" -} - -// PageSizeFromContext returns the page size stored in the given context, if -// any. Returns 0 if none is found, typically meaning "unlimited" page size. -func PageSizeFromContext(ctx context.Context) int { - if value := ctx.Value(PageSizeKey); value != nil { - return value.(int) - } - return 0 -} - -// PageContinueFromContext returns the continue token stored in the given -// context, if any. Returns "" if none is found. -func PageContinueFromContext(ctx context.Context) string { - if value := ctx.Value(PageContinueKey); value != nil { - return value.(string) - } - return "" -} diff --git a/api/core/v2/context_test.go b/api/core/v2/context_test.go deleted file mode 100644 index 14926fdd01..0000000000 --- a/api/core/v2/context_test.go +++ /dev/null @@ -1,64 +0,0 @@ -package v2 - -import ( - "context" - "testing" -) - -func TestPageSizeFromContext(t *testing.T) { - tests := []struct { - description string - ctx context.Context - expected int - }{ - { - description: "it returns 0 if there is no page size in the context", - ctx: context.Background(), - expected: 0, - }, - { - description: "it returns the page size set in the context", - ctx: context.WithValue(context.Background(), PageSizeKey, 500), - expected: 500, - }, - } - - for _, test := range tests { - t.Run(test.description, func(t *testing.T) { - got := PageSizeFromContext(test.ctx) - - if got != test.expected { - t.Errorf("got %v, expected %v", got, test.expected) - } - }) - } -} - -func TestPageContinueFromContext(t *testing.T) { - tests := []struct { - description string - ctx context.Context - expected string - }{ - { - description: "it returns an empty string if there is no continue token in the context", - ctx: context.Background(), - expected: "", - }, - { - description: "it returns the continue token set in the context", - ctx: context.WithValue(context.Background(), PageContinueKey, "sartre"), - expected: "sartre", - }, - } - - for _, test := range tests { - t.Run(test.description, func(t *testing.T) { - got := PageContinueFromContext(test.ctx) - - if got != test.expected { - t.Errorf("got %v, expected %v", got, test.expected) - } - }) - } -} diff --git a/api/core/v2/core.go b/api/core/v2/core.go deleted file mode 100644 index 00bd1fb117..0000000000 --- a/api/core/v2/core.go +++ /dev/null @@ -1,14 +0,0 @@ -package v2 - -import "path" - -const ( - // APIGroupName is the group name for this API - APIGroupName = "core" - - // APIVersion is the version for this API - APIVersion = "v2" -) - -// URLPrefix is the URL prefix of this API -var URLPrefix = path.Join("/api", APIGroupName, APIVersion) diff --git a/api/core/v2/edition.go b/api/core/v2/edition.go deleted file mode 100644 index 352943382c..0000000000 --- a/api/core/v2/edition.go +++ /dev/null @@ -1,11 +0,0 @@ -package v2 - -const ( - // CoreEdition represents the Sensu Core Edition (CE) - // - CoreEdition = "core" - - // EditionHeader represents the HTTP header containing the edition value - // - EditionHeader = "Sensu-Edition" -) diff --git a/api/core/v2/entity.go b/api/core/v2/entity.go deleted file mode 100644 index a3a7ae007d..0000000000 --- a/api/core/v2/entity.go +++ /dev/null @@ -1,219 +0,0 @@ -package v2 - -import ( - "encoding/json" - "errors" - "fmt" - "net/url" - "path" - "strconv" - "strings" - - "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // EntitiesResource is the name of this resource type - EntitiesResource = "entities" - - // EntityAgentClass is the name of the class given to agent entities. - EntityAgentClass = "agent" - - // EntityProxyClass is the name of the class given to proxy entities. - EntityProxyClass = "proxy" - - // EntityBackendClass is the name of the class given to backend entities. - EntityBackendClass = "backend" - - // EntityServiceClass is the name of the class given to BSM service entities. - EntityServiceClass = "service" - - // Redacted is filled in for fields that contain sensitive information - Redacted = "REDACTED" -) - -// DefaultRedactFields contains the default fields to redact -var DefaultRedactFields = []string{"password", "passwd", "pass", "api_key", - "api_token", "access_key", "secret_key", "private_key", "secret"} - -// StorePrefix returns the path prefix to this resource in the store -func (e *Entity) StorePrefix() string { - return EntitiesResource -} - -// URIPath returns the path component of an entity URI. -func (e *Entity) URIPath() string { - if e.Namespace == "" { - return path.Join(URLPrefix, EntitiesResource, url.PathEscape(e.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(e.Namespace), EntitiesResource, url.PathEscape(e.Name)) -} - -// Validate returns an error if the entity is invalid. -func (e *Entity) Validate() error { - if err := ValidateName(e.Name); err != nil { - return errors.New("entity name " + err.Error()) - } - - if err := ValidateName(e.EntityClass); err != nil { - return errors.New("entity class " + err.Error()) - } - - if e.Namespace == "" { - return errors.New("namespace must be set") - } - - return nil -} - -// NewEntity creates a new Entity. -func NewEntity(meta ObjectMeta) *Entity { - return &Entity{ObjectMeta: meta} -} - -func redactMap(m map[string]string, redact []string) map[string]string { - if len(redact) == 0 { - redact = DefaultRedactFields - } - result := make(map[string]string, len(m)) - for k, v := range m { - if stringutil.FoundInArray(k, redact) { - result[k] = Redacted - } else { - result[k] = v - } - } - return result -} - -// GetRedactedEntity redacts the entity according to the entity's Redact fields. -// A redacted copy is returned. The copy contains pointers to the original's -// memory, with different Labels and Annotations. -func (e *Entity) GetRedactedEntity() *Entity { - if e == nil { - return nil - } - if e.Labels == nil && e.Annotations == nil { - return e - } - ent := &Entity{} - *ent = *e - ent.Annotations = redactMap(e.Annotations, e.Redact) - ent.Labels = redactMap(e.Labels, e.Redact) - return ent -} - -// MarshalJSON implements the json.Marshaler interface. -func (e *Entity) MarshalJSON() ([]byte, error) { - // Redact the entity before marshalling the entity so we don't leak any - // sensitive information - e = e.GetRedactedEntity() - - type Clone Entity - clone := (*Clone)(e) - - return json.Marshal(clone) -} - -// GetEntitySubscription returns the entity subscription, using the format -// "entity:entityName" -func GetEntitySubscription(entityName string) string { - return fmt.Sprintf("entity:%s", entityName) -} - -// FixtureEntity returns a testing fixture for an Entity object. -func FixtureEntity(name string) *Entity { - return &Entity{ - ObjectMeta: ObjectMeta{ - Namespace: "default", - Name: name, - }, - EntityClass: "host", - User: "agent1", - Subscriptions: []string{"linux", GetEntitySubscription(name)}, - Redact: []string{ - "password", - }, - System: System{ - Arch: "amd64", - OS: "linux", - Platform: "Gentoo", - PlatformFamily: "lol", - Network: Network{ - Interfaces: []NetworkInterface{ - { - Name: "eth0", - MAC: "return of the", - Addresses: []string{ - "127.0.0.1", - }, - }, - }, - }, - LibCType: "glibc", - VMSystem: "kvm", - VMRole: "host", - CloudProvider: "aws", - FloatType: "hard", - Processes: []*Process{ - { - Name: "sensu-agent", - }, - }, - }, - LastSeen: 12345, - SensuAgentVersion: "0.0.1", - } -} - -// EntityFields returns a set of fields that represent that resource -func EntityFields(r Resource) map[string]string { - resource := r.(*Entity) - fields := map[string]string{ - "entity.name": resource.ObjectMeta.Name, - "entity.namespace": resource.ObjectMeta.Namespace, - "entity.deregister": strconv.FormatBool(resource.Deregister), - "entity.entity_class": resource.EntityClass, - "entity.subscriptions": strings.Join(resource.Subscriptions, ","), - } - stringutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "entity.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (e *Entity) Fields() map[string]string { - return EntityFields(e) -} - -// SetNamespace sets the namespace of the resource. -func (e *Entity) SetNamespace(namespace string) { - e.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (e *Entity) SetObjectMeta(meta ObjectMeta) { - e.ObjectMeta = meta -} - -// RBACName is the rbac name of the resource. -func (e *Entity) RBACName() string { - return "entities" -} - -// SetName sets the name of the resource. -func (e *Entity) SetName(name string) { - e.Name = name -} - -// AddEntitySubscription appends the entity subscription (using the format -// "entity:entityName") to the subscriptions of an entity -func AddEntitySubscription(entityName string, subscriptions []string) []string { - entitySubscription := GetEntitySubscription(entityName) - - // Do not add the entity subscription if it already exists - if stringutil.InArray(entitySubscription, subscriptions) { - return subscriptions - } - - return append(subscriptions, entitySubscription) -} diff --git a/api/core/v2/entity.pb.go b/api/core/v2/entity.pb.go deleted file mode 100644 index 995ada9502..0000000000 --- a/api/core/v2/entity.pb.go +++ /dev/null @@ -1,3113 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/entity.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Entity is the Entity supplying the event. The default Entity for any -// Event is the running Agent process--if the Event is sent by an Agent. -type Entity struct { - EntityClass string `protobuf:"bytes,1,opt,name=entity_class,json=entityClass,proto3" json:"entity_class"` - System System `protobuf:"bytes,3,opt,name=system,proto3" json:"system"` - Subscriptions []string `protobuf:"bytes,4,rep,name=subscriptions,proto3" json:"subscriptions"` - LastSeen int64 `protobuf:"varint,5,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen"` - Deregister bool `protobuf:"varint,6,opt,name=deregister,proto3" json:"deregister"` - Deregistration Deregistration `protobuf:"bytes,7,opt,name=deregistration,proto3" json:"deregistration"` - User string `protobuf:"bytes,11,opt,name=user,proto3" json:"user,omitempty"` - // ExtendedAttributes store serialized arbitrary JSON-encoded data - ExtendedAttributes []byte `protobuf:"bytes,12,opt,name=extended_attributes,json=extendedAttributes,proto3" json:"-"` - // Redact contains the fields to redact on the agent - Redact []string `protobuf:"bytes,13,rep,name=redact,proto3" json:"redact,omitempty"` - // Metadata contains the name, namespace, labels and annotations of the - // entity - ObjectMeta `protobuf:"bytes,14,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // SensuAgentVersion is the sensu-agent version. - SensuAgentVersion string `protobuf:"bytes,15,opt,name=sensu_agent_version,json=sensuAgentVersion,proto3" json:"sensu_agent_version"` - // KeepaliveHandlers contains a list of handlers to use for the entity's - // keepalive events - KeepaliveHandlers []string `protobuf:"bytes,16,rep,name=keepalive_handlers,json=keepaliveHandlers,proto3" json:"keepalive_handlers,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Entity) Reset() { *m = Entity{} } -func (m *Entity) String() string { return proto.CompactTextString(m) } -func (*Entity) ProtoMessage() {} -func (*Entity) Descriptor() ([]byte, []int) { - return fileDescriptor_00cf9e6f3a2355f9, []int{0} -} -func (m *Entity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Entity.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Entity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Entity.Merge(m, src) -} -func (m *Entity) XXX_Size() int { - return m.Size() -} -func (m *Entity) XXX_DiscardUnknown() { - xxx_messageInfo_Entity.DiscardUnknown(m) -} - -var xxx_messageInfo_Entity proto.InternalMessageInfo - -// System contains information about the system that the Agent process -// is running on, used for additional Entity context. -type System struct { - Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` - OS string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"` - Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"` - PlatformFamily string `protobuf:"bytes,4,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"` - PlatformVersion string `protobuf:"bytes,5,opt,name=platform_version,json=platformVersion,proto3" json:"platform_version,omitempty"` - Network Network `protobuf:"bytes,6,opt,name=network,proto3" json:"network"` - Arch string `protobuf:"bytes,7,opt,name=arch,proto3" json:"arch,omitempty"` - ARMVersion int32 `protobuf:"varint,8,opt,name=arm_version,json=armVersion,proto3" json:"arm_version,omitempty"` - // LibCType indicates the type of libc the agent has access to (glibc, musl, - // etc) - LibCType string `protobuf:"bytes,9,opt,name=LibCType,proto3" json:"libc_type"` - // VMSystem indicates the VM system of the agent (kvm, vbox, etc) - VMSystem string `protobuf:"bytes,10,opt,name=VMSystem,proto3" json:"vm_system"` - // VMRole indicates the VM role of the agent (host/guest) - VMRole string `protobuf:"bytes,11,opt,name=VMRole,proto3" json:"vm_role"` - // CloudProvider indicates the public cloud the agent is running on. - CloudProvider string `protobuf:"bytes,12,opt,name=CloudProvider,proto3" json:"cloud_provider"` - FloatType string `protobuf:"bytes,13,opt,name=float_type,json=floatType,proto3" json:"float_type,omitempty"` - // Processes contains information about the local processes on the agent. - Processes []*Process `protobuf:"bytes,14,rep,name=Processes,proto3" json:"processes"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *System) Reset() { *m = System{} } -func (m *System) String() string { return proto.CompactTextString(m) } -func (*System) ProtoMessage() {} -func (*System) Descriptor() ([]byte, []int) { - return fileDescriptor_00cf9e6f3a2355f9, []int{1} -} -func (m *System) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *System) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_System.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *System) XXX_Merge(src proto.Message) { - xxx_messageInfo_System.Merge(m, src) -} -func (m *System) XXX_Size() int { - return m.Size() -} -func (m *System) XXX_DiscardUnknown() { - xxx_messageInfo_System.DiscardUnknown(m) -} - -var xxx_messageInfo_System proto.InternalMessageInfo - -func (m *System) GetHostname() string { - if m != nil { - return m.Hostname - } - return "" -} - -func (m *System) GetOS() string { - if m != nil { - return m.OS - } - return "" -} - -func (m *System) GetPlatform() string { - if m != nil { - return m.Platform - } - return "" -} - -func (m *System) GetPlatformFamily() string { - if m != nil { - return m.PlatformFamily - } - return "" -} - -func (m *System) GetPlatformVersion() string { - if m != nil { - return m.PlatformVersion - } - return "" -} - -func (m *System) GetNetwork() Network { - if m != nil { - return m.Network - } - return Network{} -} - -func (m *System) GetArch() string { - if m != nil { - return m.Arch - } - return "" -} - -func (m *System) GetARMVersion() int32 { - if m != nil { - return m.ARMVersion - } - return 0 -} - -func (m *System) GetLibCType() string { - if m != nil { - return m.LibCType - } - return "" -} - -func (m *System) GetVMSystem() string { - if m != nil { - return m.VMSystem - } - return "" -} - -func (m *System) GetVMRole() string { - if m != nil { - return m.VMRole - } - return "" -} - -func (m *System) GetCloudProvider() string { - if m != nil { - return m.CloudProvider - } - return "" -} - -func (m *System) GetFloatType() string { - if m != nil { - return m.FloatType - } - return "" -} - -func (m *System) GetProcesses() []*Process { - if m != nil { - return m.Processes - } - return nil -} - -// Process contains information about a local process. -type Process struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Process) Reset() { *m = Process{} } -func (m *Process) String() string { return proto.CompactTextString(m) } -func (*Process) ProtoMessage() {} -func (*Process) Descriptor() ([]byte, []int) { - return fileDescriptor_00cf9e6f3a2355f9, []int{2} -} -func (m *Process) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Process) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Process.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Process) XXX_Merge(src proto.Message) { - xxx_messageInfo_Process.Merge(m, src) -} -func (m *Process) XXX_Size() int { - return m.Size() -} -func (m *Process) XXX_DiscardUnknown() { - xxx_messageInfo_Process.DiscardUnknown(m) -} - -var xxx_messageInfo_Process proto.InternalMessageInfo - -func (m *Process) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -// Network contains information about the system network interfaces -// that the Agent process is running on, used for additional Entity -// context. -type Network struct { - Interfaces []NetworkInterface `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Network) Reset() { *m = Network{} } -func (m *Network) String() string { return proto.CompactTextString(m) } -func (*Network) ProtoMessage() {} -func (*Network) Descriptor() ([]byte, []int) { - return fileDescriptor_00cf9e6f3a2355f9, []int{3} -} -func (m *Network) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Network) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Network.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Network) XXX_Merge(src proto.Message) { - xxx_messageInfo_Network.Merge(m, src) -} -func (m *Network) XXX_Size() int { - return m.Size() -} -func (m *Network) XXX_DiscardUnknown() { - xxx_messageInfo_Network.DiscardUnknown(m) -} - -var xxx_messageInfo_Network proto.InternalMessageInfo - -func (m *Network) GetInterfaces() []NetworkInterface { - if m != nil { - return m.Interfaces - } - return nil -} - -// NetworkInterface contains information about a system network -// interface. -type NetworkInterface struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - MAC string `protobuf:"bytes,2,opt,name=mac,proto3" json:"mac,omitempty"` - Addresses []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NetworkInterface) Reset() { *m = NetworkInterface{} } -func (m *NetworkInterface) String() string { return proto.CompactTextString(m) } -func (*NetworkInterface) ProtoMessage() {} -func (*NetworkInterface) Descriptor() ([]byte, []int) { - return fileDescriptor_00cf9e6f3a2355f9, []int{4} -} -func (m *NetworkInterface) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkInterface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NetworkInterface.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NetworkInterface) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkInterface.Merge(m, src) -} -func (m *NetworkInterface) XXX_Size() int { - return m.Size() -} -func (m *NetworkInterface) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkInterface.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkInterface proto.InternalMessageInfo - -func (m *NetworkInterface) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *NetworkInterface) GetMAC() string { - if m != nil { - return m.MAC - } - return "" -} - -func (m *NetworkInterface) GetAddresses() []string { - if m != nil { - return m.Addresses - } - return nil -} - -// Deregistration contains configuration for Sensu entity de-registration. -type Deregistration struct { - Handler string `protobuf:"bytes,1,opt,name=handler,proto3" json:"handler,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Deregistration) Reset() { *m = Deregistration{} } -func (m *Deregistration) String() string { return proto.CompactTextString(m) } -func (*Deregistration) ProtoMessage() {} -func (*Deregistration) Descriptor() ([]byte, []int) { - return fileDescriptor_00cf9e6f3a2355f9, []int{5} -} -func (m *Deregistration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Deregistration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Deregistration.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Deregistration) XXX_Merge(src proto.Message) { - xxx_messageInfo_Deregistration.Merge(m, src) -} -func (m *Deregistration) XXX_Size() int { - return m.Size() -} -func (m *Deregistration) XXX_DiscardUnknown() { - xxx_messageInfo_Deregistration.DiscardUnknown(m) -} - -var xxx_messageInfo_Deregistration proto.InternalMessageInfo - -func (m *Deregistration) GetHandler() string { - if m != nil { - return m.Handler - } - return "" -} - -func init() { - proto.RegisterType((*Entity)(nil), "sensu.core.v2.Entity") - proto.RegisterType((*System)(nil), "sensu.core.v2.System") - proto.RegisterType((*Process)(nil), "sensu.core.v2.Process") - proto.RegisterType((*Network)(nil), "sensu.core.v2.Network") - proto.RegisterType((*NetworkInterface)(nil), "sensu.core.v2.NetworkInterface") - proto.RegisterType((*Deregistration)(nil), "sensu.core.v2.Deregistration") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/entity.proto", fileDescriptor_00cf9e6f3a2355f9) -} - -var fileDescriptor_00cf9e6f3a2355f9 = []byte{ - // 931 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xcb, 0x72, 0x1b, 0x45, - 0x14, 0xf5, 0x58, 0xb2, 0x1e, 0x57, 0x96, 0x62, 0x77, 0x0a, 0x33, 0x71, 0x11, 0x8d, 0x4a, 0x2c, - 0xa2, 0x04, 0x2c, 0x11, 0x99, 0x0a, 0x14, 0x2b, 0x3c, 0xe6, 0x59, 0x60, 0x92, 0x6a, 0x83, 0x17, - 0x2c, 0x98, 0x6a, 0xcd, 0xb4, 0xe5, 0x21, 0x33, 0xd3, 0x53, 0xdd, 0x2d, 0x81, 0xfe, 0x80, 0x2d, - 0x3b, 0x96, 0x59, 0xe6, 0x13, 0x58, 0xb3, 0xca, 0x32, 0x5f, 0x30, 0x05, 0x62, 0x37, 0x5f, 0xc0, - 0x92, 0xea, 0x9e, 0x87, 0x1e, 0xe5, 0x45, 0x36, 0xaa, 0x7b, 0xef, 0x39, 0xb7, 0xef, 0xa3, 0xcf, - 0xb4, 0x60, 0x3c, 0xf5, 0xe5, 0xcd, 0x6c, 0x32, 0x74, 0x59, 0x38, 0x12, 0x34, 0x12, 0xb3, 0xec, - 0xf7, 0x64, 0xca, 0x46, 0x24, 0xf6, 0x47, 0x2e, 0xe3, 0x74, 0x34, 0x1f, 0x8f, 0x68, 0x24, 0x7d, - 0xb9, 0x18, 0xc6, 0x9c, 0x49, 0x86, 0xda, 0x9a, 0x32, 0x54, 0xd8, 0x70, 0x3e, 0x3e, 0xfe, 0x70, - 0xed, 0x88, 0x29, 0x9b, 0xb2, 0x91, 0x66, 0x4d, 0x66, 0xd7, 0x9f, 0xce, 0x1f, 0x0f, 0x4f, 0x87, - 0x8f, 0x75, 0x50, 0xc7, 0xb4, 0x95, 0x1d, 0x72, 0xfc, 0xc1, 0x9b, 0x15, 0x0e, 0xa9, 0x24, 0x59, - 0x46, 0xff, 0xf7, 0x3d, 0xa8, 0x7d, 0xae, 0xfb, 0x40, 0xa7, 0xb0, 0x9f, 0x75, 0xe4, 0xb8, 0x01, - 0x11, 0xc2, 0x34, 0x7a, 0xc6, 0xa0, 0x69, 0x1f, 0xa4, 0x89, 0xb5, 0x11, 0xc7, 0xad, 0xcc, 0x3b, - 0x57, 0x0e, 0x3a, 0x85, 0x9a, 0x58, 0x08, 0x49, 0x43, 0xb3, 0xd2, 0x33, 0x06, 0xad, 0xf1, 0x5b, - 0xc3, 0x8d, 0x39, 0x86, 0x97, 0x1a, 0xb4, 0xab, 0xaf, 0x12, 0x6b, 0x07, 0xe7, 0x54, 0xf4, 0x11, - 0xb4, 0xc5, 0x6c, 0x22, 0x5c, 0xee, 0xc7, 0xd2, 0x67, 0x91, 0x30, 0xab, 0xbd, 0xca, 0xa0, 0x69, - 0x1f, 0xa6, 0x89, 0xb5, 0x09, 0xe0, 0x4d, 0x17, 0x3d, 0x82, 0x66, 0x40, 0x84, 0x74, 0x04, 0xa5, - 0x91, 0xb9, 0xd7, 0x33, 0x06, 0x15, 0xbb, 0x9d, 0x26, 0xd6, 0x2a, 0x88, 0x1b, 0xca, 0xbc, 0xa4, - 0x34, 0x42, 0x43, 0x00, 0x8f, 0x72, 0x3a, 0xf5, 0x85, 0xa4, 0xdc, 0xac, 0xf5, 0x8c, 0x41, 0xc3, - 0xee, 0xa4, 0x89, 0xb5, 0x16, 0xc5, 0x6b, 0x36, 0xfa, 0x06, 0x3a, 0x85, 0xc7, 0x89, 0x2a, 0x67, - 0xd6, 0xf5, 0x44, 0xf7, 0xb7, 0x26, 0xfa, 0x6c, 0x83, 0x94, 0x4f, 0xb6, 0x95, 0x8a, 0x10, 0x54, - 0x67, 0x82, 0x72, 0xb3, 0xa5, 0x76, 0x88, 0xb5, 0x8d, 0x9e, 0xc0, 0x5d, 0xfa, 0xab, 0xa4, 0x91, - 0x47, 0x3d, 0x87, 0x48, 0xc9, 0xfd, 0xc9, 0x4c, 0x52, 0x61, 0xee, 0xf7, 0x8c, 0xc1, 0xbe, 0xbd, - 0x97, 0x26, 0x96, 0x71, 0x82, 0x51, 0xc1, 0x38, 0x2b, 0x09, 0xe8, 0x08, 0x6a, 0x9c, 0x7a, 0xc4, - 0x95, 0x66, 0x5b, 0xad, 0x09, 0xe7, 0x1e, 0xfa, 0x01, 0x1a, 0xea, 0x22, 0x3d, 0x22, 0x89, 0xd9, - 0xd1, 0xad, 0xde, 0xdb, 0x6a, 0xf5, 0xe9, 0xe4, 0x67, 0xea, 0xca, 0x0b, 0x2a, 0x89, 0xdd, 0x55, - 0x6d, 0xbe, 0x4e, 0x2c, 0x23, 0x4d, 0x2c, 0x54, 0xa4, 0xbd, 0xcf, 0x42, 0x5f, 0xd2, 0x30, 0x96, - 0x0b, 0x5c, 0x1e, 0x85, 0xbe, 0x84, 0xbb, 0xfa, 0x14, 0x87, 0x4c, 0x69, 0x24, 0x9d, 0x39, 0xe5, - 0x42, 0x2d, 0xe3, 0x8e, 0x56, 0xc3, 0xdb, 0x69, 0x62, 0xdd, 0x06, 0xe3, 0x43, 0x1d, 0x3c, 0x53, - 0xb1, 0xab, 0x2c, 0x84, 0x4e, 0x00, 0x3d, 0xa7, 0x34, 0x26, 0x81, 0x3f, 0xa7, 0xce, 0x0d, 0x89, - 0xbc, 0x80, 0x72, 0x61, 0x1e, 0xe8, 0x19, 0x0e, 0x4b, 0xe4, 0xab, 0x1c, 0xf8, 0xa4, 0xf1, 0xdb, - 0x0b, 0x6b, 0xe7, 0xe5, 0x0b, 0xcb, 0xe8, 0xff, 0x55, 0x85, 0x5a, 0xa6, 0x1b, 0x74, 0x0c, 0x8d, - 0x1b, 0x26, 0x64, 0x44, 0x42, 0x9a, 0xe9, 0x11, 0x97, 0x3e, 0x3a, 0x82, 0x5d, 0x26, 0xcc, 0x5d, - 0xdd, 0x57, 0x6d, 0x99, 0x58, 0xbb, 0x4f, 0x2f, 0xf1, 0x2e, 0x13, 0x2a, 0x27, 0x0e, 0x88, 0xbc, - 0x66, 0x3c, 0x13, 0x65, 0x13, 0x97, 0x3e, 0x7a, 0x00, 0x77, 0x0a, 0xdb, 0xb9, 0x26, 0xa1, 0x1f, - 0x2c, 0xcc, 0xaa, 0xa6, 0x74, 0x8a, 0xf0, 0x17, 0x3a, 0x8a, 0x1e, 0xc2, 0x41, 0x49, 0x2c, 0x56, - 0xb0, 0xa7, 0x99, 0xe5, 0x01, 0xc5, 0x9c, 0x4f, 0xa0, 0x1e, 0x51, 0xf9, 0x0b, 0xe3, 0xcf, 0xb5, - 0xca, 0x5a, 0xe3, 0xa3, 0xad, 0x6b, 0xf8, 0x2e, 0x43, 0x73, 0xa9, 0x14, 0x64, 0xa5, 0x11, 0xc2, - 0xdd, 0x1b, 0x2d, 0xb3, 0x26, 0xd6, 0x36, 0x1a, 0x41, 0x8b, 0xac, 0x55, 0x6c, 0xf4, 0x8c, 0xc1, - 0x9e, 0xdd, 0x59, 0x26, 0x16, 0x9c, 0xe1, 0x8b, 0xbc, 0x20, 0x06, 0xb2, 0x2a, 0xfe, 0x10, 0x1a, - 0xdf, 0xfa, 0x93, 0xf3, 0xef, 0x17, 0x31, 0x35, 0x9b, 0x7a, 0x15, 0xd9, 0x07, 0xe1, 0x4f, 0x5c, - 0x47, 0x2e, 0x62, 0x8a, 0x4b, 0x58, 0x51, 0xaf, 0x2e, 0xb2, 0xbd, 0x9a, 0xb0, 0xa2, 0xce, 0x43, - 0x27, 0xfb, 0x2c, 0x71, 0x09, 0xa3, 0x77, 0xa1, 0x76, 0x75, 0x81, 0x59, 0x40, 0x33, 0x01, 0xdb, - 0xad, 0x34, 0xb1, 0xea, 0xf3, 0xd0, 0xe1, 0x2c, 0xa0, 0x38, 0x87, 0xd0, 0xc7, 0xd0, 0x3e, 0x0f, - 0xd8, 0xcc, 0x7b, 0xc6, 0xd9, 0xdc, 0xf7, 0x28, 0xd7, 0x4a, 0x6e, 0xda, 0x28, 0x4d, 0xac, 0x8e, - 0xab, 0x00, 0x27, 0xce, 0x11, 0xbc, 0x49, 0x44, 0xf7, 0x01, 0xae, 0x03, 0x46, 0xa4, 0xee, 0xd0, - 0x6c, 0xeb, 0xf9, 0x9b, 0x3a, 0xa2, 0x1b, 0x3d, 0x87, 0xe6, 0x33, 0xce, 0x5c, 0x2a, 0x04, 0x15, - 0x66, 0xa7, 0x57, 0xb9, 0x65, 0xa5, 0x39, 0x9e, 0x4d, 0x10, 0x17, 0x64, 0xbc, 0xca, 0xeb, 0x3f, - 0x80, 0x7a, 0xee, 0xa0, 0x77, 0xa0, 0xba, 0x12, 0x90, 0xdd, 0x48, 0x13, 0x4b, 0xfb, 0x58, 0xff, - 0xf6, 0x7f, 0x82, 0x7a, 0x7e, 0x41, 0xe8, 0x12, 0xc0, 0x8f, 0x24, 0xe5, 0xd7, 0xc4, 0xa5, 0xea, - 0xfd, 0x53, 0x95, 0xad, 0xdb, 0x2f, 0xf3, 0xeb, 0x82, 0x67, 0x23, 0x75, 0xab, 0xea, 0x5d, 0x59, - 0xa5, 0xe2, 0x35, 0xbb, 0x1f, 0xc1, 0xc1, 0x76, 0x8e, 0xba, 0xfa, 0x35, 0x49, 0x6b, 0x1b, 0xdd, - 0x83, 0x4a, 0x48, 0xdc, 0x5c, 0xcf, 0xf5, 0x65, 0x62, 0x55, 0x2e, 0xce, 0xce, 0xb1, 0x8a, 0xa1, - 0xf7, 0xa0, 0x49, 0x3c, 0x8f, 0x67, 0x0b, 0xa9, 0xe8, 0xb7, 0x52, 0x0f, 0x5e, 0x06, 0xf1, 0xca, - 0xec, 0x3f, 0x82, 0xce, 0xe6, 0x13, 0x85, 0x4c, 0xa8, 0xe7, 0x9f, 0x5f, 0x5e, 0xb0, 0x70, 0xed, - 0xde, 0x7f, 0xff, 0x74, 0x8d, 0x97, 0xcb, 0xae, 0xf1, 0xe7, 0xb2, 0x6b, 0xbc, 0x5a, 0x76, 0x8d, - 0xd7, 0xcb, 0xae, 0xf1, 0xf7, 0xb2, 0x6b, 0xfc, 0xf1, 0x6f, 0x77, 0xe7, 0xc7, 0xdd, 0xf9, 0x78, - 0x52, 0xd3, 0x7f, 0x13, 0xa7, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x26, 0x95, 0x6f, 0xf0, 0xd3, - 0x06, 0x00, 0x00, -} - -func (this *Entity) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Entity) - if !ok { - that2, ok := that.(Entity) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.EntityClass != that1.EntityClass { - return false - } - if !this.System.Equal(&that1.System) { - return false - } - if len(this.Subscriptions) != len(that1.Subscriptions) { - return false - } - for i := range this.Subscriptions { - if this.Subscriptions[i] != that1.Subscriptions[i] { - return false - } - } - if this.LastSeen != that1.LastSeen { - return false - } - if this.Deregister != that1.Deregister { - return false - } - if !this.Deregistration.Equal(&that1.Deregistration) { - return false - } - if this.User != that1.User { - return false - } - if !bytes.Equal(this.ExtendedAttributes, that1.ExtendedAttributes) { - return false - } - if len(this.Redact) != len(that1.Redact) { - return false - } - for i := range this.Redact { - if this.Redact[i] != that1.Redact[i] { - return false - } - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.SensuAgentVersion != that1.SensuAgentVersion { - return false - } - if len(this.KeepaliveHandlers) != len(that1.KeepaliveHandlers) { - return false - } - for i := range this.KeepaliveHandlers { - if this.KeepaliveHandlers[i] != that1.KeepaliveHandlers[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *System) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*System) - if !ok { - that2, ok := that.(System) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Hostname != that1.Hostname { - return false - } - if this.OS != that1.OS { - return false - } - if this.Platform != that1.Platform { - return false - } - if this.PlatformFamily != that1.PlatformFamily { - return false - } - if this.PlatformVersion != that1.PlatformVersion { - return false - } - if !this.Network.Equal(&that1.Network) { - return false - } - if this.Arch != that1.Arch { - return false - } - if this.ARMVersion != that1.ARMVersion { - return false - } - if this.LibCType != that1.LibCType { - return false - } - if this.VMSystem != that1.VMSystem { - return false - } - if this.VMRole != that1.VMRole { - return false - } - if this.CloudProvider != that1.CloudProvider { - return false - } - if this.FloatType != that1.FloatType { - return false - } - if len(this.Processes) != len(that1.Processes) { - return false - } - for i := range this.Processes { - if !this.Processes[i].Equal(that1.Processes[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Process) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Process) - if !ok { - that2, ok := that.(Process) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Network) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Network) - if !ok { - that2, ok := that.(Network) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Interfaces) != len(that1.Interfaces) { - return false - } - for i := range this.Interfaces { - if !this.Interfaces[i].Equal(&that1.Interfaces[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NetworkInterface) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NetworkInterface) - if !ok { - that2, ok := that.(NetworkInterface) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.MAC != that1.MAC { - return false - } - if len(this.Addresses) != len(that1.Addresses) { - return false - } - for i := range this.Addresses { - if this.Addresses[i] != that1.Addresses[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Deregistration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Deregistration) - if !ok { - that2, ok := that.(Deregistration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Handler != that1.Handler { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type EntityFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetEntityClass() string - GetSystem() System - GetSubscriptions() []string - GetLastSeen() int64 - GetDeregister() bool - GetDeregistration() Deregistration - GetUser() string - GetExtendedAttributes() []byte - GetRedact() []string - GetObjectMeta() ObjectMeta - GetSensuAgentVersion() string - GetKeepaliveHandlers() []string -} - -func (this *Entity) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *Entity) TestProto() github_com_golang_protobuf_proto.Message { - return NewEntityFromFace(this) -} - -func (this *Entity) GetEntityClass() string { - return this.EntityClass -} - -func (this *Entity) GetSystem() System { - return this.System -} - -func (this *Entity) GetSubscriptions() []string { - return this.Subscriptions -} - -func (this *Entity) GetLastSeen() int64 { - return this.LastSeen -} - -func (this *Entity) GetDeregister() bool { - return this.Deregister -} - -func (this *Entity) GetDeregistration() Deregistration { - return this.Deregistration -} - -func (this *Entity) GetUser() string { - return this.User -} - -func (this *Entity) GetExtendedAttributes() []byte { - return this.ExtendedAttributes -} - -func (this *Entity) GetRedact() []string { - return this.Redact -} - -func (this *Entity) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *Entity) GetSensuAgentVersion() string { - return this.SensuAgentVersion -} - -func (this *Entity) GetKeepaliveHandlers() []string { - return this.KeepaliveHandlers -} - -func NewEntityFromFace(that EntityFace) *Entity { - this := &Entity{} - this.EntityClass = that.GetEntityClass() - this.System = that.GetSystem() - this.Subscriptions = that.GetSubscriptions() - this.LastSeen = that.GetLastSeen() - this.Deregister = that.GetDeregister() - this.Deregistration = that.GetDeregistration() - this.User = that.GetUser() - this.ExtendedAttributes = that.GetExtendedAttributes() - this.Redact = that.GetRedact() - this.ObjectMeta = that.GetObjectMeta() - this.SensuAgentVersion = that.GetSensuAgentVersion() - this.KeepaliveHandlers = that.GetKeepaliveHandlers() - return this -} - -func (m *Entity) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Entity) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Entity) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.KeepaliveHandlers) > 0 { - for iNdEx := len(m.KeepaliveHandlers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.KeepaliveHandlers[iNdEx]) - copy(dAtA[i:], m.KeepaliveHandlers[iNdEx]) - i = encodeVarintEntity(dAtA, i, uint64(len(m.KeepaliveHandlers[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - } - if len(m.SensuAgentVersion) > 0 { - i -= len(m.SensuAgentVersion) - copy(dAtA[i:], m.SensuAgentVersion) - i = encodeVarintEntity(dAtA, i, uint64(len(m.SensuAgentVersion))) - i-- - dAtA[i] = 0x7a - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEntity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - if len(m.Redact) > 0 { - for iNdEx := len(m.Redact) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Redact[iNdEx]) - copy(dAtA[i:], m.Redact[iNdEx]) - i = encodeVarintEntity(dAtA, i, uint64(len(m.Redact[iNdEx]))) - i-- - dAtA[i] = 0x6a - } - } - if len(m.ExtendedAttributes) > 0 { - i -= len(m.ExtendedAttributes) - copy(dAtA[i:], m.ExtendedAttributes) - i = encodeVarintEntity(dAtA, i, uint64(len(m.ExtendedAttributes))) - i-- - dAtA[i] = 0x62 - } - if len(m.User) > 0 { - i -= len(m.User) - copy(dAtA[i:], m.User) - i = encodeVarintEntity(dAtA, i, uint64(len(m.User))) - i-- - dAtA[i] = 0x5a - } - { - size, err := m.Deregistration.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEntity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - if m.Deregister { - i-- - if m.Deregister { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.LastSeen != 0 { - i = encodeVarintEntity(dAtA, i, uint64(m.LastSeen)) - i-- - dAtA[i] = 0x28 - } - if len(m.Subscriptions) > 0 { - for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Subscriptions[iNdEx]) - copy(dAtA[i:], m.Subscriptions[iNdEx]) - i = encodeVarintEntity(dAtA, i, uint64(len(m.Subscriptions[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - { - size, err := m.System.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEntity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.EntityClass) > 0 { - i -= len(m.EntityClass) - copy(dAtA[i:], m.EntityClass) - i = encodeVarintEntity(dAtA, i, uint64(len(m.EntityClass))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *System) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *System) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *System) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Processes) > 0 { - for iNdEx := len(m.Processes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Processes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEntity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - } - if len(m.FloatType) > 0 { - i -= len(m.FloatType) - copy(dAtA[i:], m.FloatType) - i = encodeVarintEntity(dAtA, i, uint64(len(m.FloatType))) - i-- - dAtA[i] = 0x6a - } - if len(m.CloudProvider) > 0 { - i -= len(m.CloudProvider) - copy(dAtA[i:], m.CloudProvider) - i = encodeVarintEntity(dAtA, i, uint64(len(m.CloudProvider))) - i-- - dAtA[i] = 0x62 - } - if len(m.VMRole) > 0 { - i -= len(m.VMRole) - copy(dAtA[i:], m.VMRole) - i = encodeVarintEntity(dAtA, i, uint64(len(m.VMRole))) - i-- - dAtA[i] = 0x5a - } - if len(m.VMSystem) > 0 { - i -= len(m.VMSystem) - copy(dAtA[i:], m.VMSystem) - i = encodeVarintEntity(dAtA, i, uint64(len(m.VMSystem))) - i-- - dAtA[i] = 0x52 - } - if len(m.LibCType) > 0 { - i -= len(m.LibCType) - copy(dAtA[i:], m.LibCType) - i = encodeVarintEntity(dAtA, i, uint64(len(m.LibCType))) - i-- - dAtA[i] = 0x4a - } - if m.ARMVersion != 0 { - i = encodeVarintEntity(dAtA, i, uint64(m.ARMVersion)) - i-- - dAtA[i] = 0x40 - } - if len(m.Arch) > 0 { - i -= len(m.Arch) - copy(dAtA[i:], m.Arch) - i = encodeVarintEntity(dAtA, i, uint64(len(m.Arch))) - i-- - dAtA[i] = 0x3a - } - { - size, err := m.Network.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEntity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - if len(m.PlatformVersion) > 0 { - i -= len(m.PlatformVersion) - copy(dAtA[i:], m.PlatformVersion) - i = encodeVarintEntity(dAtA, i, uint64(len(m.PlatformVersion))) - i-- - dAtA[i] = 0x2a - } - if len(m.PlatformFamily) > 0 { - i -= len(m.PlatformFamily) - copy(dAtA[i:], m.PlatformFamily) - i = encodeVarintEntity(dAtA, i, uint64(len(m.PlatformFamily))) - i-- - dAtA[i] = 0x22 - } - if len(m.Platform) > 0 { - i -= len(m.Platform) - copy(dAtA[i:], m.Platform) - i = encodeVarintEntity(dAtA, i, uint64(len(m.Platform))) - i-- - dAtA[i] = 0x1a - } - if len(m.OS) > 0 { - i -= len(m.OS) - copy(dAtA[i:], m.OS) - i = encodeVarintEntity(dAtA, i, uint64(len(m.OS))) - i-- - dAtA[i] = 0x12 - } - if len(m.Hostname) > 0 { - i -= len(m.Hostname) - copy(dAtA[i:], m.Hostname) - i = encodeVarintEntity(dAtA, i, uint64(len(m.Hostname))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Process) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Process) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Process) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintEntity(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Network) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Network) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Network) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Interfaces) > 0 { - for iNdEx := len(m.Interfaces) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Interfaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEntity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *NetworkInterface) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkInterface) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetworkInterface) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintEntity(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.MAC) > 0 { - i -= len(m.MAC) - copy(dAtA[i:], m.MAC) - i = encodeVarintEntity(dAtA, i, uint64(len(m.MAC))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintEntity(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Deregistration) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Deregistration) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Deregistration) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Handler) > 0 { - i -= len(m.Handler) - copy(dAtA[i:], m.Handler) - i = encodeVarintEntity(dAtA, i, uint64(len(m.Handler))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEntity(dAtA []byte, offset int, v uint64) int { - offset -= sovEntity(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedEntity(r randyEntity, easy bool) *Entity { - this := &Entity{} - this.EntityClass = string(randStringEntity(r)) - v1 := NewPopulatedSystem(r, easy) - this.System = *v1 - v2 := r.Intn(10) - this.Subscriptions = make([]string, v2) - for i := 0; i < v2; i++ { - this.Subscriptions[i] = string(randStringEntity(r)) - } - this.LastSeen = int64(r.Int63()) - if r.Intn(2) == 0 { - this.LastSeen *= -1 - } - this.Deregister = bool(bool(r.Intn(2) == 0)) - v3 := NewPopulatedDeregistration(r, easy) - this.Deregistration = *v3 - this.User = string(randStringEntity(r)) - v4 := r.Intn(100) - this.ExtendedAttributes = make([]byte, v4) - for i := 0; i < v4; i++ { - this.ExtendedAttributes[i] = byte(r.Intn(256)) - } - v5 := r.Intn(10) - this.Redact = make([]string, v5) - for i := 0; i < v5; i++ { - this.Redact[i] = string(randStringEntity(r)) - } - v6 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v6 - this.SensuAgentVersion = string(randStringEntity(r)) - v7 := r.Intn(10) - this.KeepaliveHandlers = make([]string, v7) - for i := 0; i < v7; i++ { - this.KeepaliveHandlers[i] = string(randStringEntity(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEntity(r, 17) - } - return this -} - -func NewPopulatedSystem(r randyEntity, easy bool) *System { - this := &System{} - this.Hostname = string(randStringEntity(r)) - this.OS = string(randStringEntity(r)) - this.Platform = string(randStringEntity(r)) - this.PlatformFamily = string(randStringEntity(r)) - this.PlatformVersion = string(randStringEntity(r)) - v8 := NewPopulatedNetwork(r, easy) - this.Network = *v8 - this.Arch = string(randStringEntity(r)) - this.ARMVersion = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ARMVersion *= -1 - } - this.LibCType = string(randStringEntity(r)) - this.VMSystem = string(randStringEntity(r)) - this.VMRole = string(randStringEntity(r)) - this.CloudProvider = string(randStringEntity(r)) - this.FloatType = string(randStringEntity(r)) - if r.Intn(5) != 0 { - v9 := r.Intn(5) - this.Processes = make([]*Process, v9) - for i := 0; i < v9; i++ { - this.Processes[i] = NewPopulatedProcess(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEntity(r, 15) - } - return this -} - -func NewPopulatedProcess(r randyEntity, easy bool) *Process { - this := &Process{} - this.Name = string(randStringEntity(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEntity(r, 2) - } - return this -} - -func NewPopulatedNetwork(r randyEntity, easy bool) *Network { - this := &Network{} - if r.Intn(5) != 0 { - v10 := r.Intn(5) - this.Interfaces = make([]NetworkInterface, v10) - for i := 0; i < v10; i++ { - v11 := NewPopulatedNetworkInterface(r, easy) - this.Interfaces[i] = *v11 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEntity(r, 2) - } - return this -} - -func NewPopulatedNetworkInterface(r randyEntity, easy bool) *NetworkInterface { - this := &NetworkInterface{} - this.Name = string(randStringEntity(r)) - this.MAC = string(randStringEntity(r)) - v12 := r.Intn(10) - this.Addresses = make([]string, v12) - for i := 0; i < v12; i++ { - this.Addresses[i] = string(randStringEntity(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEntity(r, 4) - } - return this -} - -func NewPopulatedDeregistration(r randyEntity, easy bool) *Deregistration { - this := &Deregistration{} - this.Handler = string(randStringEntity(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEntity(r, 2) - } - return this -} - -type randyEntity interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneEntity(r randyEntity) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringEntity(r randyEntity) string { - v13 := r.Intn(100) - tmps := make([]rune, v13) - for i := 0; i < v13; i++ { - tmps[i] = randUTF8RuneEntity(r) - } - return string(tmps) -} -func randUnrecognizedEntity(r randyEntity, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldEntity(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldEntity(dAtA []byte, r randyEntity, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateEntity(dAtA, uint64(key)) - v14 := r.Int63() - if r.Intn(2) == 0 { - v14 *= -1 - } - dAtA = encodeVarintPopulateEntity(dAtA, uint64(v14)) - case 1: - dAtA = encodeVarintPopulateEntity(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateEntity(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateEntity(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateEntity(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateEntity(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Entity) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.EntityClass) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = m.System.Size() - n += 1 + l + sovEntity(uint64(l)) - if len(m.Subscriptions) > 0 { - for _, s := range m.Subscriptions { - l = len(s) - n += 1 + l + sovEntity(uint64(l)) - } - } - if m.LastSeen != 0 { - n += 1 + sovEntity(uint64(m.LastSeen)) - } - if m.Deregister { - n += 2 - } - l = m.Deregistration.Size() - n += 1 + l + sovEntity(uint64(l)) - l = len(m.User) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = len(m.ExtendedAttributes) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - if len(m.Redact) > 0 { - for _, s := range m.Redact { - l = len(s) - n += 1 + l + sovEntity(uint64(l)) - } - } - l = m.ObjectMeta.Size() - n += 1 + l + sovEntity(uint64(l)) - l = len(m.SensuAgentVersion) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - if len(m.KeepaliveHandlers) > 0 { - for _, s := range m.KeepaliveHandlers { - l = len(s) - n += 2 + l + sovEntity(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *System) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hostname) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = len(m.OS) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = len(m.Platform) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = len(m.PlatformFamily) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = len(m.PlatformVersion) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = m.Network.Size() - n += 1 + l + sovEntity(uint64(l)) - l = len(m.Arch) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - if m.ARMVersion != 0 { - n += 1 + sovEntity(uint64(m.ARMVersion)) - } - l = len(m.LibCType) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = len(m.VMSystem) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = len(m.VMRole) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = len(m.CloudProvider) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = len(m.FloatType) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - if len(m.Processes) > 0 { - for _, e := range m.Processes { - l = e.Size() - n += 1 + l + sovEntity(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Process) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Network) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Interfaces) > 0 { - for _, e := range m.Interfaces { - l = e.Size() - n += 1 + l + sovEntity(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NetworkInterface) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - l = len(m.MAC) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) - n += 1 + l + sovEntity(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Deregistration) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Handler) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovEntity(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEntity(x uint64) (n int) { - return sovEntity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Entity) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Entity: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Entity: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EntityClass", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EntityClass = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field System", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.System.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subscriptions = append(m.Subscriptions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastSeen", wireType) - } - m.LastSeen = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastSeen |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deregister", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Deregister = bool(v != 0) - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deregistration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Deregistration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendedAttributes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExtendedAttributes = append(m.ExtendedAttributes[:0], dAtA[iNdEx:postIndex]...) - if m.ExtendedAttributes == nil { - m.ExtendedAttributes = []byte{} - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redact", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Redact = append(m.Redact, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SensuAgentVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SensuAgentVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeepaliveHandlers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeepaliveHandlers = append(m.KeepaliveHandlers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEntity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEntity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *System) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: System: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: System: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hostname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OS", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OS = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Platform = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PlatformFamily", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PlatformFamily = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PlatformVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PlatformVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Network.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Arch", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Arch = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ARMVersion", wireType) - } - m.ARMVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ARMVersion |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LibCType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LibCType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VMSystem", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VMSystem = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VMRole", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VMRole = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CloudProvider", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CloudProvider = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FloatType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FloatType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Processes = append(m.Processes, &Process{}) - if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEntity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEntity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Process) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Process: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Process: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEntity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEntity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Network) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Network: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Network: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interfaces", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Interfaces = append(m.Interfaces, NetworkInterface{}) - if err := m.Interfaces[len(m.Interfaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEntity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEntity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetworkInterface) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkInterface: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkInterface: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MAC", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MAC = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEntity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEntity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Deregistration) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Deregistration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Deregistration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handler", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Handler = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEntity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEntity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEntity(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEntity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEntity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEntity - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEntity - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEntity - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEntity - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEntity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEntity = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEntity = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/entity.proto b/api/core/v2/entity.proto deleted file mode 100644 index 4b67c814a7..0000000000 --- a/api/core/v2/entity.proto +++ /dev/null @@ -1,91 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// Entity is the Entity supplying the event. The default Entity for any -// Event is the running Agent process--if the Event is sent by an Agent. -message Entity { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - string entity_class = 1 [ (gogoproto.jsontag) = "entity_class" ]; - System system = 3 [ (gogoproto.nullable) = false ]; - repeated string subscriptions = 4 [ (gogoproto.jsontag) = "subscriptions" ]; - int64 last_seen = 5 [ (gogoproto.jsontag) = "last_seen" ]; - bool deregister = 6 [ (gogoproto.jsontag) = "deregister" ]; - Deregistration deregistration = 7 [ (gogoproto.nullable) = false ]; - string user = 11; - // ExtendedAttributes store serialized arbitrary JSON-encoded data - bytes extended_attributes = 12 [ (gogoproto.jsontag) = "-" ]; - // Redact contains the fields to redact on the agent - repeated string redact = 13; - // Metadata contains the name, namespace, labels and annotations of the - // entity - ObjectMeta metadata = 14 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - // SensuAgentVersion is the sensu-agent version. - string sensu_agent_version = 15 [ (gogoproto.jsontag) = "sensu_agent_version" ]; - // KeepaliveHandlers contains a list of handlers to use for the entity's - // keepalive events - repeated string keepalive_handlers = 16; -} - -// System contains information about the system that the Agent process -// is running on, used for additional Entity context. -message System { - string hostname = 1; - string os = 2 [ (gogoproto.customname) = "OS" ]; - string platform = 3; - string platform_family = 4; - string platform_version = 5; - Network network = 6 [ (gogoproto.nullable) = false ]; - string arch = 7; - int32 arm_version = 8 [ (gogoproto.customname) = "ARMVersion" ]; - - // LibCType indicates the type of libc the agent has access to (glibc, musl, - // etc) - string LibCType = 9 [ (gogoproto.jsontag) = "libc_type" ]; - - // VMSystem indicates the VM system of the agent (kvm, vbox, etc) - string VMSystem = 10 [ (gogoproto.jsontag) = "vm_system" ]; - - // VMRole indicates the VM role of the agent (host/guest) - string VMRole = 11 [ (gogoproto.jsontag) = "vm_role" ]; - - // CloudProvider indicates the public cloud the agent is running on. - string CloudProvider = 12 [ (gogoproto.jsontag) = "cloud_provider" ]; - - string float_type = 13; - - // Processes contains information about the local processes on the agent. - repeated Process Processes = 14 [ (gogoproto.jsontag) = "processes" ]; -} - -// Process contains information about a local process. -message Process { string name = 1 [ (gogoproto.jsontag) = "name" ]; } - -// Network contains information about the system network interfaces -// that the Agent process is running on, used for additional Entity -// context. -message Network { repeated NetworkInterface interfaces = 1 [ (gogoproto.jsontag) = "interfaces", (gogoproto.nullable) = false ]; } - -// NetworkInterface contains information about a system network -// interface. -message NetworkInterface { - string name = 1; - string mac = 2 [ (gogoproto.customname) = "MAC" ]; - repeated string addresses = 3 [ (gogoproto.jsontag) = "addresses" ]; -} - -// Deregistration contains configuration for Sensu entity de-registration. -message Deregistration { string handler = 1; } diff --git a/api/core/v2/entity_sort.go b/api/core/v2/entity_sort.go deleted file mode 100644 index 8aaeeb4be0..0000000000 --- a/api/core/v2/entity_sort.go +++ /dev/null @@ -1,79 +0,0 @@ -package v2 - -import ( - "fmt" - "sort" -) - -const ( - EntitySortName = "NAME" - EntitySortLastSeen = "LAST_SEEN" -) - -func SortEntities(entities []*Entity, ordering string, desc bool) { - if len(ordering) == 0 { - return - } - - var sortIf sort.Interface - switch ordering { - case EntitySortName: - sortIf = SortEntitiesByID(entities, !desc) - case EntitySortLastSeen: - sortIf = SortEntitiesByLastSeen(entities, !desc) - default: - panic(fmt.Sprintf("SortEntities: unknown order: %s", ordering)) - } - - sort.Sort(sortIf) -} - -// SortEntitiesByPredicate can be used to sort a given collection using a given -// predicate. -func SortEntitiesByPredicate(es []*Entity, fn func(a, b *Entity) bool) sort.Interface { - return &entitySorter{entities: es, byFn: fn} -} - -// SortEntitiesByID can be used to sort a given collection of entities by their -// IDs. -func SortEntitiesByID(es []*Entity, asc bool) sort.Interface { - if asc { - return SortEntitiesByPredicate(es, func(a, b *Entity) bool { - return a.Name < b.Name - }) - } - return SortEntitiesByPredicate(es, func(a, b *Entity) bool { - return a.Name > b.Name - }) -} - -// SortEntitiesByLastSeen can be used to sort a given collection of entities by -// last time each was seen. -func SortEntitiesByLastSeen(es []*Entity, asc bool) sort.Interface { - return SortEntitiesByPredicate(es, func(a, b *Entity) bool { - if asc { - return a.LastSeen < b.LastSeen - } - return a.LastSeen > b.LastSeen - }) -} - -type entitySorter struct { - entities []*Entity - byFn func(a, b *Entity) bool -} - -// Len implements sort.Interface. -func (s *entitySorter) Len() int { - return len(s.entities) -} - -// Swap implements sort.Interface. -func (s *entitySorter) Swap(i, j int) { - s.entities[i], s.entities[j] = s.entities[j], s.entities[i] -} - -// Less implements sort.Interface. -func (s *entitySorter) Less(i, j int) bool { - return s.byFn(s.entities[i], s.entities[j]) -} diff --git a/api/core/v2/entity_sort_test.go b/api/core/v2/entity_sort_test.go deleted file mode 100644 index 628274560d..0000000000 --- a/api/core/v2/entity_sort_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package v2 - -import ( - "sort" - testing "testing" - - "github.com/stretchr/testify/assert" -) - -func TestSortEntitiesByID(t *testing.T) { - a := FixtureEntity("Abernathy") - b := FixtureEntity("Bernard") - c := FixtureEntity("Clementine") - d := FixtureEntity("Dolores") - - testCases := []struct { - name string - asc bool - inRecords []*Entity - expected []*Entity - }{ - { - name: "Sorts ascending", - asc: true, - inRecords: []*Entity{d, c, a, b}, - expected: []*Entity{a, b, c, d}, - }, - { - name: "Sorts descending", - asc: false, - inRecords: []*Entity{d, a, c, b}, - expected: []*Entity{d, c, b, a}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - sort.Sort(SortEntitiesByID(tc.inRecords, tc.asc)) - assert.EqualValues(t, tc.expected, tc.inRecords) - }) - } -} - -func TestSortEntitiesByLastSeen(t *testing.T) { - a := FixtureEntity("Abernathy") - a.LastSeen = 4 - b := FixtureEntity("Bernard") - b.LastSeen = 3 - c := FixtureEntity("Clementine") - c.LastSeen = 2 - d := FixtureEntity("Dolores") - d.LastSeen = 1 - - testCases := []struct { - name string - asc bool - inRecords []*Entity - expected []*Entity - }{ - { - name: "Sorts descending", - asc: false, - inRecords: []*Entity{d, a, c, b}, - expected: []*Entity{a, b, c, d}, - }, - { - name: "Sorts ascending", - asc: true, - inRecords: []*Entity{d, a, c, b}, - expected: []*Entity{d, c, b, a}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - sort.Sort(SortEntitiesByLastSeen(tc.inRecords, tc.asc)) - assert.EqualValues(t, tc.expected, tc.inRecords) - }) - } -} diff --git a/api/core/v2/entity_test.go b/api/core/v2/entity_test.go deleted file mode 100644 index 8f027d4c5c..0000000000 --- a/api/core/v2/entity_test.go +++ /dev/null @@ -1,123 +0,0 @@ -package v2 - -import ( - "encoding/json" - "reflect" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestEntityValidate(t *testing.T) { - var e Entity - - // Invalid ID - assert.Error(t, e.Validate()) - e.Name = "foo" - - // Invalid class - assert.Error(t, e.Validate()) - e.EntityClass = "agent" - - // Invalid namespace - assert.Error(t, e.Validate()) - e.Namespace = "default" - - // Valid entity - assert.NoError(t, e.Validate()) -} - -func TestFixtureEntityIsValid(t *testing.T) { - e := FixtureEntity("entity") - assert.Equal(t, "entity", e.Name) - assert.NoError(t, e.Validate()) -} - -func TestEntityUnmarshal(t *testing.T) { - entity := Entity{} - - // Unmarshal - err := json.Unmarshal([]byte(`{"metadata": {"name": "myAgent"}}`), &entity) - require.NoError(t, err) - - // Existing exported fields were properly set - assert.Equal(t, "myAgent", entity.Name) -} - -func TestEntityMarshal(t *testing.T) { - entity := FixtureEntity("myAgent") - - bytes, err := json.Marshal(entity) - require.NoError(t, err) - assert.Contains(t, string(bytes), "myAgent") -} - -func TestEntityFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureEntity("ap-007"), - wantKey: "entity.name", - want: "ap-007", - }, - { - name: "exposes deregister", - args: &Entity{Deregister: true}, - wantKey: "entity.deregister", - want: "true", - }, - { - name: "exposes labels", - args: &Entity{ - ObjectMeta: ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "entity.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("Entity.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} - -func TestAddEntitySubscription(t *testing.T) { - tests := []struct { - name string - entityName string - subscriptions []string - want []string - }{ - { - name: "the entity subscription is added if missing", - entityName: "foo", - subscriptions: []string{}, - want: []string{"entity:foo"}, - }, - { - name: "the entity subscription is not added if already present", - entityName: "foo", - subscriptions: []string{"entity:foo"}, - want: []string{"entity:foo"}, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := AddEntitySubscription(tt.entityName, tt.subscriptions); !reflect.DeepEqual(got, tt.want) { - t.Errorf("addEntitySubscription() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/api/core/v2/entitypb_test.go b/api/core/v2/entitypb_test.go deleted file mode 100644 index 1afddad13c..0000000000 --- a/api/core/v2/entitypb_test.go +++ /dev/null @@ -1,775 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/entity.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestEntityProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntity(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Entity{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestEntityMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntity(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Entity{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSystemProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSystem(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &System{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSystemMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSystem(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &System{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProcessProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Process{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestProcessMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Process{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNetworkProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetwork(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Network{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNetworkMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetwork(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Network{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNetworkInterfaceProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInterface(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NetworkInterface{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNetworkInterfaceMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInterface(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NetworkInterface{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeregistrationProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeregistration(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Deregistration{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeregistrationMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeregistration(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Deregistration{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEntityJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntity(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Entity{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSystemJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSystem(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &System{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProcessJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Process{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNetworkJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetwork(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Network{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNetworkInterfaceJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInterface(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NetworkInterface{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDeregistrationJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeregistration(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Deregistration{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestEntityProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntity(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Entity{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEntityProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntity(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Entity{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSystemProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSystem(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &System{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSystemProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSystem(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &System{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProcessProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Process{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProcessProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Process{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNetworkProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetwork(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Network{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNetworkProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetwork(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Network{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNetworkInterfaceProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInterface(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &NetworkInterface{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNetworkInterfaceProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInterface(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &NetworkInterface{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeregistrationProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeregistration(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Deregistration{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDeregistrationProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeregistration(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Deregistration{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEntityFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEntity(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestEntitySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntity(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSystemSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSystem(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestProcessSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedProcess(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestNetworkSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetwork(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestNetworkInterfaceSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNetworkInterface(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDeregistrationSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDeregistration(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/env_vars.go b/api/core/v2/env_vars.go deleted file mode 100644 index f59957caa5..0000000000 --- a/api/core/v2/env_vars.go +++ /dev/null @@ -1,41 +0,0 @@ -package v2 - -import ( - "errors" - "strings" -) - -func validateVar(v string) error { - parts := strings.SplitN(v, "=", 2) - if len(parts) != 2 { - return errors.New("environment variables must be of the form FOO=BAR") - } - if len(parts[0]) == 0 || len(parts[1]) == 0 { - return errors.New("environment variables must be of the form FOO=BAR") - } - return nil -} - -// ValidateEnvVars ensures that all the environment variables are well-formed. -// Vars should be of the form FOO=BAR. -func ValidateEnvVars(vars []string) error { - for _, v := range vars { - if err := validateVar(v); err != nil { - return err - } - } - return nil -} - -// EnvVarsToMap converts a list of FOO=BAR key-value pairs into a map. -func EnvVarsToMap(vars []string) map[string]string { - result := make(map[string]string, len(vars)) - for _, v := range vars { - parts := strings.SplitN(v, "=", 2) - if len(parts) == 1 { - continue - } - result[parts[0]] = parts[1] - } - return result -} diff --git a/api/core/v2/env_vars_test.go b/api/core/v2/env_vars_test.go deleted file mode 100644 index 5b73c6a7ab..0000000000 --- a/api/core/v2/env_vars_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package v2 - -import ( - "reflect" - "testing" -) - -func TestValidateEnvVars(t *testing.T) { - tests := []struct { - Name string - EnvVars []string - ExpError bool - }{ - { - Name: "empty", - }, - { - Name: "it should work", - EnvVars: []string{"FOO=BAR", "BAZ=FOOBAR"}, - }, - { - Name: "it should not work", - EnvVars: []string{"FOO=BAR", "foo:bar"}, - ExpError: true, - }, - { - Name: "it allows the equal sign in values", - EnvVars: []string{"FOO=BAR=BAZ"}, - ExpError: false, - }, - { - Name: "it requires a key and a value", - EnvVars: []string{"FOO="}, - ExpError: true, - }, - } - - for _, test := range tests { - t.Run(test.Name, func(t *testing.T) { - err := ValidateEnvVars(test.EnvVars) - if test.ExpError && err == nil { - t.Fatal("expected error") - } - if !test.ExpError && err != nil { - t.Fatal(err) - } - }) - } -} - -func TestEnvVarsToMap(t *testing.T) { - tests := []struct { - Name string - EnvVars []string - Exp map[string]string - }{ - { - Name: "empty", - Exp: map[string]string{}, - }, - { - Name: "no invalid", - EnvVars: []string{"FOO=BAR", "BAZ=FOOBAR"}, - Exp: map[string]string{"FOO": "BAR", "BAZ": "FOOBAR"}, - }, - { - Name: "some invalid", - EnvVars: []string{"FOO=BAR", "foo:bar"}, - Exp: map[string]string{"FOO": "BAR"}, - }, - } - - for _, test := range tests { - t.Run(test.Name, func(t *testing.T) { - m := EnvVarsToMap(test.EnvVars) - if got, want := m, test.Exp; !reflect.DeepEqual(got, want) { - t.Fatalf("bad result: got %v, want %v", got, want) - } - }) - } -} diff --git a/api/core/v2/event.go b/api/core/v2/event.go deleted file mode 100644 index 0f7d175087..0000000000 --- a/api/core/v2/event.go +++ /dev/null @@ -1,467 +0,0 @@ -package v2 - -import ( - "encoding/json" - "errors" - "fmt" - "net/url" - "path" - "strconv" - "strings" - "time" - - "github.com/google/uuid" - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // EventsResource is the name of this resource type - EventsResource = "events" - - // EventFailingState indicates failing check result status - EventFailingState = "failing" - - // EventFlappingState indicates a rapid change in check result status - EventFlappingState = "flapping" - - // EventPassingState indicates successful check result status - EventPassingState = "passing" -) - -// StorePrefix returns the path prefix to this resource in the store -func (e *Event) StorePrefix() string { - return EventsResource -} - -// URIPath returns the path component of an event URI. -func (e *Event) URIPath() string { - if !e.HasCheck() && e.Entity == nil { - return path.Join(URLPrefix, EventsResource) - } - if !e.HasCheck() { - return path.Join(URLPrefix, "namespaces", url.PathEscape(e.Entity.Namespace), EventsResource, url.PathEscape(e.Entity.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(e.Entity.Namespace), EventsResource, url.PathEscape(e.Entity.Name), url.PathEscape(e.Check.Name)) -} - -// Validate returns an error if the event does not pass validation tests. -func (e *Event) Validate() error { - if e.Entity == nil { - return errors.New("event must contain an entity") - } - - if !e.HasCheck() && !e.HasMetrics() { - return errors.New("event must contain a check or metrics") - } - - if err := e.Entity.Validate(); err != nil { - return errors.New("entity is invalid: " + err.Error()) - } - - if e.HasCheck() { - if err := e.Check.Validate(); err != nil { - return errors.New("check is invalid: " + err.Error()) - } - } - - if e.HasMetrics() { - if err := e.Metrics.Validate(); err != nil { - return errors.New("metrics are invalid: " + err.Error()) - } - } - - for _, pipeline := range e.Pipelines { - if err := e.validatePipelineReference(pipeline); err != nil { - return errors.New("pipeline reference is invalid: " + err.Error()) - } - } - - if e.Name != "" { - return errors.New("events cannot be named") - } - - if len(e.ID) > 0 { - if _, err := uuid.FromBytes(e.ID); err != nil { - return fmt.Errorf("event ID is invalid: %s", err) - } - } - - return nil -} - -// HasCheck determines if an event has check data. -func (e *Event) HasCheck() bool { - return e.Check != nil -} - -// HasCheckHandlers determines if an event has one or more check handlers. -func (e *Event) HasCheckHandlers() bool { - if e.HasCheck() && len(e.Check.Handlers) > 0 { - return true - } - return false -} - -// HasMetrics determines if an event has metric data. -func (e *Event) HasMetrics() bool { - return e.Metrics != nil -} - -// HasMetricHandlers determines if an event has one or more metric handlers. -func (e *Event) HasMetricHandlers() bool { - if e.HasMetrics() && len(e.Metrics.Handlers) > 0 { - return true - } - return false -} - -// HasHandlers determines if an event has one or more check or metric handlers. -func (e *Event) HasHandlers() bool { - if e.HasCheckHandlers() || e.HasMetricHandlers() { - return true - } - return false -} - -// IsIncident determines if an event indicates an incident. -func (e *Event) IsIncident() bool { - return e.HasCheck() && e.Check.Status != 0 -} - -// IsResolution returns true if an event has just transitionned from an incident -func (e *Event) IsResolution() bool { - if !e.HasCheck() { - return false - } - - // Try to retrieve the previous status in the check history and verify if it - // was a non-zero status, therefore indicating a resolution. The current event - // has already been added to the check history by eventd so we must retrieve - // the second to the last - previous := e.previousOccurrence() - return previous != nil && previous.Status != 0 && !e.IsIncident() -} - -// IsSilenced determines if an event has any silenced entries -func (e *Event) IsSilenced() bool { - if !e.HasCheck() { - return false - } - - return len(e.Check.Silenced) > 0 -} - -// IsFlappingStart determines if an event started flapping on this occurrence. -func (e *Event) IsFlappingStart() bool { - if !e.HasCheck() { - return false - } - - previous := e.previousOccurrence() - return previous != nil && !previous.Flapping && e.Check.State == EventFlappingState -} - -// IsFlappingEnd determines if an event stopped flapping on this occurrence. -func (e *Event) IsFlappingEnd() bool { - if !e.HasCheck() { - return false - } - - previous := e.previousOccurrence() - return previous != nil && previous.Flapping && e.Check.State != EventFlappingState -} - -// previousOccurrence returns the most recent CheckHistory item, excluding the current event. -func (e *Event) previousOccurrence() *CheckHistory { - if !e.HasCheck() || len(e.Check.History) < 2 { - return nil - } - return e.Check.previousOccurrence() -} - -// SynthesizeExtras implements dynamic.SynthesizeExtras -func (e *Event) SynthesizeExtras() map[string]interface{} { - return map[string]interface{}{ - "has_check": e.HasCheck(), - "has_metrics": e.HasMetrics(), - "is_incident": e.IsIncident(), - "is_resolution": e.IsResolution(), - "is_silenced": e.IsSilenced(), - "is_flapping_start": e.IsFlappingStart(), - "is_flapping_end": e.IsFlappingEnd(), - } -} - -// validatePipelineReference validates that a resource reference is capable of -// acting as a pipeline. -func (e *Event) validatePipelineReference(ref *ResourceReference) error { - switch ref.APIVersion { - case "core/v2": - switch ref.Type { - case "Pipeline": - return nil - } - } - return fmt.Errorf("resource type not capable of acting as a pipeline: %s.%s", ref.APIVersion, ref.Type) -} - -// FixtureEvent returns a testing fixture for an Event object. -func FixtureEvent(entityName, checkID string) *Event { - id := uuid.New() - return &Event{ - ObjectMeta: NewObjectMeta("", "default"), - Timestamp: time.Now().Unix(), - Entity: FixtureEntity(entityName), - Check: FixtureCheck(checkID), - ID: id[:], - } -} - -// NewEvent creates a new Event. -func NewEvent(meta ObjectMeta) *Event { - return &Event{ObjectMeta: meta} -} - -// SilencedBy returns the subset of given silences, that silence the event. -func (e *Event) SilencedBy(entries []*Silenced) []*Silenced { - silencedBy := make([]*Silenced, 0, len(entries)) - if !e.HasCheck() { - return silencedBy - } - - // Loop through every silenced entries in order to determine if it applies to - // the given event - for _, entry := range entries { - if e.IsSilencedBy(entry) { - silencedBy = append(silencedBy, entry) - } - } - - return silencedBy -} - -// IsSilencedBy returns true if given silence will silence the event. -func (e *Event) IsSilencedBy(entry *Silenced) bool { - if !e.HasCheck() || entry == nil { - return false - } - - // Make sure the silence has started - now := time.Now().Unix() - if entry.Begin > now { - return false - } - - // Is this event silenced for all subscriptions? (e.g. *:check_cpu) - // Is this event silenced by the entity subscription? (e.g. entity:id:* or entity:id:check_cpu) - // This check being explicit here is probably not strictly necessary, as the presence - // of the `entity:name` subscription seems to be enforced on entity creation, and - // would be handled correctly the the subscription iteration logic below. - if entry.Matches(e.Check.Name, GetEntitySubscription(e.Entity.Name)) { - return true - } - - // Alternatively, check whether any of the subscriptions of the entity match the silence. - // It is not necessary to check the check subscriptions, because they are expected to - // be a subset of the entity subscriptions for proxy entities, and an intersection - // of entity and check subscriptions for non-proxy entities. - // - // Eg a proxy entity may have many subscriptions, but the check config that targets - // that entity is likely to only use one of them in order to target the check at - // a specific agent. - // - // Check configs for non-proxy entities on the other hand use their subscriptions to - // both target entities and agents (as they are the same thing), and as a result - // may have subscriptions present in the check config that are not present in the - // entity. - // Consider the following example: - // - check has subscriptions `linux` and `windows` - // - silence is for `windows` subscription - // - event is for an entity with the `linux` subscription - // In this case, we don't want to match `linux` from the check, because the silence - // is targeted at windows machines and the event is for a linux machine. - // - // To handle both of these cases correctly, we need to rely on the presence of the - // event.check.proxy_entity_name field. - if e.Check.ProxyEntityName != "" { - // Proxy entity - for _, subscription := range e.Entity.Subscriptions { - if entry.Matches(e.Check.Name, subscription) { - return true - } - } - } else { - // Non-proxy entity - for _, subscription := range e.Check.Subscriptions { - if !stringsutil.InArray(subscription, e.Entity.Subscriptions) { - continue - } - if entry.Matches(e.Check.Name, subscription) { - return true - } - } - } - - return false -} - -// EventFields returns a set of fields that represent that resource -func EventFields(r Resource) map[string]string { - resource := r.(*Event) - fields := map[string]string{ - "event.name": resource.ObjectMeta.Name, - "event.namespace": resource.ObjectMeta.Namespace, - "event.is_silenced": isSilenced(resource), - "event.check.is_silenced": isSilenced(resource), - "event.check.name": resource.Check.Name, - "event.check.handlers": strings.Join(resource.Check.Handlers, ","), - "event.check.publish": strconv.FormatBool(resource.Check.Publish), - "event.check.round_robin": strconv.FormatBool(resource.Check.RoundRobin), - "event.check.runtime_assets": strings.Join(resource.Check.RuntimeAssets, ","), - "event.check.state": resource.Check.State, - "event.check.status": strconv.Itoa(int(resource.Check.Status)), - "event.check.subscriptions": strings.Join(resource.Check.Subscriptions, ","), - "event.entity.deregister": strconv.FormatBool(resource.Entity.Deregister), - "event.entity.name": resource.Entity.ObjectMeta.Name, - "event.entity.entity_class": resource.Entity.EntityClass, - "event.entity.subscriptions": strings.Join(resource.Entity.Subscriptions, ","), - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "event.labels.") - stringsutil.MergeMapWithPrefix(fields, resource.Entity.ObjectMeta.Labels, "event.labels.") - stringsutil.MergeMapWithPrefix(fields, resource.Check.ObjectMeta.Labels, "event.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (e *Event) Fields() map[string]string { - return EventFields(e) -} - -func isSilenced(e *Event) string { - if len(e.Check.Silenced) > 0 { - return "true" - } - return "false" -} - -// SetNamespace sets the namespace of the resource. -func (e *Event) SetNamespace(namespace string) { - e.Namespace = namespace - if e.Entity == nil { - e.Entity = new(Entity) - } - e.Entity.Namespace = namespace - if e.Check != nil { - e.Check.Namespace = namespace - } -} - -// SetObjectMeta sets the meta of the resource. -func (e *Event) SetObjectMeta(meta ObjectMeta) { - e.ObjectMeta = meta -} - -func (e *Event) RBACName() string { - return "events" -} - -// GetUUID parses a UUID from the ID bytes. It does not check errors, assuming -// that the event has already passed validation. -func (e *Event) GetUUID() uuid.UUID { - id, _ := uuid.FromBytes(e.ID) - return id -} - -// LogFields populates a map with fields containing relevant information about -// an event for logging -func (e *Event) LogFields(debug bool) map[string]interface{} { - // Ensure the entity is present - if e.Entity == nil { - return map[string]interface{}{} - } - - fields := map[string]interface{}{ - "event_id": e.GetUUID().String(), - "entity_name": e.Entity.Name, - "entity_namespace": e.Entity.Namespace, - } - - if e.HasCheck() { - fields["check_name"] = e.Check.Name - fields["check_namespace"] = e.Check.Namespace - } - - if debug { - fields["timestamp"] = e.Timestamp - if e.HasMetrics() { - fields["metrics"] = e.Metrics - } - if e.HasCheck() { - fields["hooks"] = e.Check.Hooks - fields["silenced"] = e.Check.Silenced - } - } else { - if e.HasMetrics() { - count := len(e.Metrics.Points) - fields["metric_count"] = count - if count > 0 { - fields["first_metric_name"] = e.Metrics.Points[0].Name - fields["first_metric_value"] = e.Metrics.Points[0].Value - } - } - } - - return fields -} - -func (e Event) MarshalJSON() ([]byte, error) { - type clone Event - b, err := json.Marshal((*clone)(&e)) - if err != nil { - return nil, err - } - if len(e.ID) == 0 { - return b, nil - } - var msg map[string]*json.RawMessage - _ = json.Unmarshal(b, &msg) // error impossible - if len(e.ID) > 0 { - uid, err := uuid.FromBytes(e.ID) - if err != nil { - return nil, fmt.Errorf("invalid event ID: %s", err) - } - idBytes, _ := json.Marshal(uid.String()) - msg["id"] = (*json.RawMessage)(&idBytes) - } - return json.Marshal(msg) -} - -func (e *Event) UnmarshalJSON(b []byte) error { - type clone Event - var msg map[string]*json.RawMessage - if err := json.Unmarshal(b, &msg); err != nil { - return err - } - if msg["id"] == nil { - return json.Unmarshal(b, (*clone)(e)) - } - var id string - if err := json.Unmarshal(*msg["id"], &id); err != nil { - return err - } - if len(id) > 0 { - delete(msg, "id") - b, _ = json.Marshal(msg) - } - if err := json.Unmarshal(b, (*clone)(e)); err != nil { - return err - } - if len(id) > 0 { - uid, err := uuid.Parse(id) - if err != nil { - return fmt.Errorf("invalid event id: %s", err) - } - e.ID = uid[:] - } - return nil -} diff --git a/api/core/v2/event.pb.go b/api/core/v2/event.pb.go deleted file mode 100644 index 760d5a8fd1..0000000000 --- a/api/core/v2/event.pb.go +++ /dev/null @@ -1,904 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/event.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// An Event is the encapsulating type sent across the Sensu websocket transport. -type Event struct { - // Timestamp is the time in seconds since the Epoch. - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // Entity describes the entity in which the event occurred. - Entity *Entity `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"` - // Check describes the result of a check; if event is associated to check - // execution. - Check *Check `protobuf:"bytes,3,opt,name=check,proto3" json:"check,omitempty"` - // Metrics are zero or more Sensu metrics - Metrics *Metrics `protobuf:"bytes,4,opt,name=metrics,proto3" json:"metrics,omitempty"` - // Metadata contains name, namespace, labels and annotations - ObjectMeta `protobuf:"bytes,5,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` - // ID is the unique identifier of the event. - ID []byte `protobuf:"bytes,6,opt,name=ID,proto3" json:"id"` - // Sequence is the event sequence number. The agent increments the sequence - // number by one for every successive event. When the agent restarts or - // reconnects to another backend, the sequence number is reset to 1. - Sequence int64 `protobuf:"varint,7,opt,name=Sequence,proto3" json:"sequence"` - // Pipelines are the pipelines that should be used to process an event. - // APIVersion should default to "core/v2" and Type should default to - // "Pipeline". - Pipelines []*ResourceReference `protobuf:"bytes,8,rep,name=pipelines,proto3" json:"pipelines"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Event) Reset() { *m = Event{} } -func (m *Event) String() string { return proto.CompactTextString(m) } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_4a6c1d479d0c50cf, []int{0} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Event.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Event)(nil), "sensu.core.v2.Event") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/event.proto", fileDescriptor_4a6c1d479d0c50cf) -} - -var fileDescriptor_4a6c1d479d0c50cf = []byte{ - // 449 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xb1, 0x6e, 0xd3, 0x40, - 0x18, 0xc7, 0x73, 0x4e, 0x93, 0xa6, 0xd7, 0x76, 0x39, 0x95, 0xca, 0x54, 0xc8, 0xb6, 0x98, 0xbc, - 0x70, 0x6e, 0x1c, 0xc4, 0xc0, 0x80, 0x90, 0x69, 0x87, 0x0a, 0x45, 0x48, 0xc7, 0xc6, 0x82, 0x9c, - 0xeb, 0xd7, 0xf4, 0x80, 0xf8, 0x8c, 0x7d, 0xb6, 0xc4, 0x1b, 0xf0, 0x08, 0x8c, 0x1d, 0x3b, 0xf0, - 0x00, 0x3c, 0x42, 0xc6, 0x3e, 0x81, 0x05, 0x66, 0xcb, 0x13, 0x30, 0x22, 0x9f, 0xaf, 0x09, 0x64, - 0xf2, 0x62, 0x7d, 0xfa, 0xfe, 0xff, 0xdf, 0xe7, 0xd3, 0xff, 0x8f, 0xc7, 0x73, 0xa1, 0xae, 0x8b, - 0x19, 0xe5, 0x72, 0x11, 0xe4, 0x90, 0xe4, 0x45, 0xfb, 0x7d, 0x32, 0x97, 0x41, 0x9c, 0x8a, 0x80, - 0xcb, 0x0c, 0x82, 0x32, 0x0c, 0xa0, 0x84, 0x44, 0xd1, 0x34, 0x93, 0x4a, 0x92, 0x43, 0xed, 0xa0, - 0x8d, 0x44, 0xcb, 0xf0, 0xe4, 0xe9, 0x3f, 0x17, 0xe6, 0x72, 0x2e, 0x03, 0xed, 0x9a, 0x15, 0x57, - 0x2f, 0xcb, 0x31, 0x9d, 0xd0, 0xb1, 0x5e, 0xea, 0x9d, 0x9e, 0xda, 0x23, 0x27, 0x61, 0xc7, 0xff, - 0x26, 0x4a, 0xa8, 0x2f, 0x86, 0xe9, 0xf8, 0x56, 0x7e, 0x0d, 0xfc, 0xa3, 0x41, 0x26, 0xdd, 0x90, - 0x05, 0xa8, 0x4c, 0xf0, 0xdc, 0x40, 0xa7, 0x9d, 0xa1, 0xd8, 0x10, 0x2f, 0xba, 0x11, 0x19, 0xe4, - 0xb2, 0xc8, 0x38, 0xbc, 0xcf, 0xe0, 0x0a, 0x32, 0x48, 0x38, 0xb4, 0xfc, 0xe3, 0xef, 0x7d, 0x3c, - 0x38, 0x6f, 0x22, 0x26, 0x8f, 0xf0, 0x9e, 0x12, 0x0b, 0xc8, 0x55, 0xbc, 0x48, 0x6d, 0xe4, 0x21, - 0xbf, 0xcf, 0x36, 0x0b, 0x32, 0xc1, 0xc3, 0x36, 0x11, 0xdb, 0xf2, 0x90, 0xbf, 0x1f, 0x3e, 0xa0, - 0xff, 0x75, 0x41, 0xcf, 0xb5, 0x18, 0xed, 0x2c, 0x2b, 0x17, 0x31, 0x63, 0x25, 0xa7, 0x78, 0xa0, - 0x23, 0xb1, 0xfb, 0x9a, 0x39, 0xda, 0x62, 0x5e, 0x35, 0x9a, 0x41, 0x5a, 0x23, 0x79, 0x86, 0x77, - 0x4d, 0x22, 0xf6, 0x8e, 0x66, 0x8e, 0xb7, 0x98, 0x69, 0xab, 0x1a, 0xea, 0xde, 0x4c, 0x5e, 0xe3, - 0x51, 0x13, 0xca, 0x65, 0xac, 0x62, 0x7b, 0xa0, 0xc1, 0x87, 0x5b, 0xe0, 0x9b, 0xd9, 0x07, 0xe0, - 0x6a, 0x0a, 0x2a, 0x8e, 0x8e, 0x96, 0x95, 0xdb, 0xbb, 0xab, 0x5c, 0xb4, 0xaa, 0xdc, 0x35, 0xc6, - 0xd6, 0x13, 0x39, 0xc6, 0xd6, 0xc5, 0x99, 0x3d, 0xf4, 0x90, 0x7f, 0x10, 0x0d, 0x57, 0x95, 0x6b, - 0x89, 0x4b, 0x66, 0x5d, 0x9c, 0x11, 0x1f, 0x8f, 0xde, 0xc2, 0xe7, 0xa2, 0x49, 0xcf, 0xde, 0x6d, - 0x02, 0x8a, 0x0e, 0x9a, 0x0b, 0xb9, 0xd9, 0xb1, 0xb5, 0x4a, 0xa6, 0x78, 0x2f, 0x15, 0x29, 0x7c, - 0x12, 0x09, 0xe4, 0xf6, 0xc8, 0xeb, 0xfb, 0xfb, 0xa1, 0xb7, 0xf5, 0x1e, 0x66, 0x1a, 0x61, 0xf7, - 0x85, 0x44, 0x87, 0xab, 0xca, 0xdd, 0x60, 0x6c, 0x33, 0x3e, 0x1f, 0x7d, 0xbd, 0x71, 0x7b, 0xb7, - 0x37, 0x2e, 0x8a, 0xbc, 0x3f, 0xbf, 0x1c, 0x74, 0x5b, 0x3b, 0xe8, 0x47, 0xed, 0xa0, 0x65, 0xed, - 0xa0, 0xbb, 0xda, 0x41, 0x3f, 0x6b, 0x07, 0x7d, 0xfb, 0xed, 0xf4, 0xde, 0x59, 0x65, 0x38, 0x1b, - 0xea, 0x5e, 0x27, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x67, 0xa1, 0xe8, 0x5f, 0x03, 0x00, - 0x00, -} - -func (this *Event) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Event) - if !ok { - that2, ok := that.(Event) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Timestamp != that1.Timestamp { - return false - } - if !this.Entity.Equal(that1.Entity) { - return false - } - if !this.Check.Equal(that1.Check) { - return false - } - if !this.Metrics.Equal(that1.Metrics) { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if !bytes.Equal(this.ID, that1.ID) { - return false - } - if this.Sequence != that1.Sequence { - return false - } - if len(this.Pipelines) != len(that1.Pipelines) { - return false - } - for i := range this.Pipelines { - if !this.Pipelines[i].Equal(that1.Pipelines[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type EventFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetTimestamp() int64 - GetEntity() *Entity - GetCheck() *Check - GetMetrics() *Metrics - GetObjectMeta() ObjectMeta - GetID() []byte - GetSequence() int64 - GetPipelines() []*ResourceReference -} - -func (this *Event) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *Event) TestProto() github_com_golang_protobuf_proto.Message { - return NewEventFromFace(this) -} - -func (this *Event) GetTimestamp() int64 { - return this.Timestamp -} - -func (this *Event) GetEntity() *Entity { - return this.Entity -} - -func (this *Event) GetCheck() *Check { - return this.Check -} - -func (this *Event) GetMetrics() *Metrics { - return this.Metrics -} - -func (this *Event) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *Event) GetID() []byte { - return this.ID -} - -func (this *Event) GetSequence() int64 { - return this.Sequence -} - -func (this *Event) GetPipelines() []*ResourceReference { - return this.Pipelines -} - -func NewEventFromFace(that EventFace) *Event { - this := &Event{} - this.Timestamp = that.GetTimestamp() - this.Entity = that.GetEntity() - this.Check = that.GetCheck() - this.Metrics = that.GetMetrics() - this.ObjectMeta = that.GetObjectMeta() - this.ID = that.GetID() - this.Sequence = that.GetSequence() - this.Pipelines = that.GetPipelines() - return this -} - -func (m *Event) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Pipelines) > 0 { - for iNdEx := len(m.Pipelines) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Pipelines[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if m.Sequence != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x38 - } - if len(m.ID) > 0 { - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = encodeVarintEvent(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0x32 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if m.Metrics != nil { - { - size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Check != nil { - { - size, err := m.Check.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Entity != nil { - { - size, err := m.Entity.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Timestamp != 0 { - i = encodeVarintEvent(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { - offset -= sovEvent(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedEvent(r randyEvent, easy bool) *Event { - this := &Event{} - this.Timestamp = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Timestamp *= -1 - } - if r.Intn(5) != 0 { - this.Entity = NewPopulatedEntity(r, easy) - } - if r.Intn(5) != 0 { - this.Check = NewPopulatedCheck(r, easy) - } - if r.Intn(5) != 0 { - this.Metrics = NewPopulatedMetrics(r, easy) - } - v1 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v1 - v2 := r.Intn(100) - this.ID = make([]byte, v2) - for i := 0; i < v2; i++ { - this.ID[i] = byte(r.Intn(256)) - } - this.Sequence = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sequence *= -1 - } - if r.Intn(5) != 0 { - v3 := r.Intn(5) - this.Pipelines = make([]*ResourceReference, v3) - for i := 0; i < v3; i++ { - this.Pipelines[i] = NewPopulatedResourceReference(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEvent(r, 9) - } - return this -} - -type randyEvent interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneEvent(r randyEvent) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringEvent(r randyEvent) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneEvent(r) - } - return string(tmps) -} -func randUnrecognizedEvent(r randyEvent, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldEvent(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldEvent(dAtA []byte, r randyEvent, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateEvent(dAtA, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - dAtA = encodeVarintPopulateEvent(dAtA, uint64(v5)) - case 1: - dAtA = encodeVarintPopulateEvent(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateEvent(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateEvent(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateEvent(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateEvent(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Timestamp != 0 { - n += 1 + sovEvent(uint64(m.Timestamp)) - } - if m.Entity != nil { - l = m.Entity.Size() - n += 1 + l + sovEvent(uint64(l)) - } - if m.Check != nil { - l = m.Check.Size() - n += 1 + l + sovEvent(uint64(l)) - } - if m.Metrics != nil { - l = m.Metrics.Size() - n += 1 + l + sovEvent(uint64(l)) - } - l = m.ObjectMeta.Size() - n += 1 + l + sovEvent(uint64(l)) - l = len(m.ID) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - if m.Sequence != 0 { - n += 1 + sovEvent(uint64(m.Sequence)) - } - if len(m.Pipelines) > 0 { - for _, e := range m.Pipelines { - l = e.Size() - n += 1 + l + sovEvent(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovEvent(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvent(x uint64) (n int) { - return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Event) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Entity == nil { - m.Entity = &Entity{} - } - if err := m.Entity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Check == nil { - m.Check = &Check{} - } - if err := m.Check.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metrics == nil { - m.Metrics = &Metrics{} - } - if err := m.Metrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ID = append(m.ID[:0], dAtA[iNdEx:postIndex]...) - if m.ID == nil { - m.ID = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pipelines", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pipelines = append(m.Pipelines, &ResourceReference{}) - if err := m.Pipelines[len(m.Pipelines)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvent(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEvent - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvent - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvent - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/event.proto b/api/core/v2/event.proto deleted file mode 100644 index 2444bce6ea..0000000000 --- a/api/core/v2/event.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/entity.proto"; -import "github.com/sensu/sensu-go/api/core/v2/check.proto"; -import "github.com/sensu/sensu-go/api/core/v2/metrics.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; -import "github.com/sensu/sensu-go/api/core/v2/resource_reference.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// An Event is the encapsulating type sent across the Sensu websocket transport. -message Event { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Timestamp is the time in seconds since the Epoch. - int64 timestamp = 1; - - // Entity describes the entity in which the event occurred. - Entity entity = 2 [ (gogoproto.nullable) = true ]; - - // Check describes the result of a check; if event is associated to check - // execution. - Check check = 3 [ (gogoproto.nullable) = true ]; - - // Metrics are zero or more Sensu metrics - Metrics metrics = 4 [ (gogoproto.nullable) = true ]; - - // Metadata contains name, namespace, labels and annotations - ObjectMeta metadata = 5 [ (gogoproto.embed) = true, (gogoproto.jsontag) = "metadata", (gogoproto.nullable) = false ]; - - // ID is the unique identifier of the event. - bytes ID = 6 [ (gogoproto.jsontag) = "id" ]; - - // Sequence is the event sequence number. The agent increments the sequence - // number by one for every successive event. When the agent restarts or - // reconnects to another backend, the sequence number is reset to 1. - int64 Sequence = 7 [ (gogoproto.jsontag) = "sequence" ]; - - // Pipelines are the pipelines that should be used to process an event. - // APIVersion should default to "core/v2" and Type should default to - // "Pipeline". - repeated ResourceReference pipelines = 8 [ (gogoproto.jsontag) = "pipelines" ]; -} diff --git a/api/core/v2/event_sort.go b/api/core/v2/event_sort.go deleted file mode 100644 index d8c5d6e055..0000000000 --- a/api/core/v2/event_sort.go +++ /dev/null @@ -1,211 +0,0 @@ -package v2 - -import ( - "sort" -) - -const ( - EventSortEntity = "ENTITY" - EventSortLastOk = "LASTOK" - EventSortSeverity = "SEVERITY" - EventSortTimestamp = "TIMESTAMP" -) - -func SortEvents(events []*Event, ordering string, descending bool) { - if len(ordering) == 0 { - return - } - - asc := !descending - - var sortIf sort.Interface - switch ordering { - case EventSortEntity: - sortIf = EventsByEntityName(events, asc) - case EventSortLastOk: - sortIf = EventsByLastOk(events, asc) - case EventSortSeverity: - sortIf = EventsBySeverity(events, asc) - default: - sortIf = EventsByTimestamp(events, asc) - } - - sort.Sort(sortIf) -} - -// EventsBySeverity can be used to sort a given collection of events by check -// status and timestamp. -func EventsBySeverity(es []*Event, asc bool) sort.Interface { - return &eventSorter{es, createCmpEvents( - cmpBySeverity(asc), - cmpByLastOk(asc), - cmpByEntity(true), - )} -} - -// EventsByTimestamp can be used to sort a given collection of events by time it -// occurred. -func EventsByTimestamp(es []*Event, asc bool) sort.Interface { - sorter := &eventSorter{events: es} - if asc { - sorter.byFn = func(a, b *Event) bool { - return a.Timestamp > b.Timestamp - } - } else { - sorter.byFn = func(a, b *Event) bool { - return a.Timestamp < b.Timestamp - } - } - return sorter -} - -// EventsByLastOk can be used to sort a given collection of events by time it -// last received an OK status. -func EventsByLastOk(es []*Event, asc bool) sort.Interface { - return &eventSorter{es, createCmpEvents( - cmpByState(asc), - cmpByLastOk(asc), - cmpByEntity(true), - )} -} - -// EventsByEntityName can be used to sort a given collection of events by -// entity name (and secondarily by check name.) -func EventsByEntityName(es []*Event, asc bool) sort.Interface { - return &eventSorter{es, createCmpEvents(cmpByEntity(asc))} -} - -func cmpByEntity(asc bool) func(a, b *Event) int { - return func(a, b *Event) int { - ai, bi := "", "" - if a.Entity != nil { - ai += a.Entity.Name - } - if a.Check != nil { - ai += a.Check.Name - } - if b.Entity != nil { - bi = b.Entity.Name - } - if b.Check != nil { - bi += b.Check.Name - } - - if ai == bi { - return 0 - } else if (asc && ai < bi) || (!asc && ai > bi) { - return 1 - } - return -1 - } -} - -func cmpBySeverity(asc bool) func(a, b *Event) int { - return func(a, b *Event) int { - ap, bp := deriveSeverity(a), deriveSeverity(b) - - // Sort events with the same exit status by timestamp - if ap == bp { - return 0 - } - if (asc && ap > bp) || (!asc && ap < bp) { - return 1 - } - return -1 - } -} - -func cmpByState(asc bool) func(a, b *Event) int { - return func(a, b *Event) int { - var av, bv bool - if a.Check != nil { - av = a.Check.State == EventPassingState - } - if b.Check != nil { - bv = b.Check.State == EventPassingState - } - - // Rank higher if failing/flapping - if av == bv { - return 0 - } - if (asc && av) || (!asc && !av) { - return 1 - } - return -1 - } -} - -func cmpByLastOk(asc bool) func(a, b *Event) int { - return func(a, b *Event) int { - at, bt := a.Timestamp, b.Timestamp - if a.HasCheck() { - at = a.Check.LastOK - } - if b.HasCheck() { - bt = b.Check.LastOK - } - - if at == bt { - return 0 - } - if (asc && at < bt) || (!asc && at > bt) { - return 1 - } - return -1 - } -} - -// Based on convention we define the order of importance as critical (2), -// warning (1), unknown (>2), and Ok (0). If event is not a check sort to -// very end. -func deriveSeverity(e *Event) int { - if e.HasCheck() { - switch e.Check.Status { - case 0: - return 3 - case 1: - return 1 - case 2: - return 0 - default: - return 2 - } - } - return 4 -} - -type cmpEvents func(a, b *Event) int - -func createCmpEvents(cmps ...cmpEvents) func(a, b *Event) bool { - return func(a, b *Event) bool { - for _, cmp := range cmps { - st := cmp(a, b) - if st == 0 { // if equal try the next comparitor - continue - } - return st == 1 - } - return true - } -} - -type eventSorter struct { - events []*Event - byFn func(a, b *Event) bool -} - -// Len implements sort.Interface. -func (s *eventSorter) Len() int { - return len(s.events) -} - -// Swap implements sort.Interface. -func (s *eventSorter) Swap(i, j int) { - s.events[i], s.events[j] = s.events[j], s.events[i] -} - -// Less implements sort.Interface. -func (s *eventSorter) Less(i, j int) bool { - return s.byFn(s.events[i], s.events[j]) -} diff --git a/api/core/v2/event_sort_test.go b/api/core/v2/event_sort_test.go deleted file mode 100644 index 3ac6f47329..0000000000 --- a/api/core/v2/event_sort_test.go +++ /dev/null @@ -1,352 +0,0 @@ -package v2 - -import ( - "sort" - "testing" - "time" - - "github.com/stretchr/testify/assert" -) - -func eventsToId(event []*Event) []string { - ids := make([]string, 0, len(event)) - for _, event := range event { - ids = append(ids, string(event.ID)) - } - return ids -} - -func TestCmpBySeverity(t *testing.T) { - critical := FixtureEvent("entity", "check") - critical.Check.Status = 2 // crit - critical.ID = []byte("critical") - warn := FixtureEvent("entity", "check") - warn.Check.Status = 1 // warn - warn.ID = []byte("warn") - unknown := FixtureEvent("entity", "check") - unknown.Check.Status = 3 // unknown - unknown.ID = []byte("unknown") - ok := FixtureEvent("entity", "check") - ok.Check.Status = 0 // ok - ok.Check.LastOK = 42 - ok.ID = []byte("ok") - - testCases := []struct { - name string - asc bool - input []*Event - expected []*Event - }{ - { - name: "ascending", - asc: true, - input: []*Event{warn, unknown, critical, ok}, - expected: []*Event{ok, unknown, warn, critical}, - }, - { - name: "ascending - already sorted", - asc: true, - input: []*Event{ok, unknown, warn, critical}, - expected: []*Event{ok, unknown, warn, critical}, - }, - { - name: "ascending - reversed", - asc: true, - input: []*Event{critical, warn, unknown, ok}, - expected: []*Event{ok, unknown, warn, critical}, - }, - { - name: "descending", - asc: false, - input: []*Event{warn, unknown, critical, ok}, - expected: []*Event{critical, warn, unknown, ok}, - }, - { - name: "descending - already sorted", - asc: false, - input: []*Event{critical, warn, unknown, ok}, - expected: []*Event{critical, warn, unknown, ok}, - }, - { - name: "descending - reversed", - asc: false, - input: []*Event{ok, unknown, warn, critical}, - expected: []*Event{critical, warn, unknown, ok}, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.name, func(t *testing.T) { - sorter := &eventSorter{testCase.input, createCmpEvents(cmpBySeverity(testCase.asc))} - sort.Sort(sorter) - - assert.Equal(t, eventsToId(testCase.expected), eventsToId(testCase.input)) - }) - } -} - -func TestCmpByState(t *testing.T) { - passing1 := FixtureEvent("entity", "check") - passing1.Check.State = EventPassingState - passing1.ID = []byte("passing1") - passing2 := FixtureEvent("entity", "check") - passing2.Check.State = EventPassingState - passing2.ID = []byte("passing2") - failing1 := FixtureEvent("entity", "check") - failing1.Check.State = EventFailingState - failing1.ID = []byte("failing1") - failing2 := FixtureEvent("entity", "check") - failing2.Check.State = EventFailingState - failing2.ID = []byte("failing2") - flapping1 := FixtureEvent("entity", "check") - flapping1.Check.State = EventFlappingState - flapping1.ID = []byte("flapping1") - flapping2 := FixtureEvent("entity", "check") - flapping2.Check.State = EventFlappingState - flapping2.ID = []byte("flapping2") - - testCases := []struct { - name string - asc bool - event1 *Event - event2 *Event - expected int - }{ - {"ascending - passing - passing", true, passing1, passing2, 0}, - {"descending - passing - passing", false, passing1, passing2, 0}, - {"ascending - flapping - flapping", true, flapping1, flapping2, 0}, - {"descending - flapping - flapping", false, flapping1, flapping2, 0}, - {"ascending - failing - failing", true, failing1, failing2, 0}, - {"descending - failing - failing", false, failing1, failing2, 0}, - {"ascending - passing - failing", true, passing1, failing1, 1}, - {"descending - passing - failing", false, passing1, failing1, -1}, - {"ascending - passing - flapping", true, passing1, flapping1, 1}, - {"descending - passing - flapping", false, passing1, flapping1, -1}, - {"ascending - failing - flapping", true, flapping1, failing1, 0}, - {"descending - failing - flapping", false, failing1, flapping1, 0}, - } - - for _, testCase := range testCases { - t.Run(testCase.name, func(t *testing.T) { - assert.Equal(t, testCase.expected, cmpByState(testCase.asc)(testCase.event1, testCase.event2)) - }) - } -} - -func TestCmpByLastOk(t *testing.T) { - time1 := time.Now().Unix() - time2 := time1 + 100 - time3 := time2 + 100 - time4 := time3 + 100 - - lowTimeNoCheck := FixtureEvent("entity", "check") - lowTimeNoCheck.Timestamp = time3 - lowTimeNoCheck.Check = nil - lowTimeNoCheck.ID = []byte("lowTimeNoCheck") - highTimeNoCheck := FixtureEvent("entity", "check") - highTimeNoCheck.Timestamp = time4 - highTimeNoCheck.Check = nil - highTimeNoCheck.ID = []byte("highTimeNoCheck") - lowTimeLowCheck := FixtureEvent("entity", "check") - lowTimeLowCheck.Timestamp = time3 - lowTimeLowCheck.Check.LastOK = time1 - lowTimeLowCheck.ID = []byte("lowTimeLowCheck") - lowTimeHighCheck := FixtureEvent("entity", "check") - lowTimeHighCheck.Timestamp = time3 - lowTimeHighCheck.Check.LastOK = time2 - lowTimeHighCheck.ID = []byte("lowTimeHighCheck") - - testCases := []struct { - name string - asc bool - event1 *Event - event2 *Event - expected int - }{ - {"ascending - no check vs no check", true, lowTimeNoCheck, highTimeNoCheck, 1}, - {"descending - no check vs no check", false, lowTimeNoCheck, highTimeNoCheck, -1}, - {"ascending - check vs no check", true, lowTimeLowCheck, highTimeNoCheck, 1}, - {"descending - check vs no check", false, lowTimeLowCheck, highTimeNoCheck, -1}, - {"ascending - check vs check", true, lowTimeLowCheck, lowTimeHighCheck, 1}, - {"descending - check vs check", false, lowTimeLowCheck, lowTimeHighCheck, -1}, - } - - for _, testCase := range testCases { - t.Run(testCase.name, func(t *testing.T) { - assert.Equal(t, testCase.expected, cmpByLastOk(testCase.asc)(testCase.event1, testCase.event2)) - }) - } -} - -func TestEventsBySeverity(t *testing.T) { - critical := FixtureEvent("entity", "check") - critical.Check.Status = 2 // crit - critical.ID = []byte("critical") - warn := FixtureEvent("entity", "check") - warn.Check.Status = 1 // warn - warn.ID = []byte("warn") - unknown := FixtureEvent("entity", "check") - unknown.Check.Status = 3 // unknown - unknown.ID = []byte("unknown") - ok := FixtureEvent("entity", "check") - ok.Check.Status = 0 // ok - ok.Check.LastOK = 42 - ok.ID = []byte("ok") - okOlder := FixtureEvent("entity", "check") - okOlder.Check.Status = 0 // ok - okOlder.Check.LastOK = 7 - okOlder.ID = []byte("okOlder") - okOlderDiff := FixtureEvent("entity", "check") - okOlderDiff.Check.Status = 0 // ok - okOlderDiff.Check.LastOK = 7 - okOlderDiff.Entity.Name = "zzz" - okOlderDiff.ID = []byte("okOlderDiff") - noCheck := FixtureEvent("entity", "check") - noCheck.Check = nil - noCheck.ID = []byte("noCheck") - - testCases := []struct { - name string - asc bool - input []*Event - expected []*Event - }{ - { - name: "Sorts by severity", - asc: false, - input: []*Event{ok, warn, unknown, noCheck, okOlderDiff, okOlder, critical}, - expected: []*Event{critical, warn, unknown, ok, okOlder, okOlderDiff, noCheck}, - }, - { - name: "Fallback to lastOK when severity is same", - asc: false, - input: []*Event{okOlder, ok, okOlder}, - expected: []*Event{ok, okOlder, okOlder}, - }, - { - name: "Fallback to entity name when severity is same", - asc: false, - input: []*Event{okOlderDiff, okOlder, ok, okOlder}, - expected: []*Event{ok, okOlder, okOlder, okOlderDiff}, - }, - { - name: "Events w/o a check are sorted to end", - asc: false, - input: []*Event{critical, noCheck, ok}, - expected: []*Event{critical, ok, noCheck}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - sort.Sort(EventsBySeverity(tc.input, false)) - assert.EqualValues(t, eventsToId(tc.expected), eventsToId(tc.input)) - }) - } -} -func TestEventsByLastOk(t *testing.T) { - incident := FixtureEvent("zeta", "check") - incident.Check.State = EventFailingState - incidentNewer := FixtureEvent("zeta", "check") - incidentNewer.Check.State = EventFlappingState - incidentNewer.Check.LastOK = 1 - ok := FixtureEvent("zeta", "check") - ok.Check.State = EventPassingState - okNewer := FixtureEvent("zeta", "check") - okNewer.Check.State = EventPassingState - okNewer.Check.LastOK = 1 - okDiffEntity := FixtureEvent("abba", "check") - okDiffEntity.Check.State = EventPassingState - okDiffCheck := FixtureEvent("abba", "0bba") - okDiffCheck.Check.State = EventPassingState - testCases := []struct { - name string - input []*Event - expected []*Event - }{ - { - name: "sort by lastOK", - input: []*Event{ok, okNewer, incidentNewer, incident}, - expected: []*Event{incidentNewer, incident, okNewer, ok}, - }, - { - name: "non-passing are sorted to the top", - input: []*Event{okNewer, incidentNewer, ok, incident}, - expected: []*Event{incidentNewer, incident, okNewer, ok}, - }, - { - name: "fallback to entity & check name when severity is same", - input: []*Event{ok, okNewer, okDiffCheck, okDiffEntity}, - expected: []*Event{okNewer, okDiffCheck, okDiffEntity, ok}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - sort.Sort(EventsByLastOk(tc.input, false)) - assert.EqualValues(t, tc.expected, tc.input) - }) - } -} -func TestEventsByTimestamp(t *testing.T) { - old := &Event{Timestamp: 3} - older := &Event{Timestamp: 2} - oldest := &Event{Timestamp: 1} - okButHow := &Event{Timestamp: 0} - testCases := []struct { - name string - inEvents []*Event - inDir bool - expected []*Event - }{ - { - name: "Sorts ascending", - inDir: false, - inEvents: []*Event{old, okButHow, oldest, older}, - expected: []*Event{okButHow, oldest, older, old}, - }, - { - name: "Sorts descending", - inDir: true, - inEvents: []*Event{old, okButHow, oldest, older}, - expected: []*Event{old, older, oldest, okButHow}, - }, - } - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - sort.Sort(EventsByTimestamp(tc.inEvents, tc.inDir)) - assert.EqualValues(t, tc.expected, tc.inEvents) - }) - } -} -func TestEventsByEntity(t *testing.T) { - a1 := FixtureEvent("a", "a") - a2 := FixtureEvent("a", "b") - b1 := FixtureEvent("b", "a") - b2 := FixtureEvent("b", "b") - testCases := []struct { - name string - inEvents []*Event - ascending bool - expected []*Event - }{ - { - name: "Sorts ascending", - ascending: true, - inEvents: []*Event{b1, a2, a1, b2}, - expected: []*Event{a1, a2, b1, b2}, - }, - { - name: "Sorts descending", - ascending: false, - inEvents: []*Event{b1, a2, a1, b2}, - expected: []*Event{b2, b1, a2, a1}, - }, - } - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - sort.Sort(EventsByEntityName(tc.inEvents, tc.ascending)) - assert.EqualValues(t, tc.expected, tc.inEvents) - }) - } -} diff --git a/api/core/v2/event_test.go b/api/core/v2/event_test.go deleted file mode 100644 index 7126f01d56..0000000000 --- a/api/core/v2/event_test.go +++ /dev/null @@ -1,867 +0,0 @@ -package v2 - -import ( - "encoding/json" - "fmt" - "reflect" - "testing" - "time" - - "github.com/google/uuid" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestFixtureEventIsValid(t *testing.T) { - e := FixtureEvent("entity", "check") - assert.NotNil(t, e) - assert.NotNil(t, e.Entity) - assert.NotNil(t, e.Check) -} - -func TestEventValidate(t *testing.T) { - event := FixtureEvent("entity", "check") - - event.Check.Name = "" - assert.Error(t, event.Validate()) - event.Check.Name = "check" - - event.Entity.Name = "" - assert.Error(t, event.Validate()) - event.Entity.Name = "entity" - - assert.NoError(t, event.Validate()) -} - -func TestEventValidateNoTimestamp(t *testing.T) { - // Events without a timestamp are valid - event := FixtureEvent("entity", "check") - event.Timestamp = 0 - if err := event.Validate(); err != nil { - t.Fatal(err) - } -} - -func TestMarshalJSON(t *testing.T) { - event := FixtureEvent("entity", "check") - _, err := json.Marshal(event) - require.NoError(t, err) -} - -func TestEventHasMetrics(t *testing.T) { - testCases := []struct { - name string - metrics *Metrics - expected bool - }{ - { - name: "No Metrics", - metrics: nil, - expected: false, - }, - { - name: "Metrics", - metrics: &Metrics{}, - expected: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - event := &Event{ - Metrics: tc.metrics, - } - metrics := event.HasMetrics() - assert.Equal(t, tc.expected, metrics) - }) - } -} - -func TestEventIsIncident(t *testing.T) { - testCases := []struct { - name string - status uint32 - expected bool - }{ - { - name: "OK Status", - status: 0, - expected: false, - }, - { - name: "Non-zero Status", - status: 1, - expected: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - event := &Event{ - Check: &Check{ - Status: tc.status, - }, - } - incident := event.IsIncident() - assert.Equal(t, tc.expected, incident) - }) - } -} - -func TestEventIsResolution(t *testing.T) { - testCases := []struct { - name string - history []CheckHistory - status uint32 - expected bool - }{ - { - name: "check has no history", - history: []CheckHistory{{}}, - status: 0, - expected: false, - }, - { - name: "check has not transitioned", - history: []CheckHistory{ - {Status: 1}, - {Status: 0}, - }, - status: 0, - expected: true, - }, - { - name: "check has just transitioned", - history: []CheckHistory{ - {Status: 0}, - {Status: 1}, - }, - status: 0, - expected: false, - }, - { - name: "check has transitioned but still an incident", - history: []CheckHistory{ - {Status: 2}, - {Status: 1}, - }, - status: 1, - expected: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - event := &Event{ - Check: &Check{ - History: tc.history, - Status: tc.status, - }, - } - resolution := event.IsResolution() - assert.Equal(t, tc.expected, resolution) - }) - } -} - -func TestEventIsSilenced(t *testing.T) { - testCases := []struct { - name string - event *Event - silenced []string - expected bool - }{ - { - name: "No silenced entries", - event: FixtureEvent("entity1", "check1"), - silenced: []string{}, - expected: false, - }, - { - name: "Silenced entry", - event: FixtureEvent("entity1", "check1"), - silenced: []string{"entity1"}, - expected: true, - }, - { - name: "Metric without a check", - event: &Event{}, - silenced: []string{"entity1"}, - expected: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - if tc.event.Check != nil { - tc.event.Check.Silenced = tc.silenced - } - silenced := tc.event.IsSilenced() - assert.Equal(t, tc.expected, silenced) - }) - } -} - -func TestEventIsFlappingStart(t *testing.T) { - testCases := []struct { - name string - history []CheckHistory - state string - expected bool - }{ - { - name: "check has no history", - history: []CheckHistory{{}}, - state: EventPassingState, - expected: false, - }, - { - name: "check was not flapping previously, nor is now", - history: []CheckHistory{ - {Flapping: false}, - {Flapping: false}, - }, - state: EventPassingState, - expected: false, - }, - { - name: "check is already flapping", - history: []CheckHistory{ - {Flapping: true}, - {Flapping: true}, - }, - state: EventFlappingState, - expected: false, - }, - { - name: "check was not previously flapping", - history: []CheckHistory{ - {Flapping: false}, - {Flapping: true}, - }, - state: EventFlappingState, - expected: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - event := &Event{ - Check: &Check{ - History: tc.history, - State: tc.state, - }, - } - assert.Equal(t, tc.expected, event.IsFlappingStart()) - }) - } -} - -func TestEventIsFlappingEnd(t *testing.T) { - testCases := []struct { - name string - history []CheckHistory - state string - expected bool - }{ - { - name: "check has no history", - history: []CheckHistory{{}}, - state: EventPassingState, - expected: false, - }, - { - name: "check was not flapping previously, nor is now", - history: []CheckHistory{ - {Flapping: false}, - {Flapping: false}, - }, - state: EventPassingState, - expected: false, - }, - { - name: "check is already flapping", - history: []CheckHistory{ - {Flapping: true}, - {Flapping: true}, - }, - state: EventFlappingState, - expected: false, - }, - { - name: "check was previously flapping but now is in OK state", - history: []CheckHistory{ - {Flapping: true}, - {Flapping: false}, - }, - state: EventPassingState, - expected: true, - }, - { - name: "check was previously flapping but now is in failing state", - history: []CheckHistory{ - {Flapping: true}, - {Flapping: false}, - }, - state: EventFailingState, - expected: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - event := &Event{ - Check: &Check{ - History: tc.history, - State: tc.state, - }, - } - assert.Equal(t, tc.expected, event.IsFlappingEnd()) - }) - } -} - -func TestEventIsSilencedBy(t *testing.T) { - testCases := []struct { - name string - event *Event - silenced *Silenced - expected bool - }{ - { - name: "nil silenced", - event: FixtureEvent("entity1", "check1"), - silenced: nil, - expected: false, - }, - { - name: "Metric without a check", - event: &Event{}, - silenced: nil, - expected: false, - }, - { - name: "Check provided and doesn't match, no subscription", - event: FixtureEvent("entity1", "check1"), - silenced: FixtureSilenced("*:check2"), - expected: false, - }, - { - name: "Check provided and matches, no subscription", - event: FixtureEvent("entity1", "check1"), - silenced: &Silenced{ - Subscription: "", - Check: "check1", - }, - expected: true, - }, - { - name: "Check provided and matches, no subscription; begins in future", - event: FixtureEvent("entity1", "check1"), - silenced: &Silenced{ - Subscription: "", - Check: "check1", - Begin: time.Now().Unix() + 300, - }, - expected: false, - }, - { - name: "Subscription provided and doesn't match, no check", - event: FixtureEvent("entity1", "check1"), - silenced: FixtureSilenced("entity:entity2:*"), - expected: false, - }, - { - name: "Subscription provided and matches, no check", - event: FixtureEvent("entity1", "check1"), - silenced: FixtureSilenced("entity:entity1:*"), - expected: true, - }, - { - name: "Check provided and doesn't match, subscription matches", - event: FixtureEvent("entity1", "check1"), - silenced: FixtureSilenced("entity:entity1:check2"), - expected: false, - }, - { - name: "Check provided and matches, subscription doesn't match", - event: FixtureEvent("entity1", "check1"), - silenced: FixtureSilenced("entity:entity2:check1"), - expected: false, - }, - { - name: "Check and subscription both provided and match", - event: FixtureEvent("entity1", "check1"), - silenced: FixtureSilenced("entity:entity1:check1"), - expected: true, - }, - { - name: "Subscription provided and doesn't match, check matches", - event: FixtureEvent("entity1", "check1"), - silenced: FixtureSilenced("entity:entity2:check1"), - expected: false, - }, - { - name: "Subscription provided and matches, check doesn't match", - event: FixtureEvent("entity1", "check1"), - silenced: FixtureSilenced("entity:entity1:check2"), - expected: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - assert.Equal(t, tc.expected, tc.event.IsSilencedBy(tc.silenced)) - }) - } -} - -func TestSilencedBy(t *testing.T) { - testCases := []struct { - name string - event *Event - entries []*Silenced - expectedEntries []*Silenced - }{ - { - name: "no entries", - event: FixtureEvent("foo", "check_cpu"), - entries: []*Silenced{}, - expectedEntries: []*Silenced{}, - }, - { - name: "not silenced", - event: FixtureEvent("foo", "check_cpu"), - entries: []*Silenced{ - FixtureSilenced("entity:foo:check_mem"), - FixtureSilenced("entity:bar:*"), - FixtureSilenced("foo:check_cpu"), - FixtureSilenced("foo:*"), - FixtureSilenced("*:check_mem"), - }, - expectedEntries: []*Silenced{}, - }, - { - name: "silenced by check", - event: FixtureEvent("foo", "check_cpu"), - entries: []*Silenced{ - FixtureSilenced("*:check_cpu"), - }, - expectedEntries: []*Silenced{ - FixtureSilenced("*:check_cpu"), - }, - }, - { - name: "silenced by entity subscription", - event: FixtureEvent("foo", "check_cpu"), - entries: []*Silenced{ - FixtureSilenced("entity:foo:*"), - }, - expectedEntries: []*Silenced{ - FixtureSilenced("entity:foo:*"), - }, - }, - { - name: "silenced by entity's check subscription", - event: FixtureEvent("foo", "check_cpu"), - entries: []*Silenced{ - FixtureSilenced("entity:foo:check_cpu"), - }, - expectedEntries: []*Silenced{ - FixtureSilenced("entity:foo:check_cpu"), - }, - }, - { - name: "silenced by check subscription", - event: FixtureEvent("foo", "check_cpu"), // has a linux subscription - entries: []*Silenced{ - FixtureSilenced("linux:*"), - }, - expectedEntries: []*Silenced{ - FixtureSilenced("linux:*"), - }, - }, - { - name: "silenced by subscription with check", - event: FixtureEvent("foo", "check_cpu"), // has a linux subscription - entries: []*Silenced{ - FixtureSilenced("linux:check_cpu"), - }, - expectedEntries: []*Silenced{ - FixtureSilenced("linux:check_cpu"), - }, - }, - { - name: "silenced by multiple entries", - event: FixtureEvent("foo", "check_cpu"), // has a linux subscription - entries: []*Silenced{ - FixtureSilenced("entity:foo:*"), - FixtureSilenced("linux:check_cpu"), - }, - expectedEntries: []*Silenced{ - FixtureSilenced("entity:foo:*"), - FixtureSilenced("linux:check_cpu"), - }, - }, - { - name: "not silenced, silenced & client don't have a common subscription", - event: &Event{ - Check: &Check{ - ObjectMeta: ObjectMeta{ - Name: "check_cpu", - }, - Subscriptions: []string{"linux", "windows"}, - }, - Entity: &Entity{ - ObjectMeta: ObjectMeta{ - Name: "foo", - }, - Subscriptions: []string{"linux"}, - }, - }, - entries: []*Silenced{ - FixtureSilenced("windows:check_cpu"), - }, - expectedEntries: []*Silenced{}, - }, - { - name: "silenced, silenced & client do have a common subscription", - event: &Event{ - Check: &Check{ - ObjectMeta: ObjectMeta{ - Name: "check_cpu", - }, - Subscriptions: []string{"linux", "windows"}, - }, - Entity: &Entity{ - ObjectMeta: ObjectMeta{ - Name: "foo", - }, - Subscriptions: []string{"linux"}, - }, - }, - entries: []*Silenced{ - FixtureSilenced("linux:check_cpu"), - }, - expectedEntries: []*Silenced{ - FixtureSilenced("linux:check_cpu"), - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - result := tc.event.SilencedBy(tc.entries) - assert.EqualValues(t, tc.expectedEntries, result) - }) - } -} - -func TestIsSilencedBy(t *testing.T) { - testCases := []struct { - name string - event *Event - silence *Silenced - expectedResult bool - }{ - { - name: "silence has not started", - event: FixtureEvent("foo", "check_cpu"), - silence: &Silenced{ - ObjectMeta: ObjectMeta{ - Name: "*:check_cpu", - }, - Begin: time.Now().Add(1 * time.Hour).Unix(), - }, - expectedResult: false, - }, - { - name: "check matches w/ wildcard subscription", - event: FixtureEvent("foo", "check_cpu"), - silence: FixtureSilenced("*:check_cpu"), - expectedResult: true, - }, - { - name: "entity subscription matches w/ wildcard check", - event: FixtureEvent("foo", "check_cpu"), - silence: FixtureSilenced("entity:foo:*"), - expectedResult: true, - }, - { - name: "entity subscription and check match", - event: FixtureEvent("foo", "check_cpu"), - silence: FixtureSilenced("entity:foo:check_cpu"), - expectedResult: true, - }, - { - name: "subscription matches", - event: &Event{ - Check: &Check{ - ObjectMeta: ObjectMeta{ - Name: "check_cpu", - }, - Subscriptions: []string{"unix"}, - }, - Entity: &Entity{ - ObjectMeta: ObjectMeta{ - Name: "foo", - }, - Subscriptions: []string{"unix"}, - }, - }, - silence: FixtureSilenced("unix:check_cpu"), - expectedResult: true, - }, - { - name: "subscription does not match", - event: &Event{ - Check: &Check{ - ObjectMeta: ObjectMeta{ - Name: "check_cpu", - }, - Subscriptions: []string{"unix"}, - }, - Entity: &Entity{ - ObjectMeta: ObjectMeta{ - Name: "foo", - }, - Subscriptions: []string{"unix"}, - }, - }, - silence: FixtureSilenced("windows:check_cpu"), - expectedResult: false, - }, - { - name: "entity subscription doesn't match", - event: &Event{ - Check: &Check{ - ObjectMeta: ObjectMeta{ - Name: "check_cpu", - }, - Subscriptions: []string{"unix"}, - }, - Entity: &Entity{ - ObjectMeta: ObjectMeta{ - Name: "foo", - }, - Subscriptions: []string{"windows"}, - }, - }, - silence: &Silenced{ - Subscription: "check", - Check: "check_cpu", - }, - expectedResult: false, - }, - { - name: "check does not match", - event: FixtureEvent("foo", "check_mem"), - silence: FixtureSilenced("*:check_cpu"), - expectedResult: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - result := tc.event.IsSilencedBy(tc.silence) - assert.EqualValues(t, tc.expectedResult, result) - }) - } -} - -func fixtureNoID() *Event { - e := FixtureEvent("foo", "bar") - e.ID = nil - return e -} - -func fixtureBadID() *Event { - e := FixtureEvent("foo", "bar") - e.ID = []byte("not a uuid") - return e -} - -func TestMarshalUnmarshal(t *testing.T) { - tests := []struct { - Name string - Event *Event - MarshalError bool - }{ - { - Name: "event with no ID", - Event: fixtureNoID(), - }, - { - Name: "event with ID", - Event: FixtureEvent("foo", "bar"), - }, - { - Name: "event with invalid ID", - Event: fixtureBadID(), - MarshalError: true, - }, - } - for _, test := range tests { - t.Run(test.Name, func(t *testing.T) { - b, err := json.Marshal(test.Event) - if test.MarshalError { - if err == nil { - t.Fatal("expected non-nil error") - } - return - } - if err != nil { - t.Fatal(err) - } - var e Event - if err := json.Unmarshal(b, &e); err != nil { - t.Fatal(err) - } - if err := e.Validate(); err != nil { - t.Fatal(err) - } - }) - } -} - -func TestUnmarshalID(t *testing.T) { - tests := []struct { - Name string - Data string - UnmarshalError bool - }{ - { - Name: "no id", - Data: `{}`, - }, - { - Name: "has id", - Data: fmt.Sprintf(`{"id": %q}`, uuid.NameSpaceDNS), - }, - { - Name: "invalid id", - Data: `{"id": "not a uuid"}`, - UnmarshalError: true, - }, - } - for _, test := range tests { - t.Run(test.Name, func(t *testing.T) { - var e Event - err := json.Unmarshal([]byte(test.Data), &e) - if test.UnmarshalError { - if err == nil { - t.Fatal("expected non-nil error") - } - return - } - if err != nil { - t.Fatal(err) - } - }) - } -} - -func TestEventFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes entity.name", - args: FixtureEvent("frank", "reynolds"), - wantKey: "event.entity.name", - want: "frank", - }, - { - name: "exposes check.name", - args: FixtureEvent("frank", "reynolds"), - wantKey: "event.check.name", - want: "reynolds", - }, - { - name: "exposes check.state", - args: FixtureEvent("frank", "reynolds"), - wantKey: "event.check.state", - want: "passing", - }, - { - name: "exposes check labels", - args: &Event{ - Check: &Check{ObjectMeta: ObjectMeta{Labels: map[string]string{"src": "bonsai"}}}, - Entity: &Entity{}, - }, - wantKey: "event.labels.src", - want: "bonsai", - }, - { - name: "exposes entity labels", - args: &Event{ - Check: &Check{}, - Entity: &Entity{ObjectMeta: ObjectMeta{Labels: map[string]string{"region": "philadelphia"}}}, - }, - wantKey: "event.labels.region", - want: "philadelphia", - }, - { - name: "check labels take precendence", - args: &Event{ - Check: &Check{ObjectMeta: ObjectMeta{Labels: map[string]string{"dupe": "check"}}}, - Entity: &Entity{ObjectMeta: ObjectMeta{Labels: map[string]string{"dupe": "entity"}}}, - }, - wantKey: "event.labels.dupe", - want: "check", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("Event.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} - -func TestSetNamespace(t *testing.T) { - event := new(Event) - event.SetNamespace("foobar") - if event.Entity == nil { - t.Fatal("nil entity") - } - if got, want := event.Namespace, "foobar"; got != want { - t.Errorf("bad namespace: got %q, want %q", got, want) - } - if got, want := event.Entity.Namespace, "foobar"; got != want { - t.Errorf("bad namespace: got %q, want %q", got, want) - } - if event.Check != nil { - t.Fatal("check should have been nil") - } - event.Check = new(Check) - event.SetNamespace("foobar") - if got, want := event.Check.Namespace, "foobar"; got != want { - t.Errorf("bad namespace: got %q, want %q", got, want) - } -} - -func TestEventURIPath(t *testing.T) { - e := new(Event) - if got, want := e.URIPath(), "/api/core/v2/events"; got != want { - t.Errorf("bad URIPath; got %q, want %q", got, want) - } - e.SetNamespace("foobar") - if got, want := e.URIPath(), "/api/core/v2/namespaces/foobar/events"; got != want { - t.Errorf("bad URIPath; got %q, want %q", got, want) - } - e.Entity.Name = "baz" - if got, want := e.URIPath(), "/api/core/v2/namespaces/foobar/events/baz"; got != want { - t.Errorf("bad URIPath; got %q, want %q", got, want) - } - e.Check = new(Check) - e.Check.Name = "bep" - if got, want := e.URIPath(), "/api/core/v2/namespaces/foobar/events/baz/bep"; got != want { - t.Errorf("bad URIPath; got %q, want %q", got, want) - } -} diff --git a/api/core/v2/eventpb_test.go b/api/core/v2/eventpb_test.go deleted file mode 100644 index 9590bbb146..0000000000 --- a/api/core/v2/eventpb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/event.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestEventProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEvent(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Event{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestEventMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEvent(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Event{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEventJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEvent(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Event{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestEventProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEvent(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Event{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEventProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEvent(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Event{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEventFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEvent(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestEventSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEvent(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/extension.go b/api/core/v2/extension.go deleted file mode 100644 index 834bc8c743..0000000000 --- a/api/core/v2/extension.go +++ /dev/null @@ -1,81 +0,0 @@ -package v2 - -import ( - "errors" - "net/url" - "path" - - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // ExtensionsResource is the name of this resource type - ExtensionsResource = "extensions" -) - -// StorePrefix returns the path prefix to this resource in the store -func (e *Extension) StorePrefix() string { - return ExtensionsResource -} - -// URIPath returns the path component of an extension URI. -func (e *Extension) URIPath() string { - return path.Join(URLPrefix, "namespaces", url.PathEscape(e.Namespace), ExtensionsResource, url.PathEscape(e.Name)) -} - -// Validate validates the extension. -func (e *Extension) Validate() error { - if err := ValidateName(e.Name); err != nil { - return err - } - if e.URL == "" { - return errors.New("empty URL") - } - if e.Namespace == "" { - return errors.New("empty namespace") - } - return nil -} - -// FixtureExtension given a name returns a valid extension for use in tests -func FixtureExtension(name string) *Extension { - return &Extension{ - URL: "https://localhost:8080", - ObjectMeta: NewObjectMeta(name, "default"), - } -} - -// NewExtension intializes an extension with the given object meta -func NewExtension(meta ObjectMeta) *Extension { - return &Extension{ObjectMeta: meta} -} - -// ExtensionFields returns a set of fields that represent that resource -func ExtensionFields(r Resource) map[string]string { - resource := r.(*Extension) - fields := map[string]string{ - "extension.name": resource.ObjectMeta.Name, - "extension.namespace": resource.ObjectMeta.Namespace, - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "extension.labels.") - return fields -} - -// ExtensionFields returns a set of fields that represent that resource -func (e *Extension) Fields() map[string]string { - return ExtensionFields(e) -} - -// SetNamespace sets the namespace of the resource. -func (e *Extension) SetNamespace(namespace string) { - e.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (e *Extension) SetObjectMeta(meta ObjectMeta) { - e.ObjectMeta = meta -} - -func (e *Extension) RBACName() string { - return "extensions" -} diff --git a/api/core/v2/extension.pb.go b/api/core/v2/extension.pb.go deleted file mode 100644 index 086fde9535..0000000000 --- a/api/core/v2/extension.pb.go +++ /dev/null @@ -1,523 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/extension.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Extension is a registered sensu extension. -type Extension struct { - // Metadata contains the name, namespace, labels and annotations of the - // extension - ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // URL is the URL of the gRPC service that implements the extension. - URL string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Extension) Reset() { *m = Extension{} } -func (m *Extension) String() string { return proto.CompactTextString(m) } -func (*Extension) ProtoMessage() {} -func (*Extension) Descriptor() ([]byte, []int) { - return fileDescriptor_d136bd7d325a8cb9, []int{0} -} -func (m *Extension) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Extension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Extension.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Extension) XXX_Merge(src proto.Message) { - xxx_messageInfo_Extension.Merge(m, src) -} -func (m *Extension) XXX_Size() int { - return m.Size() -} -func (m *Extension) XXX_DiscardUnknown() { - xxx_messageInfo_Extension.DiscardUnknown(m) -} - -var xxx_messageInfo_Extension proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Extension)(nil), "sensu.core.v2.Extension") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/extension.proto", fileDescriptor_d136bd7d325a8cb9) -} - -var fileDescriptor_d136bd7d325a8cb9 = []byte{ - // 271 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4d, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0xa9, 0x15, - 0x25, 0xa9, 0x79, 0xc5, 0x99, 0xf9, 0x79, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, - 0x55, 0x7a, 0x20, 0x69, 0xbd, 0x32, 0x23, 0x29, 0x13, 0x24, 0x53, 0xd2, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0xaa, 0x92, 0x4a, 0xd3, 0x1c, 0xca, 0x0c, 0xf5, 0x8c, 0xf5, 0x0c, 0xc1, 0x82, 0x60, 0x31, - 0x30, 0x0b, 0x62, 0x88, 0x94, 0x01, 0x71, 0x76, 0xe7, 0xa6, 0x96, 0x24, 0x42, 0x74, 0x28, 0xb5, - 0x33, 0x72, 0x71, 0xba, 0xc2, 0x9c, 0x22, 0x14, 0xca, 0xc5, 0x01, 0x92, 0x4b, 0x49, 0x2c, 0x49, - 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd4, 0x43, 0x71, 0x97, 0x9e, 0x7f, 0x52, 0x56, - 0x6a, 0x72, 0x89, 0x6f, 0x6a, 0x49, 0xa2, 0x93, 0xdc, 0x89, 0x7b, 0xf2, 0x0c, 0x17, 0xee, 0xc9, - 0x33, 0xbe, 0xba, 0x27, 0x2f, 0x04, 0xd3, 0xa6, 0x93, 0x9f, 0x9b, 0x59, 0x92, 0x9a, 0x5b, 0x50, - 0x52, 0x19, 0x04, 0x37, 0x4a, 0x48, 0x92, 0x8b, 0xb9, 0xb4, 0x28, 0x47, 0x82, 0x49, 0x81, 0x51, - 0x83, 0xd3, 0x89, 0xfd, 0xd1, 0x3d, 0x79, 0xe6, 0xd0, 0x20, 0x9f, 0x20, 0x90, 0x98, 0x15, 0x47, - 0xc7, 0x02, 0x79, 0x86, 0x15, 0x0b, 0xe4, 0x19, 0x9d, 0x14, 0x7e, 0x3c, 0x94, 0x63, 0x5c, 0xf1, - 0x48, 0x8e, 0x71, 0xc7, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, - 0xf0, 0x48, 0x8e, 0x71, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa6, 0x32, 0xa3, 0x24, 0x36, 0xb0, 0x93, - 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x0e, 0x90, 0x2c, 0x62, 0x01, 0x00, 0x00, -} - -func (this *Extension) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Extension) - if !ok { - that2, ok := that.(Extension) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.URL != that1.URL { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type ExtensionFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetObjectMeta() ObjectMeta - GetURL() string -} - -func (this *Extension) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *Extension) TestProto() github_com_golang_protobuf_proto.Message { - return NewExtensionFromFace(this) -} - -func (this *Extension) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *Extension) GetURL() string { - return this.URL -} - -func NewExtensionFromFace(that ExtensionFace) *Extension { - this := &Extension{} - this.ObjectMeta = that.GetObjectMeta() - this.URL = that.GetURL() - return this -} - -func (m *Extension) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Extension) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.URL) > 0 { - i -= len(m.URL) - copy(dAtA[i:], m.URL) - i = encodeVarintExtension(dAtA, i, uint64(len(m.URL))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintExtension(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintExtension(dAtA []byte, offset int, v uint64) int { - offset -= sovExtension(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedExtension(r randyExtension, easy bool) *Extension { - this := &Extension{} - v1 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v1 - this.URL = string(randStringExtension(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedExtension(r, 3) - } - return this -} - -type randyExtension interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneExtension(r randyExtension) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringExtension(r randyExtension) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneExtension(r) - } - return string(tmps) -} -func randUnrecognizedExtension(r randyExtension, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldExtension(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldExtension(dAtA []byte, r randyExtension, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateExtension(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateExtension(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateExtension(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateExtension(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateExtension(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateExtension(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateExtension(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Extension) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovExtension(uint64(l)) - l = len(m.URL) - if l > 0 { - n += 1 + l + sovExtension(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovExtension(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozExtension(x uint64) (n int) { - return sovExtension(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Extension) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExtension - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Extension: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Extension: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExtension - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthExtension - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthExtension - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExtension - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthExtension - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthExtension - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.URL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipExtension(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthExtension - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipExtension(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExtension - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExtension - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowExtension - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthExtension - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupExtension - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthExtension - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthExtension = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowExtension = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupExtension = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/extension.proto b/api/core/v2/extension.proto deleted file mode 100644 index 16bcdc382b..0000000000 --- a/api/core/v2/extension.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// Extension is a registered sensu extension. -message Extension { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Metadata contains the name, namespace, labels and annotations of the - // extension - ObjectMeta metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - - // URL is the URL of the gRPC service that implements the extension. - string url = 2 [ (gogoproto.customname) = "URL" ]; -} diff --git a/api/core/v2/extension_test.go b/api/core/v2/extension_test.go deleted file mode 100644 index d69f03b8da..0000000000 --- a/api/core/v2/extension_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package v2 - -import ( - "reflect" - "testing" -) - -func TestExtensionFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureExtension("widget"), - wantKey: "extension.name", - want: "widget", - }, - { - name: "exposes labels", - args: &Extension{ - ObjectMeta: ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "extension.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("Extension.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/extensionpb_test.go b/api/core/v2/extensionpb_test.go deleted file mode 100644 index 323e4f00f2..0000000000 --- a/api/core/v2/extensionpb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/extension.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestExtensionProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExtension(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Extension{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestExtensionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExtension(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Extension{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestExtensionJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExtension(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Extension{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestExtensionProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExtension(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Extension{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestExtensionProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExtension(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Extension{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestExtensionFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedExtension(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestExtensionSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedExtension(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/fielder.go b/api/core/v2/fielder.go deleted file mode 100644 index 9f586593e3..0000000000 --- a/api/core/v2/fielder.go +++ /dev/null @@ -1,7 +0,0 @@ -package v2 - -// Fielder includes a set of fields that represent a resource. -type Fielder interface { - // Fields returns a set of fields that represent the resource. - Fields() map[string]string -} diff --git a/api/core/v2/filter.go b/api/core/v2/filter.go deleted file mode 100644 index fdb3fa0340..0000000000 --- a/api/core/v2/filter.go +++ /dev/null @@ -1,196 +0,0 @@ -package v2 - -import ( - "errors" - "fmt" - "net/url" - "path" - "sort" - "strings" - - "github.com/sensu/sensu-go/api/core/v2/internal/js" - utilstrings "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // EventFiltersResource is the name of this resource type - EventFiltersResource = "filters" - - // EventFilterActionAllow is an action to allow events to pass through to the pipeline - EventFilterActionAllow = "allow" - - // EventFilterActionDeny is an action to deny events from passing through to the pipeline - EventFilterActionDeny = "deny" - - // DefaultEventFilterAction is the default action for filters - DefaultEventFilterAction = EventFilterActionAllow -) - -var ( - // EventFilterAllActions is a list of actions that can be used by filters - EventFilterAllActions = []string{ - EventFilterActionAllow, - EventFilterActionDeny, - } -) - -// StorePrefix returns the path prefix to this resource in the store -func (f *EventFilter) StorePrefix() string { - return "event-filters" -} - -// URIPath returns the path component of an event filter URI. -func (f *EventFilter) URIPath() string { - if f.Namespace == "" { - return path.Join(URLPrefix, EventFiltersResource, url.PathEscape(f.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(f.Namespace), EventFiltersResource, url.PathEscape(f.Name)) -} - -// Validate returns an error if the filter does not pass validation tests. -func (f *EventFilter) Validate() error { - if err := ValidateName(f.Name); err != nil { - return errors.New("filter name " + err.Error()) - } - - if found := utilstrings.InArray(f.Action, EventFilterAllActions); !found { - return fmt.Errorf("action '%s' is not valid", f.Action) - } - - if len(f.Expressions) == 0 { - return errors.New("filter must have one or more expressions") - } - - if err := js.ParseExpressions(f.Expressions); err != nil { - return err - } - - if f.Namespace == "" { - return errors.New("namespace must be set") - } - - return nil -} - -// Update updates e with selected fields. Returns non-nil error if any of the -// selected fields are unsupported. -func (f *EventFilter) Update(from *EventFilter, fields ...string) error { - for _, field := range fields { - switch field { - case "Action": - f.Action = from.Action - case "When": - f.When = from.When - case "Expressions": - f.Expressions = append(f.Expressions[0:0], from.Expressions...) - case "RuntimeAssets": - f.RuntimeAssets = append(f.RuntimeAssets[0:0], from.RuntimeAssets...) - default: - return fmt.Errorf("unsupported field: %q", f) - } - } - return nil -} - -// NewEventFilter creates a new EventFilter. -func NewEventFilter(meta ObjectMeta) *EventFilter { - return &EventFilter{ObjectMeta: meta} -} - -// FixtureEventFilter returns a Filter fixture for testing. -func FixtureEventFilter(name string) *EventFilter { - return &EventFilter{ - Action: EventFilterActionAllow, - Expressions: []string{"event.check.team == 'ops'"}, - ObjectMeta: NewObjectMeta(name, "default"), - } -} - -// FixtureDenyEventFilter returns a Filter fixture for testing. -func FixtureDenyEventFilter(name string) *EventFilter { - return &EventFilter{ - Action: EventFilterActionDeny, - Expressions: []string{"event.check.team == 'ops'"}, - ObjectMeta: ObjectMeta{ - Namespace: "default", - Name: name, - }, - } -} - -// -// Sorting -// -type cmpEventFilter func(a, b *EventFilter) bool - -// SortEventFiltersByPredicate can be used to sort a given collection using a given -// predicate. -func SortEventFiltersByPredicate(ef []*EventFilter, fn cmpEventFilter) sort.Interface { - return &eventFilterSorter{eventFilters: ef, byFn: fn} -} - -// SortEventFiltersByName can be used to sort a given collection of event filter by -// their names. -func SortEventFiltersByName(ef []*EventFilter, asc bool) sort.Interface { - if asc { - return SortEventFiltersByPredicate(ef, func(a, b *EventFilter) bool { - return a.Name < b.Name - }) - } - - return SortEventFiltersByPredicate(ef, func(a, b *EventFilter) bool { - return a.Name > b.Name - }) -} - -type eventFilterSorter struct { - eventFilters []*EventFilter - byFn cmpEventFilter -} - -// Len implements sort.Interface. -func (s *eventFilterSorter) Len() int { - return len(s.eventFilters) -} - -// Swap implements sort.Interface. -func (s *eventFilterSorter) Swap(i, j int) { - s.eventFilters[i], s.eventFilters[j] = s.eventFilters[j], s.eventFilters[i] -} - -// Less implements sort.Interface. -func (s *eventFilterSorter) Less(i, j int) bool { - return s.byFn(s.eventFilters[i], s.eventFilters[j]) -} - -// EventFilterFields returns a set of fields that represent that resource -func EventFilterFields(r Resource) map[string]string { - resource := r.(*EventFilter) - fields := map[string]string{ - "filter.name": resource.ObjectMeta.Name, - "filter.namespace": resource.ObjectMeta.Namespace, - "filter.action": resource.Action, - "filter.runtime_assets": strings.Join(resource.RuntimeAssets, ","), - } - utilstrings.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "filter.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (e *EventFilter) Fields() map[string]string { - return EventFilterFields(e) -} - -// SetNamespace sets the namespace of the resource. -func (f *EventFilter) SetNamespace(namespace string) { - f.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (f *EventFilter) SetObjectMeta(meta ObjectMeta) { - f.ObjectMeta = meta -} - -func (f *EventFilter) RBACName() string { - return "filters" -} diff --git a/api/core/v2/filter.pb.go b/api/core/v2/filter.pb.go deleted file mode 100644 index f4df72d437..0000000000 --- a/api/core/v2/filter.pb.go +++ /dev/null @@ -1,735 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/filter.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// EventFilter is a filter specification. -type EventFilter struct { - // Metadata contains the name, namespace, labels and annotations of the - // filter - ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // Action specifies to allow/deny events to continue through the pipeline - Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` - // Expressions is an array of boolean expressions that are &&'d together - // to determine if the event matches this filter. - Expressions []string `protobuf:"bytes,3,rep,name=expressions,proto3" json:"expressions"` - // When indicates a TimeWindowWhen that a filter uses to filter by days & - // times - When *TimeWindowWhen `protobuf:"bytes,6,opt,name=when,proto3" json:"when,omitempty"` - // Runtime assets are Sensu assets that contain javascript libraries. They - // are evaluated within the execution context. - RuntimeAssets []string `protobuf:"bytes,8,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EventFilter) Reset() { *m = EventFilter{} } -func (m *EventFilter) String() string { return proto.CompactTextString(m) } -func (*EventFilter) ProtoMessage() {} -func (*EventFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_b7dc9b35dab378f8, []int{0} -} -func (m *EventFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventFilter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventFilter.Merge(m, src) -} -func (m *EventFilter) XXX_Size() int { - return m.Size() -} -func (m *EventFilter) XXX_DiscardUnknown() { - xxx_messageInfo_EventFilter.DiscardUnknown(m) -} - -var xxx_messageInfo_EventFilter proto.InternalMessageInfo - -func init() { - proto.RegisterType((*EventFilter)(nil), "sensu.core.v2.EventFilter") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/filter.proto", fileDescriptor_b7dc9b35dab378f8) -} - -var fileDescriptor_b7dc9b35dab378f8 = []byte{ - // 375 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x50, 0xc1, 0x4e, 0xea, 0x40, - 0x14, 0x65, 0xe0, 0x85, 0x40, 0x09, 0xef, 0x25, 0xb3, 0x78, 0xe9, 0x23, 0x79, 0xd3, 0xe6, 0xad, - 0x58, 0x3c, 0xa7, 0xb6, 0x98, 0x18, 0x5d, 0x29, 0x89, 0xee, 0x8c, 0x49, 0xa3, 0x21, 0x71, 0x63, - 0xda, 0x32, 0x94, 0x31, 0x76, 0xa6, 0xe9, 0x4c, 0x8b, 0xfe, 0x81, 0x9f, 0xe0, 0x92, 0x9d, 0x7c, - 0x82, 0x9f, 0xc0, 0x92, 0x2f, 0x68, 0xb4, 0xee, 0xf8, 0x02, 0x97, 0x86, 0x01, 0x0d, 0xb2, 0x62, - 0x33, 0x99, 0x73, 0xef, 0x39, 0xe7, 0xde, 0x7b, 0x34, 0x27, 0xa4, 0x72, 0x98, 0xfa, 0x38, 0xe0, - 0x91, 0x25, 0x08, 0x13, 0xe9, 0xf2, 0xdd, 0x09, 0xb9, 0xe5, 0xc5, 0xd4, 0x0a, 0x78, 0x42, 0xac, - 0xcc, 0xb1, 0x06, 0xf4, 0x56, 0x92, 0x04, 0xc7, 0x09, 0x97, 0x1c, 0x36, 0x15, 0x05, 0x2f, 0x7a, - 0x38, 0x73, 0x5a, 0x7b, 0x6b, 0x16, 0x21, 0x0f, 0xb9, 0xa5, 0x58, 0x7e, 0x3a, 0x38, 0xca, 0x6c, - 0xdc, 0xc1, 0xb6, 0x2a, 0xaa, 0x9a, 0xfa, 0x2d, 0x4d, 0x5a, 0xfb, 0xdb, 0x0d, 0x96, 0x34, 0x22, - 0xd7, 0x23, 0xca, 0xfa, 0x7c, 0xb4, 0x12, 0xee, 0x6e, 0x27, 0x8c, 0x88, 0xf4, 0x96, 0x8a, 0x7f, - 0x4f, 0x65, 0xad, 0x71, 0x92, 0x11, 0x26, 0x4f, 0xd5, 0x15, 0xf0, 0x52, 0xab, 0x2d, 0xba, 0x7d, - 0x4f, 0x7a, 0x3a, 0x30, 0x41, 0xbb, 0xe1, 0xfc, 0xc1, 0xdf, 0x4e, 0xc2, 0xe7, 0xfe, 0x0d, 0x09, - 0xe4, 0x19, 0x91, 0x5e, 0x17, 0x4d, 0x73, 0xa3, 0x34, 0xcb, 0x0d, 0x30, 0xcf, 0x0d, 0xf8, 0x29, - 0xfb, 0xcf, 0x23, 0x2a, 0x49, 0x14, 0xcb, 0x7b, 0xf7, 0xcb, 0x0a, 0xfe, 0xd6, 0xaa, 0x5e, 0x20, - 0x29, 0x67, 0x7a, 0xd9, 0x04, 0xed, 0xba, 0xbb, 0x42, 0xd0, 0xd6, 0x1a, 0xe4, 0x2e, 0x4e, 0x88, - 0x10, 0x94, 0x33, 0xa1, 0x57, 0xcc, 0x4a, 0xbb, 0xde, 0xfd, 0x35, 0xcf, 0x8d, 0xf5, 0xb2, 0xbb, - 0x0e, 0xa0, 0xad, 0xfd, 0x18, 0x0d, 0x09, 0xd3, 0xab, 0x6a, 0xbb, 0xbf, 0x1b, 0xdb, 0x5d, 0xd0, - 0x88, 0xf4, 0x54, 0x24, 0xbd, 0x21, 0x61, 0xae, 0xa2, 0xc2, 0x03, 0xed, 0x67, 0x92, 0x32, 0x15, - 0x97, 0x27, 0x04, 0x91, 0x42, 0xaf, 0xa9, 0x41, 0x70, 0x9e, 0x1b, 0x1b, 0x1d, 0xb7, 0xb9, 0xc2, - 0xc7, 0x0a, 0x1e, 0xd6, 0x1e, 0xc6, 0x46, 0x69, 0x32, 0x36, 0x40, 0xd7, 0x7c, 0x7f, 0x45, 0x60, - 0x52, 0x20, 0xf0, 0x5c, 0x20, 0x30, 0x2d, 0x10, 0x98, 0x15, 0x08, 0xbc, 0x14, 0x08, 0x3c, 0xbe, - 0xa1, 0xd2, 0x55, 0x39, 0x73, 0xfc, 0xaa, 0x8a, 0xb4, 0xf3, 0x11, 0x00, 0x00, 0xff, 0xff, 0x5e, - 0x6b, 0x9d, 0x30, 0x38, 0x02, 0x00, 0x00, -} - -func (this *EventFilter) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*EventFilter) - if !ok { - that2, ok := that.(EventFilter) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.Action != that1.Action { - return false - } - if len(this.Expressions) != len(that1.Expressions) { - return false - } - for i := range this.Expressions { - if this.Expressions[i] != that1.Expressions[i] { - return false - } - } - if !this.When.Equal(that1.When) { - return false - } - if len(this.RuntimeAssets) != len(that1.RuntimeAssets) { - return false - } - for i := range this.RuntimeAssets { - if this.RuntimeAssets[i] != that1.RuntimeAssets[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type EventFilterFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetObjectMeta() ObjectMeta - GetAction() string - GetExpressions() []string - GetWhen() *TimeWindowWhen - GetRuntimeAssets() []string -} - -func (this *EventFilter) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *EventFilter) TestProto() github_com_golang_protobuf_proto.Message { - return NewEventFilterFromFace(this) -} - -func (this *EventFilter) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *EventFilter) GetAction() string { - return this.Action -} - -func (this *EventFilter) GetExpressions() []string { - return this.Expressions -} - -func (this *EventFilter) GetWhen() *TimeWindowWhen { - return this.When -} - -func (this *EventFilter) GetRuntimeAssets() []string { - return this.RuntimeAssets -} - -func NewEventFilterFromFace(that EventFilterFace) *EventFilter { - this := &EventFilter{} - this.ObjectMeta = that.GetObjectMeta() - this.Action = that.GetAction() - this.Expressions = that.GetExpressions() - this.When = that.GetWhen() - this.RuntimeAssets = that.GetRuntimeAssets() - return this -} - -func (m *EventFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventFilter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.RuntimeAssets) > 0 { - for iNdEx := len(m.RuntimeAssets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RuntimeAssets[iNdEx]) - copy(dAtA[i:], m.RuntimeAssets[iNdEx]) - i = encodeVarintFilter(dAtA, i, uint64(len(m.RuntimeAssets[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if m.When != nil { - { - size, err := m.When.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFilter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.Expressions) > 0 { - for iNdEx := len(m.Expressions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Expressions[iNdEx]) - copy(dAtA[i:], m.Expressions[iNdEx]) - i = encodeVarintFilter(dAtA, i, uint64(len(m.Expressions[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Action) > 0 { - i -= len(m.Action) - copy(dAtA[i:], m.Action) - i = encodeVarintFilter(dAtA, i, uint64(len(m.Action))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFilter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintFilter(dAtA []byte, offset int, v uint64) int { - offset -= sovFilter(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedEventFilter(r randyFilter, easy bool) *EventFilter { - this := &EventFilter{} - v1 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v1 - this.Action = string(randStringFilter(r)) - v2 := r.Intn(10) - this.Expressions = make([]string, v2) - for i := 0; i < v2; i++ { - this.Expressions[i] = string(randStringFilter(r)) - } - if r.Intn(5) != 0 { - this.When = NewPopulatedTimeWindowWhen(r, easy) - } - v3 := r.Intn(10) - this.RuntimeAssets = make([]string, v3) - for i := 0; i < v3; i++ { - this.RuntimeAssets[i] = string(randStringFilter(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedFilter(r, 9) - } - return this -} - -type randyFilter interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneFilter(r randyFilter) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringFilter(r randyFilter) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneFilter(r) - } - return string(tmps) -} -func randUnrecognizedFilter(r randyFilter, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldFilter(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldFilter(dAtA []byte, r randyFilter, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateFilter(dAtA, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - dAtA = encodeVarintPopulateFilter(dAtA, uint64(v5)) - case 1: - dAtA = encodeVarintPopulateFilter(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateFilter(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateFilter(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateFilter(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateFilter(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *EventFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovFilter(uint64(l)) - l = len(m.Action) - if l > 0 { - n += 1 + l + sovFilter(uint64(l)) - } - if len(m.Expressions) > 0 { - for _, s := range m.Expressions { - l = len(s) - n += 1 + l + sovFilter(uint64(l)) - } - } - if m.When != nil { - l = m.When.Size() - n += 1 + l + sovFilter(uint64(l)) - } - if len(m.RuntimeAssets) > 0 { - for _, s := range m.RuntimeAssets { - l = len(s) - n += 1 + l + sovFilter(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovFilter(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFilter(x uint64) (n int) { - return sovFilter(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EventFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFilter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFilter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFilter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFilter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFilter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFilter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFilter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Action = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expressions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFilter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFilter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFilter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Expressions = append(m.Expressions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field When", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFilter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFilter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFilter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.When == nil { - m.When = &TimeWindowWhen{} - } - if err := m.When.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeAssets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFilter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFilter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFilter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeAssets = append(m.RuntimeAssets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFilter(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFilter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFilter(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFilter - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFilter - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFilter - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthFilter - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFilter - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFilter - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFilter = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFilter = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFilter = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/filter.proto b/api/core/v2/filter.proto deleted file mode 100644 index 3af3faf4aa..0000000000 --- a/api/core/v2/filter.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/time_window.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// EventFilter is a filter specification. -message EventFilter { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Metadata contains the name, namespace, labels and annotations of the - // filter - ObjectMeta metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - - // Action specifies to allow/deny events to continue through the pipeline - string action = 2; - - // Expressions is an array of boolean expressions that are &&'d together - // to determine if the event matches this filter. - repeated string expressions = 3 [ (gogoproto.jsontag) = "expressions" ]; - - // When indicates a TimeWindowWhen that a filter uses to filter by days & - // times - TimeWindowWhen when = 6; - - // Runtime assets are Sensu assets that contain javascript libraries. They - // are evaluated within the execution context. - repeated string runtime_assets = 8 [ (gogoproto.jsontag) = "runtime_assets" ]; -} diff --git a/api/core/v2/filter_test.go b/api/core/v2/filter_test.go deleted file mode 100644 index d989e5513b..0000000000 --- a/api/core/v2/filter_test.go +++ /dev/null @@ -1,87 +0,0 @@ -package v2 - -import ( - "reflect" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestFixtureEventFilter(t *testing.T) { - filter := FixtureEventFilter("filter") - assert.Equal(t, "filter", filter.Name) - assert.Equal(t, EventFilterActionAllow, filter.Action) - assert.Equal(t, []string{"event.check.team == 'ops'"}, filter.Expressions) - assert.NoError(t, filter.Validate()) -} - -func TestFixtureDenyEventFilter(t *testing.T) { - filter := FixtureDenyEventFilter("filter") - assert.Equal(t, "filter", filter.Name) - assert.Equal(t, EventFilterActionDeny, filter.Action) - assert.Equal(t, []string{"event.check.team == 'ops'"}, filter.Expressions) - assert.NoError(t, filter.Validate()) -} - -func TestEventFilterValidate(t *testing.T) { - var f EventFilter - - // Invalid name - assert.Error(t, f.Validate()) - f.Name = "foo" - - // Invalid action - assert.Error(t, f.Validate()) - f.Action = "allow" - - // Invalid attributes - assert.Error(t, f.Validate()) - f.Expressions = []string{"event.check.team == 'ops'"} - - // Invalid namespace - assert.Error(t, f.Validate()) - f.Namespace = "default" - - // Valid filter - assert.NoError(t, f.Validate()) -} - -func TestEventFilterFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureEventFilter("allow-silenced"), - wantKey: "filter.name", - want: "allow-silenced", - }, - { - name: "exposes action", - args: &EventFilter{Action: "allow"}, - wantKey: "filter.action", - want: "allow", - }, - { - name: "exposes labels", - args: &EventFilter{ - ObjectMeta: ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "filter.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("EventFilter.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/filterpb_test.go b/api/core/v2/filterpb_test.go deleted file mode 100644 index 52094f52e0..0000000000 --- a/api/core/v2/filterpb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/filter.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestEventFilterProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEventFilter(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EventFilter{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestEventFilterMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEventFilter(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EventFilter{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEventFilterJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEventFilter(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EventFilter{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestEventFilterProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEventFilter(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &EventFilter{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEventFilterProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEventFilter(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &EventFilter{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEventFilterFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEventFilter(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestEventFilterSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEventFilter(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/flapping.go b/api/core/v2/flapping.go deleted file mode 100644 index 6123b1d80b..0000000000 --- a/api/core/v2/flapping.go +++ /dev/null @@ -1,62 +0,0 @@ -package v2 - -// isFlapping determines if the check is flapping, based on the TotalStateChange -// and configured thresholds -func isFlapping(check *Check) bool { - if check == nil { - return false - } - - if check.LowFlapThreshold == 0 || check.HighFlapThreshold == 0 { - return false - } - - // Is the check already flapping? - previous := check.previousOccurrence() - if previous != nil && previous.Flapping { - return check.TotalStateChange > check.LowFlapThreshold - } - - // The check was not flapping, now determine if it does now - return check.TotalStateChange >= check.HighFlapThreshold -} - -// updateCheckState determines the check state based on whether the check is -// flapping, and its status -func updateCheckState(check *Check) { - if check == nil { - return - } - check.TotalStateChange = totalStateChange(check) - if isFlapping(check) { - check.State = EventFlappingState - } else if check.Status == 0 { - check.State = EventPassingState - check.LastOK = check.Executed - } else { - check.State = EventFailingState - } -} - -// totalStateChange calculates the total state change percentage for the -// history, which is later used for check state flap detection. -func totalStateChange(check *Check) uint32 { - if check == nil || len(check.History) < 21 { - return 0 - } - - stateChanges := 0.00 - changeWeight := 0.80 - previousStatus := check.History[0].Status - - for i := 1; i <= len(check.History)-1; i++ { - if check.History[i].Status != previousStatus { - stateChanges += changeWeight - } - - changeWeight += 0.02 - previousStatus = check.History[i].Status - } - - return uint32(float32(stateChanges) / 20 * 100) -} diff --git a/api/core/v2/flapping_test.go b/api/core/v2/flapping_test.go deleted file mode 100644 index 8b9456315e..0000000000 --- a/api/core/v2/flapping_test.go +++ /dev/null @@ -1,196 +0,0 @@ -package v2 - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -func fictionalHistory() []CheckHistory { - return []CheckHistory{ - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 1}, - CheckHistory{Status: 2}, - CheckHistory{Status: 3}, - CheckHistory{Status: 3}, - CheckHistory{Status: 3}, - CheckHistory{Status: 3}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 1}, - CheckHistory{Status: 1}, - CheckHistory{Status: 1}, - CheckHistory{Status: 1}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 2}, - CheckHistory{Status: 2}, - } -} - -func TestIsFlapping(t *testing.T) { - testCases := []struct { - desc string - event *Event - expectedFlapping bool - }{ - { - "low_flap_threshold not configured", - &Event{ - Check: &Check{}, - }, - false, - }, - { - "high_flap_threshold not configured", - &Event{ - Check: &Check{ - LowFlapThreshold: 10, - }, - }, - false, - }, - { - "check is still flapping", - &Event{ - Check: &Check{ - LowFlapThreshold: 10, - HighFlapThreshold: 30, - State: EventFlappingState, - TotalStateChange: 15, - History: []CheckHistory{ - CheckHistory{Flapping: true}, - CheckHistory{Flapping: true}, - }, - }, - }, - true, - }, - { - "check is no longer flapping", - &Event{ - Check: &Check{ - LowFlapThreshold: 10, - HighFlapThreshold: 30, - State: EventFlappingState, - History: []CheckHistory{ - CheckHistory{Flapping: true}, - CheckHistory{Flapping: true}, - }, - TotalStateChange: 5, - }, - }, - false, - }, - { - "check is now flapping", - &Event{ - Check: &Check{ - LowFlapThreshold: 10, - HighFlapThreshold: 30, - State: EventFailingState, - TotalStateChange: 35, - History: []CheckHistory{ - CheckHistory{Flapping: false}, - CheckHistory{Flapping: false}, - }, - }, - }, - true, - }, - { - "check is not flapping", - &Event{ - Check: &Check{ - State: EventPassingState, - LowFlapThreshold: 10, - HighFlapThreshold: 30, - TotalStateChange: 5, - History: []CheckHistory{ - CheckHistory{Flapping: false}, - CheckHistory{Flapping: false}, - }, - }, - }, - false, - }, - } - - for _, tc := range testCases { - t.Run(tc.desc, func(t *testing.T) { - result := isFlapping(tc.event.Check) - assert.Equal(t, tc.expectedFlapping, result) - }) - } -} - -func TestTotalStateChange(t *testing.T) { - testCases := []struct { - desc string - event *Event - expectedTotalStateChange uint32 - }{ - { - "with less than 21 check result", - &Event{ - Check: &Check{ - History: make([]CheckHistory, 20), - }, - }, - 0, - }, - { - "with no changes", - &Event{ - Check: &Check{ - History: []CheckHistory{ - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - CheckHistory{Status: 0}, - }, - }, - }, - 0, - }, - { - "and weights the last 21 check result", - &Event{ - Check: &Check{ - History: fictionalHistory(), - }, - }, - 34, - }, - } - - for _, tc := range testCases { - testName := fmt.Sprintf("calculate total state change %s", tc.desc) - t.Run(testName, func(t *testing.T) { - result := totalStateChange(tc.event.Check) - assert.Equal(t, tc.expectedTotalStateChange, result) - }) - } -} diff --git a/api/core/v2/go.mod b/api/core/v2/go.mod deleted file mode 100644 index 0b1a52a1e6..0000000000 --- a/api/core/v2/go.mod +++ /dev/null @@ -1,19 +0,0 @@ -module github.com/sensu/sensu-go/api/core/v2 - -go 1.16 - -require ( - github.com/echlebek/crock v1.0.1 - github.com/echlebek/timeproxy v1.0.0 - github.com/gogo/protobuf v1.3.2 - github.com/golang-jwt/jwt/v4 v4.4.3 - github.com/golang/protobuf v1.5.2 - github.com/google/uuid v1.1.2 - github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff - github.com/robfig/cron/v3 v3.0.1 - github.com/sirupsen/logrus v1.9.3 - github.com/stretchr/testify v1.7.0 - go.etcd.io/etcd/api/v3 v3.5.0 - gopkg.in/sourcemap.v1 v1.0.5 // indirect - gopkg.in/yaml.v2 v2.3.0 // indirect -) diff --git a/api/core/v2/go.sum b/api/core/v2/go.sum deleted file mode 100644 index f61d1c40a5..0000000000 --- a/api/core/v2/go.sum +++ /dev/null @@ -1,175 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/echlebek/crock v1.0.1 h1:KbzamClMIfVIkkjq/GTXf+N16KylYBpiaTitO3f1ujg= -github.com/echlebek/crock v1.0.1/go.mod h1:/kvwHRX3ZXHj/kHWJkjXDmzzRow54EJuHtQ/PapL/HI= -github.com/echlebek/timeproxy v1.0.0 h1:V41/v8tmmMDNMA2GrBPI45nlXb3F7+OY+nJz1BqKsCk= -github.com/echlebek/timeproxy v1.0.0/go.mod h1:0dg2Lnb8no/jFwoMQKMTU6iAivgoMptGqSTprhnrRtk= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= -github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.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.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff h1:+6NUiITWwE5q1KO6SAfUX918c+Tab0+tGAM/mtdlUyA= -github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= -github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= -github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.0 h1:GsV3S+OfZEOCNXdtNkBSR7kgLobAa/SO6tCxRa0GAYw= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -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.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= -gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -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.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/api/core/v2/handler.go b/api/core/v2/handler.go deleted file mode 100644 index f2f917cfeb..0000000000 --- a/api/core/v2/handler.go +++ /dev/null @@ -1,215 +0,0 @@ -package v2 - -import ( - "errors" - "fmt" - "net/url" - "path" - "sort" - "strings" - - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // HandlersResource is the name of this resource type - HandlersResource = "handlers" - - // HandlerPipeType represents handlers that pipes event data // into arbitrary - // commands via STDIN - HandlerPipeType = "pipe" - - // HandlerSetType represents handlers that groups event handlers, making it - // easy to manage groups of actions that should be executed for certain types - // of events. - HandlerSetType = "set" - - // HandlerTCPType represents handlers that send event data to a remote TCP - // socket - HandlerTCPType = "tcp" - - // HandlerUDPType represents handlers that send event data to a remote UDP - // socket - HandlerUDPType = "udp" - - // KeepaliveHandlerName is the name of the handler that is executed when - // a keepalive timeout occurs. - KeepaliveHandlerName = "keepalive" - - // RegistrationHandlerName is the name of the handler that is executed when - // a registration event is passed to pipelined. - RegistrationHandlerName = "registration" -) - -// StorePrefix returns the path prefix to this resource in the store -func (h *Handler) StorePrefix() string { - return HandlersResource -} - -// URIPath returns the path component of a handler URI. -func (h *Handler) URIPath() string { - if h.Namespace == "" { - return path.Join(URLPrefix, HandlersResource, url.PathEscape(h.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(h.Namespace), HandlersResource, url.PathEscape(h.Name)) -} - -// Validate returns an error if the handler does not pass validation tests. -func (h *Handler) Validate() error { - if err := ValidateName(h.Name); err != nil { - return errors.New("handler name " + err.Error()) - } - - if err := h.validateType(); err != nil { - return err - } - - if h.Namespace == "" { - return errors.New("namespace must be set") - } - - return nil -} - -func (h *Handler) validateType() error { - if h.Type == "" { - return errors.New("empty handler type") - } - - switch h.Type { - case "pipe": - if strings.TrimSpace(h.Command) == "" { - return errors.New("missing command") - } - return nil - case "set": - return nil - case "tcp", "udp": - return h.Socket.Validate() - } - - return fmt.Errorf("unknown handler type: %s", h.Type) -} - -// Validate returns an error if the handler socket does not pass validation tests. -func (s *HandlerSocket) Validate() error { - if s == nil { - return errors.New("tcp and udp handlers need a valid socket") - } - if len(s.Host) == 0 { - return errors.New("socket host undefined") - } - if s.Port == 0 { - return errors.New("socket port undefined") - } - return nil -} - -// NewHandler creates a new Handler. -func NewHandler(meta ObjectMeta) *Handler { - return &Handler{ObjectMeta: meta} -} - -// -// Sorting - -type cmpHandler func(a, b *Handler) bool - -// SortHandlersByPredicate is used to sort a given collection using a given predicate. -func SortHandlersByPredicate(hs []*Handler, fn cmpHandler) sort.Interface { - return &handlerSorter{handlers: hs, byFn: fn} -} - -// SortHandlersByName is used to sort a given collection of handlers by their names. -func SortHandlersByName(hs []*Handler, asc bool) sort.Interface { - if asc { - return SortHandlersByPredicate(hs, func(a, b *Handler) bool { - return a.Name < b.Name - }) - } - - return SortHandlersByPredicate(hs, func(a, b *Handler) bool { - return a.Name > b.Name - }) -} - -type handlerSorter struct { - handlers []*Handler - byFn cmpHandler -} - -// Len implements sort.Interface -func (s *handlerSorter) Len() int { - return len(s.handlers) -} - -// Swap implements sort.Interface -func (s *handlerSorter) Swap(i, j int) { - s.handlers[i], s.handlers[j] = s.handlers[j], s.handlers[i] -} - -// Less implements sort.Interface -func (s *handlerSorter) Less(i, j int) bool { - return s.byFn(s.handlers[i], s.handlers[j]) -} - -// FixtureHandler returns a Handler fixture for testing. -func FixtureHandler(name string) *Handler { - return &Handler{ - Type: HandlerPipeType, - Command: "command", - ObjectMeta: NewObjectMeta(name, "default"), - } -} - -// FixtureSocketHandler returns a Handler fixture for testing. -func FixtureSocketHandler(name string, proto string) *Handler { - handler := FixtureHandler(name) - handler.Type = proto - handler.Socket = &HandlerSocket{ - Host: "127.0.0.1", - Port: 3001, - } - return handler -} - -// FixtureSetHandler returns a Handler fixture for testing. -func FixtureSetHandler(name string, handlers ...string) *Handler { - handler := FixtureHandler(name) - handler.Handlers = handlers - return handler -} - -// HandlerFields returns a set of fields that represent that resource -func HandlerFields(r Resource) map[string]string { - resource := r.(*Handler) - fields := map[string]string{ - "handler.name": resource.ObjectMeta.Name, - "handler.namespace": resource.ObjectMeta.Namespace, - "handler.filters": strings.Join(resource.Filters, ","), - "handler.handlers": strings.Join(resource.Handlers, ","), - "handler.mutator": resource.Mutator, - "handler.type": resource.Type, - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "handler.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (h *Handler) Fields() map[string]string { - return HandlerFields(h) -} - -// SetNamespace sets the namespace of the resource. -func (h *Handler) SetNamespace(namespace string) { - h.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (h *Handler) SetObjectMeta(meta ObjectMeta) { - h.ObjectMeta = meta -} - -func (h *Handler) RBACName() string { - return "handlers" -} diff --git a/api/core/v2/handler.pb.go b/api/core/v2/handler.pb.go deleted file mode 100644 index c74a668abc..0000000000 --- a/api/core/v2/handler.pb.go +++ /dev/null @@ -1,1363 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/handler.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// A Handler is a handler specification. -type Handler struct { - // Metadata contains the name, namespace, labels and annotations of the - // handler - ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // Type is the handler type, i.e. pipe. - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // Mutator is the handler event data mutator. - Mutator string `protobuf:"bytes,3,opt,name=mutator,proto3" json:"mutator,omitempty"` - // Command is the command to be executed for a pipe handler. - Command string `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"` - // Timeout is the handler timeout in seconds. - Timeout uint32 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout"` - // Socket contains configuration for a TCP or UDP handler. - Socket *HandlerSocket `protobuf:"bytes,6,opt,name=socket,proto3" json:"socket,omitempty"` - // Handlers is a list of handlers for a handler set. - Handlers []string `protobuf:"bytes,7,rep,name=handlers,proto3" json:"handlers"` - // Filters is a list of filters name to evaluate before executing this - // handler - Filters []string `protobuf:"bytes,8,rep,name=filters,proto3" json:"filters"` - // EnvVars is a list of environment variables to use with command execution - EnvVars []string `protobuf:"bytes,9,rep,name=env_vars,json=envVars,proto3" json:"env_vars"` - // RuntimeAssets are a list of assets required to execute a handler. - RuntimeAssets []string `protobuf:"bytes,13,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"` - // Secrets is the list of Sensu secrets to set for the handler's - // execution environment. - Secrets []*Secret `protobuf:"bytes,14,rep,name=secrets,proto3" json:"secrets"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Handler) Reset() { *m = Handler{} } -func (m *Handler) String() string { return proto.CompactTextString(m) } -func (*Handler) ProtoMessage() {} -func (*Handler) Descriptor() ([]byte, []int) { - return fileDescriptor_a415b3439792b693, []int{0} -} -func (m *Handler) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Handler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Handler.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Handler) XXX_Merge(src proto.Message) { - xxx_messageInfo_Handler.Merge(m, src) -} -func (m *Handler) XXX_Size() int { - return m.Size() -} -func (m *Handler) XXX_DiscardUnknown() { - xxx_messageInfo_Handler.DiscardUnknown(m) -} - -var xxx_messageInfo_Handler proto.InternalMessageInfo - -// HandlerSocket contains configuration for a TCP or UDP handler. -type HandlerSocket struct { - // Host is the socket peer address. - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - // Port is the socket peer port. - Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HandlerSocket) Reset() { *m = HandlerSocket{} } -func (m *HandlerSocket) String() string { return proto.CompactTextString(m) } -func (*HandlerSocket) ProtoMessage() {} -func (*HandlerSocket) Descriptor() ([]byte, []int) { - return fileDescriptor_a415b3439792b693, []int{1} -} -func (m *HandlerSocket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HandlerSocket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HandlerSocket.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HandlerSocket) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandlerSocket.Merge(m, src) -} -func (m *HandlerSocket) XXX_Size() int { - return m.Size() -} -func (m *HandlerSocket) XXX_DiscardUnknown() { - xxx_messageInfo_HandlerSocket.DiscardUnknown(m) -} - -var xxx_messageInfo_HandlerSocket proto.InternalMessageInfo - -func (m *HandlerSocket) GetHost() string { - if m != nil { - return m.Host - } - return "" -} - -func (m *HandlerSocket) GetPort() uint32 { - if m != nil { - return m.Port - } - return 0 -} - -func init() { - proto.RegisterType((*Handler)(nil), "sensu.core.v2.Handler") - proto.RegisterType((*HandlerSocket)(nil), "sensu.core.v2.HandlerSocket") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/handler.proto", fileDescriptor_a415b3439792b693) -} - -var fileDescriptor_a415b3439792b693 = []byte{ - // 501 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xcd, 0x36, 0x21, 0x76, 0x36, 0xb8, 0x87, 0x95, 0x90, 0x96, 0xaa, 0xb2, 0xad, 0x4a, 0x08, - 0x1f, 0xc0, 0xa6, 0x0e, 0x17, 0x2a, 0x0e, 0xd4, 0x27, 0x2e, 0x08, 0x69, 0x2b, 0x38, 0x70, 0xa9, - 0x36, 0xce, 0x36, 0x09, 0xd4, 0xde, 0xc8, 0xbb, 0xb6, 0xd4, 0x3f, 0xe8, 0x27, 0x70, 0xec, 0xb1, - 0x9f, 0xc0, 0x27, 0xe4, 0xd8, 0x2f, 0xb0, 0x20, 0xdc, 0xfc, 0x05, 0x1c, 0x91, 0xc7, 0x76, 0xa0, - 0x39, 0xf5, 0xb2, 0x7a, 0xf3, 0xe6, 0xcd, 0x78, 0x9e, 0x67, 0xf0, 0x64, 0xbe, 0xd4, 0x8b, 0x7c, - 0xea, 0xc7, 0x32, 0x09, 0x94, 0x48, 0x55, 0xde, 0xbc, 0x2f, 0xe7, 0x32, 0xe0, 0xab, 0x65, 0x10, - 0xcb, 0x4c, 0x04, 0x45, 0x18, 0x2c, 0x78, 0x3a, 0xbb, 0x14, 0x99, 0xbf, 0xca, 0xa4, 0x96, 0xc4, - 0x02, 0x8d, 0x5f, 0x27, 0xfd, 0x22, 0x3c, 0x78, 0xfd, 0x5f, 0x8f, 0xb9, 0x9c, 0xcb, 0x00, 0x54, - 0xd3, 0xfc, 0xe2, 0x5d, 0x71, 0xec, 0x4f, 0xfc, 0x63, 0x20, 0x81, 0x03, 0xd4, 0x34, 0x39, 0x78, - 0xf5, 0xb0, 0x2f, 0x27, 0x42, 0xf3, 0xb6, 0x22, 0x7c, 0x58, 0x85, 0x12, 0x71, 0x26, 0x74, 0x53, - 0x73, 0x74, 0x3d, 0xc0, 0xc6, 0xfb, 0x66, 0x78, 0xf2, 0x09, 0x9b, 0x75, 0xb7, 0x19, 0xd7, 0x9c, - 0x22, 0x17, 0x79, 0xe3, 0xf0, 0xa9, 0x7f, 0xcf, 0x89, 0xff, 0x71, 0xfa, 0x55, 0xc4, 0xfa, 0x83, - 0xd0, 0x3c, 0xb2, 0xd7, 0xa5, 0xd3, 0xbb, 0x2b, 0x1d, 0x54, 0x95, 0x0e, 0xe9, 0xca, 0x5e, 0xc8, - 0x64, 0xa9, 0x45, 0xb2, 0xd2, 0x57, 0x6c, 0xdb, 0x8a, 0x10, 0x3c, 0xd0, 0x57, 0x2b, 0x41, 0xf7, - 0x5c, 0xe4, 0x8d, 0x18, 0x60, 0x42, 0xb1, 0x91, 0xe4, 0x9a, 0x6b, 0x99, 0xd1, 0x3e, 0xd0, 0x5d, - 0x58, 0x67, 0x62, 0x99, 0x24, 0x3c, 0x9d, 0xd1, 0x41, 0x93, 0x69, 0x43, 0xf2, 0x0c, 0x1b, 0x7a, - 0x99, 0x08, 0x99, 0x6b, 0xfa, 0xc8, 0x45, 0x9e, 0x15, 0x8d, 0xab, 0xd2, 0xe9, 0x28, 0xd6, 0x01, - 0x72, 0x82, 0x87, 0x4a, 0xc6, 0xdf, 0x84, 0xa6, 0x43, 0xf0, 0x70, 0xb8, 0xe3, 0xa1, 0x75, 0x7b, - 0x06, 0x9a, 0x68, 0xb0, 0x2e, 0x1d, 0xc4, 0xda, 0x0a, 0xe2, 0x61, 0xb3, 0xdd, 0xa4, 0xa2, 0x86, - 0xdb, 0xf7, 0x46, 0xd1, 0xe3, 0xaa, 0x74, 0xb6, 0x1c, 0xdb, 0xa2, 0x7a, 0x98, 0x8b, 0xe5, 0xa5, - 0xae, 0x85, 0x26, 0x08, 0x61, 0x98, 0x96, 0x62, 0x1d, 0x20, 0xcf, 0xb1, 0x29, 0xd2, 0xe2, 0xbc, - 0xe0, 0x99, 0xa2, 0xa3, 0x7f, 0x0d, 0x3b, 0x8e, 0x19, 0x22, 0x2d, 0x3e, 0xf3, 0x4c, 0x91, 0x37, - 0x78, 0x3f, 0xcb, 0xd3, 0xda, 0xc3, 0x39, 0x57, 0x4a, 0x68, 0x45, 0x2d, 0x90, 0x93, 0xaa, 0x74, - 0x76, 0x32, 0xcc, 0x6a, 0xe3, 0x53, 0x08, 0xc9, 0x5b, 0x6c, 0x34, 0x2b, 0x55, 0x74, 0xdf, 0xed, - 0x7b, 0xe3, 0xf0, 0xc9, 0x8e, 0xe3, 0x33, 0xc8, 0x36, 0x13, 0xb6, 0x4a, 0xd6, 0x81, 0x13, 0xf3, - 0xfa, 0xc6, 0xe9, 0xdd, 0xde, 0x38, 0xe8, 0xe8, 0x14, 0x5b, 0xf7, 0xfe, 0x4d, 0xbd, 0xb8, 0x85, - 0x54, 0x1a, 0x6e, 0x61, 0xc4, 0x00, 0x93, 0x43, 0x3c, 0x58, 0xc9, 0x4c, 0xc3, 0x32, 0xad, 0xc8, - 0xac, 0x4a, 0x07, 0x62, 0x06, 0x6f, 0xe4, 0xfe, 0xf9, 0x65, 0xa3, 0xdb, 0x8d, 0x8d, 0x7e, 0x6c, - 0x6c, 0xb4, 0xde, 0xd8, 0xe8, 0x6e, 0x63, 0xa3, 0x9f, 0x1b, 0x1b, 0x7d, 0xff, 0x6d, 0xf7, 0xbe, - 0xec, 0x15, 0xe1, 0x74, 0x08, 0x67, 0x37, 0xf9, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x72, 0x2a, 0x50, - 0xb5, 0x58, 0x03, 0x00, 0x00, -} - -func (this *Handler) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Handler) - if !ok { - that2, ok := that.(Handler) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.Type != that1.Type { - return false - } - if this.Mutator != that1.Mutator { - return false - } - if this.Command != that1.Command { - return false - } - if this.Timeout != that1.Timeout { - return false - } - if !this.Socket.Equal(that1.Socket) { - return false - } - if len(this.Handlers) != len(that1.Handlers) { - return false - } - for i := range this.Handlers { - if this.Handlers[i] != that1.Handlers[i] { - return false - } - } - if len(this.Filters) != len(that1.Filters) { - return false - } - for i := range this.Filters { - if this.Filters[i] != that1.Filters[i] { - return false - } - } - if len(this.EnvVars) != len(that1.EnvVars) { - return false - } - for i := range this.EnvVars { - if this.EnvVars[i] != that1.EnvVars[i] { - return false - } - } - if len(this.RuntimeAssets) != len(that1.RuntimeAssets) { - return false - } - for i := range this.RuntimeAssets { - if this.RuntimeAssets[i] != that1.RuntimeAssets[i] { - return false - } - } - if len(this.Secrets) != len(that1.Secrets) { - return false - } - for i := range this.Secrets { - if !this.Secrets[i].Equal(that1.Secrets[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HandlerSocket) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HandlerSocket) - if !ok { - that2, ok := that.(HandlerSocket) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Host != that1.Host { - return false - } - if this.Port != that1.Port { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type HandlerFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetObjectMeta() ObjectMeta - GetType() string - GetMutator() string - GetCommand() string - GetTimeout() uint32 - GetSocket() *HandlerSocket - GetHandlers() []string - GetFilters() []string - GetEnvVars() []string - GetRuntimeAssets() []string - GetSecrets() []*Secret -} - -func (this *Handler) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *Handler) TestProto() github_com_golang_protobuf_proto.Message { - return NewHandlerFromFace(this) -} - -func (this *Handler) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *Handler) GetType() string { - return this.Type -} - -func (this *Handler) GetMutator() string { - return this.Mutator -} - -func (this *Handler) GetCommand() string { - return this.Command -} - -func (this *Handler) GetTimeout() uint32 { - return this.Timeout -} - -func (this *Handler) GetSocket() *HandlerSocket { - return this.Socket -} - -func (this *Handler) GetHandlers() []string { - return this.Handlers -} - -func (this *Handler) GetFilters() []string { - return this.Filters -} - -func (this *Handler) GetEnvVars() []string { - return this.EnvVars -} - -func (this *Handler) GetRuntimeAssets() []string { - return this.RuntimeAssets -} - -func (this *Handler) GetSecrets() []*Secret { - return this.Secrets -} - -func NewHandlerFromFace(that HandlerFace) *Handler { - this := &Handler{} - this.ObjectMeta = that.GetObjectMeta() - this.Type = that.GetType() - this.Mutator = that.GetMutator() - this.Command = that.GetCommand() - this.Timeout = that.GetTimeout() - this.Socket = that.GetSocket() - this.Handlers = that.GetHandlers() - this.Filters = that.GetFilters() - this.EnvVars = that.GetEnvVars() - this.RuntimeAssets = that.GetRuntimeAssets() - this.Secrets = that.GetSecrets() - return this -} - -func (m *Handler) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Handler) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Handler) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Secrets) > 0 { - for iNdEx := len(m.Secrets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Secrets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHandler(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - } - if len(m.RuntimeAssets) > 0 { - for iNdEx := len(m.RuntimeAssets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RuntimeAssets[iNdEx]) - copy(dAtA[i:], m.RuntimeAssets[iNdEx]) - i = encodeVarintHandler(dAtA, i, uint64(len(m.RuntimeAssets[iNdEx]))) - i-- - dAtA[i] = 0x6a - } - } - if len(m.EnvVars) > 0 { - for iNdEx := len(m.EnvVars) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.EnvVars[iNdEx]) - copy(dAtA[i:], m.EnvVars[iNdEx]) - i = encodeVarintHandler(dAtA, i, uint64(len(m.EnvVars[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(m.Filters) > 0 { - for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Filters[iNdEx]) - copy(dAtA[i:], m.Filters[iNdEx]) - i = encodeVarintHandler(dAtA, i, uint64(len(m.Filters[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.Handlers) > 0 { - for iNdEx := len(m.Handlers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Handlers[iNdEx]) - copy(dAtA[i:], m.Handlers[iNdEx]) - i = encodeVarintHandler(dAtA, i, uint64(len(m.Handlers[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if m.Socket != nil { - { - size, err := m.Socket.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHandler(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Timeout != 0 { - i = encodeVarintHandler(dAtA, i, uint64(m.Timeout)) - i-- - dAtA[i] = 0x28 - } - if len(m.Command) > 0 { - i -= len(m.Command) - copy(dAtA[i:], m.Command) - i = encodeVarintHandler(dAtA, i, uint64(len(m.Command))) - i-- - dAtA[i] = 0x22 - } - if len(m.Mutator) > 0 { - i -= len(m.Mutator) - copy(dAtA[i:], m.Mutator) - i = encodeVarintHandler(dAtA, i, uint64(len(m.Mutator))) - i-- - dAtA[i] = 0x1a - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintHandler(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHandler(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *HandlerSocket) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HandlerSocket) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HandlerSocket) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Port != 0 { - i = encodeVarintHandler(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x10 - } - if len(m.Host) > 0 { - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintHandler(dAtA, i, uint64(len(m.Host))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintHandler(dAtA []byte, offset int, v uint64) int { - offset -= sovHandler(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedHandler(r randyHandler, easy bool) *Handler { - this := &Handler{} - v1 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v1 - this.Type = string(randStringHandler(r)) - this.Mutator = string(randStringHandler(r)) - this.Command = string(randStringHandler(r)) - this.Timeout = uint32(r.Uint32()) - if r.Intn(5) != 0 { - this.Socket = NewPopulatedHandlerSocket(r, easy) - } - v2 := r.Intn(10) - this.Handlers = make([]string, v2) - for i := 0; i < v2; i++ { - this.Handlers[i] = string(randStringHandler(r)) - } - v3 := r.Intn(10) - this.Filters = make([]string, v3) - for i := 0; i < v3; i++ { - this.Filters[i] = string(randStringHandler(r)) - } - v4 := r.Intn(10) - this.EnvVars = make([]string, v4) - for i := 0; i < v4; i++ { - this.EnvVars[i] = string(randStringHandler(r)) - } - v5 := r.Intn(10) - this.RuntimeAssets = make([]string, v5) - for i := 0; i < v5; i++ { - this.RuntimeAssets[i] = string(randStringHandler(r)) - } - if r.Intn(5) != 0 { - v6 := r.Intn(5) - this.Secrets = make([]*Secret, v6) - for i := 0; i < v6; i++ { - this.Secrets[i] = NewPopulatedSecret(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHandler(r, 15) - } - return this -} - -func NewPopulatedHandlerSocket(r randyHandler, easy bool) *HandlerSocket { - this := &HandlerSocket{} - this.Host = string(randStringHandler(r)) - this.Port = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHandler(r, 3) - } - return this -} - -type randyHandler interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneHandler(r randyHandler) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringHandler(r randyHandler) string { - v7 := r.Intn(100) - tmps := make([]rune, v7) - for i := 0; i < v7; i++ { - tmps[i] = randUTF8RuneHandler(r) - } - return string(tmps) -} -func randUnrecognizedHandler(r randyHandler, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldHandler(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldHandler(dAtA []byte, r randyHandler, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateHandler(dAtA, uint64(key)) - v8 := r.Int63() - if r.Intn(2) == 0 { - v8 *= -1 - } - dAtA = encodeVarintPopulateHandler(dAtA, uint64(v8)) - case 1: - dAtA = encodeVarintPopulateHandler(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateHandler(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateHandler(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateHandler(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateHandler(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Handler) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovHandler(uint64(l)) - l = len(m.Type) - if l > 0 { - n += 1 + l + sovHandler(uint64(l)) - } - l = len(m.Mutator) - if l > 0 { - n += 1 + l + sovHandler(uint64(l)) - } - l = len(m.Command) - if l > 0 { - n += 1 + l + sovHandler(uint64(l)) - } - if m.Timeout != 0 { - n += 1 + sovHandler(uint64(m.Timeout)) - } - if m.Socket != nil { - l = m.Socket.Size() - n += 1 + l + sovHandler(uint64(l)) - } - if len(m.Handlers) > 0 { - for _, s := range m.Handlers { - l = len(s) - n += 1 + l + sovHandler(uint64(l)) - } - } - if len(m.Filters) > 0 { - for _, s := range m.Filters { - l = len(s) - n += 1 + l + sovHandler(uint64(l)) - } - } - if len(m.EnvVars) > 0 { - for _, s := range m.EnvVars { - l = len(s) - n += 1 + l + sovHandler(uint64(l)) - } - } - if len(m.RuntimeAssets) > 0 { - for _, s := range m.RuntimeAssets { - l = len(s) - n += 1 + l + sovHandler(uint64(l)) - } - } - if len(m.Secrets) > 0 { - for _, e := range m.Secrets { - l = e.Size() - n += 1 + l + sovHandler(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HandlerSocket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - if l > 0 { - n += 1 + l + sovHandler(uint64(l)) - } - if m.Port != 0 { - n += 1 + sovHandler(uint64(m.Port)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovHandler(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozHandler(x uint64) (n int) { - return sovHandler(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Handler) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Handler: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Handler: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mutator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mutator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Command = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - m.Timeout = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timeout |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Socket", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Socket == nil { - m.Socket = &HandlerSocket{} - } - if err := m.Socket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handlers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Handlers = append(m.Handlers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnvVars", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EnvVars = append(m.EnvVars, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeAssets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeAssets = append(m.RuntimeAssets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secrets = append(m.Secrets, &Secret{}) - if err := m.Secrets[len(m.Secrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHandler(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHandler - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HandlerSocket) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HandlerSocket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HandlerSocket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHandler - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHandler - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHandler - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHandler(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHandler - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipHandler(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHandler - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHandler - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHandler - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthHandler - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupHandler - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthHandler - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthHandler = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHandler = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupHandler = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/handler.proto b/api/core/v2/handler.proto deleted file mode 100644 index c1fdf1422d..0000000000 --- a/api/core/v2/handler.proto +++ /dev/null @@ -1,66 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; -import "github.com/sensu/sensu-go/api/core/v2/secret.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// A Handler is a handler specification. -message Handler { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Metadata contains the name, namespace, labels and annotations of the - // handler - ObjectMeta metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - - // Type is the handler type, i.e. pipe. - string type = 2; - - // Mutator is the handler event data mutator. - string mutator = 3; - - // Command is the command to be executed for a pipe handler. - string command = 4; - - // Timeout is the handler timeout in seconds. - uint32 timeout = 5 [ (gogoproto.jsontag) = "timeout" ]; - - // Socket contains configuration for a TCP or UDP handler. - HandlerSocket socket = 6 [ (gogoproto.nullable) = true ]; - - // Handlers is a list of handlers for a handler set. - repeated string handlers = 7 [ (gogoproto.jsontag) = "handlers" ]; - - // Filters is a list of filters name to evaluate before executing this - // handler - repeated string filters = 8 [ (gogoproto.jsontag) = "filters" ]; - - // EnvVars is a list of environment variables to use with command execution - repeated string env_vars = 9 [ (gogoproto.jsontag) = "env_vars" ]; - - // RuntimeAssets are a list of assets required to execute a handler. - repeated string runtime_assets = 13 [ (gogoproto.jsontag) = "runtime_assets" ]; - - // Secrets is the list of Sensu secrets to set for the handler's - // execution environment. - repeated Secret secrets = 14 [ (gogoproto.jsontag) = "secrets" ]; -} - -// HandlerSocket contains configuration for a TCP or UDP handler. -message HandlerSocket { - // Host is the socket peer address. - string host = 1; - - // Port is the socket peer port. - uint32 port = 2 [ (gogoproto.jsontag) = "port" ]; -} diff --git a/api/core/v2/handler_test.go b/api/core/v2/handler_test.go deleted file mode 100644 index ca435dc9b9..0000000000 --- a/api/core/v2/handler_test.go +++ /dev/null @@ -1,276 +0,0 @@ -package v2 - -import ( - "fmt" - "reflect" - "sort" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestFixtureHandler(t *testing.T) { - handler := FixtureHandler("handler") - assert.Equal(t, "handler", handler.Name) - assert.NoError(t, handler.Validate()) -} - -func TestFixtureSetHandler(t *testing.T) { - handler := FixtureSetHandler("handler") - assert.Equal(t, "handler", handler.Name) - assert.NoError(t, handler.Validate()) -} - -func TestFixtureSocketHandler(t *testing.T) { - handler := FixtureSocketHandler("handler", "tcp") - assert.Equal(t, "handler", handler.Name) - assert.Equal(t, "tcp", handler.Type) - assert.NotNil(t, handler.Socket.Host) - assert.NotNil(t, handler.Socket.Port) - assert.NoError(t, handler.Validate()) -} - -func TestHandlerValidate(t *testing.T) { - tests := []struct { - Handler Handler - Error string - }{ - { - Handler: Handler{}, - Error: "handler name must not be empty", - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - }, - }, - Error: "empty handler type", - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - }, - Type: "pipe", - Command: "sl", - }, - Error: "namespace must be set", - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - Namespace: "default", - }, - Type: "pipe", - Command: "sl", - }, - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - Namespace: "default", - }, - Type: "set", - }, - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - Namespace: "default", - }, - Type: "tcp", - }, - Error: "tcp and udp handlers need a valid socket", - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - Namespace: "default", - }, - Type: "tcp", - Socket: &HandlerSocket{ - Host: "localhost", - }, - }, - Error: "socket port undefined", - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - Namespace: "default", - }, - Type: "tcp", - Socket: &HandlerSocket{ - Port: 1234, - }, - }, - Error: "socket host undefined", - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - Namespace: "default", - }, - Type: "tcp", - Socket: &HandlerSocket{ - Host: "localhost", - Port: 1234, - }, - }, - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - Namespace: "default", - }, - Type: "udp", - Socket: &HandlerSocket{ - Host: "localhost", - }, - }, - Error: "socket port undefined", - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - Namespace: "default", - }, - Type: "udp", - Socket: &HandlerSocket{ - Port: 1234, - }, - }, - Error: "socket host undefined", - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - Namespace: "default", - }, - Type: "udp", - Socket: &HandlerSocket{ - Host: "localhost", - Port: 1234, - }, - }, - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - Namespace: "default", - }, - Type: "magic", - }, - Error: "unknown handler type: magic", - }, - { - Handler: Handler{ - ObjectMeta: ObjectMeta{ - Name: "foo", - }, - Type: "pipe", - }, - Error: "missing command", - }, - } - - for i, test := range tests { - t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { - if err := test.Handler.Validate(); err != nil { - if len(test.Error) > 0 { - require.Equal(t, test.Error, err.Error()) - } else { - t.Fatal(err) - } - } else if len(test.Error) > 0 { - t.Fatal("expected error, got none") - } - }) - } -} - -func TestSortHandlersByName(t *testing.T) { - a := FixtureHandler("Abernathy") - b := FixtureHandler("Bernard") - c := FixtureHandler("Clementine") - d := FixtureHandler("Dolores") - - testCases := []struct { - name string - inDir bool - inChecks []*Handler - expected []*Handler - }{ - { - name: "Sorts ascending", - inDir: true, - inChecks: []*Handler{d, c, a, b}, - expected: []*Handler{a, b, c, d}, - }, - { - name: "Sorts descending", - inDir: false, - inChecks: []*Handler{d, a, c, b}, - expected: []*Handler{d, c, b, a}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - sort.Sort(SortHandlersByName(tc.inChecks, tc.inDir)) - assert.EqualValues(t, tc.expected, tc.inChecks) - }) - } -} - -func TestHandlerFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureHandler("slack"), - wantKey: "handler.name", - want: "slack", - }, - { - name: "exposes type", - args: &Handler{Type: "pipe"}, - wantKey: "handler.type", - want: "pipe", - }, - { - name: "exposes labels", - args: &Handler{ - ObjectMeta: ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "handler.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("HandlerFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/handlerpb_test.go b/api/core/v2/handlerpb_test.go deleted file mode 100644 index 0f49b87144..0000000000 --- a/api/core/v2/handlerpb_test.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/handler.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestHandlerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandler(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Handler{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestHandlerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandler(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Handler{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHandlerSocketProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandlerSocket(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HandlerSocket{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestHandlerSocketMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandlerSocket(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HandlerSocket{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHandlerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandler(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Handler{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestHandlerSocketJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandlerSocket(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HandlerSocket{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestHandlerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandler(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Handler{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHandlerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandler(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Handler{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHandlerSocketProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandlerSocket(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &HandlerSocket{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHandlerSocketProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandlerSocket(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &HandlerSocket{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHandlerFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedHandler(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestHandlerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandler(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestHandlerSocketSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHandlerSocket(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/health.go b/api/core/v2/health.go deleted file mode 100644 index 340750ea1b..0000000000 --- a/api/core/v2/health.go +++ /dev/null @@ -1,99 +0,0 @@ -package v2 - -import ( - "encoding/json" - "fmt" - - "go.etcd.io/etcd/api/v3/etcdserverpb" -) - -// ClusterHealth holds cluster member status info. -type ClusterHealth struct { - // MemberID is the etcd cluster member's ID. - MemberID uint64 - - // MemberIDHex is the hexadecimal representation of the member's ID. - MemberIDHex string - - // Name is the cluster member's name. - Name string - - // Err contains any error encountered while checking the member's health. - Err string - - // Healthy describes the health of the cluster member. - Healthy bool -} - -// PostgresHealth holds postgres store status info. -type PostgresHealth struct { - // Name is the name of the postgres resource. - Name string - - // Active indicates if the store is configured to use the postgres configuration. - Active bool - - // Healthy indicates if the postgres store is connected and can query the events table. - Healthy bool -} - -func (h ClusterHealth) MarshalJSON() ([]byte, error) { - if h.MemberIDHex == "" { - h.MemberIDHex = fmt.Sprintf("%x", h.MemberID) - } - type Clone ClusterHealth - var clone *Clone = (*Clone)(&h) - return json.Marshal(clone) -} - -// HealthResponse contains cluster health and cluster alarms. -type HealthResponse struct { - // Alarms is the list of active etcd alarms. - Alarms []*etcdserverpb.AlarmMember - // ClusterHealth is the list of health status for every cluster member. - ClusterHealth []*ClusterHealth - // Header is the response header for the entire cluster response. - Header *etcdserverpb.ResponseHeader - // PostgresHealth is the list of health status for each postgres config. - PostgresHealth []*PostgresHealth `json:"PostgresHealth,omitempty"` -} - -// FixtureHealthResponse returns a HealthResponse fixture for testing. -func FixtureHealthResponse(healthy bool) *HealthResponse { - var err string - healthResponse := &HealthResponse{ - Header: &etcdserverpb.ResponseHeader{ - ClusterId: uint64(4255616304056076734), - }, - } - - clusterHealth := []*ClusterHealth{} - clusterHealth = append(clusterHealth, &ClusterHealth{ - MemberID: uint64(12345), - Name: "backend0", - Err: "", - Healthy: true, - }) - if healthy { - err = "" - } else { - err = "cluster error" - } - clusterHealth = append(clusterHealth, &ClusterHealth{ - MemberID: uint64(12345), - Name: "backend1", - Err: err, - Healthy: false, - }) - - alarms := []*etcdserverpb.AlarmMember{} - alarms = append(alarms, &etcdserverpb.AlarmMember{ - MemberID: uint64(56789), - Alarm: etcdserverpb.AlarmType_CORRUPT, - }) - - healthResponse.ClusterHealth = clusterHealth - healthResponse.Alarms = alarms - - return healthResponse -} diff --git a/api/core/v2/hook.go b/api/core/v2/hook.go deleted file mode 100644 index dea4314af8..0000000000 --- a/api/core/v2/hook.go +++ /dev/null @@ -1,206 +0,0 @@ -package v2 - -import ( - "encoding/json" - "errors" - fmt "fmt" - "net/url" - "path" - "regexp" - "time" - - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // HooksResource is the name of this resource type - HooksResource = "hooks" - - // HookRequestType is the message type string for hook request. - HookRequestType = "hook_request" -) - -var ( - // CheckHookRegexStr used to validate type of check hook - CheckHookRegexStr = `([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])` - - // CheckHookRegex used to validate type of check hook - CheckHookRegex = regexp.MustCompile("^" + CheckHookRegexStr + "$") - - // Severities used to validate type of check hook - Severities = []string{"ok", "warning", "critical", "unknown", "non-zero"} -) - -// Validate returns an error if the hook does not pass validation tests. -func (h *Hook) Validate() error { - if err := h.HookConfig.Validate(); err != nil { - return err - } - - if h.Status < 0 { - return errors.New("hook status must be greater than or equal to 0") - } - - return nil -} - -// StorePrefix returns the path prefix to this resource in the store -func (c *HookConfig) StorePrefix() string { - return HooksResource -} - -// URIPath returns the path component of a hook URI. -func (c *HookConfig) URIPath() string { - if c.Namespace == "" { - return path.Join(URLPrefix, HooksResource, url.PathEscape(c.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(c.Namespace), HooksResource, url.PathEscape(c.Name)) -} - -// Validate returns an error if the hook does not pass validation tests. -func (c *HookConfig) Validate() error { - if err := ValidateName(c.Name); err != nil { - return errors.New("hook name " + err.Error()) - } - - if c.Command == "" { - return errors.New("command cannot be empty") - } - - if c.Timeout <= 0 { - return errors.New("hook timeout must be greater than 0") - } - - if c.Namespace == "" { - return errors.New("namespace must be set") - } - - return nil -} - -// Validate returns an error if the check hook does not pass validation tests. -func (h *HookList) Validate() error { - if h.Type == "" { - return errors.New("type cannot be empty") - } - - if h.Hooks == nil || len(h.Hooks) == 0 { - return errors.New("hooks cannot be empty") - } - - if !(CheckHookRegex.MatchString(h.Type) || isSeverity(h.Type)) { - return errors.New( - "valid check hook types are \"0\"-\"255\", \"ok\", \"warning\", \"critical\", \"unknown\", and \"non-zero\"", - ) - } - - return nil -} - -func isSeverity(name string) bool { - for _, sev := range Severities { - if sev == name { - return true - } - } - return false -} - -// MarshalJSON implements the json.Marshaler interface. -func (h *HookList) MarshalJSON() ([]byte, error) { - result := map[string][]string{h.Type: h.Hooks} - return json.Marshal(result) -} - -// UnmarshalJSON implements the json.Marshaler interface. -func (h *HookList) UnmarshalJSON(b []byte) error { - result := map[string][]string{} - if err := json.Unmarshal(b, &result); err != nil { - return err - } - for k, v := range result { - h.Type = k - h.Hooks = v - } - - return nil -} - -// FixtureHookConfig returns a fixture for a HookConfig object. -func FixtureHookConfig(name string) *HookConfig { - timeout := uint32(10) - - return &HookConfig{ - Command: "true", - Timeout: timeout, - Stdin: false, - ObjectMeta: NewObjectMeta(name, "default"), - } -} - -// FixtureHook returns a fixture for a Hook object. -func FixtureHook(id string) *Hook { - t := time.Now().Unix() - config := FixtureHookConfig(id) - - return &Hook{ - Status: 0, - Output: "", - Issued: t, - Executed: t + 1, - Duration: 1.0, - HookConfig: *config, - } -} - -// FixtureHookList returns a fixture for a HookList object. -func FixtureHookList(hookName string) *HookList { - return &HookList{ - Hooks: []string{hookName}, - Type: "non-zero", - } -} - -// URIPath returns the path component of a Hook URI. -func (h *Hook) URIPath() string { - return fmt.Sprintf("/api/core/v2/namespaces/%s/hooks/%s", url.PathEscape(h.Namespace), url.PathEscape(h.Name)) -} - -// HookConfigFields returns a set of fields that represent that resource -func HookConfigFields(r Resource) map[string]string { - resource := r.(*HookConfig) - fields := map[string]string{ - "hook.name": resource.ObjectMeta.Name, - "hook.namespace": resource.ObjectMeta.Namespace, - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "hook.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (h *HookConfig) Fields() map[string]string { - return HookConfigFields(h) -} - -// SetNamespace sets the namespace of the resource. -func (c *HookConfig) SetNamespace(namespace string) { - c.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (h *HookConfig) SetObjectMeta(meta ObjectMeta) { - h.ObjectMeta = meta -} - -// SetNamespace sets the namespace of the resource. -func (h *Hook) SetNamespace(namespace string) { - h.Namespace = namespace -} - -func (*Hook) RBACName() string { - return "hooks" -} - -func (*HookConfig) RBACName() string { - return "hooks" -} diff --git a/api/core/v2/hook.pb.go b/api/core/v2/hook.pb.go deleted file mode 100644 index dd468e361e..0000000000 --- a/api/core/v2/hook.pb.go +++ /dev/null @@ -1,1413 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/hook.proto - -package v2 - -import ( - bytes "bytes" - encoding_binary "encoding/binary" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// HookConfig is the specification of a hook -type HookConfig struct { - // Metadata contains the name, namespace, labels and annotations of the hook - ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // Command is the command to be executed - Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"` - // Timeout is the timeout, in seconds, at which the hook has to run - Timeout uint32 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout"` - // Stdin indicates if hook requests have stdin enabled - Stdin bool `protobuf:"varint,4,opt,name=stdin,proto3" json:"stdin"` - // RuntimeAssets are a list of assets required to execute hook. - RuntimeAssets []string `protobuf:"bytes,5,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HookConfig) Reset() { *m = HookConfig{} } -func (m *HookConfig) String() string { return proto.CompactTextString(m) } -func (*HookConfig) ProtoMessage() {} -func (*HookConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_de6598a27214377c, []int{0} -} -func (m *HookConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HookConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HookConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HookConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_HookConfig.Merge(m, src) -} -func (m *HookConfig) XXX_Size() int { - return m.Size() -} -func (m *HookConfig) XXX_DiscardUnknown() { - xxx_messageInfo_HookConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_HookConfig proto.InternalMessageInfo - -// A Hook is a hook specification and optionally the results of the hook's -// execution. -type Hook struct { - // Config is the specification of a hook - HookConfig `protobuf:"bytes,1,opt,name=config,proto3,embedded=config" json:""` - // Duration of execution - Duration float64 `protobuf:"fixed64,2,opt,name=duration,proto3" json:"duration,omitempty"` - // Executed describes the time in which the hook request was executed - Executed int64 `protobuf:"varint,3,opt,name=executed,proto3" json:"executed"` - // Issued describes the time in which the hook request was issued - Issued int64 `protobuf:"varint,4,opt,name=issued,proto3" json:"issued"` - // Output from the execution of Command - Output string `protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"` - // Status is the exit status code produced by the hook - Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Hook) Reset() { *m = Hook{} } -func (m *Hook) String() string { return proto.CompactTextString(m) } -func (*Hook) ProtoMessage() {} -func (*Hook) Descriptor() ([]byte, []int) { - return fileDescriptor_de6598a27214377c, []int{1} -} -func (m *Hook) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Hook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Hook.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Hook) XXX_Merge(src proto.Message) { - xxx_messageInfo_Hook.Merge(m, src) -} -func (m *Hook) XXX_Size() int { - return m.Size() -} -func (m *Hook) XXX_DiscardUnknown() { - xxx_messageInfo_Hook.DiscardUnknown(m) -} - -var xxx_messageInfo_Hook proto.InternalMessageInfo - -func (m *Hook) GetDuration() float64 { - if m != nil { - return m.Duration - } - return 0 -} - -func (m *Hook) GetExecuted() int64 { - if m != nil { - return m.Executed - } - return 0 -} - -func (m *Hook) GetIssued() int64 { - if m != nil { - return m.Issued - } - return 0 -} - -func (m *Hook) GetOutput() string { - if m != nil { - return m.Output - } - return "" -} - -func (m *Hook) GetStatus() int32 { - if m != nil { - return m.Status - } - return 0 -} - -type HookList struct { - // Hooks is the list of hooks for the check hook - Hooks []string `protobuf:"bytes,1,rep,name=hooks,proto3" json:"hooks"` - // Type indicates the type or response code for the check hook - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HookList) Reset() { *m = HookList{} } -func (m *HookList) String() string { return proto.CompactTextString(m) } -func (*HookList) ProtoMessage() {} -func (*HookList) Descriptor() ([]byte, []int) { - return fileDescriptor_de6598a27214377c, []int{2} -} -func (m *HookList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HookList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HookList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HookList) XXX_Merge(src proto.Message) { - xxx_messageInfo_HookList.Merge(m, src) -} -func (m *HookList) XXX_Size() int { - return m.Size() -} -func (m *HookList) XXX_DiscardUnknown() { - xxx_messageInfo_HookList.DiscardUnknown(m) -} - -var xxx_messageInfo_HookList proto.InternalMessageInfo - -func (m *HookList) GetHooks() []string { - if m != nil { - return m.Hooks - } - return nil -} - -func (m *HookList) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func init() { - proto.RegisterType((*HookConfig)(nil), "sensu.core.v2.HookConfig") - proto.RegisterType((*Hook)(nil), "sensu.core.v2.Hook") - proto.RegisterType((*HookList)(nil), "sensu.core.v2.HookList") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/hook.proto", fileDescriptor_de6598a27214377c) -} - -var fileDescriptor_de6598a27214377c = []byte{ - // 492 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xbd, 0x6e, 0xd4, 0x40, - 0x10, 0xbe, 0xbd, 0x1f, 0xc7, 0xb7, 0xc9, 0x51, 0x6c, 0x81, 0xcc, 0x15, 0x5e, 0xeb, 0x24, 0x24, - 0x17, 0x60, 0x93, 0x0b, 0x0d, 0x34, 0x01, 0xd3, 0x50, 0x80, 0x90, 0x56, 0xa2, 0xa1, 0x41, 0x3e, - 0x7b, 0xe3, 0x2c, 0x91, 0xbd, 0xd6, 0xed, 0xec, 0x89, 0xbc, 0x01, 0xe2, 0x09, 0x28, 0x53, 0xe6, - 0x11, 0x78, 0x84, 0x94, 0x79, 0x02, 0x0b, 0x4c, 0x67, 0x89, 0x9e, 0x12, 0x79, 0xed, 0x3b, 0x02, - 0x12, 0x52, 0x1a, 0xcf, 0x7c, 0xdf, 0xcc, 0x37, 0xf6, 0x7c, 0x1e, 0xfc, 0x28, 0x13, 0x70, 0xaa, - 0x57, 0x41, 0x22, 0xf3, 0x50, 0xf1, 0x42, 0xe9, 0xee, 0xf9, 0x30, 0x93, 0x61, 0x5c, 0x8a, 0x30, - 0x91, 0x6b, 0x1e, 0x6e, 0x96, 0xe1, 0xa9, 0x94, 0x67, 0x41, 0xb9, 0x96, 0x20, 0xc9, 0xcc, 0x34, - 0x04, 0x6d, 0x25, 0xd8, 0x2c, 0xe7, 0x8f, 0x6f, 0x0c, 0xc8, 0x64, 0x26, 0x43, 0xd3, 0xb5, 0xd2, - 0x27, 0xcf, 0x36, 0x87, 0xc1, 0x51, 0x70, 0x68, 0x48, 0xc3, 0x99, 0xac, 0x1b, 0x32, 0xbf, 0xe5, - 0x6b, 0x73, 0x0e, 0x71, 0xa7, 0x58, 0x7c, 0x1e, 0x62, 0xfc, 0x52, 0xca, 0xb3, 0x17, 0xb2, 0x38, - 0x11, 0x19, 0x79, 0x8b, 0xed, 0xb6, 0x98, 0xc6, 0x10, 0x3b, 0xc8, 0x43, 0xfe, 0xfe, 0xf2, 0x5e, - 0xf0, 0xd7, 0x87, 0x05, 0x6f, 0x56, 0x1f, 0x78, 0x02, 0xaf, 0x39, 0xc4, 0x91, 0x7b, 0x55, 0xd1, - 0xc1, 0x75, 0x45, 0x51, 0x53, 0x51, 0xb2, 0x95, 0x3d, 0x90, 0xb9, 0x00, 0x9e, 0x97, 0x70, 0xce, - 0x76, 0xa3, 0x88, 0x83, 0xf7, 0x12, 0x99, 0xe7, 0x71, 0x91, 0x3a, 0x43, 0x0f, 0xf9, 0x53, 0xb6, - 0x85, 0xe4, 0x3e, 0xde, 0x03, 0x91, 0x73, 0xa9, 0xc1, 0x19, 0x79, 0xc8, 0x9f, 0x45, 0xfb, 0x4d, - 0x45, 0xb7, 0x14, 0xdb, 0x26, 0x84, 0xe2, 0x89, 0x82, 0x54, 0x14, 0xce, 0xd8, 0x43, 0xbe, 0x1d, - 0x4d, 0x9b, 0x8a, 0x76, 0x04, 0xeb, 0x02, 0x79, 0x82, 0xef, 0xac, 0x75, 0xd1, 0xb6, 0xbf, 0x8f, - 0x95, 0xe2, 0xa0, 0x9c, 0x89, 0x37, 0xf2, 0xa7, 0x11, 0x69, 0x2a, 0xfa, 0x4f, 0x85, 0xcd, 0x7a, - 0xfc, 0xdc, 0xc0, 0xa7, 0xf6, 0xa7, 0x0b, 0x3a, 0xb8, 0xbc, 0xa0, 0x68, 0xf1, 0x13, 0xe1, 0x71, - 0x6b, 0x06, 0x39, 0xc6, 0x56, 0x62, 0x0c, 0xf9, 0x8f, 0x09, 0x7f, 0x1c, 0x8b, 0x0e, 0x6e, 0x98, - 0x30, 0x60, 0xbd, 0x8c, 0xcc, 0xb1, 0x9d, 0xea, 0x75, 0x0c, 0x42, 0x16, 0x66, 0x63, 0xc4, 0x76, - 0x98, 0xf8, 0xd8, 0xe6, 0x1f, 0x79, 0xa2, 0x81, 0xa7, 0x66, 0xe7, 0x51, 0x74, 0xd0, 0x54, 0x74, - 0xc7, 0xb1, 0x5d, 0x46, 0x16, 0xd8, 0x12, 0x4a, 0x69, 0x9e, 0x9a, 0xb5, 0x47, 0x11, 0x6e, 0x2a, - 0xda, 0x33, 0xac, 0x8f, 0xe4, 0x2e, 0xb6, 0xa4, 0x86, 0x52, 0x83, 0x33, 0x31, 0xce, 0xf6, 0xa8, - 0xd5, 0x2a, 0x88, 0x41, 0x2b, 0xc7, 0xf2, 0x90, 0x3f, 0xe9, 0xb4, 0x1d, 0xc3, 0xfa, 0xb8, 0x38, - 0xc6, 0x76, 0xbb, 0xc9, 0x2b, 0xa1, 0x8c, 0xc3, 0xed, 0x35, 0x2a, 0x07, 0x19, 0xdf, 0x8c, 0xc3, - 0x86, 0x60, 0x5d, 0x20, 0x04, 0x8f, 0xe1, 0xbc, 0xe4, 0xfd, 0x0f, 0x34, 0x79, 0xe4, 0xfd, 0xfa, - 0xee, 0xa2, 0xcb, 0xda, 0x45, 0x5f, 0x6b, 0x17, 0x5d, 0xd5, 0x2e, 0xba, 0xae, 0x5d, 0xf4, 0xad, - 0x76, 0xd1, 0x97, 0x1f, 0xee, 0xe0, 0xdd, 0x70, 0xb3, 0x5c, 0x59, 0xe6, 0xcc, 0x8e, 0x7e, 0x07, - 0x00, 0x00, 0xff, 0xff, 0x6e, 0xfa, 0xcd, 0x02, 0x11, 0x03, 0x00, 0x00, -} - -func (this *HookConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HookConfig) - if !ok { - that2, ok := that.(HookConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.Command != that1.Command { - return false - } - if this.Timeout != that1.Timeout { - return false - } - if this.Stdin != that1.Stdin { - return false - } - if len(this.RuntimeAssets) != len(that1.RuntimeAssets) { - return false - } - for i := range this.RuntimeAssets { - if this.RuntimeAssets[i] != that1.RuntimeAssets[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Hook) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Hook) - if !ok { - that2, ok := that.(Hook) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.HookConfig.Equal(&that1.HookConfig) { - return false - } - if this.Duration != that1.Duration { - return false - } - if this.Executed != that1.Executed { - return false - } - if this.Issued != that1.Issued { - return false - } - if this.Output != that1.Output { - return false - } - if this.Status != that1.Status { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *HookList) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*HookList) - if !ok { - that2, ok := that.(HookList) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Hooks) != len(that1.Hooks) { - return false - } - for i := range this.Hooks { - if this.Hooks[i] != that1.Hooks[i] { - return false - } - } - if this.Type != that1.Type { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type HookConfigFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetObjectMeta() ObjectMeta - GetCommand() string - GetTimeout() uint32 - GetStdin() bool - GetRuntimeAssets() []string -} - -func (this *HookConfig) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *HookConfig) TestProto() github_com_golang_protobuf_proto.Message { - return NewHookConfigFromFace(this) -} - -func (this *HookConfig) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *HookConfig) GetCommand() string { - return this.Command -} - -func (this *HookConfig) GetTimeout() uint32 { - return this.Timeout -} - -func (this *HookConfig) GetStdin() bool { - return this.Stdin -} - -func (this *HookConfig) GetRuntimeAssets() []string { - return this.RuntimeAssets -} - -func NewHookConfigFromFace(that HookConfigFace) *HookConfig { - this := &HookConfig{} - this.ObjectMeta = that.GetObjectMeta() - this.Command = that.GetCommand() - this.Timeout = that.GetTimeout() - this.Stdin = that.GetStdin() - this.RuntimeAssets = that.GetRuntimeAssets() - return this -} - -func (m *HookConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HookConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HookConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.RuntimeAssets) > 0 { - for iNdEx := len(m.RuntimeAssets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RuntimeAssets[iNdEx]) - copy(dAtA[i:], m.RuntimeAssets[iNdEx]) - i = encodeVarintHook(dAtA, i, uint64(len(m.RuntimeAssets[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if m.Stdin { - i-- - if m.Stdin { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Timeout != 0 { - i = encodeVarintHook(dAtA, i, uint64(m.Timeout)) - i-- - dAtA[i] = 0x18 - } - if len(m.Command) > 0 { - i -= len(m.Command) - copy(dAtA[i:], m.Command) - i = encodeVarintHook(dAtA, i, uint64(len(m.Command))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHook(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Hook) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Hook) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Hook) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Status != 0 { - i = encodeVarintHook(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x30 - } - if len(m.Output) > 0 { - i -= len(m.Output) - copy(dAtA[i:], m.Output) - i = encodeVarintHook(dAtA, i, uint64(len(m.Output))) - i-- - dAtA[i] = 0x2a - } - if m.Issued != 0 { - i = encodeVarintHook(dAtA, i, uint64(m.Issued)) - i-- - dAtA[i] = 0x20 - } - if m.Executed != 0 { - i = encodeVarintHook(dAtA, i, uint64(m.Executed)) - i-- - dAtA[i] = 0x18 - } - if m.Duration != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Duration)))) - i-- - dAtA[i] = 0x11 - } - { - size, err := m.HookConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHook(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *HookList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HookList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HookList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintHook(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x12 - } - if len(m.Hooks) > 0 { - for iNdEx := len(m.Hooks) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Hooks[iNdEx]) - copy(dAtA[i:], m.Hooks[iNdEx]) - i = encodeVarintHook(dAtA, i, uint64(len(m.Hooks[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintHook(dAtA []byte, offset int, v uint64) int { - offset -= sovHook(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedHookConfig(r randyHook, easy bool) *HookConfig { - this := &HookConfig{} - v1 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v1 - this.Command = string(randStringHook(r)) - this.Timeout = uint32(r.Uint32()) - this.Stdin = bool(bool(r.Intn(2) == 0)) - v2 := r.Intn(10) - this.RuntimeAssets = make([]string, v2) - for i := 0; i < v2; i++ { - this.RuntimeAssets[i] = string(randStringHook(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHook(r, 6) - } - return this -} - -func NewPopulatedHook(r randyHook, easy bool) *Hook { - this := &Hook{} - v3 := NewPopulatedHookConfig(r, easy) - this.HookConfig = *v3 - this.Duration = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Duration *= -1 - } - this.Executed = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Executed *= -1 - } - this.Issued = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Issued *= -1 - } - this.Output = string(randStringHook(r)) - this.Status = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Status *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHook(r, 7) - } - return this -} - -func NewPopulatedHookList(r randyHook, easy bool) *HookList { - this := &HookList{} - v4 := r.Intn(10) - this.Hooks = make([]string, v4) - for i := 0; i < v4; i++ { - this.Hooks[i] = string(randStringHook(r)) - } - this.Type = string(randStringHook(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedHook(r, 3) - } - return this -} - -type randyHook interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneHook(r randyHook) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringHook(r randyHook) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneHook(r) - } - return string(tmps) -} -func randUnrecognizedHook(r randyHook, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldHook(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldHook(dAtA []byte, r randyHook, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateHook(dAtA, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - dAtA = encodeVarintPopulateHook(dAtA, uint64(v6)) - case 1: - dAtA = encodeVarintPopulateHook(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateHook(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateHook(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateHook(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateHook(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *HookConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovHook(uint64(l)) - l = len(m.Command) - if l > 0 { - n += 1 + l + sovHook(uint64(l)) - } - if m.Timeout != 0 { - n += 1 + sovHook(uint64(m.Timeout)) - } - if m.Stdin { - n += 2 - } - if len(m.RuntimeAssets) > 0 { - for _, s := range m.RuntimeAssets { - l = len(s) - n += 1 + l + sovHook(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Hook) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.HookConfig.Size() - n += 1 + l + sovHook(uint64(l)) - if m.Duration != 0 { - n += 9 - } - if m.Executed != 0 { - n += 1 + sovHook(uint64(m.Executed)) - } - if m.Issued != 0 { - n += 1 + sovHook(uint64(m.Issued)) - } - l = len(m.Output) - if l > 0 { - n += 1 + l + sovHook(uint64(l)) - } - if m.Status != 0 { - n += 1 + sovHook(uint64(m.Status)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HookList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Hooks) > 0 { - for _, s := range m.Hooks { - l = len(s) - n += 1 + l + sovHook(uint64(l)) - } - } - l = len(m.Type) - if l > 0 { - n += 1 + l + sovHook(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovHook(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozHook(x uint64) (n int) { - return sovHook(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *HookConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HookConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HookConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHook - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHook - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHook - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHook - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Command = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - m.Timeout = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timeout |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Stdin = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeAssets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHook - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHook - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeAssets = append(m.RuntimeAssets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHook(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHook - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Hook) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Hook: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Hook: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HookConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHook - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHook - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.HookConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Duration = float64(math.Float64frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Executed", wireType) - } - m.Executed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Executed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Issued", wireType) - } - m.Issued = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Issued |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHook - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHook - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Output = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHook(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHook - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HookList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HookList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HookList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hooks", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHook - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHook - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hooks = append(m.Hooks, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHook - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHook - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHook - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHook(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHook - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipHook(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHook - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHook - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHook - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthHook - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupHook - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthHook - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthHook = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHook = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupHook = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/hook.proto b/api/core/v2/hook.proto deleted file mode 100644 index 09298dec41..0000000000 --- a/api/core/v2/hook.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// HookConfig is the specification of a hook -message HookConfig { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Metadata contains the name, namespace, labels and annotations of the hook - ObjectMeta metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - - // Command is the command to be executed - string command = 2; - - // Timeout is the timeout, in seconds, at which the hook has to run - uint32 timeout = 3 [ (gogoproto.jsontag) = "timeout" ]; - - // Stdin indicates if hook requests have stdin enabled - bool stdin = 4 [ (gogoproto.jsontag) = "stdin" ]; - - // RuntimeAssets are a list of assets required to execute hook. - repeated string runtime_assets = 5 [ (gogoproto.jsontag) = "runtime_assets" ]; -} - -// A Hook is a hook specification and optionally the results of the hook's -// execution. -message Hook { - // Config is the specification of a hook - HookConfig config = 1 [ (gogoproto.nullable) = false, (gogoproto.embed) = true, (gogoproto.jsontag) = "" ]; - - // Duration of execution - double duration = 2; - - // Executed describes the time in which the hook request was executed - int64 executed = 3 [ (gogoproto.jsontag) = "executed" ]; - - // Issued describes the time in which the hook request was issued - int64 issued = 4 [ (gogoproto.jsontag) = "issued" ]; - - // Output from the execution of Command - string output = 5; - - // Status is the exit status code produced by the hook - int32 status = 6 [ (gogoproto.jsontag) = "status" ]; -} - -message HookList { - // Hooks is the list of hooks for the check hook - repeated string hooks = 1 [ (gogoproto.jsontag) = "hooks" ]; - - // Type indicates the type or response code for the check hook - string type = 2; -} diff --git a/api/core/v2/hook_test.go b/api/core/v2/hook_test.go deleted file mode 100644 index 87ba455c25..0000000000 --- a/api/core/v2/hook_test.go +++ /dev/null @@ -1,144 +0,0 @@ -package v2 - -import ( - "encoding/json" - "reflect" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestHookValidate(t *testing.T) { - var h Hook - - // Invalid status - h.Status = -1 - assert.Error(t, h.Validate()) - - // Invalid without config - h.Status = 0 - assert.Error(t, h.Validate()) - - // Valid with valid config - h.HookConfig = HookConfig{ - ObjectMeta: ObjectMeta{ - Name: "test", - Namespace: "default", - }, - Command: "yes", - Timeout: 10, - } - assert.NoError(t, h.Validate()) -} - -func TestHookListValidate(t *testing.T) { - var h HookList - - // Invalid hooks - h.Hooks = nil - assert.Error(t, h.Validate()) - - // Invalid hooks - h.Hooks = []string{} - assert.Error(t, h.Validate()) - - // Invalid without type - h.Hooks = append(h.Hooks, "hook") - assert.Error(t, h.Validate()) - - // Invalid type - h.Type = "invalid" - assert.Error(t, h.Validate()) - - // Valid - h.Type = "0" - assert.NoError(t, h.Validate()) -} - -func TestHookConfig(t *testing.T) { - var h HookConfig - - // Invalid name - assert.Error(t, h.Validate()) - h.Name = "foo" - - // Invalid timeout - assert.Error(t, h.Validate()) - h.Timeout = 60 - - // Invalid command - assert.Error(t, h.Validate()) - h.Command = "echo 'foo'" - - // Invalid Namespace - assert.Error(t, h.Validate()) - h.Namespace = "default" - - // Valid hook - assert.NoError(t, h.Validate()) -} - -func TestFixtureHookIsValid(t *testing.T) { - c := FixtureHook("hook") - config := c.HookConfig - - assert.Equal(t, "hook", config.Name) - assert.NoError(t, config.Validate()) -} - -func TestHookUnmarshal_GH1520(t *testing.T) { - b := []byte(`{"metadata": {"name": "foo", "namespace":"default"},"command":"ps aux","timeout":60}`) - var h Hook - var err error - if err := json.Unmarshal(b, &h); err != nil { - t.Fatal(err) - } - if err := h.Validate(); err != nil { - t.Fatal(err) - } - b, err = json.Marshal(&h) - if err != nil { - t.Fatal(err) - } - var hc HookConfig - if err := json.Unmarshal(b, &hc); err != nil { - t.Fatal(err) - } - if err := hc.Validate(); err != nil { - t.Fatal(err) - } -} - -func TestHookConfigFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureHookConfig("captn"), - wantKey: "hook.name", - want: "captn", - }, - { - name: "exposes labels", - args: &HookConfig{ - ObjectMeta: ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "hook.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("HookConfig.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/hookpb_test.go b/api/core/v2/hookpb_test.go deleted file mode 100644 index 11d0a41a57..0000000000 --- a/api/core/v2/hookpb_test.go +++ /dev/null @@ -1,403 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/hook.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestHookConfigProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookConfig(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HookConfig{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestHookConfigMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookConfig(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HookConfig{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Hook{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestHookMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Hook{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookListProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookList(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HookList{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestHookListMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookList(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HookList{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookConfigJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookConfig(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HookConfig{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestHookJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Hook{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestHookListJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookList(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &HookList{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestHookConfigProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookConfig(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &HookConfig{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookConfigProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookConfig(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &HookConfig{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Hook{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Hook{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookListProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookList(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &HookList{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookListProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookList(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &HookList{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestHookConfigFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedHookConfig(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestHookConfigSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookConfig(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestHookSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHook(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestHookListSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedHookList(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/internal/codegen/check_protoc/LICENSE b/api/core/v2/internal/codegen/check_protoc/LICENSE deleted file mode 100644 index 72ab74dfd2..0000000000 --- a/api/core/v2/internal/codegen/check_protoc/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2017 Sensu Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/api/core/v2/internal/codegen/check_protoc/main.go b/api/core/v2/internal/codegen/check_protoc/main.go deleted file mode 100644 index 3c5ab7e728..0000000000 --- a/api/core/v2/internal/codegen/check_protoc/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "log" - "os/exec" - "regexp" -) - -var libprotoRe = regexp.MustCompile(`^libprotoc 3.19.4\s$`) - -func main() { - out, err := exec.Command("protoc", "--version").Output() - if err != nil { - log.Fatal(err) - } - if !libprotoRe.Match(out) { - log.Fatalf("bad protoc version: want %q, got %q", libprotoRe.String(), string(out)) - } -} diff --git a/api/core/v2/internal/codegen/generate_type/LICENSE b/api/core/v2/internal/codegen/generate_type/LICENSE deleted file mode 100644 index 72ab74dfd2..0000000000 --- a/api/core/v2/internal/codegen/generate_type/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2017 Sensu Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/api/core/v2/internal/codegen/generate_type/generate_type.go b/api/core/v2/internal/codegen/generate_type/generate_type.go deleted file mode 100644 index b33de27c32..0000000000 --- a/api/core/v2/internal/codegen/generate_type/generate_type.go +++ /dev/null @@ -1,139 +0,0 @@ -package main - -import ( - "bufio" - "bytes" - "flag" - "fmt" - "log" - "os" - "os/exec" - "regexp" - "strings" - "text/template" - "unicode" - "unicode/utf8" -) - -var ( - tmplPath = flag.String("t", "", "Path to template file") - output = flag.String("o", "", "Path to output file") - typeRe = regexp.MustCompile(`^type ([A-Z].+) struct \{`) -) - -type tmplData struct { - TypeNames []string - Comment string -} - -// kebabCase is like snakeCase, but underscores are converted to dashes -func kebabCase(camelCase string) string { - return strings.ReplaceAll(snakeCase(camelCase), "_", "-") -} - -func snakeCase(camelCase string) string { - result := make([]rune, 0) - for i, s := range camelCase { - tl := strings.ToLower(string(s)) - - // Treat acronyms as single-word, e.g. LDAP -> ldap - var nextCharCaseChanges bool - if i+1 < len(camelCase) { - nextChar, _ := utf8.DecodeRune([]byte{camelCase[i+1]}) - // Check if the next character case differs from the current character - if (unicode.IsLower(s) && unicode.IsUpper(nextChar)) || (unicode.IsUpper(s) && unicode.IsLower(nextChar)) { - nextCharCaseChanges = true - } - } - - // Add an underscore before the previous character only if it's not the - // first character, the next character case changes and we don't already - // have an underscore in the result rune - if i > 0 && nextCharCaseChanges && result[len(result)-1] != '_' { - // Prepend the underscore if the next character is lowercase, otherwise - // append it - if unicode.IsUpper(s) { - result = append(result, '_') - result = append(result, []rune(tl)...) - } else if unicode.IsLower(s) { - result = append(result, []rune(tl)...) - result = append(result, '_') - } - } else { - result = append(result, []rune(tl)...) - } - } - return string(result) -} - -func receiver(name string) string { - if name == "" { - panic("can't resolve receiver name") - } - letter := strings.ToLower(name[:1]) - return fmt.Sprintf("%s *%s", letter, name) -} - -func rvar(name string) string { - if name == "" { - panic("can't resolve receiver name") - } - return strings.ToLower(name[:1]) -} - -func storeSuffix(name string) string { - return fmt.Sprintf("%ss", snakeCase(name)) -} - -func rbacName(name string) string { - return fmt.Sprintf("%ss", snakeCase(name)) -} - -func main() { - flag.Parse() - tmpl, err := template.New(*tmplPath).Funcs(template.FuncMap{ - "snakeCase": snakeCase, - "receiver": receiver, - "rvar": rvar, - "storeSuffix": storeSuffix, - "rbacName": rbacName, - "kebabCase": kebabCase, - }).ParseFiles(*tmplPath) - - if err != nil { - log.Fatalf("fatal error parsing %s: %s", *tmplPath, err) - } - typeNames, err := discoverTypeNames() - if err != nil { - log.Fatalf("fatal error discovering types: %s", err) - } - tmplData := tmplData{ - TypeNames: typeNames, - Comment: "automatically generated file, do not edit!", - } - out, err := os.Create(*output) - if err != nil { - log.Fatalf("fatal error creating typemap.go: %s", err) - } - if err := tmpl.Execute(out, tmplData); err != nil { - log.Fatalf("fatal error generating typemap.go: %s", err) - } -} - -func discoverTypeNames() ([]string, error) { - var typeNames []string - doc, err := exec.Command("go", "doc", "-all", ".").CombinedOutput() - if err != nil { - return nil, fmt.Errorf("%s: %s", string(doc), err) - } - scanner := bufio.NewScanner(bytes.NewReader(doc)) - for scanner.Scan() { - line := scanner.Bytes() - matches := typeRe.FindSubmatch(line) - if len(matches) > 1 { - // capturing group match in matches[1] - typeNames = append(typeNames, string(matches[1])) - } - } - return typeNames, scanner.Err() -} diff --git a/api/core/v2/internal/codegen/generate_type/generate_type_test.go b/api/core/v2/internal/codegen/generate_type/generate_type_test.go deleted file mode 100644 index cfdc5f4c75..0000000000 --- a/api/core/v2/internal/codegen/generate_type/generate_type_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package main - -import "testing" - -func TestSnakeCase(t *testing.T) { - tests := []struct { - name string - input string - want string - }{ - { - name: "single uppercase character", - input: "A", - want: "a", - }, - { - name: "single-word with some uppercases", - input: "FooBar", - want: "foo_bar", - }, - { - name: "all uppercase word", - input: "FOO", - want: "foo", - }, - { - name: "lowercase with underscore", - input: "foo_bar", - want: "foo_bar", - }, - { - name: "some uppercases with underscore", - input: "Foo_Bar", - want: "foo_bar", - }, - { - name: "acronym", - input: "TLSOptions", - want: "tls_options", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := snakeCase(tt.input); got != tt.want { - t.Errorf("snakeCase() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/api/core/v2/internal/js/LICENSE b/api/core/v2/internal/js/LICENSE deleted file mode 100644 index 72ab74dfd2..0000000000 --- a/api/core/v2/internal/js/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2017 Sensu Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/api/core/v2/internal/js/doc.go b/api/core/v2/internal/js/doc.go deleted file mode 100644 index 321b9423a8..0000000000 --- a/api/core/v2/internal/js/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package js provides facilities based on the Otto VM for parsing and -// executing javascript expressions. -package js diff --git a/api/core/v2/internal/js/js.go b/api/core/v2/internal/js/js.go deleted file mode 100644 index c0e5df7846..0000000000 --- a/api/core/v2/internal/js/js.go +++ /dev/null @@ -1,209 +0,0 @@ -package js - -import ( - "fmt" - "io" - "sync" - - time "github.com/echlebek/timeproxy" - "github.com/robertkrimen/otto" - "github.com/robertkrimen/otto/parser" - "github.com/sirupsen/logrus" -) - -var logger = logrus.WithFields(logrus.Fields{ - "component": "filtering", -}) - -var ottoCache *vmCache -var ottoOnce sync.Once - -type JavascriptAssets interface { - Key() string - Scripts() (map[string]io.ReadCloser, error) -} - -// SyntaxError is returned when a javascript expression could not be parsed. -type SyntaxError string - -func (s SyntaxError) Error() string { - return string(s) -} - -// NewSyntaxError creates a new SyntaxError. -func NewSyntaxError(err string, args ...interface{}) SyntaxError { - return SyntaxError(fmt.Sprintf(err, args...)) -} - -// ParseExpressions parses each JS expression and returns the first error that -// is encountered, or nil. -func ParseExpressions(expressions []string) error { - for i, expr := range expressions { - _, err := parser.ParseFile(nil, "", expr, 0) - if err != nil { - return NewSyntaxError("syntax error in expression %d: %s", i, err) - } - } - return nil -} - -func newOttoVM(assets JavascriptAssets) (*otto.Otto, error) { - ottoOnce.Do(func() { - ottoCache = newVMCache() - }) - key := "" - if assets != nil { - key = assets.Key() - } - vm := ottoCache.Acquire(key) - if vm != nil { - return vm, nil - } - vm = otto.New() - if err := addTimeFuncs(vm); err != nil { - return nil, err - } - if assets != nil { - if err := addAssets(vm, assets); err != nil { - return nil, err - } - } - ottoCache.Init(key, vm) - return ottoCache.Acquire(key), nil -} - -func addAssets(vm *otto.Otto, assets JavascriptAssets) error { - scripts, err := assets.Scripts() - if err != nil { - return err - } - defer func() { - for _, script := range scripts { - _ = script.Close() - } - }() - for name, script := range scripts { - if _, err := vm.Eval(script); err != nil { - return fmt.Errorf("error evaluating %s: %s", name, err) - } - } - return nil -} - -func addTimeFuncs(vm *otto.Otto) error { - funcs := map[string]interface{}{ - // hour returns the hour within the day - "hour": func(args ...interface{}) interface{} { - if len(args) == 0 { - return 0 - } - t := time.Unix(toInt64(args[0]), 0).UTC() - return t.Hour() - }, - // weekday returns the number representation of the day of the week, where - // Sunday = 0 - "weekday": func(args ...interface{}) interface{} { - if len(args) == 0 { - return 0 - } - t := time.Unix(toInt64(args[0]), 0).UTC() - return t.Weekday() - }, - } - for k, v := range funcs { - if err := vm.Set(k, v); err != nil { - return err - } - } - return nil -} - -// Evaluate evaluates the javascript expression with parameters applied. -// If scripts is non-nil, then the scripts will be evaluated in the -// expression's runtime context before the expression is evaluated. -func Evaluate(expr string, parameters interface{}, assets JavascriptAssets) (bool, error) { - jsvm, err := newOttoVM(assets) - if err != nil { - return false, err - } - if params, ok := parameters.(map[string]interface{}); ok { - for name, value := range params { - if err := jsvm.Set(name, value); err != nil { - return false, err - } - } - } - value, err := jsvm.Run(expr) - if err != nil { - return false, err - } - return value.ToBoolean() -} - -// EntityFilterResult is returned by EvaluateEntityFilters -type EntityFilterResult struct { - Value bool - Err error -} - -// MatchEntities compiles the expressions supplied, and applies each -// one of them to each entity supplied. On the first match, success is recorded -// and the evaluator moves on to the next entity. A slice of bools is returned -// that is the same length as the slice of entities supplied, indicating -// match success or failure. -// -// Errors are reported by logging only, with the log level determined by the -// severity of the error. Syntax and type errors are reported at error level, -// while attribute lookup errors are reported at debug level. -// -// If the function cannot set up a javascript VM, or has issues setting vars, -// then the function returns a nil slice and a non-nil error. -func MatchEntities(expressions []string, entities []interface{}) ([]bool, error) { - jsvm, err := newOttoVM(nil) - if err != nil { - return nil, fmt.Errorf("error evaluating entity filters: %s", err) - } - scripts := make([]*otto.Script, 0, len(expressions)) - for _, expr := range expressions { - script, err := jsvm.Compile("", expr) - if err != nil { - logger.WithError(err).Errorf("syntax error in script (%s)", expr) - continue - } - scripts = append(scripts, script) - } - results := make([]bool, 0, len(entities)) - for _, entity := range entities { - if err := jsvm.Set("entity", entity); err != nil { - return nil, fmt.Errorf("error evaluating entity filters: %s", err) - } - var filtered bool - for _, script := range scripts { - result, err := jsvm.Run(script) - if err != nil { - logger.WithError(err).Debugf("error executing entity filter (%s)", script.String()) - filtered = false - break - } - matches, err := result.ToBoolean() - if err != nil { - logger.WithError(err).Errorf("entity filter did not return bool (%s)", script.String()) - filtered = false - break - } - if !matches { - filtered = false - break - } - // Mark the entity as filtered, but continue with the next script - // (expression) until it went through all filters - filtered = true - } - - // At this point, the entity will be marked as filtered only if matched all - // the expressions - results = append(results, filtered) - } - - return results, nil -} diff --git a/api/core/v2/internal/js/js_bench_test.go b/api/core/v2/internal/js/js_bench_test.go deleted file mode 100644 index f6dad655c1..0000000000 --- a/api/core/v2/internal/js/js_bench_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package js_test - -import ( - "testing" - - corev2 "github.com/sensu/sensu-go/api/core/v2" - "github.com/sensu/sensu-go/api/core/v2/internal/js" - "github.com/sensu/sensu-go/api/core/v2/internal/types/dynamic" -) - -func BenchmarkCheckEval(b *testing.B) { - check := corev2.FixtureCheck("foo") - for i := 0; i < b.N; i++ { - synth := dynamic.Synthesize(check) - params := map[string]interface{}{ - "check": synth, - } - _, _ = js.Evaluate("check.status == 0", params, nil) - } -} - -func BenchmarkMetricsEval(b *testing.B) { - metrics := corev2.FixtureMetrics() - for i := 0; i < b.N; i++ { - synth := dynamic.Synthesize(metrics) - params := map[string]interface{}{ - "metrics": synth, - } - _, _ = js.Evaluate("metrics.points.length > 0", params, nil) - } -} - -func BenchmarkMatchEntities1000(b *testing.B) { - entity := dynamic.Synthesize(corev2.FixtureEntity("foo")) - // non-matching expression to avoid short-circuiting behaviour - expression := "entity.system.arch == 'amd65'" - - entities := make([]interface{}, 100) - expressions := make([]string, 10) - - for i := range entities { - entities[i] = entity - } - for i := range expressions { - expressions[i] = expression - } - - b.ResetTimer() - for i := 0; i < b.N; i++ { - _, _ = js.MatchEntities(expressions, entities) - } -} - -func BenchmarkEvaluate1000(b *testing.B) { - entity := map[string]interface{}{ - "entity": dynamic.Synthesize(corev2.FixtureEntity("foo")), - } - expression := "entity.system.arch == 'amd64'" - - b.ResetTimer() - for i := 0; i < b.N; i++ { - for j := 0; j < 1000; j++ { - _, _ = js.Evaluate(expression, entity, nil) - } - } -} diff --git a/api/core/v2/internal/js/time_funcs_test.go b/api/core/v2/internal/js/time_funcs_test.go deleted file mode 100644 index 16d3953504..0000000000 --- a/api/core/v2/internal/js/time_funcs_test.go +++ /dev/null @@ -1,24 +0,0 @@ -package js_test - -import ( - "fmt" - "testing" - - time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - "github.com/sensu/sensu-go/api/core/v2/internal/js" - "github.com/sensu/sensu-go/api/core/v2/internal/types/dynamic" -) - -func TestTimeFuncs(t *testing.T) { - check := corev2.FixtureCheck("foo") - synth := dynamic.Synthesize(check) - expr := fmt.Sprintf("hour(executed) == %d", time.Unix(check.Executed, 0).UTC().Hour()) - result, err := js.Evaluate(expr, synth, nil) - if err != nil { - t.Fatal(err) - } - if !result { - t.Fatal("result should be true") - } -} diff --git a/api/core/v2/internal/js/toint64.go b/api/core/v2/internal/js/toint64.go deleted file mode 100644 index 22aff2bb08..0000000000 --- a/api/core/v2/internal/js/toint64.go +++ /dev/null @@ -1,95 +0,0 @@ -package js - -// do whatever it takes to get an int64 -func toInt64(value interface{}) int64 { - if value == nil { - return 0 - } - switch v := value.(type) { - case int: - return int64(v) - case int8: - return int64(v) - case int16: - return int64(v) - case int32: - return int64(v) - case int64: - return int64(v) - case uint: - return int64(v) - case uint8: - return int64(v) - case uint16: - return int64(v) - case uint32: - return int64(v) - case uint64: - return int64(v) - case float32: - return int64(v) - case float64: - return int64(v) - case *int: - if v == nil { - return 0 - } - return int64(*v) - case *int8: - if v == nil { - return 0 - } - return int64(*v) - case *int16: - if v == nil { - return 0 - } - return int64(*v) - case *int32: - if v == nil { - return 0 - } - return int64(*v) - case *int64: - if v == nil { - return 0 - } - return int64(*v) - case *uint: - if v == nil { - return 0 - } - return int64(*v) - case *uint8: - if v == nil { - return 0 - } - return int64(*v) - case *uint16: - if v == nil { - return 0 - } - return int64(*v) - case *uint32: - if v == nil { - return 0 - } - return int64(*v) - case *uint64: - if v == nil { - return 0 - } - return int64(*v) - case *float32: - if v == nil { - return 0 - } - return int64(*v) - case *float64: - if v == nil { - return 0 - } - return int64(*v) - } - return 0 -} diff --git a/api/core/v2/internal/js/vm_cache.go b/api/core/v2/internal/js/vm_cache.go deleted file mode 100644 index 993c272e98..0000000000 --- a/api/core/v2/internal/js/vm_cache.go +++ /dev/null @@ -1,91 +0,0 @@ -package js - -import ( - "sync" - - time "github.com/echlebek/timeproxy" - "github.com/robertkrimen/otto" -) - -const ( - // cacheMaxAge is the maximum amount of time to leave an unused - // item in the cache for. - cacheMaxAge = time.Hour - - // cacheReapInterval is the amount to sleep in the cache reaper - cacheReapInterval = time.Minute -) - -// vmCache provides an internal mechanism for caching javascript contexts -// according to which assets are loaded into them. Javascrip contexts which -// are not used for cacheMaxAge are disposed of. -type vmCache struct { - vms map[string]*cacheValue - done chan struct{} - sync.Mutex -} - -type cacheValue struct { - lastRead int64 - vm *otto.Otto -} - -func newVMCache() *vmCache { - cache := &vmCache{ - vms: make(map[string]*cacheValue), - done: make(chan struct{}), - } - go cache.reapLoop() - return cache -} - -func (c *vmCache) Close() { - close(c.done) -} - -func (c *vmCache) reapLoop() { - // reap old cache items - ticker := time.NewTicker(cacheReapInterval) - defer ticker.Stop() - for { - select { - case <-c.done: - return - case <-ticker.C: - c.reap() - } - } -} - -func (c *vmCache) reap() { - c.Lock() - for k, v := range c.vms { - valueTime := time.Unix(v.lastRead, 0) - if valueTime.Before(time.Now().Add(-cacheMaxAge)) { - delete(c.vms, k) - } - } - defer c.Unlock() -} - -// Acquire gets a VM from the cache. It is a copy of the cached value. -func (c *vmCache) Acquire(key string) *otto.Otto { - c.Lock() - defer c.Unlock() - val, ok := c.vms[key] - if !ok { - return nil - } - if val.vm == nil { - return nil - } - return val.vm.Copy() -} - -// Init initializes the value in the cache. -func (c *vmCache) Init(key string, vm *otto.Otto) { - c.Lock() - defer c.Unlock() - val := &cacheValue{lastRead: time.Now().Unix(), vm: vm} - c.vms[key] = val -} diff --git a/api/core/v2/internal/js/vm_cache_test.go b/api/core/v2/internal/js/vm_cache_test.go deleted file mode 100644 index 4121d6f3d6..0000000000 --- a/api/core/v2/internal/js/vm_cache_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package js - -import ( - "testing" - - "github.com/echlebek/crock" - time "github.com/echlebek/timeproxy" - "github.com/robertkrimen/otto" -) - -var crockTime = crock.NewTime(time.Now()) - -func init() { - time.TimeProxy = crockTime -} - -func TestVMCacheGetMiss(t *testing.T) { - cache := newVMCache() - defer cache.Close() - val := cache.Acquire("missing") - if val != nil { - t.Fatal("non-nil value") - } -} - -func TestVMCacheGetHit(t *testing.T) { - cache := newVMCache() - defer cache.Close() - vm := otto.New() - cache.Init("foo", vm) - cache.reap() - val := cache.Acquire("foo") - if val == nil { - t.Fatal("cache miss when should be hit") - } -} - -func TestVMCacheExpire(t *testing.T) { - cache := newVMCache() - defer cache.Close() - vm := otto.New() - cache.Init("foo", vm) - crockTime.Set(crockTime.Now().Add(time.Hour * 2)) - cache.reap() - val := cache.Acquire("foo") - if val != nil { - t.Fatal("non-nil value") - } -} diff --git a/api/core/v2/internal/stringutil/LICENSE b/api/core/v2/internal/stringutil/LICENSE deleted file mode 100644 index 72ab74dfd2..0000000000 --- a/api/core/v2/internal/stringutil/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2017 Sensu Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/api/core/v2/internal/stringutil/map.go b/api/core/v2/internal/stringutil/map.go deleted file mode 100644 index dd2576e425..0000000000 --- a/api/core/v2/internal/stringutil/map.go +++ /dev/null @@ -1,8 +0,0 @@ -package stringutil - -// Merge contents of one map into another using a prefix. -func MergeMapWithPrefix(a map[string]string, b map[string]string, prefix string) { - for k, v := range b { - a[prefix+k] = v - } -} diff --git a/api/core/v2/internal/stringutil/map_test.go b/api/core/v2/internal/stringutil/map_test.go deleted file mode 100644 index 528e32eb31..0000000000 --- a/api/core/v2/internal/stringutil/map_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package stringutil - -import ( - "reflect" - "testing" -) - -func TestMergeMapWithPrefix(t *testing.T) { - type args struct { - a map[string]string - b map[string]string - prefix string - } - tests := []struct { - name string - args args - expect map[string]string - }{ - { - name: "merge empty", - args: args{ - a: map[string]string{}, - b: map[string]string{}, - prefix: "prefix.", - }, - expect: map[string]string{}, - }, - { - name: "empty prefix", - args: args{ - a: map[string]string{"a": "b"}, - b: map[string]string{"a": "c"}, - prefix: "", - }, - expect: map[string]string{"a": "c"}, - }, - { - name: "with prefix", - args: args{ - a: map[string]string{"a": "b"}, - b: map[string]string{"a": "b"}, - prefix: "c.", - }, - expect: map[string]string{"a": "b", "c.a": "b"}, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - MergeMapWithPrefix(tt.args.a, tt.args.b, tt.args.prefix) - if !reflect.DeepEqual(tt.args.a, tt.expect) { - t.Errorf("MergeMapWithPrefix() = %#v, want %#v", tt.args.a, tt.expect) - } - }) - } -} diff --git a/api/core/v2/internal/stringutil/occurrences.go b/api/core/v2/internal/stringutil/occurrences.go deleted file mode 100644 index 2a6e975967..0000000000 --- a/api/core/v2/internal/stringutil/occurrences.go +++ /dev/null @@ -1,60 +0,0 @@ -package stringutil - -// OccurrencesOf returns the number of times a string appears in the given slice -// of strings. -func OccurrencesOf(s string, in []string) int { - o := NewOccurrenceSet(in...) - return o.Get(s) -} - -// OccurrenceSet captures of occurrences of string values. -type OccurrenceSet map[string]int - -// NewOccurrenceSet returns new instance of OccurrenceSet. -func NewOccurrenceSet(s ...string) OccurrenceSet { - o := OccurrenceSet{} - o.Add(s...) - return o -} - -// Add entry and increment count -func (o OccurrenceSet) Add(ss ...string) { - for _, s := range ss { - num := o[s] - o[s] = num + 1 - } -} - -// Remove items from set -func (o OccurrenceSet) Remove(ss ...string) { - for _, s := range ss { - delete(o, s) - } -} - -// Get returns occurrences of given string -func (o OccurrenceSet) Get(entry string) int { - return o[entry] -} - -// Values returns all occurrences -func (o OccurrenceSet) Values() []string { - vs := []string{} - for v := range o { - vs = append(vs, v) - } - return vs -} - -// Merge given set of occurrences -func (o OccurrenceSet) Merge(b OccurrenceSet) { - for name, bCount := range b { - aCount := o[name] - o[name] = aCount + bCount - } -} - -// Size of values tracked -func (o OccurrenceSet) Size() int { - return len(o) -} diff --git a/api/core/v2/internal/stringutil/occurrences_test.go b/api/core/v2/internal/stringutil/occurrences_test.go deleted file mode 100644 index 5c3fc054c6..0000000000 --- a/api/core/v2/internal/stringutil/occurrences_test.go +++ /dev/null @@ -1,45 +0,0 @@ -package stringutil - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestOccurrences(t *testing.T) { - assert := assert.New(t) - - // new - setA := NewOccurrenceSet("one", "two") - assert.Equal(setA.Size(), 2) - assert.Contains(setA.Values(), "one") - assert.Contains(setA.Values(), "two") - - // add - setB := setA - setB.Add("three") - setB.Add("four") - assert.Equal(setB.Size(), 4) - assert.Contains(setB.Values(), "three") - assert.Contains(setB.Values(), "four") - - // merge - setA.Merge(setB) - assert.Equal(setA.Size(), 4) - assert.Contains(setA.Values(), "three") - assert.Contains(setA.Values(), "four") - - // remove - setA.Remove("four") - assert.Equal(setA.Size(), 3) - assert.NotContains(setA.Values(), "four") -} - -func TestOccurrencesOf(t *testing.T) { - assert := assert.New(t) - - assert.Equal(OccurrencesOf("zero", []string{}), 0) - assert.Equal(OccurrencesOf("zero", []string{"one", "one", "four"}), 0) - assert.Equal(OccurrencesOf("one", []string{"one", "two", "three"}), 1) - assert.Equal(OccurrencesOf("two", []string{"two", "two", "three"}), 2) -} diff --git a/api/core/v2/internal/stringutil/strings.go b/api/core/v2/internal/stringutil/strings.go deleted file mode 100644 index 7dba5aea75..0000000000 --- a/api/core/v2/internal/stringutil/strings.go +++ /dev/null @@ -1,105 +0,0 @@ -package stringutil - -import ( - "strings" - "unicode" -) - -const ( - lowerAlphaStart = 97 - lowerAlphaStop = 122 -) - -// InArray searches 'array' for 'item' string -// Returns true 'item' is a value of 'array' -func InArray(item string, array []string) bool { - if item == "" || len(array) == 0 { - return false - } - - for i := range array { - if array[i] == item { - return true - } - } - - return false -} - -func isAlpha(r rune) bool { - return r >= lowerAlphaStart && r <= lowerAlphaStop -} - -func alphaNumeric(s string) bool { - for _, r := range s { - if !(unicode.IsDigit(r) || isAlpha(r)) { - return false - } - } - return true -} - -func normalize(s string) string { - if alphaNumeric(s) { - return s - } - lowered := strings.ToLower(s) - if alphaNumeric(lowered) { - return lowered - } - trimmed := make([]rune, 0, len(lowered)) - for _, r := range lowered { - if isAlpha(r) { - trimmed = append(trimmed, r) - } - } - return string(trimmed) -} - -// FoundInArray searches array for item without distinguishing between uppercase -// and lowercase and non-alphanumeric characters. Returns true if item is a -// value of array -func FoundInArray(item string, array []string) bool { - if item == "" || len(array) == 0 { - return false - } - - item = normalize(item) - - for i := range array { - if normalize(array[i]) == item { - return true - } - } - - return false -} - -// Remove searches 'array' for 'item' string -// and removes the string if found -func Remove(item string, array []string) []string { - for i, v := range array { - if v == item { - array = append(array[:i], array[i+1:]...) - break - } - } - return array -} - -// Intersect finds the intersection between two slices of strings. -func Intersect(a []string, b []string) []string { - set := make([]string, 0, len(a)) - tab := map[string]bool{} - - for _, e := range a { - tab[e] = true - } - - for _, e := range b { - if _, found := tab[e]; found { - set = append(set, e) - } - } - return set -} diff --git a/api/core/v2/internal/stringutil/strings_test.go b/api/core/v2/internal/stringutil/strings_test.go deleted file mode 100644 index 20fa675bbc..0000000000 --- a/api/core/v2/internal/stringutil/strings_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package stringutil - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestInArray(t *testing.T) { - var item string - var array []string - - found := InArray(item, array) - assert.False(t, found, "if item and array are both empty, it should return false") - - item = "foo" - found = InArray(item, array) - assert.False(t, found, "if array is empty, it should return false") - - array = []string{"bar", "qux"} - found = InArray(item, array) - assert.False(t, found, "it should return false if the item isn't found in the array") - - array = append(array, "foo") - found = InArray(item, array) - assert.True(t, found, "it should return true if the item is found in the array") -} - -func TestFindInArray(t *testing.T) { - var array []string - - found := FoundInArray("Foo", []string{}) - assert.False(t, found) - - array = []string{"foo", "bar"} - found = FoundInArray("Foo", array) - assert.True(t, found) - - array = []string{"foo", "bar"} - found = FoundInArray("FooBar", array) - assert.False(t, found) - - array = []string{"foo", "bar"} - found = FoundInArray("Foo ", array) - assert.True(t, found) - - array = []string{"foo_bar"} - found = FoundInArray("Foo_Bar", array) - assert.True(t, found) - - array = []string{"foobar"} - found = FoundInArray("Foo_Qux", array) - assert.False(t, found) -} - -func TestRemove(t *testing.T) { - array := []string{"bar", "qux"} - array = Remove("bar", array) - assert.Equal(t, []string{"qux"}, array) - - array = []string{} - array = Remove("bar", array) - assert.Equal(t, []string{}, array) -} - -func TestIntersect(t *testing.T) { - a, b := []string{"bar", "qux"}, []string{"foo", "bar"} - intr := Intersect(a, b) - assert.Equal(t, []string{"bar"}, intr) - - a, b = []string{}, []string{} - intr = Intersect(a, b) - assert.Equal(t, []string{}, intr) - - a, b = []string{"foo", "qux"}, []string{"baz", "bar"} - intr = Intersect(a, b) - assert.Equal(t, []string{}, intr) -} - -func BenchmarkFoundInArray(b *testing.B) { - for i := 0; i < b.N; i++ { - FoundInArray("foo!BAR baz", []string{"foo", "foobar", "FOO BAR", "foo bar baz", "foobarbaz"}) - } -} diff --git a/api/core/v2/internal/types/dynamic/LICENSE b/api/core/v2/internal/types/dynamic/LICENSE deleted file mode 100644 index 72ab74dfd2..0000000000 --- a/api/core/v2/internal/types/dynamic/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2017 Sensu Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/api/core/v2/internal/types/dynamic/dynamic.go b/api/core/v2/internal/types/dynamic/dynamic.go deleted file mode 100644 index aac7eee49a..0000000000 --- a/api/core/v2/internal/types/dynamic/dynamic.go +++ /dev/null @@ -1,222 +0,0 @@ -package dynamic - -import ( - "errors" - "fmt" - "reflect" - "strings" -) - -// SynthesizeExtras is a type that wants to pass extra values to the Synthesize -// function. The key-value pairs will be included as-is without inspection by -// the Synthesize function. This is useful for populated synthesized values with -// functions or computed values. -type SynthesizeExtras interface { - // SynthesizeExtras returns a map of extra values to include when passing - // to Synthesize(). - SynthesizeExtras() map[string]interface{} -} - -// SetField inserts a value into v at path. -// -// For example, if the marshalled representation of v is -// {"foo": "bar", "baz": { "value": 5 }}, -// Then SetField(v, "baz.value", 10) will result in -// {"foo": "bar", "baz": { "value": 10 }}. -// -// v's reflect.Kind must be reflect.Struct, or a non-nil error will -// be returned. If the path refers to a struct field, then v must -// be addressable, or an error will be returned. -func SetField(v interface{}, path string, value interface{}) error { - strukt := reflect.Indirect(reflect.ValueOf(v)) - if !strukt.IsValid() { - return errors.New("SetField on nil Attributes") - } - if kind := strukt.Kind(); kind != reflect.Struct { - return fmt.Errorf("invalid type (want struct): %v", kind) - } - fieldsp := structFieldPool.Get().(*[]structField) - defer func() { - *fieldsp = (*fieldsp)[:0] - structFieldPool.Put(fieldsp) - }() - getJSONFields(strukt, true, fieldsp) - fields := *fieldsp - f, ok := lookupField(fields, path) - if !ok { - return fmt.Errorf("dynamic: no such field: %q", path) - } - field := f.Value - if !field.IsValid() { - return fmt.Errorf("dynamic: field is invalid: %s", path) - } - if !field.CanSet() { - return fmt.Errorf("dynamic: struct field not addressable: %q", path) - } - field.Set(reflect.ValueOf(value)) - return nil -} - -// GetField gets a field from v according to its name. -// If GetField doesn't find a struct field with the corresponding name, then -// it will try to dynamically find the corresponding item in the 'Extended' -// field. GetField is case-sensitive, but extended attribute names will be -// converted to CamelCaps. -func GetField(v interface{}, name string) (interface{}, error) { - if len(name) == 0 { - return nil, errors.New("dynamic: empty path specified") - } - if v == nil { - return nil, errors.New("dynamic: GetField with nil") - } - - if s := string([]rune(name)[0]); strings.Title(s) != s { - // Exported fields are always upper-cased for the first rune - name = strings.Title(s) + string([]rune(name)[1:]) - } - strukt := reflect.Indirect(reflect.ValueOf(v)) - if kind := strukt.Kind(); kind != reflect.Struct { - return nil, fmt.Errorf("invalid type (want struct): %v", kind) - } - field := strukt.FieldByName(name) - if field.IsValid() { - field := reflect.Indirect(field) - if field.Kind() == reflect.Map { - return reflectMapToMapParameters(field), nil - } - return field.Interface(), nil - } - - return nil, fmt.Errorf("missing field: %q", name) -} - -// reflectMapToMapParameters turns a reflect.Map into a map[string]interface{} -func reflectMapToMapParameters(v reflect.Value) interface{} { - result := make(map[string]interface{}) - for _, key := range v.MapKeys() { - if key.Kind() != reflect.String { - // Fallback - if the map has a non-string key type, return the - // variable as-is. - return v.Interface() - } - result[key.Interface().(string)] = v.MapIndex(key).Interface() - } - return result -} - -// Synthesize recursively turns structs into map[string]interface{} -// values. It works on most datatypes. Synthesize panics if it is -// called on channels. -// -// Synthesize will use the json tag from struct fields to name map -// keys, if the json tag is present. -func Synthesize(v interface{}) interface{} { - value := reflect.Indirect(reflect.ValueOf(v)) - switch value.Kind() { - case reflect.Struct: - result := synthesizeStruct(value) - if m, ok := v.(SynthesizeExtras); ok { - for k, v := range m.SynthesizeExtras() { - result[k] = v - } - } - return result - case reflect.Slice, reflect.Array: - return synthesizeSlice(value) - case reflect.Map: - return synthesizeMap(value) - case reflect.Chan: - panic("can't synthesize channel") - case reflect.Invalid: - // We got passed a nil - return nil - default: - if value.CanInterface() { - return value.Interface() - } - return nil - } -} - -func synthesizeSlice(value reflect.Value) interface{} { - length := value.Len() - slice := make([]interface{}, length) - for i := 0; i < length; i++ { - val := value.Index(i) - var elt interface{} = nil - if val.CanInterface() { - elt = val.Interface() - } - slice[i] = Synthesize(elt) - } - return slice -} - -func synthesizeMap(value reflect.Value) interface{} { - typ := value.Type() - keyT := typ.Key() - if keyT.Kind() != reflect.String { - // Maps without string keys are not supported - return map[string]interface{}{} - } - length := value.Len() - out := make(map[string]interface{}, length) - for _, key := range value.MapKeys() { - val := value.MapIndex(key) - var elt interface{} - if val.CanInterface() { - elt = val.Interface() - } - out[key.Interface().(string)] = Synthesize(elt) - } - return out -} - -func synthesizeStruct(value reflect.Value) map[string]interface{} { - numField := value.NumField() - out := make(map[string]interface{}, numField) - t := value.Type() - for i := 0; i < numField; i++ { - field := t.Field(i) - if field.PkgPath != "" { - // unexported fields are not included in the synthesis - continue - } - s := structField{Field: field} - fieldName, omitEmpty := s.jsonFieldName() - fieldValue := value.Field(i) - - // Don't add empty/nil fields to the map if omitempty is specified - empty := isEmpty(fieldValue) - if empty && omitEmpty { - continue - } - - switch fieldValue.Kind() { - case reflect.Struct: - // Recursively convert all fields to synthesized values - fields := synthesizeStruct(fieldValue) - - // flatten embedded fields to the top level - if t.Field(i).Anonymous { - for k, v := range fields { - out[k] = v - } - } else { - out[fieldName] = fields - } - case reflect.Slice, reflect.Array: - out[fieldName] = synthesizeSlice(fieldValue) - case reflect.Map: - out[fieldName] = synthesizeMap(fieldValue) - default: - if fieldValue.CanInterface() { - out[fieldName] = Synthesize(fieldValue.Interface()) - } else { - out[fieldName] = nil - } - } - } - - return out -} diff --git a/api/core/v2/internal/types/dynamic/dynamic_bench_test.go b/api/core/v2/internal/types/dynamic/dynamic_bench_test.go deleted file mode 100644 index da8919735d..0000000000 --- a/api/core/v2/internal/types/dynamic/dynamic_bench_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package dynamic_test - -import ( - "encoding/json" - "testing" - - corev2 "github.com/sensu/sensu-go/api/core/v2" - "github.com/sensu/sensu-go/api/core/v2/internal/types/dynamic" -) - -func BenchmarkSynthesize(b *testing.B) { - c := corev2.FixtureCheck("foo") - for i := 0; i < b.N; i++ { - _ = dynamic.Synthesize(c) - } -} - -func BenchmarkCheckMarshalRoundtrip(b *testing.B) { - c := corev2.FixtureCheck("foo") - bytez, _ := json.Marshal(c) - for i := 0; i < b.N; i++ { - var check corev2.Check - _ = json.Unmarshal(bytez, &check) - } -} diff --git a/api/core/v2/internal/types/dynamic/dynamic_test.go b/api/core/v2/internal/types/dynamic/dynamic_test.go deleted file mode 100644 index 79e756c075..0000000000 --- a/api/core/v2/internal/types/dynamic/dynamic_test.go +++ /dev/null @@ -1,191 +0,0 @@ -package dynamic - -import ( - "reflect" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -// getFields gets a map of struct fields by name from a reflect.Value -func getFields(v reflect.Value) map[string]structField { - typ := v.Type() - numField := v.NumField() - result := make(map[string]structField, numField) - for i := 0; i < numField; i++ { - field := typ.Field(i) - if len(field.PkgPath) != 0 { - // unexported - continue - } - value := v.Field(i) - sf := structField{Field: field, Value: value} - sf.JSONName, sf.OmitEmpty = sf.jsonFieldName() - result[field.Name] = sf - } - return result -} - -func TestGetStructField(t *testing.T) { - assert := assert.New(t) - - test := struct { - Valid int `json:"valid"` - invalidUnexported int - ValidEmpty int `json:"validEmpty"` - InvalidEmpty int `json:"invalidEmpty,omitempty"` - Invalid int `json:"-"` - }{ - Valid: 5, - invalidUnexported: 1, - ValidEmpty: 0, - InvalidEmpty: 0, - Invalid: 10, - } - - fields := getFields(reflect.ValueOf(test)) - require.Equal(t, len(fields), 4) - - field := fields["Valid"] - assert.Equal(field.Value.Interface(), 5) - assert.Equal("valid", field.JSONName) - assert.Equal(false, field.OmitEmpty) - - field = fields["ValidEmpty"] - assert.Equal(field.Value.Interface(), 0) - assert.Equal("validEmpty", field.JSONName) - assert.Equal(false, field.OmitEmpty) - - field = fields["InvalidEmpty"] - assert.Equal(field.Value.Interface(), 0) - - field = fields["Invalid"] - assert.Equal(field.Value.Interface(), 10) -} - -type MyType struct { - Foo string `json:"foo"` - Bar int `json:"bar"` -} - -type MyTypeEmbedded struct { - Foo string `json:"foo"` - Bar int `json:"bar"` - NotEmbedded Meta `json:"not-embed"` - Meta `json:"meta"` -} - -type Meta struct { - Name string `json:"name"` - Namespace string `json:"namespace"` - Labels map[string]string `json:"labels"` - Annotations map[string]string `json:"annotations"` -} - -func (m *MyType) Get(name string) (interface{}, error) { - return GetField(m, name) -} - -func TestGetField(t *testing.T) { - m := &MyType{ - Foo: "hello", - Bar: 42, - } - - tests := []struct { - Field string - Exp interface{} - }{ - { - Field: "Foo", - Exp: "hello", - }, - { - Field: "Bar", - Exp: int(42), - }, - } - - for _, test := range tests { - t.Run(test.Field, func(t *testing.T) { - field, err := GetField(m, test.Field) - require.NoError(t, err) - assert.Equal(t, test.Exp, field) - }) - } -} - -func TestSetFieldOnStructField(t *testing.T) { - var m MyType - err := SetField(&m, "foo", "hello, world!") - require.NoError(t, err) - require.Equal(t, "hello, world!", m.Foo) -} - -func TestSynthesize(t *testing.T) { - testCases := []struct { - name string - input interface{} - expected map[string]interface{} - }{ - { - name: "empty input", - input: &MyType{}, - expected: map[string]interface{}{"bar": 0, "foo": ""}, - }, - { - name: "standard fields", - input: &MyType{Foo: "bar", Bar: 5}, - expected: map[string]interface{}{ - "bar": 5, - "foo": "bar", - }, - }, - { - name: "embedded fields", - input: &MyTypeEmbedded{ - Foo: "bar", - Bar: 5, - Meta: Meta{ - Name: "baz", - Namespace: "default", - Labels: map[string]string{"Hi": "hello"}, - Annotations: map[string]string{"One": "1", "Two": "2"}, - }, - NotEmbedded: Meta{ - Name: "not-baz", - Namespace: "not-default", - Labels: map[string]string{}, - Annotations: map[string]string{}, - }, - }, - expected: map[string]interface{}{ - "bar": 5, - "foo": "bar", - "name": "baz", - "namespace": "default", - "labels": map[string]interface{}{ - "Hi": "hello", - }, - "annotations": map[string]interface{}{ - "One": "1", - "Two": "2", - }, - "not-embed": map[string]interface{}{ - "name": "not-baz", - "namespace": "not-default", - "labels": map[string]interface{}{}, - "annotations": map[string]interface{}{}, - }, - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - result := Synthesize(tc.input) - assert.Equal(t, tc.expected, reflect.ValueOf(result).Interface()) - }) - } -} diff --git a/api/core/v2/internal/types/dynamic/encoding.go b/api/core/v2/internal/types/dynamic/encoding.go deleted file mode 100644 index f782898e9f..0000000000 --- a/api/core/v2/internal/types/dynamic/encoding.go +++ /dev/null @@ -1,70 +0,0 @@ -package dynamic - -import ( - "encoding/json" - "reflect" - "sync" -) - -var ( - structFieldPool sync.Pool - wrapperPool sync.Pool -) - -func init() { - structFieldPool.New = func() interface{} { - s := make([]structField, 0, 16) - return &s - } - wrapperPool.New = func() interface{} { - w := make(map[string]*json.RawMessage, 32) - return &w - } -} - -func lookupField(fields []structField, name string) (structField, bool) { - for i := range fields { - if fields[i].JSONName == name { - return fields[i], true - } - } - return structField{}, false -} - -// getJSONFields finds all of the valid JSON fields in v. It has a flag to -// control omitEmpty behaviour. -// resultp is populated with all of the fields that were found. -// The function uses resultp as a parameter in order to support sync pooling. -func getJSONFields(v reflect.Value, omitEmpty bool, resultp *[]structField) { - typ := v.Type() - numField := v.NumField() - result := *resultp - var sf structField - for i := 0; i < numField; i++ { - sf.Field = typ.Field(i) - if len(sf.Field.PkgPath) != 0 { - // unexported - continue - } - sf.Value = v.Field(i) - sf.JSONName, sf.OmitEmpty = sf.jsonFieldName() - if sf.JSONName == "-" { - continue - } - if omitEmpty && sf.OmitEmpty && isEmpty(sf.Value) { - continue - } - // if the field is embedded, flatten it out - if sf.Field.Anonymous { - fieldsp := structFieldPool.Get().(*[]structField) - getJSONFields(sf.Value, omitEmpty, fieldsp) - result = append(result, *fieldsp...) - *fieldsp = (*fieldsp)[:0] - structFieldPool.Put(fieldsp) - continue - } - // sf is a valid JSON field. - result = append(result, sf) - } - *resultp = result -} diff --git a/api/core/v2/internal/types/dynamic/encoding_test.go b/api/core/v2/internal/types/dynamic/encoding_test.go deleted file mode 100644 index 392fa0a5b5..0000000000 --- a/api/core/v2/internal/types/dynamic/encoding_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package dynamic - -import ( - "reflect" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestGetJSONStructField(t *testing.T) { - assert := assert.New(t) - require := require.New(t) - - test := struct { - Valid int `json:"valid"` - invalidUnexported int - ValidEmpty int `json:"validEmpty"` - InvalidEmpty int `json:"invalidEmpty,omitempty"` - Invalid int `json:"-"` - }{ - Valid: 5, - invalidUnexported: 1, - ValidEmpty: 0, - InvalidEmpty: 0, - Invalid: 10, - } - - fieldsp := structFieldPool.Get().(*[]structField) - getJSONFields(reflect.ValueOf(test), true, fieldsp) - fields := *fieldsp - require.Equal(2, len(fields)) - - field, ok := lookupField(fields, "valid") - require.Equal(true, ok) - assert.Equal(field.Value.Interface(), 5) - assert.Equal("valid", field.JSONName) - assert.Equal(false, field.OmitEmpty) - - field, _ = lookupField(fields, "validEmpty") - assert.Equal(field.Value.Interface(), 0) - assert.Equal("validEmpty", field.JSONName) - assert.Equal(false, field.OmitEmpty) -} diff --git a/api/core/v2/internal/types/dynamic/structfield.go b/api/core/v2/internal/types/dynamic/structfield.go deleted file mode 100644 index bb3c27a097..0000000000 --- a/api/core/v2/internal/types/dynamic/structfield.go +++ /dev/null @@ -1,44 +0,0 @@ -package dynamic - -import ( - "reflect" - "strings" - "sync" -) - -var jsonFieldCache = new(sync.Map) - -// structField is an internal convenience type -type structField struct { - Field reflect.StructField - Value reflect.Value - JSONName string - OmitEmpty bool -} - -type jsonField struct { - name string - omitEmpty bool -} - -func (s *structField) jsonFieldName() (string, bool) { - cached, ok := jsonFieldCache.Load(s.Field.Tag) - if ok { - field := cached.(jsonField) - return field.name, field.omitEmpty - } - fieldName := s.Field.Name - tag, ok := s.Field.Tag.Lookup("json") - omitEmpty := false - if ok { - parts := strings.Split(tag, ",") - if len(parts[0]) > 0 { - fieldName = parts[0] - } - if len(parts) > 1 && parts[1] == "omitempty" { - omitEmpty = true - } - } - jsonFieldCache.Store(s.Field.Tag, jsonField{name: fieldName, omitEmpty: omitEmpty}) - return fieldName, omitEmpty -} diff --git a/api/core/v2/internal/types/dynamic/synthesize_test.go b/api/core/v2/internal/types/dynamic/synthesize_test.go deleted file mode 100644 index 8132c73a62..0000000000 --- a/api/core/v2/internal/types/dynamic/synthesize_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package dynamic_test - -import ( - "reflect" - "testing" - - corev2 "github.com/sensu/sensu-go/api/core/v2" - "github.com/sensu/sensu-go/api/core/v2/internal/types/dynamic" -) - -func TestSynthesizeEvent(t *testing.T) { - event := corev2.FixtureEvent("foo", "bar") - synth := dynamic.Synthesize(event).(map[string]interface{}) - if !reflect.DeepEqual(event.HasCheck(), synth["has_check"]) { - t.Fatal("bad synthesis") - } -} diff --git a/api/core/v2/internal/types/dynamic/util.go b/api/core/v2/internal/types/dynamic/util.go deleted file mode 100644 index 010b6852c6..0000000000 --- a/api/core/v2/internal/types/dynamic/util.go +++ /dev/null @@ -1,54 +0,0 @@ -package dynamic - -import ( - "reflect" - "strings" -) - -func isEmpty(value reflect.Value) bool { - if !value.IsValid() { - return true - } - - switch value.Kind() { - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice, reflect.String: - if value.Len() == 0 { - return true - } - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - if value.Int() == int64(0) { - return true - } - case reflect.Interface, reflect.Ptr: - if value.IsNil() { - return true - } - } - - return false -} - -// mapOfExtendedAttributes produces a map[string]interface{} of extended -// attributes with capitalization of the key -func mapOfExtendedAttributes(v interface{}) map[string]interface{} { - values := reflect.ValueOf(v) - if values.Kind() != reflect.Map { - return nil - } - - attrs := make(map[string]interface{}) - for _, value := range values.MapKeys() { - if values.MapIndex(value).CanInterface() { - typeOfValue := reflect.TypeOf(values.MapIndex(value).Interface()).Kind() - if typeOfValue == reflect.Map || typeOfValue == reflect.Slice { - attrs[strings.Title(value.String())] = mapOfExtendedAttributes(values.MapIndex(value).Interface()) - } else { - if values.MapIndex(value).CanInterface() { - attrs[strings.Title(value.String())] = values.MapIndex(value).Interface() - } - } - } - } - - return attrs -} diff --git a/api/core/v2/internal/types/dynamic/util_test.go b/api/core/v2/internal/types/dynamic/util_test.go deleted file mode 100644 index fd95fb5f62..0000000000 --- a/api/core/v2/internal/types/dynamic/util_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package dynamic - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestMapOfExtendedAttributes(t *testing.T) { - testCases := []struct { - name string - input map[string]interface{} - expected map[string]interface{} - }{ - { - name: "empty input", - input: map[string]interface{}{}, - expected: map[string]interface{}{}, - }, - { - name: "simple structure", - input: map[string]interface{}{ - "foo": "bar", - }, - expected: map[string]interface{}{ - "Foo": "bar", - }, - }, - { - name: "nested structure", - input: map[string]interface{}{ - "foo": map[string]interface{}{ - "bar": "baz", - }, - }, - expected: map[string]interface{}{ - "Foo": map[string]interface{}{ - "Bar": "baz", - }, - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - result := mapOfExtendedAttributes(tc.input) - assert.Equal(t, tc.expected, result) - }) - } -} diff --git a/api/core/v2/keepalive.go b/api/core/v2/keepalive.go deleted file mode 100644 index b648926b80..0000000000 --- a/api/core/v2/keepalive.go +++ /dev/null @@ -1,13 +0,0 @@ -package v2 - -// DefaultKeepaliveTimeout specifies the default keepalive timeout -const DefaultKeepaliveTimeout = 120 - -// NewKeepaliveRecord initializes and returns a KeepaliveRecord from -// an entity and its expiration time. -func NewKeepaliveRecord(e *Entity, t int64) *KeepaliveRecord { - return &KeepaliveRecord{ - ObjectMeta: NewObjectMeta(e.Name, e.Namespace), - Time: t, - } -} diff --git a/api/core/v2/keepalive.pb.go b/api/core/v2/keepalive.pb.go deleted file mode 100644 index b5fb5fc5d9..0000000000 --- a/api/core/v2/keepalive.pb.go +++ /dev/null @@ -1,511 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/keepalive.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// A KeepaliveRecord is a tuple of an entity name and the time at which the -// entity's keepalive will next expire. -type KeepaliveRecord struct { - // Metadata contains the name (of the entity), and namespace, labels and - // annotations of the keepalive record - ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *KeepaliveRecord) Reset() { *m = KeepaliveRecord{} } -func (m *KeepaliveRecord) String() string { return proto.CompactTextString(m) } -func (*KeepaliveRecord) ProtoMessage() {} -func (*KeepaliveRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_072e6265f0869649, []int{0} -} -func (m *KeepaliveRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeepaliveRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeepaliveRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeepaliveRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeepaliveRecord.Merge(m, src) -} -func (m *KeepaliveRecord) XXX_Size() int { - return m.Size() -} -func (m *KeepaliveRecord) XXX_DiscardUnknown() { - xxx_messageInfo_KeepaliveRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_KeepaliveRecord proto.InternalMessageInfo - -func init() { - proto.RegisterType((*KeepaliveRecord)(nil), "sensu.core.v2.KeepaliveRecord") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/keepalive.proto", fileDescriptor_072e6265f0869649) -} - -var fileDescriptor_072e6265f0869649 = []byte{ - // 276 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4d, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0xd9, 0xa9, - 0xa9, 0x05, 0x89, 0x39, 0x99, 0x65, 0xa9, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, - 0x55, 0x7a, 0x20, 0x69, 0xbd, 0x32, 0x23, 0x29, 0x13, 0x24, 0x53, 0xd2, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0xaa, 0x92, 0x4a, 0xd3, 0x1c, 0xca, 0x0c, 0xf5, 0x8c, 0xf5, 0x0c, 0xc1, 0x82, 0x60, 0x31, - 0x30, 0x0b, 0x62, 0x88, 0x94, 0x01, 0x71, 0x76, 0xe7, 0xa6, 0x96, 0x24, 0x42, 0x74, 0x28, 0x4d, - 0x60, 0xe4, 0xe2, 0xf7, 0x86, 0x39, 0x25, 0x28, 0x35, 0x39, 0xbf, 0x28, 0x45, 0x28, 0x94, 0x8b, - 0x03, 0xa4, 0x22, 0x25, 0xb1, 0x24, 0x51, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x52, 0x0f, - 0xc5, 0x75, 0x7a, 0xfe, 0x49, 0x59, 0xa9, 0xc9, 0x25, 0xbe, 0xa9, 0x25, 0x89, 0x4e, 0x72, 0x27, - 0xee, 0xc9, 0x33, 0x5c, 0xb8, 0x27, 0xcf, 0xf8, 0xea, 0x9e, 0xbc, 0x10, 0x4c, 0x9b, 0x4e, 0x7e, - 0x6e, 0x66, 0x49, 0x6a, 0x6e, 0x41, 0x49, 0x65, 0x10, 0xdc, 0x28, 0x21, 0x19, 0x2e, 0x96, 0x92, - 0xcc, 0xdc, 0x54, 0x09, 0x16, 0x05, 0x46, 0x0d, 0x66, 0x27, 0x8e, 0x57, 0xf7, 0xe4, 0xc1, 0xfc, - 0x20, 0x30, 0x69, 0xc5, 0xd1, 0xb1, 0x40, 0x9e, 0x61, 0xc5, 0x02, 0x79, 0x46, 0x27, 0x85, 0x1f, - 0x0f, 0xe5, 0x18, 0x57, 0x3c, 0x92, 0x63, 0xdc, 0xf1, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, - 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf1, 0x58, 0x8e, 0x21, 0x8a, 0xa9, 0xcc, - 0x28, 0x89, 0x0d, 0xec, 0x76, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x30, 0xc8, 0xa7, 0x82, - 0x6b, 0x01, 0x00, 0x00, -} - -func (this *KeepaliveRecord) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*KeepaliveRecord) - if !ok { - that2, ok := that.(KeepaliveRecord) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.Time != that1.Time { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type KeepaliveRecordFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetObjectMeta() ObjectMeta - GetTime() int64 -} - -func (this *KeepaliveRecord) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *KeepaliveRecord) TestProto() github_com_golang_protobuf_proto.Message { - return NewKeepaliveRecordFromFace(this) -} - -func (this *KeepaliveRecord) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *KeepaliveRecord) GetTime() int64 { - return this.Time -} - -func NewKeepaliveRecordFromFace(that KeepaliveRecordFace) *KeepaliveRecord { - this := &KeepaliveRecord{} - this.ObjectMeta = that.GetObjectMeta() - this.Time = that.GetTime() - return this -} - -func (m *KeepaliveRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeepaliveRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeepaliveRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Time != 0 { - i = encodeVarintKeepalive(dAtA, i, uint64(m.Time)) - i-- - dAtA[i] = 0x20 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintKeepalive(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintKeepalive(dAtA []byte, offset int, v uint64) int { - offset -= sovKeepalive(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedKeepaliveRecord(r randyKeepalive, easy bool) *KeepaliveRecord { - this := &KeepaliveRecord{} - v1 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v1 - this.Time = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Time *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedKeepalive(r, 5) - } - return this -} - -type randyKeepalive interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneKeepalive(r randyKeepalive) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringKeepalive(r randyKeepalive) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneKeepalive(r) - } - return string(tmps) -} -func randUnrecognizedKeepalive(r randyKeepalive, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldKeepalive(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldKeepalive(dAtA []byte, r randyKeepalive, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateKeepalive(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateKeepalive(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateKeepalive(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateKeepalive(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateKeepalive(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateKeepalive(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateKeepalive(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *KeepaliveRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovKeepalive(uint64(l)) - if m.Time != 0 { - n += 1 + sovKeepalive(uint64(m.Time)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovKeepalive(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozKeepalive(x uint64) (n int) { - return sovKeepalive(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *KeepaliveRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeepalive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeepaliveRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeepaliveRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeepalive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthKeepalive - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthKeepalive - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) - } - m.Time = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeepalive - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Time |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipKeepalive(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeepalive - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipKeepalive(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeepalive - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeepalive - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeepalive - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthKeepalive - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupKeepalive - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthKeepalive - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthKeepalive = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowKeepalive = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupKeepalive = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/keepalive.proto b/api/core/v2/keepalive.proto deleted file mode 100644 index 7c4bb52e6d..0000000000 --- a/api/core/v2/keepalive.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// A KeepaliveRecord is a tuple of an entity name and the time at which the -// entity's keepalive will next expire. -message KeepaliveRecord { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Metadata contains the name (of the entity), and namespace, labels and - // annotations of the keepalive record - ObjectMeta metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - int64 time = 4 [ (gogoproto.jsontag) = "time" ]; -} diff --git a/api/core/v2/keepalivepb_test.go b/api/core/v2/keepalivepb_test.go deleted file mode 100644 index b7798d1084..0000000000 --- a/api/core/v2/keepalivepb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/keepalive.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestKeepaliveRecordProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeepaliveRecord(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KeepaliveRecord{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestKeepaliveRecordMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeepaliveRecord(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KeepaliveRecord{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeepaliveRecordJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeepaliveRecord(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KeepaliveRecord{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestKeepaliveRecordProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeepaliveRecord(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &KeepaliveRecord{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeepaliveRecordProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeepaliveRecord(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &KeepaliveRecord{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeepaliveRecordFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKeepaliveRecord(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestKeepaliveRecordSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeepaliveRecord(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/meta.go b/api/core/v2/meta.go deleted file mode 100644 index 54d0c46839..0000000000 --- a/api/core/v2/meta.go +++ /dev/null @@ -1,71 +0,0 @@ -package v2 - -const ( - // ManagedByLabel is used to identify which client was used to create/update a - // resource - ManagedByLabel = "sensu.io/managed_by" -) - -type Comparison int - -const ( - MetaLess Comparison = -1 - MetaEqual Comparison = 0 - MetaGreater Comparison = 1 -) - -// NewObjectMeta makes a new ObjectMeta, with Labels and Annotations assigned -// empty maps. -func NewObjectMeta(name, namespace string) ObjectMeta { - return ObjectMeta{ - Name: name, - Namespace: namespace, - Labels: make(map[string]string), - Annotations: make(map[string]string), - } -} - -// NewObjectMetaP is the pointer-returning version of NewObjectMeta. -func NewObjectMetaP(name, namespace string) *ObjectMeta { - meta := NewObjectMeta(name, namespace) - return &meta -} - -// AddLabel safely adds a label to this ObjectMeta, creating the map if necessary -func (o *ObjectMeta) AddLabel(key, value string) { - if o.Labels == nil { - o.Labels = make(map[string]string) - } - o.Labels[key] = value -} - -// AddAnnotation safely adds an annotation to this ObjectMeta, creating the map if necessary -func (o *ObjectMeta) AddAnnotation(key, value string) { - if o.Annotations == nil { - o.Annotations = make(map[string]string) - } - o.Annotations[key] = value -} - -// Cmp compares this ObjectMeta with another ObjectMeta. -func (o *ObjectMeta) Cmp(other *ObjectMeta) Comparison { - if o == nil { - return MetaLess - } - if other == nil { - return MetaGreater - } - if o.Namespace < other.Namespace { - return MetaLess - } - if o.Namespace > other.Namespace { - return MetaGreater - } - if o.Name < other.Name { - return MetaLess - } - if o.Name > other.Name { - return MetaGreater - } - return MetaEqual -} diff --git a/api/core/v2/meta.pb.go b/api/core/v2/meta.pb.go deleted file mode 100644 index 26fe550a62..0000000000 --- a/api/core/v2/meta.pb.go +++ /dev/null @@ -1,1215 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/meta.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// ObjectMeta is metadata all persisted objects have. -type ObjectMeta struct { - // Name must be unique within a namespace. Name is primarily intended for - // creation idempotence and configuration definition. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" yaml: "name,omitempty"` - // Namespace defines a logical grouping of objects within which each object - // name must be unique. - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty" yaml: "namespace,omitempty"` - // Map of string keys and values that can be used to organize and categorize - // (scope and select) objects. May also be used in filters and token - // substitution. - // TODO: Link to Sensu documentation. - // More info: http://kubernetes.io/docs/user-guide/labels - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" yaml: ",labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Annotations is an unstructured key value map stored with a resource that - // may be set by external tools to store and retrieve arbitrary metadata. They - // are not queryable and should be preserved when modifying objects. - // TODO: Link to Sensu documentation. - // More info: http://kubernetes.io/docs/user-guide/annotations - Annotations map[string]string `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty" yaml: "annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // CreatedBy indicates which user created the resource. - CreatedBy string `protobuf:"bytes,5,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty" yaml: "created_by,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } -func (m *ObjectMeta) String() string { return proto.CompactTextString(m) } -func (*ObjectMeta) ProtoMessage() {} -func (*ObjectMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_ebda82d5ea369e05, []int{0} -} -func (m *ObjectMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ObjectMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ObjectMeta.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ObjectMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_ObjectMeta.Merge(m, src) -} -func (m *ObjectMeta) XXX_Size() int { - return m.Size() -} -func (m *ObjectMeta) XXX_DiscardUnknown() { - xxx_messageInfo_ObjectMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_ObjectMeta proto.InternalMessageInfo - -func (m *ObjectMeta) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ObjectMeta) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -func (m *ObjectMeta) GetLabels() map[string]string { - if m != nil { - return m.Labels - } - return nil -} - -func (m *ObjectMeta) GetAnnotations() map[string]string { - if m != nil { - return m.Annotations - } - return nil -} - -func (m *ObjectMeta) GetCreatedBy() string { - if m != nil { - return m.CreatedBy - } - return "" -} - -// TypeMeta is information that can be used to resolve a data type -type TypeMeta struct { - // Type is the type name of the data type - Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"type" yaml: "type,omitempty"` - // APIVersion is the APIVersion of the data type - APIVersion string `protobuf:"bytes,2,opt,name=APIVersion,proto3" json:"api_version" yaml: "api_version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TypeMeta) Reset() { *m = TypeMeta{} } -func (m *TypeMeta) String() string { return proto.CompactTextString(m) } -func (*TypeMeta) ProtoMessage() {} -func (*TypeMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_ebda82d5ea369e05, []int{1} -} -func (m *TypeMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TypeMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TypeMeta.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TypeMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeMeta.Merge(m, src) -} -func (m *TypeMeta) XXX_Size() int { - return m.Size() -} -func (m *TypeMeta) XXX_DiscardUnknown() { - xxx_messageInfo_TypeMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_TypeMeta proto.InternalMessageInfo - -func (m *TypeMeta) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *TypeMeta) GetAPIVersion() string { - if m != nil { - return m.APIVersion - } - return "" -} - -func init() { - proto.RegisterType((*ObjectMeta)(nil), "sensu.core.v2.ObjectMeta") - proto.RegisterMapType((map[string]string)(nil), "sensu.core.v2.ObjectMeta.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "sensu.core.v2.ObjectMeta.LabelsEntry") - proto.RegisterType((*TypeMeta)(nil), "sensu.core.v2.TypeMeta") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/meta.proto", fileDescriptor_ebda82d5ea369e05) -} - -var fileDescriptor_ebda82d5ea369e05 = []byte{ - // 494 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0x76, 0xda, 0xec, 0x62, 0x5f, 0x51, 0x4a, 0x5c, 0x25, 0xd6, 0x35, 0x29, 0x03, 0xc2, 0x22, - 0x75, 0xb2, 0xed, 0xca, 0xb2, 0xf6, 0x20, 0xbb, 0x05, 0x0f, 0x82, 0xe2, 0x12, 0x16, 0x05, 0x2f, - 0xcb, 0x24, 0x8e, 0x35, 0xda, 0x64, 0x42, 0x32, 0x0d, 0xe4, 0x1f, 0xf8, 0x03, 0x3c, 0xf8, 0x13, - 0xfc, 0x29, 0x1e, 0xfd, 0x05, 0x41, 0xeb, 0x2d, 0x47, 0x41, 0xf0, 0x28, 0x99, 0x04, 0x33, 0x29, - 0xeb, 0x61, 0x2f, 0xed, 0xbc, 0xef, 0x7b, 0xef, 0xfb, 0xe6, 0xbd, 0x79, 0x81, 0xfd, 0x85, 0x2f, - 0xde, 0xad, 0x5c, 0xe2, 0xf1, 0xc0, 0x4e, 0x58, 0x98, 0xac, 0xaa, 0xdf, 0x07, 0x0b, 0x6e, 0xd3, - 0xc8, 0xb7, 0x3d, 0x1e, 0x33, 0x3b, 0x9d, 0xda, 0x01, 0x13, 0x94, 0x44, 0x31, 0x17, 0x5c, 0xbf, - 0x26, 0x13, 0x48, 0xc9, 0x90, 0x74, 0x3a, 0x7c, 0xa8, 0x08, 0x2c, 0xf8, 0x82, 0xdb, 0x32, 0xcb, - 0x5d, 0xbd, 0x3d, 0x4e, 0x27, 0xe4, 0x80, 0x4c, 0x24, 0x28, 0x31, 0x79, 0xaa, 0x44, 0xf0, 0x6f, - 0x0d, 0xe0, 0x85, 0xfb, 0x9e, 0x79, 0xe2, 0x39, 0x13, 0x54, 0x3f, 0x06, 0x2d, 0xa4, 0x01, 0x33, - 0xd0, 0x08, 0xed, 0xf5, 0xe6, 0xe3, 0x22, 0xb7, 0xae, 0x97, 0xf1, 0x98, 0x07, 0xbe, 0x60, 0x41, - 0x24, 0xb2, 0x5f, 0xb9, 0x75, 0x2b, 0xa3, 0xc1, 0x72, 0x36, 0xc2, 0x6d, 0x02, 0x3b, 0xb2, 0x52, - 0x3f, 0x83, 0x5e, 0xf9, 0x9f, 0x44, 0xd4, 0x63, 0x46, 0x47, 0xca, 0x1c, 0x16, 0xb9, 0x75, 0xe3, - 0x1f, 0xd8, 0xd2, 0xba, 0xa3, 0x68, 0x6d, 0xb0, 0xd8, 0x69, 0x84, 0xf4, 0x08, 0xb6, 0x97, 0xd4, - 0x65, 0xcb, 0xc4, 0xe8, 0x8e, 0xba, 0x7b, 0xfd, 0xe9, 0x3d, 0xd2, 0x6a, 0x9e, 0x34, 0x2d, 0x90, - 0x67, 0x32, 0xef, 0x49, 0x28, 0xe2, 0x6c, 0x3e, 0x29, 0x72, 0x6b, 0x50, 0x15, 0xb6, 0x6c, 0x6f, - 0xd7, 0xb6, 0xe3, 0x4d, 0x0e, 0x3b, 0xb5, 0x8f, 0xfe, 0x11, 0x41, 0x9f, 0x86, 0x21, 0x17, 0x54, - 0xf8, 0x3c, 0x4c, 0x0c, 0x4d, 0xfa, 0xde, 0xff, 0xbf, 0xef, 0x49, 0x93, 0x5c, 0x99, 0xcf, 0x8a, - 0xdc, 0xba, 0xa9, 0x48, 0xb4, 0x6e, 0x70, 0xb7, 0xbe, 0xc1, 0x85, 0x3c, 0x76, 0x54, 0x6b, 0xfd, - 0x15, 0x80, 0x17, 0x33, 0x2a, 0xd8, 0x9b, 0x73, 0x37, 0x33, 0xb6, 0xe4, 0x4c, 0x8f, 0x8a, 0xdc, - 0xda, 0x69, 0xd0, 0x96, 0xf6, 0x6e, 0xad, 0x7d, 0x11, 0x8d, 0x9d, 0x5e, 0x0d, 0xcf, 0xb3, 0xe1, - 0x23, 0xe8, 0x2b, 0xd3, 0xd2, 0x07, 0xd0, 0xfd, 0xc0, 0xb2, 0xea, 0xed, 0x9d, 0xf2, 0xa8, 0xef, - 0xc0, 0x56, 0x4a, 0x97, 0xab, 0xfa, 0x21, 0x9d, 0x2a, 0x98, 0x75, 0x8e, 0xd0, 0xf0, 0x31, 0x0c, - 0x36, 0x1b, 0xbe, 0x4c, 0x3d, 0xfe, 0x84, 0xe0, 0xea, 0x59, 0x16, 0x31, 0xb9, 0x75, 0x87, 0xa0, - 0x95, 0xe7, 0x7a, 0xeb, 0x70, 0x91, 0x5b, 0x9a, 0xc8, 0x22, 0xa6, 0xec, 0x5a, 0x19, 0xb6, 0x76, - 0xad, 0xcc, 0xd7, 0x4f, 0x01, 0x4e, 0x4e, 0x9f, 0xbe, 0x64, 0x71, 0xe2, 0xf3, 0xb0, 0x5e, 0xb6, - 0xfd, 0x22, 0xb7, 0xfa, 0x34, 0xf2, 0xcf, 0xd3, 0x0a, 0x56, 0x67, 0xdd, 0xa0, 0xaa, 0x96, 0xa2, - 0x31, 0xdf, 0xfd, 0xf3, 0xc3, 0x44, 0x5f, 0xd6, 0x26, 0xfa, 0xba, 0x36, 0xd1, 0xb7, 0xb5, 0x89, - 0xbe, 0xaf, 0x4d, 0xf4, 0xf9, 0xa7, 0x79, 0xe5, 0x75, 0x27, 0x9d, 0xba, 0xdb, 0xf2, 0x9b, 0x39, - 0xf8, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x97, 0x8d, 0x24, 0xac, 0x03, 0x00, 0x00, -} - -func (this *ObjectMeta) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ObjectMeta) - if !ok { - that2, ok := that.(ObjectMeta) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Namespace != that1.Namespace { - return false - } - if len(this.Labels) != len(that1.Labels) { - return false - } - for i := range this.Labels { - if this.Labels[i] != that1.Labels[i] { - return false - } - } - if len(this.Annotations) != len(that1.Annotations) { - return false - } - for i := range this.Annotations { - if this.Annotations[i] != that1.Annotations[i] { - return false - } - } - if this.CreatedBy != that1.CreatedBy { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TypeMeta) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TypeMeta) - if !ok { - that2, ok := that.(TypeMeta) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - if this.APIVersion != that1.APIVersion { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *ObjectMeta) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ObjectMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ObjectMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.CreatedBy) > 0 { - i -= len(m.CreatedBy) - copy(dAtA[i:], m.CreatedBy) - i = encodeVarintMeta(dAtA, i, uint64(len(m.CreatedBy))) - i-- - dAtA[i] = 0x2a - } - if len(m.Annotations) > 0 { - for k := range m.Annotations { - v := m.Annotations[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintMeta(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintMeta(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintMeta(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Labels) > 0 { - for k := range m.Labels { - v := m.Labels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintMeta(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintMeta(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintMeta(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintMeta(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMeta(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TypeMeta) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TypeMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TypeMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.APIVersion) > 0 { - i -= len(m.APIVersion) - copy(dAtA[i:], m.APIVersion) - i = encodeVarintMeta(dAtA, i, uint64(len(m.APIVersion))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintMeta(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintMeta(dAtA []byte, offset int, v uint64) int { - offset -= sovMeta(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedObjectMeta(r randyMeta, easy bool) *ObjectMeta { - this := &ObjectMeta{} - this.Name = string(randStringMeta(r)) - this.Namespace = string(randStringMeta(r)) - if r.Intn(5) != 0 { - v1 := r.Intn(10) - this.Labels = make(map[string]string) - for i := 0; i < v1; i++ { - this.Labels[randStringMeta(r)] = randStringMeta(r) - } - } - if r.Intn(5) != 0 { - v2 := r.Intn(10) - this.Annotations = make(map[string]string) - for i := 0; i < v2; i++ { - this.Annotations[randStringMeta(r)] = randStringMeta(r) - } - } - this.CreatedBy = string(randStringMeta(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMeta(r, 6) - } - return this -} - -func NewPopulatedTypeMeta(r randyMeta, easy bool) *TypeMeta { - this := &TypeMeta{} - this.Type = string(randStringMeta(r)) - this.APIVersion = string(randStringMeta(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMeta(r, 3) - } - return this -} - -type randyMeta interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMeta(r randyMeta) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMeta(r randyMeta) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneMeta(r) - } - return string(tmps) -} -func randUnrecognizedMeta(r randyMeta, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldMeta(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldMeta(dAtA []byte, r randyMeta, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateMeta(dAtA, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - dAtA = encodeVarintPopulateMeta(dAtA, uint64(v4)) - case 1: - dAtA = encodeVarintPopulateMeta(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateMeta(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateMeta(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateMeta(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateMeta(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *ObjectMeta) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMeta(uint64(l)) - } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovMeta(uint64(l)) - } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMeta(uint64(len(k))) + 1 + len(v) + sovMeta(uint64(len(v))) - n += mapEntrySize + 1 + sovMeta(uint64(mapEntrySize)) - } - } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMeta(uint64(len(k))) + 1 + len(v) + sovMeta(uint64(len(v))) - n += mapEntrySize + 1 + sovMeta(uint64(mapEntrySize)) - } - } - l = len(m.CreatedBy) - if l > 0 { - n += 1 + l + sovMeta(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TypeMeta) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovMeta(uint64(l)) - } - l = len(m.APIVersion) - if l > 0 { - n += 1 + l + sovMeta(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMeta(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMeta(x uint64) (n int) { - return sovMeta(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ObjectMeta) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ObjectMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ObjectMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMeta - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMeta - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMeta - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMeta - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMeta - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMeta - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Labels == nil { - m.Labels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMeta - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthMeta - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMeta - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthMeta - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipMeta(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMeta - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Labels[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMeta - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMeta - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Annotations == nil { - m.Annotations = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMeta - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthMeta - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMeta - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthMeta - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipMeta(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMeta - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Annotations[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedBy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMeta - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMeta - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreatedBy = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMeta(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMeta - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TypeMeta) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TypeMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TypeMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMeta - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMeta - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMeta - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMeta - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMeta - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMeta(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMeta - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMeta(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMeta - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMeta - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMeta - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMeta - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMeta - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMeta - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMeta = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMeta = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMeta = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/meta.proto b/api/core/v2/meta.proto deleted file mode 100644 index 09784bf2ca..0000000000 --- a/api/core/v2/meta.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; - -// ObjectMeta is metadata all persisted objects have. -message ObjectMeta { - // Name must be unique within a namespace. Name is primarily intended for - // creation idempotence and configuration definition. - string name = 1 [ (gogoproto.jsontag) = "name,omitempty", (gogoproto.moretags) = "yaml: \"name,omitempty\"" ]; - - // Namespace defines a logical grouping of objects within which each object - // name must be unique. - string namespace = 2 [ (gogoproto.jsontag) = "namespace,omitempty", (gogoproto.moretags) = "yaml: \"namespace,omitempty\"" ]; - - // Map of string keys and values that can be used to organize and categorize - // (scope and select) objects. May also be used in filters and token - // substitution. - // TODO: Link to Sensu documentation. - // More info: http://kubernetes.io/docs/user-guide/labels - map labels = 3 [ (gogoproto.jsontag) = "labels,omitempty", (gogoproto.moretags) = "yaml: \",labels,omitempty\"" ]; - - // Annotations is an unstructured key value map stored with a resource that - // may be set by external tools to store and retrieve arbitrary metadata. They - // are not queryable and should be preserved when modifying objects. - // TODO: Link to Sensu documentation. - // More info: http://kubernetes.io/docs/user-guide/annotations - map annotations = 4 [ (gogoproto.jsontag) = "annotations,omitempty", (gogoproto.moretags) = "yaml: \"annotations,omitempty\"" ]; - - // CreatedBy indicates which user created the resource. - string created_by = 5 [ (gogoproto.jsontag) = "created_by,omitempty", (gogoproto.moretags) = "yaml: \"created_by,omitempty\"" ]; -} - -// TypeMeta is information that can be used to resolve a data type -message TypeMeta { - // Type is the type name of the data type - string Type = 1 [ (gogoproto.jsontag) = "type", (gogoproto.moretags) = "yaml: \"type,omitempty\"" ]; - - // APIVersion is the APIVersion of the data type - string APIVersion = 2 [ (gogoproto.jsontag) = "api_version", (gogoproto.moretags) = "yaml: \"api_version,omitempty\"" ]; -} diff --git a/api/core/v2/metric_threshold.go b/api/core/v2/metric_threshold.go deleted file mode 100644 index 95abd2aba7..0000000000 --- a/api/core/v2/metric_threshold.go +++ /dev/null @@ -1,94 +0,0 @@ -package v2 - -import ( - "errors" - "fmt" - "strconv" - "strings" -) - -type MetricThresholds []*MetricThreshold - -// Validate returns an error if the MetricThreshold does not pass validation tests. -func (m *MetricThreshold) Validate() error { - if err := ValidateName(m.Name); err != nil { - return errors.New("metric threshold name " + err.Error()) - } - - if len(m.Thresholds) == 0 { - return errors.New("there must be at least one threshold rule") - } - - for i, threshold := range m.Thresholds { - if err := threshold.Validate(); err != nil { - return fmt.Errorf("rule %d: %v", i, err) - } - } - for i, tag := range m.Tags { - if err := tag.Validate(); err != nil { - return fmt.Errorf("tag %d: %v", i, err) - } - } - - return nil -} - -func (m *MetricThreshold) MatchesMetricPoint(metric *MetricPoint) bool { - if m.Name != metric.Name { - return false - } - for _, tag := range m.Tags { - found := false - for _, metricTag := range metric.Tags { - if tag.Name == metricTag.Name && tag.Value == metricTag.Value { - found = true - break - } - } - if !found { - return false - } - } - return true -} - -// Validate returns an error if the MetricThresholdRule does not pass validation tests. -func (r *MetricThresholdRule) Validate() error { - r.Min = strings.TrimSpace(r.Min) - r.Max = strings.TrimSpace(r.Max) - if r.Min == "" && r.Max == "" { - return errors.New("One of Min or Max required") - } - if r.Min != "" { - if _, err := strconv.ParseFloat(r.Min, 64); err != nil { - return errors.New("Min must be a floating point number") - } - } - if r.Max != "" { - if _, err := strconv.ParseFloat(r.Max, 64); err != nil { - return errors.New("Max but be a floating point number") - } - } - - return nil -} - -// Validate returns an error if the MetricThresholdTag does not pass validation tests. -func (t *MetricThresholdTag) Validate() error { - if err := ValidateName(t.Name); err != nil { - return errors.New("metric threshold tag name " + err.Error()) - } - if t.Value == "" { - return errors.New("metric threshold tag value must not be empty") - } - return nil -} - -func (mt MetricThresholds) Validate() error { - for i, threshold := range mt { - if err := threshold.Validate(); err != nil { - return fmt.Errorf("invalid metric threshold %d: %s", i, err.Error()) - } - } - return nil -} diff --git a/api/core/v2/metric_threshold.pb.go b/api/core/v2/metric_threshold.pb.go deleted file mode 100644 index 60d4fffdef..0000000000 --- a/api/core/v2/metric_threshold.pb.go +++ /dev/null @@ -1,1239 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/metric_threshold.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// A rule to apply to a metric to determine its status -type MetricThresholdRule struct { - // Minimum value for the metric to be considered ok - Min string `protobuf:"bytes,1,opt,name=min,proto3" json:"min"` - // Maximum value for the metric to be considered ok - Max string `protobuf:"bytes,2,opt,name=max,proto3" json:"max"` - // The status of the metric if the value is below the minimum or above the maximum - Status uint32 `protobuf:"varint,3,opt,name=status,proto3" json:"status"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetricThresholdRule) Reset() { *m = MetricThresholdRule{} } -func (m *MetricThresholdRule) String() string { return proto.CompactTextString(m) } -func (*MetricThresholdRule) ProtoMessage() {} -func (*MetricThresholdRule) Descriptor() ([]byte, []int) { - return fileDescriptor_d6f3da758ea11cc5, []int{0} -} -func (m *MetricThresholdRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricThresholdRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetricThresholdRule.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetricThresholdRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricThresholdRule.Merge(m, src) -} -func (m *MetricThresholdRule) XXX_Size() int { - return m.Size() -} -func (m *MetricThresholdRule) XXX_DiscardUnknown() { - xxx_messageInfo_MetricThresholdRule.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricThresholdRule proto.InternalMessageInfo - -func (m *MetricThresholdRule) GetMin() string { - if m != nil { - return m.Min - } - return "" -} - -func (m *MetricThresholdRule) GetMax() string { - if m != nil { - return m.Max - } - return "" -} - -func (m *MetricThresholdRule) GetStatus() uint32 { - if m != nil { - return m.Status - } - return 0 -} - -// Represents the measurement tags to match -type MetricThresholdTag struct { - // Name of the metric tag to match - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` - // Value of the metric tag to match - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetricThresholdTag) Reset() { *m = MetricThresholdTag{} } -func (m *MetricThresholdTag) String() string { return proto.CompactTextString(m) } -func (*MetricThresholdTag) ProtoMessage() {} -func (*MetricThresholdTag) Descriptor() ([]byte, []int) { - return fileDescriptor_d6f3da758ea11cc5, []int{1} -} -func (m *MetricThresholdTag) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricThresholdTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetricThresholdTag.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetricThresholdTag) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricThresholdTag.Merge(m, src) -} -func (m *MetricThresholdTag) XXX_Size() int { - return m.Size() -} -func (m *MetricThresholdTag) XXX_DiscardUnknown() { - xxx_messageInfo_MetricThresholdTag.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricThresholdTag proto.InternalMessageInfo - -func (m *MetricThresholdTag) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *MetricThresholdTag) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -// Represents an instance of a metric filter to evaluate -type MetricThreshold struct { - // Name of the metric to match - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` - // Tag values to match with the metric - Tags []*MetricThresholdTag `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags"` - // Rules to evaluate when the filter matches a metric - Thresholds []*MetricThresholdRule `protobuf:"bytes,3,rep,name=thresholds,proto3" json:"thresholds"` - // The metric status if the measurement is missing - NullStatus uint32 `protobuf:"varint,4,opt,name=null_status,json=nullStatus,proto3" json:"null_status"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetricThreshold) Reset() { *m = MetricThreshold{} } -func (m *MetricThreshold) String() string { return proto.CompactTextString(m) } -func (*MetricThreshold) ProtoMessage() {} -func (*MetricThreshold) Descriptor() ([]byte, []int) { - return fileDescriptor_d6f3da758ea11cc5, []int{2} -} -func (m *MetricThreshold) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricThreshold) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetricThreshold.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetricThreshold) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricThreshold.Merge(m, src) -} -func (m *MetricThreshold) XXX_Size() int { - return m.Size() -} -func (m *MetricThreshold) XXX_DiscardUnknown() { - xxx_messageInfo_MetricThreshold.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricThreshold proto.InternalMessageInfo - -func (m *MetricThreshold) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *MetricThreshold) GetTags() []*MetricThresholdTag { - if m != nil { - return m.Tags - } - return nil -} - -func (m *MetricThreshold) GetThresholds() []*MetricThresholdRule { - if m != nil { - return m.Thresholds - } - return nil -} - -func (m *MetricThreshold) GetNullStatus() uint32 { - if m != nil { - return m.NullStatus - } - return 0 -} - -func init() { - proto.RegisterType((*MetricThresholdRule)(nil), "sensu.core.v2.MetricThresholdRule") - proto.RegisterType((*MetricThresholdTag)(nil), "sensu.core.v2.MetricThresholdTag") - proto.RegisterType((*MetricThreshold)(nil), "sensu.core.v2.MetricThreshold") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/metric_threshold.proto", fileDescriptor_d6f3da758ea11cc5) -} - -var fileDescriptor_d6f3da758ea11cc5 = []byte{ - // 369 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x3f, 0x4e, 0xeb, 0x40, - 0x10, 0xc6, 0xdf, 0x26, 0x79, 0x81, 0x4c, 0x14, 0x22, 0x2d, 0x8d, 0x41, 0xc8, 0x36, 0xae, 0xd2, - 0xb0, 0x26, 0x0e, 0x25, 0x12, 0xc8, 0x3d, 0xcd, 0x26, 0x15, 0x4d, 0xb4, 0x09, 0xc6, 0xb1, 0x64, - 0x7b, 0x23, 0xff, 0x53, 0x8e, 0xc2, 0x11, 0x38, 0x02, 0x47, 0xa0, 0xe4, 0x04, 0x16, 0x98, 0xce, - 0x07, 0x40, 0x94, 0x68, 0xd7, 0x06, 0x99, 0x20, 0x41, 0xf3, 0xed, 0xcc, 0xb7, 0xb3, 0xbf, 0xb1, - 0x67, 0xe0, 0xdc, 0xf5, 0x92, 0x55, 0xba, 0x20, 0x4b, 0x1e, 0x98, 0xb1, 0x13, 0xc6, 0x69, 0xa5, - 0x27, 0x2e, 0x37, 0xd9, 0xda, 0x33, 0x97, 0x3c, 0x72, 0xcc, 0xcc, 0x32, 0x03, 0x27, 0x89, 0xbc, - 0xe5, 0x3c, 0x59, 0x45, 0x4e, 0xbc, 0xe2, 0xfe, 0x0d, 0x59, 0x47, 0x3c, 0xe1, 0x78, 0x20, 0x8b, - 0x89, 0xa8, 0x22, 0x99, 0x75, 0x78, 0xd6, 0x80, 0xb9, 0xdc, 0xe5, 0xa6, 0xac, 0x5a, 0xa4, 0xb7, - 0x97, 0xd9, 0x98, 0x4c, 0xc8, 0x58, 0x9a, 0xd2, 0x93, 0x51, 0x05, 0x31, 0x38, 0xec, 0x5f, 0x49, - 0xfc, 0xec, 0x93, 0x4e, 0x53, 0xdf, 0xc1, 0x07, 0xd0, 0x0e, 0xbc, 0x50, 0x41, 0x3a, 0x1a, 0xf5, - 0xec, 0x9d, 0x32, 0xd7, 0x44, 0x4a, 0x85, 0xc8, 0x2b, 0xb6, 0x51, 0x5a, 0x8d, 0x2b, 0xb6, 0xa1, - 0x42, 0xb0, 0x01, 0xdd, 0x38, 0x61, 0x49, 0x1a, 0x2b, 0x6d, 0x1d, 0x8d, 0x06, 0x36, 0x94, 0xb9, - 0x56, 0x3b, 0xb4, 0x3e, 0x8d, 0x29, 0xe0, 0xad, 0x86, 0x33, 0xe6, 0xe2, 0x23, 0xe8, 0x84, 0x2c, - 0x70, 0xea, 0x86, 0xbb, 0x65, 0xae, 0xc9, 0x9c, 0x4a, 0xc5, 0x1a, 0xfc, 0xcf, 0x98, 0x9f, 0x3a, - 0x75, 0xd3, 0x5e, 0x99, 0x6b, 0x95, 0x41, 0xab, 0xc3, 0x78, 0x43, 0x30, 0xdc, 0xa2, 0xfe, 0x81, - 0xbc, 0x80, 0x4e, 0xc2, 0xdc, 0x58, 0x69, 0xe9, 0xed, 0x51, 0xdf, 0x3a, 0x26, 0xdf, 0x66, 0x49, - 0x7e, 0x7e, 0x61, 0x05, 0x10, 0x4f, 0xa8, 0x54, 0x4c, 0x01, 0xbe, 0x16, 0x22, 0xfe, 0x57, 0x60, - 0x8c, 0xdf, 0x31, 0x62, 0xb2, 0xf6, 0x5e, 0x99, 0x6b, 0x8d, 0x97, 0xb4, 0x11, 0xe3, 0x53, 0xe8, - 0x87, 0xa9, 0xef, 0xcf, 0xeb, 0x21, 0x76, 0xe4, 0x10, 0x87, 0x65, 0xae, 0x35, 0x6d, 0x0a, 0x22, - 0x99, 0xca, 0xd8, 0xd6, 0xdf, 0x5f, 0x54, 0x74, 0x5f, 0xa8, 0xe8, 0xa1, 0x50, 0xd1, 0x63, 0xa1, - 0xa2, 0xa7, 0x42, 0x45, 0xcf, 0x85, 0x8a, 0xee, 0x5e, 0xd5, 0x7f, 0xd7, 0xad, 0xcc, 0x5a, 0x74, - 0xe5, 0x9e, 0x27, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x1e, 0xf8, 0x72, 0x6c, 0x02, 0x00, - 0x00, -} - -func (this *MetricThresholdRule) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MetricThresholdRule) - if !ok { - that2, ok := that.(MetricThresholdRule) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Min != that1.Min { - return false - } - if this.Max != that1.Max { - return false - } - if this.Status != that1.Status { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MetricThresholdTag) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MetricThresholdTag) - if !ok { - that2, ok := that.(MetricThresholdTag) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MetricThreshold) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MetricThreshold) - if !ok { - that2, ok := that.(MetricThreshold) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if len(this.Tags) != len(that1.Tags) { - return false - } - for i := range this.Tags { - if !this.Tags[i].Equal(that1.Tags[i]) { - return false - } - } - if len(this.Thresholds) != len(that1.Thresholds) { - return false - } - for i := range this.Thresholds { - if !this.Thresholds[i].Equal(that1.Thresholds[i]) { - return false - } - } - if this.NullStatus != that1.NullStatus { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *MetricThresholdRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetricThresholdRule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetricThresholdRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Status != 0 { - i = encodeVarintMetricThreshold(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x18 - } - if len(m.Max) > 0 { - i -= len(m.Max) - copy(dAtA[i:], m.Max) - i = encodeVarintMetricThreshold(dAtA, i, uint64(len(m.Max))) - i-- - dAtA[i] = 0x12 - } - if len(m.Min) > 0 { - i -= len(m.Min) - copy(dAtA[i:], m.Min) - i = encodeVarintMetricThreshold(dAtA, i, uint64(len(m.Min))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MetricThresholdTag) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetricThresholdTag) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetricThresholdTag) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintMetricThreshold(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMetricThreshold(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MetricThreshold) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetricThreshold) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetricThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.NullStatus != 0 { - i = encodeVarintMetricThreshold(dAtA, i, uint64(m.NullStatus)) - i-- - dAtA[i] = 0x20 - } - if len(m.Thresholds) > 0 { - for iNdEx := len(m.Thresholds) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Thresholds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetricThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Tags) > 0 { - for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetricThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMetricThreshold(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintMetricThreshold(dAtA []byte, offset int, v uint64) int { - offset -= sovMetricThreshold(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedMetricThresholdRule(r randyMetricThreshold, easy bool) *MetricThresholdRule { - this := &MetricThresholdRule{} - this.Min = string(randStringMetricThreshold(r)) - this.Max = string(randStringMetricThreshold(r)) - this.Status = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMetricThreshold(r, 4) - } - return this -} - -func NewPopulatedMetricThresholdTag(r randyMetricThreshold, easy bool) *MetricThresholdTag { - this := &MetricThresholdTag{} - this.Name = string(randStringMetricThreshold(r)) - this.Value = string(randStringMetricThreshold(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMetricThreshold(r, 3) - } - return this -} - -func NewPopulatedMetricThreshold(r randyMetricThreshold, easy bool) *MetricThreshold { - this := &MetricThreshold{} - this.Name = string(randStringMetricThreshold(r)) - if r.Intn(5) != 0 { - v1 := r.Intn(5) - this.Tags = make([]*MetricThresholdTag, v1) - for i := 0; i < v1; i++ { - this.Tags[i] = NewPopulatedMetricThresholdTag(r, easy) - } - } - if r.Intn(5) != 0 { - v2 := r.Intn(5) - this.Thresholds = make([]*MetricThresholdRule, v2) - for i := 0; i < v2; i++ { - this.Thresholds[i] = NewPopulatedMetricThresholdRule(r, easy) - } - } - this.NullStatus = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMetricThreshold(r, 5) - } - return this -} - -type randyMetricThreshold interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMetricThreshold(r randyMetricThreshold) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMetricThreshold(r randyMetricThreshold) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneMetricThreshold(r) - } - return string(tmps) -} -func randUnrecognizedMetricThreshold(r randyMetricThreshold, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldMetricThreshold(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldMetricThreshold(dAtA []byte, r randyMetricThreshold, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateMetricThreshold(dAtA, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - dAtA = encodeVarintPopulateMetricThreshold(dAtA, uint64(v4)) - case 1: - dAtA = encodeVarintPopulateMetricThreshold(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateMetricThreshold(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateMetricThreshold(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateMetricThreshold(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateMetricThreshold(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *MetricThresholdRule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Min) - if l > 0 { - n += 1 + l + sovMetricThreshold(uint64(l)) - } - l = len(m.Max) - if l > 0 { - n += 1 + l + sovMetricThreshold(uint64(l)) - } - if m.Status != 0 { - n += 1 + sovMetricThreshold(uint64(m.Status)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MetricThresholdTag) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMetricThreshold(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovMetricThreshold(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MetricThreshold) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMetricThreshold(uint64(l)) - } - if len(m.Tags) > 0 { - for _, e := range m.Tags { - l = e.Size() - n += 1 + l + sovMetricThreshold(uint64(l)) - } - } - if len(m.Thresholds) > 0 { - for _, e := range m.Thresholds { - l = e.Size() - n += 1 + l + sovMetricThreshold(uint64(l)) - } - } - if m.NullStatus != 0 { - n += 1 + sovMetricThreshold(uint64(m.NullStatus)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMetricThreshold(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetricThreshold(x uint64) (n int) { - return sovMetricThreshold(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MetricThresholdRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetricThresholdRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetricThresholdRule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetricThreshold - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetricThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Min = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetricThreshold - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetricThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Max = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetricThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MetricThresholdTag) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetricThresholdTag: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetricThresholdTag: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetricThreshold - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetricThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetricThreshold - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetricThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetricThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MetricThreshold) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetricThreshold: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetricThreshold: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetricThreshold - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetricThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetricThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetricThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tags = append(m.Tags, &MetricThresholdTag{}) - if err := m.Tags[len(m.Tags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Thresholds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetricThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetricThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Thresholds = append(m.Thresholds, &MetricThresholdRule{}) - if err := m.Thresholds[len(m.Thresholds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NullStatus", wireType) - } - m.NullStatus = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NullStatus |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetricThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetricThreshold(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricThreshold - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetricThreshold - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetricThreshold - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetricThreshold - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetricThreshold = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetricThreshold = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetricThreshold = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/metric_threshold.proto b/api/core/v2/metric_threshold.proto deleted file mode 100644 index fe3578c6c9..0000000000 --- a/api/core/v2/metric_threshold.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// A rule to apply to a metric to determine its status -message MetricThresholdRule { - // Minimum value for the metric to be considered ok - string min = 1 [ (gogoproto.jsontag) = "min" ]; - - // Maximum value for the metric to be considered ok - string max = 2 [ (gogoproto.jsontag) = "max" ]; - - // The status of the metric if the value is below the minimum or above the maximum - uint32 status = 3 [ (gogoproto.jsontag) = "status" ]; -} - -// Represents the measurement tags to match -message MetricThresholdTag { - // Name of the metric tag to match - string name = 1 [ (gogoproto.jsontag) = "name" ]; - - // Value of the metric tag to match - string value = 2 [ (gogoproto.jsontag) = "value" ]; -} - -// Represents an instance of a metric filter to evaluate -message MetricThreshold { - // Name of the metric to match - string name = 1 [ (gogoproto.jsontag) = "name" ]; - - // Tag values to match with the metric - repeated MetricThresholdTag tags = 2 [ (gogoproto.jsontag) = "tags" ]; - - // Rules to evaluate when the filter matches a metric - repeated MetricThresholdRule thresholds = 3 [ (gogoproto.jsontag) = "thresholds" ]; - - - // The metric status if the measurement is missing - uint32 null_status = 4 [ (gogoproto.jsontag) = "null_status" ]; -} diff --git a/api/core/v2/metric_threshold_test.go b/api/core/v2/metric_threshold_test.go deleted file mode 100644 index 5d8c0cf555..0000000000 --- a/api/core/v2/metric_threshold_test.go +++ /dev/null @@ -1,274 +0,0 @@ -package v2 - -import ( - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -var ( - thresholdNameOnly = &MetricThreshold{Name: "metric-name", Thresholds: []*MetricThresholdRule{thresholdRuleAll}} - thresholdOneTag = &MetricThreshold{Name: "metric-name", Thresholds: []*MetricThresholdRule{thresholdRuleAll}, Tags: []*MetricThresholdTag{tag1}} - thresholdTwoTags = &MetricThreshold{Name: "metric-name", Thresholds: []*MetricThresholdRule{thresholdRuleAll}, Tags: []*MetricThresholdTag{tag1, tag2}} - - thresholdRuleAll = &MetricThresholdRule{Min: "3.4", Max: "10.2", Status: 2} - thresholdRuleNoMin = &MetricThresholdRule{Min: "", Max: "10.2", Status: 2} - thresholdRuleNoMax = &MetricThresholdRule{Min: "", Max: "10.2", Status: 2} - thresholdRuleNoMinMax = &MetricThresholdRule{Min: "", Max: "", Status: 2} - - tagValid = &MetricThresholdTag{Name: "tag-name", Value: "tag-value"} - tagNoName = &MetricThresholdTag{Name: "", Value: "tag-value"} - tagInvalidName = &MetricThresholdTag{Name: "#$#$#$", Value: "value"} - tagNoValue = &MetricThresholdTag{Name: "tag-name", Value: ""} - tag1 = &MetricThresholdTag{Name: "tag1", Value: "value1"} - tag2 = &MetricThresholdTag{Name: "tag2", Value: "value2"} - - metric = &MetricPoint{Name: "metric-name", Value: 0.1234, Timestamp: time.Now().UnixMilli()} - metricNoNameMatch = &MetricPoint{Name: "no-name-match", Value: 4.44444, Timestamp: time.Now().UnixMilli()} - - metricTag1 = &MetricTag{Name: "tag1", Value: "value1"} - metricTag2 = &MetricTag{Name: "tag2", Value: "value2"} - metricTagNoNameMatch = &MetricTag{Name: "nomatchname", Value: "value1"} - metricTagNoValueMatch = &MetricTag{Name: "tag1", Value: "novaluematch"} -) - -func TestMetricThresholds_Validate(t *testing.T) { - tests := []struct { - name string - thresholdName string - tags []*MetricThresholdTag - thresholds []*MetricThresholdRule - expectedError string - }{ - { - name: "all ok", - thresholdName: "thresholdName", - tags: nil, - thresholds: []*MetricThresholdRule{thresholdRuleAll}, - expectedError: "", - }, - { - name: "invalid name", - thresholdName: "!@#$%^&*", - tags: nil, - thresholds: []*MetricThresholdRule{thresholdRuleAll}, - expectedError: "metric threshold name cannot contain spaces or special characters", - }, - { - name: "empty rules", - thresholdName: "thresholdName", - tags: nil, - thresholds: []*MetricThresholdRule{}, - expectedError: "there must be at least one threshold rule", - }, - { - name: "nil rules", - thresholdName: "thresholdName", - tags: nil, - thresholds: nil, - expectedError: "there must be at least one threshold rule", - }, - { - name: "invalid rule", - thresholdName: "thresholdName", - tags: nil, - thresholds: []*MetricThresholdRule{thresholdRuleAll, thresholdRuleNoMinMax}, - expectedError: "rule 1: One of Min or Max required", - }, - { - name: "invalid tag", - thresholdName: "thresholdName", - tags: []*MetricThresholdTag{tagNoName}, - thresholds: []*MetricThresholdRule{thresholdRuleAll}, - expectedError: "tag 0: metric threshold tag name must not be empty", - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - threshold := MetricThreshold{ - Name: test.thresholdName, - Tags: test.tags, - Thresholds: test.thresholds, - } - err := threshold.Validate() - if test.expectedError == "" { - assert.NoError(t, err) - } else { - require.Error(t, err) - assert.Contains(t, err.Error(), test.expectedError) - } - }) - } -} - -func TestMetricThreshold_MatchesMetricPoint(t *testing.T) { - tests := []struct { - name string - threshold *MetricThreshold - metric *MetricPoint - metricTags []*MetricTag - matches bool - }{ - { - name: "threshold no tag - metric no tag", - threshold: thresholdNameOnly, - metric: metric, - metricTags: nil, - matches: true, - }, { - name: "threshold no tag - metric no tag - no name match", - threshold: thresholdNameOnly, - metric: metricNoNameMatch, - metricTags: nil, - matches: false, - }, { - name: "threshold no tag - metric one tag", - threshold: thresholdNameOnly, - metric: metric, - metricTags: []*MetricTag{metricTag1}, - matches: true, - }, { - name: "threshold one tag - metric no tag", - threshold: thresholdOneTag, - metric: metric, - metricTags: nil, - matches: false, - }, { - name: "threshold one tag - metric one tag - match", - threshold: thresholdOneTag, - metric: metric, - metricTags: []*MetricTag{metricTag1}, - matches: true, - }, { - name: "threshold one tag - metric one tag - no name match", - threshold: thresholdOneTag, - metric: metric, - metricTags: []*MetricTag{metricTagNoNameMatch}, - matches: false, - }, { - name: "threshold one tag - metric one tag - no value match", - threshold: thresholdOneTag, - metric: metric, - metricTags: []*MetricTag{metricTagNoValueMatch}, - matches: false, - }, { - name: "threshold one tag - metric two tags - match", - threshold: thresholdOneTag, - metric: metric, - metricTags: []*MetricTag{metricTag1, metricTag2}, - matches: true, - }, { - name: "threshold one tag - metric two tags - no match", - threshold: thresholdOneTag, - metric: metric, - metricTags: []*MetricTag{metricTagNoNameMatch, metricTag2}, - matches: false, - }, { - name: "threshold two tags - metric one tag", - threshold: thresholdTwoTags, - metric: metric, - metricTags: []*MetricTag{metricTag1}, - matches: false, - }, { - name: "threshold two tags - metric two tags - match", - threshold: thresholdTwoTags, - metric: metric, - metricTags: []*MetricTag{metricTag1, metricTag2}, - matches: true, - }, { - name: "threshold two tags - metric two tags - no match", - threshold: thresholdOneTag, - metric: metric, - metricTags: []*MetricTag{metricTagNoNameMatch, metricTag2}, - matches: false, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - test.metric.Tags = test.metricTags - matches := test.threshold.MatchesMetricPoint(test.metric) - assert.Equal(t, test.matches, matches) - }) - } - -} - -func TestMetricThresholdRule_Validate(t *testing.T) { - tests := []struct { - name string - threshold *MetricThresholdRule - expectedError string - }{ - { - name: "valid", - threshold: thresholdRuleAll, - expectedError: "", - }, { - name: "no min", - threshold: thresholdRuleNoMin, - expectedError: "", - }, { - name: "no max", - threshold: thresholdRuleNoMax, - expectedError: "", - }, { - name: "no min or max", - threshold: thresholdRuleNoMinMax, - expectedError: "One of Min or Max required", - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - err := test.threshold.Validate() - if test.expectedError == "" { - assert.NoError(t, err) - } else { - require.Error(t, err) - assert.Contains(t, err.Error(), test.expectedError) - } - }) - } -} - -func TestMetricTresholdTag_Validate(t *testing.T) { - tests := []struct { - name string - tag *MetricThresholdTag - expectedError string - }{ - { - name: "valid", - tag: tagValid, - expectedError: "", - }, { - name: "no name", - tag: tagNoName, - expectedError: "metric threshold tag name must not be empty", - }, { - name: "invalid name", - tag: tagInvalidName, - expectedError: "metric threshold tag name cannot contain spaces or special characters", - }, { - name: "no value", - tag: tagNoValue, - expectedError: "metric threshold tag value must not be empty", - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - err := test.tag.Validate() - if test.expectedError == "" { - assert.NoError(t, err) - } else { - require.Error(t, err) - assert.Contains(t, err.Error(), test.expectedError) - } - }) - } -} diff --git a/api/core/v2/metric_thresholdpb_test.go b/api/core/v2/metric_thresholdpb_test.go deleted file mode 100644 index 78a7d55d8e..0000000000 --- a/api/core/v2/metric_thresholdpb_test.go +++ /dev/null @@ -1,395 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/metric_threshold.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMetricThresholdRuleProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdRule(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricThresholdRule{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMetricThresholdRuleMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdRule(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricThresholdRule{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricThresholdTagProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdTag(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricThresholdTag{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMetricThresholdTagMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdTag(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricThresholdTag{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricThresholdProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThreshold(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricThreshold{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMetricThresholdMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThreshold(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricThreshold{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricThresholdRuleJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdRule(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricThresholdRule{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMetricThresholdTagJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdTag(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricThresholdTag{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMetricThresholdJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThreshold(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricThreshold{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMetricThresholdRuleProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdRule(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &MetricThresholdRule{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricThresholdRuleProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdRule(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &MetricThresholdRule{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricThresholdTagProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdTag(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &MetricThresholdTag{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricThresholdTagProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdTag(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &MetricThresholdTag{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricThresholdProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThreshold(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &MetricThreshold{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricThresholdProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThreshold(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &MetricThreshold{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricThresholdRuleSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdRule(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestMetricThresholdTagSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThresholdTag(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestMetricThresholdSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricThreshold(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/metrics.go b/api/core/v2/metrics.go deleted file mode 100644 index 5e32ccc316..0000000000 --- a/api/core/v2/metrics.go +++ /dev/null @@ -1,36 +0,0 @@ -package v2 - -import ( - "time" -) - -// Validate returns an error if metrics does not pass validation tests. -func (m *Metrics) Validate() error { - return nil -} - -// FixtureMetrics returns a testing fixture for a Metrics object. -func FixtureMetrics() *Metrics { - return &Metrics{ - Handlers: []string{"influxdb"}, - Points: []*MetricPoint{FixtureMetricPoint()}, - } -} - -// FixtureMetricPoint returns a testing fixture for a Metric Point object. -func FixtureMetricPoint() *MetricPoint { - return &MetricPoint{ - Name: "answer", - Value: 42.0, - Timestamp: time.Now().UnixNano(), - Tags: []*MetricTag{FixtureMetricTag()}, - } -} - -// FixtureMetricTag returns a testing fixture for a Metric Tag object. -func FixtureMetricTag() *MetricTag { - return &MetricTag{ - Name: "foo", - Value: "bar", - } -} diff --git a/api/core/v2/metrics.pb.go b/api/core/v2/metrics.pb.go deleted file mode 100644 index ce318e353d..0000000000 --- a/api/core/v2/metrics.pb.go +++ /dev/null @@ -1,1194 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/metrics.proto - -package v2 - -import ( - bytes "bytes" - encoding_binary "encoding/binary" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// A Metrics is an event metrics payload specification. -type Metrics struct { - // Handlers is a list of handlers for the metric points. - Handlers []string `protobuf:"bytes,1,rep,name=handlers,proto3" json:"handlers"` - // Points is a list of metric points (measurements). - Points []*MetricPoint `protobuf:"bytes,2,rep,name=points,proto3" json:"points"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Metrics) Reset() { *m = Metrics{} } -func (m *Metrics) String() string { return proto.CompactTextString(m) } -func (*Metrics) ProtoMessage() {} -func (*Metrics) Descriptor() ([]byte, []int) { - return fileDescriptor_2d7252db7bd2b8a8, []int{0} -} -func (m *Metrics) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metrics.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Metrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metrics.Merge(m, src) -} -func (m *Metrics) XXX_Size() int { - return m.Size() -} -func (m *Metrics) XXX_DiscardUnknown() { - xxx_messageInfo_Metrics.DiscardUnknown(m) -} - -var xxx_messageInfo_Metrics proto.InternalMessageInfo - -func (m *Metrics) GetHandlers() []string { - if m != nil { - return m.Handlers - } - return nil -} - -func (m *Metrics) GetPoints() []*MetricPoint { - if m != nil { - return m.Points - } - return nil -} - -// A MetricPoint represents a single measurement. -type MetricPoint struct { - // The metric point name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The metric point value. - Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value"` - // The metric point timestamp, time in nanoseconds since the Epoch. - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp"` - // Tags is a list of metric tags (dimensions). - Tags []*MetricTag `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetricPoint) Reset() { *m = MetricPoint{} } -func (m *MetricPoint) String() string { return proto.CompactTextString(m) } -func (*MetricPoint) ProtoMessage() {} -func (*MetricPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_2d7252db7bd2b8a8, []int{1} -} -func (m *MetricPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetricPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetricPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricPoint.Merge(m, src) -} -func (m *MetricPoint) XXX_Size() int { - return m.Size() -} -func (m *MetricPoint) XXX_DiscardUnknown() { - xxx_messageInfo_MetricPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricPoint proto.InternalMessageInfo - -func (m *MetricPoint) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *MetricPoint) GetValue() float64 { - if m != nil { - return m.Value - } - return 0 -} - -func (m *MetricPoint) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -func (m *MetricPoint) GetTags() []*MetricTag { - if m != nil { - return m.Tags - } - return nil -} - -// A MetricTag adds a dimension to a metric point. -type MetricTag struct { - // The metric tag name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The metric tag value. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetricTag) Reset() { *m = MetricTag{} } -func (m *MetricTag) String() string { return proto.CompactTextString(m) } -func (*MetricTag) ProtoMessage() {} -func (*MetricTag) Descriptor() ([]byte, []int) { - return fileDescriptor_2d7252db7bd2b8a8, []int{2} -} -func (m *MetricTag) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetricTag.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetricTag) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricTag.Merge(m, src) -} -func (m *MetricTag) XXX_Size() int { - return m.Size() -} -func (m *MetricTag) XXX_DiscardUnknown() { - xxx_messageInfo_MetricTag.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricTag proto.InternalMessageInfo - -func (m *MetricTag) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *MetricTag) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -func init() { - proto.RegisterType((*Metrics)(nil), "sensu.core.v2.Metrics") - proto.RegisterType((*MetricPoint)(nil), "sensu.core.v2.MetricPoint") - proto.RegisterType((*MetricTag)(nil), "sensu.core.v2.MetricTag") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/metrics.proto", fileDescriptor_2d7252db7bd2b8a8) -} - -var fileDescriptor_2d7252db7bd2b8a8 = []byte{ - // 337 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0xeb, 0x40, - 0x14, 0x86, 0xef, 0x69, 0x7a, 0x7b, 0x9b, 0xe9, 0xed, 0x66, 0x70, 0x31, 0x74, 0x31, 0x09, 0x5d, - 0x05, 0xc4, 0x09, 0x4d, 0xd5, 0xa5, 0x48, 0xf6, 0x82, 0x04, 0x57, 0xee, 0xa6, 0x75, 0x4c, 0x03, - 0x4d, 0x26, 0x64, 0x26, 0x79, 0x16, 0xdf, 0x40, 0x1f, 0xc1, 0x47, 0x70, 0xe9, 0x13, 0x04, 0x8d, - 0xbb, 0x3c, 0x81, 0x4b, 0xe9, 0xa4, 0xb4, 0x15, 0xba, 0x39, 0xe7, 0xe7, 0x3f, 0x3f, 0x3f, 0x1f, - 0x07, 0xcd, 0xe3, 0x44, 0xaf, 0xca, 0x05, 0x5b, 0xca, 0xd4, 0x57, 0x22, 0x53, 0x65, 0x37, 0xcf, - 0x62, 0xe9, 0xf3, 0x3c, 0xf1, 0x97, 0xb2, 0x10, 0x7e, 0x15, 0xf8, 0xa9, 0xd0, 0x45, 0xb2, 0x54, - 0x2c, 0x2f, 0xa4, 0x96, 0x78, 0x6c, 0x32, 0x6c, 0x73, 0x64, 0x55, 0x30, 0x39, 0x3f, 0xe8, 0x88, - 0x65, 0x2c, 0x7d, 0x93, 0x5a, 0x94, 0x8f, 0xd7, 0xd5, 0x8c, 0xcd, 0xd9, 0xcc, 0x98, 0xc6, 0x33, - 0xaa, 0x2b, 0x99, 0x2a, 0xf4, 0xef, 0xa6, 0x6b, 0xc5, 0x1e, 0x1a, 0xae, 0x78, 0xf6, 0xb0, 0x16, - 0x85, 0x22, 0xe0, 0x5a, 0x9e, 0x1d, 0xfe, 0x6f, 0x6b, 0x67, 0xe7, 0x45, 0x3b, 0x85, 0xaf, 0xd0, - 0x20, 0x97, 0x49, 0xa6, 0x15, 0xe9, 0xb9, 0x96, 0x37, 0x0a, 0x26, 0xec, 0x17, 0x0a, 0xeb, 0x1a, - 0x6f, 0x37, 0x91, 0x10, 0xb5, 0xb5, 0xb3, 0x4d, 0x47, 0xdb, 0x3d, 0x7d, 0x06, 0x34, 0x3a, 0xc8, - 0x60, 0x8c, 0xfa, 0x19, 0x4f, 0x05, 0x01, 0x17, 0x3c, 0x3b, 0x32, 0x1a, 0x3b, 0xe8, 0x6f, 0xc5, - 0xd7, 0xa5, 0x20, 0x3d, 0x17, 0x3c, 0x08, 0xed, 0xb6, 0x76, 0x3a, 0x23, 0xea, 0x16, 0x3e, 0x45, - 0xb6, 0x4e, 0x52, 0xa1, 0x34, 0x4f, 0x73, 0x62, 0xb9, 0xe0, 0x59, 0xe1, 0xb8, 0xad, 0x9d, 0xbd, - 0x19, 0xed, 0x25, 0xbe, 0x44, 0x7d, 0xcd, 0x63, 0x45, 0xfa, 0x86, 0x97, 0x1c, 0xe5, 0xbd, 0xe3, - 0x71, 0x38, 0x6c, 0x6b, 0xc7, 0x24, 0x23, 0x33, 0xa7, 0x17, 0xc8, 0xde, 0x1d, 0x8f, 0x62, 0x9e, - 0x1c, 0x62, 0xda, 0x5b, 0xb6, 0xd0, 0xfd, 0xfe, 0xa4, 0xf0, 0xd2, 0x50, 0x78, 0x6d, 0x28, 0xbc, - 0x35, 0x14, 0xde, 0x1b, 0x0a, 0x1f, 0x0d, 0x85, 0xa7, 0x2f, 0xfa, 0xe7, 0xbe, 0x57, 0x05, 0x8b, - 0x81, 0x79, 0xff, 0xfc, 0x27, 0x00, 0x00, 0xff, 0xff, 0x75, 0x57, 0x7b, 0x36, 0xfa, 0x01, 0x00, - 0x00, -} - -func (this *Metrics) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Metrics) - if !ok { - that2, ok := that.(Metrics) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Handlers) != len(that1.Handlers) { - return false - } - for i := range this.Handlers { - if this.Handlers[i] != that1.Handlers[i] { - return false - } - } - if len(this.Points) != len(that1.Points) { - return false - } - for i := range this.Points { - if !this.Points[i].Equal(that1.Points[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MetricPoint) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MetricPoint) - if !ok { - that2, ok := that.(MetricPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Value != that1.Value { - return false - } - if this.Timestamp != that1.Timestamp { - return false - } - if len(this.Tags) != len(that1.Tags) { - return false - } - for i := range this.Tags { - if !this.Tags[i].Equal(that1.Tags[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *MetricTag) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MetricTag) - if !ok { - that2, ok := that.(MetricTag) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *Metrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Metrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Points) > 0 { - for iNdEx := len(m.Points) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Points[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Handlers) > 0 { - for iNdEx := len(m.Handlers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Handlers[iNdEx]) - copy(dAtA[i:], m.Handlers[iNdEx]) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Handlers[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *MetricPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetricPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetricPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Tags) > 0 { - for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.Timestamp != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x18 - } - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x11 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MetricTag) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetricTag) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetricTag) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int { - offset -= sovMetrics(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedMetrics(r randyMetrics, easy bool) *Metrics { - this := &Metrics{} - v1 := r.Intn(10) - this.Handlers = make([]string, v1) - for i := 0; i < v1; i++ { - this.Handlers[i] = string(randStringMetrics(r)) - } - if r.Intn(5) != 0 { - v2 := r.Intn(5) - this.Points = make([]*MetricPoint, v2) - for i := 0; i < v2; i++ { - this.Points[i] = NewPopulatedMetricPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMetrics(r, 3) - } - return this -} - -func NewPopulatedMetricPoint(r randyMetrics, easy bool) *MetricPoint { - this := &MetricPoint{} - this.Name = string(randStringMetrics(r)) - this.Value = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - this.Timestamp = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Timestamp *= -1 - } - if r.Intn(5) != 0 { - v3 := r.Intn(5) - this.Tags = make([]*MetricTag, v3) - for i := 0; i < v3; i++ { - this.Tags[i] = NewPopulatedMetricTag(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMetrics(r, 5) - } - return this -} - -func NewPopulatedMetricTag(r randyMetrics, easy bool) *MetricTag { - this := &MetricTag{} - this.Name = string(randStringMetrics(r)) - this.Value = string(randStringMetrics(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMetrics(r, 3) - } - return this -} - -type randyMetrics interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMetrics(r randyMetrics) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMetrics(r randyMetrics) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneMetrics(r) - } - return string(tmps) -} -func randUnrecognizedMetrics(r randyMetrics, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldMetrics(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldMetrics(dAtA []byte, r randyMetrics, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateMetrics(dAtA, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - dAtA = encodeVarintPopulateMetrics(dAtA, uint64(v5)) - case 1: - dAtA = encodeVarintPopulateMetrics(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateMetrics(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateMetrics(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateMetrics(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateMetrics(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Metrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Handlers) > 0 { - for _, s := range m.Handlers { - l = len(s) - n += 1 + l + sovMetrics(uint64(l)) - } - } - if len(m.Points) > 0 { - for _, e := range m.Points { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MetricPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - if m.Value != 0 { - n += 9 - } - if m.Timestamp != 0 { - n += 1 + sovMetrics(uint64(m.Timestamp)) - } - if len(m.Tags) > 0 { - for _, e := range m.Tags { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MetricTag) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMetrics(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetrics(x uint64) (n int) { - return sovMetrics(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Metrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Metrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handlers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Handlers = append(m.Handlers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Points", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Points = append(m.Points, &MetricPoint{}) - if err := m.Points[len(m.Points)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MetricPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetricPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetricPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tags = append(m.Tags, &MetricTag{}) - if err := m.Tags[len(m.Tags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MetricTag) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetricTag: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetricTag: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetrics(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetrics - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetrics - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetrics - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetrics = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/metrics.proto b/api/core/v2/metrics.proto deleted file mode 100644 index f7050d7866..0000000000 --- a/api/core/v2/metrics.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// A Metrics is an event metrics payload specification. -message Metrics { - // Handlers is a list of handlers for the metric points. - repeated string handlers = 1 [ (gogoproto.jsontag) = "handlers" ]; - - // Points is a list of metric points (measurements). - repeated MetricPoint points = 2 [ (gogoproto.jsontag) = "points" ]; -} - -// A MetricPoint represents a single measurement. -message MetricPoint { - // The metric point name. - string name = 1; - - // The metric point value. - double value = 2 [ (gogoproto.jsontag) = "value" ]; - - // The metric point timestamp, time in nanoseconds since the Epoch. - int64 timestamp = 3 [ (gogoproto.jsontag) = "timestamp" ]; - - // Tags is a list of metric tags (dimensions). - repeated MetricTag tags = 4 [ (gogoproto.jsontag) = "tags" ]; -} - -// A MetricTag adds a dimension to a metric point. -message MetricTag { - // The metric tag name. - string name = 1; - - // The metric tag value. - string value = 2; -} diff --git a/api/core/v2/metricspb_test.go b/api/core/v2/metricspb_test.go deleted file mode 100644 index d5d5dccfb2..0000000000 --- a/api/core/v2/metricspb_test.go +++ /dev/null @@ -1,395 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/metrics.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMetricsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetrics(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Metrics{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMetricsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetrics(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Metrics{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricPointProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricPoint(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricPoint{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMetricPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricPoint(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricPoint{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricTagProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricTag(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricTag{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMetricTagMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricTag(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricTag{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetrics(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Metrics{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMetricPointJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricPoint(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricPoint{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMetricTagJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricTag(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MetricTag{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMetricsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetrics(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Metrics{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetrics(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Metrics{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricPointProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricPoint(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &MetricPoint{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricPointProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricPoint(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &MetricPoint{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricTagProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricTag(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &MetricTag{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricTagProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricTag(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &MetricTag{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMetricsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetrics(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestMetricPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricPoint(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestMetricTagSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMetricTag(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/multitenant.go b/api/core/v2/multitenant.go deleted file mode 100644 index 3a03cc008a..0000000000 --- a/api/core/v2/multitenant.go +++ /dev/null @@ -1,15 +0,0 @@ -package v2 - -import "context" - -// MultitenantResource is a object that belongs to a namespace -type MultitenantResource interface { - GetNamespace() string -} - -// SetContextFromResource takes a context and a multi-tenant resource, adds the -// namespace to the context, and returns the udpated context -func SetContextFromResource(ctx context.Context, r MultitenantResource) context.Context { - ctx = context.WithValue(ctx, NamespaceKey, r.GetNamespace()) - return ctx -} diff --git a/api/core/v2/mutator.go b/api/core/v2/mutator.go deleted file mode 100644 index 71fbec9525..0000000000 --- a/api/core/v2/mutator.go +++ /dev/null @@ -1,180 +0,0 @@ -package v2 - -import ( - "errors" - "fmt" - "net/url" - "path" - "sort" - "strings" - - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // MutatorsResource is the name of this resource type - MutatorsResource = "mutators" -) - -// StorePrefix returns the path prefix to this resource in the store -func (m *Mutator) StorePrefix() string { - return MutatorsResource -} - -const ( - JavascriptMutator = "javascript" - PipeMutator = "pipe" -) - -var validMutatorTypes = map[string]struct{}{ - JavascriptMutator: struct{}{}, - PipeMutator: struct{}{}, -} - -func fmtMutatorTypes() string { - types := make([]string, 0, len(validMutatorTypes)) - for k := range validMutatorTypes { - types = append(types, k) - } - return strings.Join(types, ", ") -} - -// URIPath returns the path component of a mutator URI. -func (m *Mutator) URIPath() string { - if m.Namespace == "" { - return path.Join(URLPrefix, MutatorsResource, url.PathEscape(m.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(m.Namespace), MutatorsResource, url.PathEscape(m.Name)) -} - -// Validate returns an error if the mutator does not pass validation tests. -func (m *Mutator) Validate() error { - if err := ValidateName(m.Name); err != nil { - return errors.New("mutator name " + err.Error()) - } - if m.Command == "" && m.Eval == "" { - return errors.New("mutator command or eval must be set") - } - if m.Type == JavascriptMutator && m.Command != "" { - return errors.New(`"command" used with javascript mutator, should be "eval"`) - } - - if m.Namespace == "" { - return errors.New("namespace must be set") - } - - if m.Type != "" { - if _, ok := validMutatorTypes[m.Type]; !ok { - return fmt.Errorf("invalid mutator type %q, valid types are %q", m.Type, fmtMutatorTypes()) - } - } - - return nil -} - -// Update updates m with selected fields. Returns non-nil error if any of the -// selected fields are unsupported. -func (m *Mutator) Update(from *Mutator, fields ...string) error { - for _, f := range fields { - switch f { - case "Command": - m.Command = from.Command - case "Timeout": - m.Timeout = from.Timeout - case "EnvVars": - m.EnvVars = append(m.EnvVars[0:0], from.EnvVars...) - case "RuntimeAssets": - m.RuntimeAssets = append(m.RuntimeAssets[0:0], from.RuntimeAssets...) - default: - return fmt.Errorf("unsupported field: %q", f) - } - } - return nil -} - -// NewMutator creates a new Mutator. -func NewMutator(meta ObjectMeta) *Mutator { - return &Mutator{ObjectMeta: meta} -} - -// -// Sorting - -type cmpMutator func(a, b *Mutator) bool - -// SortMutatorsByPredicate is used to sort a given collection using a given predicate. -func SortMutatorsByPredicate(hs []*Mutator, fn cmpMutator) sort.Interface { - return &mutatorSorter{mutators: hs, byFn: fn} -} - -// SortMutatorsByName is used to sort a given collection of mutators by their names. -func SortMutatorsByName(hs []*Mutator, asc bool) sort.Interface { - if asc { - return SortMutatorsByPredicate(hs, func(a, b *Mutator) bool { - return a.Name < b.Name - }) - } - - return SortMutatorsByPredicate(hs, func(a, b *Mutator) bool { - return a.Name > b.Name - }) -} - -type mutatorSorter struct { - mutators []*Mutator - byFn cmpMutator -} - -// Len implements sort.Interface -func (s *mutatorSorter) Len() int { - return len(s.mutators) -} - -// Swap implements sort.Interface -func (s *mutatorSorter) Swap(i, j int) { - s.mutators[i], s.mutators[j] = s.mutators[j], s.mutators[i] -} - -// Less implements sort.Interface -func (s *mutatorSorter) Less(i, j int) bool { - return s.byFn(s.mutators[i], s.mutators[j]) -} - -// FixtureMutator returns a Mutator fixture for testing. -func FixtureMutator(name string) *Mutator { - return &Mutator{ - Command: "command", - ObjectMeta: NewObjectMeta(name, "default"), - } -} - -// MutatorFields returns a set of fields that represent that resource -func MutatorFields(r Resource) map[string]string { - resource := r.(*Mutator) - fields := map[string]string{ - "mutator.name": resource.ObjectMeta.Name, - "mutator.namespace": resource.ObjectMeta.Namespace, - "mutator.runtime_assets": strings.Join(resource.RuntimeAssets, ","), - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "mutator.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (m *Mutator) Fields() map[string]string { - return MutatorFields(m) -} - -// SetNamespace sets the namespace of the resource. -func (m *Mutator) SetNamespace(namespace string) { - m.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (m *Mutator) SetObjectMeta(meta ObjectMeta) { - m.ObjectMeta = meta -} - -func (m *Mutator) RBACName() string { - return "mutators" -} diff --git a/api/core/v2/mutator.pb.go b/api/core/v2/mutator.pb.go deleted file mode 100644 index 6cf110c64c..0000000000 --- a/api/core/v2/mutator.pb.go +++ /dev/null @@ -1,902 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/mutator.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// A Mutator is a mutator specification. -type Mutator struct { - // Metadata contains the name, namespace, labels and annotations of the - // mutator - ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // Command is the command to be executed. - Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"` - // Timeout is the command execution timeout in seconds. - Timeout uint32 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout"` - // Env is a list of environment variables to use with command execution - EnvVars []string `protobuf:"bytes,4,rep,name=env_vars,json=envVars,proto3" json:"env_vars"` - // RuntimeAssets are a list of assets required to execute a mutator. - RuntimeAssets []string `protobuf:"bytes,8,rep,name=runtime_assets,json=runtimeAssets,proto3" json:"runtime_assets"` - // Secrets is the list of Sensu secrets to set for the mutators's - // execution environment. - Secrets []*Secret `protobuf:"bytes,9,rep,name=secrets,proto3" json:"secrets"` - // Type specifies the type of the mutator. If blank or set to "pipe", the - // mutator will execute a command with the default shell of the sensu user. - // If set to "javascript", the eval field will be used, interpreted as ECMAScript 5 - // and run on the Otto VM. The runtime assets will be assumed to be javascript - // assets, and the environment variables will be made available to the global - // environment of the mutator. - Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"` - // When the type of the mutator is "javascript", the eval field will be expected - // to hold a valid ECMAScript 5 expression. - Eval string `protobuf:"bytes,11,opt,name=eval,proto3" json:"eval,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Mutator) Reset() { *m = Mutator{} } -func (m *Mutator) String() string { return proto.CompactTextString(m) } -func (*Mutator) ProtoMessage() {} -func (*Mutator) Descriptor() ([]byte, []int) { - return fileDescriptor_7da68774301ea6ee, []int{0} -} -func (m *Mutator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Mutator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Mutator.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Mutator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Mutator.Merge(m, src) -} -func (m *Mutator) XXX_Size() int { - return m.Size() -} -func (m *Mutator) XXX_DiscardUnknown() { - xxx_messageInfo_Mutator.DiscardUnknown(m) -} - -var xxx_messageInfo_Mutator proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Mutator)(nil), "sensu.core.v2.Mutator") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/mutator.proto", fileDescriptor_7da68774301ea6ee) -} - -var fileDescriptor_7da68774301ea6ee = []byte{ - // 417 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xbf, 0x6e, 0xd4, 0x30, - 0x18, 0x3f, 0xf7, 0x2a, 0x72, 0xe7, 0xe3, 0x18, 0x2c, 0x21, 0x99, 0x0e, 0x76, 0x84, 0x04, 0x64, - 0x00, 0x87, 0xe6, 0x58, 0x40, 0x0c, 0x90, 0xbd, 0x42, 0x0a, 0x82, 0x81, 0xa5, 0x72, 0x52, 0x13, - 0x82, 0x48, 0x1c, 0xc5, 0x8e, 0xa5, 0xbe, 0x01, 0x8f, 0xc0, 0x82, 0xd4, 0xb1, 0x8f, 0xc0, 0x23, - 0x74, 0xec, 0x13, 0x44, 0x10, 0xb6, 0x3c, 0x01, 0x23, 0xb2, 0x73, 0x29, 0x47, 0xa7, 0x2e, 0xd1, - 0xf7, 0xfb, 0x6b, 0x7f, 0x0e, 0xdc, 0xe4, 0x85, 0xfe, 0xd4, 0xa6, 0x2c, 0x93, 0x65, 0xa8, 0x44, - 0xa5, 0xda, 0xf1, 0xfb, 0x24, 0x97, 0x21, 0xaf, 0x8b, 0x30, 0x93, 0x8d, 0x08, 0x4d, 0x14, 0x96, - 0xad, 0xe6, 0x5a, 0x36, 0xac, 0x6e, 0xa4, 0x96, 0x68, 0xed, 0x3c, 0xcc, 0x8a, 0xcc, 0x44, 0x07, - 0xcf, 0x76, 0x3a, 0x72, 0x99, 0xcb, 0xd0, 0xb9, 0xd2, 0xf6, 0xe3, 0x2b, 0x73, 0xc8, 0x36, 0xec, - 0xd0, 0x91, 0x8e, 0x73, 0xd3, 0x58, 0x72, 0xf0, 0xf4, 0x86, 0x27, 0x0b, 0xcd, 0xb7, 0x89, 0xe8, - 0x66, 0x09, 0x25, 0xb2, 0x46, 0xe8, 0x31, 0x73, 0xff, 0xfb, 0x1c, 0x7a, 0x47, 0xe3, 0xe5, 0xd1, - 0x3b, 0xb8, 0xb0, 0x6d, 0x27, 0x5c, 0x73, 0x0c, 0x7c, 0x10, 0xac, 0xa2, 0x7b, 0xec, 0xbf, 0x4d, - 0xd8, 0x9b, 0xf4, 0xb3, 0xc8, 0xf4, 0x91, 0xd0, 0x3c, 0x26, 0x17, 0x1d, 0x9d, 0x5d, 0x76, 0x14, - 0x0c, 0x1d, 0x45, 0x53, 0xec, 0xb1, 0x2c, 0x0b, 0x2d, 0xca, 0x5a, 0x9f, 0x26, 0x57, 0x55, 0x08, - 0x43, 0x2f, 0x93, 0x65, 0xc9, 0xab, 0x13, 0xbc, 0xe7, 0x83, 0x60, 0x99, 0x4c, 0x10, 0x3d, 0x80, - 0x9e, 0x2e, 0x4a, 0x21, 0x5b, 0x8d, 0xe7, 0x3e, 0x08, 0xd6, 0xf1, 0x6a, 0xe8, 0xe8, 0x44, 0x25, - 0xd3, 0x80, 0x1e, 0xc1, 0x85, 0xa8, 0xcc, 0xb1, 0xe1, 0x8d, 0xc2, 0xfb, 0xfe, 0x3c, 0x58, 0xc6, - 0xb7, 0x87, 0x8e, 0x5e, 0x71, 0x89, 0x27, 0x2a, 0xf3, 0x9e, 0x37, 0x0a, 0x3d, 0x87, 0x77, 0x9a, - 0xb6, 0xb2, 0xb1, 0x63, 0xae, 0x94, 0xd0, 0x0a, 0x2f, 0x9c, 0x1d, 0x0d, 0x1d, 0xbd, 0xa6, 0x24, - 0xeb, 0x2d, 0x7e, 0xed, 0x20, 0x7a, 0x09, 0xbd, 0xf1, 0x5d, 0x14, 0x5e, 0xfa, 0xf3, 0x60, 0x15, - 0xdd, 0xbd, 0xb6, 0xfa, 0x5b, 0xa7, 0x8e, 0x37, 0xdc, 0x3a, 0x93, 0x69, 0x40, 0x0f, 0xe1, 0xbe, - 0x3e, 0xad, 0x05, 0x86, 0x76, 0xbf, 0xf1, 0x38, 0x8b, 0x77, 0x9e, 0xc3, 0xe9, 0xd6, 0x27, 0x0c, - 0xff, 0x82, 0x57, 0xff, 0x7c, 0x16, 0xef, 0xfa, 0x2c, 0x7e, 0xb1, 0xf8, 0x7a, 0x46, 0x67, 0xe7, - 0x67, 0x14, 0xc4, 0xfe, 0x9f, 0x5f, 0x04, 0x9c, 0xf7, 0x04, 0xfc, 0xe8, 0x09, 0xb8, 0xe8, 0x09, - 0xb8, 0xec, 0x09, 0xf8, 0xd9, 0x13, 0xf0, 0xed, 0x37, 0x99, 0x7d, 0xd8, 0x33, 0x51, 0x7a, 0xcb, - 0xfd, 0xc8, 0xcd, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x15, 0x8e, 0x91, 0xaa, 0x02, 0x00, - 0x00, -} - -func (this *Mutator) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Mutator) - if !ok { - that2, ok := that.(Mutator) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.Command != that1.Command { - return false - } - if this.Timeout != that1.Timeout { - return false - } - if len(this.EnvVars) != len(that1.EnvVars) { - return false - } - for i := range this.EnvVars { - if this.EnvVars[i] != that1.EnvVars[i] { - return false - } - } - if len(this.RuntimeAssets) != len(that1.RuntimeAssets) { - return false - } - for i := range this.RuntimeAssets { - if this.RuntimeAssets[i] != that1.RuntimeAssets[i] { - return false - } - } - if len(this.Secrets) != len(that1.Secrets) { - return false - } - for i := range this.Secrets { - if !this.Secrets[i].Equal(that1.Secrets[i]) { - return false - } - } - if this.Type != that1.Type { - return false - } - if this.Eval != that1.Eval { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type MutatorFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetObjectMeta() ObjectMeta - GetCommand() string - GetTimeout() uint32 - GetEnvVars() []string - GetRuntimeAssets() []string - GetSecrets() []*Secret - GetType() string - GetEval() string -} - -func (this *Mutator) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *Mutator) TestProto() github_com_golang_protobuf_proto.Message { - return NewMutatorFromFace(this) -} - -func (this *Mutator) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *Mutator) GetCommand() string { - return this.Command -} - -func (this *Mutator) GetTimeout() uint32 { - return this.Timeout -} - -func (this *Mutator) GetEnvVars() []string { - return this.EnvVars -} - -func (this *Mutator) GetRuntimeAssets() []string { - return this.RuntimeAssets -} - -func (this *Mutator) GetSecrets() []*Secret { - return this.Secrets -} - -func (this *Mutator) GetType() string { - return this.Type -} - -func (this *Mutator) GetEval() string { - return this.Eval -} - -func NewMutatorFromFace(that MutatorFace) *Mutator { - this := &Mutator{} - this.ObjectMeta = that.GetObjectMeta() - this.Command = that.GetCommand() - this.Timeout = that.GetTimeout() - this.EnvVars = that.GetEnvVars() - this.RuntimeAssets = that.GetRuntimeAssets() - this.Secrets = that.GetSecrets() - this.Type = that.GetType() - this.Eval = that.GetEval() - return this -} - -func (m *Mutator) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Mutator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Mutator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Eval) > 0 { - i -= len(m.Eval) - copy(dAtA[i:], m.Eval) - i = encodeVarintMutator(dAtA, i, uint64(len(m.Eval))) - i-- - dAtA[i] = 0x5a - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintMutator(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x52 - } - if len(m.Secrets) > 0 { - for iNdEx := len(m.Secrets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Secrets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMutator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if len(m.RuntimeAssets) > 0 { - for iNdEx := len(m.RuntimeAssets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RuntimeAssets[iNdEx]) - copy(dAtA[i:], m.RuntimeAssets[iNdEx]) - i = encodeVarintMutator(dAtA, i, uint64(len(m.RuntimeAssets[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.EnvVars) > 0 { - for iNdEx := len(m.EnvVars) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.EnvVars[iNdEx]) - copy(dAtA[i:], m.EnvVars[iNdEx]) - i = encodeVarintMutator(dAtA, i, uint64(len(m.EnvVars[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if m.Timeout != 0 { - i = encodeVarintMutator(dAtA, i, uint64(m.Timeout)) - i-- - dAtA[i] = 0x18 - } - if len(m.Command) > 0 { - i -= len(m.Command) - copy(dAtA[i:], m.Command) - i = encodeVarintMutator(dAtA, i, uint64(len(m.Command))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMutator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintMutator(dAtA []byte, offset int, v uint64) int { - offset -= sovMutator(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedMutator(r randyMutator, easy bool) *Mutator { - this := &Mutator{} - v1 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v1 - this.Command = string(randStringMutator(r)) - this.Timeout = uint32(r.Uint32()) - v2 := r.Intn(10) - this.EnvVars = make([]string, v2) - for i := 0; i < v2; i++ { - this.EnvVars[i] = string(randStringMutator(r)) - } - v3 := r.Intn(10) - this.RuntimeAssets = make([]string, v3) - for i := 0; i < v3; i++ { - this.RuntimeAssets[i] = string(randStringMutator(r)) - } - if r.Intn(5) != 0 { - v4 := r.Intn(5) - this.Secrets = make([]*Secret, v4) - for i := 0; i < v4; i++ { - this.Secrets[i] = NewPopulatedSecret(r, easy) - } - } - this.Type = string(randStringMutator(r)) - this.Eval = string(randStringMutator(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMutator(r, 12) - } - return this -} - -type randyMutator interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMutator(r randyMutator) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringMutator(r randyMutator) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneMutator(r) - } - return string(tmps) -} -func randUnrecognizedMutator(r randyMutator, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldMutator(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldMutator(dAtA []byte, r randyMutator, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateMutator(dAtA, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - dAtA = encodeVarintPopulateMutator(dAtA, uint64(v6)) - case 1: - dAtA = encodeVarintPopulateMutator(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateMutator(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateMutator(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateMutator(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateMutator(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Mutator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovMutator(uint64(l)) - l = len(m.Command) - if l > 0 { - n += 1 + l + sovMutator(uint64(l)) - } - if m.Timeout != 0 { - n += 1 + sovMutator(uint64(m.Timeout)) - } - if len(m.EnvVars) > 0 { - for _, s := range m.EnvVars { - l = len(s) - n += 1 + l + sovMutator(uint64(l)) - } - } - if len(m.RuntimeAssets) > 0 { - for _, s := range m.RuntimeAssets { - l = len(s) - n += 1 + l + sovMutator(uint64(l)) - } - } - if len(m.Secrets) > 0 { - for _, e := range m.Secrets { - l = e.Size() - n += 1 + l + sovMutator(uint64(l)) - } - } - l = len(m.Type) - if l > 0 { - n += 1 + l + sovMutator(uint64(l)) - } - l = len(m.Eval) - if l > 0 { - n += 1 + l + sovMutator(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMutator(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMutator(x uint64) (n int) { - return sovMutator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Mutator) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMutator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Mutator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Mutator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMutator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMutator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMutator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMutator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMutator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMutator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Command = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - m.Timeout = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMutator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timeout |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnvVars", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMutator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMutator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMutator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EnvVars = append(m.EnvVars, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeAssets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMutator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMutator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMutator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeAssets = append(m.RuntimeAssets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMutator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMutator - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMutator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secrets = append(m.Secrets, &Secret{}) - if err := m.Secrets[len(m.Secrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMutator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMutator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMutator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Eval", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMutator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMutator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMutator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Eval = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMutator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMutator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMutator(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMutator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMutator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMutator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMutator - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMutator - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMutator - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMutator = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMutator = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMutator = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/mutator.proto b/api/core/v2/mutator.proto deleted file mode 100644 index ad6adf196b..0000000000 --- a/api/core/v2/mutator.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; -import "github.com/sensu/sensu-go/api/core/v2/secret.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// A Mutator is a mutator specification. -message Mutator { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Metadata contains the name, namespace, labels and annotations of the - // mutator - ObjectMeta metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - - // Command is the command to be executed. - string command = 2; - - // Timeout is the command execution timeout in seconds. - uint32 timeout = 3 [ (gogoproto.jsontag) = "timeout" ]; - - // Env is a list of environment variables to use with command execution - repeated string env_vars = 4 [ (gogoproto.jsontag) = "env_vars" ]; - - // RuntimeAssets are a list of assets required to execute a mutator. - repeated string runtime_assets = 8 [ (gogoproto.jsontag) = "runtime_assets" ]; - - // Secrets is the list of Sensu secrets to set for the mutators's - // execution environment. - repeated Secret secrets = 9 [ (gogoproto.jsontag) = "secrets" ]; - - // Type specifies the type of the mutator. If blank or set to "pipe", the - // mutator will execute a command with the default shell of the sensu user. - // If set to "javascript", the eval field will be used, interpreted as ECMAScript 5 - // and run on the Otto VM. The runtime assets will be assumed to be javascript - // assets, and the environment variables will be made available to the global - // environment of the mutator. - string type = 10 [ (gogoproto.jsontag) = "type,omitempty" ]; - - // When the type of the mutator is "javascript", the eval field will be expected - // to hold a valid ECMAScript 5 expression. - string eval = 11 [ (gogoproto.jsontag) = "eval,omitempty" ]; -} diff --git a/api/core/v2/mutator_test.go b/api/core/v2/mutator_test.go deleted file mode 100644 index d2b9b7b412..0000000000 --- a/api/core/v2/mutator_test.go +++ /dev/null @@ -1,142 +0,0 @@ -package v2 - -import ( - "reflect" - "sort" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestFixtureMutator(t *testing.T) { - fixture := FixtureMutator("fixture") - assert.Equal(t, "fixture", fixture.Name) - assert.NoError(t, fixture.Validate()) -} - -func TestMutatorValidate(t *testing.T) { - var m Mutator - - // Invalid name - assert.Error(t, m.Validate()) - m.Name = "foo" - - // Invalid command - assert.Error(t, m.Validate()) - m.Command = "echo 'foo'" - - // Invalid namespace - assert.Error(t, m.Validate()) - m.Namespace = "default" - - // Valid mutator - assert.NoError(t, m.Validate()) -} - -func TestSortMutatorsByName(t *testing.T) { - a := FixtureMutator("Abernathy") - b := FixtureMutator("Bernard") - c := FixtureMutator("Clementine") - d := FixtureMutator("Dolores") - - testCases := []struct { - name string - inDir bool - inChecks []*Mutator - expected []*Mutator - }{ - { - name: "Sorts ascending", - inDir: true, - inChecks: []*Mutator{d, c, a, b}, - expected: []*Mutator{a, b, c, d}, - }, - { - name: "Sorts descending", - inDir: false, - inChecks: []*Mutator{d, a, c, b}, - expected: []*Mutator{d, c, b, a}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - sort.Sort(SortMutatorsByName(tc.inChecks, tc.inDir)) - assert.EqualValues(t, tc.expected, tc.inChecks) - }) - } -} - -func TestMutatorFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureMutator("ninja-turtle"), - wantKey: "mutator.name", - want: "ninja-turtle", - }, - { - name: "exposes labels", - args: &Mutator{ - ObjectMeta: ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "mutator.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("Mutator.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} - -func TestValidateMutatorTypes(t *testing.T) { - passTests := []string{"", "javascript", "pipe"} - failTests := []string{"Javascript", "js", "Pipe"} - for _, test := range passTests { - mutator := FixtureMutator("foo") - mutator.Type = test - if mutator.Type == JavascriptMutator { - mutator.Command = "" - mutator.Eval = "return 'asdf';" - } - if err := mutator.Validate(); err != nil { - t.Fatal(err) - } - } - for _, test := range failTests { - mutator := FixtureMutator("foo") - mutator.Type = test - if err := mutator.Validate(); err == nil { - t.Fatal("expecte non-nil error") - } - } -} - -func TestValidateMutatorCommandWithJavascript(t *testing.T) { - mutator := FixtureMutator("foo") - mutator.Command = "asdfasdf" - mutator.Type = JavascriptMutator - if err := mutator.Validate(); err == nil { - t.Fatal("expected non-nil error") - } -} - -func TestValidateMutatorEnv(t *testing.T) { - mutator := FixtureMutator("foo") - mutator.EnvVars = []string{"FOO"} - if err := mutator.Validate(); err != nil { - t.Fatal(err) - } -} diff --git a/api/core/v2/mutatorpb_test.go b/api/core/v2/mutatorpb_test.go deleted file mode 100644 index 138d68b687..0000000000 --- a/api/core/v2/mutatorpb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/mutator.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMutatorProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMutator(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Mutator{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMutatorMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMutator(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Mutator{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMutatorJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMutator(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Mutator{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMutatorProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMutator(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Mutator{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMutatorProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMutator(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Mutator{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMutatorFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMutator(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMutatorSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedMutator(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/namespace.go b/api/core/v2/namespace.go deleted file mode 100644 index acedd1328d..0000000000 --- a/api/core/v2/namespace.go +++ /dev/null @@ -1,73 +0,0 @@ -package v2 - -import ( - "fmt" - "net/url" - "path" -) - -const ( - // NamespaceTypeAll represents an empty namespace, used to represent a request - // across all namespaces - NamespaceTypeAll = "" - - // NamespacesResource is the name of this resource type - NamespacesResource = "namespaces" -) - -// StorePrefix returns the path prefix to this resource in the store -func (n *Namespace) StorePrefix() string { - return NamespacesResource -} - -// URIPath returns the path component of a Namespace URI. -func (n *Namespace) URIPath() string { - return path.Join(URLPrefix, "namespaces", url.PathEscape(n.Name)) -} - -// Validate returns an error if the namespace does not pass validation tests -func (n *Namespace) Validate() error { - if err := ValidateName(n.Name); err != nil { - return fmt.Errorf("namespace name %s", err) - } - - return nil -} - -// FixtureNamespace returns a mocked namespace -func FixtureNamespace(name string) *Namespace { - return &Namespace{ - Name: name, - } -} - -// GetObjectMeta only exists here to fulfil the requirements of Resource -func (n *Namespace) GetObjectMeta() ObjectMeta { - return ObjectMeta{Name: n.Name} -} - -// NamespaceFields returns a set of fields that represent that resource -func NamespaceFields(r Resource) map[string]string { - resource := r.(*Namespace) - return map[string]string{ - "namespace.name": resource.Name, - } -} - -// Fields returns a set of fields that represent that resource -func (n *Namespace) Fields() map[string]string { - return NamespaceFields(n) -} - -// SetNamespace sets the namespace of the resource. -func (n *Namespace) SetNamespace(namespace string) { -} - -// SetObjectMeta only exists here to fulfil the requirements of Resource -func (n *Namespace) SetObjectMeta(meta ObjectMeta) { - n.Name = meta.Name -} - -func (n *Namespace) RBACName() string { - return "namespaces" -} diff --git a/api/core/v2/namespace.pb.go b/api/core/v2/namespace.pb.go deleted file mode 100644 index e8d2b96688..0000000000 --- a/api/core/v2/namespace.pb.go +++ /dev/null @@ -1,440 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/namespace.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Namespace represents a virtual cluster -type Namespace struct { - // Name is the unique identifier for a namespace. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Namespace) Reset() { *m = Namespace{} } -func (m *Namespace) String() string { return proto.CompactTextString(m) } -func (*Namespace) ProtoMessage() {} -func (*Namespace) Descriptor() ([]byte, []int) { - return fileDescriptor_0a0fa14fb06c2a7b, []int{0} -} -func (m *Namespace) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Namespace.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Namespace) XXX_Merge(src proto.Message) { - xxx_messageInfo_Namespace.Merge(m, src) -} -func (m *Namespace) XXX_Size() int { - return m.Size() -} -func (m *Namespace) XXX_DiscardUnknown() { - xxx_messageInfo_Namespace.DiscardUnknown(m) -} - -var xxx_messageInfo_Namespace proto.InternalMessageInfo - -func (m *Namespace) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func init() { - proto.RegisterType((*Namespace)(nil), "sensu.core.v2.Namespace") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/namespace.proto", fileDescriptor_0a0fa14fb06c2a7b) -} - -var fileDescriptor_0a0fa14fb06c2a7b = []byte{ - // 176 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4d, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0x79, 0x89, - 0xb9, 0xa9, 0xc5, 0x05, 0x89, 0xc9, 0xa9, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, - 0x55, 0x7a, 0x20, 0x69, 0xbd, 0x32, 0x23, 0x29, 0x13, 0x24, 0x53, 0xd2, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0xaa, 0x92, 0x4a, 0xd3, 0x1c, 0xca, 0x0c, 0xf5, 0x8c, 0xf5, 0x0c, 0xc1, 0x82, 0x60, 0x31, - 0x30, 0x0b, 0x62, 0x88, 0x92, 0x3c, 0x17, 0xa7, 0x1f, 0xcc, 0x5c, 0x21, 0x21, 0x2e, 0x16, 0x90, - 0x25, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0xb6, 0x93, 0xc2, 0x8f, 0x87, 0x72, 0x8c, - 0x2b, 0x1e, 0xc9, 0x31, 0xee, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, - 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xce, 0x78, 0x2c, 0xc7, 0x10, 0xc5, 0x54, 0x66, 0x94, 0xc4, 0x06, - 0x36, 0xc9, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xc1, 0xe7, 0x76, 0x13, 0xc7, 0x00, 0x00, 0x00, -} - -func (this *Namespace) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Namespace) - if !ok { - that2, ok := that.(Namespace) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *Namespace) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Namespace) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Namespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int { - offset -= sovNamespace(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedNamespace(r randyNamespace, easy bool) *Namespace { - this := &Namespace{} - this.Name = string(randStringNamespace(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNamespace(r, 2) - } - return this -} - -type randyNamespace interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneNamespace(r randyNamespace) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringNamespace(r randyNamespace) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneNamespace(r) - } - return string(tmps) -} -func randUnrecognizedNamespace(r randyNamespace, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldNamespace(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldNamespace(dAtA []byte, r randyNamespace, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateNamespace(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateNamespace(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateNamespace(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateNamespace(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateNamespace(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateNamespace(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateNamespace(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Namespace) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovNamespace(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovNamespace(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozNamespace(x uint64) (n int) { - return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Namespace) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNamespace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Namespace: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNamespace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNamespace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNamespace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNamespace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNamespace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipNamespace(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNamespace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNamespace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNamespace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthNamespace - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupNamespace - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthNamespace - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupNamespace = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/namespace.proto b/api/core/v2/namespace.proto deleted file mode 100644 index 3670481c38..0000000000 --- a/api/core/v2/namespace.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// Namespace represents a virtual cluster -message Namespace { - // Name is the unique identifier for a namespace. - string name = 1; -} diff --git a/api/core/v2/namespace_test.go b/api/core/v2/namespace_test.go deleted file mode 100644 index bd7419ebde..0000000000 --- a/api/core/v2/namespace_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package v2 - -import ( - "reflect" - "testing" -) - -func TestNamespaceFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureNamespace("contoso"), - wantKey: "namespace.name", - want: "contoso", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("Namespace.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/namespacepb_test.go b/api/core/v2/namespacepb_test.go deleted file mode 100644 index c0eaff6b86..0000000000 --- a/api/core/v2/namespacepb_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/namespace.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNamespaceProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNamespace(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Namespace{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNamespaceMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNamespace(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Namespace{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNamespaceJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNamespace(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Namespace{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNamespaceProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNamespace(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Namespace{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNamespaceProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNamespace(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Namespace{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNamespaceSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNamespace(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/pipeline.go b/api/core/v2/pipeline.go deleted file mode 100644 index e119a2c0e9..0000000000 --- a/api/core/v2/pipeline.go +++ /dev/null @@ -1,101 +0,0 @@ -package v2 - -import ( - "errors" - "fmt" - "net/url" - "path" - - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // PipelinesResource is the name of this resource type - PipelinesResource = "pipelines" -) - -// GetObjectMeta returns the object metadata for the resource. -func (p *Pipeline) GetObjectMeta() ObjectMeta { - return p.ObjectMeta -} - -// SetObjectMeta sets the object metadata for the resource. -func (p *Pipeline) SetObjectMeta(meta ObjectMeta) { - p.ObjectMeta = meta -} - -// SetNamespace sets the namespace of the resource. -func (p *Pipeline) SetNamespace(namespace string) { - p.Namespace = namespace -} - -// StorePrefix returns the path prefix to this resource in the store. -func (p *Pipeline) StorePrefix() string { - return PipelinesResource -} - -// RBACName describes the name of the resource for RBAC purposes. -func (p *Pipeline) RBACName() string { - return "pipelines" -} - -// URIPath gives the path component of a pipeline URI. -func (p *Pipeline) URIPath() string { - if p.Namespace == "" { - return path.Join(URLPrefix, PipelinesResource, url.PathEscape(p.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(p.Namespace), PipelinesResource, url.PathEscape(p.Name)) -} - -// Validate checks if a pipeline resource passes validation rules. -func (p *Pipeline) Validate() error { - if err := ValidateName(p.ObjectMeta.Name); err != nil { - return errors.New("name " + err.Error()) - } - - if p.ObjectMeta.Namespace == "" { - return errors.New("namespace must be set") - } - - for _, workflow := range p.Workflows { - if err := workflow.Validate(); err != nil { - return fmt.Errorf("workflow %w", err) - } - } - - return nil -} - -// PipelineFields returns a set of fields that represent that resource. -func PipelineFields(r Resource) map[string]string { - resource := r.(*Pipeline) - fields := map[string]string{ - "pipeline.name": resource.ObjectMeta.Name, - "pipeline.namespace": resource.ObjectMeta.Namespace, - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "pipeline.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource. -func (p *Pipeline) Fields() map[string]string { - return PipelineFields(p) -} - -// FixturePipeline returns a testing fixture for a Pipeline object. -func FixturePipeline(name, namespace string) *Pipeline { - return &Pipeline{ - ObjectMeta: NewObjectMeta(name, namespace), - Workflows: []*PipelineWorkflow{}, - } -} - -// FixturePipelineReference returns a testing fixture for a ResourceReference -// object referencing a corev2.Pipeline. -func FixturePipelineReference(name string) *ResourceReference { - return &ResourceReference{ - APIVersion: "core/v2", - Type: "Pipeline", - Name: name, - } -} diff --git a/api/core/v2/pipeline.pb.go b/api/core/v2/pipeline.pb.go deleted file mode 100644 index f9fa5860a5..0000000000 --- a/api/core/v2/pipeline.pb.go +++ /dev/null @@ -1,523 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/pipeline.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Pipeline represents a named collection of pipeline workflows. -type Pipeline struct { - // Metadata contains the name, namespace, labels and annotations of the - // pipeline. - ObjectMeta `protobuf:"bytes,1,opt,name=Metadata,proto3,embedded=Metadata" json:"metadata,omitempty"` - // Workflows contains one or more pipeline workflows. - Workflows []*PipelineWorkflow `protobuf:"bytes,2,rep,name=Workflows,proto3" json:"workflows" yaml: "workflows"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Pipeline) Reset() { *m = Pipeline{} } -func (m *Pipeline) String() string { return proto.CompactTextString(m) } -func (*Pipeline) ProtoMessage() {} -func (*Pipeline) Descriptor() ([]byte, []int) { - return fileDescriptor_9109df54029b8d07, []int{0} -} -func (m *Pipeline) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Pipeline) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Pipeline.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Pipeline) XXX_Merge(src proto.Message) { - xxx_messageInfo_Pipeline.Merge(m, src) -} -func (m *Pipeline) XXX_Size() int { - return m.Size() -} -func (m *Pipeline) XXX_DiscardUnknown() { - xxx_messageInfo_Pipeline.DiscardUnknown(m) -} - -var xxx_messageInfo_Pipeline proto.InternalMessageInfo - -func (m *Pipeline) GetWorkflows() []*PipelineWorkflow { - if m != nil { - return m.Workflows - } - return nil -} - -func init() { - proto.RegisterType((*Pipeline)(nil), "sensu.core.v2.Pipeline") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/pipeline.proto", fileDescriptor_9109df54029b8d07) -} - -var fileDescriptor_9109df54029b8d07 = []byte{ - // 298 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x49, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0x05, 0x99, - 0x05, 0xa9, 0x39, 0x99, 0x79, 0xa9, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, 0x45, - 0x7a, 0x20, 0x59, 0xbd, 0x32, 0x23, 0x29, 0x64, 0x43, 0xd2, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xaa, - 0x92, 0x4a, 0xd3, 0x1c, 0xca, 0x0c, 0xf5, 0x8c, 0xf5, 0x0c, 0xc1, 0x82, 0x60, 0x31, 0x30, 0x0b, - 0x62, 0x88, 0x94, 0x01, 0x71, 0x56, 0xe7, 0xa6, 0x96, 0x24, 0x42, 0x75, 0xd8, 0x92, 0xe6, 0xd8, - 0xf8, 0xf2, 0xfc, 0xa2, 0xec, 0xb4, 0x9c, 0xfc, 0x72, 0x88, 0x76, 0xa5, 0x23, 0x8c, 0x5c, 0x1c, - 0x01, 0x50, 0x39, 0xa1, 0x50, 0x2e, 0x0e, 0xdf, 0xd4, 0x92, 0xc4, 0x94, 0xc4, 0x92, 0x44, 0x09, - 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x49, 0x3d, 0x14, 0x5f, 0xe9, 0xf9, 0x27, 0x65, 0xa5, 0x26, - 0x97, 0x80, 0x14, 0x39, 0xc9, 0x9d, 0xb8, 0x27, 0xcf, 0x70, 0xe1, 0x9e, 0x3c, 0xe3, 0xab, 0x7b, - 0xf2, 0x42, 0xb9, 0x50, 0x6d, 0x3a, 0xf9, 0xb9, 0x99, 0x25, 0xa9, 0xb9, 0x05, 0x25, 0x95, 0x41, - 0x70, 0xa3, 0x84, 0x12, 0xb9, 0x38, 0xc3, 0xa1, 0xb6, 0x16, 0x4b, 0x30, 0x29, 0x30, 0x6b, 0x70, - 0x1b, 0xc9, 0xa3, 0x99, 0x0b, 0x73, 0x02, 0x4c, 0x9d, 0x93, 0xd2, 0xab, 0x7b, 0xf2, 0x9c, 0x30, - 0xb7, 0x16, 0x7f, 0xba, 0x27, 0x2f, 0x58, 0x99, 0x98, 0x9b, 0x63, 0xa5, 0xa0, 0x04, 0x17, 0x53, - 0x0a, 0x42, 0x98, 0xea, 0xa4, 0xf0, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, - 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x33, - 0x1e, 0xcb, 0x31, 0x44, 0x31, 0x95, 0x19, 0x25, 0xb1, 0x81, 0xfd, 0x6b, 0x0c, 0x08, 0x00, 0x00, - 0xff, 0xff, 0x6e, 0x2f, 0x8b, 0x77, 0xdd, 0x01, 0x00, 0x00, -} - -func (this *Pipeline) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Pipeline) - if !ok { - that2, ok := that.(Pipeline) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if len(this.Workflows) != len(that1.Workflows) { - return false - } - for i := range this.Workflows { - if !this.Workflows[i].Equal(that1.Workflows[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *Pipeline) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Pipeline) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Pipeline) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Workflows) > 0 { - for iNdEx := len(m.Workflows) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Workflows[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPipeline(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPipeline(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintPipeline(dAtA []byte, offset int, v uint64) int { - offset -= sovPipeline(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedPipeline(r randyPipeline, easy bool) *Pipeline { - this := &Pipeline{} - v1 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v1 - if r.Intn(5) != 0 { - v2 := r.Intn(5) - this.Workflows = make([]*PipelineWorkflow, v2) - for i := 0; i < v2; i++ { - this.Workflows[i] = NewPopulatedPipelineWorkflow(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedPipeline(r, 3) - } - return this -} - -type randyPipeline interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RunePipeline(r randyPipeline) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringPipeline(r randyPipeline) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RunePipeline(r) - } - return string(tmps) -} -func randUnrecognizedPipeline(r randyPipeline, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldPipeline(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldPipeline(dAtA []byte, r randyPipeline, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulatePipeline(dAtA, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - dAtA = encodeVarintPopulatePipeline(dAtA, uint64(v4)) - case 1: - dAtA = encodeVarintPopulatePipeline(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulatePipeline(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulatePipeline(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulatePipeline(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulatePipeline(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Pipeline) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovPipeline(uint64(l)) - if len(m.Workflows) > 0 { - for _, e := range m.Workflows { - l = e.Size() - n += 1 + l + sovPipeline(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovPipeline(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPipeline(x uint64) (n int) { - return sovPipeline(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Pipeline) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPipeline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Pipeline: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Pipeline: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPipeline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPipeline - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPipeline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Workflows", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPipeline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPipeline - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPipeline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Workflows = append(m.Workflows, &PipelineWorkflow{}) - if err := m.Workflows[len(m.Workflows)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPipeline(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPipeline - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPipeline(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPipeline - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPipeline - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPipeline - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthPipeline - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPipeline - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthPipeline - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthPipeline = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPipeline = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPipeline = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/pipeline.proto b/api/core/v2/pipeline.proto deleted file mode 100644 index 815d2c9348..0000000000 --- a/api/core/v2/pipeline.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; -import "github.com/sensu/sensu-go/api/core/v2/pipeline_workflow.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// Pipeline represents a named collection of pipeline workflows. -message Pipeline { - // Metadata contains the name, namespace, labels and annotations of the - // pipeline. - ObjectMeta Metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - - // Workflows contains one or more pipeline workflows. - repeated PipelineWorkflow Workflows = 2 [ (gogoproto.jsontag) = "workflows", (gogoproto.moretags) = "yaml: \"workflows\"" ]; -} diff --git a/api/core/v2/pipeline_test.go b/api/core/v2/pipeline_test.go deleted file mode 100644 index 6cc7d56aad..0000000000 --- a/api/core/v2/pipeline_test.go +++ /dev/null @@ -1,319 +0,0 @@ -package v2 - -import ( - "reflect" - "testing" -) - -func TestPipeline_validate(t *testing.T) { - type fields struct { - ObjectMeta ObjectMeta - Workflows []*PipelineWorkflow - } - tests := []struct { - name string - fields fields - wantErr bool - wantMsg string - }{ - { - name: "fails when name is empty", - fields: fields{ - ObjectMeta: ObjectMeta{}, - }, - wantErr: true, - wantMsg: "name must not be empty", - }, - { - name: "fails when namespace is empty", - fields: fields{ - ObjectMeta: ObjectMeta{ - Name: "my-pipeline", - }, - }, - wantErr: true, - wantMsg: "namespace must be set", - }, - { - name: "fails when a workflow is invalid", - fields: fields{ - ObjectMeta: ObjectMeta{ - Name: "my-pipeline", - Namespace: "default", - }, - Workflows: []*PipelineWorkflow{{}}, - }, - wantErr: true, - wantMsg: "workflow name must not be empty", - }, - { - name: "succeeds when metadata is valid", - fields: fields{ - ObjectMeta: ObjectMeta{ - Name: "my-pipeline", - Namespace: "default", - }, - }, - wantErr: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - p := &Pipeline{ - ObjectMeta: tt.fields.ObjectMeta, - Workflows: tt.fields.Workflows, - } - err := p.Validate() - if (err != nil) != tt.wantErr { - t.Errorf("Pipeline.validate() error = %v, wantErr %v", err, tt.wantErr) - } - if err != nil && err.Error() != tt.wantMsg { - t.Errorf("Pipeline.validate() error = %v, wantMsg %v", err.Error(), tt.wantMsg) - } - }) - } -} - -func TestPipelineWorkflow_validate(t *testing.T) { - type fields struct { - Name string - Filters []*ResourceReference - Mutator *ResourceReference - Handler *ResourceReference - } - tests := []struct { - name string - fields fields - wantErr bool - wantMsg string - }{ - { - name: "fails when name is empty", - fields: fields{}, - wantErr: true, - wantMsg: "name must not be empty", - }, - { - name: "fails when filter has missing fields", - fields: fields{ - Name: "foo", - Filters: []*ResourceReference{{}}, - }, - wantErr: true, - wantMsg: "filter name must not be empty", - }, - { - name: "fails when filter cannot filter events", - fields: fields{ - Name: "foo", - Filters: []*ResourceReference{ - { - Name: "my-filter", - APIVersion: "core/v2", - Type: "Mutator", - }, - }, - }, - wantErr: true, - wantMsg: "filter resource type not capable of filtering events: core/v2.Mutator", - }, - { - name: "fails when mutator has missing fields", - fields: fields{ - Name: "foo", - Mutator: &ResourceReference{}, - }, - wantErr: true, - wantMsg: "mutator name must not be empty", - }, - { - name: "fails when mutator cannot mutate events", - fields: fields{ - Name: "foo", - Mutator: &ResourceReference{ - Name: "my-mutator", - APIVersion: "core/v2", - Type: "EventFilter", - }, - }, - wantErr: true, - wantMsg: "mutator resource type not capable of mutating events: core/v2.EventFilter", - }, - { - name: "fails when handler is nil", - fields: fields{ - Name: "foo", - }, - wantErr: true, - wantMsg: "handler must be set", - }, - { - name: "fails when handler has missing fields", - fields: fields{ - Name: "foo", - Handler: &ResourceReference{}, - }, - wantErr: true, - wantMsg: "handler name must not be empty", - }, - { - name: "fails when handler cannot handle events", - fields: fields{ - Name: "foo", - Handler: &ResourceReference{ - Name: "my-handler", - APIVersion: "core/v2", - Type: "Mutator", - }, - }, - wantErr: true, - wantMsg: "handler resource type not capable of handling events: core/v2.Mutator", - }, - { - name: "succeeds when name & handler are set", - fields: fields{ - Name: "foo", - Handler: &ResourceReference{ - Name: "my-handler", - APIVersion: "core/v2", - Type: "Handler", - }, - }, - wantErr: false, - }, - { - name: "succeeds when name, filters, mutator & handler are set", - fields: fields{ - Name: "foo", - Filters: []*ResourceReference{ - { - Name: "my-filter", - APIVersion: "core/v2", - Type: "EventFilter", - }, - }, - Mutator: &ResourceReference{ - Name: "my-mutator", - APIVersion: "core/v2", - Type: "Mutator", - }, - Handler: &ResourceReference{ - Name: "my-handler", - APIVersion: "core/v2", - Type: "Handler", - }, - }, - wantErr: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - w := &PipelineWorkflow{ - Name: tt.fields.Name, - Filters: tt.fields.Filters, - Mutator: tt.fields.Mutator, - Handler: tt.fields.Handler, - } - err := w.Validate() - if (err != nil) != tt.wantErr { - t.Errorf("PipelineWorkflow.validate() error = %v, wantErr %v", err, tt.wantErr) - } - if err != nil && err.Error() != tt.wantMsg { - t.Errorf("PipelineWorkflow.validate() error = %v, wantMsg %v", err.Error(), tt.wantMsg) - } - }) - } -} - -func TestResourceReference_validate(t *testing.T) { - type fields struct { - Name string - Type string - APIVersion string - } - tests := []struct { - name string - fields fields - wantErr bool - wantMsg string - }{ - { - name: "fails when name is empty", - fields: fields{}, - wantErr: true, - wantMsg: "name must not be empty", - }, - { - name: "fails when type is empty", - fields: fields{ - Name: "foo", - }, - wantErr: true, - wantMsg: "type must be set", - }, - { - name: "fails when api version is empty", - fields: fields{ - Name: "foo", - Type: "bar", - }, - wantErr: true, - wantMsg: "api_version must be set", - }, - { - name: "succeeds when all fields are set", - fields: fields{ - Name: "foo", - Type: "bar", - APIVersion: "v2", - }, - wantErr: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - r := &ResourceReference{ - Name: tt.fields.Name, - Type: tt.fields.Type, - APIVersion: tt.fields.APIVersion, - } - err := r.Validate() - if (err != nil) != tt.wantErr { - t.Errorf("ResourceReference.validate() error = %v, wantErr %v", err, tt.wantErr) - } - if err != nil && err.Error() != tt.wantMsg { - t.Errorf("ResourceReference.validate() error = %v, wantMsg %v", err.Error(), tt.wantMsg) - } - }) - } -} - -func TestPipelineFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixturePipeline("contoso", "default"), - wantKey: "pipeline.name", - want: "contoso", - }, - { - name: "exposes namespace", - args: FixturePipeline("contoso", "default"), - wantKey: "pipeline.namespace", - want: "default", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("Pipeline.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/pipeline_workflow.go b/api/core/v2/pipeline_workflow.go deleted file mode 100644 index a006fb746e..0000000000 --- a/api/core/v2/pipeline_workflow.go +++ /dev/null @@ -1,158 +0,0 @@ -package v2 - -import ( - "context" - "errors" - "fmt" - "sync" -) - -type resourceReferences struct { - references []ResourceReference - mu sync.RWMutex -} - -func (r *resourceReferences) add(ref ResourceReference) { - r.mu.Lock() - defer r.mu.Unlock() - r.references = append(r.references, ref) -} - -var ( - validPipelineWorkflowFilterReferences = resourceReferences{ - references: []ResourceReference{{APIVersion: "core/v2", Type: "EventFilter"}}, - } - - validPipelineWorkflowMutatorReferences = resourceReferences{ - references: []ResourceReference{{APIVersion: "core/v2", Type: "Mutator"}}, - } - - validPipelineWorkflowHandlerReferences = resourceReferences{ - references: []ResourceReference{{APIVersion: "core/v2", Type: "Handler"}}, - } -) - -// AddValidPipelineWorkflowFilterReference adds a ResourceReference to the -// list of valid resource references for filters. Only the APIVersion and -// Type fields are used to validate resource references at this time. -func AddValidPipelineWorkflowFilterReference(ref ResourceReference) { - validPipelineWorkflowFilterReferences.add(ref) -} - -// AddValidPipelineWorkflowMutatorReference adds a ResourceReference to the -// list of valid resource references for mutators. Only the APIVersion and -// Type fields are used to validate resource references at this time. -func AddValidPipelineWorkflowMutatorReference(ref ResourceReference) { - validPipelineWorkflowMutatorReferences.add(ref) -} - -// AddValidPipelineWorkflowHandlerReference adds a ResourceReference to the -// list of valid resource references for handlers. Only the APIVersion and -// Type fields are used to validate resource references at this time. -func AddValidPipelineWorkflowHandlerReference(ref ResourceReference) { - validPipelineWorkflowHandlerReferences.add(ref) -} - -// PipelineWorkflowFromHandler takes a Handler, converts it to a -// PipelineWorkflow and then returns it. -func PipelineWorkflowFromHandler(ctx context.Context, workflowName string, handler *Handler) *PipelineWorkflow { - filterRefs := []*ResourceReference{} - for _, filterName := range handler.Filters { - ref := &ResourceReference{ - Name: filterName, - APIVersion: "core/v2", - Type: "EventFilter", - } - filterRefs = append(filterRefs, ref) - } - - var mutatorRef *ResourceReference - if handler.Mutator != "" { - mutatorRef = &ResourceReference{ - Name: handler.Mutator, - APIVersion: "core/v2", - Type: "Mutator", - } - } - - handlerRef := &ResourceReference{ - Name: handler.Name, - APIVersion: "core/v2", - Type: "Handler", - } - - return &PipelineWorkflow{ - Name: workflowName, - Filters: filterRefs, - Mutator: mutatorRef, - Handler: handlerRef, - } -} - -// validate checks if a pipeline workflow resource passes validation rules. -func (w *PipelineWorkflow) Validate() error { - if err := ValidateName(w.Name); err != nil { - return errors.New("name " + err.Error()) - } - - if w.Filters != nil { - for _, filter := range w.Filters { - if err := filter.Validate(); err != nil { - return fmt.Errorf("filter %w", err) - } - if err := w.validateEventFilterReference(filter); err != nil { - return fmt.Errorf("filter %w", err) - } - } - } - - if w.Mutator != nil { - if err := w.Mutator.Validate(); err != nil { - return fmt.Errorf("mutator %w", err) - } - if err := w.validateMutatorReference(w.Mutator); err != nil { - return fmt.Errorf("mutator %w", err) - } - } - - if w.Handler == nil { - return errors.New("handler must be set") - } - - if err := w.Handler.Validate(); err != nil { - return fmt.Errorf("handler %w", err) - } - - if err := w.validateHandlerReference(w.Handler); err != nil { - return fmt.Errorf("handler %w", err) - } - - return nil -} - -func (w *PipelineWorkflow) validateEventFilterReference(ref *ResourceReference) error { - for _, allowed := range validPipelineWorkflowFilterReferences.references { - if allowed.APIVersion == ref.APIVersion && allowed.Type == ref.Type { - return nil - } - } - return fmt.Errorf("resource type not capable of filtering events: %s.%s", ref.APIVersion, ref.Type) -} - -func (w *PipelineWorkflow) validateMutatorReference(ref *ResourceReference) error { - for _, allowed := range validPipelineWorkflowMutatorReferences.references { - if allowed.APIVersion == ref.APIVersion && allowed.Type == ref.Type { - return nil - } - } - return fmt.Errorf("resource type not capable of mutating events: %s.%s", ref.APIVersion, ref.Type) -} - -func (w *PipelineWorkflow) validateHandlerReference(ref *ResourceReference) error { - for _, allowed := range validPipelineWorkflowHandlerReferences.references { - if allowed.APIVersion == ref.APIVersion && allowed.Type == ref.Type { - return nil - } - } - return fmt.Errorf("resource type not capable of handling events: %s.%s", ref.APIVersion, ref.Type) -} diff --git a/api/core/v2/pipeline_workflow.pb.go b/api/core/v2/pipeline_workflow.pb.go deleted file mode 100644 index 45b5c0fb1f..0000000000 --- a/api/core/v2/pipeline_workflow.pb.go +++ /dev/null @@ -1,668 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/pipeline_workflow.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// PipelineWorkflow represents a workflow of filters, mutator, & handler to use -// in a pipeline. -//sensu:nogen -type PipelineWorkflow struct { - // Name is a descriptive name of the pipeline workflow. - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"name" yaml: "name` - // Filters contains one or more references to a resource to use as an event - // filter. - Filters []*ResourceReference `protobuf:"bytes,2,rep,name=Filters,proto3" json:"filters,omitempty" yaml: "filters,omitempty"` - // Mutator contains a reference to a resource to use as an event mutator. - Mutator *ResourceReference `protobuf:"bytes,3,opt,name=Mutator,proto3" json:"mutator,omitempty" yaml: "mutator,omitempty"` - // Handler contains a reference to a resource to use as an event handler. - Handler *ResourceReference `protobuf:"bytes,4,opt,name=Handler,proto3" json:"handler" yaml: "handler]"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PipelineWorkflow) Reset() { *m = PipelineWorkflow{} } -func (m *PipelineWorkflow) String() string { return proto.CompactTextString(m) } -func (*PipelineWorkflow) ProtoMessage() {} -func (*PipelineWorkflow) Descriptor() ([]byte, []int) { - return fileDescriptor_34fb4f15578245d5, []int{0} -} -func (m *PipelineWorkflow) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PipelineWorkflow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PipelineWorkflow.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PipelineWorkflow) XXX_Merge(src proto.Message) { - xxx_messageInfo_PipelineWorkflow.Merge(m, src) -} -func (m *PipelineWorkflow) XXX_Size() int { - return m.Size() -} -func (m *PipelineWorkflow) XXX_DiscardUnknown() { - xxx_messageInfo_PipelineWorkflow.DiscardUnknown(m) -} - -var xxx_messageInfo_PipelineWorkflow proto.InternalMessageInfo - -func (m *PipelineWorkflow) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *PipelineWorkflow) GetFilters() []*ResourceReference { - if m != nil { - return m.Filters - } - return nil -} - -func (m *PipelineWorkflow) GetMutator() *ResourceReference { - if m != nil { - return m.Mutator - } - return nil -} - -func (m *PipelineWorkflow) GetHandler() *ResourceReference { - if m != nil { - return m.Handler - } - return nil -} - -func init() { - proto.RegisterType((*PipelineWorkflow)(nil), "sensu.core.v2.PipelineWorkflow") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/pipeline_workflow.proto", fileDescriptor_34fb4f15578245d5) -} - -var fileDescriptor_34fb4f15578245d5 = []byte{ - // 373 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcf, 0x4a, 0xf3, 0x40, - 0x14, 0xc5, 0xbf, 0x69, 0xcb, 0x57, 0x4c, 0x11, 0x6a, 0x36, 0xc6, 0x2e, 0x92, 0x90, 0x55, 0x41, - 0x9d, 0xd8, 0xd4, 0x95, 0xa0, 0x48, 0x17, 0xe2, 0x46, 0x91, 0x6c, 0x04, 0x45, 0x4a, 0x1a, 0x6f, - 0xd2, 0x60, 0x26, 0x13, 0x26, 0x93, 0x94, 0xbe, 0x89, 0x8f, 0xe0, 0x23, 0xf8, 0x08, 0x2e, 0x7d, - 0x82, 0xa0, 0x71, 0xd7, 0x65, 0x57, 0x2e, 0x5c, 0x48, 0xf3, 0x07, 0x94, 0xba, 0xc8, 0x66, 0x98, - 0xb9, 0xf7, 0x9c, 0xf3, 0x9b, 0x3b, 0x23, 0x1c, 0xbb, 0x1e, 0x9f, 0xc6, 0x13, 0x6c, 0x53, 0xa2, - 0x47, 0x10, 0x44, 0x71, 0xb1, 0xee, 0xbb, 0x54, 0xb7, 0x42, 0x4f, 0xb7, 0x29, 0x03, 0x3d, 0x31, - 0xf4, 0xd0, 0x0b, 0xc1, 0xf7, 0x02, 0x18, 0xcf, 0x28, 0x7b, 0x70, 0x7c, 0x3a, 0xc3, 0x21, 0xa3, - 0x9c, 0x8a, 0x9b, 0xb9, 0x1a, 0xaf, 0x64, 0x38, 0x31, 0x7a, 0x87, 0x3f, 0xd2, 0x5c, 0xea, 0x52, - 0x3d, 0x57, 0x4d, 0x62, 0xe7, 0x34, 0x19, 0xe0, 0x21, 0x1e, 0xe4, 0xc5, 0xbc, 0x96, 0xef, 0x8a, - 0x90, 0xde, 0x41, 0xbd, 0x3b, 0x10, 0xe0, 0x56, 0xe9, 0x38, 0xa9, 0xe7, 0x60, 0x10, 0xd1, 0x98, - 0xd9, 0x30, 0x66, 0xe0, 0x00, 0x83, 0xc0, 0x86, 0xc2, 0xaf, 0x7d, 0x35, 0x84, 0xee, 0x55, 0x39, - 0xd2, 0x75, 0x39, 0x91, 0xb8, 0x2b, 0xb4, 0x2e, 0x2d, 0x02, 0x12, 0x52, 0x51, 0x7f, 0x63, 0xb4, - 0xbd, 0x48, 0x95, 0x56, 0x60, 0x11, 0x58, 0xa6, 0x4a, 0x67, 0x6e, 0x11, 0xff, 0x48, 0xd5, 0x56, - 0x47, 0x33, 0x17, 0x89, 0x81, 0xd0, 0x3e, 0xf3, 0x7c, 0x0e, 0x2c, 0x92, 0x1a, 0x6a, 0xb3, 0xdf, - 0x31, 0x54, 0xfc, 0xeb, 0x29, 0xb0, 0x59, 0xb2, 0xcd, 0x0a, 0x3d, 0x32, 0x16, 0xa9, 0xb2, 0xe5, - 0x14, 0xa6, 0x3d, 0x4a, 0x3c, 0x0e, 0x24, 0xe4, 0xf3, 0x65, 0xaa, 0xec, 0x94, 0xf1, 0x6b, 0x3d, - 0xcd, 0xac, 0x20, 0x2b, 0xde, 0x45, 0xcc, 0x2d, 0x4e, 0x99, 0xd4, 0x54, 0x51, 0x7d, 0x1e, 0x29, - 0x4c, 0x7f, 0xf2, 0xd6, 0x7a, 0x9a, 0x59, 0x41, 0xc4, 0x5b, 0xa1, 0x7d, 0x6e, 0x05, 0xf7, 0x3e, - 0x30, 0xa9, 0x55, 0x93, 0xa7, 0x2c, 0x52, 0xa5, 0x3d, 0x2d, 0x4c, 0xcb, 0x54, 0xe9, 0x96, 0x94, - 0xb2, 0x72, 0xa7, 0x99, 0x55, 0xe2, 0x48, 0xfd, 0x7c, 0x97, 0xd1, 0x53, 0x26, 0xa3, 0xe7, 0x4c, - 0x46, 0x2f, 0x99, 0x8c, 0x5e, 0x33, 0x19, 0xbd, 0x65, 0x32, 0x7a, 0xfc, 0x90, 0xff, 0xdd, 0x34, - 0x12, 0x63, 0xf2, 0x3f, 0xff, 0xa7, 0xe1, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa6, 0x24, 0xa9, - 0xa2, 0x9f, 0x02, 0x00, 0x00, -} - -func (this *PipelineWorkflow) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PipelineWorkflow) - if !ok { - that2, ok := that.(PipelineWorkflow) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if len(this.Filters) != len(that1.Filters) { - return false - } - for i := range this.Filters { - if !this.Filters[i].Equal(that1.Filters[i]) { - return false - } - } - if !this.Mutator.Equal(that1.Mutator) { - return false - } - if !this.Handler.Equal(that1.Handler) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *PipelineWorkflow) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PipelineWorkflow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PipelineWorkflow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Handler != nil { - { - size, err := m.Handler.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPipelineWorkflow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Mutator != nil { - { - size, err := m.Mutator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPipelineWorkflow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Filters) > 0 { - for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Filters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPipelineWorkflow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintPipelineWorkflow(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintPipelineWorkflow(dAtA []byte, offset int, v uint64) int { - offset -= sovPipelineWorkflow(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedPipelineWorkflow(r randyPipelineWorkflow, easy bool) *PipelineWorkflow { - this := &PipelineWorkflow{} - this.Name = string(randStringPipelineWorkflow(r)) - if r.Intn(5) != 0 { - v1 := r.Intn(5) - this.Filters = make([]*ResourceReference, v1) - for i := 0; i < v1; i++ { - this.Filters[i] = NewPopulatedResourceReference(r, easy) - } - } - if r.Intn(5) != 0 { - this.Mutator = NewPopulatedResourceReference(r, easy) - } - if r.Intn(5) != 0 { - this.Handler = NewPopulatedResourceReference(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedPipelineWorkflow(r, 5) - } - return this -} - -type randyPipelineWorkflow interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RunePipelineWorkflow(r randyPipelineWorkflow) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringPipelineWorkflow(r randyPipelineWorkflow) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RunePipelineWorkflow(r) - } - return string(tmps) -} -func randUnrecognizedPipelineWorkflow(r randyPipelineWorkflow, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldPipelineWorkflow(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldPipelineWorkflow(dAtA []byte, r randyPipelineWorkflow, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulatePipelineWorkflow(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulatePipelineWorkflow(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulatePipelineWorkflow(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulatePipelineWorkflow(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulatePipelineWorkflow(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulatePipelineWorkflow(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulatePipelineWorkflow(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *PipelineWorkflow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovPipelineWorkflow(uint64(l)) - } - if len(m.Filters) > 0 { - for _, e := range m.Filters { - l = e.Size() - n += 1 + l + sovPipelineWorkflow(uint64(l)) - } - } - if m.Mutator != nil { - l = m.Mutator.Size() - n += 1 + l + sovPipelineWorkflow(uint64(l)) - } - if m.Handler != nil { - l = m.Handler.Size() - n += 1 + l + sovPipelineWorkflow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovPipelineWorkflow(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPipelineWorkflow(x uint64) (n int) { - return sovPipelineWorkflow(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *PipelineWorkflow) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPipelineWorkflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PipelineWorkflow: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PipelineWorkflow: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPipelineWorkflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPipelineWorkflow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPipelineWorkflow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPipelineWorkflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPipelineWorkflow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPipelineWorkflow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Filters = append(m.Filters, &ResourceReference{}) - if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mutator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPipelineWorkflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPipelineWorkflow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPipelineWorkflow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Mutator == nil { - m.Mutator = &ResourceReference{} - } - if err := m.Mutator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handler", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPipelineWorkflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPipelineWorkflow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPipelineWorkflow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Handler == nil { - m.Handler = &ResourceReference{} - } - if err := m.Handler.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPipelineWorkflow(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPipelineWorkflow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPipelineWorkflow(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPipelineWorkflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPipelineWorkflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPipelineWorkflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthPipelineWorkflow - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPipelineWorkflow - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthPipelineWorkflow - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthPipelineWorkflow = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPipelineWorkflow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPipelineWorkflow = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/pipeline_workflow.proto b/api/core/v2/pipeline_workflow.proto deleted file mode 100644 index aaef6baaf5..0000000000 --- a/api/core/v2/pipeline_workflow.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; -import "github.com/sensu/sensu-go/api/core/v2/resource_reference.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// PipelineWorkflow represents a workflow of filters, mutator, & handler to use -// in a pipeline. -//sensu:nogen -message PipelineWorkflow { - // Name is a descriptive name of the pipeline workflow. - string Name = 1 [ (gogoproto.jsontag) = "name", (gogoproto.moretags) = "yaml: \"name" ]; - - // Filters contains one or more references to a resource to use as an event - // filter. - repeated ResourceReference Filters = 2 [ (gogoproto.jsontag) = "filters,omitempty", (gogoproto.moretags) = "yaml: \"filters,omitempty\"" ]; - - // Mutator contains a reference to a resource to use as an event mutator. - ResourceReference Mutator = 3 [ (gogoproto.jsontag) = "mutator,omitempty", (gogoproto.moretags) = "yaml: \"mutator,omitempty\"" ]; - - // Handler contains a reference to a resource to use as an event handler. - ResourceReference Handler = 4 [ (gogoproto.jsontag) = "handler", (gogoproto.moretags) = "yaml: \"handler]\"" ]; -} diff --git a/api/core/v2/pipeline_workflowpb_test.go b/api/core/v2/pipeline_workflowpb_test.go deleted file mode 100644 index 052d8812c5..0000000000 --- a/api/core/v2/pipeline_workflowpb_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/pipeline_workflow.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestPipelineWorkflowProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipelineWorkflow(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PipelineWorkflow{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPipelineWorkflowMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipelineWorkflow(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PipelineWorkflow{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPipelineWorkflowJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipelineWorkflow(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PipelineWorkflow{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPipelineWorkflowProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipelineWorkflow(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &PipelineWorkflow{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPipelineWorkflowProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipelineWorkflow(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &PipelineWorkflow{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPipelineWorkflowSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipelineWorkflow(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/pipelinepb_test.go b/api/core/v2/pipelinepb_test.go deleted file mode 100644 index 226417cccc..0000000000 --- a/api/core/v2/pipelinepb_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/pipeline.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestPipelineProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipeline(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Pipeline{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPipelineMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipeline(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Pipeline{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPipelineJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipeline(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Pipeline{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPipelineProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipeline(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Pipeline{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPipelineProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipeline(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Pipeline{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPipelineSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPipeline(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/protocol.go b/api/core/v2/protocol.go deleted file mode 100644 index b91acd416d..0000000000 --- a/api/core/v2/protocol.go +++ /dev/null @@ -1,19 +0,0 @@ -package v2 - -// AgentHandshakeType is the message type string for an AgentHandshake -const AgentHandshakeType = "agent_handshake" - -// An AgentHandshake is the first message sent by a Backend on a Transport in a -// Session. -type AgentHandshake Entity - -// BackendHandshakeType is the message type string for a BackendHandshake -const BackendHandshakeType = "backend_handshake" - -// A BackendHandshake is the first message sent by a Backend on a Transport in -// a Session. -type BackendHandshake struct{} - -// PaginationContinueHeader is the name of the header used by the API to return -// a potential continue token when paginating. -const PaginationContinueHeader = "Sensu-Continue" diff --git a/api/core/v2/provider.go b/api/core/v2/provider.go deleted file mode 100644 index 10acb078a1..0000000000 --- a/api/core/v2/provider.go +++ /dev/null @@ -1,20 +0,0 @@ -package v2 - -import ( - "context" -) - -// AuthProvider represents an abstracted authentication provider -type AuthProvider interface { - Resource - - // Authenticate attempts to authenticate a user with its username and password - Authenticate(ctx context.Context, username, password string) (*Claims, error) - // Refresh renews the user claims with the provider claims - Refresh(ctx context.Context, claims *Claims) (*Claims, error) - - // Name returns the provider name (e.g. default) - Name() string - // Type returns the provider type (e.g. ldap) - Type() string -} diff --git a/api/core/v2/rbac.go b/api/core/v2/rbac.go deleted file mode 100644 index 4021e21e6b..0000000000 --- a/api/core/v2/rbac.go +++ /dev/null @@ -1,518 +0,0 @@ -package v2 - -import ( - "errors" - "fmt" - "net/url" - "path" - "strings" - - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // ClusterRolesResource is the name of this resource type - ClusterRolesResource = "clusterroles" - - // ClusterRoleBindingsResource is the name of this resource type - ClusterRoleBindingsResource = "clusterrolebindings" - - // RolesResource is the name of this resource type - RolesResource = "roles" - - // RoleBindingsResource is the name of this resource type - RoleBindingsResource = "rolebindings" - - // ResourceAll represents all possible resources - ResourceAll = "*" - // VerbAll represents all possible verbs - VerbAll = "*" - - // GroupType represents a group object in a subject - GroupType = "Group" - // UserType represents a user object in a subject - UserType = "User" - - // ClusterRoleType represents a ClusterRole in a RoleRef - ClusterRoleType = "ClusterRole" - // RoleType represents a Role in a RoleRef - RoleType = "Role" - - // LocalSelfUserResource represents a local user trying to view itself - // or change its password - LocalSelfUserResource = "localselfuser" -) - -// CommonCoreResources represents the common "core" resources found in a -// namespace -var CommonCoreResources = []string{ - "assets", - "checks", - "entities", - "events", - "filters", - "handlers", - "hooks", - "mutators", - "silenced", -} - -var allowedVerbs = []string{ - VerbAll, - "get", - "list", - "create", - "update", - "delete", -} - -// FixtureSubject creates a Subject for testing -func FixtureSubject(subjectType, name string) Subject { - return Subject{ - Type: subjectType, - Name: name, - } -} - -// FixtureRule returns a partial rule -func FixtureRule() Rule { - return Rule{ - Verbs: []string{VerbAll}, - Resources: []string{ResourceAll}, - } -} - -// FixtureRole returns a partial role -func FixtureRole(name, namespace string) *Role { - return &Role{ - ObjectMeta: NewObjectMeta(name, namespace), - Rules: []Rule{ - FixtureRule(), - }, - } -} - -// FixtureRoleRef creates a RoleRef for testing -func FixtureRoleRef(roleType, name string) RoleRef { - return RoleRef{ - Type: roleType, - Name: name, - } -} - -// FixtureRoleBinding creates a RoleBinding for testing -func FixtureRoleBinding(name, namespace string) *RoleBinding { - return &RoleBinding{ - ObjectMeta: NewObjectMeta(name, namespace), - Subjects: []Subject{FixtureSubject(UserType, "username")}, - RoleRef: FixtureRoleRef(RoleType, "read-write"), - } -} - -// FixtureClusterRole returns a partial role -func FixtureClusterRole(name string) *ClusterRole { - return &ClusterRole{ - ObjectMeta: NewObjectMeta(name, ""), - Rules: []Rule{ - FixtureRule(), - }, - } -} - -// FixtureClusterRoleBinding creates a ClusterRoleBinding for testing -func FixtureClusterRoleBinding(name string) *ClusterRoleBinding { - return &ClusterRoleBinding{ - ObjectMeta: NewObjectMeta(name, ""), - Subjects: []Subject{FixtureSubject(UserType, "username")}, - RoleRef: FixtureRoleRef(ClusterRoleType, "read-write"), - } -} - -// StorePrefix returns the path prefix to this resource in the store -func (r *ClusterRole) StorePrefix() string { - return "rbac/" + ClusterRolesResource -} - -// URIPath returns the path component of a cluster role URI. -func (r *ClusterRole) URIPath() string { - return path.Join(URLPrefix, ClusterRolesResource, url.PathEscape(r.Name)) -} - -// Validate a ClusterRole -func (r *ClusterRole) Validate() error { - if err := ValidateSubscriptionName(r.Name); err != nil { - return errors.New("the ClusterRole name " + err.Error()) - } - - if len(r.Rules) == 0 { - return errors.New("a ClusterRole must have at least one rule") - } - - if r.Namespace != "" { - return errors.New("ClusterRole cannot have a namespace") - } - - for i := range r.Rules { - // Split the verbs, resources and resource names - r.Rules[i].Verbs = split(r.Rules[i].Verbs) - r.Rules[i].Resources = split(r.Rules[i].Resources) - - // Validate the verbs - if err := validateVerbs(r.Rules[i].Verbs); err != nil { - return err - } - } - - return nil -} - -// StorePrefix returns the path prefix to this resource in the store -func (b *ClusterRoleBinding) StorePrefix() string { - return "rbac/" + ClusterRoleBindingsResource -} - -// URIPath returns the path component of a cluster role binding URI. -func (b *ClusterRoleBinding) URIPath() string { - return path.Join(URLPrefix, ClusterRoleBindingsResource, url.PathEscape(b.Name)) -} - -// Validate a ClusterRoleBinding -func (b *ClusterRoleBinding) Validate() error { - if err := ValidateSubscriptionName(b.Name); err != nil { - return errors.New("the ClusterRoleBinding name " + err.Error()) - } - - if b.Namespace != "" { - return errors.New("ClusterRoleBinding cannot have a namespace") - } - - if err := ValidateRoleRef(&b.RoleRef); err != nil { - return err - } - - var err error - b.Subjects, err = ValidateSubjects(b.Subjects) - return err -} - -// StorePrefix returns the path prefix to this resource in the store -func (r *Role) StorePrefix() string { - return "rbac/" + RolesResource -} - -// URIPath returns the path component of a role URI. -func (r *Role) URIPath() string { - if r.Namespace == "" { - return path.Join(URLPrefix, RolesResource, url.PathEscape(r.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(r.Namespace), RolesResource, url.PathEscape(r.Name)) - -} - -// Validate a Role -func (r *Role) Validate() error { - if err := ValidateSubscriptionName(r.Name); err != nil { - return errors.New("the Role name " + err.Error()) - } - - if r.Namespace == "" { - return errors.New("the Role namespace must be set") - } - - if len(r.Rules) == 0 { - return errors.New("a Role must have at least one rule") - } - - for i := range r.Rules { - // Split the verbs, resources and resource names - r.Rules[i].Verbs = split(r.Rules[i].Verbs) - r.Rules[i].Resources = split(r.Rules[i].Resources) - - // Validate the verbs - if err := validateVerbs(r.Rules[i].Verbs); err != nil { - return err - } - } - - return nil -} - -// StorePrefix returns the path prefix to this resource in the store -func (b *RoleBinding) StorePrefix() string { - return "rbac/" + RoleBindingsResource -} - -// URIPath returns the path component of a role binding URI. -func (b *RoleBinding) URIPath() string { - if b.Namespace == "" { - return path.Join(URLPrefix, RoleBindingsResource, url.PathEscape(b.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(b.Namespace), RoleBindingsResource, url.PathEscape(b.Name)) -} - -// Validate a RoleBinding -func (b *RoleBinding) Validate() error { - if err := ValidateSubscriptionName(b.Name); err != nil { - return errors.New("the RoleBinding name " + err.Error()) - } - - if b.Namespace == "" { - return errors.New("the RoleBinding namespace must be set") - } - - if err := ValidateRoleRef(&b.RoleRef); err != nil { - return err - } - - var err error - b.Subjects, err = ValidateSubjects(b.Subjects) - return err -} - -// ValidateRoleRef checks that the role reference has a valid reference to -// either a Role or a ClusterRole -func ValidateRoleRef(roleRef *RoleRef) error { - roleRef.Type = strings.Title(roleRef.Type) - if roleRef.Type != ClusterRoleType && roleRef.Type != RoleType { - return fmt.Errorf( - "roleRef type %q is invalid, expected either %q or %q", - roleRef.Type, ClusterRoleType, RoleType, - ) - } - - if len(roleRef.Name) == 0 { - return fmt.Errorf("roleRef name for %s is required", roleRef.Type) - } - - return nil -} - -// ValidateSubjects checks that there is at least one subject, and all subjects -// have non-empty types and names. -func ValidateSubjects(subjects []Subject) ([]Subject, error) { - if len(subjects) == 0 { - return subjects, errors.New("a RoleBinding must have at least one subject") - } - - for i, subject := range subjects { - subjects[i].Type = strings.Title(subject.Type) - if subjects[i].Type != GroupType && subjects[i].Type != UserType { - return subjects, fmt.Errorf( - "subject type %q is invalid, expected either %q or %q", - subject.Type, GroupType, UserType, - ) - } - if len(subject.Name) == 0 { - return subjects, fmt.Errorf( - "subject name for the %q type is required", subjects[i].Type, - ) - } - } - - return subjects, nil -} - -// ResourceMatches returns whether the specified requestedResource matches any -// of the rule resources -func (r Rule) ResourceMatches(requestedResource string) bool { - for _, resource := range r.Resources { - if resource == ResourceAll { - return true - } - - if resource == requestedResource { - return true - } - } - - return false -} - -// ResourceNameMatches returns whether the specified requestedResourceName -// matches any of the rule resources -func (r Rule) ResourceNameMatches(requestedResourceName string) bool { - if len(r.ResourceNames) == 0 { - return true - } - - for _, name := range r.ResourceNames { - if name == requestedResourceName { - return true - } - } - - return false -} - -// VerbMatches returns whether the specified requestedVerb matches any of the -// rule verbs -func (r Rule) VerbMatches(requestedVerb string) bool { - for _, verb := range r.Verbs { - if verb == VerbAll { - return true - } - - if verb == requestedVerb { - return true - } - } - - return false -} - -// NewRole creates a new Role. -func NewRole(meta ObjectMeta) *Role { - return &Role{ObjectMeta: meta} -} - -// NewRoleBinding creates a new RoleBinding. -func NewRoleBinding(meta ObjectMeta) *RoleBinding { - return &RoleBinding{ObjectMeta: meta} -} - -// ClusterRoleFields returns a set of fields that represent that resource -func ClusterRoleFields(r Resource) map[string]string { - resource := r.(*ClusterRole) - fields := map[string]string{ - "clusterrole.name": resource.ObjectMeta.Name, - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "clusterrole.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (c *ClusterRole) Fields() map[string]string { - return ClusterRoleFields(c) -} - -// ClusterRoleBindingFields returns a set of fields that represent that resource -func ClusterRoleBindingFields(r Resource) map[string]string { - resource := r.(*ClusterRoleBinding) - fields := map[string]string{ - "clusterrolebinding.name": resource.ObjectMeta.Name, - "clusterrolebinding.role_ref.name": resource.RoleRef.Name, - "clusterrolebinding.role_ref.type": resource.RoleRef.Type, - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "clusterrolebinding.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (c *ClusterRoleBinding) Fields() map[string]string { - return ClusterRoleBindingFields(c) -} - -// RoleFields returns a set of fields that represent that resource -func RoleFields(r Resource) map[string]string { - resource := r.(*Role) - fields := map[string]string{ - "role.name": resource.ObjectMeta.Name, - "role.namespace": resource.ObjectMeta.Namespace, - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "role.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (c *Role) Fields() map[string]string { - return RoleFields(c) -} - -// RoleBindingFields returns a set of fields that represent that resource -func RoleBindingFields(r Resource) map[string]string { - resource := r.(*RoleBinding) - fields := map[string]string{ - "rolebinding.name": resource.ObjectMeta.Name, - "rolebinding.namespace": resource.ObjectMeta.Namespace, - "rolebinding.role_ref.name": resource.RoleRef.Name, - "rolebinding.role_ref.type": resource.RoleRef.Type, - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "rolebinding.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (c *RoleBinding) Fields() map[string]string { - return RoleBindingFields(c) -} - -// SetNamespace sets the namespace of the resource. -func (r *ClusterRole) SetNamespace(namespace string) { -} - -// SetObjectMeta sets the meta of the resource. -func (r *ClusterRole) SetObjectMeta(meta ObjectMeta) { - r.ObjectMeta = meta -} - -// SetNamespace sets the namespace of the resource. -func (b *ClusterRoleBinding) SetNamespace(namespace string) { -} - -// SetObjectMeta sets the meta of the resource. -func (b *ClusterRoleBinding) SetObjectMeta(meta ObjectMeta) { - b.ObjectMeta = meta -} - -// SetNamespace sets the namespace of the resource. -func (r *Role) SetNamespace(namespace string) { - r.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (r *Role) SetObjectMeta(meta ObjectMeta) { - r.ObjectMeta = meta -} - -// SetNamespace sets the namespace of the resource. -func (b *RoleBinding) SetNamespace(namespace string) { - b.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (b *RoleBinding) SetObjectMeta(meta ObjectMeta) { - b.ObjectMeta = meta -} - -// RBACName returns the name of the resource for RBAC -func (*ClusterRoleBinding) RBACName() string { - return "clusterrolebindings" -} - -// RBACName returns the name of the resource for RBAC -func (*RoleBinding) RBACName() string { - return "rolebindings" -} - -// RBACName returns the name of the resource for RBAC -func (*ClusterRole) RBACName() string { - return "clusterroles" -} - -// RBACName returns the name of the resource for RBAC -func (*Role) RBACName() string { - return "roles" -} - -// split splits each string within a list using the comma seperator -func split(list []string) []string { - var splitted []string - - for _, elem := range list { - v := strings.Split(elem, ",") - splitted = append(splitted, v...) - } - - return splitted -} - -// validateVerbs ensures the provided verbs are valid -func validateVerbs(verbs []string) error { - for _, verb := range verbs { - if !stringsutil.InArray(verb, allowedVerbs) { - return fmt.Errorf("the verb %q is not valid", verb) - } - } - - return nil -} diff --git a/api/core/v2/rbac.pb.go b/api/core/v2/rbac.pb.go deleted file mode 100644 index cba5b9e939..0000000000 --- a/api/core/v2/rbac.pb.go +++ /dev/null @@ -1,2548 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/rbac.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Rule holds information that describes an action that can be taken -type Rule struct { - // Verbs is a list of verbs that apply to all of the listed resources for - // this rule. These include "get", "list", "watch", "create", "update", - // "delete". - // TODO: add support for "patch" (this is expensive and should be delayed - // until a further release). TODO: add support for "watch" (via websockets) - Verbs []string `protobuf:"bytes,1,rep,name=verbs,proto3" json:"verbs"` - // Resources is a list of resources that this rule applies to. "*" - // represents all resources. - Resources []string `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources"` - // ResourceNames is an optional list of resource names that the rule applies - // to. - ResourceNames []string `protobuf:"bytes,3,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Rule) Reset() { *m = Rule{} } -func (m *Rule) String() string { return proto.CompactTextString(m) } -func (*Rule) ProtoMessage() {} -func (*Rule) Descriptor() ([]byte, []int) { - return fileDescriptor_69cb4f8fc3d151bb, []int{0} -} -func (m *Rule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Rule.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Rule) XXX_Merge(src proto.Message) { - xxx_messageInfo_Rule.Merge(m, src) -} -func (m *Rule) XXX_Size() int { - return m.Size() -} -func (m *Rule) XXX_DiscardUnknown() { - xxx_messageInfo_Rule.DiscardUnknown(m) -} - -var xxx_messageInfo_Rule proto.InternalMessageInfo - -func (m *Rule) GetVerbs() []string { - if m != nil { - return m.Verbs - } - return nil -} - -func (m *Rule) GetResources() []string { - if m != nil { - return m.Resources - } - return nil -} - -func (m *Rule) GetResourceNames() []string { - if m != nil { - return m.ResourceNames - } - return nil -} - -// ClusterRole applies to all namespaces within a cluster. -type ClusterRole struct { - Rules []Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules"` - // Metadata contains name, namespace, labels and annotations - ObjectMeta `protobuf:"bytes,3,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterRole) Reset() { *m = ClusterRole{} } -func (m *ClusterRole) String() string { return proto.CompactTextString(m) } -func (*ClusterRole) ProtoMessage() {} -func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_69cb4f8fc3d151bb, []int{1} -} -func (m *ClusterRole) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClusterRole.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ClusterRole) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRole.Merge(m, src) -} -func (m *ClusterRole) XXX_Size() int { - return m.Size() -} -func (m *ClusterRole) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRole.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRole proto.InternalMessageInfo - -// Role applies only to a single namespace. -type Role struct { - Rules []Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules"` - // Metadata contains name, namespace, labels and annotations - ObjectMeta `protobuf:"bytes,4,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Role) Reset() { *m = Role{} } -func (m *Role) String() string { return proto.CompactTextString(m) } -func (*Role) ProtoMessage() {} -func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_69cb4f8fc3d151bb, []int{2} -} -func (m *Role) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Role.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Role) XXX_Merge(src proto.Message) { - xxx_messageInfo_Role.Merge(m, src) -} -func (m *Role) XXX_Size() int { - return m.Size() -} -func (m *Role) XXX_DiscardUnknown() { - xxx_messageInfo_Role.DiscardUnknown(m) -} - -var xxx_messageInfo_Role proto.InternalMessageInfo - -// RoleRef maps groups to Roles or ClusterRoles. -type RoleRef struct { - // Type of role being referenced. - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type"` - // Name of the resource being referenced - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RoleRef) Reset() { *m = RoleRef{} } -func (m *RoleRef) String() string { return proto.CompactTextString(m) } -func (*RoleRef) ProtoMessage() {} -func (*RoleRef) Descriptor() ([]byte, []int) { - return fileDescriptor_69cb4f8fc3d151bb, []int{3} -} -func (m *RoleRef) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RoleRef.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RoleRef) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleRef.Merge(m, src) -} -func (m *RoleRef) XXX_Size() int { - return m.Size() -} -func (m *RoleRef) XXX_DiscardUnknown() { - xxx_messageInfo_RoleRef.DiscardUnknown(m) -} - -var xxx_messageInfo_RoleRef proto.InternalMessageInfo - -func (m *RoleRef) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *RoleRef) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -type Subject struct { - // Type of object referenced (user or group) - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type"` - // Name of the referenced object - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Subject) Reset() { *m = Subject{} } -func (m *Subject) String() string { return proto.CompactTextString(m) } -func (*Subject) ProtoMessage() {} -func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_69cb4f8fc3d151bb, []int{4} -} -func (m *Subject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Subject.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Subject) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subject.Merge(m, src) -} -func (m *Subject) XXX_Size() int { - return m.Size() -} -func (m *Subject) XXX_DiscardUnknown() { - xxx_messageInfo_Subject.DiscardUnknown(m) -} - -var xxx_messageInfo_Subject proto.InternalMessageInfo - -func (m *Subject) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Subject) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -// ClusterRoleBinding grants the permissions defined in a ClusterRole referenced -// to a user or a set of users -type ClusterRoleBinding struct { - // Subjects holds references to the objects the ClusterRole applies to - Subjects []Subject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects"` - // RoleRef references a ClusterRole in the current namespace - RoleRef RoleRef `protobuf:"bytes,2,opt,name=role_ref,json=roleRef,proto3" json:"role_ref"` - // Metadata contains name, namespace, labels and annotations - ObjectMeta `protobuf:"bytes,4,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } -func (m *ClusterRoleBinding) String() string { return proto.CompactTextString(m) } -func (*ClusterRoleBinding) ProtoMessage() {} -func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_69cb4f8fc3d151bb, []int{5} -} -func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterRoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClusterRoleBinding.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ClusterRoleBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRoleBinding.Merge(m, src) -} -func (m *ClusterRoleBinding) XXX_Size() int { - return m.Size() -} -func (m *ClusterRoleBinding) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRoleBinding.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo - -// RoleBinding grants the permissions defined in a Role referenced to a user or -// a set of users -type RoleBinding struct { - // Subjects holds references to the objects the Role applies to - Subjects []Subject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects"` - // RoleRef references a Role in the current namespace - RoleRef RoleRef `protobuf:"bytes,2,opt,name=role_ref,json=roleRef,proto3" json:"role_ref"` - // Metadata contains name, namespace, labels and annotations - ObjectMeta `protobuf:"bytes,5,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RoleBinding) Reset() { *m = RoleBinding{} } -func (m *RoleBinding) String() string { return proto.CompactTextString(m) } -func (*RoleBinding) ProtoMessage() {} -func (*RoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_69cb4f8fc3d151bb, []int{6} -} -func (m *RoleBinding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RoleBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RoleBinding.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RoleBinding) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleBinding.Merge(m, src) -} -func (m *RoleBinding) XXX_Size() int { - return m.Size() -} -func (m *RoleBinding) XXX_DiscardUnknown() { - xxx_messageInfo_RoleBinding.DiscardUnknown(m) -} - -var xxx_messageInfo_RoleBinding proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Rule)(nil), "sensu.core.v2.Rule") - proto.RegisterType((*ClusterRole)(nil), "sensu.core.v2.ClusterRole") - proto.RegisterType((*Role)(nil), "sensu.core.v2.Role") - proto.RegisterType((*RoleRef)(nil), "sensu.core.v2.RoleRef") - proto.RegisterType((*Subject)(nil), "sensu.core.v2.Subject") - proto.RegisterType((*ClusterRoleBinding)(nil), "sensu.core.v2.ClusterRoleBinding") - proto.RegisterType((*RoleBinding)(nil), "sensu.core.v2.RoleBinding") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/rbac.proto", fileDescriptor_69cb4f8fc3d151bb) -} - -var fileDescriptor_69cb4f8fc3d151bb = []byte{ - // 495 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0xbd, 0x8e, 0xd3, 0x40, - 0x10, 0xce, 0xe6, 0x87, 0x4b, 0x36, 0x0a, 0x42, 0x8b, 0x84, 0xcc, 0x09, 0x79, 0xa3, 0x54, 0x91, - 0x00, 0x9b, 0xf3, 0x51, 0x00, 0x15, 0xf2, 0x41, 0x09, 0x48, 0x8b, 0x68, 0x68, 0x4e, 0xb6, 0x6f, - 0x62, 0x8c, 0xec, 0x6c, 0xb4, 0x5e, 0x5b, 0xba, 0x8e, 0x92, 0x8e, 0x96, 0xf2, 0xe8, 0xf2, 0x08, - 0x3c, 0xc2, 0x95, 0xf7, 0x04, 0x16, 0x98, 0xce, 0x4f, 0x00, 0x1d, 0xda, 0x75, 0x9c, 0x1c, 0xa1, - 0x41, 0x82, 0x14, 0x34, 0xeb, 0x9d, 0x99, 0x6f, 0xbe, 0xfd, 0xe6, 0x1b, 0xc9, 0xf8, 0x5e, 0x18, - 0xc9, 0x37, 0x99, 0x6f, 0x05, 0x3c, 0xb1, 0x53, 0x98, 0xa7, 0x59, 0x7d, 0xde, 0x0d, 0xb9, 0xed, - 0x2d, 0x22, 0x3b, 0xe0, 0x02, 0xec, 0xdc, 0xb1, 0x85, 0xef, 0x05, 0xd6, 0x42, 0x70, 0xc9, 0xc9, - 0x48, 0x03, 0x2c, 0x55, 0xb1, 0x72, 0x67, 0xff, 0xfe, 0x25, 0x82, 0x90, 0x87, 0xdc, 0xd6, 0x28, - 0x3f, 0x9b, 0x3d, 0xce, 0x0f, 0xac, 0x43, 0xeb, 0x40, 0x27, 0x75, 0x4e, 0xdf, 0x6a, 0x92, 0xfd, - 0x3f, 0x7c, 0x36, 0x01, 0xe9, 0xd5, 0x1d, 0x93, 0x0f, 0x08, 0x77, 0x59, 0x16, 0x03, 0xa1, 0xb8, - 0x97, 0x83, 0xf0, 0x53, 0x03, 0x8d, 0x3b, 0xd3, 0x81, 0x3b, 0xa8, 0x0a, 0x5a, 0x27, 0x58, 0xfd, - 0x21, 0xb7, 0xf1, 0x40, 0x40, 0xca, 0x33, 0x11, 0x40, 0x6a, 0xb4, 0x35, 0x68, 0x54, 0x15, 0x74, - 0x93, 0x64, 0x9b, 0x2b, 0x79, 0x88, 0xaf, 0x36, 0xc1, 0xf1, 0xdc, 0x4b, 0x20, 0x35, 0x3a, 0xba, - 0x83, 0x54, 0x05, 0xdd, 0xaa, 0xb0, 0x51, 0x13, 0x3f, 0x57, 0xe1, 0x64, 0x89, 0xf0, 0xf0, 0x28, - 0xce, 0x52, 0x09, 0x82, 0xf1, 0x18, 0xc8, 0x03, 0xdc, 0x13, 0x59, 0x0c, 0xb5, 0xb0, 0xa1, 0x73, - 0xdd, 0xfa, 0xc5, 0x28, 0x4b, 0x89, 0x77, 0x47, 0xe7, 0x05, 0x6d, 0x29, 0xc5, 0x1a, 0xc9, 0xea, - 0x0f, 0x79, 0x85, 0xfb, 0x6a, 0xd2, 0x13, 0x4f, 0x7a, 0x46, 0x67, 0x8c, 0xa6, 0x43, 0xe7, 0xe6, - 0x56, 0xf3, 0x0b, 0xff, 0x2d, 0x04, 0xf2, 0x19, 0x48, 0xcf, 0x35, 0x15, 0xc5, 0x45, 0x41, 0x51, - 0x55, 0x50, 0xd2, 0xb4, 0xdd, 0xe1, 0x49, 0x24, 0x21, 0x59, 0xc8, 0x53, 0xb6, 0xa6, 0x7a, 0xd4, - 0x7f, 0x7f, 0x46, 0x5b, 0xcb, 0x33, 0x8a, 0x26, 0x9f, 0x94, 0x79, 0xff, 0x4e, 0x63, 0x77, 0x17, - 0x1a, 0x9f, 0xe2, 0x3d, 0x25, 0x91, 0xc1, 0x8c, 0xdc, 0xc2, 0x5d, 0x79, 0xba, 0x00, 0x03, 0x8d, - 0xd1, 0x74, 0xe0, 0xf6, 0xab, 0x82, 0xea, 0x98, 0xe9, 0x53, 0x55, 0xd5, 0x3e, 0x8c, 0xf6, 0xa6, - 0xaa, 0x62, 0xa6, 0x4f, 0x45, 0xf3, 0x32, 0xd3, 0x4a, 0xfe, 0x8a, 0xe6, 0x5d, 0x1b, 0x93, 0x4b, - 0xcb, 0x75, 0xa3, 0xf9, 0x49, 0x34, 0x0f, 0xc9, 0x13, 0xdc, 0x4f, 0x6b, 0xf6, 0xc6, 0xc2, 0x1b, - 0x5b, 0x2e, 0xac, 0x1e, 0x77, 0xaf, 0xad, 0x5c, 0x5c, 0xe3, 0xd9, 0xfa, 0x46, 0x8e, 0x70, 0x5f, - 0xf0, 0x18, 0x8e, 0x05, 0xcc, 0xf4, 0xf3, 0xbf, 0xb3, 0xac, 0x9c, 0xd8, 0xb0, 0x34, 0x78, 0xb6, - 0x27, 0x56, 0x26, 0xed, 0x7c, 0x21, 0x3f, 0x10, 0x1e, 0xfe, 0x07, 0xb3, 0xf7, 0x76, 0x30, 0xbb, - 0x3b, 0xfe, 0xfe, 0xd5, 0x44, 0xcb, 0xd2, 0x44, 0x9f, 0x4b, 0x13, 0x9d, 0x97, 0x26, 0xba, 0x28, - 0x4d, 0xf4, 0xa5, 0x34, 0xd1, 0xc7, 0x6f, 0x66, 0xeb, 0x75, 0x3b, 0x77, 0xfc, 0x2b, 0xfa, 0xb7, - 0x74, 0xf8, 0x33, 0x00, 0x00, 0xff, 0xff, 0x88, 0xee, 0x60, 0x1d, 0x41, 0x05, 0x00, 0x00, -} - -func (this *Rule) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Rule) - if !ok { - that2, ok := that.(Rule) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Verbs) != len(that1.Verbs) { - return false - } - for i := range this.Verbs { - if this.Verbs[i] != that1.Verbs[i] { - return false - } - } - if len(this.Resources) != len(that1.Resources) { - return false - } - for i := range this.Resources { - if this.Resources[i] != that1.Resources[i] { - return false - } - } - if len(this.ResourceNames) != len(that1.ResourceNames) { - return false - } - for i := range this.ResourceNames { - if this.ResourceNames[i] != that1.ResourceNames[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ClusterRole) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ClusterRole) - if !ok { - that2, ok := that.(ClusterRole) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Rules) != len(that1.Rules) { - return false - } - for i := range this.Rules { - if !this.Rules[i].Equal(&that1.Rules[i]) { - return false - } - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Role) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Role) - if !ok { - that2, ok := that.(Role) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Rules) != len(that1.Rules) { - return false - } - for i := range this.Rules { - if !this.Rules[i].Equal(&that1.Rules[i]) { - return false - } - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RoleRef) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RoleRef) - if !ok { - that2, ok := that.(RoleRef) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - if this.Name != that1.Name { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Subject) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Subject) - if !ok { - that2, ok := that.(Subject) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - if this.Name != that1.Name { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ClusterRoleBinding) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ClusterRoleBinding) - if !ok { - that2, ok := that.(ClusterRoleBinding) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Subjects) != len(that1.Subjects) { - return false - } - for i := range this.Subjects { - if !this.Subjects[i].Equal(&that1.Subjects[i]) { - return false - } - } - if !this.RoleRef.Equal(&that1.RoleRef) { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *RoleBinding) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RoleBinding) - if !ok { - that2, ok := that.(RoleBinding) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Subjects) != len(that1.Subjects) { - return false - } - for i := range this.Subjects { - if !this.Subjects[i].Equal(&that1.Subjects[i]) { - return false - } - } - if !this.RoleRef.Equal(&that1.RoleRef) { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type ClusterRoleFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetRules() []Rule - GetObjectMeta() ObjectMeta -} - -func (this *ClusterRole) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *ClusterRole) TestProto() github_com_golang_protobuf_proto.Message { - return NewClusterRoleFromFace(this) -} - -func (this *ClusterRole) GetRules() []Rule { - return this.Rules -} - -func (this *ClusterRole) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func NewClusterRoleFromFace(that ClusterRoleFace) *ClusterRole { - this := &ClusterRole{} - this.Rules = that.GetRules() - this.ObjectMeta = that.GetObjectMeta() - return this -} - -type RoleFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetRules() []Rule - GetObjectMeta() ObjectMeta -} - -func (this *Role) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *Role) TestProto() github_com_golang_protobuf_proto.Message { - return NewRoleFromFace(this) -} - -func (this *Role) GetRules() []Rule { - return this.Rules -} - -func (this *Role) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func NewRoleFromFace(that RoleFace) *Role { - this := &Role{} - this.Rules = that.GetRules() - this.ObjectMeta = that.GetObjectMeta() - return this -} - -type ClusterRoleBindingFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetSubjects() []Subject - GetRoleRef() RoleRef - GetObjectMeta() ObjectMeta -} - -func (this *ClusterRoleBinding) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *ClusterRoleBinding) TestProto() github_com_golang_protobuf_proto.Message { - return NewClusterRoleBindingFromFace(this) -} - -func (this *ClusterRoleBinding) GetSubjects() []Subject { - return this.Subjects -} - -func (this *ClusterRoleBinding) GetRoleRef() RoleRef { - return this.RoleRef -} - -func (this *ClusterRoleBinding) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func NewClusterRoleBindingFromFace(that ClusterRoleBindingFace) *ClusterRoleBinding { - this := &ClusterRoleBinding{} - this.Subjects = that.GetSubjects() - this.RoleRef = that.GetRoleRef() - this.ObjectMeta = that.GetObjectMeta() - return this -} - -type RoleBindingFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetSubjects() []Subject - GetRoleRef() RoleRef - GetObjectMeta() ObjectMeta -} - -func (this *RoleBinding) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *RoleBinding) TestProto() github_com_golang_protobuf_proto.Message { - return NewRoleBindingFromFace(this) -} - -func (this *RoleBinding) GetSubjects() []Subject { - return this.Subjects -} - -func (this *RoleBinding) GetRoleRef() RoleRef { - return this.RoleRef -} - -func (this *RoleBinding) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func NewRoleBindingFromFace(that RoleBindingFace) *RoleBinding { - this := &RoleBinding{} - this.Subjects = that.GetSubjects() - this.RoleRef = that.GetRoleRef() - this.ObjectMeta = that.GetObjectMeta() - return this -} - -func (m *Rule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Rule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Rule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ResourceNames) > 0 { - for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ResourceNames[iNdEx]) - copy(dAtA[i:], m.ResourceNames[iNdEx]) - i = encodeVarintRbac(dAtA, i, uint64(len(m.ResourceNames[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Resources) > 0 { - for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Resources[iNdEx]) - copy(dAtA[i:], m.Resources[iNdEx]) - i = encodeVarintRbac(dAtA, i, uint64(len(m.Resources[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Verbs) > 0 { - for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Verbs[iNdEx]) - copy(dAtA[i:], m.Verbs[iNdEx]) - i = encodeVarintRbac(dAtA, i, uint64(len(m.Verbs[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ClusterRole) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterRole) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRbac(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.Rules) > 0 { - for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRbac(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Role) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Role) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Role) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRbac(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.Rules) > 0 { - for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRbac(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *RoleRef) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RoleRef) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRbac(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintRbac(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Subject) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Subject) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Subject) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRbac(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintRbac(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterRoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRbac(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.RoleRef.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRbac(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Subjects) > 0 { - for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subjects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRbac(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *RoleBinding) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRbac(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size, err := m.RoleRef.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRbac(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Subjects) > 0 { - for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subjects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRbac(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintRbac(dAtA []byte, offset int, v uint64) int { - offset -= sovRbac(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedRule(r randyRbac, easy bool) *Rule { - this := &Rule{} - v1 := r.Intn(10) - this.Verbs = make([]string, v1) - for i := 0; i < v1; i++ { - this.Verbs[i] = string(randStringRbac(r)) - } - v2 := r.Intn(10) - this.Resources = make([]string, v2) - for i := 0; i < v2; i++ { - this.Resources[i] = string(randStringRbac(r)) - } - v3 := r.Intn(10) - this.ResourceNames = make([]string, v3) - for i := 0; i < v3; i++ { - this.ResourceNames[i] = string(randStringRbac(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRbac(r, 4) - } - return this -} - -func NewPopulatedClusterRole(r randyRbac, easy bool) *ClusterRole { - this := &ClusterRole{} - if r.Intn(5) != 0 { - v4 := r.Intn(5) - this.Rules = make([]Rule, v4) - for i := 0; i < v4; i++ { - v5 := NewPopulatedRule(r, easy) - this.Rules[i] = *v5 - } - } - v6 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v6 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRbac(r, 4) - } - return this -} - -func NewPopulatedRole(r randyRbac, easy bool) *Role { - this := &Role{} - if r.Intn(5) != 0 { - v7 := r.Intn(5) - this.Rules = make([]Rule, v7) - for i := 0; i < v7; i++ { - v8 := NewPopulatedRule(r, easy) - this.Rules[i] = *v8 - } - } - v9 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v9 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRbac(r, 5) - } - return this -} - -func NewPopulatedRoleRef(r randyRbac, easy bool) *RoleRef { - this := &RoleRef{} - this.Type = string(randStringRbac(r)) - this.Name = string(randStringRbac(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRbac(r, 3) - } - return this -} - -func NewPopulatedSubject(r randyRbac, easy bool) *Subject { - this := &Subject{} - this.Type = string(randStringRbac(r)) - this.Name = string(randStringRbac(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRbac(r, 3) - } - return this -} - -func NewPopulatedClusterRoleBinding(r randyRbac, easy bool) *ClusterRoleBinding { - this := &ClusterRoleBinding{} - if r.Intn(5) != 0 { - v10 := r.Intn(5) - this.Subjects = make([]Subject, v10) - for i := 0; i < v10; i++ { - v11 := NewPopulatedSubject(r, easy) - this.Subjects[i] = *v11 - } - } - v12 := NewPopulatedRoleRef(r, easy) - this.RoleRef = *v12 - v13 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v13 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRbac(r, 5) - } - return this -} - -func NewPopulatedRoleBinding(r randyRbac, easy bool) *RoleBinding { - this := &RoleBinding{} - if r.Intn(5) != 0 { - v14 := r.Intn(5) - this.Subjects = make([]Subject, v14) - for i := 0; i < v14; i++ { - v15 := NewPopulatedSubject(r, easy) - this.Subjects[i] = *v15 - } - } - v16 := NewPopulatedRoleRef(r, easy) - this.RoleRef = *v16 - v17 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v17 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedRbac(r, 6) - } - return this -} - -type randyRbac interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneRbac(r randyRbac) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringRbac(r randyRbac) string { - v18 := r.Intn(100) - tmps := make([]rune, v18) - for i := 0; i < v18; i++ { - tmps[i] = randUTF8RuneRbac(r) - } - return string(tmps) -} -func randUnrecognizedRbac(r randyRbac, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldRbac(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldRbac(dAtA []byte, r randyRbac, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateRbac(dAtA, uint64(key)) - v19 := r.Int63() - if r.Intn(2) == 0 { - v19 *= -1 - } - dAtA = encodeVarintPopulateRbac(dAtA, uint64(v19)) - case 1: - dAtA = encodeVarintPopulateRbac(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateRbac(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateRbac(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateRbac(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateRbac(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Rule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Verbs) > 0 { - for _, s := range m.Verbs { - l = len(s) - n += 1 + l + sovRbac(uint64(l)) - } - } - if len(m.Resources) > 0 { - for _, s := range m.Resources { - l = len(s) - n += 1 + l + sovRbac(uint64(l)) - } - } - if len(m.ResourceNames) > 0 { - for _, s := range m.ResourceNames { - l = len(s) - n += 1 + l + sovRbac(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ClusterRole) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Rules) > 0 { - for _, e := range m.Rules { - l = e.Size() - n += 1 + l + sovRbac(uint64(l)) - } - } - l = m.ObjectMeta.Size() - n += 1 + l + sovRbac(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Role) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Rules) > 0 { - for _, e := range m.Rules { - l = e.Size() - n += 1 + l + sovRbac(uint64(l)) - } - } - l = m.ObjectMeta.Size() - n += 1 + l + sovRbac(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RoleRef) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovRbac(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRbac(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Subject) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovRbac(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRbac(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ClusterRoleBinding) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Subjects) > 0 { - for _, e := range m.Subjects { - l = e.Size() - n += 1 + l + sovRbac(uint64(l)) - } - } - l = m.RoleRef.Size() - n += 1 + l + sovRbac(uint64(l)) - l = m.ObjectMeta.Size() - n += 1 + l + sovRbac(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RoleBinding) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Subjects) > 0 { - for _, e := range m.Subjects { - l = e.Size() - n += 1 + l + sovRbac(uint64(l)) - } - } - l = m.RoleRef.Size() - n += 1 + l + sovRbac(uint64(l)) - l = m.ObjectMeta.Size() - n += 1 + l + sovRbac(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRbac(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRbac(x uint64) (n int) { - return sovRbac(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Rule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Rule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRbac(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRbac - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterRole) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rules = append(m.Rules, Rule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRbac(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRbac - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Role) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Role: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rules = append(m.Rules, Rule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRbac(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRbac - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RoleRef) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RoleRef: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRbac(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRbac - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Subject) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Subject: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRbac(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRbac - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subjects = append(m.Subjects, Subject{}) - if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRbac(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRbac - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RoleBinding) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subjects = append(m.Subjects, Subject{}) - if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRbac - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRbac - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRbac - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRbac(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRbac - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRbac(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRbac - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRbac - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRbac - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthRbac - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupRbac - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthRbac - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthRbac = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRbac = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupRbac = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/rbac.proto b/api/core/v2/rbac.proto deleted file mode 100644 index b63c33e077..0000000000 --- a/api/core/v2/rbac.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// Rule holds information that describes an action that can be taken -message Rule { - // Verbs is a list of verbs that apply to all of the listed resources for - // this rule. These include "get", "list", "watch", "create", "update", - // "delete". - // TODO: add support for "patch" (this is expensive and should be delayed - // until a further release). TODO: add support for "watch" (via websockets) - repeated string verbs = 1 [ (gogoproto.jsontag) = "verbs" ]; - - // Resources is a list of resources that this rule applies to. "*" - // represents all resources. - repeated string resources = 2 [ (gogoproto.jsontag) = "resources" ]; - - // ResourceNames is an optional list of resource names that the rule applies - // to. - repeated string resource_names = 3 [ (gogoproto.jsontag) = "resource_names" ]; -} - -// ClusterRole applies to all namespaces within a cluster. -message ClusterRole { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - repeated Rule rules = 1 [ (gogoproto.jsontag) = "rules", (gogoproto.nullable) = false ]; - - // Metadata contains name, namespace, labels and annotations - ObjectMeta metadata = 3 [ (gogoproto.embed) = true, (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.nullable) = false ]; -} - -// Role applies only to a single namespace. -message Role { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - repeated Rule rules = 1 [ (gogoproto.jsontag) = "rules", (gogoproto.nullable) = false ]; - - // Metadata contains name, namespace, labels and annotations - ObjectMeta metadata = 4 [ (gogoproto.embed) = true, (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.nullable) = false ]; -} - -// RoleRef maps groups to Roles or ClusterRoles. -message RoleRef { - // Type of role being referenced. - string type = 1 [ (gogoproto.jsontag) = "type" ]; - - // Name of the resource being referenced - string name = 2 [ (gogoproto.jsontag) = "name" ]; -} - -message Subject { - // Type of object referenced (user or group) - string type = 1 [ (gogoproto.jsontag) = "type" ]; - - // Name of the referenced object - string name = 2 [ (gogoproto.jsontag) = "name" ]; -} - -// ClusterRoleBinding grants the permissions defined in a ClusterRole referenced -// to a user or a set of users -message ClusterRoleBinding { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Subjects holds references to the objects the ClusterRole applies to - repeated Subject subjects = 1 [ (gogoproto.jsontag) = "subjects", (gogoproto.nullable) = false ]; - - // RoleRef references a ClusterRole in the current namespace - RoleRef role_ref = 2 [ (gogoproto.jsontag) = "role_ref", (gogoproto.nullable) = false ]; - - // Metadata contains name, namespace, labels and annotations - ObjectMeta metadata = 4 [ (gogoproto.embed) = true, (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.nullable) = false ]; -} - -// RoleBinding grants the permissions defined in a Role referenced to a user or -// a set of users -message RoleBinding { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Subjects holds references to the objects the Role applies to - repeated Subject subjects = 1 [ (gogoproto.jsontag) = "subjects", (gogoproto.nullable) = false ]; - - // RoleRef references a Role in the current namespace - RoleRef role_ref = 2 [ (gogoproto.jsontag) = "role_ref", (gogoproto.nullable) = false ]; - - // Metadata contains name, namespace, labels and annotations - ObjectMeta metadata = 5 [ (gogoproto.embed) = true, (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.nullable) = false ]; -} diff --git a/api/core/v2/rbac_test.go b/api/core/v2/rbac_test.go deleted file mode 100644 index 892ef32cc4..0000000000 --- a/api/core/v2/rbac_test.go +++ /dev/null @@ -1,458 +0,0 @@ -package v2 - -import ( - "reflect" - "testing" -) - -func TestRuleResourceMatches(t *testing.T) { - tests := []struct { - name string - resources []string - requestedResource string - want bool - }{ - { - name: "empty rule resources", - requestedResource: "checks", - want: false, - }, - { - name: "all resources", - resources: []string{ResourceAll}, - requestedResource: "checks", - want: true, - }, - { - name: "does not match", - resources: []string{"checks"}, - requestedResource: "events", - want: false, - }, - { - name: "matches", - resources: []string{"checks", "events"}, - requestedResource: "events", - want: true, - }, - } - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - r := Rule{ - Resources: tc.resources, - } - if got := r.ResourceMatches(tc.requestedResource); got != tc.want { - t.Errorf("Rule.ResourceMatches() = %v, want %v", got, tc.want) - } - }) - } -} - -func TestRuleResourceNameMatches(t *testing.T) { - tests := []struct { - name string - resourceNames []string - requestedResourceName string - want bool - }{ - { - name: "rule allows all names", - requestedResourceName: "checks", - want: true, - }, - { - name: "rule only allows a specific name none specified in req", - resourceNames: []string{"foo"}, - want: false, - }, - { - name: "does not match", - resourceNames: []string{"foo"}, - requestedResourceName: "bar", - want: false, - }, - { - name: "matches", - resourceNames: []string{"foo", "bar"}, - requestedResourceName: "bar", - want: true, - }, - } - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - r := Rule{ - ResourceNames: tc.resourceNames, - } - if got := r.ResourceNameMatches(tc.requestedResourceName); got != tc.want { - t.Errorf("Rule.ResourceNameMatches() = %v, want %v", got, tc.want) - } - }) - } -} - -func TestRuleVerbMatches(t *testing.T) { - tests := []struct { - name string - verbs []string - requestedVerb string - want bool - }{ - { - name: "empty rule verbs", - requestedVerb: "get", - want: false, - }, - { - name: "all verbs", - verbs: []string{VerbAll}, - requestedVerb: "get", - want: true, - }, - { - name: "does not match", - verbs: []string{"create"}, - requestedVerb: "get", - want: false, - }, - { - name: "matches", - verbs: []string{"create", "get"}, - requestedVerb: "get", - want: true, - }, - } - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - r := Rule{ - Verbs: tc.verbs, - } - if got := r.VerbMatches(tc.requestedVerb); got != tc.want { - t.Errorf("Rule.VerbMatches() = %v, want %v", got, tc.want) - } - }) - } -} - -func Test_validateVerbs(t *testing.T) { - tests := []struct { - name string - verbs []string - wantErr bool - }{ - { - name: "verb all", - verbs: []string{VerbAll}, - wantErr: false, - }, - { - name: "read-only verbs", - verbs: []string{"get", "list"}, - wantErr: false, - }, - { - name: "invalid verbs", - verbs: []string{"get", "put"}, - wantErr: true, - }, - { - name: "explicit verbs", - verbs: []string{"get", "list", "create", "update", "delete"}, - wantErr: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if err := validateVerbs(tt.verbs); (err != nil) != tt.wantErr { - t.Errorf("validateVerbs() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} - -func Test_split(t *testing.T) { - tests := []struct { - name string - list []string - want []string - }{ - { - name: "single verb", - list: []string{VerbAll}, - want: []string{VerbAll}, - }, - { - name: "multiple verbs in single string", - list: []string{"get,list,create"}, - want: []string{"get", "list", "create"}, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := split(tt.list); !reflect.DeepEqual(got, tt.want) { - t.Errorf("splitVerbs() = %v, want %v", got, tt.want) - } - }) - } -} - -func TestValidateSubjects(t *testing.T) { - tests := []struct { - Name string - ExpErr bool - Subjects []Subject - WantSubjects []Subject - }{ - { - Name: "valid", - Subjects: []Subject{ - { - Type: UserType, - Name: "eric", - }, - }, - }, - { - Name: "missing type", - Subjects: []Subject{ - { - Name: "eric", - }, - }, - ExpErr: true, - }, - { - Name: "missing name", - Subjects: []Subject{ - { - Type: UserType, - }, - }, - ExpErr: true, - }, - { - Name: "invalid type", - Subjects: []Subject{ - { - Name: "eric", - Type: "#$*@$*@^#$*", - }, - }, - ExpErr: true, - }, - { - Name: "one valid, one invalid", - Subjects: []Subject{ - { - Type: UserType, - Name: "eric", - }, - { - Type: UserType, - }, - }, - ExpErr: true, - }, - { - Name: "at least one subject is required", - Subjects: []Subject{}, - ExpErr: true, - }, - { - Name: "spaces in name are authorized", - Subjects: []Subject{ - { - Type: "Group", - Name: "foo bar", - }, - }, - ExpErr: false, - }, - { - Name: "subject types are capitalized", - Subjects: []Subject{ - { - Type: "group", - Name: "foo", - }, - }, - WantSubjects: []Subject{ - { - Type: "Group", - Name: "foo", - }, - }, - ExpErr: false, - }, - } - for _, test := range tests { - t.Run(test.Name+"_ValidateSubjects", func(t *testing.T) { - got, err := ValidateSubjects(test.Subjects) - if (err != nil) != test.ExpErr { - t.Errorf("ValidateSubjects() error = %v, ExpErr %v", err, test.ExpErr) - } - - if test.WantSubjects != nil { - if !reflect.DeepEqual(got, test.WantSubjects) { - t.Errorf("ValidateSubjects() = %v, want %v", got, test.WantSubjects) - } - } - }) - - t.Run(test.Name+"_RoleBinding", func(t *testing.T) { - crb := FixtureClusterRoleBinding("b") - crb.Subjects = test.Subjects - if err := crb.Validate(); (err != nil) != test.ExpErr { - t.Errorf("ClusterRoleBinding.Validate() error = %v, ExpErr %v", err, test.ExpErr) - } - }) - - t.Run(test.Name+"_ClusterRoleBinding", func(t *testing.T) { - rb := FixtureRoleBinding("a", "b") - rb.Subjects = test.Subjects - if err := rb.Validate(); (err != nil) != test.ExpErr { - t.Errorf("RoleBinding.Validate() error = %v, ExpErr %v", err, test.ExpErr) - } - - }) - } -} - -func TestClusterRoleBindingValidateSub(t *testing.T) { - crb := FixtureClusterRoleBinding("a") - if err := crb.Validate(); err != nil { - t.Fatal(err) - } -} - -func TestValidateRoleRef(t *testing.T) { - tests := []struct { - name string - roleRef RoleRef - want RoleRef - wantErr bool - }{ - { - name: "invalid type returns an error", - roleRef: RoleRef{Type: "foo"}, - wantErr: true, - }, - { - name: "types are capitalized", - roleRef: RoleRef{Type: "role", Name: "foo"}, - want: RoleRef{Type: RoleType, Name: "foo"}, - }, - { - name: "role name is required", - roleRef: RoleRef{Type: RoleType}, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - roleRef := tt.roleRef - if err := ValidateRoleRef(&roleRef); (err != nil) != tt.wantErr { - t.Errorf("ValidateRoleRef() error = %v, wantErr %v", err, tt.wantErr) - } - - if !tt.wantErr && !reflect.DeepEqual(roleRef, tt.want) { - t.Errorf("ValidateRoleRef() = %v, want %v", roleRef, tt.want) - } - }) - } -} - -func TestRoleFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureRole("contoso", "default"), - wantKey: "role.name", - want: "contoso", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("Role.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} - -func TestRoleBindingFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureRoleBinding("contoso", "default"), - wantKey: "rolebinding.name", - want: "contoso", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("RoleBinding.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} - -func TestClusterRoleFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureClusterRole("contoso"), - wantKey: "clusterrole.name", - want: "contoso", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("ClusterRole.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} - -func TestClusterRoleBindingFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureClusterRoleBinding("contoso"), - wantKey: "clusterrolebinding.name", - want: "contoso", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("ClusterRoleBinding.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/rbacpb_test.go b/api/core/v2/rbacpb_test.go deleted file mode 100644 index 3d9c9d9bd0..0000000000 --- a/api/core/v2/rbacpb_test.go +++ /dev/null @@ -1,923 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/rbac.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestRuleProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRule(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Rule{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRuleMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRule(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Rule{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestClusterRoleProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRole(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ClusterRole{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestClusterRoleMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRole(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ClusterRole{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRoleProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRole(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Role{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRoleMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRole(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Role{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRoleRefProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleRef(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RoleRef{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRoleRefMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleRef(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RoleRef{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubjectProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubject(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subject{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubjectMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubject(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subject{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestClusterRoleBindingProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRoleBinding(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ClusterRoleBinding{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestClusterRoleBindingMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRoleBinding(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ClusterRoleBinding{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRoleBindingProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleBinding(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RoleBinding{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRoleBindingMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleBinding(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RoleBinding{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRuleJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRule(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Rule{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestClusterRoleJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRole(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ClusterRole{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRoleJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRole(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Role{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRoleRefJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleRef(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RoleRef{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSubjectJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubject(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subject{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestClusterRoleBindingJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRoleBinding(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ClusterRoleBinding{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRoleBindingJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleBinding(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RoleBinding{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRuleProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRule(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Rule{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRuleProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRule(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Rule{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestClusterRoleProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRole(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &ClusterRole{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestClusterRoleProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRole(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &ClusterRole{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRoleProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRole(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Role{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRoleProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRole(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Role{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRoleRefProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleRef(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &RoleRef{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRoleRefProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleRef(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &RoleRef{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubjectProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubject(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Subject{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSubjectProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubject(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Subject{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestClusterRoleBindingProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRoleBinding(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &ClusterRoleBinding{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestClusterRoleBindingProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRoleBinding(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &ClusterRoleBinding{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRoleBindingProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleBinding(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &RoleBinding{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRoleBindingProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleBinding(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &RoleBinding{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestClusterRoleFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedClusterRole(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestRoleFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRole(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestClusterRoleBindingFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedClusterRoleBinding(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestRoleBindingFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRoleBinding(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestRuleSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRule(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestClusterRoleSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRole(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestRoleSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRole(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestRoleRefSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleRef(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestSubjectSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSubject(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestClusterRoleBindingSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedClusterRoleBinding(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestRoleBindingSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRoleBinding(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/resource.go b/api/core/v2/resource.go deleted file mode 100644 index fcef3f8a49..0000000000 --- a/api/core/v2/resource.go +++ /dev/null @@ -1,25 +0,0 @@ -package v2 - -// Resource represents a Sensu resource. -type Resource interface { - // GetObjectMeta returns the object metadata for the resource. - GetObjectMeta() ObjectMeta - - // SetObjectMeta sets the object metadata for the resource. - SetObjectMeta(ObjectMeta) - - // SetNamespace sets the namespace of the resource. - SetNamespace(string) - - // StorePrefix gives the path prefix to this resource in the store - StorePrefix() string - - // RBACName describes the name of the resource for RBAC purposes. - RBACName() string - - // URIPath gives the path to the resource, e.g. /checks/checkname - URIPath() string - - // Validate checks if the fields in the resource are valid. - Validate() error -} diff --git a/api/core/v2/resource_reference.go b/api/core/v2/resource_reference.go deleted file mode 100644 index 649e5b5b4d..0000000000 --- a/api/core/v2/resource_reference.go +++ /dev/null @@ -1,61 +0,0 @@ -package v2 - -import ( - "errors" - "fmt" - "regexp" -) - -var errResourceRefFmt = errors.New("resource reference string must be in format api_version.type.name") - -// Validate checks if a resource reference resource passes validation rules. -func (r *ResourceReference) Validate() error { - if err := ValidateName(r.Name); err != nil { - return errors.New("name " + err.Error()) - } - - if r.Type == "" { - return errors.New("type must be set") - } - - if r.APIVersion == "" { - return errors.New("api_version must be set") - } - - return nil -} - -// ResourceID returns a string that uniquely identifies a ResourceReference -// in the format: APIVersion.Type(Name=%s) -func (r *ResourceReference) ResourceID() string { - return fmt.Sprintf("%s.%s(Name=%s)", r.APIVersion, r.Type, r.Name) -} - -func (r *ResourceReference) StringRef() string { - return fmt.Sprintf("%s.%s.%s", r.APIVersion, r.Type, r.Name) -} - -var resourceRefRE = regexp.MustCompile(`(\w+\/v\d+)\.(\w+)(?:\.|\s+)([\w\.\-\:]+)`) - -func FromStringRef(s string) (*ResourceReference, error) { - var ref ResourceReference - groups := resourceRefRE.FindStringSubmatch(s) - if len(groups) != 4 { - return nil, errResourceRefFmt - } - ref.APIVersion = groups[1] - ref.Type = groups[2] - ref.Name = groups[3] - return &ref, nil -} - -// LogFields returns a map of field names to values which represent a -// ResourceReference. -func (r *ResourceReference) LogFields(debug bool) map[string]interface{} { - fields := map[string]interface{}{ - "api_version": r.APIVersion, - "type": r.Type, - "name": r.Name, - } - return fields -} diff --git a/api/core/v2/resource_reference.pb.go b/api/core/v2/resource_reference.pb.go deleted file mode 100644 index af3ba70e23..0000000000 --- a/api/core/v2/resource_reference.pb.go +++ /dev/null @@ -1,560 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/resource_reference.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// ResourceReference represents a reference to another resource. -//sensu:nogen -type ResourceReference struct { - // Name is the name of the resource to reference. - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"name" yaml: "name"` - // Type is the name of the data type of the resource to reference. - Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"type" yaml: "type"` - // APIVersion is the API version of the resource to reference. - APIVersion string `protobuf:"bytes,3,opt,name=APIVersion,proto3" json:"api_version" yaml: "api_version"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResourceReference) Reset() { *m = ResourceReference{} } -func (m *ResourceReference) String() string { return proto.CompactTextString(m) } -func (*ResourceReference) ProtoMessage() {} -func (*ResourceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_5b6394e8c21b23aa, []int{0} -} -func (m *ResourceReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceReference.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceReference.Merge(m, src) -} -func (m *ResourceReference) XXX_Size() int { - return m.Size() -} -func (m *ResourceReference) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceReference.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceReference proto.InternalMessageInfo - -func (m *ResourceReference) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ResourceReference) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *ResourceReference) GetAPIVersion() string { - if m != nil { - return m.APIVersion - } - return "" -} - -func init() { - proto.RegisterType((*ResourceReference)(nil), "sensu.core.v2.ResourceReference") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/resource_reference.proto", fileDescriptor_5b6394e8c21b23aa) -} - -var fileDescriptor_5b6394e8c21b23aa = []byte{ - // 280 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4b, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0x45, 0xa9, - 0xc5, 0xf9, 0xa5, 0x45, 0xc9, 0xa9, 0xf1, 0x45, 0xa9, 0x69, 0xa9, 0x45, 0xa9, 0x79, 0xc9, 0xa9, - 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, 0xe5, 0x7a, 0x20, 0x75, 0x7a, 0x65, 0x46, - 0x52, 0x26, 0x48, 0xc6, 0xa5, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x25, 0x95, 0xa6, 0x39, 0x94, - 0x19, 0xea, 0x19, 0xeb, 0x19, 0x82, 0x05, 0xc1, 0x62, 0x60, 0x16, 0xc4, 0x10, 0xa5, 0xed, 0x8c, - 0x5c, 0x82, 0x41, 0x50, 0x1b, 0x82, 0x60, 0x16, 0x08, 0xe9, 0x70, 0xb1, 0xf8, 0x25, 0xe6, 0xa6, - 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x3a, 0x49, 0xbc, 0xba, 0x27, 0xcf, 0x92, 0x97, 0x98, 0x9b, - 0xfa, 0xe9, 0x9e, 0x3c, 0x4f, 0x65, 0x62, 0x6e, 0x8e, 0x95, 0x82, 0x12, 0x88, 0xab, 0x14, 0x04, - 0x56, 0x05, 0x52, 0x1d, 0x52, 0x59, 0x90, 0x2a, 0xc1, 0x84, 0x50, 0x5d, 0x52, 0x59, 0x80, 0xac, - 0x1a, 0xc4, 0x55, 0x0a, 0x02, 0xab, 0x12, 0x72, 0xe3, 0xe2, 0x72, 0x0c, 0xf0, 0x0c, 0x4b, 0x2d, - 0x2a, 0xce, 0xcc, 0xcf, 0x93, 0x60, 0x06, 0xeb, 0x51, 0x7b, 0x75, 0x4f, 0x9e, 0x3b, 0xb1, 0x20, - 0x33, 0xbe, 0x0c, 0x22, 0xfc, 0xe9, 0x9e, 0xbc, 0x30, 0x54, 0x2b, 0x92, 0xa8, 0x52, 0x10, 0x92, - 0x4e, 0x27, 0x85, 0x1f, 0x0f, 0xe5, 0x18, 0x57, 0x3c, 0x92, 0x63, 0xdc, 0xf1, 0x48, 0x8e, 0xf1, - 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf1, 0x58, 0x8e, - 0x21, 0x8a, 0xa9, 0xcc, 0x28, 0x89, 0x0d, 0xec, 0x45, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xe7, 0x3b, 0xe1, 0x2d, 0x69, 0x01, 0x00, 0x00, -} - -func (this *ResourceReference) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ResourceReference) - if !ok { - that2, ok := that.(ResourceReference) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Type != that1.Type { - return false - } - if this.APIVersion != that1.APIVersion { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *ResourceReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.APIVersion) > 0 { - i -= len(m.APIVersion) - copy(dAtA[i:], m.APIVersion) - i = encodeVarintResourceReference(dAtA, i, uint64(len(m.APIVersion))) - i-- - dAtA[i] = 0x1a - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintResourceReference(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintResourceReference(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintResourceReference(dAtA []byte, offset int, v uint64) int { - offset -= sovResourceReference(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedResourceReference(r randyResourceReference, easy bool) *ResourceReference { - this := &ResourceReference{} - this.Name = string(randStringResourceReference(r)) - this.Type = string(randStringResourceReference(r)) - this.APIVersion = string(randStringResourceReference(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedResourceReference(r, 4) - } - return this -} - -type randyResourceReference interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneResourceReference(r randyResourceReference) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringResourceReference(r randyResourceReference) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneResourceReference(r) - } - return string(tmps) -} -func randUnrecognizedResourceReference(r randyResourceReference, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldResourceReference(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldResourceReference(dAtA []byte, r randyResourceReference, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateResourceReference(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateResourceReference(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateResourceReference(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateResourceReference(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateResourceReference(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateResourceReference(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateResourceReference(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *ResourceReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovResourceReference(uint64(l)) - } - l = len(m.Type) - if l > 0 { - n += 1 + l + sovResourceReference(uint64(l)) - } - l = len(m.APIVersion) - if l > 0 { - n += 1 + l + sovResourceReference(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovResourceReference(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozResourceReference(x uint64) (n int) { - return sovResourceReference(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ResourceReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResourceReference - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResourceReference - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResourceReference - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResourceReference - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResourceReference - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResourceReference - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResourceReference - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResourceReference - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthResourceReference - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthResourceReference - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipResourceReference(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResourceReference - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipResourceReference(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResourceReference - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResourceReference - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResourceReference - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthResourceReference - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupResourceReference - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthResourceReference - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthResourceReference = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowResourceReference = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupResourceReference = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/resource_reference.proto b/api/core/v2/resource_reference.proto deleted file mode 100644 index a1eadfb115..0000000000 --- a/api/core/v2/resource_reference.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// ResourceReference represents a reference to another resource. -//sensu:nogen -message ResourceReference { - // Name is the name of the resource to reference. - string Name = 1 [ (gogoproto.jsontag) = "name", (gogoproto.moretags) = "yaml: \"name\"" ]; - - // Type is the name of the data type of the resource to reference. - string Type = 2 [ (gogoproto.jsontag) = "type", (gogoproto.moretags) = "yaml: \"type\"" ]; - - // APIVersion is the API version of the resource to reference. - string APIVersion = 3 [ (gogoproto.jsontag) = "api_version", (gogoproto.moretags) = "yaml: \"api_version\"" ]; -} diff --git a/api/core/v2/resource_reference_test.go b/api/core/v2/resource_reference_test.go deleted file mode 100644 index e49f0c9146..0000000000 --- a/api/core/v2/resource_reference_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package v2 - -import testing "testing" - -func TestStringRef(t *testing.T) { - testCases := []struct { - Input string - ExpectError bool - ExpectedVersion string - ExpectedType string - ExpectedName string - }{ - { - Input: "core/v2.Pipeline.testcase", - ExpectedVersion: "core/v2", - ExpectedType: "Pipeline", - ExpectedName: "testcase", - }, { - Input: "core/v2.Pipeline testcase", - ExpectedVersion: "core/v2", - ExpectedType: "Pipeline", - ExpectedName: "testcase", - }, { - Input: "core/v2000.X testcase", - ExpectedVersion: "core/v2000", - ExpectedType: "X", - ExpectedName: "testcase", - }, { - Input: "core/v2.X test-case_123:A.b.C", - ExpectedVersion: "core/v2", - ExpectedType: "X", - ExpectedName: "test-case_123:A.b.C", - }, { - Input: "api_version/v0.type.testcase", - ExpectedVersion: "api_version/v0", - ExpectedType: "type", - ExpectedName: "testcase", - }, { - Input: "api_version.type.testcase", - ExpectError: true, - }, { - Input: "a/v1..", - ExpectError: true, - }, { - Input: "foo", - ExpectError: true, - }, - } - - for _, tc := range testCases { - actual, err := FromStringRef(tc.Input) - if err != nil { - if !tc.ExpectError { - t.Errorf("unexpected error for input %v: %v", tc.Input, err) - } - continue - } else if tc.ExpectError { - t.Errorf("expected error for input %v", tc.Input) - continue - } - - if actual.GetAPIVersion() != tc.ExpectedVersion { - t.Errorf("expected %v, got %v", tc.ExpectedVersion, actual.GetAPIVersion()) - } - if actual.GetType() != tc.ExpectedType { - t.Errorf("expected %v, got %v", tc.ExpectedType, actual.GetType()) - } - if actual.GetName() != tc.ExpectedName { - t.Errorf("expected %v, got %v", tc.ExpectedName, actual.GetName()) - } - } -} diff --git a/api/core/v2/resource_referencepb_test.go b/api/core/v2/resource_referencepb_test.go deleted file mode 100644 index 34d94225b3..0000000000 --- a/api/core/v2/resource_referencepb_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/resource_reference.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestResourceReferenceProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceReference(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ResourceReference{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestResourceReferenceMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceReference(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ResourceReference{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestResourceReferenceJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceReference(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ResourceReference{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestResourceReferenceProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceReference(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &ResourceReference{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestResourceReferenceProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceReference(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &ResourceReference{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestResourceReferenceSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedResourceReference(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/secret.pb.go b/api/core/v2/secret.pb.go deleted file mode 100644 index 68c8cf8fe5..0000000000 --- a/api/core/v2/secret.pb.go +++ /dev/null @@ -1,515 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/secret.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// A Secret is a secret specification. -type Secret struct { - // Name is the name of the secret referenced in an executable command. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Secret is the name of the Sensu secret resource. - Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Secret) Reset() { *m = Secret{} } -func (m *Secret) String() string { return proto.CompactTextString(m) } -func (*Secret) ProtoMessage() {} -func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_e07a84dc55bcac64, []int{0} -} -func (m *Secret) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Secret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Secret.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Secret) XXX_Merge(src proto.Message) { - xxx_messageInfo_Secret.Merge(m, src) -} -func (m *Secret) XXX_Size() int { - return m.Size() -} -func (m *Secret) XXX_DiscardUnknown() { - xxx_messageInfo_Secret.DiscardUnknown(m) -} - -var xxx_messageInfo_Secret proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Secret)(nil), "sensu.core.v2.Secret") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/secret.proto", fileDescriptor_e07a84dc55bcac64) -} - -var fileDescriptor_e07a84dc55bcac64 = []byte{ - // 208 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4a, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0xc5, 0xa9, - 0xc9, 0x45, 0xa9, 0x25, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, 0x25, 0x7a, 0x20, - 0x39, 0xbd, 0x32, 0x23, 0x29, 0x13, 0x24, 0x23, 0xd2, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xaa, 0x92, - 0x4a, 0xd3, 0x1c, 0xca, 0x0c, 0xf5, 0x8c, 0xf5, 0x0c, 0xc1, 0x82, 0x60, 0x31, 0x30, 0x0b, 0x62, - 0x88, 0x94, 0x01, 0x71, 0x16, 0xe7, 0xa6, 0x96, 0x24, 0x42, 0x74, 0x28, 0xd9, 0x71, 0xb1, 0x05, - 0x83, 0x9d, 0x21, 0x24, 0xc4, 0xc5, 0x92, 0x97, 0x98, 0x9b, 0x2a, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, - 0x19, 0x04, 0x66, 0x0b, 0x89, 0x71, 0xb1, 0x41, 0x1c, 0x29, 0xc1, 0x04, 0x16, 0x85, 0xf2, 0xac, - 0x38, 0x3a, 0x16, 0xc8, 0x33, 0xac, 0x58, 0x20, 0xcf, 0xe8, 0xa4, 0xf0, 0xe3, 0xa1, 0x1c, 0xe3, - 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, - 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x33, 0x1e, 0xcb, 0x31, 0x44, 0x31, 0x95, 0x19, 0x25, 0xb1, 0x81, - 0x2d, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x98, 0x51, 0xa9, 0x15, 0x01, 0x00, 0x00, -} - -func (this *Secret) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Secret) - if !ok { - that2, ok := that.(Secret) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Secret != that1.Secret { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type SecretFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetName() string - GetSecret() string -} - -func (this *Secret) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *Secret) TestProto() github_com_golang_protobuf_proto.Message { - return NewSecretFromFace(this) -} - -func (this *Secret) GetName() string { - return this.Name -} - -func (this *Secret) GetSecret() string { - return this.Secret -} - -func NewSecretFromFace(that SecretFace) *Secret { - this := &Secret{} - this.Name = that.GetName() - this.Secret = that.GetSecret() - return this -} - -func (m *Secret) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Secret) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Secret) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Secret) > 0 { - i -= len(m.Secret) - copy(dAtA[i:], m.Secret) - i = encodeVarintSecret(dAtA, i, uint64(len(m.Secret))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSecret(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintSecret(dAtA []byte, offset int, v uint64) int { - offset -= sovSecret(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedSecret(r randySecret, easy bool) *Secret { - this := &Secret{} - this.Name = string(randStringSecret(r)) - this.Secret = string(randStringSecret(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedSecret(r, 3) - } - return this -} - -type randySecret interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneSecret(r randySecret) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringSecret(r randySecret) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneSecret(r) - } - return string(tmps) -} -func randUnrecognizedSecret(r randySecret, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldSecret(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldSecret(dAtA []byte, r randySecret, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateSecret(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateSecret(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateSecret(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateSecret(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateSecret(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateSecret(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateSecret(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Secret) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovSecret(uint64(l)) - } - l = len(m.Secret) - if l > 0 { - n += 1 + l + sovSecret(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovSecret(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSecret(x uint64) (n int) { - return sovSecret(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Secret) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSecret - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Secret: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Secret: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSecret - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSecret - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSecret - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSecret - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSecret - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSecret - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secret = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSecret(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSecret - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSecret(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSecret - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSecret - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSecret - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSecret - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSecret - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSecret - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSecret = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSecret = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSecret = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/secret.proto b/api/core/v2/secret.proto deleted file mode 100644 index c70b57e09c..0000000000 --- a/api/core/v2/secret.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// A Secret is a secret specification. -message Secret { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Name is the name of the secret referenced in an executable command. - string name = 1; - - // Secret is the name of the Sensu secret resource. - string secret = 2; -} diff --git a/api/core/v2/secretpb_test.go b/api/core/v2/secretpb_test.go deleted file mode 100644 index 698f80da6b..0000000000 --- a/api/core/v2/secretpb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/secret.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSecretProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSecret(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Secret{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSecretMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSecret(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Secret{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSecretJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSecret(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Secret{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSecretProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSecret(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Secret{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSecretProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSecret(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Secret{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSecretFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSecret(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestSecretSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSecret(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/silenced.go b/api/core/v2/silenced.go deleted file mode 100644 index 7e4b9feaa5..0000000000 --- a/api/core/v2/silenced.go +++ /dev/null @@ -1,221 +0,0 @@ -package v2 - -import ( - "context" - "errors" - "fmt" - "net/url" - "path" - "sort" - "strconv" - "strings" - "time" - - stringsutil "github.com/sensu/sensu-go/api/core/v2/internal/stringutil" -) - -const ( - // SilencedResource is the name of this resource type - SilencedResource = "silenced" -) - -// StorePrefix returns the path prefix to this resource in the store -func (s *Silenced) StorePrefix() string { - return SilencedResource -} - -// URIPath returns the path component of a silenced entry URI. -func (s *Silenced) URIPath() string { - if s.Name == "" { - s.Name, _ = SilencedName(s.Subscription, s.Check) - } - if s.Namespace == "" { - return path.Join(URLPrefix, SilencedResource, url.PathEscape(s.Name)) - } - return path.Join(URLPrefix, "namespaces", url.PathEscape(s.Namespace), SilencedResource, url.PathEscape(s.Name)) -} - -// Validate returns an error if the CheckName and Subscription fields are not -// provided. -func (s *Silenced) Validate() error { - if (s.Subscription == "" && s.Check == "") || (s.Subscription == "*" && s.Check == "*") { - return errors.New("must provide check or subscription") - } - if s.Subscription != "" && s.Subscription != "*" { - if err := ValidateSubscriptionName(s.Subscription); err != nil { - return fmt.Errorf("Subscription %s", err) - } - } - if s.Check != "" && s.Check != "*" { - if err := ValidateName(s.Check); err != nil { - return fmt.Errorf("Check %s", err) - } - } - return nil -} - -// StartSilence returns true if the given unix timestamp is equal to or occurs -// after the Silence's start time. -// -// Deprecated: To be removed in a future release, please simply use the Begin -// field. -func (s *Silenced) StartSilence(t int64) bool { - return t >= s.Begin -} - -// Prepare prepares a silenced entry for storage -func (s *Silenced) Prepare(ctx context.Context) { - // Populate newSilence.Name with the subscription and checkName. Substitute a - // splat if one of the values does not exist. If both values are empty, the - // validator will return an error when attempting to update it in the store. - s.Name, _ = SilencedName(s.Subscription, s.Check) - - // If begin timestamp was not already provided set it to the current time. - if s.Begin == 0 { - s.Begin = time.Now().Unix() - } - - // Retrieve the subject of the JWT, which represents the logged on user, in - // order to set it as the creator of the silenced entry - if value := ctx.Value(ClaimsKey); value != nil { - claims, ok := value.(*Claims) - if ok { - s.Creator = claims.Subject - } - } -} - -// Matches returns true if the given check name and subscription match the silence. -// -// The two properties compared, Subscription and Check, are only compared if they are -// not empty. An empty value for either of those fields is considered a wildcard, -// ie: s.Check = "foo" && s.Subscription = "" will return true for s.Matches("foo", ). -func (s *Silenced) Matches(check, subscription string) bool { - if s == nil { - return false - } - - if !stringsutil.InArray(s.Subscription, []string{"*", subscription}) && s.Subscription != "" { - return false - } - - if !stringsutil.InArray(s.Check, []string{"*", check}) && s.Check != "" { - return false - } - - return true -} - -// NewSilenced creates a new Silenced entry. -func NewSilenced(meta ObjectMeta) *Silenced { - return &Silenced{ObjectMeta: meta} -} - -// FixtureSilenced returns a testing fixture for a Silenced event struct. -func FixtureSilenced(name string) *Silenced { - var check, subscription string - - parts := strings.Split(name, ":") - - if len(parts) == 2 { - check = parts[1] - subscription = parts[0] - } else if len(parts) == 3 { - check = parts[2] - subscription = strings.Join(parts[0:2], ":") - } else { - panic("invalid silenced name") - } - - return &Silenced{ - Check: check, - Subscription: subscription, - ObjectMeta: NewObjectMeta(name, "default"), - } -} - -// SilencedName returns the canonical name for a silenced entry. It returns non-nil -// error if both subscription and check are empty strings. -func SilencedName(subscription, check string) (string, error) { - if subscription == "" && check == "" { - return "", errors.New("no subscription or check specified") - } - if subscription == "" { - subscription = "*" - } - if check == "" { - check = "*" - } - return fmt.Sprintf("%s:%s", subscription, check), nil -} - -// SortSilencedByPredicate can be used to sort a given collection using a given -// predicate. -func SortSilencedByPredicate(es []*Silenced, fn func(a, b *Silenced) bool) sort.Interface { - return &silenceSorter{silences: es, byFn: fn} -} - -// SortSilencedByName can be used to sort a given collection by their names. -func SortSilencedByName(es []*Silenced) sort.Interface { - return SortSilencedByPredicate(es, func(a, b *Silenced) bool { return a.Name < b.Name }) -} - -// SortSilencedByBegin can be used to sort a given collection by their begin -// timestamp. -func SortSilencedByBegin(es []*Silenced) sort.Interface { - return SortSilencedByPredicate(es, func(a, b *Silenced) bool { return a.Begin < b.Begin }) -} - -type silenceSorter struct { - silences []*Silenced - byFn func(a, b *Silenced) bool -} - -// Len implements sort.Interface. -func (s *silenceSorter) Len() int { - return len(s.silences) -} - -// Swap implements sort.Interface. -func (s *silenceSorter) Swap(i, j int) { - s.silences[i], s.silences[j] = s.silences[j], s.silences[i] -} - -// Less implements sort.Interface. -func (s *silenceSorter) Less(i, j int) bool { - return s.byFn(s.silences[i], s.silences[j]) -} - -// SilencedFields returns a set of fields that represent that resource -func SilencedFields(r Resource) map[string]string { - resource := r.(*Silenced) - fields := map[string]string{ - "silenced.name": resource.ObjectMeta.Name, - "silenced.namespace": resource.ObjectMeta.Namespace, - "silenced.check": resource.Check, - "silenced.creator": resource.Creator, - "silenced.expire_on_resolve": strconv.FormatBool(resource.ExpireOnResolve), - "silenced.subscription": resource.Subscription, - } - stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "silenced.labels.") - return fields -} - -// Fields returns a set of fields that represent that resource -func (s *Silenced) Fields() map[string]string { - return SilencedFields(s) -} - -// SetNamespace sets the namespace of the resource. -func (s *Silenced) SetNamespace(namespace string) { - s.Namespace = namespace -} - -// SetObjectMeta sets the meta of the resource. -func (s *Silenced) SetObjectMeta(meta ObjectMeta) { - s.ObjectMeta = meta -} - -func (*Silenced) RBACName() string { - return "silenced" -} diff --git a/api/core/v2/silenced.pb.go b/api/core/v2/silenced.pb.go deleted file mode 100644 index 5f26c4ef95..0000000000 --- a/api/core/v2/silenced.pb.go +++ /dev/null @@ -1,870 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/silenced.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Silenced is the representation of a silence entry. -type Silenced struct { - // Metadata contains the name, namespace, labels and annotations of the - // silenced - ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata,omitempty"` - // Expire is the number of seconds the entry will live - Expire int64 `protobuf:"varint,2,opt,name=expire,proto3" json:"expire"` - // ExpireOnResolve defaults to false, clears the entry on resolution when - // set to true - ExpireOnResolve bool `protobuf:"varint,3,opt,name=expire_on_resolve,json=expireOnResolve,proto3" json:"expire_on_resolve"` - // Creator is the author of the silenced entry - Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` - // Check is the name of the check event to be silenced. - Check string `protobuf:"bytes,5,opt,name=check,proto3" json:"check,omitempty"` - // Reason is used to provide context to the entry - Reason string `protobuf:"bytes,6,opt,name=reason,proto3" json:"reason,omitempty"` - // Subscription is the name of the subscription to which the entry applies. - Subscription string `protobuf:"bytes,7,opt,name=subscription,proto3" json:"subscription,omitempty"` - // Begin is a timestamp at which the silenced entry takes effect. - Begin int64 `protobuf:"varint,10,opt,name=begin,proto3" json:"begin"` - // ExpireAt is a timestamp at which the silenced entry will expire. - ExpireAt int64 `protobuf:"varint,11,opt,name=expire_at,json=expireAt,proto3" json:"expire_at"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Silenced) Reset() { *m = Silenced{} } -func (m *Silenced) String() string { return proto.CompactTextString(m) } -func (*Silenced) ProtoMessage() {} -func (*Silenced) Descriptor() ([]byte, []int) { - return fileDescriptor_768e9755d200fb5d, []int{0} -} -func (m *Silenced) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Silenced) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Silenced.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Silenced) XXX_Merge(src proto.Message) { - xxx_messageInfo_Silenced.Merge(m, src) -} -func (m *Silenced) XXX_Size() int { - return m.Size() -} -func (m *Silenced) XXX_DiscardUnknown() { - xxx_messageInfo_Silenced.DiscardUnknown(m) -} - -var xxx_messageInfo_Silenced proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Silenced)(nil), "sensu.core.v2.Silenced") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/silenced.proto", fileDescriptor_768e9755d200fb5d) -} - -var fileDescriptor_768e9755d200fb5d = []byte{ - // 420 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x31, 0x6e, 0xd4, 0x40, - 0x14, 0x86, 0x77, 0xb2, 0xd9, 0x8d, 0x77, 0x42, 0x40, 0x8c, 0x28, 0x26, 0x11, 0x1a, 0x5b, 0x14, - 0xc8, 0x42, 0x60, 0x93, 0x0d, 0x15, 0x15, 0x58, 0xa2, 0x44, 0x91, 0x06, 0xd1, 0xd0, 0x44, 0xe3, - 0xc9, 0xc3, 0x19, 0xc8, 0x7a, 0xac, 0xf1, 0xac, 0x05, 0x37, 0xe0, 0x08, 0x94, 0x69, 0x90, 0x72, - 0x04, 0x8e, 0xb0, 0x65, 0x4e, 0x60, 0x81, 0xe9, 0xf6, 0x04, 0x94, 0x68, 0x67, 0x1c, 0xd8, 0x15, - 0x4d, 0x1a, 0xbf, 0xe7, 0xef, 0xff, 0xff, 0xe7, 0xf7, 0x64, 0xfc, 0xac, 0x50, 0xf6, 0x6c, 0x9e, - 0x27, 0x52, 0xcf, 0xd2, 0x1a, 0xca, 0x7a, 0xee, 0x9f, 0x4f, 0x0a, 0x9d, 0x8a, 0x4a, 0xa5, 0x52, - 0x1b, 0x48, 0x9b, 0x69, 0x5a, 0xab, 0x73, 0x28, 0x25, 0x9c, 0x26, 0x95, 0xd1, 0x56, 0x93, 0x3d, - 0x67, 0x4a, 0x56, 0x6a, 0xd2, 0x4c, 0x0f, 0xd6, 0x87, 0x14, 0xba, 0xd0, 0xa9, 0x73, 0xe5, 0xf3, - 0xf7, 0x2f, 0x9a, 0xc3, 0xe4, 0x28, 0x39, 0x74, 0xd0, 0x31, 0xd7, 0xf9, 0x21, 0x07, 0x4f, 0x6f, - 0xf6, 0xe9, 0x19, 0x58, 0xe1, 0x13, 0x0f, 0xbe, 0x0d, 0x71, 0xf0, 0xa6, 0xdf, 0x84, 0xbc, 0xc5, - 0xc1, 0x4a, 0x3a, 0x15, 0x56, 0x50, 0x14, 0xa1, 0x78, 0x77, 0xba, 0x9f, 0x6c, 0xac, 0x95, 0x1c, - 0xe7, 0x1f, 0x40, 0xda, 0xd7, 0x60, 0x45, 0xc6, 0x16, 0x6d, 0x38, 0xb8, 0x6a, 0x43, 0xb4, 0x6c, - 0x43, 0x72, 0x1d, 0x7b, 0xac, 0x67, 0xca, 0xc2, 0xac, 0xb2, 0x9f, 0xf9, 0xdf, 0x51, 0xe4, 0x21, - 0x1e, 0xc3, 0xa7, 0x4a, 0x19, 0xa0, 0x5b, 0x11, 0x8a, 0x87, 0xd9, 0xed, 0x85, 0x4f, 0xf5, 0x94, - 0xf7, 0x95, 0xbc, 0xc2, 0x77, 0x7d, 0x77, 0xa2, 0xcb, 0x13, 0x03, 0xb5, 0x3e, 0x6f, 0x80, 0x0e, - 0x23, 0x14, 0x07, 0xd9, 0x7e, 0x1f, 0xf9, 0xdf, 0xc0, 0xef, 0x78, 0x74, 0x5c, 0x72, 0x0f, 0x08, - 0xc3, 0x3b, 0xd2, 0x80, 0xb0, 0xda, 0xd0, 0xed, 0x08, 0xc5, 0x93, 0x6c, 0x7b, 0x15, 0xe6, 0xd7, - 0x90, 0xdc, 0xc3, 0x23, 0x79, 0x06, 0xf2, 0x23, 0x1d, 0xad, 0x54, 0xee, 0x5f, 0xc8, 0x7d, 0x3c, - 0x36, 0x20, 0x6a, 0x5d, 0xd2, 0xf1, 0x5a, 0xa8, 0x67, 0x24, 0xc6, 0xb7, 0xea, 0x79, 0x5e, 0x4b, - 0xa3, 0x2a, 0xab, 0x74, 0x49, 0x77, 0xd6, 0x3c, 0x1b, 0x0a, 0x09, 0xf1, 0x28, 0x87, 0x42, 0x95, - 0x14, 0xbb, 0x5b, 0x27, 0xcb, 0x36, 0xf4, 0x80, 0xfb, 0x42, 0x1e, 0xe1, 0x49, 0x7f, 0x84, 0xb0, - 0x74, 0xd7, 0x99, 0xf6, 0x96, 0x6d, 0xf8, 0x0f, 0xf2, 0xc0, 0xb7, 0x2f, 0xed, 0xf3, 0xe0, 0xcb, - 0x45, 0x38, 0xb8, 0xbc, 0x08, 0x51, 0x16, 0xfd, 0xfe, 0xc9, 0xd0, 0x65, 0xc7, 0xd0, 0xf7, 0x8e, - 0xa1, 0x45, 0xc7, 0xd0, 0x55, 0xc7, 0xd0, 0x8f, 0x8e, 0xa1, 0xaf, 0xbf, 0xd8, 0xe0, 0xdd, 0x56, - 0x33, 0xcd, 0xc7, 0xee, 0x87, 0x1e, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x27, 0x07, 0xa7, 0x6c, - 0x7f, 0x02, 0x00, 0x00, -} - -func (this *Silenced) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Silenced) - if !ok { - that2, ok := that.(Silenced) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ObjectMeta.Equal(&that1.ObjectMeta) { - return false - } - if this.Expire != that1.Expire { - return false - } - if this.ExpireOnResolve != that1.ExpireOnResolve { - return false - } - if this.Creator != that1.Creator { - return false - } - if this.Check != that1.Check { - return false - } - if this.Reason != that1.Reason { - return false - } - if this.Subscription != that1.Subscription { - return false - } - if this.Begin != that1.Begin { - return false - } - if this.ExpireAt != that1.ExpireAt { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type SilencedFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetObjectMeta() ObjectMeta - GetExpire() int64 - GetExpireOnResolve() bool - GetCreator() string - GetCheck() string - GetReason() string - GetSubscription() string - GetBegin() int64 - GetExpireAt() int64 -} - -func (this *Silenced) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *Silenced) TestProto() github_com_golang_protobuf_proto.Message { - return NewSilencedFromFace(this) -} - -func (this *Silenced) GetObjectMeta() ObjectMeta { - return this.ObjectMeta -} - -func (this *Silenced) GetExpire() int64 { - return this.Expire -} - -func (this *Silenced) GetExpireOnResolve() bool { - return this.ExpireOnResolve -} - -func (this *Silenced) GetCreator() string { - return this.Creator -} - -func (this *Silenced) GetCheck() string { - return this.Check -} - -func (this *Silenced) GetReason() string { - return this.Reason -} - -func (this *Silenced) GetSubscription() string { - return this.Subscription -} - -func (this *Silenced) GetBegin() int64 { - return this.Begin -} - -func (this *Silenced) GetExpireAt() int64 { - return this.ExpireAt -} - -func NewSilencedFromFace(that SilencedFace) *Silenced { - this := &Silenced{} - this.ObjectMeta = that.GetObjectMeta() - this.Expire = that.GetExpire() - this.ExpireOnResolve = that.GetExpireOnResolve() - this.Creator = that.GetCreator() - this.Check = that.GetCheck() - this.Reason = that.GetReason() - this.Subscription = that.GetSubscription() - this.Begin = that.GetBegin() - this.ExpireAt = that.GetExpireAt() - return this -} - -func (m *Silenced) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Silenced) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Silenced) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ExpireAt != 0 { - i = encodeVarintSilenced(dAtA, i, uint64(m.ExpireAt)) - i-- - dAtA[i] = 0x58 - } - if m.Begin != 0 { - i = encodeVarintSilenced(dAtA, i, uint64(m.Begin)) - i-- - dAtA[i] = 0x50 - } - if len(m.Subscription) > 0 { - i -= len(m.Subscription) - copy(dAtA[i:], m.Subscription) - i = encodeVarintSilenced(dAtA, i, uint64(len(m.Subscription))) - i-- - dAtA[i] = 0x3a - } - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintSilenced(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x32 - } - if len(m.Check) > 0 { - i -= len(m.Check) - copy(dAtA[i:], m.Check) - i = encodeVarintSilenced(dAtA, i, uint64(len(m.Check))) - i-- - dAtA[i] = 0x2a - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintSilenced(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0x22 - } - if m.ExpireOnResolve { - i-- - if m.ExpireOnResolve { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.Expire != 0 { - i = encodeVarintSilenced(dAtA, i, uint64(m.Expire)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSilenced(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintSilenced(dAtA []byte, offset int, v uint64) int { - offset -= sovSilenced(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedSilenced(r randySilenced, easy bool) *Silenced { - this := &Silenced{} - v1 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v1 - this.Expire = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Expire *= -1 - } - this.ExpireOnResolve = bool(bool(r.Intn(2) == 0)) - this.Creator = string(randStringSilenced(r)) - this.Check = string(randStringSilenced(r)) - this.Reason = string(randStringSilenced(r)) - this.Subscription = string(randStringSilenced(r)) - this.Begin = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Begin *= -1 - } - this.ExpireAt = int64(r.Int63()) - if r.Intn(2) == 0 { - this.ExpireAt *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedSilenced(r, 12) - } - return this -} - -type randySilenced interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneSilenced(r randySilenced) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringSilenced(r randySilenced) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneSilenced(r) - } - return string(tmps) -} -func randUnrecognizedSilenced(r randySilenced, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldSilenced(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldSilenced(dAtA []byte, r randySilenced, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateSilenced(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateSilenced(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateSilenced(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateSilenced(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateSilenced(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateSilenced(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateSilenced(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Silenced) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovSilenced(uint64(l)) - if m.Expire != 0 { - n += 1 + sovSilenced(uint64(m.Expire)) - } - if m.ExpireOnResolve { - n += 2 - } - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovSilenced(uint64(l)) - } - l = len(m.Check) - if l > 0 { - n += 1 + l + sovSilenced(uint64(l)) - } - l = len(m.Reason) - if l > 0 { - n += 1 + l + sovSilenced(uint64(l)) - } - l = len(m.Subscription) - if l > 0 { - n += 1 + l + sovSilenced(uint64(l)) - } - if m.Begin != 0 { - n += 1 + sovSilenced(uint64(m.Begin)) - } - if m.ExpireAt != 0 { - n += 1 + sovSilenced(uint64(m.ExpireAt)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovSilenced(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSilenced(x uint64) (n int) { - return sovSilenced(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Silenced) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSilenced - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Silenced: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Silenced: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSilenced - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSilenced - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSilenced - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Expire", wireType) - } - m.Expire = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSilenced - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Expire |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpireOnResolve", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSilenced - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExpireOnResolve = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSilenced - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSilenced - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSilenced - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSilenced - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSilenced - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSilenced - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Check = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSilenced - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSilenced - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSilenced - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subscription", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSilenced - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSilenced - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSilenced - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subscription = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Begin", wireType) - } - m.Begin = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSilenced - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Begin |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpireAt", wireType) - } - m.ExpireAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSilenced - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpireAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSilenced(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSilenced - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSilenced(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSilenced - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSilenced - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSilenced - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSilenced - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSilenced - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSilenced - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSilenced = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSilenced = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSilenced = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/silenced.proto b/api/core/v2/silenced.proto deleted file mode 100644 index 6e9eea9ff7..0000000000 --- a/api/core/v2/silenced.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// Silenced is the representation of a silence entry. -message Silenced { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // Metadata contains the name, namespace, labels and annotations of the - // silenced - ObjectMeta metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - - // Expire is the number of seconds the entry will live - int64 expire = 2 [ (gogoproto.nullable) = true, (gogoproto.jsontag) = "expire" ]; - - // ExpireOnResolve defaults to false, clears the entry on resolution when - // set to true - bool expire_on_resolve = 3 [ (gogoproto.nullable) = true, (gogoproto.jsontag) = "expire_on_resolve" ]; - - // Creator is the author of the silenced entry - string creator = 4 [ (gogoproto.nullable) = true ]; - - // Check is the name of the check event to be silenced. - string check = 5; - - // Reason is used to provide context to the entry - string reason = 6 [ (gogoproto.nullable) = true ]; - - // Subscription is the name of the subscription to which the entry applies. - string subscription = 7 [ (gogoproto.nullable) = true ]; - - // Begin is a timestamp at which the silenced entry takes effect. - int64 begin = 10 [ (gogoproto.jsontag) = "begin" ]; - - // ExpireAt is a timestamp at which the silenced entry will expire. - int64 expire_at = 11 [ (gogoproto.jsontag) = "expire_at" ]; -} diff --git a/api/core/v2/silenced_test.go b/api/core/v2/silenced_test.go deleted file mode 100644 index 1efb30f76c..0000000000 --- a/api/core/v2/silenced_test.go +++ /dev/null @@ -1,203 +0,0 @@ -package v2 - -import ( - "reflect" - "sort" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestFixtureSilenced(t *testing.T) { - s := FixtureSilenced("test_subscription:test_check") - s.Expire = 60 - s.ExpireOnResolve = true - s.Creator = "creator@example.com" - s.Reason = "test reason" - s.Namespace = "default" - assert.NotNil(t, s) - assert.NotNil(t, s.Name) - assert.Equal(t, "test_subscription:test_check", s.Name) - assert.NotNil(t, s.Expire) - assert.NotNil(t, s.ExpireOnResolve) - assert.NotNil(t, s.Expire) - assert.NotNil(t, s.Creator) - assert.NotNil(t, s.Check) - assert.NotNil(t, s.Reason) - assert.NotNil(t, s.Subscription) - assert.NotNil(t, s.Namespace) - - s = FixtureSilenced("entity:test_subscription:test_check") - assert.Equal(t, "entity:test_subscription", s.Subscription) - assert.Equal(t, "test_check", s.Check) -} - -// Validation should fail when we don't provide a CheckName or Subscription -func TestSilencedValidate(t *testing.T) { - var s Silenced - assert.Error(t, s.Validate()) -} - -func TestSortSilencedByID(t *testing.T) { - a := FixtureSilenced("Abernathy:*") - b := FixtureSilenced("Bernard:*") - c := FixtureSilenced("Clementine:*") - d := FixtureSilenced("Dolores:*") - - testCases := []struct { - name string - inRecords []*Silenced - expected []*Silenced - }{ - { - name: "d, c, b, a", - inRecords: []*Silenced{d, c, b, a}, - expected: []*Silenced{a, b, c, d}, - }, - { - name: "c, d, a, b", - inRecords: []*Silenced{c, d, a, b}, - expected: []*Silenced{a, b, c, d}, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - sort.Sort(SortSilencedByName(tc.inRecords)) - assert.EqualValues(t, tc.expected, tc.inRecords) - }) - } -} - -func TestSortSilencedByBegin(t *testing.T) { - a := FixtureSilenced("Abernathy:*") - a.Begin = 5 - b := FixtureSilenced("Bernard:*") - b.Begin = 10 - c := FixtureSilenced("Clementine:*") - c.Begin = 50 - - in := []*Silenced{b, a, c} - sort.Sort(SortSilencedByBegin(in)) - assert.EqualValues(t, []*Silenced{a, b, c}, in) -} - -func TestSilencedMatches(t *testing.T) { - testCases := []struct { - name string - silenced *Silenced - check string - subscription string - expected bool - }{ - { - name: "nil silence", - silenced: nil, - check: "", - subscription: "", - expected: false, - }, - { - name: "No subscription or check", - silenced: FixtureSilenced("*:*"), - subscription: "matches", - check: "anything", - expected: true, - }, - { - name: "Subscription matches, no check", - silenced: FixtureSilenced("foo:*"), - subscription: "foo", - check: "wildcard", - expected: true, - }, - { - name: "Subscription matches, check doesn't", - silenced: FixtureSilenced("foo:bar"), - subscription: "foo", - check: "nomatch", - expected: false, - }, - { - name: "Check matches, no subscription", - silenced: FixtureSilenced("*:foo"), - subscription: "anything", - check: "foo", - expected: true, - }, - { - name: "Check matches, subscription doesn't", - silenced: FixtureSilenced("foo:bar"), - subscription: "nomatch", - check: "bar", - expected: false, - }, - { - name: "Both check and subscription match", - silenced: FixtureSilenced("foo:bar"), - subscription: "foo", - check: "bar", - expected: true, - }, - { - name: "empty subscription is the same as wildcard", - silenced: &Silenced{Subscription: "", Check: "foo"}, - subscription: "", - check: "foo", - expected: true, - }, - { - name: "empty check is the same as wildcard", - silenced: &Silenced{Subscription: "foo", Check: ""}, - subscription: "foo", - check: "", - expected: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - assert.Equal(t, tc.expected, tc.silenced.Matches(tc.check, tc.subscription)) - }) - } -} - -func TestSilencedFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureSilenced("a:b"), - wantKey: "silenced.name", - want: "a:b", - }, - { - name: "exposes expire_on_resolve", - args: FixtureSilenced("a:b"), - wantKey: "silenced.expire_on_resolve", - want: "false", - }, - { - name: "exposes labels", - args: &Silenced{ - ObjectMeta: ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "silenced.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("Silenced.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/silencedpb_test.go b/api/core/v2/silencedpb_test.go deleted file mode 100644 index 52ade67fed..0000000000 --- a/api/core/v2/silencedpb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/silenced.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestSilencedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSilenced(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Silenced{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSilencedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSilenced(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Silenced{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSilencedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSilenced(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Silenced{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestSilencedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSilenced(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &Silenced{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSilencedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSilenced(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &Silenced{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestSilencedFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSilenced(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestSilencedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedSilenced(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/status.go b/api/core/v2/status.go deleted file mode 100644 index 97f79cd57e..0000000000 --- a/api/core/v2/status.go +++ /dev/null @@ -1,28 +0,0 @@ -package v2 - -const ( - CheckStatusOk = uint32(0) - CheckStatusWarning = uint32(1) - CheckStatusCritical = uint32(2) - - CheckStatusCaptionOk = "ok" - CheckStatusCaptionWarning = "warning" - CheckStatusCaptionCritical = "critical" - CheckStatusCaptionUnknown = "unknown" -) - -var ( - statusToCaptionMap = map[uint32]string{ - CheckStatusOk: CheckStatusCaptionOk, - CheckStatusWarning: CheckStatusCaptionWarning, - CheckStatusCritical: CheckStatusCaptionCritical, - } -) - -func CheckStatusToCaption(status uint32) string { - caption, ok := statusToCaptionMap[status] - if ok { - return caption - } - return CheckStatusCaptionUnknown -} diff --git a/api/core/v2/tessen.go b/api/core/v2/tessen.go deleted file mode 100644 index c40c2eb3e6..0000000000 --- a/api/core/v2/tessen.go +++ /dev/null @@ -1,67 +0,0 @@ -package v2 - -import ( - "fmt" - "path" -) - -const ( - - // LowerBound is the minimum interval that tessen will phone home, in seconds - LowerBound = 60 - - // UpperBound is the maximum interval that tessen will phone home, in seconds - UpperBound = 21600 - - // DefaultTessenInterval is the default interval at which tessen will phone home, in seconds - DefaultTessenInterval = 1800 - - // TessenResource is the name of this resource type - TessenResource = "tessen" -) - -// GetObjectMeta only exists here to fulfil the requirements of Resource -func (t *TessenConfig) GetObjectMeta() ObjectMeta { - return ObjectMeta{} -} - -// StorePrefix returns the path prefix to the Tessen config in the store -func (t *TessenConfig) StorePrefix() string { - return TessenResource -} - -// URIPath returns the path component of the Tessen config URI. -func (t *TessenConfig) URIPath() string { - return path.Join(URLPrefix, TessenResource) -} - -// Validate validates the TessenConfig. -func (t *TessenConfig) Validate() error { - return nil -} - -// ValidateInterval returns an error if the tessen interval is not within the upper and lower bound limits -func ValidateInterval(freq uint32) error { - if !(freq >= LowerBound && freq <= UpperBound) { - return fmt.Errorf("tessen interval must be in between the lower and upper bound limits (%d-%d)", LowerBound, UpperBound) - } - return nil -} - -// DefaultTessenConfig returns the default tessen configuration -func DefaultTessenConfig() *TessenConfig { - return &TessenConfig{} -} - -// SetNamespace sets the namespace of the resource. -func (t *TessenConfig) SetNamespace(namespace string) { -} - -// SetObjectMeta only exists here to fulfil the requirements of Resource -func (t *TessenConfig) SetObjectMeta(ObjectMeta) { - // no-op -} - -func (*TessenConfig) RBACName() string { - return "tessen" -} diff --git a/api/core/v2/tessen.pb.go b/api/core/v2/tessen.pb.go deleted file mode 100644 index e37f8abf8d..0000000000 --- a/api/core/v2/tessen.pb.go +++ /dev/null @@ -1,450 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/tessen.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// TessenConfig is the representation of a tessen configuration. -type TessenConfig struct { - // OptOut is the opt-out status of the tessen configuration - OptOut bool `protobuf:"varint,1,opt,name=opt_out,json=optOut,proto3" json:"opt_out"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TessenConfig) Reset() { *m = TessenConfig{} } -func (m *TessenConfig) String() string { return proto.CompactTextString(m) } -func (*TessenConfig) ProtoMessage() {} -func (*TessenConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_639d7e72499ed3e0, []int{0} -} -func (m *TessenConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TessenConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TessenConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TessenConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_TessenConfig.Merge(m, src) -} -func (m *TessenConfig) XXX_Size() int { - return m.Size() -} -func (m *TessenConfig) XXX_DiscardUnknown() { - xxx_messageInfo_TessenConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_TessenConfig proto.InternalMessageInfo - -func init() { - proto.RegisterType((*TessenConfig)(nil), "sensu.core.v2.TessenConfig") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/tessen.proto", fileDescriptor_639d7e72499ed3e0) -} - -var fileDescriptor_639d7e72499ed3e0 = []byte{ - // 207 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4a, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0x25, 0xa9, - 0xc5, 0xc5, 0xa9, 0x79, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, 0x25, 0x7a, 0x20, - 0x39, 0xbd, 0x32, 0x23, 0x29, 0x13, 0x24, 0x23, 0xd2, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xaa, 0x92, - 0x4a, 0xd3, 0x1c, 0xca, 0x0c, 0xf5, 0x8c, 0xf5, 0x0c, 0xc1, 0x82, 0x60, 0x31, 0x30, 0x0b, 0x62, - 0x88, 0x92, 0x1d, 0x17, 0x4f, 0x08, 0xd8, 0x50, 0xe7, 0xfc, 0xbc, 0xb4, 0xcc, 0x74, 0x21, 0x15, - 0x2e, 0xf6, 0xfc, 0x82, 0x92, 0xf8, 0xfc, 0xd2, 0x12, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x0e, 0x27, - 0xee, 0x57, 0xf7, 0xe4, 0x61, 0x42, 0x41, 0x6c, 0xf9, 0x05, 0x25, 0xfe, 0xa5, 0x25, 0x56, 0x1c, - 0x1d, 0x0b, 0xe4, 0x19, 0x56, 0x2c, 0x90, 0x67, 0x74, 0x52, 0xf8, 0xf1, 0x50, 0x8e, 0x71, 0xc5, - 0x23, 0x39, 0xc6, 0x1d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, - 0xc1, 0x23, 0x39, 0xc6, 0x19, 0x8f, 0xe5, 0x18, 0xa2, 0x98, 0xca, 0x8c, 0x92, 0xd8, 0xc0, 0x16, - 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x0e, 0x9b, 0x27, 0xe3, 0x00, 0x00, 0x00, -} - -func (this *TessenConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TessenConfig) - if !ok { - that2, ok := that.(TessenConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.OptOut != that1.OptOut { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type TessenConfigFace interface { - Proto() github_com_golang_protobuf_proto.Message - GetOptOut() bool -} - -func (this *TessenConfig) Proto() github_com_golang_protobuf_proto.Message { - return this -} - -func (this *TessenConfig) TestProto() github_com_golang_protobuf_proto.Message { - return NewTessenConfigFromFace(this) -} - -func (this *TessenConfig) GetOptOut() bool { - return this.OptOut -} - -func NewTessenConfigFromFace(that TessenConfigFace) *TessenConfig { - this := &TessenConfig{} - this.OptOut = that.GetOptOut() - return this -} - -func (m *TessenConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TessenConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TessenConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.OptOut { - i-- - if m.OptOut { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTessen(dAtA []byte, offset int, v uint64) int { - offset -= sovTessen(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedTessenConfig(r randyTessen, easy bool) *TessenConfig { - this := &TessenConfig{} - this.OptOut = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTessen(r, 2) - } - return this -} - -type randyTessen interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTessen(r randyTessen) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTessen(r randyTessen) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneTessen(r) - } - return string(tmps) -} -func randUnrecognizedTessen(r randyTessen, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldTessen(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldTessen(dAtA []byte, r randyTessen, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateTessen(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateTessen(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateTessen(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateTessen(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateTessen(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateTessen(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateTessen(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *TessenConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OptOut { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovTessen(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTessen(x uint64) (n int) { - return sovTessen(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TessenConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTessen - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TessenConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TessenConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OptOut", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTessen - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.OptOut = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTessen(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTessen - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTessen(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTessen - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTessen - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTessen - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTessen - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTessen - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTessen - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTessen = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTessen = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTessen = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/tessen.proto b/api/core/v2/tessen.proto deleted file mode 100644 index 69072e3a10..0000000000 --- a/api/core/v2/tessen.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// TessenConfig is the representation of a tessen configuration. -message TessenConfig { - option (gogoproto.face) = true; - option (gogoproto.goproto_getters) = false; - - // OptOut is the opt-out status of the tessen configuration - bool opt_out = 1 [ (gogoproto.jsontag) = "opt_out" ]; -} diff --git a/api/core/v2/tessen_test.go b/api/core/v2/tessen_test.go deleted file mode 100644 index 924e084bae..0000000000 --- a/api/core/v2/tessen_test.go +++ /dev/null @@ -1,14 +0,0 @@ -package v2 - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestValidateInterval(t *testing.T) { - assert.Error(t, ValidateInterval(UpperBound+1)) - assert.Error(t, ValidateInterval(LowerBound-1)) - assert.NoError(t, ValidateInterval(UpperBound-1)) - assert.NoError(t, ValidateInterval(LowerBound+1)) -} diff --git a/api/core/v2/tessenpb_test.go b/api/core/v2/tessenpb_test.go deleted file mode 100644 index 551d73a6ff..0000000000 --- a/api/core/v2/tessenpb_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/tessen.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestTessenConfigProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTessenConfig(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TessenConfig{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTessenConfigMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTessenConfig(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TessenConfig{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTessenConfigJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTessenConfig(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TessenConfig{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTessenConfigProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTessenConfig(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &TessenConfig{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTessenConfigProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTessenConfig(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &TessenConfig{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTessenConfigFace(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTessenConfig(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestTessenConfigSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTessenConfig(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/time_window.go b/api/core/v2/time_window.go deleted file mode 100644 index 2e6280af4d..0000000000 --- a/api/core/v2/time_window.go +++ /dev/null @@ -1,368 +0,0 @@ -package v2 - -import ( - "errors" - "fmt" - "strings" - "time" -) - -// Validate ensures that all the time windows in t can be parsed. -func (t *TimeWindowWhen) Validate() error { - if t == nil { - return nil - } - for _, windows := range t.MapTimeWindows() { - for _, window := range windows { - if err := window.Validate(); err != nil { - return err - } - } - } - return nil -} - -// Validate ensures the TimeWindowTimeRange is valid. -func (t *TimeWindowTimeRange) Validate() error { - _, err := t.InWindow(time.Now()) - return err -} - -// MapTimeWindows returns a map of all the time windows in t. -func (t *TimeWindowWhen) MapTimeWindows() map[string][]*TimeWindowTimeRange { - d := t.Days - return map[string][]*TimeWindowTimeRange{ - "All": d.All, - "Sunday": d.Sunday, - "Monday": d.Monday, - "Tuesday": d.Tuesday, - "Wednesday": d.Wednesday, - "Thursday": d.Thursday, - "Friday": d.Friday, - "Saturday": d.Saturday, - } -} - -// InWindow determines if the current time falls between the provided time -// window. Current should typically be time.Now() but to allow easier tests, it -// must be provided as a parameter. Begin and end parameters must be strings -// representing an hour of the day in the time.Kitchen format (e.g. "3:04PM") -func (t *TimeWindowTimeRange) InWindow(current time.Time) (bool, error) { - // Get the year, month and day of the provided current time (e.g. 2016, 01 & - // 02) - year, month, day := current.Date() - - // Remove any whitespaces in the begin and end times, for backward - // compatibility with Sensu v1 so "3:00 PM" becomes "3:00PM" and satisfies the - // time.Kitchen format - begin := strings.Replace(t.Begin, " ", "", -1) - end := strings.Replace(t.End, " ", "", -1) - - // Parse the beginning of the provided time window in order to retrieve the - // hour and minute and apply it to current year, month and day so we end up - // with a date that corresponds to today (e.g. 2006-01-02T15:00:00Z) - beginTime, err := time.Parse(time.Kitchen, begin) - if err != nil { - return false, err - } - beginHour, beginMin, _ := beginTime.Clock() - beginTime = time.Date(year, month, day, beginHour, beginMin, 0, 0, time.UTC) - - // Parse the ending of the provided time window in order to retrieve the - // hour and minute and apply it to current year, month and day so we end up - // with a date that corresponds to today (e.g. 2006-01-02T21:00:00Z) - endTime, err := time.Parse(time.Kitchen, end) - if err != nil { - return false, err - } - endHour, endMin, _ := endTime.Clock() - endTime = time.Date(year, month, day, endHour, endMin, 0, 0, time.UTC) - - // Verify if the end of the time window is actually before the beginning of - // it, which means that the window ends the next day (e.g. 3:00PM to 8:00AM) - if endTime.Before(beginTime) { - // Verify if the current time is before the end of the time window, which - // means that we are already on the second day of the specified time window, - // therefore we just need to move the start of this window to the beginning - // of this second day (e.g. 3:00PM to 8:00AM, it's currently 5:00AM so let's - // move the beginning to 0:00AM) - if current.Before(endTime) { - beginTime = time.Date(year, month, day, 0, 0, 0, 0, time.UTC) - } else { - // We are currently on the first day of the window so we just need to move - // the end of this window to the end of the first day (e.g. 3:00PM to - // 8:00AM, it's currently 5:00PM so let's move the ending to 11:59PM) - endTime = time.Date(year, month, day, 23, 59, 59, 999999999, time.UTC) - } - } - - return (current.After(beginTime) || current.Equal(beginTime)) && - (current.Before(endTime) || current.Equal(endTime)), nil -} - -// InWindows determines if the current time falls between the provided time -// windows. Current should typically be time.Now() but to allow easier tests, it -// must be provided as a parameter. The function returns a positive value as -// soon the current time falls within a time window -func (t *TimeWindowWhen) InWindows(current time.Time) (bool, error) { - windowsByDay := t.MapTimeWindows() - - var windows []*TimeWindowTimeRange - windows = append(windows, windowsByDay["All"]...) - windows = append(windows, windowsByDay[current.Weekday().String()]...) - - // Go through the set of matching windows and process all the individual - // time windows. If the current time is within a time window in the selection, - // then the loop returns early with true and nil error. - for _, window := range windows { - // Determine if the current time falls between this specific time window - isInWindow, err := window.InWindow(current) - if err != nil { - return false, err - } - - // Immediately return with a positive value if this time window conditions are - // met - if isInWindow { - return true, nil - } - } - - // At this point no time windows conditions were met, return a negative value - return false, nil -} - -const ( - RepeatPeriodAnnually = "annually" - RepeatPeriodMonthly = "monthly" - RepeatPeriodWeekly = "weekly" - RepeatPeriodWeekdays = "weekdays" - RepeatPeriodWeekends = "weekends" - RepeatPeriodDaily = "daily" - RepeatPeriodSundays = "sundays" - RepeatPeriodMondays = "mondays" - RepeatPeriodTuesdays = "tuesdays" - RepeatPeriodWednesdays = "wednesdays" - RepeatPeriodThursdays = "thursdays" - RepeatPeriodFridays = "fridays" - RepeatPeriodSaturdays = "saturdays" -) - -var validRepeatPeriods = map[string]bool{ - RepeatPeriodAnnually: true, - RepeatPeriodMonthly: true, - RepeatPeriodWeekly: true, - RepeatPeriodWeekdays: true, - RepeatPeriodWeekends: true, - RepeatPeriodDaily: true, - RepeatPeriodSundays: true, - RepeatPeriodMondays: true, - RepeatPeriodTuesdays: true, - RepeatPeriodWednesdays: true, - RepeatPeriodThursdays: true, - RepeatPeriodFridays: true, - RepeatPeriodSaturdays: true, -} - -func (t *TimeWindowRepeated) Validate() error { - begin, err := t.GetBeginTime() - if err != nil { - return fmt.Errorf("invalid begin time format: %v", err) - } - end, err := t.GetEndTime() - if err != nil { - return fmt.Errorf("invalid end time format: %v", err) - } - if end.Before(begin) { - return errors.New("end time must be after begin time") - } - - for _, repeat := range t.Repeat { - if _, ok := validRepeatPeriods[repeat]; !ok { - return fmt.Errorf("invalid repeat period: %s", repeat) - } - } - - return nil -} - -func (t *TimeWindowRepeated) GetBeginTime() (time.Time, error) { - beginTime, err := time.ParseInLocation(time.RFC3339, t.Begin, time.UTC) - if err != nil { - return time.Time{}, err - } - - return beginTime, nil -} - -func (t *TimeWindowRepeated) GetEndTime() (time.Time, error) { - endTime, err := time.ParseInLocation(time.RFC3339, t.End, time.UTC) - if err != nil { - return time.Time{}, err - } - return endTime, nil -} - -func (t *TimeWindowRepeated) InWindows(currentTime time.Time) bool { - - if len(t.Repeat) == 0 { - return t.inAbsoluteTimeRange(currentTime) - } - - for _, repeat := range t.Repeat { - inTimeRange := false - switch repeat { - case RepeatPeriodAnnually: - inTimeRange = t.inYearlyTimeRange(currentTime) - case RepeatPeriodMonthly: - inTimeRange = t.inMonthlyTimeRange(currentTime) - case RepeatPeriodWeekly: - inTimeRange = t.inWeeklyTimeRange(currentTime) - case RepeatPeriodSundays: - inTimeRange = t.inDayTimeRange(currentTime, time.Sunday) - case RepeatPeriodMondays: - inTimeRange = t.inDayTimeRange(currentTime, time.Monday) - case RepeatPeriodTuesdays: - inTimeRange = t.inDayTimeRange(currentTime, time.Tuesday) - case RepeatPeriodWednesdays: - inTimeRange = t.inDayTimeRange(currentTime, time.Wednesday) - case RepeatPeriodThursdays: - inTimeRange = t.inDayTimeRange(currentTime, time.Thursday) - case RepeatPeriodFridays: - inTimeRange = t.inDayTimeRange(currentTime, time.Friday) - case RepeatPeriodSaturdays: - inTimeRange = t.inDayTimeRange(currentTime, time.Saturday) - case RepeatPeriodDaily: - inTimeRange = t.inTimeRange(currentTime) - case RepeatPeriodWeekdays: - inTimeRange = t.inWeekdayTimeRange(currentTime) - case RepeatPeriodWeekends: - inTimeRange = t.inWeekendTimeRange(currentTime) - } - - if inTimeRange { - return inTimeRange - } - } - - return false -} - -func (t *TimeWindowRepeated) inAbsoluteTimeRange(actualTime time.Time) bool { - beginTime, err := t.GetBeginTime() - if err != nil { - return false - } - endTime, err := t.GetEndTime() - if err != nil { - return false - } - endTime = endTime.Add(time.Second) - - return !actualTime.Before(beginTime) && actualTime.Before(endTime) -} - -func (t *TimeWindowRepeated) inDayTimeRange(actualTime time.Time, weekday time.Weekday) bool { - beginTime, err := t.GetBeginTime() - if err != nil { - return false - } - endTime, err := t.GetEndTime() - if err != nil { - return false - } - - if actualTime.Before(beginTime) { - return false - } - - actualTime = actualTime.In(beginTime.Location()) - duration := endTime.Sub(beginTime) - beginHour, beginMin, beginSec := beginTime.Clock() - - thisWeekBegin := time.Date(actualTime.Year(), actualTime.Month(), actualTime.Day(), beginHour, beginMin, beginSec, 0, beginTime.Location()) - dayOffset := int(weekday) - int(actualTime.Weekday()) - thisWeekBegin = thisWeekBegin.AddDate(0, 0, dayOffset) - - thisWeekEnd := thisWeekBegin.Add(duration) - thisWeekEnd = thisWeekEnd.Add(time.Second) - thisWeekEnd.In(beginTime.Location()) - - return !actualTime.Before(thisWeekBegin) && actualTime.Before(thisWeekEnd) -} - -func (t *TimeWindowRepeated) inTimeRange(actualTime time.Time) bool { - beginTime, err := t.GetBeginTime() - if err != nil { - return false - } - endTime, err := t.GetEndTime() - if err != nil { - return false - } - - actualTime = actualTime.In(beginTime.Location()) - if actualTime.Before(beginTime) { - return false - } - - duration := endTime.Sub(beginTime) - beginHour, beginMin, beginSec := beginTime.Clock() - - todayBegin := time.Date(actualTime.Year(), actualTime.Month(), actualTime.Day(), beginHour, beginMin, beginSec, 0, beginTime.Location()) - todayEnd := todayBegin.Add(duration) - todayEnd = todayEnd.In(beginTime.Location()) - todayEnd = todayEnd.Add(time.Second) - - return !actualTime.Before(todayBegin) && actualTime.Before(todayEnd) -} - -func (t *TimeWindowRepeated) inWeekdayTimeRange(actualTime time.Time) bool { - return t.inDayTimeRange(actualTime, time.Monday) || - t.inDayTimeRange(actualTime, time.Tuesday) || - t.inDayTimeRange(actualTime, time.Wednesday) || - t.inDayTimeRange(actualTime, time.Thursday) || - t.inDayTimeRange(actualTime, time.Friday) -} - -func (t *TimeWindowRepeated) inWeekendTimeRange(actualTime time.Time) bool { - return t.inDayTimeRange(actualTime, time.Saturday) || - t.inDayTimeRange(actualTime, time.Sunday) -} - -func (t *TimeWindowRepeated) inWeeklyTimeRange(actualTime time.Time) bool { - beginTime, err := t.GetBeginTime() - if err != nil { - return false - } - - return t.inDayTimeRange(actualTime, beginTime.Weekday()) -} - -func (t *TimeWindowRepeated) inMonthlyTimeRange(actualTime time.Time) bool { - beginTime, err := t.GetBeginTime() - if err != nil { - return false - } - - actualTime = actualTime.In(beginTime.Location()) - if beginTime.Day() != actualTime.Day() { - return false - } - - return t.inTimeRange(actualTime) -} - -func (t *TimeWindowRepeated) inYearlyTimeRange(actualTime time.Time) bool { - beginTime, err := t.GetBeginTime() - if err != nil { - return false - } - - actualTime = actualTime.In(beginTime.Location()) - if beginTime.Day() != actualTime.Day() || beginTime.Month() != actualTime.Month() { - return false - } - - return t.inTimeRange(actualTime) -} diff --git a/api/core/v2/time_window.pb.go b/api/core/v2/time_window.pb.go deleted file mode 100644 index 29b954172a..0000000000 --- a/api/core/v2/time_window.pb.go +++ /dev/null @@ -1,1860 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/time_window.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// TimeWindowWhen defines the "when" attributes for time windows -type TimeWindowWhen struct { - // Days is a hash of days - Days TimeWindowDays `protobuf:"bytes,1,opt,name=days,proto3" json:"days"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TimeWindowWhen) Reset() { *m = TimeWindowWhen{} } -func (m *TimeWindowWhen) String() string { return proto.CompactTextString(m) } -func (*TimeWindowWhen) ProtoMessage() {} -func (*TimeWindowWhen) Descriptor() ([]byte, []int) { - return fileDescriptor_90b03ce0229cdb41, []int{0} -} -func (m *TimeWindowWhen) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TimeWindowWhen) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TimeWindowWhen.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TimeWindowWhen) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimeWindowWhen.Merge(m, src) -} -func (m *TimeWindowWhen) XXX_Size() int { - return m.Size() -} -func (m *TimeWindowWhen) XXX_DiscardUnknown() { - xxx_messageInfo_TimeWindowWhen.DiscardUnknown(m) -} - -var xxx_messageInfo_TimeWindowWhen proto.InternalMessageInfo - -func (m *TimeWindowWhen) GetDays() TimeWindowDays { - if m != nil { - return m.Days - } - return TimeWindowDays{} -} - -// TimeWindowDays defines the days of a time window -type TimeWindowDays struct { - All []*TimeWindowTimeRange `protobuf:"bytes,1,rep,name=all,proto3" json:"all,omitempty"` - Sunday []*TimeWindowTimeRange `protobuf:"bytes,2,rep,name=sunday,proto3" json:"sunday,omitempty"` - Monday []*TimeWindowTimeRange `protobuf:"bytes,3,rep,name=monday,proto3" json:"monday,omitempty"` - Tuesday []*TimeWindowTimeRange `protobuf:"bytes,4,rep,name=tuesday,proto3" json:"tuesday,omitempty"` - Wednesday []*TimeWindowTimeRange `protobuf:"bytes,5,rep,name=wednesday,proto3" json:"wednesday,omitempty"` - Thursday []*TimeWindowTimeRange `protobuf:"bytes,6,rep,name=thursday,proto3" json:"thursday,omitempty"` - Friday []*TimeWindowTimeRange `protobuf:"bytes,7,rep,name=friday,proto3" json:"friday,omitempty"` - Saturday []*TimeWindowTimeRange `protobuf:"bytes,8,rep,name=saturday,proto3" json:"saturday,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TimeWindowDays) Reset() { *m = TimeWindowDays{} } -func (m *TimeWindowDays) String() string { return proto.CompactTextString(m) } -func (*TimeWindowDays) ProtoMessage() {} -func (*TimeWindowDays) Descriptor() ([]byte, []int) { - return fileDescriptor_90b03ce0229cdb41, []int{1} -} -func (m *TimeWindowDays) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TimeWindowDays) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TimeWindowDays.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TimeWindowDays) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimeWindowDays.Merge(m, src) -} -func (m *TimeWindowDays) XXX_Size() int { - return m.Size() -} -func (m *TimeWindowDays) XXX_DiscardUnknown() { - xxx_messageInfo_TimeWindowDays.DiscardUnknown(m) -} - -var xxx_messageInfo_TimeWindowDays proto.InternalMessageInfo - -func (m *TimeWindowDays) GetAll() []*TimeWindowTimeRange { - if m != nil { - return m.All - } - return nil -} - -func (m *TimeWindowDays) GetSunday() []*TimeWindowTimeRange { - if m != nil { - return m.Sunday - } - return nil -} - -func (m *TimeWindowDays) GetMonday() []*TimeWindowTimeRange { - if m != nil { - return m.Monday - } - return nil -} - -func (m *TimeWindowDays) GetTuesday() []*TimeWindowTimeRange { - if m != nil { - return m.Tuesday - } - return nil -} - -func (m *TimeWindowDays) GetWednesday() []*TimeWindowTimeRange { - if m != nil { - return m.Wednesday - } - return nil -} - -func (m *TimeWindowDays) GetThursday() []*TimeWindowTimeRange { - if m != nil { - return m.Thursday - } - return nil -} - -func (m *TimeWindowDays) GetFriday() []*TimeWindowTimeRange { - if m != nil { - return m.Friday - } - return nil -} - -func (m *TimeWindowDays) GetSaturday() []*TimeWindowTimeRange { - if m != nil { - return m.Saturday - } - return nil -} - -// TimeWindowTimeRange defines the time ranges of a time -type TimeWindowTimeRange struct { - // Begin is the time which the time window should begin, in the format - // '3:00PM', which satisfies the time.Kitchen format - Begin string `protobuf:"bytes,1,opt,name=begin,proto3" json:"begin"` - // End is the time which the filter should end, in the format '3:00PM', which - // satisfies the time.Kitchen format - End string `protobuf:"bytes,2,opt,name=end,proto3" json:"end"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TimeWindowTimeRange) Reset() { *m = TimeWindowTimeRange{} } -func (m *TimeWindowTimeRange) String() string { return proto.CompactTextString(m) } -func (*TimeWindowTimeRange) ProtoMessage() {} -func (*TimeWindowTimeRange) Descriptor() ([]byte, []int) { - return fileDescriptor_90b03ce0229cdb41, []int{2} -} -func (m *TimeWindowTimeRange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TimeWindowTimeRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TimeWindowTimeRange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TimeWindowTimeRange) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimeWindowTimeRange.Merge(m, src) -} -func (m *TimeWindowTimeRange) XXX_Size() int { - return m.Size() -} -func (m *TimeWindowTimeRange) XXX_DiscardUnknown() { - xxx_messageInfo_TimeWindowTimeRange.DiscardUnknown(m) -} - -var xxx_messageInfo_TimeWindowTimeRange proto.InternalMessageInfo - -func (m *TimeWindowTimeRange) GetBegin() string { - if m != nil { - return m.Begin - } - return "" -} - -func (m *TimeWindowTimeRange) GetEnd() string { - if m != nil { - return m.End - } - return "" -} - -type TimeWindowRepeated struct { - // Begin is the time which the date/time window should begin, in the ISO3339 - // format - Begin string `protobuf:"bytes,1,opt,name=begin,proto3" json:"begin"` - // End is the time which the date/time window should begin, in the ISO3339 - // format - End string `protobuf:"bytes,2,opt,name=end,proto3" json:"end"` - // The time period the begin and end time repeat - Repeat []string `protobuf:"bytes,3,rep,name=repeat,proto3" json:"repeat"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TimeWindowRepeated) Reset() { *m = TimeWindowRepeated{} } -func (m *TimeWindowRepeated) String() string { return proto.CompactTextString(m) } -func (*TimeWindowRepeated) ProtoMessage() {} -func (*TimeWindowRepeated) Descriptor() ([]byte, []int) { - return fileDescriptor_90b03ce0229cdb41, []int{3} -} -func (m *TimeWindowRepeated) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TimeWindowRepeated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TimeWindowRepeated.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TimeWindowRepeated) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimeWindowRepeated.Merge(m, src) -} -func (m *TimeWindowRepeated) XXX_Size() int { - return m.Size() -} -func (m *TimeWindowRepeated) XXX_DiscardUnknown() { - xxx_messageInfo_TimeWindowRepeated.DiscardUnknown(m) -} - -var xxx_messageInfo_TimeWindowRepeated proto.InternalMessageInfo - -func (m *TimeWindowRepeated) GetBegin() string { - if m != nil { - return m.Begin - } - return "" -} - -func (m *TimeWindowRepeated) GetEnd() string { - if m != nil { - return m.End - } - return "" -} - -func (m *TimeWindowRepeated) GetRepeat() []string { - if m != nil { - return m.Repeat - } - return nil -} - -func init() { - proto.RegisterType((*TimeWindowWhen)(nil), "sensu.core.v2.TimeWindowWhen") - proto.RegisterType((*TimeWindowDays)(nil), "sensu.core.v2.TimeWindowDays") - proto.RegisterType((*TimeWindowTimeRange)(nil), "sensu.core.v2.TimeWindowTimeRange") - proto.RegisterType((*TimeWindowRepeated)(nil), "sensu.core.v2.TimeWindowRepeated") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/time_window.proto", fileDescriptor_90b03ce0229cdb41) -} - -var fileDescriptor_90b03ce0229cdb41 = []byte{ - // 426 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x41, 0xae, 0x93, 0x40, - 0x18, 0xc7, 0xdf, 0x14, 0x1e, 0x7d, 0xcc, 0x53, 0x17, 0xe3, 0x06, 0x4d, 0x84, 0x86, 0x55, 0x37, - 0x0e, 0x29, 0x35, 0x31, 0x71, 0x63, 0x43, 0x1a, 0xf7, 0x25, 0x26, 0x4d, 0xdc, 0x98, 0xa1, 0x4c, - 0x29, 0x49, 0x99, 0x69, 0x60, 0xa0, 0xe9, 0x4d, 0x3c, 0x82, 0xf1, 0x04, 0x1e, 0xa1, 0x4b, 0x4f, - 0x40, 0x14, 0x77, 0x9c, 0xc0, 0xa5, 0x99, 0xa1, 0xb5, 0x35, 0xd1, 0x05, 0x79, 0x9b, 0x6f, 0x86, - 0x8f, 0xff, 0xef, 0xc7, 0x64, 0xf2, 0x01, 0x5f, 0x27, 0xa9, 0xd8, 0x94, 0x11, 0x5e, 0xf1, 0xcc, - 0x2b, 0x28, 0x2b, 0xca, 0xae, 0xbe, 0x4c, 0xb8, 0x47, 0x76, 0xa9, 0xb7, 0xe2, 0x39, 0xf5, 0x2a, - 0xdf, 0x13, 0x69, 0x46, 0x3f, 0xee, 0x53, 0x16, 0xf3, 0x3d, 0xde, 0xe5, 0x5c, 0x70, 0xf4, 0x58, - 0xe5, 0xb0, 0x0c, 0xe0, 0xca, 0x7f, 0xfe, 0xea, 0xca, 0x93, 0xf0, 0x84, 0x7b, 0x2a, 0x15, 0x95, - 0xeb, 0x59, 0x35, 0xc1, 0x53, 0x3c, 0x51, 0x4d, 0xd5, 0x53, 0xbb, 0x4e, 0xe2, 0x2e, 0xe0, 0x93, - 0xf7, 0x69, 0x46, 0x97, 0x4a, 0xbc, 0xdc, 0x50, 0x86, 0xde, 0x42, 0x3d, 0x26, 0x87, 0xc2, 0x02, - 0x23, 0x30, 0xbe, 0xf7, 0x5f, 0xe0, 0xbf, 0xbe, 0x82, 0x2f, 0xe1, 0x39, 0x39, 0x14, 0xc1, 0xa3, - 0x63, 0xed, 0xdc, 0xb4, 0xb5, 0xa3, 0x90, 0x50, 0x55, 0xf7, 0x8b, 0x7e, 0xed, 0x94, 0x31, 0xf4, - 0x06, 0x6a, 0x64, 0xbb, 0xb5, 0xc0, 0x48, 0x1b, 0xdf, 0xfb, 0xee, 0x7f, 0x95, 0x72, 0x17, 0x12, - 0x96, 0xd0, 0x40, 0x3f, 0xd6, 0x0e, 0x08, 0x25, 0x84, 0x66, 0xd0, 0x28, 0x4a, 0x16, 0x93, 0x83, - 0x35, 0xe8, 0x89, 0x9f, 0x38, 0x69, 0xc8, 0xb8, 0x32, 0x68, 0x7d, 0x0d, 0x1d, 0x87, 0x02, 0x38, - 0x14, 0x25, 0x2d, 0xa4, 0x42, 0xef, 0xa9, 0x38, 0x83, 0xe8, 0x1d, 0x34, 0xf7, 0x34, 0x66, 0x9d, - 0xe5, 0xb6, 0xa7, 0xe5, 0x82, 0xa2, 0x39, 0xbc, 0x13, 0x9b, 0x32, 0x57, 0x1a, 0xa3, 0xa7, 0xe6, - 0x0f, 0x29, 0xef, 0x64, 0x9d, 0xa7, 0xd2, 0x31, 0xec, 0x7b, 0x27, 0x1d, 0x27, 0xcf, 0x51, 0x10, - 0x51, 0xe6, 0xd2, 0x71, 0xd7, 0xf7, 0x1c, 0x67, 0xd2, 0x5d, 0xc0, 0xa7, 0xff, 0x88, 0x21, 0x07, - 0xde, 0x46, 0x34, 0x49, 0x99, 0x9a, 0x42, 0x33, 0x30, 0xdb, 0xda, 0xe9, 0x1a, 0x61, 0xb7, 0xa0, - 0x67, 0x50, 0xa3, 0x2c, 0xb6, 0x06, 0xea, 0xf5, 0xb0, 0xad, 0x1d, 0xf9, 0x18, 0xca, 0xe2, 0x0a, - 0x88, 0x2e, 0xca, 0x90, 0xee, 0x28, 0x11, 0x34, 0x7e, 0x88, 0x11, 0xb9, 0xd0, 0xc8, 0x95, 0x47, - 0x0d, 0x90, 0x19, 0xc0, 0xb6, 0x76, 0x4e, 0x9d, 0xf0, 0xb4, 0x06, 0xa3, 0x5f, 0x3f, 0x6c, 0xf0, - 0xb9, 0xb1, 0xc1, 0xd7, 0xc6, 0x06, 0xc7, 0xc6, 0x06, 0xdf, 0x1a, 0x1b, 0x7c, 0x6f, 0x6c, 0xf0, - 0xe9, 0xa7, 0x7d, 0xf3, 0x61, 0x50, 0xf9, 0x91, 0xa1, 0xfe, 0xb8, 0xe9, 0xef, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x11, 0x9b, 0x96, 0x44, 0xf1, 0x03, 0x00, 0x00, -} - -func (this *TimeWindowWhen) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TimeWindowWhen) - if !ok { - that2, ok := that.(TimeWindowWhen) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Days.Equal(&that1.Days) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TimeWindowDays) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TimeWindowDays) - if !ok { - that2, ok := that.(TimeWindowDays) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.All) != len(that1.All) { - return false - } - for i := range this.All { - if !this.All[i].Equal(that1.All[i]) { - return false - } - } - if len(this.Sunday) != len(that1.Sunday) { - return false - } - for i := range this.Sunday { - if !this.Sunday[i].Equal(that1.Sunday[i]) { - return false - } - } - if len(this.Monday) != len(that1.Monday) { - return false - } - for i := range this.Monday { - if !this.Monday[i].Equal(that1.Monday[i]) { - return false - } - } - if len(this.Tuesday) != len(that1.Tuesday) { - return false - } - for i := range this.Tuesday { - if !this.Tuesday[i].Equal(that1.Tuesday[i]) { - return false - } - } - if len(this.Wednesday) != len(that1.Wednesday) { - return false - } - for i := range this.Wednesday { - if !this.Wednesday[i].Equal(that1.Wednesday[i]) { - return false - } - } - if len(this.Thursday) != len(that1.Thursday) { - return false - } - for i := range this.Thursday { - if !this.Thursday[i].Equal(that1.Thursday[i]) { - return false - } - } - if len(this.Friday) != len(that1.Friday) { - return false - } - for i := range this.Friday { - if !this.Friday[i].Equal(that1.Friday[i]) { - return false - } - } - if len(this.Saturday) != len(that1.Saturday) { - return false - } - for i := range this.Saturday { - if !this.Saturday[i].Equal(that1.Saturday[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TimeWindowTimeRange) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TimeWindowTimeRange) - if !ok { - that2, ok := that.(TimeWindowTimeRange) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Begin != that1.Begin { - return false - } - if this.End != that1.End { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *TimeWindowRepeated) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TimeWindowRepeated) - if !ok { - that2, ok := that.(TimeWindowRepeated) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Begin != that1.Begin { - return false - } - if this.End != that1.End { - return false - } - if len(this.Repeat) != len(that1.Repeat) { - return false - } - for i := range this.Repeat { - if this.Repeat[i] != that1.Repeat[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *TimeWindowWhen) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TimeWindowWhen) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TimeWindowWhen) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size, err := m.Days.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTimeWindow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TimeWindowDays) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TimeWindowDays) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TimeWindowDays) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Saturday) > 0 { - for iNdEx := len(m.Saturday) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Saturday[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTimeWindow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.Friday) > 0 { - for iNdEx := len(m.Friday) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Friday[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTimeWindow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.Thursday) > 0 { - for iNdEx := len(m.Thursday) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Thursday[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTimeWindow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.Wednesday) > 0 { - for iNdEx := len(m.Wednesday) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Wednesday[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTimeWindow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.Tuesday) > 0 { - for iNdEx := len(m.Tuesday) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tuesday[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTimeWindow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Monday) > 0 { - for iNdEx := len(m.Monday) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Monday[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTimeWindow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Sunday) > 0 { - for iNdEx := len(m.Sunday) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Sunday[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTimeWindow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.All) > 0 { - for iNdEx := len(m.All) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.All[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTimeWindow(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TimeWindowTimeRange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TimeWindowTimeRange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TimeWindowTimeRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.End) > 0 { - i -= len(m.End) - copy(dAtA[i:], m.End) - i = encodeVarintTimeWindow(dAtA, i, uint64(len(m.End))) - i-- - dAtA[i] = 0x12 - } - if len(m.Begin) > 0 { - i -= len(m.Begin) - copy(dAtA[i:], m.Begin) - i = encodeVarintTimeWindow(dAtA, i, uint64(len(m.Begin))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TimeWindowRepeated) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TimeWindowRepeated) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TimeWindowRepeated) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Repeat) > 0 { - for iNdEx := len(m.Repeat) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Repeat[iNdEx]) - copy(dAtA[i:], m.Repeat[iNdEx]) - i = encodeVarintTimeWindow(dAtA, i, uint64(len(m.Repeat[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.End) > 0 { - i -= len(m.End) - copy(dAtA[i:], m.End) - i = encodeVarintTimeWindow(dAtA, i, uint64(len(m.End))) - i-- - dAtA[i] = 0x12 - } - if len(m.Begin) > 0 { - i -= len(m.Begin) - copy(dAtA[i:], m.Begin) - i = encodeVarintTimeWindow(dAtA, i, uint64(len(m.Begin))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTimeWindow(dAtA []byte, offset int, v uint64) int { - offset -= sovTimeWindow(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedTimeWindowWhen(r randyTimeWindow, easy bool) *TimeWindowWhen { - this := &TimeWindowWhen{} - v1 := NewPopulatedTimeWindowDays(r, easy) - this.Days = *v1 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTimeWindow(r, 2) - } - return this -} - -func NewPopulatedTimeWindowDays(r randyTimeWindow, easy bool) *TimeWindowDays { - this := &TimeWindowDays{} - if r.Intn(5) != 0 { - v2 := r.Intn(5) - this.All = make([]*TimeWindowTimeRange, v2) - for i := 0; i < v2; i++ { - this.All[i] = NewPopulatedTimeWindowTimeRange(r, easy) - } - } - if r.Intn(5) != 0 { - v3 := r.Intn(5) - this.Sunday = make([]*TimeWindowTimeRange, v3) - for i := 0; i < v3; i++ { - this.Sunday[i] = NewPopulatedTimeWindowTimeRange(r, easy) - } - } - if r.Intn(5) != 0 { - v4 := r.Intn(5) - this.Monday = make([]*TimeWindowTimeRange, v4) - for i := 0; i < v4; i++ { - this.Monday[i] = NewPopulatedTimeWindowTimeRange(r, easy) - } - } - if r.Intn(5) != 0 { - v5 := r.Intn(5) - this.Tuesday = make([]*TimeWindowTimeRange, v5) - for i := 0; i < v5; i++ { - this.Tuesday[i] = NewPopulatedTimeWindowTimeRange(r, easy) - } - } - if r.Intn(5) != 0 { - v6 := r.Intn(5) - this.Wednesday = make([]*TimeWindowTimeRange, v6) - for i := 0; i < v6; i++ { - this.Wednesday[i] = NewPopulatedTimeWindowTimeRange(r, easy) - } - } - if r.Intn(5) != 0 { - v7 := r.Intn(5) - this.Thursday = make([]*TimeWindowTimeRange, v7) - for i := 0; i < v7; i++ { - this.Thursday[i] = NewPopulatedTimeWindowTimeRange(r, easy) - } - } - if r.Intn(5) != 0 { - v8 := r.Intn(5) - this.Friday = make([]*TimeWindowTimeRange, v8) - for i := 0; i < v8; i++ { - this.Friday[i] = NewPopulatedTimeWindowTimeRange(r, easy) - } - } - if r.Intn(5) != 0 { - v9 := r.Intn(5) - this.Saturday = make([]*TimeWindowTimeRange, v9) - for i := 0; i < v9; i++ { - this.Saturday[i] = NewPopulatedTimeWindowTimeRange(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTimeWindow(r, 9) - } - return this -} - -func NewPopulatedTimeWindowTimeRange(r randyTimeWindow, easy bool) *TimeWindowTimeRange { - this := &TimeWindowTimeRange{} - this.Begin = string(randStringTimeWindow(r)) - this.End = string(randStringTimeWindow(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTimeWindow(r, 3) - } - return this -} - -func NewPopulatedTimeWindowRepeated(r randyTimeWindow, easy bool) *TimeWindowRepeated { - this := &TimeWindowRepeated{} - this.Begin = string(randStringTimeWindow(r)) - this.End = string(randStringTimeWindow(r)) - v10 := r.Intn(10) - this.Repeat = make([]string, v10) - for i := 0; i < v10; i++ { - this.Repeat[i] = string(randStringTimeWindow(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTimeWindow(r, 4) - } - return this -} - -type randyTimeWindow interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTimeWindow(r randyTimeWindow) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTimeWindow(r randyTimeWindow) string { - v11 := r.Intn(100) - tmps := make([]rune, v11) - for i := 0; i < v11; i++ { - tmps[i] = randUTF8RuneTimeWindow(r) - } - return string(tmps) -} -func randUnrecognizedTimeWindow(r randyTimeWindow, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldTimeWindow(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldTimeWindow(dAtA []byte, r randyTimeWindow, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateTimeWindow(dAtA, uint64(key)) - v12 := r.Int63() - if r.Intn(2) == 0 { - v12 *= -1 - } - dAtA = encodeVarintPopulateTimeWindow(dAtA, uint64(v12)) - case 1: - dAtA = encodeVarintPopulateTimeWindow(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateTimeWindow(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateTimeWindow(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateTimeWindow(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateTimeWindow(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *TimeWindowWhen) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Days.Size() - n += 1 + l + sovTimeWindow(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TimeWindowDays) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.All) > 0 { - for _, e := range m.All { - l = e.Size() - n += 1 + l + sovTimeWindow(uint64(l)) - } - } - if len(m.Sunday) > 0 { - for _, e := range m.Sunday { - l = e.Size() - n += 1 + l + sovTimeWindow(uint64(l)) - } - } - if len(m.Monday) > 0 { - for _, e := range m.Monday { - l = e.Size() - n += 1 + l + sovTimeWindow(uint64(l)) - } - } - if len(m.Tuesday) > 0 { - for _, e := range m.Tuesday { - l = e.Size() - n += 1 + l + sovTimeWindow(uint64(l)) - } - } - if len(m.Wednesday) > 0 { - for _, e := range m.Wednesday { - l = e.Size() - n += 1 + l + sovTimeWindow(uint64(l)) - } - } - if len(m.Thursday) > 0 { - for _, e := range m.Thursday { - l = e.Size() - n += 1 + l + sovTimeWindow(uint64(l)) - } - } - if len(m.Friday) > 0 { - for _, e := range m.Friday { - l = e.Size() - n += 1 + l + sovTimeWindow(uint64(l)) - } - } - if len(m.Saturday) > 0 { - for _, e := range m.Saturday { - l = e.Size() - n += 1 + l + sovTimeWindow(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TimeWindowTimeRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Begin) - if l > 0 { - n += 1 + l + sovTimeWindow(uint64(l)) - } - l = len(m.End) - if l > 0 { - n += 1 + l + sovTimeWindow(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TimeWindowRepeated) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Begin) - if l > 0 { - n += 1 + l + sovTimeWindow(uint64(l)) - } - l = len(m.End) - if l > 0 { - n += 1 + l + sovTimeWindow(uint64(l)) - } - if len(m.Repeat) > 0 { - for _, s := range m.Repeat { - l = len(s) - n += 1 + l + sovTimeWindow(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovTimeWindow(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTimeWindow(x uint64) (n int) { - return sovTimeWindow(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TimeWindowWhen) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TimeWindowWhen: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimeWindowWhen: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Days", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Days.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTimeWindow(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTimeWindow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TimeWindowDays) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TimeWindowDays: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimeWindowDays: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field All", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.All = append(m.All, &TimeWindowTimeRange{}) - if err := m.All[len(m.All)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sunday", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sunday = append(m.Sunday, &TimeWindowTimeRange{}) - if err := m.Sunday[len(m.Sunday)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Monday", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Monday = append(m.Monday, &TimeWindowTimeRange{}) - if err := m.Monday[len(m.Monday)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tuesday", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tuesday = append(m.Tuesday, &TimeWindowTimeRange{}) - if err := m.Tuesday[len(m.Tuesday)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Wednesday", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Wednesday = append(m.Wednesday, &TimeWindowTimeRange{}) - if err := m.Wednesday[len(m.Wednesday)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Thursday", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Thursday = append(m.Thursday, &TimeWindowTimeRange{}) - if err := m.Thursday[len(m.Thursday)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Friday", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Friday = append(m.Friday, &TimeWindowTimeRange{}) - if err := m.Friday[len(m.Friday)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Saturday", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Saturday = append(m.Saturday, &TimeWindowTimeRange{}) - if err := m.Saturday[len(m.Saturday)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTimeWindow(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTimeWindow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TimeWindowTimeRange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TimeWindowTimeRange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimeWindowTimeRange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Begin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Begin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.End = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTimeWindow(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTimeWindow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TimeWindowRepeated) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TimeWindowRepeated: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimeWindowRepeated: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Begin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Begin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.End = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Repeat", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTimeWindow - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTimeWindow - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Repeat = append(m.Repeat, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTimeWindow(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTimeWindow - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTimeWindow(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTimeWindow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTimeWindow - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTimeWindow - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTimeWindow - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTimeWindow = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTimeWindow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTimeWindow = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/time_window.proto b/api/core/v2/time_window.proto deleted file mode 100644 index 4d724a3b6a..0000000000 --- a/api/core/v2/time_window.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// TimeWindowWhen defines the "when" attributes for time windows -message TimeWindowWhen { - // Days is a hash of days - TimeWindowDays days = 1 [ (gogoproto.jsontag) = "days", (gogoproto.nullable) = false ]; -} - -// TimeWindowDays defines the days of a time window -message TimeWindowDays { - repeated TimeWindowTimeRange all = 1 [ (gogoproto.nullable) = true ]; - repeated TimeWindowTimeRange sunday = 2 [ (gogoproto.nullable) = true ]; - repeated TimeWindowTimeRange monday = 3 [ (gogoproto.nullable) = true ]; - repeated TimeWindowTimeRange tuesday = 4 [ (gogoproto.nullable) = true ]; - repeated TimeWindowTimeRange wednesday = 5 [ (gogoproto.nullable) = true ]; - repeated TimeWindowTimeRange thursday = 6 [ (gogoproto.nullable) = true ]; - repeated TimeWindowTimeRange friday = 7 [ (gogoproto.nullable) = true ]; - repeated TimeWindowTimeRange saturday = 8 [ (gogoproto.nullable) = true ]; -} - -// TimeWindowTimeRange defines the time ranges of a time -message TimeWindowTimeRange { - // Begin is the time which the time window should begin, in the format - // '3:00PM', which satisfies the time.Kitchen format - string begin = 1 [ (gogoproto.jsontag) = "begin" ]; - - // End is the time which the filter should end, in the format '3:00PM', which - // satisfies the time.Kitchen format - string end = 2 [ (gogoproto.jsontag) = "end" ]; -} - -message TimeWindowRepeated { - // Begin is the time which the date/time window should begin, in the ISO3339 - // format - string begin = 1 [ (gogoproto.jsontag) = "begin" ]; - - // End is the time which the date/time window should begin, in the ISO3339 - // format - string end = 2 [ (gogoproto.jsontag) = "end" ]; - - // The time period the begin and end time repeat - repeated string repeat = 3 [ (gogoproto.jsontag) = "repeat" ]; -} diff --git a/api/core/v2/time_window_test.go b/api/core/v2/time_window_test.go deleted file mode 100644 index df691d9f9b..0000000000 --- a/api/core/v2/time_window_test.go +++ /dev/null @@ -1,652 +0,0 @@ -package v2 - -import ( - "fmt" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func mustParse(t *testing.T, timeStr string) time.Time { - tm, err := time.Parse(time.RFC3339, timeStr) - if err != nil { - t.Fatal(err) - } - return tm -} - -func TestInWindow(t *testing.T) { - testCases := []struct { - name string - now time.Time - window TimeWindowTimeRange - expected bool - expectedError bool - }{ - { - name: "is within window", - now: mustParse(t, "2006-01-02T15:04:05Z"), - window: TimeWindowTimeRange{ - Begin: "3:00PM", - End: "4:00PM", - }, - expected: true, - expectedError: false, - }, - { - name: "is outside window", - now: mustParse(t, "2006-01-02T10:04:05Z"), - window: TimeWindowTimeRange{ - Begin: "3:00PM", - End: "4:00PM", - }, - expected: false, - expectedError: false, - }, - { - name: "unsupported time window beginning format", - now: mustParse(t, "2006-01-02T10:04:05Z"), - window: TimeWindowTimeRange{ - Begin: "15:00", - End: "4:00PM", - }, - expected: false, - expectedError: true, - }, - { - name: "unsupported time window ending format", - now: mustParse(t, "2006-01-02T10:04:05Z"), - window: TimeWindowTimeRange{ - Begin: "3:00PM", - End: "16:00", - }, - expected: false, - expectedError: true, - }, - { - name: "supports time window with whitespaces for backward compatibility", - now: mustParse(t, "2006-01-02T15:04:05Z"), - window: TimeWindowTimeRange{ - Begin: "3:00 PM", - End: "4:00 PM", - }, - expected: true, - expectedError: false, - }, - { - name: "is within the first day of a window that spans on two days", - now: mustParse(t, "2006-01-02T15:04:05Z"), - window: TimeWindowTimeRange{ - Begin: "3:00PM", - End: "8:00AM", - }, - expected: true, - expectedError: false, - }, - { - name: "is within the second day of a window that spans on two days", - now: mustParse(t, "2006-01-02T05:04:05Z"), - window: TimeWindowTimeRange{ - Begin: "3:00PM", - End: "8:00AM", - }, - expected: true, - expectedError: false, - }, - { - name: "is outside of a window that spans on two days", - now: mustParse(t, "2006-01-02T10:04:05Z"), - window: TimeWindowTimeRange{ - Begin: "3:00PM", - End: "8:00AM", - }, - expected: false, - expectedError: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - result, err := tc.window.InWindow(tc.now) - if err != nil && !tc.expectedError { - assert.FailNow(t, err.Error()) - } - assert.Equal(t, tc.expected, result) - }) - } -} - -func TestInWindows(t *testing.T) { - testCases := []struct { - name string - now time.Time - windows TimeWindowWhen - expected bool - expectedError bool - }{ - { - name: "no time windows", - now: mustParse(t, "2006-01-02T15:04:05Z"), - windows: TimeWindowWhen{ - Days: TimeWindowDays{}, - }, - expected: false, - expectedError: false, - }, - { - name: "is within the time window of all days", - now: mustParse(t, "2006-01-02T15:04:05Z"), - windows: TimeWindowWhen{ - Days: TimeWindowDays{ - All: []*TimeWindowTimeRange{ - { - Begin: "3:00PM", - End: "4:00PM", - }, - }, - }, - }, - expected: true, - expectedError: false, - }, - { - name: "is within one of the time windows of all days", - now: mustParse(t, "2006-01-02T00:00:00Z"), - windows: TimeWindowWhen{ - Days: TimeWindowDays{ - All: []*TimeWindowTimeRange{ - { - Begin: "10:00AM", - End: "11:00AM", - }, { - Begin: "11:00 PM", - End: "1:00 AM", - }, - }, - }, - }, - expected: true, - expectedError: false, - }, - { - name: "is within one the time window of Monday", - now: mustParse(t, "2006-01-02T17:04:05Z"), // Weekday().String() == Monday - windows: TimeWindowWhen{ - Days: TimeWindowDays{ - All: []*TimeWindowTimeRange{ - { - Begin: "3:00PM", - End: "4:00PM", - }, - }, - Monday: []*TimeWindowTimeRange{ - { - Begin: "1:00PM", - End: "2:00PM", - }, { - Begin: "5:00PM", - End: "6:00PM", - }, - }, - }, - }, - expected: true, - expectedError: false, - }, - { - name: "is outside the time windows of All", - now: mustParse(t, "2006-01-02T17:04:05Z"), - windows: TimeWindowWhen{ - Days: TimeWindowDays{ - All: []*TimeWindowTimeRange{ - { - Begin: "3:00PM", - End: "4:00PM", - }, - }, - }, - }, - expected: false, - expectedError: false, - }, - { - name: "is outside the time window of any days", - now: mustParse(t, "2006-01-02T17:04:05Z"), // .Weekday().String() == Monday - windows: TimeWindowWhen{ - Days: TimeWindowDays{ - All: []*TimeWindowTimeRange{ - { - Begin: "3:00PM", - End: "4:00PM", - }, - }, - Tuesday: []*TimeWindowTimeRange{ - { - Begin: "5:00PM", - End: "6:00PM", - }, - }, - }, - }, - expected: false, - expectedError: false, - }, - { - name: "invalid time format", - now: mustParse(t, "2006-01-02T17:04:05Z"), - windows: TimeWindowWhen{ - Days: TimeWindowDays{ - All: []*TimeWindowTimeRange{ - { - Begin: "15:00", - End: "16:00", - }, - }, - }, - }, - expected: false, - expectedError: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - result, err := tc.windows.InWindows(tc.now) - if err != nil && !tc.expectedError { - assert.FailNow(t, err.Error()) - } - assert.Equal(t, tc.expected, result) - }) - } -} - -func TestTimeWindowRepeated_InWindows(t *testing.T) { - currentTime, err := time.Parse(time.RFC3339, "2022-03-28T15:09:08+06:00") - assert.NoError(t, err) - assert.NotNil(t, currentTime) - fmt.Println("current", currentTime, currentTime.Weekday()) - - now := time.Now().In(currentTime.Location()) - fmt.Println("now", now, now.Weekday()) - location := currentTime.Location() - fmt.Println("location", location.String()) - assert.NotNil(t, location) -} - -func parseTime(t *testing.T, s string) time.Time { - ts, err := time.Parse(time.RFC3339, s) - if err != nil { - t.Fatal(err) - } - return ts -} - -func TestTimeWindowRepeated_InDayTimeRange(t *testing.T) { - - tests := []struct { - name string - beginTime string - endTime string - actualTime time.Time - weekday time.Weekday - expectedResult bool - }{ - { - "simple positive", - "2022-03-22T09:00:00+00:00", // tuesday - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T10:00:00+00:00"), - time.Tuesday, - true, - }, { - "simple negative lower hour", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T08:00:00+00:00"), - time.Tuesday, - false, - }, { - "simple negative higher hour", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T13:00:00+00:00"), - time.Tuesday, - false, - }, { - "simple negative lower minutes", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T08:59:00+00:00"), - time.Tuesday, - false, - }, { - "simple negative higher minutes", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T11:01:00+00:00"), - time.Tuesday, - false, - }, { - "simple negative lower seconds", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T08:59:59+00:00"), - time.Tuesday, - false, - }, { - "simple negative higher seconds", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T11:00:01+00:00"), - time.Tuesday, - false, - }, { - "simple negative different day before", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-21T10:00:00+00:00"), // monday - time.Tuesday, - false, - }, { - "simple negative different day after", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-23T10:00:00+00:00"), // wednesday - time.Tuesday, - false, - }, { - "positive next week", - "2022-03-22T09:00:00-07:00", - "2022-03-22T11:00:00-07:00", - parseTime(t, "2022-03-29T10:00:00-07:00"), // wednesday - time.Tuesday, - true, - }, { - "negative next week before", - "2022-03-22T09:00:00-07:00", - "2022-03-22T11:00:00-07:00", - parseTime(t, "2022-03-27T10:00:00-07:00"), // wednesday - time.Tuesday, - false, - }, { - "negative next week after", - "2022-03-22T09:00:00-07:00", - "2022-03-22T11:00:00-07:00", - parseTime(t, "2022-03-30T10:00:00-07:00"), // wednesday - time.Tuesday, - false, - }, { - "positive next week different time offset", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-29T06:00:00-04:00"), // wednesday - time.Tuesday, - true, - }, { - "positive multi days", - "2022-03-22T09:00:00+00:00", - "2022-03-24T11:00:00+00:00", - parseTime(t, "2022-03-30T06:00:00-04:00"), // wednesday - time.Tuesday, - true, - }, { - "negative previous week", - "2022-03-22T09:00:00-04:00", - "2022-03-22T11:00:00-04:00", - parseTime(t, "2022-03-15T10:00:00-04:00"), // tuesday - time.Tuesday, - false, - }, { - "GH-4847 lower bound day time range", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T09:00:00+00:00"), - time.Tuesday, - true, - }, { - "GH-4847 upper bound day time range", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T11:00:01+00:00").Add(-1 * time.Nanosecond), - time.Tuesday, - true, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - window := TimeWindowRepeated{ - Begin: test.beginTime, - End: test.endTime, - } - - assert.Equal(t, test.expectedResult, window.inDayTimeRange(test.actualTime, test.weekday)) - }) - } -} - -func TestTimeWindowRepeated_InTimeRange(t *testing.T) { - tests := []struct { - name string - beginTime string - endTime string - actualTime time.Time - expectedResult bool - }{ - { - "simple positive", - "2022-03-22T09:00:00+00:00", // tuesday - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T10:00:00+00:00"), - true, - }, { - "negative before valid times", - "2022-03-22T09:00:00-07:00", // tuesday - "2022-03-22T11:00:00-07:00", - parseTime(t, "2022-01-12T10:00:00-07:00"), - false, - }, { - "simple negative before", - "2022-03-22T09:00:00+00:00", // tuesday - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T08:00:00+00:00"), - false, - }, { - "simple negative after", - "2022-03-22T09:00:00+00:00", // tuesday - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T11:05:00+00:00"), - false, - }, { - "positive after different day", - "2022-03-22T09:00:00-07:00", // tuesday - "2022-03-22T11:00:00-07:00", - parseTime(t, "2023-01-12T10:00:00-07:00"), - true, - }, { - "negative before different day", - "2022-03-22T09:00:00-07:00", // tuesday - "2022-03-22T11:00:00-07:00", - parseTime(t, "2021-01-12T12:00:00-07:00"), - false, - }, { - "negative after different day", - "2022-03-22T09:00:00-07:00", // tuesday - "2022-03-22T11:00:00-07:00", - parseTime(t, "2023-01-12T08:59:59-07:00"), - false, - }, { - "GH-4847 lower bound time range", - "2022-03-22T09:00:00+00:00", // tuesday - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T09:00:00+00:00"), - true, - }, { - "GH-4847 upper bound time range", - "2022-03-22T09:00:00+00:00", // tuesday - "2022-03-22T11:00:00+00:00", - parseTime(t, "2022-03-22T11:00:01+00:00").Add(-1 * time.Nanosecond), - true, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - window := TimeWindowRepeated{ - Begin: test.beginTime, - End: test.endTime, - } - - assert.Equal(t, test.expectedResult, window.inTimeRange(test.actualTime)) - }) - } -} - -func TestTimeWindowRepeated_InMonthlyTimeRange(t *testing.T) { - tests := []struct { - name string - beginTime string - endTime string - actualTime string - expectedResult bool - }{ - { - "simple positive", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2022-03-22T10:00:00+00:00", - true, - }, { - "previous month same day", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2022-02-22T10:00:00+00:00", - false, - }, { - "next month same day", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2022-04-22T10:00:00+00:00", - true, - }, { - "next year same day", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2023-04-22T10:00:00+00:00", - true, - }, { - "same day different time", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2022-03-22T11:01:00+00:00", - false, - }, { - "next month same day different time before", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2022-04-22T08:00:00+00:00", - false, - }, { - "next month same day different time after", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2022-04-22T11:02:00+00:00", - false, - }, { - "next month different day before", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2022-04-21T10:00:00+00:00", - false, - }, { - "next month different day after", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2022-04-23T10:00:00+00:00", - false, - }, { - "next year different day before", - "2022-03-22T09:00:00+00:00", // tuesday - "2022-03-22T11:00:00+00:00", - "2023-04-20T10:00:00+00:00", - false, - }, { - "next year different day before", - "2022-03-22T09:00:00+00:00", // tuesday - "2022-03-22T11:00:00+00:00", - "2023-04-23T10:00:00+00:00", - false, - }, - } - - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - window := TimeWindowRepeated{ - Begin: test.beginTime, - End: test.endTime, - } - - actualTime, err := time.Parse(time.RFC3339, test.actualTime) - require.NoError(t, err) - - assert.Equal(t, test.expectedResult, window.inMonthlyTimeRange(actualTime)) - }) - } -} - -func TestTimeWindowRepeated_InYearlyTimeRange(t *testing.T) { - tests := []struct { - name string - beginTime string - endTime string - actualTime string - expectedResult bool - }{ - { - "simple positive", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2022-03-22T10:00:00+00:00", - true, - }, { - "positive next year", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2023-03-22T10:00:00+00:00", - true, - }, { - "negative previous year matching date and time", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2021-03-22T10:00:00+00:00", - false, - }, { - "this year different date before", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2023-03-21T10:00:00+00:00", - false, - }, { - "this year different date after", - "2022-03-22T09:00:00+00:00", - "2022-03-22T11:00:00+00:00", - "2023-03-23T10:00:00+00:00", - false, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - window := TimeWindowRepeated{ - Begin: test.beginTime, - End: test.endTime, - } - - actualTime, err := time.Parse(time.RFC3339, test.actualTime) - require.NoError(t, err) - - assert.Equal(t, test.expectedResult, window.inYearlyTimeRange(actualTime)) - }) - } -} diff --git a/api/core/v2/time_windowpb_test.go b/api/core/v2/time_windowpb_test.go deleted file mode 100644 index 657be8199f..0000000000 --- a/api/core/v2/time_windowpb_test.go +++ /dev/null @@ -1,519 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/time_window.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestTimeWindowWhenProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowWhen(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowWhen{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimeWindowWhenMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowWhen(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowWhen{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowDaysProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowDays(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowDays{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimeWindowDaysMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowDays(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowDays{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowTimeRangeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowTimeRange(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowTimeRange{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimeWindowTimeRangeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowTimeRange(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowTimeRange{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowRepeatedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowRepeated(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowRepeated{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimeWindowRepeatedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowRepeated(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowRepeated{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowWhenJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowWhen(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowWhen{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimeWindowDaysJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowDays(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowDays{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimeWindowTimeRangeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowTimeRange(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowTimeRange{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimeWindowRepeatedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowRepeated(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TimeWindowRepeated{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTimeWindowWhenProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowWhen(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &TimeWindowWhen{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowWhenProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowWhen(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &TimeWindowWhen{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowDaysProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowDays(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &TimeWindowDays{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowDaysProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowDays(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &TimeWindowDays{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowTimeRangeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowTimeRange(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &TimeWindowTimeRange{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowTimeRangeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowTimeRange(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &TimeWindowTimeRange{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowRepeatedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowRepeated(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &TimeWindowRepeated{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowRepeatedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowRepeated(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &TimeWindowRepeated{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTimeWindowWhenSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowWhen(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTimeWindowDaysSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowDays(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTimeWindowTimeRangeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowTimeRange(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestTimeWindowRepeatedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTimeWindowRepeated(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/tls.go b/api/core/v2/tls.go deleted file mode 100644 index bd4a8f47a3..0000000000 --- a/api/core/v2/tls.go +++ /dev/null @@ -1,123 +0,0 @@ -package v2 - -import ( - "crypto/tls" - "crypto/x509" - "fmt" - "io/ioutil" -) - -var ( - // PCI compliance as of Jun 30, 2018: anything under TLS 1.1 must be disabled - // we bump this up to TLS 1.2 so we can support the best possible ciphers - tlsMinVersion = uint16(tls.VersionTLS12) - // DefaultCipherSuites overrides the default cipher suites in order to disable - // CBC suites (Lucky13 attack) this means TLS 1.1 can't work (no GCM) - // additionally, we should only use perfect forward secrecy ciphers - DefaultCipherSuites = []uint16{ - tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - // these ciphers require go 1.8+ - tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, - tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, - } - // optimal EC curve preference - // curve reference: http://safecurves.cr.yp.to/ - tlsCurvePreferences = []tls.CurveID{ - // this curve is a non-NIST curve with no NSA influence. Prefer this over all others! - tls.X25519, - // These curves are provided by NIST; optimal order - tls.CurveP384, - tls.CurveP256, - tls.CurveP521, - } -) - -// ToServerTLSConfig should only be used for server TLS configuration. outputs a tls.Config from TLSOptions -func (t *TLSOptions) ToServerTLSConfig() (*tls.Config, error) { - cfg := tls.Config{} - - if t.GetTrustedCAFile() != "" { - caCertPool, err := LoadCACerts(t.TrustedCAFile) - if err != nil { - return nil, err - } - // client trust store should ONLY consist of specified CAs - cfg.ClientCAs = caCertPool - } - - if t.GetCertFile() != "" && t.GetKeyFile() != "" { - cert, err := tls.LoadX509KeyPair(t.GetCertFile(), t.GetKeyFile()) - if err != nil { - return nil, fmt.Errorf("Error loading tls server certificate: %s", err) - } - - cfg.Certificates = []tls.Certificate{cert} - } - - // useful when we present multiple certificates - //nolint:staticcheck // ignore SA1019 for old code - cfg.BuildNameToCertificate() - - // apply hardened TLS settings - cfg.MinVersion = tlsMinVersion - cfg.CurvePreferences = tlsCurvePreferences - cfg.CipherSuites = DefaultCipherSuites - // Tell the server to prefer it's own cipher suite ordering over the client's preferred ordering - cfg.PreferServerCipherSuites = true - - // Enable TLS client authentication if configured - if t.GetClientAuthType() { - cfg.ClientAuth = tls.RequireAndVerifyClientCert - } - - return &cfg, nil -} - -// ToClientTLSConfig is like ToServerTLSConfig but intended for TLS client config. -func (t *TLSOptions) ToClientTLSConfig() (*tls.Config, error) { - cfg := tls.Config{} - cfg.InsecureSkipVerify = t.GetInsecureSkipVerify() - - if t.GetTrustedCAFile() != "" { - caCertPool, err := LoadCACerts(t.TrustedCAFile) - if err != nil { - return nil, err - } - // client trust store should ONLY consist of specified CAs - cfg.RootCAs = caCertPool - } - - if t.GetCertFile() != "" && t.GetKeyFile() != "" { - cert, err := tls.LoadX509KeyPair(t.GetCertFile(), t.GetKeyFile()) - if err != nil { - return nil, fmt.Errorf("Error loading tls client certificate: %s", err) - } - - cfg.Certificates = []tls.Certificate{cert} - } - - // apply hardened TLS settings - cfg.MinVersion = tlsMinVersion - cfg.CurvePreferences = tlsCurvePreferences - cfg.CipherSuites = DefaultCipherSuites - - return &cfg, nil -} - -// LoadCACerts takes the path to a certificate bundle file in PEM format and try -// to create a x509.CertPool out of it. -func LoadCACerts(path string) (*x509.CertPool, error) { - caCerts, err := ioutil.ReadFile(path) - if err != nil { - return nil, fmt.Errorf("Error reading CA file: %s", err) - } - caCertPool := x509.NewCertPool() - if !caCertPool.AppendCertsFromPEM(caCerts) { - return nil, fmt.Errorf("No certificates could be parsed out of %s", path) - } - - return caCertPool, nil -} diff --git a/api/core/v2/tls.pb.go b/api/core/v2/tls.pb.go deleted file mode 100644 index b9a20840c5..0000000000 --- a/api/core/v2/tls.pb.go +++ /dev/null @@ -1,650 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/tls.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// TLSOptions holds TLS options that are used across the varying Sensu -// components -type TLSOptions struct { - CertFile string `protobuf:"bytes,1,opt,name=cert_file,json=certFile,proto3" json:"cert_file,omitempty"` - KeyFile string `protobuf:"bytes,2,opt,name=key_file,json=keyFile,proto3" json:"key_file,omitempty"` - TrustedCAFile string `protobuf:"bytes,3,opt,name=trusted_ca_file,json=trustedCaFile,proto3" json:"trusted_ca_file,omitempty"` - InsecureSkipVerify bool `protobuf:"varint,4,opt,name=insecure_skip_verify,json=insecureSkipVerify,proto3" json:"insecure_skip_verify"` - ClientAuthType bool `protobuf:"varint,5,opt,name=client_auth_type,json=clientAuthType,proto3" json:"client_auth_type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TLSOptions) Reset() { *m = TLSOptions{} } -func (m *TLSOptions) String() string { return proto.CompactTextString(m) } -func (*TLSOptions) ProtoMessage() {} -func (*TLSOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_132ffabeafc49c65, []int{0} -} -func (m *TLSOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TLSOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TLSOptions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TLSOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_TLSOptions.Merge(m, src) -} -func (m *TLSOptions) XXX_Size() int { - return m.Size() -} -func (m *TLSOptions) XXX_DiscardUnknown() { - xxx_messageInfo_TLSOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_TLSOptions proto.InternalMessageInfo - -func (m *TLSOptions) GetCertFile() string { - if m != nil { - return m.CertFile - } - return "" -} - -func (m *TLSOptions) GetKeyFile() string { - if m != nil { - return m.KeyFile - } - return "" -} - -func (m *TLSOptions) GetTrustedCAFile() string { - if m != nil { - return m.TrustedCAFile - } - return "" -} - -func (m *TLSOptions) GetInsecureSkipVerify() bool { - if m != nil { - return m.InsecureSkipVerify - } - return false -} - -func (m *TLSOptions) GetClientAuthType() bool { - if m != nil { - return m.ClientAuthType - } - return false -} - -func init() { - proto.RegisterType((*TLSOptions)(nil), "sensu.core.v2.TLSOptions") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/tls.proto", fileDescriptor_132ffabeafc49c65) -} - -var fileDescriptor_132ffabeafc49c65 = []byte{ - // 327 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xbd, 0x4e, 0xf3, 0x30, - 0x14, 0x40, 0x3f, 0xf7, 0xe3, 0xa7, 0xb5, 0x54, 0x7e, 0x22, 0x86, 0x00, 0x92, 0x5b, 0x31, 0x75, - 0x21, 0x56, 0x5b, 0x16, 0x36, 0xda, 0x4a, 0x0c, 0x08, 0x09, 0x29, 0xad, 0x18, 0x58, 0xa2, 0x34, - 0xdc, 0xa6, 0x56, 0x42, 0x6c, 0xc5, 0x76, 0xa4, 0xbc, 0x09, 0x8f, 0xc0, 0x23, 0xf0, 0x08, 0x8c, - 0x3c, 0x41, 0x05, 0x61, 0x63, 0x47, 0x62, 0x44, 0xb1, 0x41, 0x62, 0x60, 0xb1, 0xac, 0x73, 0xce, - 0xbd, 0xc3, 0xc5, 0x34, 0x66, 0x6a, 0xa9, 0xe7, 0x5e, 0xc4, 0xef, 0xa8, 0x84, 0x4c, 0x6a, 0xfb, - 0x1e, 0xc7, 0x9c, 0x86, 0x82, 0xd1, 0x88, 0xe7, 0x40, 0x8b, 0x01, 0x55, 0xa9, 0xf4, 0x44, 0xce, - 0x15, 0x77, 0xda, 0xc6, 0x7b, 0xb5, 0xf0, 0x8a, 0xc1, 0xc1, 0xc9, 0xaf, 0xf9, 0x98, 0xc7, 0x9c, - 0x9a, 0x6a, 0xae, 0x17, 0x67, 0x45, 0xdf, 0x1b, 0x7a, 0x7d, 0x03, 0x0d, 0x33, 0x3f, 0xbb, 0xe4, - 0xe8, 0x03, 0x61, 0x3c, 0xbb, 0x9c, 0x5e, 0x09, 0xc5, 0x78, 0x26, 0x9d, 0x43, 0xdc, 0x8a, 0x20, - 0x57, 0xc1, 0x82, 0xa5, 0xe0, 0xa2, 0x2e, 0xea, 0xb5, 0xfc, 0x66, 0x0d, 0xce, 0x59, 0x0a, 0xce, - 0x3e, 0x6e, 0x26, 0x50, 0x5a, 0xd7, 0x30, 0x6e, 0x33, 0x81, 0xd2, 0xa8, 0x53, 0xbc, 0xad, 0x72, - 0x2d, 0x15, 0xdc, 0x06, 0x51, 0x68, 0x8b, 0xff, 0x75, 0x31, 0xde, 0xad, 0x56, 0x9d, 0xf6, 0xcc, - 0xaa, 0xc9, 0xa8, 0x6e, 0xfd, 0xf6, 0x77, 0x39, 0x09, 0xcd, 0xe8, 0x05, 0xde, 0x63, 0x99, 0x84, - 0x48, 0xe7, 0x10, 0xc8, 0x84, 0x89, 0xa0, 0x80, 0x9c, 0x2d, 0x4a, 0x77, 0xad, 0x8b, 0x7a, 0xcd, - 0xb1, 0xfb, 0xbe, 0xea, 0xfc, 0xe9, 0x7d, 0xe7, 0x87, 0x4e, 0x13, 0x26, 0xae, 0x0d, 0x73, 0x7a, - 0x78, 0x27, 0x4a, 0x19, 0x64, 0x2a, 0x08, 0xb5, 0x5a, 0x06, 0xaa, 0x14, 0xe0, 0xae, 0xd7, 0x7b, - 0xfc, 0x2d, 0xcb, 0x47, 0x5a, 0x2d, 0x67, 0xa5, 0x80, 0x71, 0xf7, 0xf3, 0x95, 0xa0, 0x87, 0x8a, - 0xa0, 0xc7, 0x8a, 0xa0, 0xa7, 0x8a, 0xa0, 0xe7, 0x8a, 0xa0, 0x97, 0x8a, 0xa0, 0xfb, 0x37, 0xf2, - 0xef, 0xa6, 0x51, 0x0c, 0xe6, 0x1b, 0xe6, 0x40, 0xc3, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x65, - 0x79, 0x45, 0x58, 0x98, 0x01, 0x00, 0x00, -} - -func (this *TLSOptions) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TLSOptions) - if !ok { - that2, ok := that.(TLSOptions) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.CertFile != that1.CertFile { - return false - } - if this.KeyFile != that1.KeyFile { - return false - } - if this.TrustedCAFile != that1.TrustedCAFile { - return false - } - if this.InsecureSkipVerify != that1.InsecureSkipVerify { - return false - } - if this.ClientAuthType != that1.ClientAuthType { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *TLSOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TLSOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TLSOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ClientAuthType { - i-- - if m.ClientAuthType { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.InsecureSkipVerify { - i-- - if m.InsecureSkipVerify { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.TrustedCAFile) > 0 { - i -= len(m.TrustedCAFile) - copy(dAtA[i:], m.TrustedCAFile) - i = encodeVarintTls(dAtA, i, uint64(len(m.TrustedCAFile))) - i-- - dAtA[i] = 0x1a - } - if len(m.KeyFile) > 0 { - i -= len(m.KeyFile) - copy(dAtA[i:], m.KeyFile) - i = encodeVarintTls(dAtA, i, uint64(len(m.KeyFile))) - i-- - dAtA[i] = 0x12 - } - if len(m.CertFile) > 0 { - i -= len(m.CertFile) - copy(dAtA[i:], m.CertFile) - i = encodeVarintTls(dAtA, i, uint64(len(m.CertFile))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTls(dAtA []byte, offset int, v uint64) int { - offset -= sovTls(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedTLSOptions(r randyTls, easy bool) *TLSOptions { - this := &TLSOptions{} - this.CertFile = string(randStringTls(r)) - this.KeyFile = string(randStringTls(r)) - this.TrustedCAFile = string(randStringTls(r)) - this.InsecureSkipVerify = bool(bool(r.Intn(2) == 0)) - this.ClientAuthType = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedTls(r, 6) - } - return this -} - -type randyTls interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTls(r randyTls) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringTls(r randyTls) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneTls(r) - } - return string(tmps) -} -func randUnrecognizedTls(r randyTls, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldTls(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldTls(dAtA []byte, r randyTls, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateTls(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateTls(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateTls(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateTls(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateTls(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateTls(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateTls(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *TLSOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CertFile) - if l > 0 { - n += 1 + l + sovTls(uint64(l)) - } - l = len(m.KeyFile) - if l > 0 { - n += 1 + l + sovTls(uint64(l)) - } - l = len(m.TrustedCAFile) - if l > 0 { - n += 1 + l + sovTls(uint64(l)) - } - if m.InsecureSkipVerify { - n += 2 - } - if m.ClientAuthType { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovTls(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTls(x uint64) (n int) { - return sovTls(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TLSOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTls - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TLSOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TLSOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CertFile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTls - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTls - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTls - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CertFile = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyFile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTls - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTls - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTls - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyFile = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrustedCAFile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTls - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTls - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTls - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TrustedCAFile = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InsecureSkipVerify", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTls - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InsecureSkipVerify = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientAuthType", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTls - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ClientAuthType = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTls(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTls - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTls(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTls - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTls - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTls - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTls - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTls - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTls - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTls = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTls = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTls = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/tls.proto b/api/core/v2/tls.proto deleted file mode 100644 index d69a9f3146..0000000000 --- a/api/core/v2/tls.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// TLSOptions holds TLS options that are used across the varying Sensu -// components -message TLSOptions { - string cert_file = 1; - string key_file = 2; - string trusted_ca_file = 3 [ (gogoproto.customname) = "TrustedCAFile" ]; - bool insecure_skip_verify = 4 [ (gogoproto.jsontag) = "insecure_skip_verify" ]; - bool client_auth_type = 5; -} diff --git a/api/core/v2/tlspb_test.go b/api/core/v2/tlspb_test.go deleted file mode 100644 index 6f7fb72011..0000000000 --- a/api/core/v2/tlspb_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/tls.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestTLSOptionsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTLSOptions(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TLSOptions{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTLSOptionsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTLSOptions(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TLSOptions{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTLSOptionsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTLSOptions(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TLSOptions{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestTLSOptionsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTLSOptions(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &TLSOptions{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTLSOptionsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTLSOptions(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &TLSOptions{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestTLSOptionsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedTLSOptions(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/token.go b/api/core/v2/token.go deleted file mode 100644 index 125bc725d4..0000000000 --- a/api/core/v2/token.go +++ /dev/null @@ -1,50 +0,0 @@ -package v2 - -import ( - "errors" - - jwt "github.com/golang-jwt/jwt/v4" -) - -var ( - ErrInvalidToken = errors.New("invalid access or refresh token") - ErrUnauthorized = errors.New("unauthorized") -) - -// Claims represents the JWT claims -type Claims struct { - jwt.StandardClaims - - // Custom claims - Groups []string `json:"groups"` - Provider AuthProviderClaims `json:"provider"` - APIKey bool `json:"api_key"` -} - -// AuthProviderClaims contains information from the authentication provider -type AuthProviderClaims struct { - // ProviderID used to login the user - ProviderID string `json:"provider_id"` - // ProviderType represents the type of provider used - ProviderType string `json:"provider_type"` - // UserID assigned to the user by the provider - UserID string `json:"user_id"` -} - -// FixtureClaims returns a testing fixture for a JWT claims -func FixtureClaims(username string, groups []string) *Claims { - return &Claims{ - StandardClaims: jwt.StandardClaims{Subject: username}, - Groups: groups, - Provider: AuthProviderClaims{ - ProviderID: "basic/default", - ProviderType: "basic", - UserID: username, - }, - } -} - -// StandardClaims returns an initialized jwt.StandardClaims with the subject -func StandardClaims(subject string) jwt.StandardClaims { - return jwt.StandardClaims{Subject: subject} -} diff --git a/api/core/v2/typemap.go b/api/core/v2/typemap.go deleted file mode 100644 index 455467b576..0000000000 --- a/api/core/v2/typemap.go +++ /dev/null @@ -1,156 +0,0 @@ -package v2 - -// automatically generated file, do not edit! - -import ( - "fmt" - "reflect" -) - -// typeMap is used to dynamically look up data types from strings. -var typeMap = map[string]interface{}{ - "APIKey": &APIKey{}, - "api_key": &APIKey{}, - "AdhocRequest": &AdhocRequest{}, - "adhoc_request": &AdhocRequest{}, - "Any": &Any{}, - "any": &Any{}, - "Asset": &Asset{}, - "asset": &Asset{}, - "AssetBuild": &AssetBuild{}, - "asset_build": &AssetBuild{}, - "AssetList": &AssetList{}, - "asset_list": &AssetList{}, - "AuthProviderClaims": &AuthProviderClaims{}, - "auth_provider_claims": &AuthProviderClaims{}, - "Check": &Check{}, - "check": &Check{}, - "CheckConfig": &CheckConfig{}, - "check_config": &CheckConfig{}, - "CheckHistory": &CheckHistory{}, - "check_history": &CheckHistory{}, - "CheckRequest": &CheckRequest{}, - "check_request": &CheckRequest{}, - "Claims": &Claims{}, - "claims": &Claims{}, - "ClusterHealth": &ClusterHealth{}, - "cluster_health": &ClusterHealth{}, - "ClusterRole": &ClusterRole{}, - "cluster_role": &ClusterRole{}, - "ClusterRoleBinding": &ClusterRoleBinding{}, - "cluster_role_binding": &ClusterRoleBinding{}, - "Deregistration": &Deregistration{}, - "deregistration": &Deregistration{}, - "Entity": &Entity{}, - "entity": &Entity{}, - "Event": &Event{}, - "event": &Event{}, - "EventFilter": &EventFilter{}, - "event_filter": &EventFilter{}, - "Extension": &Extension{}, - "extension": &Extension{}, - "Handler": &Handler{}, - "handler": &Handler{}, - "HandlerSocket": &HandlerSocket{}, - "handler_socket": &HandlerSocket{}, - "HealthResponse": &HealthResponse{}, - "health_response": &HealthResponse{}, - "Hook": &Hook{}, - "hook": &Hook{}, - "HookConfig": &HookConfig{}, - "hook_config": &HookConfig{}, - "HookList": &HookList{}, - "hook_list": &HookList{}, - "KeepaliveRecord": &KeepaliveRecord{}, - "keepalive_record": &KeepaliveRecord{}, - "MetricPoint": &MetricPoint{}, - "metric_point": &MetricPoint{}, - "MetricTag": &MetricTag{}, - "metric_tag": &MetricTag{}, - "MetricThreshold": &MetricThreshold{}, - "metric_threshold": &MetricThreshold{}, - "MetricThresholdRule": &MetricThresholdRule{}, - "metric_threshold_rule": &MetricThresholdRule{}, - "MetricThresholdTag": &MetricThresholdTag{}, - "metric_threshold_tag": &MetricThresholdTag{}, - "Metrics": &Metrics{}, - "metrics": &Metrics{}, - "Mutator": &Mutator{}, - "mutator": &Mutator{}, - "Namespace": &Namespace{}, - "namespace": &Namespace{}, - "Network": &Network{}, - "network": &Network{}, - "NetworkInterface": &NetworkInterface{}, - "network_interface": &NetworkInterface{}, - "ObjectMeta": &ObjectMeta{}, - "object_meta": &ObjectMeta{}, - "Pipeline": &Pipeline{}, - "pipeline": &Pipeline{}, - "PipelineWorkflow": &PipelineWorkflow{}, - "pipeline_workflow": &PipelineWorkflow{}, - "PostgresHealth": &PostgresHealth{}, - "postgres_health": &PostgresHealth{}, - "Process": &Process{}, - "process": &Process{}, - "ProxyRequests": &ProxyRequests{}, - "proxy_requests": &ProxyRequests{}, - "ResourceReference": &ResourceReference{}, - "resource_reference": &ResourceReference{}, - "Role": &Role{}, - "role": &Role{}, - "RoleBinding": &RoleBinding{}, - "role_binding": &RoleBinding{}, - "RoleRef": &RoleRef{}, - "role_ref": &RoleRef{}, - "Rule": &Rule{}, - "rule": &Rule{}, - "Secret": &Secret{}, - "secret": &Secret{}, - "Silenced": &Silenced{}, - "silenced": &Silenced{}, - "Subject": &Subject{}, - "subject": &Subject{}, - "System": &System{}, - "system": &System{}, - "TLSOptions": &TLSOptions{}, - "tls_options": &TLSOptions{}, - "TessenConfig": &TessenConfig{}, - "tessen_config": &TessenConfig{}, - "TimeWindowDays": &TimeWindowDays{}, - "time_window_days": &TimeWindowDays{}, - "TimeWindowRepeated": &TimeWindowRepeated{}, - "time_window_repeated": &TimeWindowRepeated{}, - "TimeWindowTimeRange": &TimeWindowTimeRange{}, - "time_window_time_range": &TimeWindowTimeRange{}, - "TimeWindowWhen": &TimeWindowWhen{}, - "time_window_when": &TimeWindowWhen{}, - "Tokens": &Tokens{}, - "tokens": &Tokens{}, - "TypeMeta": &TypeMeta{}, - "type_meta": &TypeMeta{}, - "User": &User{}, - "user": &User{}, - "Version": &Version{}, - "version": &Version{}, -} - -// ResolveResource returns a zero-valued resource, given a name. -// If the named type does not exist, or if the type is not a Resource, -// then an error will be returned. -func ResolveResource(name string) (Resource, error) { - t, ok := typeMap[name] - if !ok { - return nil, fmt.Errorf("type could not be found: %q", name) - } - if _, ok := t.(Resource); !ok { - return nil, fmt.Errorf("%q is not a Resource", name) - } - return newResource(t), nil -} - -// Make a new Resource to avoid aliasing problems with ResolveResource. -// don't use this function. no, seriously. -func newResource(r interface{}) Resource { - return reflect.New(reflect.ValueOf(r).Elem().Type()).Interface().(Resource) -} diff --git a/api/core/v2/typemap.tmpl b/api/core/v2/typemap.tmpl deleted file mode 100644 index 27ddde4ada..0000000000 --- a/api/core/v2/typemap.tmpl +++ /dev/null @@ -1,34 +0,0 @@ -package v2 - -// {{ .Comment }} - -import ( - "fmt" - "reflect" -) - -// typeMap is used to dynamically look up data types from strings. -var typeMap = map[string]interface{}{ {{ range $index, $typename := .TypeNames }} - "{{ $typename }}": &{{ $typename }}{}, - "{{ snakeCase $typename }}": &{{ $typename }}{}, {{ end }} -} - -// ResolveResource returns a zero-valued resource, given a name. -// If the named type does not exist, or if the type is not a Resource, -// then an error will be returned. -func ResolveResource(name string) (Resource, error) { - t, ok := typeMap[name] - if !ok { - return nil, fmt.Errorf("type could not be found: %q", name) - } - if _, ok := t.(Resource); !ok { - return nil, fmt.Errorf("%q is not a Resource", name) - } - return newResource(t), nil -} - -// Make a new Resource to avoid aliasing problems with ResolveResource. -// don't use this function. no, seriously. -func newResource(r interface{}) Resource { - return reflect.New(reflect.ValueOf(r).Elem().Type()).Interface().(Resource) -} diff --git a/api/core/v2/typemap_test.go b/api/core/v2/typemap_test.go deleted file mode 100644 index 05483dd32a..0000000000 --- a/api/core/v2/typemap_test.go +++ /dev/null @@ -1,1068 +0,0 @@ -package v2 - -// automatically generated file, do not edit! - -import ( - "testing" -) - -func TestResolveAPIKey(t *testing.T) { - var value interface{} = new(APIKey) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("APIKey"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("APIKey") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"APIKey" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveAdhocRequest(t *testing.T) { - var value interface{} = new(AdhocRequest) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("AdhocRequest"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("AdhocRequest") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"AdhocRequest" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveAny(t *testing.T) { - var value interface{} = new(Any) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Any"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Any") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Any" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveAsset(t *testing.T) { - var value interface{} = new(Asset) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Asset"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Asset") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Asset" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveAssetBuild(t *testing.T) { - var value interface{} = new(AssetBuild) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("AssetBuild"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("AssetBuild") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"AssetBuild" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveAssetList(t *testing.T) { - var value interface{} = new(AssetList) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("AssetList"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("AssetList") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"AssetList" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveAuthProviderClaims(t *testing.T) { - var value interface{} = new(AuthProviderClaims) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("AuthProviderClaims"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("AuthProviderClaims") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"AuthProviderClaims" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveCheck(t *testing.T) { - var value interface{} = new(Check) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Check"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Check") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Check" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveCheckConfig(t *testing.T) { - var value interface{} = new(CheckConfig) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("CheckConfig"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("CheckConfig") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"CheckConfig" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveCheckHistory(t *testing.T) { - var value interface{} = new(CheckHistory) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("CheckHistory"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("CheckHistory") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"CheckHistory" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveCheckRequest(t *testing.T) { - var value interface{} = new(CheckRequest) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("CheckRequest"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("CheckRequest") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"CheckRequest" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveClaims(t *testing.T) { - var value interface{} = new(Claims) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Claims"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Claims") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Claims" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveClusterHealth(t *testing.T) { - var value interface{} = new(ClusterHealth) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("ClusterHealth"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("ClusterHealth") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"ClusterHealth" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveClusterRole(t *testing.T) { - var value interface{} = new(ClusterRole) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("ClusterRole"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("ClusterRole") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"ClusterRole" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveClusterRoleBinding(t *testing.T) { - var value interface{} = new(ClusterRoleBinding) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("ClusterRoleBinding"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("ClusterRoleBinding") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"ClusterRoleBinding" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveDeregistration(t *testing.T) { - var value interface{} = new(Deregistration) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Deregistration"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Deregistration") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Deregistration" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveEntity(t *testing.T) { - var value interface{} = new(Entity) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Entity"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Entity") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Entity" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveEvent(t *testing.T) { - var value interface{} = new(Event) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Event"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Event") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Event" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveEventFilter(t *testing.T) { - var value interface{} = new(EventFilter) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("EventFilter"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("EventFilter") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"EventFilter" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveExtension(t *testing.T) { - var value interface{} = new(Extension) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Extension"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Extension") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Extension" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveHandler(t *testing.T) { - var value interface{} = new(Handler) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Handler"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Handler") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Handler" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveHandlerSocket(t *testing.T) { - var value interface{} = new(HandlerSocket) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("HandlerSocket"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("HandlerSocket") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"HandlerSocket" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveHealthResponse(t *testing.T) { - var value interface{} = new(HealthResponse) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("HealthResponse"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("HealthResponse") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"HealthResponse" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveHook(t *testing.T) { - var value interface{} = new(Hook) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Hook"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Hook") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Hook" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveHookConfig(t *testing.T) { - var value interface{} = new(HookConfig) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("HookConfig"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("HookConfig") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"HookConfig" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveHookList(t *testing.T) { - var value interface{} = new(HookList) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("HookList"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("HookList") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"HookList" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveKeepaliveRecord(t *testing.T) { - var value interface{} = new(KeepaliveRecord) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("KeepaliveRecord"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("KeepaliveRecord") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"KeepaliveRecord" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveMetricPoint(t *testing.T) { - var value interface{} = new(MetricPoint) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("MetricPoint"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("MetricPoint") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"MetricPoint" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveMetricTag(t *testing.T) { - var value interface{} = new(MetricTag) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("MetricTag"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("MetricTag") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"MetricTag" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveMetricThreshold(t *testing.T) { - var value interface{} = new(MetricThreshold) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("MetricThreshold"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("MetricThreshold") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"MetricThreshold" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveMetricThresholdRule(t *testing.T) { - var value interface{} = new(MetricThresholdRule) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("MetricThresholdRule"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("MetricThresholdRule") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"MetricThresholdRule" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveMetricThresholdTag(t *testing.T) { - var value interface{} = new(MetricThresholdTag) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("MetricThresholdTag"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("MetricThresholdTag") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"MetricThresholdTag" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveMetrics(t *testing.T) { - var value interface{} = new(Metrics) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Metrics"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Metrics") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Metrics" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveMutator(t *testing.T) { - var value interface{} = new(Mutator) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Mutator"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Mutator") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Mutator" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveNamespace(t *testing.T) { - var value interface{} = new(Namespace) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Namespace"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Namespace") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Namespace" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveNetwork(t *testing.T) { - var value interface{} = new(Network) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Network"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Network") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Network" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveNetworkInterface(t *testing.T) { - var value interface{} = new(NetworkInterface) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("NetworkInterface"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("NetworkInterface") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"NetworkInterface" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveObjectMeta(t *testing.T) { - var value interface{} = new(ObjectMeta) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("ObjectMeta"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("ObjectMeta") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"ObjectMeta" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolvePipeline(t *testing.T) { - var value interface{} = new(Pipeline) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Pipeline"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Pipeline") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Pipeline" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolvePipelineWorkflow(t *testing.T) { - var value interface{} = new(PipelineWorkflow) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("PipelineWorkflow"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("PipelineWorkflow") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"PipelineWorkflow" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolvePostgresHealth(t *testing.T) { - var value interface{} = new(PostgresHealth) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("PostgresHealth"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("PostgresHealth") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"PostgresHealth" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveProcess(t *testing.T) { - var value interface{} = new(Process) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Process"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Process") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Process" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveProxyRequests(t *testing.T) { - var value interface{} = new(ProxyRequests) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("ProxyRequests"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("ProxyRequests") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"ProxyRequests" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveResourceReference(t *testing.T) { - var value interface{} = new(ResourceReference) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("ResourceReference"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("ResourceReference") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"ResourceReference" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveRole(t *testing.T) { - var value interface{} = new(Role) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Role"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Role") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Role" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveRoleBinding(t *testing.T) { - var value interface{} = new(RoleBinding) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("RoleBinding"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("RoleBinding") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"RoleBinding" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveRoleRef(t *testing.T) { - var value interface{} = new(RoleRef) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("RoleRef"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("RoleRef") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"RoleRef" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveRule(t *testing.T) { - var value interface{} = new(Rule) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Rule"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Rule") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Rule" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveSecret(t *testing.T) { - var value interface{} = new(Secret) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Secret"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Secret") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Secret" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveSilenced(t *testing.T) { - var value interface{} = new(Silenced) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Silenced"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Silenced") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Silenced" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveSubject(t *testing.T) { - var value interface{} = new(Subject) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Subject"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Subject") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Subject" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveSystem(t *testing.T) { - var value interface{} = new(System) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("System"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("System") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"System" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveTLSOptions(t *testing.T) { - var value interface{} = new(TLSOptions) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("TLSOptions"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("TLSOptions") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"TLSOptions" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveTessenConfig(t *testing.T) { - var value interface{} = new(TessenConfig) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("TessenConfig"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("TessenConfig") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"TessenConfig" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveTimeWindowDays(t *testing.T) { - var value interface{} = new(TimeWindowDays) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("TimeWindowDays"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("TimeWindowDays") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"TimeWindowDays" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveTimeWindowRepeated(t *testing.T) { - var value interface{} = new(TimeWindowRepeated) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("TimeWindowRepeated"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("TimeWindowRepeated") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"TimeWindowRepeated" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveTimeWindowTimeRange(t *testing.T) { - var value interface{} = new(TimeWindowTimeRange) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("TimeWindowTimeRange"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("TimeWindowTimeRange") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"TimeWindowTimeRange" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveTimeWindowWhen(t *testing.T) { - var value interface{} = new(TimeWindowWhen) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("TimeWindowWhen"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("TimeWindowWhen") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"TimeWindowWhen" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveTokens(t *testing.T) { - var value interface{} = new(Tokens) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Tokens"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Tokens") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Tokens" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveTypeMeta(t *testing.T) { - var value interface{} = new(TypeMeta) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("TypeMeta"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("TypeMeta") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"TypeMeta" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveUser(t *testing.T) { - var value interface{} = new(User) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("User"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("User") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"User" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveVersion(t *testing.T) { - var value interface{} = new(Version) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("Version"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("Version") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"Version" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveNotExists(t *testing.T) { - _, err := ResolveResource("!#$@$%@#$") - if err == nil { - t.Fatal("expected non-nil error") - } -} diff --git a/api/core/v2/typemap_test.tmpl b/api/core/v2/typemap_test.tmpl deleted file mode 100644 index fe6f393d76..0000000000 --- a/api/core/v2/typemap_test.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -package v2 - -// {{ .Comment }} - -import ( - "testing" -) - -{{ range $index, $typename := .TypeNames }} -func TestResolve{{ $typename }}(t *testing.T) { - var value interface{} = new({{ $typename }}) - if _, ok := value.(Resource); ok { - if _, err := ResolveResource("{{ $typename }}"); err != nil { - t.Fatal(err) - } - return - } - _, err := ResolveResource("{{ $typename }}") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"{{ $typename }}" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} -{{ end }} - -func TestResolveNotExists(t *testing.T) { - _, err := ResolveResource("!#$@$%@#$") - if err == nil { - t.Fatal("expected non-nil error") - } -} diff --git a/api/core/v2/types_gen.go b/api/core/v2/types_gen.go deleted file mode 100644 index 7c56977dee..0000000000 --- a/api/core/v2/types_gen.go +++ /dev/null @@ -1,16 +0,0 @@ -package v2 - -// TODO: go build will build the latest version of the protoc-gen-gofast module -// used by the project. We need a way to pin the exact version of -// protoc-gen-gofast used in this generator. We could not find a way of doing -// this at the time of this writing. - -//go:generate go run ./internal/codegen/check_protoc -//go:generate go build -o $GOPATH/bin/protoc-gen-gofast github.com/gogo/protobuf/protoc-gen-gofast -//go:generate -command protoc protoc --plugin $GOPATH/bin/protoc-gen-gofast --gofast_out=plugins:$GOPATH/src -I=$GOPATH/pkg/mod -I=$GOPATH/src -I=$GOPATH/pkg/mod/github.com/gogo/protobuf@v1.3.1/protobuf -//go:generate protoc github.com/sensu/sensu-go/api/core/v2/adhoc.proto github.com/sensu/sensu-go/api/core/v2/any.proto github.com/sensu/sensu-go/api/core/v2/apikey.proto github.com/sensu/sensu-go/api/core/v2/asset.proto github.com/sensu/sensu-go/api/core/v2/authentication.proto github.com/sensu/sensu-go/api/core/v2/check.proto github.com/sensu/sensu-go/api/core/v2/entity.proto github.com/sensu/sensu-go/api/core/v2/event.proto github.com/sensu/sensu-go/api/core/v2/filter.proto github.com/sensu/sensu-go/api/core/v2/handler.proto github.com/sensu/sensu-go/api/core/v2/hook.proto github.com/sensu/sensu-go/api/core/v2/keepalive.proto github.com/sensu/sensu-go/api/core/v2/meta.proto github.com/sensu/sensu-go/api/core/v2/metrics.proto github.com/sensu/sensu-go/api/core/v2/metric_threshold.proto github.com/sensu/sensu-go/api/core/v2/mutator.proto github.com/sensu/sensu-go/api/core/v2/namespace.proto github.com/sensu/sensu-go/api/core/v2/rbac.proto github.com/sensu/sensu-go/api/core/v2/secret.proto github.com/sensu/sensu-go/api/core/v2/silenced.proto github.com/sensu/sensu-go/api/core/v2/tessen.proto github.com/sensu/sensu-go/api/core/v2/time_window.proto github.com/sensu/sensu-go/api/core/v2/tls.proto github.com/sensu/sensu-go/api/core/v2/user.proto -//go:generate protoc github.com/sensu/sensu-go/api/core/v2/pipeline.proto github.com/sensu/sensu-go/api/core/v2/pipeline_workflow.proto github.com/sensu/sensu-go/api/core/v2/resource_reference.proto -//go:generate go run ./internal/codegen/generate_type -t typemap.tmpl -o typemap.go -//go:generate go fmt typemap.go -//go:generate go run ./internal/codegen/generate_type -t typemap_test.tmpl -o typemap_test.go -//go:generate go fmt typemap_test.go diff --git a/api/core/v2/user.go b/api/core/v2/user.go deleted file mode 100644 index ee20ab7f06..0000000000 --- a/api/core/v2/user.go +++ /dev/null @@ -1,89 +0,0 @@ -package v2 - -import ( - "errors" - fmt "fmt" - "net/url" - "path" - "strconv" - "strings" -) - -const ( - // UsersResource is the name of this resource type - UsersResource = "users" -) - -// GetObjectMeta is a dummy implementation to meet the Resource interface. -func (u *User) GetObjectMeta() ObjectMeta { - return ObjectMeta{Name: u.Username} -} - -// StorePrefix returns the path prefix to this resource in the store -func (u *User) StorePrefix() string { - return UsersResource -} - -// URIPath is the URI path component to a user. -func (u *User) URIPath() string { - return path.Join(URLPrefix, UsersResource, url.PathEscape(u.Username)) -} - -// Validate returns an error if the entity is invalid. -func (u *User) Validate() error { - if err := ValidateNameStrict(u.Username); err != nil { - return fmt.Errorf("username %s", err) - } - - return nil -} - -// ValidatePassword returns an error if the entity is invalid. -func (u *User) ValidatePassword() error { - if u.Password == "" { - return errors.New("password can't be empty") - } - - if len(u.Password) < 8 { - return errors.New("password length must be at least 8 characters") - } - - return nil -} - -// FixtureUser returns a testing fixture for an Entity object. -func FixtureUser(username string) *User { - return &User{ - Username: username, - Password: "P@ssw0rd!", - Groups: []string{"default"}, - } -} - -// UserFields returns a set of fields that represent that resource -func UserFields(r Resource) map[string]string { - resource := r.(*User) - return map[string]string{ - "user.username": resource.Username, - "user.disabled": strconv.FormatBool(resource.Disabled), - "user.groups": strings.Join(resource.Groups, ","), - } -} - -// Fields returns a set of fields that represent that resource -func (u *User) Fields() map[string]string { - return UserFields(u) -} - -// SetNamespace sets the namespace of the resource. -func (u *User) SetNamespace(namespace string) { -} - -// SetObjectMeta is a dummy implementation to meet the Resource interface. -func (u *User) SetObjectMeta(meta ObjectMeta) { - u.Username = meta.Name -} - -func (*User) RBACName() string { - return "users" -} diff --git a/api/core/v2/user.pb.go b/api/core/v2/user.pb.go deleted file mode 100644 index b5a3fbd2ac..0000000000 --- a/api/core/v2/user.pb.go +++ /dev/null @@ -1,671 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/user.proto - -package v2 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// User describes an authenticated user -type User struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - // Password is used to define the cleartext password. It was also previously - // used to store the hashed password - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - Groups []string `protobuf:"bytes,3,rep,name=groups,proto3" json:"groups,omitempty"` - Disabled bool `protobuf:"varint,4,opt,name=disabled,proto3" json:"disabled"` - // PasswordHash is the hashed password, which is safe to display - PasswordHash string `protobuf:"bytes,5,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *User) Reset() { *m = User{} } -func (m *User) String() string { return proto.CompactTextString(m) } -func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { - return fileDescriptor_d52a21ed40de01ab, []int{0} -} -func (m *User) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_User.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *User) XXX_Merge(src proto.Message) { - xxx_messageInfo_User.Merge(m, src) -} -func (m *User) XXX_Size() int { - return m.Size() -} -func (m *User) XXX_DiscardUnknown() { - xxx_messageInfo_User.DiscardUnknown(m) -} - -var xxx_messageInfo_User proto.InternalMessageInfo - -func (m *User) GetUsername() string { - if m != nil { - return m.Username - } - return "" -} - -func (m *User) GetPassword() string { - if m != nil { - return m.Password - } - return "" -} - -func (m *User) GetGroups() []string { - if m != nil { - return m.Groups - } - return nil -} - -func (m *User) GetDisabled() bool { - if m != nil { - return m.Disabled - } - return false -} - -func (m *User) GetPasswordHash() string { - if m != nil { - return m.PasswordHash - } - return "" -} - -func init() { - proto.RegisterType((*User)(nil), "sensu.core.v2.User") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v2/user.proto", fileDescriptor_d52a21ed40de01ab) -} - -var fileDescriptor_d52a21ed40de01ab = []byte{ - // 262 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x48, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0x46, 0xfa, 0xa5, 0xc5, - 0xa9, 0x45, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x60, 0x05, 0x7a, 0x20, 0x19, 0xbd, - 0x32, 0x23, 0x29, 0x13, 0x24, 0x03, 0xd2, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xaa, 0x92, 0x4a, 0xd3, - 0x1c, 0xca, 0x0c, 0xf5, 0x8c, 0xf5, 0x0c, 0xc1, 0x82, 0x60, 0x31, 0x30, 0x0b, 0x62, 0x88, 0xd2, - 0x52, 0x46, 0x2e, 0x96, 0xd0, 0xe2, 0xd4, 0x22, 0x21, 0x29, 0x2e, 0x0e, 0x90, 0xd9, 0x79, 0x89, - 0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x70, 0x3e, 0x48, 0xae, 0x20, 0xb1, 0xb8, - 0xb8, 0x3c, 0xbf, 0x28, 0x45, 0x82, 0x09, 0x22, 0x07, 0xe3, 0x0b, 0x89, 0x71, 0xb1, 0xa5, 0x17, - 0xe5, 0x97, 0x16, 0x14, 0x4b, 0x30, 0x2b, 0x30, 0x6b, 0x70, 0x06, 0x41, 0x79, 0x42, 0x1a, 0x5c, - 0x1c, 0x29, 0x99, 0xc5, 0x89, 0x49, 0x39, 0xa9, 0x29, 0x12, 0x2c, 0x0a, 0x8c, 0x1a, 0x1c, 0x4e, - 0x3c, 0xaf, 0xee, 0xc9, 0xc3, 0xc5, 0x82, 0xe0, 0x2c, 0x21, 0x65, 0x2e, 0x5e, 0x98, 0x69, 0xf1, - 0x19, 0x89, 0xc5, 0x19, 0x12, 0xac, 0x60, 0x2b, 0x78, 0x60, 0x82, 0x1e, 0x89, 0xc5, 0x19, 0x4e, - 0x0a, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0xb8, 0xe3, 0x91, 0x1c, 0xe3, 0x89, 0x47, - 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe3, 0xb1, 0x1c, 0x43, 0x14, - 0x53, 0x99, 0x51, 0x12, 0x1b, 0xd8, 0x43, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0xf2, - 0xff, 0x46, 0x49, 0x01, 0x00, 0x00, -} - -func (this *User) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*User) - if !ok { - that2, ok := that.(User) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Username != that1.Username { - return false - } - if this.Password != that1.Password { - return false - } - if len(this.Groups) != len(that1.Groups) { - return false - } - for i := range this.Groups { - if this.Groups[i] != that1.Groups[i] { - return false - } - } - if this.Disabled != that1.Disabled { - return false - } - if this.PasswordHash != that1.PasswordHash { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *User) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *User) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PasswordHash) > 0 { - i -= len(m.PasswordHash) - copy(dAtA[i:], m.PasswordHash) - i = encodeVarintUser(dAtA, i, uint64(len(m.PasswordHash))) - i-- - dAtA[i] = 0x2a - } - if m.Disabled { - i-- - if m.Disabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Groups) > 0 { - for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Groups[iNdEx]) - copy(dAtA[i:], m.Groups[iNdEx]) - i = encodeVarintUser(dAtA, i, uint64(len(m.Groups[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Password) > 0 { - i -= len(m.Password) - copy(dAtA[i:], m.Password) - i = encodeVarintUser(dAtA, i, uint64(len(m.Password))) - i-- - dAtA[i] = 0x12 - } - if len(m.Username) > 0 { - i -= len(m.Username) - copy(dAtA[i:], m.Username) - i = encodeVarintUser(dAtA, i, uint64(len(m.Username))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintUser(dAtA []byte, offset int, v uint64) int { - offset -= sovUser(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedUser(r randyUser, easy bool) *User { - this := &User{} - this.Username = string(randStringUser(r)) - this.Password = string(randStringUser(r)) - v1 := r.Intn(10) - this.Groups = make([]string, v1) - for i := 0; i < v1; i++ { - this.Groups[i] = string(randStringUser(r)) - } - this.Disabled = bool(bool(r.Intn(2) == 0)) - this.PasswordHash = string(randStringUser(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedUser(r, 6) - } - return this -} - -type randyUser interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneUser(r randyUser) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringUser(r randyUser) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneUser(r) - } - return string(tmps) -} -func randUnrecognizedUser(r randyUser, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldUser(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldUser(dAtA []byte, r randyUser, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateUser(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateUser(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateUser(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateUser(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateUser(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateUser(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateUser(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *User) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Username) - if l > 0 { - n += 1 + l + sovUser(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovUser(uint64(l)) - } - if len(m.Groups) > 0 { - for _, s := range m.Groups { - l = len(s) - n += 1 + l + sovUser(uint64(l)) - } - } - if m.Disabled { - n += 2 - } - l = len(m.PasswordHash) - if l > 0 { - n += 1 + l + sovUser(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovUser(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozUser(x uint64) (n int) { - return sovUser(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *User) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUser - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: User: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUser - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthUser - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthUser - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUser - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthUser - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthUser - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUser - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthUser - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthUser - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Disabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUser - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Disabled = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PasswordHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUser - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthUser - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthUser - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PasswordHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipUser(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthUser - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipUser(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUser - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUser - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowUser - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthUser - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupUser - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthUser - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthUser = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowUser = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupUser = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v2/user.proto b/api/core/v2/user.proto deleted file mode 100644 index dbaa302922..0000000000 --- a/api/core/v2/user.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; - -package sensu.core.v2; - -option go_package = "v2"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// User describes an authenticated user -message User { - string username = 1; - // Password is used to define the cleartext password. It was also previously - // used to store the hashed password - string password = 2; - repeated string groups = 3; - bool disabled = 4 [ (gogoproto.jsontag) = "disabled" ]; - // PasswordHash is the hashed password, which is safe to display - string password_hash = 5; -} diff --git a/api/core/v2/user_test.go b/api/core/v2/user_test.go deleted file mode 100644 index d46d145702..0000000000 --- a/api/core/v2/user_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package v2 - -import ( - "reflect" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestFixtureUser(t *testing.T) { - u := FixtureUser("foo") - assert.NoError(t, u.Validate()) - assert.Equal(t, "foo", u.Username) - assert.Contains(t, u.Groups, "default") -} - -func TestUserValidate(t *testing.T) { - u := &User{} - - // Empty username - assert.Error(t, u.Validate()) - - u = FixtureUser("foo") - assert.Equal(t, "foo", u.Username) - assert.NoError(t, u.Validate()) -} - -func TestUserValidatePassword(t *testing.T) { - u := &User{} - - // Empty password - assert.Error(t, u.ValidatePassword()) - - // Too short password - u = FixtureUser("foo") - u.Password = "123" - assert.Error(t, u.ValidatePassword()) - - u.Password = "P@ssw0rd!" - assert.NoError(t, u.ValidatePassword()) -} - -func TestUserFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes username", - args: FixtureUser("frank"), - wantKey: "user.username", - want: "frank", - }, - { - name: "exposes disabled", - args: FixtureUser("frank"), - wantKey: "user.disabled", - want: "false", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("UserFields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v2/userpb_test.go b/api/core/v2/userpb_test.go deleted file mode 100644 index 4b3a2054a7..0000000000 --- a/api/core/v2/userpb_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v2/user.proto - -package v2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestUserProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &User{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUserMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &User{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUserJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &User{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUserProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &User{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUserProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &User{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUserSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUser(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v2/util.go b/api/core/v2/util.go deleted file mode 100644 index abb16ec0bb..0000000000 --- a/api/core/v2/util.go +++ /dev/null @@ -1,42 +0,0 @@ -package v2 - -import ( - "os" - "strings" -) - -// FakeHandlerCommand takes a command and (optionally) command args and will -// execute the TestHelperHandlerProcess test within the package -// FakeHandlerCommand is called from. -func FakeHandlerCommand(command string, args ...string) *Handler { - cs := []string{os.Args[0], "-test.run=TestHelperHandlerProcess", "--", command} - cs = append(cs, args...) - cmdStr := strings.Join(cs, " ") - trimmedCmd := strings.Trim(cmdStr, " ") - env := []string{"GO_WANT_HELPER_HANDLER_PROCESS=1"} - - handler := &Handler{ - Command: trimmedCmd, - EnvVars: env, - } - - return handler -} - -// FakeMutatorCommand takes a command and (optionally) command args and will -// execute the TestHelperMutatorProcess test within the package -// FakeMutatorCommand is called from. -func FakeMutatorCommand(command string, args ...string) *Mutator { - cs := []string{os.Args[0], "-test.run=TestHelperMutatorProcess", "--", command} - cs = append(cs, args...) - cmdStr := strings.Join(cs, " ") - trimmedCmd := strings.Trim(cmdStr, " ") - env := []string{"GO_WANT_HELPER_MUTATOR_PROCESS=1"} - - mutator := &Mutator{ - Command: trimmedCmd, - EnvVars: env, - } - - return mutator -} diff --git a/api/core/v2/validators.go b/api/core/v2/validators.go deleted file mode 100644 index a3a1a89cf4..0000000000 --- a/api/core/v2/validators.go +++ /dev/null @@ -1,56 +0,0 @@ -package v2 - -import ( - "errors" - "regexp" -) - -// ConstrainedResource defines a resources that has contraints on it's attributes -type ConstrainedResource interface { - Validate() error -} - -// NameRegex is used to validate the name of a resource -var NameRegex = regexp.MustCompile(`\A[\w\.\-\:]+\z`) - -// StrictNameRegex is used to validate names of resources using a strict subset -// of charset. -var StrictNameRegex = regexp.MustCompile(`\A[a-z0-9\_\.\-]+\z`) - -// SubscriptionNameRegex is used to validate the name of a subscription, which -// can contain a single ":" character in case of an entity subscription (e.g. -// entity:foo) -var SubscriptionNameRegex = regexp.MustCompile(`\A[\w\.\-]+(\:?[\w\.\-]+)?\z`) - -// ValidateName validates the name of an element so it's not empty and it does -// not contains specical characters. Compatible with Sensu 1.0. -func ValidateName(name string) error { - return validateNameWithPattern(name, NameRegex) -} - -// ValidateNameStrict validates the name of an element so it's not empty and it -// does not contains specical characters. Not compatible with Sensu 1.0 -// resources. -func ValidateNameStrict(name string) error { - return validateNameWithPattern(name, StrictNameRegex) -} - -// ValidateSubscriptionName validates the name of a subscription so it's not -// empty and it does not contains special characters except for an optional ":" -func ValidateSubscriptionName(name string) error { - return validateNameWithPattern(name, SubscriptionNameRegex) -} - -// validateName validates the name of an element so it's not empty and it does -// not contains specical characters -func validateNameWithPattern(name string, rexp *regexp.Regexp) error { - if name == "" { - return errors.New("must not be empty") - } - - if match := rexp.MatchString(name); !match { - return errors.New("cannot contain spaces or special characters") - } - - return nil -} diff --git a/api/core/v2/validators_test.go b/api/core/v2/validators_test.go deleted file mode 100644 index 3f5624a66a..0000000000 --- a/api/core/v2/validators_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package v2 - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestValidateName(t *testing.T) { - assert.Error(t, ValidateName("")) - assert.Error(t, ValidateName("foo bar")) - assert.Error(t, ValidateName("foo@bar")) - assert.NoError(t, ValidateName("foo-bar")) - assert.NoError(t, ValidateName("foo:bar")) -} - -func TestValidateNameStrict(t *testing.T) { - assert.Error(t, ValidateNameStrict("")) - assert.Error(t, ValidateNameStrict("foo bar")) - assert.Error(t, ValidateNameStrict("foo@bar")) - assert.Error(t, ValidateNameStrict("FOO-bar")) - assert.NoError(t, ValidateNameStrict("foo-bar_2")) - assert.Error(t, ValidateNameStrict("foo:bar")) -} - -func TestValidateSubscriptionName(t *testing.T) { - assert.Error(t, ValidateSubscriptionName("")) - assert.Error(t, ValidateSubscriptionName("foo bar")) - assert.Error(t, ValidateSubscriptionName("foo@bar")) - assert.Error(t, ValidateSubscriptionName("entity:foo:bar")) - assert.NoError(t, ValidateSubscriptionName("entity:foo")) - assert.NoError(t, ValidateSubscriptionName("foo-bar_2")) -} diff --git a/api/core/v2/version.go b/api/core/v2/version.go deleted file mode 100644 index 0d201cd278..0000000000 --- a/api/core/v2/version.go +++ /dev/null @@ -1,24 +0,0 @@ -package v2 - -import ( - etcdVersion "go.etcd.io/etcd/api/v3/version" -) - -// Version holds the current etcd server and cluster version, and the sensu-backend version. -type Version struct { - Etcd *etcdVersion.Versions `json:"etcd"` - SensuBackend string `json:"sensu_backend"` - APIGroups map[string]string `json:"api_groups"` -} - -// FixtureVersion returns a Version fixture for testing. -func FixtureVersion() *Version { - version := &Version{ - Etcd: &etcdVersion.Versions{ - Server: "3.3.2", - Cluster: "3.3.0", - }, - SensuBackend: "5.7.0#20ba7cb", - } - return version -} diff --git a/api/core/v3/entity.go b/api/core/v3/entity.go deleted file mode 100644 index 5f9aed9427..0000000000 --- a/api/core/v3/entity.go +++ /dev/null @@ -1,223 +0,0 @@ -package v3 - -import ( - "errors" - fmt "fmt" - - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -const ( - // EntityNotFound is used to indicate that an entity was not found between - // agentd and the agent - // TODO(palourde): figure out a better way to express that than relying on a - // special entity name - EntityNotFound = "not found" -) - -// interface assertions guarantee that EntityConfig and EntityState are valid -// Resources. -var ( - _ Resource = new(EntityConfig) - _ Resource = new(EntityState) -) - -type ( - Deregistration = corev2.Deregistration - System = corev2.System - Network = corev2.Network - NetworkInterface = corev2.NetworkInterface - Process = corev2.Process -) - -// V2EntityToV3 converts a corev2.Entity to an EntityConfig and EntityState. -// The resulting values will contain pointers to e's memory. -func V2EntityToV3(e *corev2.Entity) (*EntityConfig, *EntityState) { - if e.ObjectMeta.Labels == nil { - e.ObjectMeta.Labels = make(map[string]string) - } - if e.ObjectMeta.Annotations == nil { - e.ObjectMeta.Annotations = make(map[string]string) - } - cfg := EntityConfig{ - Metadata: &e.ObjectMeta, - EntityClass: e.EntityClass, - User: e.User, - Subscriptions: e.Subscriptions, - Deregister: e.Deregister, - Deregistration: e.Deregistration, - KeepaliveHandlers: e.KeepaliveHandlers, - Redact: e.Redact, - } - state := EntityState{ - Metadata: &corev2.ObjectMeta{ - Name: e.ObjectMeta.Name, - Namespace: e.ObjectMeta.Namespace, - Labels: e.ObjectMeta.Labels, - Annotations: e.ObjectMeta.Annotations, - }, - System: e.System, - LastSeen: e.LastSeen, - SensuAgentVersion: e.SensuAgentVersion, - } - return &cfg, &state -} - -// V3EntityToV2 converts an EntityConfig and an EntityState to a corev2.Entity. -// Errors are returned if cfg and state's Metadata are nil or not equal in terms -// of their namespace and name. The resulting object will contain pointers to -// cfg's and state's memory, and its metadata is carried over from the config. -func V3EntityToV2(cfg *EntityConfig, state *EntityState) (*corev2.Entity, error) { - if cfg.Metadata == nil { - return nil, errors.New("nil EntityConfig metadata") - } - if state.Metadata == nil { - return nil, errors.New("nil EntityState metadata") - } - if p, q := cfg.Metadata.Namespace, state.Metadata.Namespace; p != q { - return nil, fmt.Errorf("EntityConfig.Namespace %s != EntityState.Namespace %s", p, q) - } - if p, q := state.Metadata.Name, cfg.Metadata.Name; p != q { - return nil, fmt.Errorf("EntityConfig.Name %s != EntityState.Name %s", p, q) - } - meta := corev2.ObjectMeta{ - Namespace: cfg.Metadata.Namespace, - Name: cfg.Metadata.Name, - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - for k, v := range cfg.Metadata.Labels { - meta.Labels[k] = v - } - for k, v := range cfg.Metadata.Annotations { - meta.Annotations[k] = v - } - meta.CreatedBy = cfg.Metadata.CreatedBy - - entity := &corev2.Entity{ - ObjectMeta: meta, - EntityClass: cfg.EntityClass, - User: cfg.User, - Subscriptions: cfg.Subscriptions, - Deregister: cfg.Deregister, - Deregistration: cfg.Deregistration, - KeepaliveHandlers: cfg.KeepaliveHandlers, - Redact: cfg.Redact, - System: state.System, - LastSeen: state.LastSeen, - SensuAgentVersion: state.SensuAgentVersion, - } - return entity, nil -} - -func FixtureEntityConfig(name string) *EntityConfig { - return &EntityConfig{ - Metadata: &corev2.ObjectMeta{ - Namespace: "default", - Name: name, - Labels: make(map[string]string), - Annotations: make(map[string]string), - CreatedBy: "user123", - }, - EntityClass: corev2.EntityAgentClass, - User: "agent1", - Subscriptions: []string{"linux", corev2.GetEntitySubscription(name)}, - Deregister: true, - Deregistration: Deregistration{ - Handler: "foo", - }, - KeepaliveHandlers: []string{ - "alert", - }, - Redact: []string{ - "password", - }, - } -} - -func FixtureEntityState(name string) *EntityState { - return &EntityState{ - Metadata: &corev2.ObjectMeta{ - Namespace: "default", - Name: name, - Labels: make(map[string]string), - Annotations: make(map[string]string), - }, - System: System{ - Arch: "amd64", - OS: "linux", - Platform: "Gentoo", - PlatformFamily: "lol", - Network: Network{ - Interfaces: []NetworkInterface{ - { - Name: "eth0", - MAC: "return of the", - Addresses: []string{ - "127.0.0.1", - }, - }, - }, - }, - LibCType: "glibc", - VMSystem: "kvm", - VMRole: "host", - CloudProvider: "aws", - FloatType: "hard", - Processes: []*Process{ - { - Name: "sensu-agent", - }, - }, - }, - LastSeen: 12345, - SensuAgentVersion: "0.0.1", - } -} - -// validate ensures that the entity's class is valid, and that the entity -// is within a namespace. -func (e *EntityConfig) validate() error { - if err := corev2.ValidateName(e.EntityClass); err != nil { - return errors.New("entity class " + err.Error()) - } - - if e.Metadata == nil || e.Metadata.Namespace == "" { - return errors.New("namespace must be set") - } - - return nil -} - -// validate ensures that the entity is within a namespace. -func (e *EntityState) validate() error { - if e.Metadata == nil || e.Metadata.Namespace == "" { - return errors.New("namespace must be set") - } - - return nil -} - -// NewEntityState creates a new EntityState. -func NewEntityState(namespace, name string) *EntityState { - return &EntityState{ - Metadata: &corev2.ObjectMeta{ - Name: name, - Namespace: namespace, - Labels: make(map[string]string), - Annotations: make(map[string]string), - }, - } -} - -// NewEntityConfig creates a new EntityConfig. -func NewEntityConfig(namespace, name string) *EntityConfig { - return &EntityConfig{ - Metadata: &corev2.ObjectMeta{ - Name: name, - Namespace: namespace, - Labels: make(map[string]string), - Annotations: make(map[string]string), - }, - } -} diff --git a/api/core/v3/entity_config.go b/api/core/v3/entity_config.go deleted file mode 100644 index 03e5e6f2b5..0000000000 --- a/api/core/v3/entity_config.go +++ /dev/null @@ -1,66 +0,0 @@ -package v3 - -import ( - "strconv" - "strings" - - corev2 "github.com/sensu/sensu-go/api/core/v2" - stringutil "github.com/sensu/sensu-go/api/core/v3/internal/strings" -) - -var entityConfigRBACName = (&corev2.Entity{}).RBACName() - -func (e *EntityConfig) rbacName() string { - return entityConfigRBACName -} - -func (e *EntityConfig) Fields() map[string]string { - fields := map[string]string{ - "entity_config.name": e.Metadata.Name, - "entity_config.namespace": e.Metadata.Namespace, - "entity_config.deregister": strconv.FormatBool(e.Deregister), - "entity_config.entity_class": e.EntityClass, - "entity_config.subscriptions": strings.Join(e.Subscriptions, ","), - } - MergeMapWithPrefix(fields, e.Metadata.Labels, "entity_config.labels.") - return fields -} - -// MergeMapWithPrefix merges contents of one map into another using a prefix. -func MergeMapWithPrefix(a map[string]string, b map[string]string, prefix string) { - for k, v := range b { - a[prefix+k] = v - } -} - -func redactMap(m map[string]string, redact []string) map[string]string { - if len(redact) == 0 { - redact = corev2.DefaultRedactFields - } - result := make(map[string]string, len(m)) - for k, v := range m { - if stringutil.FoundInArray(k, redact) { - result[k] = corev2.Redacted - } else { - result[k] = v - } - } - return result -} - -// ProduceRedacted redacts the entity according to the entity's Redact fields. -// A redacted copy is returned. The copy contains pointers to the original's -// memory, with different Labels and Annotations. -func (e *EntityConfig) ProduceRedacted() Resource { - if e == nil { - return nil - } - if e.Metadata == nil || (e.Metadata.Labels == nil && e.Metadata.Annotations == nil) { - return e - } - copy := &EntityConfig{} - *copy = *e - copy.Metadata.Annotations = redactMap(e.Metadata.Annotations, e.Redact) - copy.Metadata.Labels = redactMap(e.Metadata.Labels, e.Redact) - return copy -} diff --git a/api/core/v3/entity_config.pb.go b/api/core/v3/entity_config.pb.go deleted file mode 100644 index 8ea17a4032..0000000000 --- a/api/core/v3/entity_config.pb.go +++ /dev/null @@ -1,898 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v3/entity_config.proto - -package v3 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - v2 "github.com/sensu/sensu-go/api/core/v2" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// EntityConfig represents entity configuration. -type EntityConfig struct { - // Metadata contains the name, namespace, labels and annotations of the - // entity. - Metadata *v2.ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata"` - // EntityClass represents the class of the entity. It can be "agent", - // "proxy", or "backend". - EntityClass string `protobuf:"bytes,2,opt,name=entity_class,json=entityClass,proto3" json:"entity_class"` - // User is the username the entity is connecting as, if the entity is an - // agent entity. - User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` - // Subscriptions are a weak relationship between entities and checks. The - // scheduler uses subscriptions to make entities to checks when scheduling. - Subscriptions []string `protobuf:"bytes,4,rep,name=subscriptions,proto3" json:"subscriptions"` - // Deregister, if true, will result in the entity being deleted when the - // entity is an agent, and the agent disconnects its session. - Deregister bool `protobuf:"varint,5,opt,name=deregister,proto3" json:"deregister"` - // Deregistration contains configuration for Sensu entity de-registration. - Deregistration v2.Deregistration `protobuf:"bytes,6,opt,name=deregistration,proto3" json:"deregistration"` - // KeepaliveHandlers contains a list of handlers to use for the entity's - // keepalive events. - KeepaliveHandlers []string `protobuf:"bytes,7,rep,name=keepalive_handlers,json=keepaliveHandlers,proto3" json:"keepalive_handlers,omitempty"` - // Redact contains the fields to redact on the entity, if the entity is an] - // agent entity. - Redact []string `protobuf:"bytes,8,rep,name=redact,proto3" json:"redact,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EntityConfig) Reset() { *m = EntityConfig{} } -func (m *EntityConfig) String() string { return proto.CompactTextString(m) } -func (*EntityConfig) ProtoMessage() {} -func (*EntityConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_8e130cbc0e37cbf4, []int{0} -} -func (m *EntityConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EntityConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EntityConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EntityConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntityConfig.Merge(m, src) -} -func (m *EntityConfig) XXX_Size() int { - return m.Size() -} -func (m *EntityConfig) XXX_DiscardUnknown() { - xxx_messageInfo_EntityConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_EntityConfig proto.InternalMessageInfo - -func (m *EntityConfig) GetMetadata() *v2.ObjectMeta { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *EntityConfig) GetEntityClass() string { - if m != nil { - return m.EntityClass - } - return "" -} - -func (m *EntityConfig) GetUser() string { - if m != nil { - return m.User - } - return "" -} - -func (m *EntityConfig) GetSubscriptions() []string { - if m != nil { - return m.Subscriptions - } - return nil -} - -func (m *EntityConfig) GetDeregister() bool { - if m != nil { - return m.Deregister - } - return false -} - -func (m *EntityConfig) GetDeregistration() v2.Deregistration { - if m != nil { - return m.Deregistration - } - return v2.Deregistration{} -} - -func (m *EntityConfig) GetKeepaliveHandlers() []string { - if m != nil { - return m.KeepaliveHandlers - } - return nil -} - -func (m *EntityConfig) GetRedact() []string { - if m != nil { - return m.Redact - } - return nil -} - -func init() { - proto.RegisterType((*EntityConfig)(nil), "sensu.core.v3.EntityConfig") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v3/entity_config.proto", fileDescriptor_8e130cbc0e37cbf4) -} - -var fileDescriptor_8e130cbc0e37cbf4 = []byte{ - // 413 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xbd, 0x8e, 0xd4, 0x30, - 0x18, 0x3c, 0xdf, 0x2e, 0xcb, 0x9e, 0xef, 0x47, 0x77, 0x2e, 0x90, 0x39, 0x89, 0x24, 0xa2, 0x4a, - 0x73, 0x0e, 0x97, 0x20, 0x21, 0x3a, 0x94, 0x03, 0x81, 0x84, 0x10, 0x52, 0x4a, 0x9a, 0x93, 0x93, - 0xf8, 0x72, 0x86, 0xdd, 0x38, 0xb2, 0x9d, 0x48, 0xbc, 0x09, 0x0d, 0x3d, 0x8f, 0xc0, 0x23, 0x6c, - 0xc9, 0x13, 0x44, 0x10, 0xba, 0x3c, 0x01, 0x25, 0x8a, 0xb3, 0xbb, 0x4a, 0xb6, 0xda, 0x26, 0x9a, - 0x99, 0x6f, 0x66, 0x62, 0x7f, 0x86, 0x2f, 0x33, 0xae, 0xef, 0xcb, 0x98, 0x24, 0x62, 0xe9, 0x29, - 0x96, 0xab, 0xb2, 0xff, 0x5e, 0x65, 0xc2, 0xa3, 0x05, 0xf7, 0x12, 0x21, 0x99, 0x57, 0x05, 0x1e, - 0xcb, 0x35, 0xd7, 0x5f, 0x6f, 0x13, 0x91, 0xdf, 0xf1, 0x8c, 0x14, 0x52, 0x68, 0x81, 0x4e, 0x8d, - 0x93, 0x74, 0x16, 0x52, 0x05, 0x97, 0xcf, 0x07, 0x4d, 0x99, 0xc8, 0x84, 0x67, 0x5c, 0x71, 0x79, - 0xf7, 0xaa, 0xba, 0x26, 0x01, 0xb9, 0x36, 0xa2, 0xd1, 0x0c, 0xea, 0x4b, 0x2e, 0x9f, 0xed, 0xf3, - 0x7f, 0xdf, 0x5b, 0x32, 0x4d, 0xd7, 0x09, 0x7f, 0xbf, 0x44, 0x7f, 0xe2, 0x3e, 0xf3, 0xf4, 0xfb, - 0x04, 0x9e, 0xbc, 0x31, 0xc2, 0x8d, 0xb9, 0x01, 0x7a, 0x0b, 0xe7, 0x5d, 0x65, 0x4a, 0x35, 0xc5, - 0xc0, 0x01, 0xee, 0xb1, 0xff, 0x98, 0x0c, 0xaf, 0xe3, 0x93, 0x8f, 0xf1, 0x67, 0x96, 0xe8, 0x0f, - 0x4c, 0xd3, 0xf0, 0x7c, 0x55, 0xdb, 0xa0, 0xad, 0xed, 0x6d, 0x24, 0xda, 0x22, 0x14, 0xc0, 0x93, - 0xcd, 0x6e, 0x16, 0x54, 0x29, 0x7c, 0xe8, 0x00, 0xf7, 0x28, 0x3c, 0x6f, 0x6b, 0x7b, 0xa4, 0x47, - 0xc7, 0x3d, 0xbb, 0xe9, 0x08, 0x42, 0x70, 0x5a, 0x2a, 0x26, 0xf1, 0xa4, 0x33, 0x47, 0x06, 0xa3, - 0x17, 0xf0, 0x54, 0x95, 0xb1, 0x4a, 0x24, 0x2f, 0x34, 0x17, 0xb9, 0xc2, 0x53, 0x67, 0xe2, 0x1e, - 0x85, 0x17, 0x6d, 0x6d, 0x8f, 0x07, 0xd1, 0x98, 0x22, 0x02, 0x61, 0xca, 0x24, 0xcb, 0xb8, 0xd2, - 0x4c, 0xe2, 0x07, 0x0e, 0x70, 0xe7, 0xe1, 0x59, 0x5b, 0xdb, 0x03, 0x35, 0x1a, 0x60, 0xf4, 0x1e, - 0x9e, 0x6d, 0x98, 0xa4, 0x5d, 0x05, 0x9e, 0x99, 0x05, 0x3c, 0xd9, 0x59, 0xc0, 0xeb, 0x91, 0x29, - 0x9c, 0xae, 0x6a, 0xfb, 0x20, 0xda, 0x89, 0xa2, 0x2b, 0x88, 0xbe, 0x30, 0x56, 0xd0, 0x05, 0xaf, - 0xd8, 0xed, 0x3d, 0xcd, 0xd3, 0x05, 0x93, 0x0a, 0x3f, 0xec, 0x8e, 0x1e, 0x5d, 0x6c, 0x27, 0xef, - 0xd6, 0x03, 0xf4, 0x08, 0xce, 0x24, 0x4b, 0x69, 0xa2, 0xf1, 0xdc, 0x58, 0xd6, 0x2c, 0x74, 0xfe, - 0xfd, 0xb1, 0xc0, 0x8f, 0xc6, 0x02, 0x3f, 0x1b, 0x0b, 0xac, 0x1a, 0x0b, 0xfc, 0x6a, 0x2c, 0xf0, - 0xbb, 0xb1, 0xc0, 0xb7, 0xbf, 0xd6, 0xc1, 0xa7, 0xc3, 0x2a, 0x88, 0x67, 0xe6, 0x21, 0x83, 0xff, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x38, 0xd1, 0x8f, 0xb0, 0x02, 0x00, 0x00, -} - -func (this *EntityConfig) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*EntityConfig) - if !ok { - that2, ok := that.(EntityConfig) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false - } - if this.EntityClass != that1.EntityClass { - return false - } - if this.User != that1.User { - return false - } - if len(this.Subscriptions) != len(that1.Subscriptions) { - return false - } - for i := range this.Subscriptions { - if this.Subscriptions[i] != that1.Subscriptions[i] { - return false - } - } - if this.Deregister != that1.Deregister { - return false - } - if !this.Deregistration.Equal(&that1.Deregistration) { - return false - } - if len(this.KeepaliveHandlers) != len(that1.KeepaliveHandlers) { - return false - } - for i := range this.KeepaliveHandlers { - if this.KeepaliveHandlers[i] != that1.KeepaliveHandlers[i] { - return false - } - } - if len(this.Redact) != len(that1.Redact) { - return false - } - for i := range this.Redact { - if this.Redact[i] != that1.Redact[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *EntityConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EntityConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EntityConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Redact) > 0 { - for iNdEx := len(m.Redact) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Redact[iNdEx]) - copy(dAtA[i:], m.Redact[iNdEx]) - i = encodeVarintEntityConfig(dAtA, i, uint64(len(m.Redact[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.KeepaliveHandlers) > 0 { - for iNdEx := len(m.KeepaliveHandlers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.KeepaliveHandlers[iNdEx]) - copy(dAtA[i:], m.KeepaliveHandlers[iNdEx]) - i = encodeVarintEntityConfig(dAtA, i, uint64(len(m.KeepaliveHandlers[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - { - size, err := m.Deregistration.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEntityConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - if m.Deregister { - i-- - if m.Deregister { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.Subscriptions) > 0 { - for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Subscriptions[iNdEx]) - copy(dAtA[i:], m.Subscriptions[iNdEx]) - i = encodeVarintEntityConfig(dAtA, i, uint64(len(m.Subscriptions[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.User) > 0 { - i -= len(m.User) - copy(dAtA[i:], m.User) - i = encodeVarintEntityConfig(dAtA, i, uint64(len(m.User))) - i-- - dAtA[i] = 0x1a - } - if len(m.EntityClass) > 0 { - i -= len(m.EntityClass) - copy(dAtA[i:], m.EntityClass) - i = encodeVarintEntityConfig(dAtA, i, uint64(len(m.EntityClass))) - i-- - dAtA[i] = 0x12 - } - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEntityConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEntityConfig(dAtA []byte, offset int, v uint64) int { - offset -= sovEntityConfig(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedEntityConfig(r randyEntityConfig, easy bool) *EntityConfig { - this := &EntityConfig{} - if r.Intn(5) != 0 { - this.Metadata = v2.NewPopulatedObjectMeta(r, easy) - } - this.EntityClass = string(randStringEntityConfig(r)) - this.User = string(randStringEntityConfig(r)) - v1 := r.Intn(10) - this.Subscriptions = make([]string, v1) - for i := 0; i < v1; i++ { - this.Subscriptions[i] = string(randStringEntityConfig(r)) - } - this.Deregister = bool(bool(r.Intn(2) == 0)) - v2 := v2.NewPopulatedDeregistration(r, easy) - this.Deregistration = *v2 - v3 := r.Intn(10) - this.KeepaliveHandlers = make([]string, v3) - for i := 0; i < v3; i++ { - this.KeepaliveHandlers[i] = string(randStringEntityConfig(r)) - } - v4 := r.Intn(10) - this.Redact = make([]string, v4) - for i := 0; i < v4; i++ { - this.Redact[i] = string(randStringEntityConfig(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEntityConfig(r, 9) - } - return this -} - -type randyEntityConfig interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneEntityConfig(r randyEntityConfig) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringEntityConfig(r randyEntityConfig) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneEntityConfig(r) - } - return string(tmps) -} -func randUnrecognizedEntityConfig(r randyEntityConfig, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldEntityConfig(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldEntityConfig(dAtA []byte, r randyEntityConfig, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateEntityConfig(dAtA, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - dAtA = encodeVarintPopulateEntityConfig(dAtA, uint64(v6)) - case 1: - dAtA = encodeVarintPopulateEntityConfig(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateEntityConfig(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateEntityConfig(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateEntityConfig(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateEntityConfig(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *EntityConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovEntityConfig(uint64(l)) - } - l = len(m.EntityClass) - if l > 0 { - n += 1 + l + sovEntityConfig(uint64(l)) - } - l = len(m.User) - if l > 0 { - n += 1 + l + sovEntityConfig(uint64(l)) - } - if len(m.Subscriptions) > 0 { - for _, s := range m.Subscriptions { - l = len(s) - n += 1 + l + sovEntityConfig(uint64(l)) - } - } - if m.Deregister { - n += 2 - } - l = m.Deregistration.Size() - n += 1 + l + sovEntityConfig(uint64(l)) - if len(m.KeepaliveHandlers) > 0 { - for _, s := range m.KeepaliveHandlers { - l = len(s) - n += 1 + l + sovEntityConfig(uint64(l)) - } - } - if len(m.Redact) > 0 { - for _, s := range m.Redact { - l = len(s) - n += 1 + l + sovEntityConfig(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovEntityConfig(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEntityConfig(x uint64) (n int) { - return sovEntityConfig(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EntityConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EntityConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EntityConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEntityConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEntityConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &v2.ObjectMeta{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EntityClass", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntityConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntityConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EntityClass = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntityConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntityConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntityConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntityConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subscriptions = append(m.Subscriptions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deregister", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Deregister = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deregistration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEntityConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEntityConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Deregistration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeepaliveHandlers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntityConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntityConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeepaliveHandlers = append(m.KeepaliveHandlers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redact", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntityConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntityConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Redact = append(m.Redact, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEntityConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEntityConfig - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEntityConfig(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEntityConfig - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEntityConfig - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEntityConfig - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEntityConfig - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEntityConfig = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEntityConfig = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEntityConfig = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v3/entity_config.proto b/api/core/v3/entity_config.proto deleted file mode 100644 index c7cabe5998..0000000000 --- a/api/core/v3/entity_config.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; -import "github.com/sensu/sensu-go/api/core/v2/entity.proto"; - -package sensu.core.v3; - -option go_package = "v3"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// EntityConfig represents entity configuration. -message EntityConfig { - // Metadata contains the name, namespace, labels and annotations of the - // entity. - sensu.core.v2.ObjectMeta metadata = 1 [ (gogoproto.jsontag) = "metadata", (gogoproto.nullable) = true ]; - - // EntityClass represents the class of the entity. It can be "agent", - // "proxy", or "backend". - string entity_class = 2 [ (gogoproto.jsontag) = "entity_class" ]; - - // User is the username the entity is connecting as, if the entity is an - // agent entity. - string user = 3; - - // Subscriptions are a weak relationship between entities and checks. The - // scheduler uses subscriptions to make entities to checks when scheduling. - repeated string subscriptions = 4 [ (gogoproto.jsontag) = "subscriptions" ]; - - // Deregister, if true, will result in the entity being deleted when the - // entity is an agent, and the agent disconnects its session. - bool deregister = 5 [ (gogoproto.jsontag) = "deregister" ]; - - // Deregistration contains configuration for Sensu entity de-registration. - sensu.core.v2.Deregistration deregistration = 6 [ (gogoproto.nullable) = false ]; - - // KeepaliveHandlers contains a list of handlers to use for the entity's - // keepalive events. - repeated string keepalive_handlers = 7; - - // Redact contains the fields to redact on the entity, if the entity is an] - // agent entity. - repeated string redact = 8; -} diff --git a/api/core/v3/entity_config_test.go b/api/core/v3/entity_config_test.go deleted file mode 100644 index fbc00653ad..0000000000 --- a/api/core/v3/entity_config_test.go +++ /dev/null @@ -1,135 +0,0 @@ -package v3 - -import ( - "reflect" - "testing" - - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -func TestEntityConfigFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureEntityConfig("my-agent"), - wantKey: "entity_config.name", - want: "my-agent", - }, - { - name: "exposes deregister", - args: &EntityConfig{Metadata: &corev2.ObjectMeta{}, Deregister: true}, - wantKey: "entity_config.deregister", - want: "true", - }, - { - name: "exposes class", - args: &EntityConfig{Metadata: &corev2.ObjectMeta{}, EntityClass: "agent"}, - wantKey: "entity_config.entity_class", - want: "agent", - }, - { - name: "exposes subscriptions", - args: &EntityConfig{Metadata: &corev2.ObjectMeta{}, Subscriptions: []string{"www", "unix"}}, - wantKey: "entity_config.subscriptions", - want: "www,unix", - }, - { - name: "exposes labels", - args: &EntityConfig{ - Metadata: &corev2.ObjectMeta{ - Labels: map[string]string{"region": "philadelphia"}, - }, - }, - wantKey: "entity_config.labels.region", - want: "philadelphia", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("EntityConfig.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} - -func TestEntityConfig_ProduceRedacted(t *testing.T) { - tests := []struct { - name string - in *EntityConfig - want *EntityConfig - }{ - { - name: "nil metadata", - in: func() *EntityConfig { - cfg := FixtureEntityConfig("test") - cfg.Metadata = nil - return cfg - }(), - want: func() *EntityConfig { - cfg := FixtureEntityConfig("test") - cfg.Metadata = nil - return cfg - }(), - }, - { - name: "nothing to redact", - in: func() *EntityConfig { - cfg := FixtureEntityConfig("test") - cfg.Metadata.Labels["my_field"] = "test123" - return cfg - }(), - want: func() *EntityConfig { - cfg := FixtureEntityConfig("test") - cfg.Metadata.Labels["my_field"] = "test123" - return cfg - }(), - }, - { - name: "redact default fields", - in: func() *EntityConfig { - cfg := FixtureEntityConfig("test") - cfg.Metadata.Labels["my_field"] = "test123" - cfg.Metadata.Labels["password"] = "test123" - return cfg - }(), - want: func() *EntityConfig { - cfg := FixtureEntityConfig("test") - cfg.Metadata.Labels["my_field"] = "test123" - cfg.Metadata.Labels["password"] = corev2.Redacted - return cfg - }(), - }, - { - name: "redact custom fields", - in: func() *EntityConfig { - cfg := FixtureEntityConfig("test") - cfg.Redact = []string{"my_field"} - cfg.Metadata.Labels["my_field"] = "test123" - cfg.Metadata.Labels["password"] = "test123" - return cfg - }(), - want: func() *EntityConfig { - cfg := FixtureEntityConfig("test") - cfg.Redact = []string{"my_field"} - cfg.Metadata.Labels["my_field"] = corev2.Redacted - cfg.Metadata.Labels["password"] = "test123" - return cfg - }(), - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - e := tt.in - if got := e.ProduceRedacted(); !reflect.DeepEqual(got, tt.want) { - t.Errorf("EntityConfig.ProduceRedacted() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/api/core/v3/entity_configpb_test.go b/api/core/v3/entity_configpb_test.go deleted file mode 100644 index 75ce4f623c..0000000000 --- a/api/core/v3/entity_configpb_test.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v3/entity_config.proto - -package v3 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - _ "github.com/sensu/sensu-go/api/core/v2" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestEntityConfigProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityConfig(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EntityConfig{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestEntityConfigMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityConfig(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EntityConfig{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEntityConfigJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityConfig(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EntityConfig{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestEntityConfigProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityConfig(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &EntityConfig{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEntityConfigProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityConfig(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &EntityConfig{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEntityConfigSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityConfig(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v3/entity_state.go b/api/core/v3/entity_state.go deleted file mode 100644 index 131da36a7a..0000000000 --- a/api/core/v3/entity_state.go +++ /dev/null @@ -1,19 +0,0 @@ -package v3 - -import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -var entityStateRBACName = (&corev2.Entity{}).RBACName() - -func (*EntityState) rbacName() string { - return entityStateRBACName -} - -func (e *EntityState) Fields() map[string]string { - fields := map[string]string{ - "entity_state.name": e.Metadata.Name, - "entity_state.namespace": e.Metadata.Namespace, - } - return fields -} diff --git a/api/core/v3/entity_state.pb.go b/api/core/v3/entity_state.pb.go deleted file mode 100644 index 42fdcddc72..0000000000 --- a/api/core/v3/entity_state.pb.go +++ /dev/null @@ -1,626 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v3/entity_state.proto - -package v3 - -import ( - bytes "bytes" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - v2 "github.com/sensu/sensu-go/api/core/v2" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// EntityState represents entity state. Unlike configuration, state is -// typically only maintained for agent entities, although it can be maintained -// for proxy entities in certain circumstances. -type EntityState struct { - // Metadata contains the name, namespace, labels and annotations of the - // entity. - Metadata *v2.ObjectMeta `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata"` - // System contains information about the system that the Agent process - // is running on, used for additional Entity context. - System v2.System `protobuf:"bytes,2,opt,name=system,proto3" json:"system"` - // LastSeen is a unix timestamp that represents when the entity was last - // observed by the keepalive system. - LastSeen int64 `protobuf:"varint,3,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen"` - // SensuAgentVersion is the sensu-agent version. - SensuAgentVersion string `protobuf:"bytes,4,opt,name=sensu_agent_version,json=sensuAgentVersion,proto3" json:"sensu_agent_version"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EntityState) Reset() { *m = EntityState{} } -func (m *EntityState) String() string { return proto.CompactTextString(m) } -func (*EntityState) ProtoMessage() {} -func (*EntityState) Descriptor() ([]byte, []int) { - return fileDescriptor_2f316efbec1fb581, []int{0} -} -func (m *EntityState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EntityState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EntityState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EntityState) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntityState.Merge(m, src) -} -func (m *EntityState) XXX_Size() int { - return m.Size() -} -func (m *EntityState) XXX_DiscardUnknown() { - xxx_messageInfo_EntityState.DiscardUnknown(m) -} - -var xxx_messageInfo_EntityState proto.InternalMessageInfo - -func (m *EntityState) GetMetadata() *v2.ObjectMeta { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *EntityState) GetSystem() v2.System { - if m != nil { - return m.System - } - return v2.System{} -} - -func (m *EntityState) GetLastSeen() int64 { - if m != nil { - return m.LastSeen - } - return 0 -} - -func (m *EntityState) GetSensuAgentVersion() string { - if m != nil { - return m.SensuAgentVersion - } - return "" -} - -func init() { - proto.RegisterType((*EntityState)(nil), "sensu.core.v3.EntityState") -} - -func init() { - proto.RegisterFile("github.com/sensu/sensu-go/api/core/v3/entity_state.proto", fileDescriptor_2f316efbec1fb581) -} - -var fileDescriptor_2f316efbec1fb581 = []byte{ - // 343 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x48, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0x85, 0x90, 0xba, 0xe9, - 0xf9, 0xfa, 0x89, 0x05, 0x99, 0xfa, 0xc9, 0xf9, 0x45, 0xa9, 0xfa, 0x65, 0xc6, 0xfa, 0xa9, 0x79, - 0x25, 0x99, 0x25, 0x95, 0xf1, 0xc5, 0x25, 0x89, 0x25, 0xa9, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, - 0x42, 0xbc, 0x60, 0x85, 0x7a, 0x20, 0x15, 0x7a, 0x65, 0xc6, 0x52, 0x26, 0x48, 0x06, 0xa5, 0xe7, - 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x25, 0x95, 0xa6, 0x39, 0x94, 0x19, 0xea, 0x19, 0xeb, 0x19, 0x82, - 0x05, 0xc1, 0x62, 0x60, 0x16, 0xc4, 0x10, 0x29, 0x03, 0x62, 0xac, 0x37, 0xd2, 0xcf, 0x4d, 0x2d, - 0x49, 0x84, 0xea, 0x30, 0x22, 0x4e, 0x07, 0xc4, 0xc1, 0x10, 0x3d, 0x4a, 0x0d, 0x4c, 0x5c, 0xdc, - 0xae, 0x60, 0x81, 0x60, 0x90, 0x07, 0x84, 0xdc, 0xb9, 0x38, 0x40, 0x26, 0xa6, 0x24, 0x96, 0x24, - 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x49, 0xea, 0x21, 0xfb, 0xc6, 0x48, 0xcf, 0x3f, 0x29, - 0x2b, 0x35, 0xb9, 0xc4, 0x37, 0xb5, 0x24, 0xd1, 0x49, 0xe0, 0xc4, 0x3d, 0x79, 0xc6, 0x57, 0xf7, - 0xe4, 0xe1, 0x5a, 0x82, 0xe0, 0x2c, 0x21, 0x63, 0x2e, 0xb6, 0xe2, 0xca, 0xe2, 0x92, 0xd4, 0x5c, - 0x09, 0x26, 0xb0, 0x31, 0xa2, 0x68, 0xc6, 0x04, 0x83, 0x25, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, - 0x08, 0x82, 0x2a, 0x15, 0xd2, 0xe2, 0xe2, 0xcc, 0x49, 0x2c, 0x2e, 0x89, 0x2f, 0x4e, 0x4d, 0xcd, - 0x93, 0x60, 0x56, 0x60, 0xd4, 0x60, 0x76, 0xe2, 0x7d, 0x75, 0x4f, 0x1e, 0x21, 0x18, 0xc4, 0x01, - 0x62, 0x06, 0xa7, 0xa6, 0xe6, 0x09, 0xb9, 0x73, 0x09, 0x83, 0x4d, 0x8c, 0x4f, 0x4c, 0x4f, 0xcd, - 0x2b, 0x89, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x93, 0x60, 0x51, 0x60, 0xd4, 0xe0, 0x74, - 0x12, 0x7f, 0x75, 0x4f, 0x1e, 0x9b, 0x74, 0x90, 0x20, 0x58, 0xd0, 0x11, 0x24, 0x16, 0x06, 0x11, - 0x72, 0x52, 0xf8, 0xf1, 0x50, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x1d, 0x8f, 0xe4, 0x18, 0x4f, - 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x19, 0x8f, 0xe5, 0x18, - 0xa2, 0x98, 0xca, 0x8c, 0x93, 0xd8, 0xc0, 0x61, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x2a, - 0x4d, 0x2e, 0x3b, 0x12, 0x02, 0x00, 0x00, -} - -func (this *EntityState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*EntityState) - if !ok { - that2, ok := that.(EntityState) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Metadata.Equal(that1.Metadata) { - return false - } - if !this.System.Equal(&that1.System) { - return false - } - if this.LastSeen != that1.LastSeen { - return false - } - if this.SensuAgentVersion != that1.SensuAgentVersion { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (m *EntityState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EntityState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EntityState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.SensuAgentVersion) > 0 { - i -= len(m.SensuAgentVersion) - copy(dAtA[i:], m.SensuAgentVersion) - i = encodeVarintEntityState(dAtA, i, uint64(len(m.SensuAgentVersion))) - i-- - dAtA[i] = 0x22 - } - if m.LastSeen != 0 { - i = encodeVarintEntityState(dAtA, i, uint64(m.LastSeen)) - i-- - dAtA[i] = 0x18 - } - { - size, err := m.System.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEntityState(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEntityState(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEntityState(dAtA []byte, offset int, v uint64) int { - offset -= sovEntityState(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedEntityState(r randyEntityState, easy bool) *EntityState { - this := &EntityState{} - if r.Intn(5) != 0 { - this.Metadata = v2.NewPopulatedObjectMeta(r, easy) - } - v1 := v2.NewPopulatedSystem(r, easy) - this.System = *v1 - this.LastSeen = int64(r.Int63()) - if r.Intn(2) == 0 { - this.LastSeen *= -1 - } - this.SensuAgentVersion = string(randStringEntityState(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEntityState(r, 5) - } - return this -} - -type randyEntityState interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneEntityState(r randyEntityState) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringEntityState(r randyEntityState) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneEntityState(r) - } - return string(tmps) -} -func randUnrecognizedEntityState(r randyEntityState, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldEntityState(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldEntityState(dAtA []byte, r randyEntityState, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateEntityState(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateEntityState(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateEntityState(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateEntityState(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateEntityState(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateEntityState(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateEntityState(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *EntityState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovEntityState(uint64(l)) - } - l = m.System.Size() - n += 1 + l + sovEntityState(uint64(l)) - if m.LastSeen != 0 { - n += 1 + sovEntityState(uint64(m.LastSeen)) - } - l = len(m.SensuAgentVersion) - if l > 0 { - n += 1 + l + sovEntityState(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovEntityState(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEntityState(x uint64) (n int) { - return sovEntityState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EntityState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EntityState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EntityState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEntityState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEntityState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &v2.ObjectMeta{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field System", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEntityState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEntityState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.System.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastSeen", wireType) - } - m.LastSeen = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastSeen |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SensuAgentVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntityState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntityState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEntityState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SensuAgentVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEntityState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEntityState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEntityState(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEntityState - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEntityState - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEntityState - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEntityState - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEntityState - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEntityState - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEntityState = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEntityState = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEntityState = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/core/v3/entity_state.proto b/api/core/v3/entity_state.proto deleted file mode 100644 index 2fd7685421..0000000000 --- a/api/core/v3/entity_state.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf@v1.3.1/gogoproto/gogo.proto"; -import "github.com/sensu/sensu-go/api/core/v2/meta.proto"; -import "github.com/sensu/sensu-go/api/core/v2/entity.proto"; - -package sensu.core.v3; - -option go_package = "v3"; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; - -// EntityState represents entity state. Unlike configuration, state is -// typically only maintained for agent entities, although it can be maintained -// for proxy entities in certain circumstances. -message EntityState { - // Metadata contains the name, namespace, labels and annotations of the - // entity. - sensu.core.v2.ObjectMeta metadata = 1 [ (gogoproto.jsontag) = "metadata", (gogoproto.nullable) = true ]; - - // System contains information about the system that the Agent process - // is running on, used for additional Entity context. - sensu.core.v2.System system = 2 [ (gogoproto.nullable) = false ]; - - // LastSeen is a unix timestamp that represents when the entity was last - // observed by the keepalive system. - int64 last_seen = 3 [ (gogoproto.jsontag) = "last_seen" ]; - - // SensuAgentVersion is the sensu-agent version. - string sensu_agent_version = 4 [ (gogoproto.jsontag) = "sensu_agent_version" ]; -} diff --git a/api/core/v3/entity_state_test.go b/api/core/v3/entity_state_test.go deleted file mode 100644 index e5b9bce12c..0000000000 --- a/api/core/v3/entity_state_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package v3 - -import ( - "reflect" - "testing" -) - -func TestEntityStateFields(t *testing.T) { - tests := []struct { - name string - args Fielder - wantKey string - want string - }{ - { - name: "exposes name", - args: FixtureEntityState("my-agent"), - wantKey: "entity_state.name", - want: "my-agent", - }, - { - name: "exposes deregister", - args: FixtureEntityState("my-agent"), - wantKey: "entity_state.namespace", - want: "default", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := tt.args.Fields() - if !reflect.DeepEqual(got[tt.wantKey], tt.want) { - t.Errorf("EntityState.Fields() = got[%s] %v, want[%s] %v", tt.wantKey, got[tt.wantKey], tt.wantKey, tt.want) - } - }) - } -} diff --git a/api/core/v3/entity_statepb_test.go b/api/core/v3/entity_statepb_test.go deleted file mode 100644 index 44b8f97aec..0000000000 --- a/api/core/v3/entity_statepb_test.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/sensu/sensu-go/api/core/v3/entity_state.proto - -package v3 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - proto "github.com/golang/protobuf/proto" - _ "github.com/sensu/sensu-go/api/core/v2" - math "math" - math_rand "math/rand" - testing "testing" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestEntityStateProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityState(popr, false) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EntityState{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestEntityStateMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityState(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EntityState{} - if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEntityStateJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityState(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EntityState{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestEntityStateProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityState(popr, true) - dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) - msg := &EntityState{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEntityStateProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityState(popr, true) - dAtA := github_com_golang_protobuf_proto.CompactTextString(p) - msg := &EntityState{} - if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEntityStateSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEntityState(popr, true) - size2 := github_com_golang_protobuf_proto.Size(p) - dAtA, err := github_com_golang_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_golang_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/api/core/v3/entity_test.go b/api/core/v3/entity_test.go deleted file mode 100644 index 0a3cd23a8a..0000000000 --- a/api/core/v3/entity_test.go +++ /dev/null @@ -1,147 +0,0 @@ -package v3 - -import ( - "reflect" - "testing" - - "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -func TestV2EntityToV3(t *testing.T) { - entity := corev2.FixtureEntity("foo") - cfg, state := V2EntityToV3(entity) - if got, want := cfg.Metadata, entity.ObjectMeta; !proto.Equal(got, &want) { - t.Errorf("bad objectmeta: got %v, want %v", got, want) - } - if got, want := cfg.Metadata.Labels, make(map[string]string); !reflect.DeepEqual(got, want) { - t.Errorf("bad objectmeta labels: got %v, want %v", got, want) - } - if got, want := cfg.Metadata.Annotations, make(map[string]string); !reflect.DeepEqual(got, want) { - t.Errorf("bad objectmeta annotations: got %v, want %v", got, want) - } - if got, want := cfg.EntityClass, entity.EntityClass; got != want { - t.Errorf("bad EntityClass: got %v, want %v", got, want) - } - if got, want := cfg.User, entity.User; got != want { - t.Errorf("bad User: got %v, want %v", got, want) - } - if got, want := cfg.Subscriptions, entity.Subscriptions; !reflect.DeepEqual(got, want) { - t.Errorf("bad Subscriptions: got %v, want %v", got, want) - } - if got, want := cfg.Deregister, entity.Deregister; got != want { - t.Errorf("bad Deregister: got %v, want %v", got, want) - } - if got, want := cfg.Deregistration, entity.Deregistration; !proto.Equal(&got, &want) { - t.Errorf("bad Deregistration: got %v, want %v", got, want) - } - if got, want := cfg.KeepaliveHandlers, entity.KeepaliveHandlers; !reflect.DeepEqual(got, want) { - t.Errorf("bad KeepaliveHandlers: got %v, want %v", got, want) - } - if got, want := cfg.Redact, entity.Redact; !reflect.DeepEqual(got, want) { - t.Errorf("bad Redact: got %v, want %v", got, want) - } - if got, want := state.Metadata, entity.ObjectMeta; !proto.Equal(got, &want) { - t.Errorf("bad objectmeta: got %v, want %v", got, want) - } - if got, want := state.Metadata.Labels, make(map[string]string); !reflect.DeepEqual(got, want) { - t.Errorf("bad objectmeta labels: got %v, want %v", got, want) - } - if got, want := state.Metadata.Annotations, make(map[string]string); !reflect.DeepEqual(got, want) { - t.Errorf("bad objectmeta annotations: got %v, want %v", got, want) - } - if got, want := state.System, entity.System; !proto.Equal(&got, &want) { - t.Errorf("bad System: got %v, want %v", got, want) - } - if got, want := state.LastSeen, entity.LastSeen; got != want { - t.Errorf("bad LastSeen: got %v, want %v", got, want) - } - if got, want := state.SensuAgentVersion, entity.SensuAgentVersion; got != want { - t.Errorf("bad SensuAgentVersion: got %v, want %v", got, want) - } -} - -func TestV3EntityToV2(t *testing.T) { - cfg := FixtureEntityConfig("foo") - state := FixtureEntityState("foo") - entity, err := V3EntityToV2(cfg, state) - if err != nil { - t.Fatal(err) - } - - if want, got := cfg.Metadata, entity.ObjectMeta; !proto.Equal(&got, want) { - t.Errorf("bad objectmeta: got %v, want %v", got, want) - } - if want, got := cfg.EntityClass, entity.EntityClass; got != want { - t.Errorf("bad EntityClass: got %v, want %v", got, want) - } - if want, got := cfg.User, entity.User; got != want { - t.Errorf("bad User: got %v, want %v", got, want) - } - if want, got := cfg.Subscriptions, entity.Subscriptions; !reflect.DeepEqual(got, want) { - t.Errorf("bad Subscriptions: got %v, want %v", got, want) - } - if want, got := cfg.Deregister, entity.Deregister; got != want { - t.Errorf("bad Deregister: got %v, want %v", got, want) - } - if want, got := cfg.Deregistration, entity.Deregistration; !proto.Equal(&got, &want) { - t.Errorf("bad Deregistration: got %v, want %v", got, want) - } - if want, got := cfg.KeepaliveHandlers, entity.KeepaliveHandlers; !reflect.DeepEqual(got, want) { - t.Errorf("bad KeepaliveHandlers: got %v, want %v", got, want) - } - if want, got := cfg.Redact, entity.Redact; !reflect.DeepEqual(got, want) { - t.Errorf("bad Redact: got %v, want %v", got, want) - } - if want, got := state.System, entity.System; !proto.Equal(&got, &want) { - t.Errorf("bad System: got %v, want %v", got, want) - } - if want, got := state.LastSeen, entity.LastSeen; got != want { - t.Errorf("bad LastSeen: got %v, want %v", got, want) - } - if want, got := state.SensuAgentVersion, entity.SensuAgentVersion; got != want { - t.Errorf("bad SensuAgentVersion: got %v, want %v", got, want) - } - - var blankC EntityConfig - if _, err := V3EntityToV2(&blankC, state); err == nil { - t.Errorf("expected non-nil error") - } - var blankS EntityState - if _, err := V3EntityToV2(cfg, &blankS); err == nil { - t.Errorf("expected non-nil error") - } - - blankC.Metadata = &corev2.ObjectMeta{ - Namespace: "default", - Name: "foo", - } - - blankS.Metadata = &corev2.ObjectMeta{ - Namespace: "notdefault", - Name: "foo", - } - - if _, err := V3EntityToV2(&blankC, &blankS); err == nil { - t.Errorf("expected non-nil error") - } - - blankS.Metadata.Namespace = "default" - blankS.Metadata.Name = "notfoo" - - if _, err := V3EntityToV2(&blankC, &blankS); err == nil { - t.Errorf("expected non-nil error") - } -} - -func TestFixtureEntityConfig(t *testing.T) { - if err := FixtureEntityConfig("foo").Validate(); err != nil { - t.Fatal(err) - } -} - -func TestFixtureEntityState(t *testing.T) { - if err := FixtureEntityState("foo").Validate(); err != nil { - t.Fatal(err) - } -} diff --git a/api/core/v3/fielder.go b/api/core/v3/fielder.go deleted file mode 100644 index a27c796bd4..0000000000 --- a/api/core/v3/fielder.go +++ /dev/null @@ -1,7 +0,0 @@ -package v3 - -// Fielder includes a set of fields that represent a resource. -type Fielder interface { - // Fields returns a set of fields that represent the resource. - Fields() map[string]string -} diff --git a/api/core/v3/go.mod b/api/core/v3/go.mod deleted file mode 100644 index f1d33dcaa4..0000000000 --- a/api/core/v3/go.mod +++ /dev/null @@ -1,10 +0,0 @@ -module github.com/sensu/sensu-go/api/core/v3 - -go 1.16 - -require ( - github.com/gogo/protobuf v1.3.2 - github.com/golang/protobuf v1.5.2 - github.com/sensu/sensu-go/api/core/v2 v2.14.0 - github.com/sensu/sensu-go/types v0.10.0 -) diff --git a/api/core/v3/go.sum b/api/core/v3/go.sum deleted file mode 100644 index c1e134564f..0000000000 --- a/api/core/v3/go.sum +++ /dev/null @@ -1,184 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/echlebek/crock v1.0.1 h1:KbzamClMIfVIkkjq/GTXf+N16KylYBpiaTitO3f1ujg= -github.com/echlebek/crock v1.0.1/go.mod h1:/kvwHRX3ZXHj/kHWJkjXDmzzRow54EJuHtQ/PapL/HI= -github.com/echlebek/timeproxy v1.0.0 h1:V41/v8tmmMDNMA2GrBPI45nlXb3F7+OY+nJz1BqKsCk= -github.com/echlebek/timeproxy v1.0.0/go.mod h1:0dg2Lnb8no/jFwoMQKMTU6iAivgoMptGqSTprhnrRtk= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.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.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff h1:+6NUiITWwE5q1KO6SAfUX918c+Tab0+tGAM/mtdlUyA= -github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= -github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= -github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/sensu/sensu-go/api/core/v2 v2.14.0 h1:z4JVqy7z6iFgMDUH0uc1Ns0bqLFKTpc5bi4Iw7qweks= -github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= -github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/types v0.10.0 h1:sm+dLuqEEECVxjW5EfXkU5weGPwrg/Jymbm28HdQpl8= -github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= -github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.0 h1:GsV3S+OfZEOCNXdtNkBSR7kgLobAa/SO6tCxRa0GAYw= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -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.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= -gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -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.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/api/core/v3/internal/codegen/check_protoc/LICENSE b/api/core/v3/internal/codegen/check_protoc/LICENSE deleted file mode 100644 index 72ab74dfd2..0000000000 --- a/api/core/v3/internal/codegen/check_protoc/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2017 Sensu Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/api/core/v3/internal/codegen/check_protoc/main.go b/api/core/v3/internal/codegen/check_protoc/main.go deleted file mode 100644 index e743e46385..0000000000 --- a/api/core/v3/internal/codegen/check_protoc/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "log" - "os/exec" - "regexp" -) - -var libprotoRe = regexp.MustCompile(`^libprotoc 3.9.1\s$`) - -func main() { - out, err := exec.Command("protoc", "--version").Output() - if err != nil { - log.Fatal(err) - } - if !libprotoRe.Match(out) { - log.Fatalf("bad protoc version: want %q, got %q", libprotoRe.String(), string(out)) - } -} diff --git a/api/core/v3/internal/codegen/generate_type/LICENSE b/api/core/v3/internal/codegen/generate_type/LICENSE deleted file mode 100644 index 72ab74dfd2..0000000000 --- a/api/core/v3/internal/codegen/generate_type/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2017 Sensu Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/api/core/v3/internal/codegen/generate_type/generate_type.go b/api/core/v3/internal/codegen/generate_type/generate_type.go deleted file mode 100644 index a23b6f7618..0000000000 --- a/api/core/v3/internal/codegen/generate_type/generate_type.go +++ /dev/null @@ -1,149 +0,0 @@ -package main - -import ( - "bufio" - "bytes" - "flag" - "fmt" - "log" - "os" - "os/exec" - "regexp" - "strings" - "text/template" - "unicode" - "unicode/utf8" -) - -var ( - tmplPath = flag.String("t", "", "Path to template file") - output = flag.String("o", "", "Path to output file") - typeRe = regexp.MustCompile(`^type ([A-Z].+) struct \{`) -) - -type tmplData struct { - TypeNames []string - Comment string -} - -// kebabCase is like snakeCase, but underscores are converted to dashes -func kebabCase(camelCase string) string { - return strings.ReplaceAll(snakeCase(camelCase), "_", "-") -} - -func snakeCase(camelCase string) string { - result := make([]rune, 0) - for i, s := range camelCase { - tl := strings.ToLower(string(s)) - - // Treat acronyms as single-word, e.g. LDAP -> ldap - var nextCharCaseChanges bool - if i+1 < len(camelCase) { - nextChar, _ := utf8.DecodeRune([]byte{camelCase[i+1]}) - // Check if the next character case differs from the current character - if (unicode.IsLower(s) && unicode.IsUpper(nextChar)) || (unicode.IsUpper(s) && unicode.IsLower(nextChar)) { - nextCharCaseChanges = true - } - } - - // Add an underscore before the previous character only if it's not the - // first character, the next character case changes and we don't already - // have an underscore in the result rune - if i > 0 && nextCharCaseChanges && result[len(result)-1] != '_' { - // Prepend the underscore if the next character is lowercase, otherwise - // append it - if unicode.IsUpper(s) { - result = append(result, '_') - result = append(result, []rune(tl)...) - } else if unicode.IsLower(s) { - result = append(result, []rune(tl)...) - result = append(result, '_') - } - } else { - result = append(result, []rune(tl)...) - } - } - return string(result) -} - -func receiver(name string) string { - if name == "" { - panic("can't resolve receiver name") - } - letter := strings.ToLower(name[:1]) - return fmt.Sprintf("%s *%s", letter, name) -} - -func rvar(name string) string { - if name == "" { - panic("can't resolve receiver name") - } - return strings.ToLower(name[:1]) -} - -func storeName(name string) string { - return fmt.Sprintf("%ss", snakeCase(name)) -} - -func rbacName(name string) string { - return fmt.Sprintf("%ss", snakeCase(name)) -} - -func main() { - flag.Parse() - tmpl, err := template.New(*tmplPath).Funcs(template.FuncMap{ - "snakeCase": snakeCase, - "receiver": receiver, - "rvar": rvar, - "storeName": storeName, - "rbacName": rbacName, - "kebabCase": kebabCase, - }).ParseFiles(*tmplPath) - - if err != nil { - log.Fatalf("fatal error parsing %s: %s", *tmplPath, err) - } - typeNames, err := discoverTypeNames() - if err != nil { - log.Fatalf("fatal error discovering types: %s", err) - } - tmplData := tmplData{ - TypeNames: typeNames, - Comment: "automatically generated file, do not edit!", - } - out, err := os.Create(*output) - if err != nil { - log.Fatalf("fatal error creating typemap.go: %s", err) - } - if err := tmpl.Execute(out, tmplData); err != nil { - log.Fatalf("fatal error generating typemap.go: %s", err) - } -} - -func discoverTypeNames() ([]string, error) { - var typeNames []string - doc, err := exec.Command("go", "doc", "-all", "-src", ".").CombinedOutput() - if err != nil { - return nil, fmt.Errorf("%s: %s", string(doc), err) - } - scanner := bufio.NewScanner(bytes.NewReader(doc)) - // skipNext is set true if a comment line containing sensu: nogen is found - var skipNext bool - for scanner.Scan() { - line := scanner.Bytes() - if bytes.Equal(bytes.TrimSpace(line), []byte(`//sensu:nogen`)) { - skipNext = true - continue - } - matches := typeRe.FindSubmatch(line) - if len(matches) > 1 { - // capturing group match in matches[1] - if skipNext { - skipNext = false - continue - } - typeNames = append(typeNames, string(matches[1])) - } - } - return typeNames, scanner.Err() -} diff --git a/api/core/v3/internal/codegen/generate_type/generate_type_test.go b/api/core/v3/internal/codegen/generate_type/generate_type_test.go deleted file mode 100644 index cfdc5f4c75..0000000000 --- a/api/core/v3/internal/codegen/generate_type/generate_type_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package main - -import "testing" - -func TestSnakeCase(t *testing.T) { - tests := []struct { - name string - input string - want string - }{ - { - name: "single uppercase character", - input: "A", - want: "a", - }, - { - name: "single-word with some uppercases", - input: "FooBar", - want: "foo_bar", - }, - { - name: "all uppercase word", - input: "FOO", - want: "foo", - }, - { - name: "lowercase with underscore", - input: "foo_bar", - want: "foo_bar", - }, - { - name: "some uppercases with underscore", - input: "Foo_Bar", - want: "foo_bar", - }, - { - name: "acronym", - input: "TLSOptions", - want: "tls_options", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := snakeCase(tt.input); got != tt.want { - t.Errorf("snakeCase() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/api/core/v3/internal/strings/strings.go b/api/core/v3/internal/strings/strings.go deleted file mode 100644 index 400bb517eb..0000000000 --- a/api/core/v3/internal/strings/strings.go +++ /dev/null @@ -1,60 +0,0 @@ -package strings - -import ( - "strings" - "unicode" -) - -const ( - lowerAlphaStart = 97 - lowerAlphaStop = 122 -) - -func isAlpha(r rune) bool { - return r >= lowerAlphaStart && r <= lowerAlphaStop -} - -func alphaNumeric(s string) bool { - for _, r := range s { - if !(unicode.IsDigit(r) || isAlpha(r)) { - return false - } - } - return true -} - -func normalize(s string) string { - if alphaNumeric(s) { - return s - } - lowered := strings.ToLower(s) - if alphaNumeric(lowered) { - return lowered - } - trimmed := make([]rune, 0, len(lowered)) - for _, r := range lowered { - if isAlpha(r) { - trimmed = append(trimmed, r) - } - } - return string(trimmed) -} - -// FoundInArray searches array for item without distinguishing between uppercase -// and lowercase and non-alphanumeric characters. Returns true if item is a -// value of array -func FoundInArray(item string, array []string) bool { - if item == "" || len(array) == 0 { - return false - } - - item = normalize(item) - - for i := range array { - if normalize(array[i]) == item { - return true - } - } - - return false -} diff --git a/api/core/v3/internal/strings/strings_test.go b/api/core/v3/internal/strings/strings_test.go deleted file mode 100644 index d1dfc90c10..0000000000 --- a/api/core/v3/internal/strings/strings_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package strings - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestFoundInArray(t *testing.T) { - var array []string - - found := FoundInArray("Foo", []string{}) - assert.False(t, found) - - array = []string{"foo", "bar"} - found = FoundInArray("Foo", array) - assert.True(t, found) - - array = []string{"foo", "bar"} - found = FoundInArray("FooBar", array) - assert.False(t, found) - - array = []string{"foo", "bar"} - found = FoundInArray("Foo ", array) - assert.True(t, found) - - array = []string{"foo_bar"} - found = FoundInArray("Foo_Bar", array) - assert.True(t, found) - - array = []string{"foobar"} - found = FoundInArray("Foo_Qux", array) - assert.False(t, found) -} diff --git a/api/core/v3/redacter.go b/api/core/v3/redacter.go deleted file mode 100644 index 38d781aedb..0000000000 --- a/api/core/v3/redacter.go +++ /dev/null @@ -1,7 +0,0 @@ -package v3 - -// Redacter can return a redacted copy of the resource -type Redacter interface { - // ProduceRedacted returns a redacted copy of the resource - ProduceRedacted() Resource -} diff --git a/api/core/v3/resource.go b/api/core/v3/resource.go deleted file mode 100644 index 7c6fd0fb44..0000000000 --- a/api/core/v3/resource.go +++ /dev/null @@ -1,122 +0,0 @@ -package v3 - -import ( - "encoding/json" - "reflect" - - corev2 "github.com/sensu/sensu-go/api/core/v2" - types "github.com/sensu/sensu-go/types" -) - -var _ corev2.Resource = &V2ResourceProxy{} - -// Resource represents a Sensu resource. -type Resource interface { - // GetMetadata returns the object metadata for the resource. - GetMetadata() *corev2.ObjectMeta - GeneratedType -} - -// GeneratedType is an interface that specifies all the methods that are -// automatically generated. -type GeneratedType interface { - // SetMetadata sets metadata on its receiver, if the receiver has metadata - // to set. If the receiver does not have metadata to set, nothing happens. - SetMetadata(*corev2.ObjectMeta) - - // StoreName gives the name of the resource as it pertains to a store. - StoreName() string - - // RBACName describes the name of the resource for RBAC purposes. - RBACName() string - - // URIPath gives the path to the resource, e.g. /checks/checkname - URIPath() string - - // Validate checks if the fields in the resource are valid. - Validate() error -} - -// GlobalResource is an interface for indicating -// a resource's namespace strategy -type GlobalResource interface { - // IsGlobalResource returns true when the resource - // is not namespaced. - IsGlobalResource() bool -} - -// V2ResourceProxy is a compatibility shim for converting from a v3 resource to -// a v2 resource. -//sensu:nogen -type V2ResourceProxy struct { - Resource -} - -func V3ToV2Resource(resource Resource) corev2.Resource { - return &V2ResourceProxy{Resource: resource} -} - -func (v *V2ResourceProxy) GetObjectMeta() corev2.ObjectMeta { - meta := v.GetMetadata() - if meta == nil { - return corev2.ObjectMeta{ - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - } - return *meta -} - -func (v *V2ResourceProxy) SetObjectMeta(meta corev2.ObjectMeta) { - v.SetMetadata(&meta) -} - -func (v *V2ResourceProxy) SetNamespace(ns string) { - // SetNamespace expected to be a no-op for - // core/v2 Resources. sensu-go and sensu-go/types - // both depend on this property. - if gr, ok := v.Resource.(GlobalResource); ok { - if gr.IsGlobalResource() { - return - } - } - if v.GetMetadata() == nil { - v.SetMetadata(&corev2.ObjectMeta{ - Labels: make(map[string]string), - Annotations: make(map[string]string), - }) - } - v.GetMetadata().Namespace = ns -} - -func (v *V2ResourceProxy) StorePrefix() string { - return v.StoreName() -} - -func (v V2ResourceProxy) MarshalJSON() ([]byte, error) { - return json.Marshal(v.Resource) -} - -func (v *V2ResourceProxy) UnmarshalJSON(b []byte) error { - return json.Unmarshal(b, &v.Resource) -} - -// tmGetter is useful for types that want to explicitly provide their -// TypeMeta - this is useful for lifters. -type tmGetter interface { - GetTypeMeta() corev2.TypeMeta -} - -func (v V2ResourceProxy) GetTypeMeta() corev2.TypeMeta { - var tm corev2.TypeMeta - if getter, ok := v.Resource.(tmGetter); ok { - tm = getter.GetTypeMeta() - } else { - typ := reflect.Indirect(reflect.ValueOf(v.Resource)).Type() - tm = corev2.TypeMeta{ - Type: typ.Name(), - APIVersion: types.ApiVersion(typ.PkgPath()), - } - } - return tm -} diff --git a/api/core/v3/resource_generated.go b/api/core/v3/resource_generated.go deleted file mode 100644 index c9090d867b..0000000000 --- a/api/core/v3/resource_generated.go +++ /dev/null @@ -1,363 +0,0 @@ -package v3 - -// automatically generated file, do not edit! - -import ( - "encoding/json" - "errors" - "fmt" - "net/url" - "path" - "reflect" - - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -// implement validator to add validation to Validate methods -type validator interface { - validate() error -} - -// implement storeNamer to override StoreName methods -type storeNamer interface { - storeName() string -} - -// implement rbacNamer to override RBACName methods -type rbacNamer interface { - rbacName() string -} - -// implement uriPather to override URIPath methods -type uriPather interface { - uriPath() string -} - -type getMetadataer interface { - GetMetadata() *corev2.ObjectMeta -} - -func uriPath(typename, namespace, name string) string { - if namespace == "" { - return path.Join("api", "core", "v3", typename, url.PathEscape(name)) - } - return path.Join("api", "core", "v3", "namespaces", url.PathEscape(namespace), typename, url.PathEscape(name)) -} - -// SetMetadata sets the provided metadata on the type. If the type does not -// have any metadata, nothing will happen. -func (e *EntityConfig) SetMetadata(meta *corev2.ObjectMeta) { - // The function has to use reflection, since not all of the generated types - // will have metadata. - value := reflect.Indirect(reflect.ValueOf(e)) - field := value.FieldByName("Metadata") - if !field.CanSet() { - return - } - field.Set(reflect.ValueOf(meta)) -} - -// StoreName returns the store name for EntityConfig. It will be -// overridden if there is a method for EntityConfig called "storeName". -func (e *EntityConfig) StoreName() string { - var iface interface{} = e - if prefixer, ok := iface.(storeNamer); ok { - return prefixer.storeName() - } - return "entity_configs" -} - -// RBACName returns the RBAC name for EntityConfig. It will be overridden if -// there is a method for EntityConfig called "rbacName". -func (e *EntityConfig) RBACName() string { - var iface interface{} = e - if namer, ok := iface.(rbacNamer); ok { - return namer.rbacName() - } - return "entity_configs" -} - -// URIPath returns the URI path for EntityConfig. It will be overridden if -// there is a method for EntityConfig called uriPath. -func (e *EntityConfig) URIPath() string { - var iface interface{} = e - if pather, ok := iface.(uriPather); ok { - return pather.uriPath() - } - metaer, ok := iface.(getMetadataer) - if !ok { - return "" - } - meta := metaer.GetMetadata() - if meta == nil { - return uriPath("entity-configs", "", "") - } - return uriPath("entity-configs", meta.Namespace, meta.Name) -} - -// Validate validates the EntityConfig. If the EntityConfig has metadata, -// it will be validated via ValidateMetadata. If there is a method for -// EntityConfig called validate, then it will be used to cooperatively -// validate the EntityConfig. -func (e *EntityConfig) Validate() error { - if e == nil { - return errors.New("nil EntityConfig") - } - var iface interface{} = e - if resource, ok := iface.(Resource); ok { - if err := ValidateMetadata(resource.GetMetadata()); err != nil { - return fmt.Errorf("invalid EntityConfig: %s", err) - } - } - if validator, ok := iface.(validator); ok { - if err := validator.validate(); err != nil { - return err - } - } - return nil -} - -// UnmarshalJSON is provided in order to ensure that metadata labels and -// annotations are never nil. -func (e *EntityConfig) UnmarshalJSON(msg []byte) error { - type Clone EntityConfig - var clone Clone - if err := json.Unmarshal(msg, &clone); err != nil { - return err - } - *e = *(*EntityConfig)(&clone) - var iface interface{} = e - var meta *corev2.ObjectMeta - if metaer, ok := iface.(getMetadataer); ok { - meta = metaer.GetMetadata() - } - if meta != nil { - if meta.Labels == nil { - meta.Labels = make(map[string]string) - } - if meta.Annotations == nil { - meta.Annotations = make(map[string]string) - } - } - return nil -} - -// GetTypeMeta gets the type metadata for a EntityConfig. -func (e *EntityConfig) GetTypeMeta() corev2.TypeMeta { - return corev2.TypeMeta{ - APIVersion: "core/v3", - Type: "EntityConfig", - } -} - -// SetMetadata sets the provided metadata on the type. If the type does not -// have any metadata, nothing will happen. -func (e *EntityState) SetMetadata(meta *corev2.ObjectMeta) { - // The function has to use reflection, since not all of the generated types - // will have metadata. - value := reflect.Indirect(reflect.ValueOf(e)) - field := value.FieldByName("Metadata") - if !field.CanSet() { - return - } - field.Set(reflect.ValueOf(meta)) -} - -// StoreName returns the store name for EntityState. It will be -// overridden if there is a method for EntityState called "storeName". -func (e *EntityState) StoreName() string { - var iface interface{} = e - if prefixer, ok := iface.(storeNamer); ok { - return prefixer.storeName() - } - return "entity_states" -} - -// RBACName returns the RBAC name for EntityState. It will be overridden if -// there is a method for EntityState called "rbacName". -func (e *EntityState) RBACName() string { - var iface interface{} = e - if namer, ok := iface.(rbacNamer); ok { - return namer.rbacName() - } - return "entity_states" -} - -// URIPath returns the URI path for EntityState. It will be overridden if -// there is a method for EntityState called uriPath. -func (e *EntityState) URIPath() string { - var iface interface{} = e - if pather, ok := iface.(uriPather); ok { - return pather.uriPath() - } - metaer, ok := iface.(getMetadataer) - if !ok { - return "" - } - meta := metaer.GetMetadata() - if meta == nil { - return uriPath("entity-states", "", "") - } - return uriPath("entity-states", meta.Namespace, meta.Name) -} - -// Validate validates the EntityState. If the EntityState has metadata, -// it will be validated via ValidateMetadata. If there is a method for -// EntityState called validate, then it will be used to cooperatively -// validate the EntityState. -func (e *EntityState) Validate() error { - if e == nil { - return errors.New("nil EntityState") - } - var iface interface{} = e - if resource, ok := iface.(Resource); ok { - if err := ValidateMetadata(resource.GetMetadata()); err != nil { - return fmt.Errorf("invalid EntityState: %s", err) - } - } - if validator, ok := iface.(validator); ok { - if err := validator.validate(); err != nil { - return err - } - } - return nil -} - -// UnmarshalJSON is provided in order to ensure that metadata labels and -// annotations are never nil. -func (e *EntityState) UnmarshalJSON(msg []byte) error { - type Clone EntityState - var clone Clone - if err := json.Unmarshal(msg, &clone); err != nil { - return err - } - *e = *(*EntityState)(&clone) - var iface interface{} = e - var meta *corev2.ObjectMeta - if metaer, ok := iface.(getMetadataer); ok { - meta = metaer.GetMetadata() - } - if meta != nil { - if meta.Labels == nil { - meta.Labels = make(map[string]string) - } - if meta.Annotations == nil { - meta.Annotations = make(map[string]string) - } - } - return nil -} - -// GetTypeMeta gets the type metadata for a EntityState. -func (e *EntityState) GetTypeMeta() corev2.TypeMeta { - return corev2.TypeMeta{ - APIVersion: "core/v3", - Type: "EntityState", - } -} - -// SetMetadata sets the provided metadata on the type. If the type does not -// have any metadata, nothing will happen. -func (r *ResourceTemplate) SetMetadata(meta *corev2.ObjectMeta) { - // The function has to use reflection, since not all of the generated types - // will have metadata. - value := reflect.Indirect(reflect.ValueOf(r)) - field := value.FieldByName("Metadata") - if !field.CanSet() { - return - } - field.Set(reflect.ValueOf(meta)) -} - -// StoreName returns the store name for ResourceTemplate. It will be -// overridden if there is a method for ResourceTemplate called "storeName". -func (r *ResourceTemplate) StoreName() string { - var iface interface{} = r - if prefixer, ok := iface.(storeNamer); ok { - return prefixer.storeName() - } - return "resource_templates" -} - -// RBACName returns the RBAC name for ResourceTemplate. It will be overridden if -// there is a method for ResourceTemplate called "rbacName". -func (r *ResourceTemplate) RBACName() string { - var iface interface{} = r - if namer, ok := iface.(rbacNamer); ok { - return namer.rbacName() - } - return "resource_templates" -} - -// URIPath returns the URI path for ResourceTemplate. It will be overridden if -// there is a method for ResourceTemplate called uriPath. -func (r *ResourceTemplate) URIPath() string { - var iface interface{} = r - if pather, ok := iface.(uriPather); ok { - return pather.uriPath() - } - metaer, ok := iface.(getMetadataer) - if !ok { - return "" - } - meta := metaer.GetMetadata() - if meta == nil { - return uriPath("resource-templates", "", "") - } - return uriPath("resource-templates", meta.Namespace, meta.Name) -} - -// Validate validates the ResourceTemplate. If the ResourceTemplate has metadata, -// it will be validated via ValidateMetadata. If there is a method for -// ResourceTemplate called validate, then it will be used to cooperatively -// validate the ResourceTemplate. -func (r *ResourceTemplate) Validate() error { - if r == nil { - return errors.New("nil ResourceTemplate") - } - var iface interface{} = r - if resource, ok := iface.(Resource); ok { - if err := ValidateMetadata(resource.GetMetadata()); err != nil { - return fmt.Errorf("invalid ResourceTemplate: %s", err) - } - } - if validator, ok := iface.(validator); ok { - if err := validator.validate(); err != nil { - return err - } - } - return nil -} - -// UnmarshalJSON is provided in order to ensure that metadata labels and -// annotations are never nil. -func (r *ResourceTemplate) UnmarshalJSON(msg []byte) error { - type Clone ResourceTemplate - var clone Clone - if err := json.Unmarshal(msg, &clone); err != nil { - return err - } - *r = *(*ResourceTemplate)(&clone) - var iface interface{} = r - var meta *corev2.ObjectMeta - if metaer, ok := iface.(getMetadataer); ok { - meta = metaer.GetMetadata() - } - if meta != nil { - if meta.Labels == nil { - meta.Labels = make(map[string]string) - } - if meta.Annotations == nil { - meta.Annotations = make(map[string]string) - } - } - return nil -} - -// GetTypeMeta gets the type metadata for a ResourceTemplate. -func (r *ResourceTemplate) GetTypeMeta() corev2.TypeMeta { - return corev2.TypeMeta{ - APIVersion: "core/v3", - Type: "ResourceTemplate", - } -} diff --git a/api/core/v3/resource_generated.tmpl b/api/core/v3/resource_generated.tmpl deleted file mode 100644 index 5e3dc0ce01..0000000000 --- a/api/core/v3/resource_generated.tmpl +++ /dev/null @@ -1,153 +0,0 @@ -package v3 - -// {{ .Comment }} - -import ( - "encoding/json" - "errors" - "fmt" - "net/url" - "path" - "reflect" - - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -// implement validator to add validation to Validate methods -type validator interface { - validate() error -} - -// implement storeNamer to override StoreName methods -type storeNamer interface { - storeName() string -} - -// implement rbacNamer to override RBACName methods -type rbacNamer interface { - rbacName() string -} - -// implement uriPather to override URIPath methods -type uriPather interface { - uriPath() string -} - -type getMetadataer interface { - GetMetadata() *corev2.ObjectMeta -} - -func uriPath(typename, namespace, name string) string { - if namespace == "" { - return path.Join("api", "core", "v3", typename, url.PathEscape(name)) - } - return path.Join("api", "core", "v3", "namespaces", url.PathEscape(namespace), typename, url.PathEscape(name)) -} - -{{ range $index, $typename := .TypeNames }} -// SetMetadata sets the provided metadata on the type. If the type does not -// have any metadata, nothing will happen. -func ({{ receiver $typename }}) SetMetadata(meta *corev2.ObjectMeta) { - // The function has to use reflection, since not all of the generated types - // will have metadata. - value := reflect.Indirect(reflect.ValueOf({{ rvar $typename }})) - field := value.FieldByName("Metadata") - if !field.CanSet() { - return - } - field.Set(reflect.ValueOf(meta)) -} - -// StoreName returns the store name for {{ $typename }}. It will be -// overridden if there is a method for {{ $typename }} called "storeName". -func ({{ receiver $typename }}) StoreName() string { - var iface interface{} = {{ rvar $typename }} - if prefixer, ok := iface.(storeNamer); ok { - return prefixer.storeName() - } - return "{{ storeName $typename }}" -} - -// RBACName returns the RBAC name for {{ $typename }}. It will be overridden if -// there is a method for {{ $typename }} called "rbacName". -func ({{ receiver $typename }}) RBACName() string { - var iface interface{} = {{ rvar $typename }} - if namer, ok := iface.(rbacNamer); ok { - return namer.rbacName() - } - return "{{ rbacName $typename }}" -} - -// URIPath returns the URI path for {{ $typename }}. It will be overridden if -// there is a method for {{ $typename }} called uriPath. -func ({{ receiver $typename }}) URIPath() string { - var iface interface{} = {{ rvar $typename }} - if pather, ok := iface.(uriPather); ok { - return pather.uriPath() - } - metaer, ok := iface.(getMetadataer) - if !ok { - return "" - } - meta := metaer.GetMetadata() - if meta == nil { - return uriPath("{{ kebabCase $typename }}s", "", "") - } - return uriPath("{{ kebabCase $typename }}s", meta.Namespace, meta.Name) -} - -// Validate validates the {{ $typename }}. If the {{ $typename }} has metadata, -// it will be validated via ValidateMetadata. If there is a method for -// {{ $typename }} called validate, then it will be used to cooperatively -// validate the {{ $typename }}. -func ({{ receiver $typename }}) Validate() error { - if {{ rvar $typename }} == nil { - return errors.New("nil {{ $typename }}") - } - var iface interface{} = {{ rvar $typename }} - if resource, ok := iface.(Resource); ok { - if err := ValidateMetadata(resource.GetMetadata()); err != nil { - return fmt.Errorf("invalid {{ $typename }}: %s", err) - } - } - if validator, ok := iface.(validator); ok { - if err := validator.validate(); err != nil { - return err - } - } - return nil -} - -// UnmarshalJSON is provided in order to ensure that metadata labels and -// annotations are never nil. -func ({{ receiver $typename }}) UnmarshalJSON(msg []byte) error { - type Clone {{ $typename }} - var clone Clone - if err := json.Unmarshal(msg, &clone); err != nil { - return err - } - *{{ rvar $typename }} = *(*{{ $typename }})(&clone) - var iface interface{} = {{ rvar $typename }} - var meta *corev2.ObjectMeta - if metaer, ok := iface.(getMetadataer); ok { - meta = metaer.GetMetadata() - } - if meta != nil { - if meta.Labels == nil { - meta.Labels = make(map[string]string) - } - if meta.Annotations == nil { - meta.Annotations = make(map[string]string) - } - } - return nil -} - -// GetTypeMeta gets the type metadata for a {{ $typename }}. -func ({{ receiver $typename }}) GetTypeMeta() corev2.TypeMeta { - return corev2.TypeMeta{ - APIVersion: "core/v3", - Type: "{{ $typename }}", - } -} -{{ end }} diff --git a/api/core/v3/resource_generated_test.go b/api/core/v3/resource_generated_test.go deleted file mode 100644 index 9e8e114d8f..0000000000 --- a/api/core/v3/resource_generated_test.go +++ /dev/null @@ -1,487 +0,0 @@ -package v3 - -// automatically generated file, do not edit! - -import ( - "encoding/json" - "net/url" - "reflect" - "testing" - - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -func TestEntityConfigSetMetadata(t *testing.T) { - value := new(EntityConfig) - var iface interface{} = value - metaer, ok := iface.(getMetadataer) - if !ok { - return - } - meta := &corev2.ObjectMeta{ - Name: "snoopdogg", - Namespace: "lbc", - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - value.SetMetadata(meta) - if got, want := metaer.GetMetadata(), meta; !reflect.DeepEqual(got, want) { - t.Fatalf("bad metadata: got %v, want %v", got, want) - } -} - -func TestEntityConfigStoreName(t *testing.T) { - var value EntityConfig - got := value.StoreName() - if len(got) == 0 { - t.Error("undefined store suffix") - } - var iface interface{} = value - if suffixer, ok := iface.(storeNamer); ok { - if got, want := value.StoreName(), suffixer.storeName(); got != want { - t.Errorf("bad store suffix: got %s, want %s", got, want) - } - } -} - -func TestEntityConfigRBACName(t *testing.T) { - var value EntityConfig - got := value.RBACName() - if len(got) == 0 { - t.Error("undefined rbac name") - } - var iface interface{} = value - if namer, ok := iface.(rbacNamer); ok { - if got, want := value.RBACName(), namer.rbacName(); got != want { - t.Errorf("bad rbac name: got %s, want %s", got, want) - } - } -} - -func TestEntityConfigURIPath(t *testing.T) { - var value EntityConfig - value.Metadata = &corev2.ObjectMeta{ - Namespace: "default", - Name: "foo", - } - got := value.URIPath() - if _, err := url.Parse(got); err != nil { - t.Error(err) - } - var iface interface{} = value - if pather, ok := iface.(uriPather); ok { - if got, want := value.URIPath(), pather.uriPath(); got != want { - t.Errorf("bad uri path: got %s, want %s", got, want) - } - } -} - -func TestEntityConfigValidate(t *testing.T) { - var value EntityConfig - if err := value.Validate(); err == nil { - t.Errorf("expected non-nil error for nil metadata") - } - value.Metadata = &corev2.ObjectMeta{ - Name: "#@$@#%@#%@#%", - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - if err := value.Validate(); err == nil { - t.Errorf("expected non-nil error for invalid metadata name") - } - value.Metadata.Name = "foo" - var iface interface{} = &value - if validator, ok := iface.(validator); ok { - if got, want := value.Validate(), validator.validate(); got.Error() != want.Error() { - t.Errorf("validator error: got %s, want %s", got, want) - } - return - } - if err := value.Validate(); err != nil { - t.Error(err) - } -} - -func TestEntityConfigUnmarshalJSON(t *testing.T) { - msg := []byte(`{"metadata": {"namespace": "default", "name": "foo"}}`) - var value EntityConfig - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - var iface interface{} = &value - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if got, want := meta.Namespace, "default"; got != want { - t.Errorf("bad namespace: got %s, want %s", got, want) - } - if got, want := meta.Name, "foo"; got != want { - t.Errorf("bad name: got %s, want %s", got, want) - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Error("nil annotations") - } - } - - // make sure labels are not accidentally zeroed out - msg = []byte(`{"metadata": {"namespace": "default", "name": "foo", "labels": {"a": "b"}}}`) - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if got, want := len(meta.Labels), 1; got != want { - t.Error("expected one label") - } - } - - // make sure annotations are not accidentally zeroed out - msg = []byte(`{"metadata": {"namespace": "default", "name": "foo", "annotations": {"a": "b"}}}`) - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if got, want := len(meta.Annotations), 1; got != want { - t.Error("expected one annotation") - } - } -} - -func TestEntityConfigGetTypeMeta(t *testing.T) { - var value EntityConfig - meta := value.GetTypeMeta() - if got, want := meta.APIVersion, "core/v3"; got != want { - t.Errorf("bad api version: got %s, want %s", got, want) - } - if got, want := meta.Type, "EntityConfig"; got != want { - t.Errorf("bad type: got %s, want %s", got, want) - } -} - -func TestEntityStateSetMetadata(t *testing.T) { - value := new(EntityState) - var iface interface{} = value - metaer, ok := iface.(getMetadataer) - if !ok { - return - } - meta := &corev2.ObjectMeta{ - Name: "snoopdogg", - Namespace: "lbc", - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - value.SetMetadata(meta) - if got, want := metaer.GetMetadata(), meta; !reflect.DeepEqual(got, want) { - t.Fatalf("bad metadata: got %v, want %v", got, want) - } -} - -func TestEntityStateStoreName(t *testing.T) { - var value EntityState - got := value.StoreName() - if len(got) == 0 { - t.Error("undefined store suffix") - } - var iface interface{} = value - if suffixer, ok := iface.(storeNamer); ok { - if got, want := value.StoreName(), suffixer.storeName(); got != want { - t.Errorf("bad store suffix: got %s, want %s", got, want) - } - } -} - -func TestEntityStateRBACName(t *testing.T) { - var value EntityState - got := value.RBACName() - if len(got) == 0 { - t.Error("undefined rbac name") - } - var iface interface{} = value - if namer, ok := iface.(rbacNamer); ok { - if got, want := value.RBACName(), namer.rbacName(); got != want { - t.Errorf("bad rbac name: got %s, want %s", got, want) - } - } -} - -func TestEntityStateURIPath(t *testing.T) { - var value EntityState - value.Metadata = &corev2.ObjectMeta{ - Namespace: "default", - Name: "foo", - } - got := value.URIPath() - if _, err := url.Parse(got); err != nil { - t.Error(err) - } - var iface interface{} = value - if pather, ok := iface.(uriPather); ok { - if got, want := value.URIPath(), pather.uriPath(); got != want { - t.Errorf("bad uri path: got %s, want %s", got, want) - } - } -} - -func TestEntityStateValidate(t *testing.T) { - var value EntityState - if err := value.Validate(); err == nil { - t.Errorf("expected non-nil error for nil metadata") - } - value.Metadata = &corev2.ObjectMeta{ - Name: "#@$@#%@#%@#%", - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - if err := value.Validate(); err == nil { - t.Errorf("expected non-nil error for invalid metadata name") - } - value.Metadata.Name = "foo" - var iface interface{} = &value - if validator, ok := iface.(validator); ok { - if got, want := value.Validate(), validator.validate(); got.Error() != want.Error() { - t.Errorf("validator error: got %s, want %s", got, want) - } - return - } - if err := value.Validate(); err != nil { - t.Error(err) - } -} - -func TestEntityStateUnmarshalJSON(t *testing.T) { - msg := []byte(`{"metadata": {"namespace": "default", "name": "foo"}}`) - var value EntityState - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - var iface interface{} = &value - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if got, want := meta.Namespace, "default"; got != want { - t.Errorf("bad namespace: got %s, want %s", got, want) - } - if got, want := meta.Name, "foo"; got != want { - t.Errorf("bad name: got %s, want %s", got, want) - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Error("nil annotations") - } - } - - // make sure labels are not accidentally zeroed out - msg = []byte(`{"metadata": {"namespace": "default", "name": "foo", "labels": {"a": "b"}}}`) - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if got, want := len(meta.Labels), 1; got != want { - t.Error("expected one label") - } - } - - // make sure annotations are not accidentally zeroed out - msg = []byte(`{"metadata": {"namespace": "default", "name": "foo", "annotations": {"a": "b"}}}`) - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if got, want := len(meta.Annotations), 1; got != want { - t.Error("expected one annotation") - } - } -} - -func TestEntityStateGetTypeMeta(t *testing.T) { - var value EntityState - meta := value.GetTypeMeta() - if got, want := meta.APIVersion, "core/v3"; got != want { - t.Errorf("bad api version: got %s, want %s", got, want) - } - if got, want := meta.Type, "EntityState"; got != want { - t.Errorf("bad type: got %s, want %s", got, want) - } -} - -func TestResourceTemplateSetMetadata(t *testing.T) { - value := new(ResourceTemplate) - var iface interface{} = value - metaer, ok := iface.(getMetadataer) - if !ok { - return - } - meta := &corev2.ObjectMeta{ - Name: "snoopdogg", - Namespace: "lbc", - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - value.SetMetadata(meta) - if got, want := metaer.GetMetadata(), meta; !reflect.DeepEqual(got, want) { - t.Fatalf("bad metadata: got %v, want %v", got, want) - } -} - -func TestResourceTemplateStoreName(t *testing.T) { - var value ResourceTemplate - got := value.StoreName() - if len(got) == 0 { - t.Error("undefined store suffix") - } - var iface interface{} = value - if suffixer, ok := iface.(storeNamer); ok { - if got, want := value.StoreName(), suffixer.storeName(); got != want { - t.Errorf("bad store suffix: got %s, want %s", got, want) - } - } -} - -func TestResourceTemplateRBACName(t *testing.T) { - var value ResourceTemplate - got := value.RBACName() - if len(got) == 0 { - t.Error("undefined rbac name") - } - var iface interface{} = value - if namer, ok := iface.(rbacNamer); ok { - if got, want := value.RBACName(), namer.rbacName(); got != want { - t.Errorf("bad rbac name: got %s, want %s", got, want) - } - } -} - -func TestResourceTemplateURIPath(t *testing.T) { - var value ResourceTemplate - value.Metadata = &corev2.ObjectMeta{ - Namespace: "default", - Name: "foo", - } - got := value.URIPath() - if _, err := url.Parse(got); err != nil { - t.Error(err) - } - var iface interface{} = value - if pather, ok := iface.(uriPather); ok { - if got, want := value.URIPath(), pather.uriPath(); got != want { - t.Errorf("bad uri path: got %s, want %s", got, want) - } - } -} - -func TestResourceTemplateValidate(t *testing.T) { - var value ResourceTemplate - if err := value.Validate(); err == nil { - t.Errorf("expected non-nil error for nil metadata") - } - value.Metadata = &corev2.ObjectMeta{ - Name: "#@$@#%@#%@#%", - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - if err := value.Validate(); err == nil { - t.Errorf("expected non-nil error for invalid metadata name") - } - value.Metadata.Name = "foo" - var iface interface{} = &value - if validator, ok := iface.(validator); ok { - if got, want := value.Validate(), validator.validate(); got.Error() != want.Error() { - t.Errorf("validator error: got %s, want %s", got, want) - } - return - } - if err := value.Validate(); err != nil { - t.Error(err) - } -} - -func TestResourceTemplateUnmarshalJSON(t *testing.T) { - msg := []byte(`{"metadata": {"namespace": "default", "name": "foo"}}`) - var value ResourceTemplate - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - var iface interface{} = &value - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if got, want := meta.Namespace, "default"; got != want { - t.Errorf("bad namespace: got %s, want %s", got, want) - } - if got, want := meta.Name, "foo"; got != want { - t.Errorf("bad name: got %s, want %s", got, want) - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Error("nil annotations") - } - } - - // make sure labels are not accidentally zeroed out - msg = []byte(`{"metadata": {"namespace": "default", "name": "foo", "labels": {"a": "b"}}}`) - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if got, want := len(meta.Labels), 1; got != want { - t.Error("expected one label") - } - } - - // make sure annotations are not accidentally zeroed out - msg = []byte(`{"metadata": {"namespace": "default", "name": "foo", "annotations": {"a": "b"}}}`) - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if got, want := len(meta.Annotations), 1; got != want { - t.Error("expected one annotation") - } - } -} - -func TestResourceTemplateGetTypeMeta(t *testing.T) { - var value ResourceTemplate - meta := value.GetTypeMeta() - if got, want := meta.APIVersion, "core/v3"; got != want { - t.Errorf("bad api version: got %s, want %s", got, want) - } - if got, want := meta.Type, "ResourceTemplate"; got != want { - t.Errorf("bad type: got %s, want %s", got, want) - } -} - -func TestResourceUniqueness(t *testing.T) { - types := make(map[reflect.Type]GeneratedType) - for _, v := range typeMap { - types[reflect.TypeOf(v)] = v.(GeneratedType) - } - if got, want := len(types), len(typeMap)/2; got != want { - t.Fatalf("bad number of types: got %d, want %d", got, want) - } -} diff --git a/api/core/v3/resource_generated_test.tmpl b/api/core/v3/resource_generated_test.tmpl deleted file mode 100644 index f32a4ba7ee..0000000000 --- a/api/core/v3/resource_generated_test.tmpl +++ /dev/null @@ -1,179 +0,0 @@ -package v3 - -// {{ .Comment }} - -import ( - "encoding/json" - "reflect" - "testing" - "net/url" - - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -{{ range $index, $typename := .TypeNames }} -func Test{{ $typename }}SetMetadata(t *testing.T) { - value := new({{ $typename }}) - var iface interface{} = value - metaer, ok := iface.(getMetadataer) - if !ok { - return - } - meta := &corev2.ObjectMeta{ - Name: "snoopdogg", - Namespace: "lbc", - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - value.SetMetadata(meta) - if got, want := metaer.GetMetadata(), meta; !reflect.DeepEqual(got, want) { - t.Fatalf("bad metadata: got %v, want %v", got, want) - } -} - -func Test{{ $typename }}StoreName(t *testing.T) { - var value {{ $typename }} - got := value.StoreName() - if len(got) == 0 { - t.Error("undefined store suffix") - } - var iface interface{} = value - if suffixer, ok := iface.(storeNamer); ok { - if got, want := value.StoreName(), suffixer.storeName(); got != want { - t.Errorf("bad store suffix: got %s, want %s", got, want) - } - } -} - -func Test{{ $typename }}RBACName(t *testing.T) { - var value {{ $typename }} - got := value.RBACName() - if len(got) == 0 { - t.Error("undefined rbac name") - } - var iface interface{} = value - if namer, ok := iface.(rbacNamer); ok { - if got, want := value.RBACName(), namer.rbacName(); got != want { - t.Errorf("bad rbac name: got %s, want %s", got, want) - } - } -} - -func Test{{ $typename }}URIPath(t *testing.T) { - var value {{ $typename }} - value.Metadata = &corev2.ObjectMeta{ - Namespace: "default", - Name: "foo", - } - got := value.URIPath() - if _, err := url.Parse(got); err != nil { - t.Error(err) - } - var iface interface{} = value - if pather, ok := iface.(uriPather); ok { - if got, want := value.URIPath(), pather.uriPath(); got != want { - t.Errorf("bad uri path: got %s, want %s", got, want) - } - } -} - -func Test{{ $typename}}Validate(t *testing.T) { - var value {{ $typename }} - if err := value.Validate(); err == nil { - t.Errorf("expected non-nil error for nil metadata") - } - value.Metadata = &corev2.ObjectMeta{ - Name: "#@$@#%@#%@#%", - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - if err := value.Validate(); err == nil { - t.Errorf("expected non-nil error for invalid metadata name") - } - value.Metadata.Name = "foo" - var iface interface{} = &value - if validator, ok := iface.(validator); ok { - if got, want := value.Validate(), validator.validate(); got.Error() != want.Error() { - t.Errorf("validator error: got %s, want %s", got, want) - } - return - } - if err := value.Validate(); err != nil { - t.Error(err) - } -} - -func Test{{ $typename }}UnmarshalJSON(t *testing.T) { - msg := []byte(`{"metadata": {"namespace": "default", "name": "foo"}}`) - var value {{ $typename }} - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - var iface interface{} = &value - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if got, want := meta.Namespace, "default"; got != want { - t.Errorf("bad namespace: got %s, want %s", got, want) - } - if got, want := meta.Name, "foo"; got != want { - t.Errorf("bad name: got %s, want %s", got, want) - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Error("nil annotations") - } - } - - // make sure labels are not accidentally zeroed out - msg = []byte(`{"metadata": {"namespace": "default", "name": "foo", "labels": {"a": "b"}}}`) - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if got, want := len(meta.Labels), 1; got != want { - t.Error("expected one label") - } - } - - // make sure annotations are not accidentally zeroed out - msg = []byte(`{"metadata": {"namespace": "default", "name": "foo", "annotations": {"a": "b"}}}`) - if err := json.Unmarshal(msg, &value); err != nil { - t.Fatal(err) - } - - if metaer, ok := iface.(getMetadataer); ok { - meta := metaer.GetMetadata() - if got, want := len(meta.Annotations), 1; got != want { - t.Error("expected one annotation") - } - } -} - -func Test{{ $typename }}GetTypeMeta(t *testing.T) { - var value {{ $typename }} - meta := value.GetTypeMeta() - if got, want := meta.APIVersion, "core/v3"; got != want { - t.Errorf("bad api version: got %s, want %s", got, want) - } - if got, want := meta.Type, "{{ $typename }}"; got != want { - t.Errorf("bad type: got %s, want %s", got, want) - } -} -{{ end }} - -func TestResourceUniqueness(t *testing.T) { - types := make(map[reflect.Type]GeneratedType) - for _, v := range typeMap { - types[reflect.TypeOf(v)] = v.(GeneratedType) - } - if got, want := len(types), len(typeMap)/2; got != want { - t.Fatalf("bad number of types: got %d, want %d", got, want) - } -} diff --git a/api/core/v3/resource_template.go b/api/core/v3/resource_template.go deleted file mode 100644 index eb534a695a..0000000000 --- a/api/core/v3/resource_template.go +++ /dev/null @@ -1,64 +0,0 @@ -package v3 - -import ( - "bytes" - "encoding/json" - "fmt" - "html/template" - - corev2 "github.com/sensu/sensu-go/api/core/v2" - types "github.com/sensu/sensu-go/types" -) - -// ResourceTemplate is a template for core/v3 resources. -type ResourceTemplate struct { - Metadata *corev2.ObjectMeta `json:"metadata"` - APIVersion string `json:"api_version"` - Type string `json:"type"` - Template string `json:"template"` -} - -func (r *ResourceTemplate) GetMetadata() *corev2.ObjectMeta { - return r.Metadata -} - -// Execute executes the Template in the ResourceTemplate. It's given a metadata -// object to draw variables from. Typically, templating will be done with a -// variable namespace or name, but could also be done with labels and annotations -// from the metadata, depending on the nature of the template. -func (r *ResourceTemplate) Execute(meta *corev2.ObjectMeta) (Resource, error) { - tmpl, err := template.New("resource").Parse(r.Template) - if err != nil { - return nil, fmt.Errorf("error parsing resource template: %s", err) - } - var buf bytes.Buffer - if err := tmpl.Execute(&buf, meta); err != nil { - return nil, fmt.Errorf("error executing resource template: %s", err) - } - t, err := types.ResolveRaw(r.APIVersion, r.Type) - if err != nil { - // do not wrap this error - return nil, err - } - resource, ok := t.(Resource) - if !ok { - return nil, fmt.Errorf("error expanding resource template: %T is not a core/v3 resource", t) - } - if err := json.Unmarshal(buf.Bytes(), &resource); err != nil { - return nil, fmt.Errorf("error expanding resource template: invalid json: %s", err) - } - if err := resource.Validate(); err != nil { - return nil, fmt.Errorf("error expanding resource template: resource not valid: %s", err) - } - return resource, nil -} - -func (r *ResourceTemplate) validate() error { - if _, err := template.New("validate").Parse(r.Template); err != nil { - return err - } - if _, err := types.ResolveRaw(r.APIVersion, r.Type); err != nil { - return err - } - return nil -} diff --git a/api/core/v3/resource_template_test.go b/api/core/v3/resource_template_test.go deleted file mode 100644 index 2597d03bc5..0000000000 --- a/api/core/v3/resource_template_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package v3_test - -import ( - "reflect" - testing "testing" - - corev2 "github.com/sensu/sensu-go/api/core/v2" - v3 "github.com/sensu/sensu-go/api/core/v3" -) - -func TestResourceTemplateExecute(t *testing.T) { - template := &v3.ResourceTemplate{ - Metadata: &corev2.ObjectMeta{ - Name: "template", - }, - APIVersion: "core/v3", - Type: "EntityConfig", - Template: ` - { - "metadata": { - "namespace": "{{ .Namespace }}", - "name": "entity1" - }, - "entity_class": "agent", - "user": "agent", - "subscriptions": ["a", "b", "c"] - } - `, - } - - metadata := &corev2.ObjectMeta{ - Namespace: "myns", - } - - got, err := template.Execute(metadata) - if err != nil { - t.Fatal(err) - } - - want := &v3.EntityConfig{ - Metadata: &corev2.ObjectMeta{ - Name: "entity1", - Namespace: "myns", - Labels: map[string]string{}, - Annotations: map[string]string{}, - }, - EntityClass: "agent", - User: "agent", - Subscriptions: []string{"a", "b", "c"}, - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("bad resource: got %#v, want %#v", got, want) - } - - // Causes entityconfig validation to fail - metadata.Namespace = "" - if _, err := template.Execute(metadata); err == nil { - t.Error("expected non-nil error") - } - metadata.Namespace = "myns" - - // causes type lookup to fail - template.APIVersion = "notexists" - if _, err := template.Execute(metadata); err == nil { - t.Error("expected non-nil error") - } - template.APIVersion = "core/v3" - - // causes json unmarshaling to fail - template.Template = `{sdlfkjsdlfkj}` - if _, err := template.Execute(metadata); err == nil { - t.Error("expected non-nil error") - } -} - -func TestResourceTemplateValidate(t *testing.T) { - tmpl := &v3.ResourceTemplate{ - Metadata: &corev2.ObjectMeta{ - Name: "foobar", - Labels: make(map[string]string), - Annotations: make(map[string]string), - }, - APIVersion: "core/v3", - Type: "EntityConfig", - Template: "{{ .Foobar }}", - } - if err := tmpl.Validate(); err != nil { - t.Error(err) - } - tmpl.Template = "{{" - if err := tmpl.Validate(); err == nil { - t.Error("expected non-nil error") - } - tmpl.Template = "{{ .Foobar }}" - tmpl.APIVersion = "fake/v2" - if err := tmpl.Validate(); err == nil { - t.Error("expected non-nil error") - } -} diff --git a/api/core/v3/resource_test.go b/api/core/v3/resource_test.go deleted file mode 100644 index 73ede058b3..0000000000 --- a/api/core/v3/resource_test.go +++ /dev/null @@ -1,105 +0,0 @@ -package v3 - -import ( - "errors" - "testing" - - //nolint:staticcheck // SA1004 Replacing this will take some planning. - "github.com/golang/protobuf/proto" - - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -type testResource struct { - meta *corev2.ObjectMeta -} - -func (t *testResource) GetMetadata() *corev2.ObjectMeta { - if t.meta == nil { - t.meta = &corev2.ObjectMeta{ - Labels: make(map[string]string), - Annotations: make(map[string]string), - } - } - return t.meta -} - -func (t *testResource) SetMetadata(meta *corev2.ObjectMeta) { - t.meta = meta -} - -func (t testResource) StoreName() string { - return "test" -} - -func (t testResource) RBACName() string { - return "test" -} - -func (t testResource) URIPath() string { - return "test" -} - -func (t testResource) Validate() error { - return errors.New("invalid resource") -} - -type globalTestResource struct { - testResource -} - -func (g globalTestResource) IsGlobalResource() bool { return true } - -func TestV3ToV2Resource(t *testing.T) { - resource := &testResource{} - corev2Resource := V3ToV2Resource(resource) - - if got, want := corev2Resource.GetObjectMeta(), resource.GetMetadata(); !proto.Equal(&got, want) { - t.Errorf("bad metadata: got %v, want %v", got, want) - } - - corev2Resource.SetObjectMeta(corev2.ObjectMeta{Namespace: "bar", Name: "oof"}) - if got, want := resource.GetMetadata().Name, corev2Resource.GetObjectMeta().Name; got != want { - t.Errorf("SetMetadata had wrong effect: got Name %s, want %s", got, want) - } - - corev2Resource.SetNamespace("baz") - if got, want := corev2Resource.GetObjectMeta().Namespace, "baz"; got != want { - t.Errorf("SetNamespace had wrong effect: got Namespace %s, want %s", got, want) - } - if got, want := resource.GetMetadata().Namespace, corev2Resource.GetObjectMeta().Namespace; got != want { - t.Errorf("SetNamespace operation was not proxied: got Namespace %s, want %s", got, want) - } - - if got, want := corev2Resource.StorePrefix(), resource.StoreName(); got != want { - t.Errorf("bad StorePrefix: got %s, want %s", got, want) - } - - if got, want := corev2Resource.RBACName(), resource.RBACName(); got != want { - t.Errorf("bad RBACName: got %s, want %s", got, want) - } - - if got, want := corev2Resource.URIPath(), resource.URIPath(); got != want { - t.Errorf("bad URIPath: got %s, want %s", got, want) - } - - if got, want := corev2Resource.Validate().Error(), resource.Validate().Error(); got != want { - t.Errorf("bad Validate(): got %s, want %s", got, want) - } - - // test global resoruce - globalResource := &globalTestResource{} - globalCorev2Resource := V3ToV2Resource(globalResource) - globalCorev2Resource.SetObjectMeta(corev2.ObjectMeta{Name: "oof"}) - if got, want := globalCorev2Resource.GetObjectMeta().Name, "oof"; got != want { - t.Errorf("SetMetadata had wrong effect: got Name %s, want %s", got, want) - } - if got, want := globalResource.GetMetadata().Name, globalCorev2Resource.GetObjectMeta().Name; got != want { - t.Errorf("SetMetadata was not proxied: got Name %s, want %s", got, want) - } - - globalCorev2Resource.SetNamespace("baz") - if got, want := globalCorev2Resource.GetObjectMeta().Namespace, ""; got != want { - t.Errorf("SetNamespace had wrong effect: got Namespace %s, want %s", got, want) - } -} diff --git a/api/core/v3/typemap.go b/api/core/v3/typemap.go deleted file mode 100644 index 9c6ae8eef0..0000000000 --- a/api/core/v3/typemap.go +++ /dev/null @@ -1,116 +0,0 @@ -package v3 - -// automatically generated file, do not edit! - -import ( - "fmt" - "reflect" - "sort" - - corev2 "github.com/sensu/sensu-go/api/core/v2" - types "github.com/sensu/sensu-go/types" -) - -func init() { - for _, v := range typeMap { - if r, ok := v.(Resource); ok { - rbacMap[r.RBACName()] = r - storeMap[r.StoreName()] = r - } - } - types.RegisterResolver("core/v3", ResolveRawResource) -} - -// typeMap is used to dynamically look up data types from strings. -var typeMap = map[string]interface{}{ - "EntityConfig": &EntityConfig{}, - "entity_config": &EntityConfig{}, - "EntityState": &EntityState{}, - "entity_state": &EntityState{}, - "ResourceTemplate": &ResourceTemplate{}, - "resource_template": &ResourceTemplate{}, -} - -// rbacMap is like typemap, but its keys are RBAC names, and its values are -// Resource values. -var rbacMap = make(map[string]Resource, len(typeMap)/2) - -// storeMap is like rbacMap, but its keys are store names. -var storeMap = make(map[string]Resource, len(typeMap)/2) - -// ResolveResource returns a zero-valued resource, given a name. -// If the named type does not exist, or if the type is not a Resource, -// then an error will be returned. -func ResolveResource(name string) (Resource, error) { - t, ok := typeMap[name] - if !ok { - return nil, fmt.Errorf("type could not be found: %q", name) - } - if _, ok := t.(Resource); !ok { - return nil, fmt.Errorf("%q is not a core/v3.Resource", name) - } - return newResource(t), nil -} - -// ResolveRawResource is like ResolveResource, but uses interface{} instead of -// Resource as a return type. -func ResolveRawResource(name string) (interface{}, error) { - return ResolveResource(name) -} - -// Make a new Resource to avoid aliasing problems with ResolveResource. -// don't use this function. no, seriously. -func newResource(r interface{}) Resource { - value := reflect.New(reflect.ValueOf(r).Elem().Type()).Interface().(Resource) - value.SetMetadata(&corev2.ObjectMeta{ - Labels: make(map[string]string), - Annotations: make(map[string]string), - }) - return value -} - -// ResolveV2Resource resolves the resources in this package to core/v2.Resource -// types, via the V2ResourceProxy type. -func ResolveV2Resource(name string) (corev2.Resource, error) { - resource, err := ResolveResource(name) - if err != nil { - return nil, err - } - return V3ToV2Resource(resource), nil -} - -// ResolveResourceByRBACName resolves a resource by its RBAC name. -func ResolveResourceByRBACName(name string) (Resource, error) { - resource, ok := rbacMap[name] - if !ok { - return nil, fmt.Errorf("resource not found: %s", name) - } - return newResource(resource), nil -} - -// ResolveResourceByStoreName resolves a resource by its store name. -func ResolveResourceByStoreName(name string) (Resource, error) { - resource, ok := storeMap[name] - if !ok { - return nil, fmt.Errorf("resource not found: %s", name) - } - return newResource(resource), nil -} - -// ListResources lists all of the resources in the package. -func ListResources() []Resource { - result := make([]Resource, 0, len(typeMap)/2) - unique := make(map[string]struct{}, len(typeMap)/2) - for _, v := range typeMap { - name := reflect.ValueOf(v).Elem().Type().Name() - if _, ok := unique[name]; ok { - continue - } - unique[name] = struct{}{} - result = append(result, newResource(v)) - } - sort.Slice(result, func(i, j int) bool { - return result[i].RBACName() < result[j].RBACName() - }) - return result -} diff --git a/api/core/v3/typemap.tmpl b/api/core/v3/typemap.tmpl deleted file mode 100644 index 7a46f31306..0000000000 --- a/api/core/v3/typemap.tmpl +++ /dev/null @@ -1,112 +0,0 @@ -package v3 - -// {{ .Comment }} - -import ( - "fmt" - "reflect" - "sort" - - corev2 "github.com/sensu/sensu-go/api/core/v2" - types "github.com/sensu/sensu-go/types" -) - -func init() { - for _, v := range typeMap { - if r, ok := v.(Resource); ok { - rbacMap[r.RBACName()] = r - storeMap[r.StoreName()] = r - } - } - types.RegisterResolver("core/v3", ResolveRawResource) -} - -// typeMap is used to dynamically look up data types from strings. -var typeMap = map[string]interface{}{ {{ range $index, $typename := .TypeNames }} - "{{ $typename }}": &{{ $typename }}{}, - "{{ snakeCase $typename }}": &{{ $typename }}{}, {{ end }} -} - -// rbacMap is like typemap, but its keys are RBAC names, and its values are -// Resource values. -var rbacMap = make(map[string]Resource, len(typeMap)/2) - -// storeMap is like rbacMap, but its keys are store names. -var storeMap = make(map[string]Resource, len(typeMap)/2) - -// ResolveResource returns a zero-valued resource, given a name. -// If the named type does not exist, or if the type is not a Resource, -// then an error will be returned. -func ResolveResource(name string) (Resource, error) { - t, ok := typeMap[name] - if !ok { - return nil, fmt.Errorf("type could not be found: %q", name) - } - if _, ok := t.(Resource); !ok { - return nil, fmt.Errorf("%q is not a core/v3.Resource", name) - } - return newResource(t), nil -} - -// ResolveRawResource is like ResolveResource, but uses interface{} instead of -// Resource as a return type. -func ResolveRawResource(name string) (interface{}, error) { - return ResolveResource(name) -} - -// Make a new Resource to avoid aliasing problems with ResolveResource. -// don't use this function. no, seriously. -func newResource(r interface{}) Resource { - value := reflect.New(reflect.ValueOf(r).Elem().Type()).Interface().(Resource) - value.SetMetadata(&corev2.ObjectMeta{ - Labels: make(map[string]string), - Annotations: make(map[string]string), - }) - return value -} - -// ResolveV2Resource resolves the resources in this package to core/v2.Resource -// types, via the V2ResourceProxy type. -func ResolveV2Resource(name string) (corev2.Resource, error) { - resource, err := ResolveResource(name) - if err != nil { - return nil, err - } - return V3ToV2Resource(resource), nil -} - -// ResolveResourceByRBACName resolves a resource by its RBAC name. -func ResolveResourceByRBACName(name string) (Resource, error) { - resource, ok := rbacMap[name] - if !ok { - return nil, fmt.Errorf("resource not found: %s", name) - } - return newResource(resource), nil -} - -// ResolveResourceByStoreName resolves a resource by its store name. -func ResolveResourceByStoreName(name string) (Resource, error) { - resource, ok := storeMap[name] - if !ok { - return nil, fmt.Errorf("resource not found: %s", name) - } - return newResource(resource), nil -} - -// ListResources lists all of the resources in the package. -func ListResources() []Resource { - result := make([]Resource, 0, len(typeMap) / 2) - unique := make(map[string]struct{}, len(typeMap) / 2) - for _, v := range typeMap { - name := reflect.ValueOf(v).Elem().Type().Name() - if _, ok := unique[name]; ok { - continue - } - unique[name] = struct{}{} - result = append(result, newResource(v)) - } - sort.Slice(result, func(i, j int) bool { - return result[i].RBACName() < result[j].RBACName() - }) - return result -} diff --git a/api/core/v3/typemap_test.go b/api/core/v3/typemap_test.go deleted file mode 100644 index 6e72028966..0000000000 --- a/api/core/v3/typemap_test.go +++ /dev/null @@ -1,303 +0,0 @@ -package v3 - -// automatically generated file, do not edit! - -import ( - "reflect" - "testing" -) - -func TestResolveEntityConfig(t *testing.T) { - var value interface{} = new(EntityConfig) - if _, ok := value.(Resource); ok { - resource, err := ResolveResource("EntityConfig") - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil metadata") - } - if meta.Annotations == nil { - t.Error("nil annotations") - } - return - } - _, err := ResolveResource("EntityConfig") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"EntityConfig" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveEntityConfigByRBACName(t *testing.T) { - value := new(EntityConfig) - var iface interface{} = value - resource, err := ResolveResourceByRBACName(value.RBACName()) - if _, ok := iface.(Resource); ok { - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Errorf("nil annotations") - } - } else { - if err == nil { - t.Fatal("expected non-nil error") - } - } -} - -func TestResolveEntityConfigByStoreName(t *testing.T) { - value := new(EntityConfig) - var iface interface{} = value - resource, err := ResolveResourceByStoreName(value.StoreName()) - if _, ok := iface.(Resource); ok { - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Errorf("nil annotations") - } - } else { - if err == nil { - t.Fatal("expected non-nil error") - } - } -} - -func TestResolveV2ResourceEntityConfig(t *testing.T) { - v2Resource, err := ResolveV2Resource("EntityConfig") - if err != nil { - t.Fatal(err) - } - v3Resource, err := ResolveResource("EntityConfig") - if err != nil { - t.Fatal(err) - } - if got, want := v2Resource.(*V2ResourceProxy).Resource, v3Resource; !reflect.DeepEqual(got, want) { - t.Fatalf("bad resource: got %v, want %v", got, want) - } -} - -func TestResolveEntityState(t *testing.T) { - var value interface{} = new(EntityState) - if _, ok := value.(Resource); ok { - resource, err := ResolveResource("EntityState") - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil metadata") - } - if meta.Annotations == nil { - t.Error("nil annotations") - } - return - } - _, err := ResolveResource("EntityState") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"EntityState" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveEntityStateByRBACName(t *testing.T) { - value := new(EntityState) - var iface interface{} = value - resource, err := ResolveResourceByRBACName(value.RBACName()) - if _, ok := iface.(Resource); ok { - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Errorf("nil annotations") - } - } else { - if err == nil { - t.Fatal("expected non-nil error") - } - } -} - -func TestResolveEntityStateByStoreName(t *testing.T) { - value := new(EntityState) - var iface interface{} = value - resource, err := ResolveResourceByStoreName(value.StoreName()) - if _, ok := iface.(Resource); ok { - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Errorf("nil annotations") - } - } else { - if err == nil { - t.Fatal("expected non-nil error") - } - } -} - -func TestResolveV2ResourceEntityState(t *testing.T) { - v2Resource, err := ResolveV2Resource("EntityState") - if err != nil { - t.Fatal(err) - } - v3Resource, err := ResolveResource("EntityState") - if err != nil { - t.Fatal(err) - } - if got, want := v2Resource.(*V2ResourceProxy).Resource, v3Resource; !reflect.DeepEqual(got, want) { - t.Fatalf("bad resource: got %v, want %v", got, want) - } -} - -func TestResolveResourceTemplate(t *testing.T) { - var value interface{} = new(ResourceTemplate) - if _, ok := value.(Resource); ok { - resource, err := ResolveResource("ResourceTemplate") - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil metadata") - } - if meta.Annotations == nil { - t.Error("nil annotations") - } - return - } - _, err := ResolveResource("ResourceTemplate") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"ResourceTemplate" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolveResourceTemplateByRBACName(t *testing.T) { - value := new(ResourceTemplate) - var iface interface{} = value - resource, err := ResolveResourceByRBACName(value.RBACName()) - if _, ok := iface.(Resource); ok { - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Errorf("nil annotations") - } - } else { - if err == nil { - t.Fatal("expected non-nil error") - } - } -} - -func TestResolveResourceTemplateByStoreName(t *testing.T) { - value := new(ResourceTemplate) - var iface interface{} = value - resource, err := ResolveResourceByStoreName(value.StoreName()) - if _, ok := iface.(Resource); ok { - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Errorf("nil annotations") - } - } else { - if err == nil { - t.Fatal("expected non-nil error") - } - } -} - -func TestResolveV2ResourceResourceTemplate(t *testing.T) { - v2Resource, err := ResolveV2Resource("ResourceTemplate") - if err != nil { - t.Fatal(err) - } - v3Resource, err := ResolveResource("ResourceTemplate") - if err != nil { - t.Fatal(err) - } - if got, want := v2Resource.(*V2ResourceProxy).Resource, v3Resource; !reflect.DeepEqual(got, want) { - t.Fatalf("bad resource: got %v, want %v", got, want) - } -} - -func TestResolveNotExists(t *testing.T) { - _, err := ResolveResource("!#$@$%@#$") - if err == nil { - t.Fatal("expected non-nil error") - } -} - -func TestListResources(t *testing.T) { - resources := ListResources() - if got, want := len(resources), len(typeMap)/2; got != want { - t.Fatalf("wrong number of resources: got %d, want %d", got, want) - } - for _, r := range resources { - if r.GetMetadata() == nil { - t.Errorf("nil metadata for resource %s", r.RBACName()) - } - } -} diff --git a/api/core/v3/typemap_test.tmpl b/api/core/v3/typemap_test.tmpl deleted file mode 100644 index ef5d43a113..0000000000 --- a/api/core/v3/typemap_test.tmpl +++ /dev/null @@ -1,121 +0,0 @@ -package v3 - -// {{ .Comment }} - -import ( - "testing" - "reflect" -) - -{{ range $index, $typename := .TypeNames }} -func TestResolve{{ $typename }}(t *testing.T) { - var value interface{} = new({{ $typename }}) - if _, ok := value.(Resource); ok { - resource, err := ResolveResource("{{ $typename }}") - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil metadata") - } - if meta.Annotations == nil { - t.Error("nil annotations") - } - return - } - _, err := ResolveResource("{{ $typename }}") - if err == nil { - t.Fatal("expected non-nil error") - } - if got, want := err.Error(), `"{{ $typename }}" is not a Resource`; got != want { - t.Fatalf("unexpected error: %s", err) - } -} - -func TestResolve{{ $typename }}ByRBACName(t *testing.T) { - value := new({{ $typename }}) - var iface interface{} = value - resource, err := ResolveResourceByRBACName(value.RBACName()) - if _, ok := iface.(Resource); ok { - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Errorf("nil annotations") - } - } else { - if err == nil { - t.Fatal("expected non-nil error") - } - } -} - -func TestResolve{{ $typename }}ByStoreName(t *testing.T) { - value := new({{ $typename }}) - var iface interface{} = value - resource, err := ResolveResourceByStoreName(value.StoreName()) - if _, ok := iface.(Resource); ok { - if err != nil { - t.Fatal(err) - } - meta := resource.GetMetadata() - if meta == nil { - t.Fatal("nil metadata") - } - if meta.Labels == nil { - t.Error("nil labels") - } - if meta.Annotations == nil { - t.Errorf("nil annotations") - } - } else { - if err == nil { - t.Fatal("expected non-nil error") - } - } -} - -func TestResolveV2Resource{{ $typename }}(t *testing.T) { - v2Resource, err := ResolveV2Resource("{{ $typename }}") - if err != nil { - t.Fatal(err) - } - v3Resource, err := ResolveResource("{{ $typename }}") - if err != nil { - t.Fatal(err) - } - if got, want := v2Resource.(*V2ResourceProxy).Resource, v3Resource; !reflect.DeepEqual(got, want) { - t.Fatalf("bad resource: got %v, want %v", got, want) - } -} -{{ end }} - -func TestResolveNotExists(t *testing.T) { - _, err := ResolveResource("!#$@$%@#$") - if err == nil { - t.Fatal("expected non-nil error") - } -} - -func TestListResources(t *testing.T) { - resources := ListResources() - if got, want := len(resources), len(typeMap) / 2; got != want { - t.Fatalf("wrong number of resources: got %d, want %d", got, want) - } - for _, r := range resources { - if r.GetMetadata() == nil { - t.Errorf("nil metadata for resource %s", r.RBACName()) - } - } -} diff --git a/api/core/v3/types_gen.go b/api/core/v3/types_gen.go deleted file mode 100644 index e78e740232..0000000000 --- a/api/core/v3/types_gen.go +++ /dev/null @@ -1,19 +0,0 @@ -package v3 - -// TODO: go build will build the latest version of the protoc-gen-gofast module -// used by the project. We need a way to pin the exact version of -// protoc-gen-gofast used in this generator. We could not find a way of doing -// this at the time of this writing. - -//go:generate go run ./internal/codegen/check_protoc -//go:generate go build -o $GOPATH/bin/protoc-gen-gofast github.com/gogo/protobuf/protoc-gen-gofast -//go:generate -command protoc protoc --plugin $GOPATH/bin/protoc-gen-gofast --gofast_out=plugins:$GOPATH/src -I=$GOPATH/pkg/mod -I=$GOPATH/pkg/mod/github.com/gogo/protobuf@v1.3.1/protobuf -I=$GOPATH/src -//go:generate protoc github.com/sensu/sensu-go/api/core/v3/entity_state.proto github.com/sensu/sensu-go/api/core/v3/entity_config.proto -//go:generate go run ./internal/codegen/generate_type -t typemap.tmpl -o typemap.go -//go:generate go fmt typemap.go -//go:generate go run ./internal/codegen/generate_type -t typemap_test.tmpl -o typemap_test.go -//go:generate go fmt typemap_test.go -//go:generate go run ./internal/codegen/generate_type -t resource_generated.tmpl -o resource_generated.go -//go:generate go fmt resource_generated.go -//go:generate go run ./internal/codegen/generate_type -t resource_generated_test.tmpl -o resource_generated_test.go -//go:generate go fmt resource_generated_test.go diff --git a/api/core/v3/validation.go b/api/core/v3/validation.go deleted file mode 100644 index 7cf6b9f095..0000000000 --- a/api/core/v3/validation.go +++ /dev/null @@ -1,39 +0,0 @@ -package v3 - -import ( - "errors" - fmt "fmt" - - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -func ValidateMetadata(meta *corev2.ObjectMeta) error { - if meta == nil { - return errors.New("nil metadata") - } - if err := corev2.ValidateName(meta.Name); err != nil { - return fmt.Errorf("name %s", err) - } - if meta.Labels == nil { - return errors.New("nil labels") - } - if meta.Annotations == nil { - return errors.New("nil annotations") - } - return nil -} - -// ValidateGlobalMetadata validates ObjectMeta for global (unnamespaced) -// resources. To be used on Resources implementing GlobalResource -func ValidateGlobalMetadata(meta *corev2.ObjectMeta) error { - if meta == nil { - return errors.New("nil metadata") - } - if meta.Namespace != "" { - return fmt.Errorf( - "global resources must have empty namespace: got %s", - meta.Namespace, - ) - } - return nil -} diff --git a/api/core/v3/validation_test.go b/api/core/v3/validation_test.go deleted file mode 100644 index eb2e446bab..0000000000 --- a/api/core/v3/validation_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package v3 - -import ( - "testing" - - corev2 "github.com/sensu/sensu-go/api/core/v2" -) - -func TestValidateMetadata(t *testing.T) { - if err := ValidateMetadata(nil); err == nil { - t.Error("expected non-nil error") - } - - var meta corev2.ObjectMeta - - if err := ValidateMetadata(&meta); err == nil { - t.Error("expected non-nil error") - } - - meta.Name = "foo" - - if err := ValidateMetadata(&meta); err == nil { - t.Error("expected non-nil error") - } - - meta.Labels = make(map[string]string) - - if err := ValidateMetadata(&meta); err == nil { - t.Error("expected non-nil error") - } - - meta.Annotations = make(map[string]string) - - if err := ValidateMetadata(&meta); err != nil { - t.Error(err) - } -} From fca87eca6b45330980d6f49dfd051f16eaee5136 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Tue, 24 Oct 2023 15:02:20 -0700 Subject: [PATCH 120/173] remove core/v2 and core/v3 tests Signed-off-by: Justin Kolberg --- .circleci/config.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a40499de31..12b3ffff4d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -90,12 +90,6 @@ workflows: filters: tags: ignore: /.*/ - - test-module: - name: core/v2 - path: api/core/v2 - - test-module: - name: core/v3 - path: api/core/v3 - test-module: name: types path: types From ceb4f149df16d15b2ecdd49fe03679938bdd8e48 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 20 Nov 2023 15:45:48 -0800 Subject: [PATCH 121/173] use native semgrep in ci Signed-off-by: Justin Kolberg --- .github/workflows/semgrep.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 690e2c0374..5ab17327d3 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -4,20 +4,23 @@ jobs: semgrep: runs-on: ubuntu-latest name: Check + container: + image: returntocorp/semgrep + if: (github.actor != 'dependabot[bot]') steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Semgrep - id: semgrep - uses: returntocorp/semgrep-action@v1 - with: - config: p/semgrep-go-correctness + run: semgrep ci -c p/semgrep-go-correctness + env: + SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} semgrep-sensu: # looks for .semgrep.yml due to missing config section runs-on: ubuntu-latest name: Check + container: + image: returntocorp/semgrep + if: (github.actor != 'dependabot[bot]') steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: SemgrepSensu - id: semgrep-sensu - uses: returntocorp/semgrep-action@v1 -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: semgrep ci + env: SEMGREP_APP_TOKEN From 0fb1f0f1918db8345e5abc6eed8c1249ec3e0426 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 20 Nov 2023 15:54:39 -0800 Subject: [PATCH 122/173] fix typo Signed-off-by: Justin Kolberg --- .github/workflows/semgrep.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 5ab17327d3..bfbbc158be 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -23,4 +23,5 @@ jobs: - uses: actions/checkout@v3 - name: SemgrepSensu run: semgrep ci - env: SEMGREP_APP_TOKEN + env: + SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} From 152c284445f694a073aa1b305eb7222d31c64f50 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 20 Nov 2023 16:11:29 -0800 Subject: [PATCH 123/173] don't use semgrep's ci service Signed-off-by: Justin Kolberg --- .github/workflows/semgrep.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index bfbbc158be..61aa882ac5 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -3,7 +3,6 @@ on: [pull_request] jobs: semgrep: runs-on: ubuntu-latest - name: Check container: image: returntocorp/semgrep if: (github.actor != 'dependabot[bot]') @@ -11,17 +10,12 @@ jobs: - uses: actions/checkout@v3 - name: Semgrep run: semgrep ci -c p/semgrep-go-correctness - env: - SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} - semgrep-sensu: # looks for .semgrep.yml due to missing config section + semgrep-sensu: runs-on: ubuntu-latest - name: Check container: image: returntocorp/semgrep if: (github.actor != 'dependabot[bot]') steps: - uses: actions/checkout@v3 - name: SemgrepSensu - run: semgrep ci - env: - SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} + run: semgrep ci -c .semgrep.yml From fbdaf519b51321ccfa695456769ccdb90bff8167 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Wed, 25 Oct 2023 11:10:56 -0700 Subject: [PATCH 124/173] bump core modules Signed-off-by: Justin Kolberg --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 94d91eb132..c5421bb1e7 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 github.com/shirou/gopsutil/v3 v3.23.2 - github.com/sirupsen/logrus v1.9.0 + github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.0 @@ -78,8 +78,8 @@ require ( github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect github.com/go-test/deep v1.0.8 github.com/kr/pty v1.1.8 // indirect - github.com/sensu/core/v2 v2.19.0 - github.com/sensu/core/v3 v3.8.1 + github.com/sensu/core/v2 v2.20.0-alpha2 + github.com/sensu/core/v3 v3.9.0-alpha3 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/sensu/sensu-go/types v0.12.0-alpha6 ) diff --git a/go.sum b/go.sum index 1b2545917e..e80f7d98dc 100644 --- a/go.sum +++ b/go.sum @@ -402,12 +402,11 @@ github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmR github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= -github.com/sensu/core/v2 v2.17.0/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= -github.com/sensu/core/v2 v2.19.0 h1:EoCOYr1sNFUXNTrN5WcYcsc77N+Jbhliz8XnAXiSi7o= -github.com/sensu/core/v2 v2.19.0/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= +github.com/sensu/core/v2 v2.20.0-alpha2 h1:UzPYH2ol31/nvzZxem0shGfX96/UEUXWL4/Qlk6/zFQ= +github.com/sensu/core/v2 v2.20.0-alpha2/go.mod h1:OrEkpMFO6ToEIxaxVYnILhDd2C2lUDr0YQsmmHpBNHI= github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= -github.com/sensu/core/v3 v3.8.1 h1:RhSlvUUOmIR2SF3AqtjVvowSLgRVAaAKAh1SOQRDx5E= -github.com/sensu/core/v3 v3.8.1/go.mod h1:pxfUL8YOhebsaE2SUBov/gsUUqIzkeLM61yFpTeavhs= +github.com/sensu/core/v3 v3.9.0-alpha3 h1:9em3mLuHG2DZH1IXn6AkeaZ7B9gjkkKn5oG80wKQBYM= +github.com/sensu/core/v3 v3.9.0-alpha3/go.mod h1:G/X29uswsUlyN9hyN7K0C4OVWGu27HceYsDHivZKK2c= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= @@ -421,8 +420,9 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= From d0970c5223ee12ce066ca9008721ef1daeda98a9 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Wed, 25 Oct 2023 14:53:35 -0700 Subject: [PATCH 125/173] bump core modules in types module Signed-off-by: Justin Kolberg --- types/go.mod | 4 ++-- types/go.sum | 17 ++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/types/go.mod b/types/go.mod index 08cb9dbb28..ac9ed2006b 100644 --- a/types/go.mod +++ b/types/go.mod @@ -4,8 +4,8 @@ go 1.16 require ( github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 - github.com/sensu/core/v2 v2.16.0-alpha6 - github.com/sensu/core/v3 v3.8.0-alpha6 + github.com/sensu/core/v2 v2.20.0-alpha2 + github.com/sensu/core/v3 v3.9.0-alpha3 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/stretchr/testify v1.8.0 ) diff --git a/types/go.sum b/types/go.sum index b4f2c8d3cc..c7ff89d522 100644 --- a/types/go.sum +++ b/types/go.sum @@ -31,8 +31,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= +github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -70,15 +70,14 @@ github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52/go.mod h1:/mK7FZ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= -github.com/sensu/core/v2 v2.16.0-alpha6 h1:6WTEevm2tQEgCx50IL4aXomAXQip7s6kX4xR3uNVYlI= -github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= -github.com/sensu/core/v3 v3.8.0-alpha6 h1:ywO14aIHippeIAe2HBHrPhSdyBMs1pQtjvkYaHmEwGw= -github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= +github.com/sensu/core/v2 v2.20.0-alpha2 h1:UzPYH2ol31/nvzZxem0shGfX96/UEUXWL4/Qlk6/zFQ= +github.com/sensu/core/v2 v2.20.0-alpha2/go.mod h1:OrEkpMFO6ToEIxaxVYnILhDd2C2lUDr0YQsmmHpBNHI= +github.com/sensu/core/v3 v3.9.0-alpha3 h1:9em3mLuHG2DZH1IXn6AkeaZ7B9gjkkKn5oG80wKQBYM= +github.com/sensu/core/v3 v3.9.0-alpha3/go.mod h1:G/X29uswsUlyN9hyN7K0C4OVWGu27HceYsDHivZKK2c= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= From 68b41ab6354166010af90b731cf3f2f36eb71998 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Wed, 25 Oct 2023 15:01:01 -0700 Subject: [PATCH 126/173] bump types module Signed-off-by: Justin Kolberg --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c5421bb1e7..225516f4e9 100644 --- a/go.mod +++ b/go.mod @@ -81,5 +81,5 @@ require ( github.com/sensu/core/v2 v2.20.0-alpha2 github.com/sensu/core/v3 v3.9.0-alpha3 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 - github.com/sensu/sensu-go/types v0.12.0-alpha6 + github.com/sensu/sensu-go/types v0.12.0-alpha8 ) diff --git a/go.sum b/go.sum index e80f7d98dc..67b53cf700 100644 --- a/go.sum +++ b/go.sum @@ -411,8 +411,8 @@ github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= -github.com/sensu/sensu-go/types v0.12.0-alpha6 h1:tPuPysl6Ew0x0u5USLeSk/3NMMt7GLJh2uO1kVFRwQY= -github.com/sensu/sensu-go/types v0.12.0-alpha6/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= +github.com/sensu/sensu-go/types v0.12.0-alpha8 h1:+AOyOy1qFgcRXyYl/Y1qNQzzdEPlTqiv/BUjrL8Tb+I= +github.com/sensu/sensu-go/types v0.12.0-alpha8/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= From 8577336ae931ef71ad1c92fd45b75a2659b1ed84 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Wed, 25 Oct 2023 20:44:58 -0700 Subject: [PATCH 127/173] bump types module Signed-off-by: Justin Kolberg --- go.mod | 2 +- go.sum | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 225516f4e9..f598344ded 100644 --- a/go.mod +++ b/go.mod @@ -81,5 +81,5 @@ require ( github.com/sensu/core/v2 v2.20.0-alpha2 github.com/sensu/core/v3 v3.9.0-alpha3 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 - github.com/sensu/sensu-go/types v0.12.0-alpha8 + github.com/sensu/sensu-go/types v0.12.0-alpha9 ) diff --git a/go.sum b/go.sum index 67b53cf700..4fd62d5415 100644 --- a/go.sum +++ b/go.sum @@ -143,7 +143,6 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -400,19 +399,16 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= -github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= github.com/sensu/core/v2 v2.20.0-alpha2 h1:UzPYH2ol31/nvzZxem0shGfX96/UEUXWL4/Qlk6/zFQ= github.com/sensu/core/v2 v2.20.0-alpha2/go.mod h1:OrEkpMFO6ToEIxaxVYnILhDd2C2lUDr0YQsmmHpBNHI= -github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= github.com/sensu/core/v3 v3.9.0-alpha3 h1:9em3mLuHG2DZH1IXn6AkeaZ7B9gjkkKn5oG80wKQBYM= github.com/sensu/core/v3 v3.9.0-alpha3/go.mod h1:G/X29uswsUlyN9hyN7K0C4OVWGu27HceYsDHivZKK2c= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= -github.com/sensu/sensu-go/types v0.12.0-alpha8 h1:+AOyOy1qFgcRXyYl/Y1qNQzzdEPlTqiv/BUjrL8Tb+I= -github.com/sensu/sensu-go/types v0.12.0-alpha8/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= +github.com/sensu/sensu-go/types v0.12.0-alpha9 h1:LTPpc5LokFjwF6VeGEXG4Fy5yW7DtLc4vtcvb2kOqxw= +github.com/sensu/sensu-go/types v0.12.0-alpha9/go.mod h1:rWBpXJ6zpa1Jx0b+Sb3uv57OV8Y/7D0mYF5B0u09kPY= github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -420,7 +416,6 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= From a05fda255efda98fc11f790e0be48ebd05910123 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Thu, 26 Oct 2023 10:48:27 -0700 Subject: [PATCH 128/173] bump etcd, core modules Signed-off-by: Justin Kolberg --- go.mod | 38 +- go.sum | 1544 +++++++++++++++++++++++++++++++++++++++++++++-- types/go.mod | 6 +- types/go.sum | 1636 +++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 3149 insertions(+), 75 deletions(-) diff --git a/go.mod b/go.mod index f598344ded..4a768ba645 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/atlassian/gostatsd v0.0.0-20180514010436-af796620006e github.com/blang/semver/v4 v4.0.0 github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1 - github.com/dustin/go-humanize v1.0.0 + github.com/dustin/go-humanize v1.0.1 github.com/echlebek/crock v1.0.1 github.com/echlebek/timeproxy v1.0.0 github.com/emicklei/proto v1.1.0 @@ -18,7 +18,7 @@ require ( github.com/go-resty/resty/v2 v2.5.0 github.com/gogo/protobuf v1.3.2 github.com/golang-jwt/jwt/v4 v4.4.3 - github.com/golang/protobuf v1.5.2 + github.com/golang/protobuf v1.5.3 github.com/golang/snappy v0.0.4 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 @@ -42,7 +42,7 @@ require ( github.com/mitchellh/mapstructure v1.1.2 github.com/olekukonko/tablewriter v0.0.5 github.com/prometheus/client_golang v1.11.1 - github.com/prometheus/client_model v0.2.0 + github.com/prometheus/client_model v0.4.0 github.com/prometheus/common v0.26.0 github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 github.com/robfig/cron/v3 v3.0.1 @@ -52,24 +52,24 @@ require ( github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.0 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.3 github.com/ulikunitz/xz v0.5.10 // indirect github.com/willf/pad v0.0.0-20160331131008-b3d780601022 - go.etcd.io/bbolt v1.3.6 - go.etcd.io/etcd/api/v3 v3.5.5 - go.etcd.io/etcd/client/pkg/v3 v3.5.5 - go.etcd.io/etcd/client/v3 v3.5.5 - go.etcd.io/etcd/server/v3 v3.5.5 - go.etcd.io/etcd/tests/v3 v3.5.5 + go.etcd.io/bbolt v1.3.7 + go.etcd.io/etcd/api/v3 v3.5.10-0.20231019092136-3521aaad9a05 + go.etcd.io/etcd/client/pkg/v3 v3.5.10-0.20231019092136-3521aaad9a05 + go.etcd.io/etcd/client/v3 v3.5.10-0.20231019092136-3521aaad9a05 + go.etcd.io/etcd/server/v3 v3.5.10-0.20231019092136-3521aaad9a05 + go.etcd.io/etcd/tests/v3 v3.5.10-0.20231019092136-3521aaad9a05 go.uber.org/atomic v1.7.0 go.uber.org/zap v1.17.0 - golang.org/x/crypto v0.3.0 - golang.org/x/mod v0.7.0 - golang.org/x/net v0.3.0 - golang.org/x/sys v0.5.0 - golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba - golang.org/x/tools v0.4.0 - google.golang.org/grpc v1.41.0 + golang.org/x/crypto v0.14.0 + golang.org/x/mod v0.11.0 + golang.org/x/net v0.17.0 + golang.org/x/sys v0.13.0 + golang.org/x/time v0.3.0 + golang.org/x/tools v0.10.0 + google.golang.org/grpc v1.58.3 gopkg.in/h2non/filetype.v1 v1.0.3 gopkg.in/yaml.v2 v2.4.0 ) @@ -78,8 +78,8 @@ require ( github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect github.com/go-test/deep v1.0.8 github.com/kr/pty v1.1.8 // indirect - github.com/sensu/core/v2 v2.20.0-alpha2 - github.com/sensu/core/v3 v3.9.0-alpha3 + github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317 + github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/sensu/sensu-go/types v0.12.0-alpha9 ) diff --git a/go.sum b/go.sum index 4fd62d5415..c61f9005e2 100644 --- a/go.sum +++ b/go.sum @@ -3,24 +3,739 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= +cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= +cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= +cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= +cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= +cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= +cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= +cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= +cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= +cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= +cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= +cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK76AMelMzgZCvJfsi2c+ps= +cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= +cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= +cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= +cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= +cloud.google.com/go/aiplatform v1.45.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= +cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= +cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= +cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= +cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= +cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= +cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= +cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= +cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= +cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= +cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= +cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= +cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= +cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= +cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= +cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= +cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= +cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= +cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= +cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= +cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= +cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= +cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= +cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= +cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= +cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= +cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= +cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= +cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= +cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= +cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= +cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= +cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= +cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= +cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= +cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= +cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= +cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= +cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= +cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= +cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= +cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= +cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= +cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= +cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= +cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= +cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= +cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= +cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= +cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= +cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= +cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= +cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= +cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= +cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= +cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= +cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= +cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= +cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= +cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= +cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= +cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= +cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= +cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= +cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= +cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= +cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= +cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= +cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= +cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= +cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= +cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= +cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= +cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= +cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= +cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= +cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= +cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= +cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= +cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= +cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= +cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= +cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= +cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= +cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= +cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= +cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= +cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= +cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= +cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= +cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= +cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= +cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= +cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= +cloud.google.com/go/contactcenterinsights v1.9.1/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= +cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= +cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= +cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= +cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= +cloud.google.com/go/container v1.22.1/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= +cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= +cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= +cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= +cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= +cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= +cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= +cloud.google.com/go/datacatalog v1.14.0/go.mod h1:h0PrGtlihoutNMp/uvwhawLQ9+c63Kz65UFqh49Yo+E= +cloud.google.com/go/datacatalog v1.14.1/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= +cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= +cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= +cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= +cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= +cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= +cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= +cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= +cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= +cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= +cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= +cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= +cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= +cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= +cloud.google.com/go/dataplex v1.8.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= +cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= +cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= +cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= +cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= +cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= +cloud.google.com/go/datastore v1.12.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.12.1/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= +cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= +cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= +cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= +cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= +cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= +cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= +cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= +cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= +cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= +cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= +cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= +cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= +cloud.google.com/go/dialogflow v1.38.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= +cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= +cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= +cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= +cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= +cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= +cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= +cloud.google.com/go/documentai v1.20.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= +cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= +cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= +cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= +cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= +cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= +cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= +cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= +cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= +cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= +cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= +cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= +cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= +cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= +cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= +cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= +cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= +cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= +cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= +cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= +cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= +cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= +cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= +cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= +cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= +cloud.google.com/go/gaming v1.10.1/go.mod h1:XQQvtfP8Rb9Rxnxm5wFVpAp9zCQkJi2bLIb7iHGwB3s= +cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= +cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= +cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= +cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= +cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= +cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= +cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= +cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= +cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= +cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= +cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= +cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= +cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= +cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= +cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= +cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= +cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= +cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBalRE8= +cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= +cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= +cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= +cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= +cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= +cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= +cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= +cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= +cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= +cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= +cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= +cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= +cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= +cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= +cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= +cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= +cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= +cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= +cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= +cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= +cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= +cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= +cloud.google.com/go/kms v1.11.0/go.mod h1:hwdiYC0xjnWsKQQCQQmIQnS9asjYVSK6jtXm+zFqXLM= +cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= +cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= +cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= +cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= +cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= +cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= +cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= +cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= +cloud.google.com/go/longrunning v0.4.2/go.mod h1:OHrnaYyLUV6oqwh0xiS7e5sLQhP1m0QU9R+WhGDMgIQ= +cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= +cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= +cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= +cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= +cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= +cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= +cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= +cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= +cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= +cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= +cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= +cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= +cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= +cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= +cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= +cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= +cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= +cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= +cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= +cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= +cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= +cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= +cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= +cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= +cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= +cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= +cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= +cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= +cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= +cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= +cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= +cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= +cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= +cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= +cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= +cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= +cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= +cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= +cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= +cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= +cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= +cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= +cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= +cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= +cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= +cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1za/0ZfpOs1M= +cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= +cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= +cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= +cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjwnjqWI7NVBc= +cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= +cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= +cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= +cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= +cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= +cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= +cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= +cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= +cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= +cloud.google.com/go/policytroubleshooter v1.7.1/go.mod h1:0NaT5v3Ag1M7U5r0GfDCpUFkWd9YqpubBWsQlhanRv0= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= +cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= +cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= +cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= +cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= +cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= +cloud.google.com/go/pubsub v1.32.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= +cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= +cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= +cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= +cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= +cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= +cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= +cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= +cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= +cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= +cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= +cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= +cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= +cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= +cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= +cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= +cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= +cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= +cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= +cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= +cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= +cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= +cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= +cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= +cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= +cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= +cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= +cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= +cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= +cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= +cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= +cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= +cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= +cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= +cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= +cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= +cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= +cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= +cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= +cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= +cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= +cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= +cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= +cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= +cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= +cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= +cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= +cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= +cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= +cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= +cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= +cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= +cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= +cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= +cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= +cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= +cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= +cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= +cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= +cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= +cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= +cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= +cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= +cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= +cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= +cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= +cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= +cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= +cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= +cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= +cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= +cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= +cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= +cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= +cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= +cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= +cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= +cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= +cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= +cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= +cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= +cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= +cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= +cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= +cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= +cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= +cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= +cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= +cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= +cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= +cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= +cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= +cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= +cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= +cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= +cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= +cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= +cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= +cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +cloud.google.com/go/translate v1.8.1/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= +cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= +cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= +cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= +cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= +cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= +cloud.google.com/go/video v1.17.1/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= +cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= +cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= +cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= +cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= +cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= +cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= +cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= +cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= +cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= +cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= +cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= +cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= +cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= +cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= +cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= +cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= +cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= +cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= +cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= +cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= +cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= +cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= +cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= +cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= +cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= +cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= +cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= +cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= +git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/AlecAivazis/survey/v2 v2.2.14 h1:aTYTaCh1KLd+YWilkeJ65Ph78g48NVQ3ay9xmaNIyhk= github.com/AlecAivazis/survey/v2 v2.2.14/go.mod h1:TH2kPCDU3Kqq7pLbnCWwZXDBjnhZtmsCle5EiYDJ2fg= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw= github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= +github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -28,7 +743,13 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= +github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= +github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= +github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -44,29 +765,40 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4 h1:Lap807SXTH5tri2TivECb/4abUkMZC9zRoLarvcKDqs= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= +github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= @@ -89,11 +821,14 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/echlebek/crock v1.0.1 h1:KbzamClMIfVIkkjq/GTXf+N16KylYBpiaTitO3f1ujg= github.com/echlebek/crock v1.0.1/go.mod h1:/kvwHRX3ZXHj/kHWJkjXDmzzRow54EJuHtQ/PapL/HI= github.com/echlebek/timeproxy v1.0.0 h1:V41/v8tmmMDNMA2GrBPI45nlXb3F7+OY+nJz1BqKsCk= @@ -103,59 +838,96 @@ github.com/emicklei/proto v1.1.0/go.mod h1:Dqn751twH9SasYqvA59Lb9Hz+itoJgmMoivX6 github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= +github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= +github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= +github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= +github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= +github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= +github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca/go.mod h1:49H/RkXP8pKaZy4h0d+NW16rSLhyVBt4o6VLJbmOqDE= github.com/evanphx/json-patch/v5 v5.1.0 h1:B0aXl1o/1cP8NbviYiBMkcHBtUjIJ1/Ccg6b+SwCLQg= github.com/evanphx/json-patch/v5 v5.1.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.4.0/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3BTYk= github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= +github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= +github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= +github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-resty/resty/v2 v2.5.0 h1:WFb5bD49/85PO7WgAjZ+/TJQ+Ty1XOcWEfD1zIFCM1c= github.com/go-resty/resty/v2 v2.5.0/go.mod h1:B88+xCTEwvfD94NOuE6GS1wMlnoKNY8eEiNizfNwOwA= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -168,33 +940,82 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= 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/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= +github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= +github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= @@ -213,6 +1034,9 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/gxed/GoEndian v0.0.0-20160916112711-0f5c6873267e h1:eIhARPSF2zPr1hKxiL81XWQ392f5stEEcs38UzZVSWo= github.com/gxed/GoEndian v0.0.0-20160916112711-0f5c6873267e/go.mod h1:vckkIQ0K+GGne8aC4LseYg586YwBQhOxXMXGAmKsCdY= github.com/gxed/eventfd v0.0.0-20160916113412-80a92cca79a8 h1:N97hyGE4Q7bfXLQHvCtVvhLA9ofDkh5nzFcaB+1kLic= @@ -243,6 +1067,9 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 h1:WlZsjVhE8Af9IcZDGgJGQpNflI3+MJSBhsgT5PCtzBQ= github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +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.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 h1:vilfsDSy7TDxedi9gyBkMvAirat/oRcL0lFdJBf6tdM= @@ -264,27 +1091,37 @@ github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ 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/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/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= 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= +github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.2 h1:LfVyl+ZlLlLDeQ/d2AqfGIIH4qEDu0Ed2S5GyhCWIWY= github.com/klauspost/compress v1.9.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/pgzip v1.2.1 h1:oIPZROsWuPHpOdMVWLuJZXwgjhrW8r1yEX8UqMyeNHM= github.com/klauspost/pgzip v1.2.1/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 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/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI= @@ -298,6 +1135,10 @@ github.com/libp2p/go-sockaddr v0.1.0 h1:Y4s3/jNoryVRKEBrkJ576F17CPOaMIzUeCsg7dlT github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= +github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -308,8 +1149,13 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= @@ -317,6 +1163,8 @@ github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyex github.com/mholt/archiver/v3 v3.3.1-0.20191129193105-44285f7ed244 h1:gk4jSQeyGCvG2yz2laVVPH98aCVFb2+KMASNQcF/Mcs= github.com/mholt/archiver/v3 v3.3.1-0.20191129193105-44285f7ed244/go.mod h1:3wIgtMyvmkYNyGv+fonWOToChNTEZCTx6LA5oqSKCHo= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -352,13 +1200,20 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= +github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= +github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/cmdflag v0.0.2/go.mod h1:a3zKGZ3cdQUfxjd0RGMLZr8xI3nvpJOB+m6o/1X5BmU= github.com/pierrec/lz4/v3 v3.0.1 h1:VP/E0GE2MnyXUdS46vP8/JM5HU3bfDodAp9WTu9Gw7I= github.com/pierrec/lz4/v3 v3.0.1/go.mod h1:280XNCGS8jAcG++AHdd6SeWnzyJ1w9oow2vbORyey8Q= +github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -375,6 +1230,9 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -388,6 +1246,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 h1:AFhmAXZqMm6PgNkco+BTBk//EQS8NLE1YLc2EO3bcLE= github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52/go.mod h1:/mK7FZ3mFYEn9zvNPhpngTyatyehSwte5bJZ4ehL5Xw= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= @@ -395,14 +1255,23 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= +github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sensu/core/v2 v2.20.0-alpha2 h1:UzPYH2ol31/nvzZxem0shGfX96/UEUXWL4/Qlk6/zFQ= github.com/sensu/core/v2 v2.20.0-alpha2/go.mod h1:OrEkpMFO6ToEIxaxVYnILhDd2C2lUDr0YQsmmHpBNHI= +github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173635-6e2e6c17d8b1/go.mod h1:31dWC2jAXPNrvrTlqOkByvdVbNxQIGrbVaWRAH9+UYg= +github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317 h1:NjwGufblDsTKTTtWt9pwiAHvU07KQ0QFIaJfJsXnpbg= +github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317/go.mod h1:31dWC2jAXPNrvrTlqOkByvdVbNxQIGrbVaWRAH9+UYg= github.com/sensu/core/v3 v3.9.0-alpha3 h1:9em3mLuHG2DZH1IXn6AkeaZ7B9gjkkKn5oG80wKQBYM= github.com/sensu/core/v3 v3.9.0-alpha3/go.mod h1:G/X29uswsUlyN9hyN7K0C4OVWGu27HceYsDHivZKK2c= +github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317 h1:9ikTRk1/DHpRJwCLrZt1qnnpi8geenzaliI9Nga1KqU= +github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317/go.mod h1:5zS1z8nqGy2FWZYIp3H8tHr5a1/nhT9iZUoUpfOwlY4= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= @@ -428,6 +1297,10 @@ github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= @@ -449,11 +1322,15 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf 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.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= @@ -472,34 +1349,57 @@ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofm github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= +go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= -go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= -go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= -go.etcd.io/etcd/client/v2 v2.305.5 h1:DktRP60//JJpnPC0VBymAN/7V71GHMdjDCBt4ZPXDjI= -go.etcd.io/etcd/client/v2 v2.305.5/go.mod h1:zQjKllfqfBVyVStbt4FaosoX2iYd8fV/GRy/PbowgP4= -go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI= -go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= -go.etcd.io/etcd/etcdutl/v3 v3.5.5/go.mod h1:7DFbgeccvoOhQLbX7bI4eep9+t8PSKBFheTB7TVf04s= -go.etcd.io/etcd/pkg/v3 v3.5.5 h1:Ablg7T7OkR+AeeeU32kdVhw/AGDsitkKPl7aW73ssjU= -go.etcd.io/etcd/pkg/v3 v3.5.5/go.mod h1:6ksYFxttiUGzC2uxyqiyOEvhAiD0tuIqSZkX3TyPdaE= -go.etcd.io/etcd/raft/v3 v3.5.5 h1:Ibz6XyZ60OYyRopu73lLM/P+qco3YtlZMOhnXNS051I= -go.etcd.io/etcd/raft/v3 v3.5.5/go.mod h1:76TA48q03g1y1VpTue92jZLr9lIHKUNcYdZOOGyx8rI= -go.etcd.io/etcd/server/v3 v3.5.5 h1:jNjYm/9s+f9A9r6+SC4RvNaz6AqixpOvhrFdT0PvIj0= -go.etcd.io/etcd/server/v3 v3.5.5/go.mod h1:rZ95vDw/jrvsbj9XpTqPrTAB9/kzchVdhRirySPkUBc= -go.etcd.io/etcd/tests/v3 v3.5.5 h1:QMfo2twT9Erol77/aypdJGN1vtuQ4VNSGnb5cRiIRo8= -go.etcd.io/etcd/tests/v3 v3.5.5/go.mod h1:WUfOEAmIWBoqOtLmHeCp4WbGw3Q0sRK9ECO24zL1/g8= +go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= +go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= +go.etcd.io/etcd/api/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:eGmulxTfbfBflZZ/zkelWngOCDv2U2fw/BfT5PxEGkE= +go.etcd.io/etcd/api/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= +go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= +go.etcd.io/etcd/client/pkg/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:uSfjfXeL2KkO2TkWKgFdF9HZyZR3Xs2c9Oj/I6GsCFA= +go.etcd.io/etcd/client/pkg/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/v2 v2.305.9 h1:YZ2OLi0OvR0H75AcgSUajjd5uqKDKocQUqROTG11jIo= +go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= +go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= +go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= +go.etcd.io/etcd/client/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:Bk6dzk5LBZc8EOIgSRtxzlFQjyTuCXsVO6u3fNBkEyU= +go.etcd.io/etcd/client/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:uYn/tCn0v3dkeqT4lYGOhyfBvdzFmifq9bIgCPh47wI= +go.etcd.io/etcd/etcdutl/v3 v3.5.9/go.mod h1:rQ6z0HAAxVgYwBTWJbs3ei8gMYiNQzF51lQ2kI+6LZU= +go.etcd.io/etcd/pkg/v3 v3.5.9 h1:6R2jg/aWd/zB9+9JxmijDKStGJAPFsX3e6BeJkMi6eQ= +go.etcd.io/etcd/pkg/v3 v3.5.9/go.mod h1:BZl0SAShQFk0IpLWR78T/+pyt8AruMHhTNNX73hkNVY= +go.etcd.io/etcd/raft/v3 v3.5.9 h1:ZZ1GIHoUlHsn0QVqiRysAm3/81Xx7+i2d7nSdWxlOiI= +go.etcd.io/etcd/raft/v3 v3.5.9/go.mod h1:WnFkqzFdZua4LVlVXQEGhmooLeyS7mqzS4Pf4BCVqXg= +go.etcd.io/etcd/server/v3 v3.5.9 h1:vomEmmxeztLtS5OEH7d0hBAg4cjVIu9wXuNzUZx2ZA0= +go.etcd.io/etcd/server/v3 v3.5.9/go.mod h1:GgI1fQClQCFIzuVjlvdbMxNbnISt90gdfYyqiAIt65g= +go.etcd.io/etcd/server/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:W4apnE2r8hbyrw1eDQ+eGL6NwmTZcX3ndD7on4dAmQA= +go.etcd.io/etcd/server/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:BvNuCIeNSPZK4Ab5ZUzuSJdXsGnpEeqkF12HM4y/dys= +go.etcd.io/etcd/tests/v3 v3.5.9 h1:G7OmdapSW6h2CE1JoqiTZ6BWPoF4nT0HyQ79oDQnhBg= +go.etcd.io/etcd/tests/v3 v3.5.9/go.mod h1:rB3KZRFNV4Zq9Vv439TOaJ3rf9YDWgg0WNmx/EJDxQE= +go.etcd.io/etcd/tests/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:dGOIhjirYnv/xdK1rEP2yXHvm/7QzA4R33mUC79YG3g= +go.etcd.io/etcd/tests/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:qmN884HXuae6sBjkcFeTBTJEQIZJOUIEejd8XUBftdU= +go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0 h1:Wx7nFnvCaissIUZxPkBqDz2963Z+Cl+PkYbDKzTxDqQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0/go.mod h1:E5NNboN0UqSAki0Atn9kVwaN7I+l25gGxDqBueo/74E= go.opentelemetry.io/otel v1.0.1 h1:4XKyXmfqJLOQ7feyV5DB6gsBFZ0ltB8vLtp6pj4JIcc= @@ -515,6 +1415,9 @@ go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.9.0 h1:C0g6TWmQYvjKRnljRULLWUVJGy8Uvu0NEL/5frY2/t4= go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= +go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= @@ -534,19 +1437,51 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -554,18 +1489,32 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -582,36 +1531,114 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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-20220819030929-7fc1605a5dde/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 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -629,57 +1656,144 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -693,32 +1807,148 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= +golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +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= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= +gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= +gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= +google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= +google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= +google.golang.org/api v0.118.0/go.mod h1:76TtD3vkgmZ66zZzp72bUUklpmQmKlhh6sYtIjYK+5E= +google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= +google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= +google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -728,25 +1958,204 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= +google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= +google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= +google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= +google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= +google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -755,16 +2164,24 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/h2non/filetype.v1 v1.0.3 h1:EhZ9p3H8eDdFHiKljxJ59EeQ9Pu88wrgY7/B1WRK/VE= @@ -797,6 +2214,63 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.37.0/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= +modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= +modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= +modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= +modernc.org/ccgo/v3 v3.0.0-20220904174949-82d86e1b6d56/go.mod h1:YSXjPL62P2AMSxBphRHPn7IkzhVHqkvOnRKAKh+W6ZI= +modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= +modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= +modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g= +modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= +modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= +modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= +modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= +modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= +modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= +modernc.org/libc v1.17.4/go.mod h1:WNg2ZH56rDEwdropAJeZPQkXmDwh+JCA1s/htl6r2fA= +modernc.org/libc v1.18.0/go.mod h1:vj6zehR5bfc98ipowQOM2nIDUZnVew/wNC/2tOGS+q0= +modernc.org/libc v1.20.3/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= +modernc.org/libc v1.21.4/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= +modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= +modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.3.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= +modernc.org/sqlite v1.18.2/go.mod h1:kvrTLEWgxUcHa2GfHBQtanR1H9ht3hTJNtKpzH9k1u0= +modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= +modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= +modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= +modernc.org/tcl v1.13.2/go.mod h1:7CLiGIPo1M8Rv1Mitpv5akc2+8fxUd2y2UzC/MfMzy0= +modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/types/go.mod b/types/go.mod index ac9ed2006b..037c8fb665 100644 --- a/types/go.mod +++ b/types/go.mod @@ -4,8 +4,8 @@ go 1.16 require ( github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 - github.com/sensu/core/v2 v2.20.0-alpha2 - github.com/sensu/core/v3 v3.9.0-alpha3 + github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317 + github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.3 ) diff --git a/types/go.sum b/types/go.sum index c7ff89d522..b3b4f986a2 100644 --- a/types/go.sum +++ b/types/go.sum @@ -1,22 +1,776 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= +cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= +cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= +cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= +cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= +cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= +cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= +cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= +cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= +cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= +cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK76AMelMzgZCvJfsi2c+ps= +cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= +cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= +cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= +cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= +cloud.google.com/go/aiplatform v1.45.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= +cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= +cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= +cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= +cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= +cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= +cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= +cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= +cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= +cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= +cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= +cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= +cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= +cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= +cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= +cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= +cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= +cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= +cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= +cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= +cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= +cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= +cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= +cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= +cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= +cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= +cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= +cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= +cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= +cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= +cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= +cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= +cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= +cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= +cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= +cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= +cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= +cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= +cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= +cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= +cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= +cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= +cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= +cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= +cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= +cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= +cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= +cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= +cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= +cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= +cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= +cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= +cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= +cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= +cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= +cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= +cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= +cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= +cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= +cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= +cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= +cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= +cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= +cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= +cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= +cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= +cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= +cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= +cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= +cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= +cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= +cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= +cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= +cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= +cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= +cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= +cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= +cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= +cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= +cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= +cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= +cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= +cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= +cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= +cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= +cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= +cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= +cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= +cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= +cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= +cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= +cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= +cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= +cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= +cloud.google.com/go/contactcenterinsights v1.9.1/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= +cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= +cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= +cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= +cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= +cloud.google.com/go/container v1.22.1/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= +cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= +cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= +cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= +cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= +cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= +cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= +cloud.google.com/go/datacatalog v1.14.0/go.mod h1:h0PrGtlihoutNMp/uvwhawLQ9+c63Kz65UFqh49Yo+E= +cloud.google.com/go/datacatalog v1.14.1/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= +cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= +cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= +cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= +cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= +cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= +cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= +cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= +cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= +cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= +cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= +cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= +cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= +cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= +cloud.google.com/go/dataplex v1.8.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= +cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= +cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= +cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= +cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= +cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= +cloud.google.com/go/datastore v1.12.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.12.1/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= +cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= +cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= +cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= +cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= +cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= +cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= +cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= +cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= +cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= +cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= +cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= +cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= +cloud.google.com/go/dialogflow v1.38.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= +cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= +cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= +cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= +cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= +cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= +cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= +cloud.google.com/go/documentai v1.20.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= +cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= +cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= +cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= +cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= +cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= +cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= +cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= +cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= +cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= +cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= +cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= +cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= +cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= +cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= +cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= +cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= +cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= +cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= +cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= +cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= +cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= +cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= +cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= +cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= +cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= +cloud.google.com/go/gaming v1.10.1/go.mod h1:XQQvtfP8Rb9Rxnxm5wFVpAp9zCQkJi2bLIb7iHGwB3s= +cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= +cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= +cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= +cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= +cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= +cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= +cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= +cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= +cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= +cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= +cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= +cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= +cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= +cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= +cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= +cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= +cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= +cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBalRE8= +cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= +cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= +cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= +cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= +cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= +cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= +cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= +cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= +cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= +cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= +cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= +cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= +cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= +cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= +cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= +cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= +cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= +cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= +cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= +cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= +cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= +cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= +cloud.google.com/go/kms v1.11.0/go.mod h1:hwdiYC0xjnWsKQQCQQmIQnS9asjYVSK6jtXm+zFqXLM= +cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= +cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= +cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= +cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= +cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= +cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= +cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= +cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= +cloud.google.com/go/longrunning v0.4.2/go.mod h1:OHrnaYyLUV6oqwh0xiS7e5sLQhP1m0QU9R+WhGDMgIQ= +cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= +cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= +cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= +cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= +cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= +cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= +cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= +cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= +cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= +cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= +cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= +cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= +cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= +cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= +cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= +cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= +cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= +cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= +cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= +cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= +cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= +cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= +cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= +cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= +cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= +cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= +cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= +cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= +cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= +cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= +cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= +cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= +cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= +cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= +cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= +cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= +cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= +cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= +cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= +cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= +cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= +cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= +cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= +cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= +cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= +cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1za/0ZfpOs1M= +cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= +cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= +cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= +cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjwnjqWI7NVBc= +cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= +cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= +cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= +cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= +cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= +cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= +cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= +cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= +cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= +cloud.google.com/go/policytroubleshooter v1.7.1/go.mod h1:0NaT5v3Ag1M7U5r0GfDCpUFkWd9YqpubBWsQlhanRv0= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= +cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= +cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= +cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= +cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= +cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= +cloud.google.com/go/pubsub v1.32.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= +cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= +cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= +cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= +cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= +cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= +cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= +cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= +cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= +cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= +cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= +cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= +cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= +cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= +cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= +cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= +cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= +cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= +cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= +cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= +cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= +cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= +cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= +cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= +cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= +cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= +cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= +cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= +cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= +cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= +cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= +cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= +cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= +cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= +cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= +cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= +cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= +cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= +cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= +cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= +cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= +cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= +cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= +cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= +cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= +cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= +cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= +cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= +cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= +cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= +cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= +cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= +cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= +cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= +cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= +cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= +cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= +cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= +cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= +cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= +cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= +cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= +cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= +cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= +cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= +cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= +cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= +cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= +cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= +cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= +cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= +cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= +cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= +cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= +cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= +cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= +cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= +cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= +cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= +cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= +cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= +cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= +cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= +cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= +cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= +cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= +cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= +cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= +cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= +cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= +cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= +cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= +cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= +cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= +cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= +cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= +cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= +cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= +cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +cloud.google.com/go/translate v1.8.1/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= +cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= +cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= +cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= +cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= +cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= +cloud.google.com/go/video v1.17.1/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= +cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= +cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= +cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= +cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= +cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= +cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= +cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= +cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= +cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= +cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= +cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= +cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= +cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= +cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= +cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= +cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= +cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= +cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= +cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= +cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= +cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= +cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= +cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= +cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= +cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= +cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= +cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= +cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= +git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= +github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= +github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= +github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= +github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/creack/pty v1.1.9/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= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/echlebek/crock v1.0.1 h1:KbzamClMIfVIkkjq/GTXf+N16KylYBpiaTitO3f1ujg= github.com/echlebek/crock v1.0.1/go.mod h1:/kvwHRX3ZXHj/kHWJkjXDmzzRow54EJuHtQ/PapL/HI= github.com/echlebek/timeproxy v1.0.0 h1:V41/v8tmmMDNMA2GrBPI45nlXb3F7+OY+nJz1BqKsCk= @@ -24,20 +778,66 @@ github.com/echlebek/timeproxy v1.0.0/go.mod h1:0dg2Lnb8no/jFwoMQKMTU6iAivgoMptGq github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= +github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= +github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= +github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= +github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= +github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= +github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= +github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= +github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= +github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= +github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -47,130 +847,859 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 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.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= +github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= +github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +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/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/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= +github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= +github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= +github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= +github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= +github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 h1:AFhmAXZqMm6PgNkco+BTBk//EQS8NLE1YLc2EO3bcLE= github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52/go.mod h1:/mK7FZ3mFYEn9zvNPhpngTyatyehSwte5bJZ4ehL5Xw= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/sensu/core/v2 v2.20.0-alpha2 h1:UzPYH2ol31/nvzZxem0shGfX96/UEUXWL4/Qlk6/zFQ= -github.com/sensu/core/v2 v2.20.0-alpha2/go.mod h1:OrEkpMFO6ToEIxaxVYnILhDd2C2lUDr0YQsmmHpBNHI= -github.com/sensu/core/v3 v3.9.0-alpha3 h1:9em3mLuHG2DZH1IXn6AkeaZ7B9gjkkKn5oG80wKQBYM= -github.com/sensu/core/v3 v3.9.0-alpha3/go.mod h1:G/X29uswsUlyN9hyN7K0C4OVWGu27HceYsDHivZKK2c= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= +github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= +github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173635-6e2e6c17d8b1/go.mod h1:31dWC2jAXPNrvrTlqOkByvdVbNxQIGrbVaWRAH9+UYg= +github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317 h1:NjwGufblDsTKTTtWt9pwiAHvU07KQ0QFIaJfJsXnpbg= +github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317/go.mod h1:31dWC2jAXPNrvrTlqOkByvdVbNxQIGrbVaWRAH9+UYg= +github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317 h1:9ikTRk1/DHpRJwCLrZt1qnnpi8geenzaliI9Nga1KqU= +github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317/go.mod h1:5zS1z8nqGy2FWZYIp3H8tHr5a1/nhT9iZUoUpfOwlY4= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= -go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= +go.etcd.io/etcd/api/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:eGmulxTfbfBflZZ/zkelWngOCDv2U2fw/BfT5PxEGkE= +go.etcd.io/etcd/api/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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-20220819030929-7fc1605a5dde/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/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 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.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +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= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= +gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= +gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= +google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= +google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= +google.golang.org/api v0.118.0/go.mod h1:76TtD3vkgmZ66zZzp72bUUklpmQmKlhh6sYtIjYK+5E= +google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= +google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= +google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= +google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= +google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= +google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= +google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= +google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -179,12 +1708,22 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/readline.v1 v1.0.0-20160726135117-62c6fe619375/go.mod h1:lNEQeAhU009zbRxng+XOj5ITVgY24WcbNnQopyfKoYQ= gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= @@ -196,4 +1735,65 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.37.0/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= +modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= +modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= +modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= +modernc.org/ccgo/v3 v3.0.0-20220904174949-82d86e1b6d56/go.mod h1:YSXjPL62P2AMSxBphRHPn7IkzhVHqkvOnRKAKh+W6ZI= +modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= +modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= +modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g= +modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= +modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= +modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= +modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= +modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= +modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= +modernc.org/libc v1.17.4/go.mod h1:WNg2ZH56rDEwdropAJeZPQkXmDwh+JCA1s/htl6r2fA= +modernc.org/libc v1.18.0/go.mod h1:vj6zehR5bfc98ipowQOM2nIDUZnVew/wNC/2tOGS+q0= +modernc.org/libc v1.20.3/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= +modernc.org/libc v1.21.4/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= +modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= +modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.3.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= +modernc.org/sqlite v1.18.2/go.mod h1:kvrTLEWgxUcHa2GfHBQtanR1H9ht3hTJNtKpzH9k1u0= +modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= +modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= +modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= +modernc.org/tcl v1.13.2/go.mod h1:7CLiGIPo1M8Rv1Mitpv5akc2+8fxUd2y2UzC/MfMzy0= +modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 4c1055f24a084ab3f1592e977ff8fcf732a918e6 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 30 Oct 2023 13:18:28 -0700 Subject: [PATCH 129/173] bump etcd to v3.5.10 Signed-off-by: Justin Kolberg --- backend/etcd/etcd.go | 8 +- backend/store/cache/cache_test.go | 205 --------- backend/store/cache/v2/cache_test.go | 202 --------- backend/store/etcd/watcher_test.go | 351 --------------- go.mod | 59 ++- go.sum | 631 ++++++++++++++++++++++----- metrics/influx_bridge_test.go | 4 +- 7 files changed, 563 insertions(+), 897 deletions(-) delete mode 100644 backend/store/cache/cache_test.go delete mode 100644 backend/store/cache/v2/cache_test.go delete mode 100644 backend/store/etcd/watcher_test.go diff --git a/backend/etcd/etcd.go b/backend/etcd/etcd.go index 4c809ed6e6..5dd25bf5ca 100644 --- a/backend/etcd/etcd.go +++ b/backend/etcd/etcd.go @@ -223,13 +223,13 @@ func NewEtcd(config *Config) (*Etcd, error) { } // Client config - cfg.ACUrls = acURLs - cfg.LCUrls = lcURLs + cfg.AdvertiseClientUrls = acURLs + cfg.ListenClientUrls = lcURLs cfg.ClientTLSInfo = (transport.TLSInfo)(config.ClientTLSInfo) // Peer config - cfg.APUrls = apURLs - cfg.LPUrls = lpURLs + cfg.AdvertisePeerUrls = apURLs + cfg.ListenPeerUrls = lpURLs cfg.PeerTLSInfo = (transport.TLSInfo)(config.PeerTLSInfo) if len(config.CipherSuites) > 0 { diff --git a/backend/store/cache/cache_test.go b/backend/store/cache/cache_test.go deleted file mode 100644 index c8228f4dc6..0000000000 --- a/backend/store/cache/cache_test.go +++ /dev/null @@ -1,205 +0,0 @@ -package cache - -import ( - "context" - "fmt" - "reflect" - "testing" - - "github.com/sensu/sensu-go/backend/store/etcd" - "github.com/sensu/sensu-go/types" - - corev2 "github.com/sensu/core/v2" - "github.com/sensu/sensu-go/backend/store" - "github.com/sensu/sensu-go/testing/fixture" - "github.com/sensu/sensu-go/types/dynamic" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.etcd.io/etcd/tests/v3/integration" -) - -func fixtureEntity(namespace, name string) *corev2.Entity { - entity := corev2.FixtureEntity(name) - entity.Namespace = namespace - return entity -} - -func TestCacheGet(t *testing.T) { - cache := Resource{ - cache: buildCache([]corev2.Resource{ - fixtureEntity("a", "1"), - fixtureEntity("a", "2"), - fixtureEntity("a", "3"), - fixtureEntity("a", "4"), - fixtureEntity("a", "5"), - fixtureEntity("a", "6"), - fixtureEntity("b", "1"), - fixtureEntity("b", "2"), - fixtureEntity("b", "3"), - fixtureEntity("b", "4"), - fixtureEntity("b", "5"), - fixtureEntity("b", "6"), - fixtureEntity("c", "1"), - fixtureEntity("c", "2"), - fixtureEntity("c", "3"), - fixtureEntity("c", "4"), - fixtureEntity("c", "5"), - fixtureEntity("c", "6"), - }, - true, - ), - } - want := []Value{ - {Resource: fixtureEntity("b", "1"), Synth: dynamic.Synthesize(fixtureEntity("b", "1"))}, - {Resource: fixtureEntity("b", "2"), Synth: dynamic.Synthesize(fixtureEntity("b", "2"))}, - {Resource: fixtureEntity("b", "3"), Synth: dynamic.Synthesize(fixtureEntity("b", "3"))}, - {Resource: fixtureEntity("b", "4"), Synth: dynamic.Synthesize(fixtureEntity("b", "4"))}, - {Resource: fixtureEntity("b", "5"), Synth: dynamic.Synthesize(fixtureEntity("b", "5"))}, - {Resource: fixtureEntity("b", "6"), Synth: dynamic.Synthesize(fixtureEntity("b", "6"))}, - } - got := cache.Get("b") - if !reflect.DeepEqual(got, want) { - t.Fatalf("bad resources: got %v, want %v", got, want) - } -} - -func TestCacheGetAll(t *testing.T) { - cache := Resource{ - cache: buildCache([]corev2.Resource{ - fixtureEntity("a", "1"), - fixtureEntity("a", "2"), - fixtureEntity("b", "1"), - fixtureEntity("b", "2"), - fixtureEntity("b", "3"), - fixtureEntity("c", "1"), - fixtureEntity("c", "2"), - fixtureEntity("c", "3"), - fixtureEntity("c", "4"), - }, - false, - ), - } - got := cache.GetAll() - assert.Equal(t, 9, len(got)) - want := []Value{ - {Resource: fixtureEntity("a", "1")}, - {Resource: fixtureEntity("a", "2")}, - {Resource: fixtureEntity("b", "1")}, - {Resource: fixtureEntity("b", "2")}, - {Resource: fixtureEntity("b", "3")}, - {Resource: fixtureEntity("c", "1")}, - {Resource: fixtureEntity("c", "2")}, - {Resource: fixtureEntity("c", "3")}, - {Resource: fixtureEntity("c", "4")}, - } - for _, v := range want { - assert.Contains(t, got, v) - } -} - -func TestBuildCache(t *testing.T) { - resource1 := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "resource1", Namespace: "default"}} - resource2 := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "resource2", Namespace: "default"}} - resource3 := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "resource3", Namespace: "acme"}} - - cache := buildCache([]corev2.Resource{resource1, resource2, resource3}, false) - - assert.Len(t, cache["acme"], 1) - assert.Len(t, cache["default"], 2) - assert.Len(t, cache, 2) -} - -func TestResourceRebuild(t *testing.T) { - integration.BeforeTestExternal(t) - c := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1}) - defer c.Terminate(t) - client := c.RandClient() - s := etcd.NewStore(client, "store") - require.NoError(t, s.CreateNamespace(context.Background(), types.FixtureNamespace("default"))) - ctx := store.NamespaceContext(context.Background(), "default") - - cacher := Resource{ - cache: make(map[string][]Value), - client: client, - resourceT: &fixture.Resource{}, - } - - // Resource added to a new namespace - foo := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "foo", Namespace: "default"}} - if err := s.CreateOrUpdateResource(ctx, foo); err != nil { - t.Fatal(err) - } - if updates, err := cacher.rebuild(ctx); err != nil { - t.Fatal(err) - } else if !updates { - t.Fatal("expected updates") - } - assert.Len(t, cacher.cache["default"], 1) - assert.Equal(t, int64(1), cacher.Count()) - - // Resource added to an existing namespace - bar := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "bar", Namespace: "default"}} - if err := s.CreateOrUpdateResource(ctx, bar); err != nil { - t.Fatal(err) - } - if updates, err := cacher.rebuild(ctx); err != nil { - t.Fatal(err) - } else if !updates { - t.Fatal("expected updates") - } - assert.Len(t, cacher.cache["default"], 2) - assert.Equal(t, int64(2), cacher.Count()) - - // Resource updated - bar.Foo = "acme" - if err := s.CreateOrUpdateResource(ctx, bar); err != nil { - t.Fatal(err) - } - if updates, err := cacher.rebuild(ctx); err != nil { - t.Fatal(err) - } else if !updates { - t.Fatal("expected updates") - } - assert.Len(t, cacher.cache["default"], 2) - assert.Equal(t, int64(2), cacher.Count()) - - // Resource deleted - if err := s.DeleteResource(ctx, bar.StorePrefix(), bar.GetObjectMeta().Name); err != nil { - t.Fatal(err) - } - if updates, err := cacher.rebuild(ctx); err != nil { - t.Fatal(err) - } else if !updates { - t.Fatal("expected updates") - } - assert.Len(t, cacher.cache["default"], 1) - assert.Equal(t, int64(1), cacher.Count()) -} - -func nonNamespacedCache(count int) Resource { - resources := []corev2.Resource{} - for i := 0; i < count; i++ { - resources = append(resources, &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: fmt.Sprintf("namespace-%d", i)}}) - } - return Resource{ - cache: buildCache(resources, false), - } -} - -func BenchmarkGetEmpty(b *testing.B) { - cache := nonNamespacedCache(20) - for n := 0; n < b.N; n++ { - values := cache.Get("") - for range values { - } - } -} - -func BenchmarkGetAll(b *testing.B) { - cache := nonNamespacedCache(20) - for n := 0; n < b.N; n++ { - values := cache.GetAll() - for range values { - } - } -} diff --git a/backend/store/cache/v2/cache_test.go b/backend/store/cache/v2/cache_test.go deleted file mode 100644 index 9029344e77..0000000000 --- a/backend/store/cache/v2/cache_test.go +++ /dev/null @@ -1,202 +0,0 @@ -package v2 - -import ( - "context" - "reflect" - "testing" - - corev2 "github.com/sensu/core/v2" - corev3 "github.com/sensu/core/v3" - "github.com/sensu/sensu-go/backend/store" - storev2 "github.com/sensu/sensu-go/backend/store/v2" - "github.com/sensu/sensu-go/backend/store/v2/etcdstore" - "github.com/sensu/sensu-go/backend/store/v2/wrap" - "github.com/sensu/sensu-go/types/dynamic" - "github.com/stretchr/testify/assert" - "go.etcd.io/etcd/tests/v3/integration" -) - -func fixtureEntity(namespace, name string) *corev3.EntityConfig { - entity := corev3.FixtureEntityConfig(name) - entity.Metadata.Namespace = namespace - return entity -} - -func TestCacheGet(t *testing.T) { - cache := Resource{ - cache: buildCache([]corev3.Resource{ - fixtureEntity("a", "1"), - fixtureEntity("a", "2"), - fixtureEntity("a", "3"), - fixtureEntity("a", "4"), - fixtureEntity("a", "5"), - fixtureEntity("a", "6"), - fixtureEntity("b", "1"), - fixtureEntity("b", "2"), - fixtureEntity("b", "3"), - fixtureEntity("b", "4"), - fixtureEntity("b", "5"), - fixtureEntity("b", "6"), - fixtureEntity("c", "1"), - fixtureEntity("c", "2"), - fixtureEntity("c", "3"), - fixtureEntity("c", "4"), - fixtureEntity("c", "5"), - fixtureEntity("c", "6"), - }, - true, - ), - } - want := []Value{ - {Resource: fixtureEntity("b", "1"), Synth: dynamic.Synthesize(fixtureEntity("b", "1"))}, - {Resource: fixtureEntity("b", "2"), Synth: dynamic.Synthesize(fixtureEntity("b", "2"))}, - {Resource: fixtureEntity("b", "3"), Synth: dynamic.Synthesize(fixtureEntity("b", "3"))}, - {Resource: fixtureEntity("b", "4"), Synth: dynamic.Synthesize(fixtureEntity("b", "4"))}, - {Resource: fixtureEntity("b", "5"), Synth: dynamic.Synthesize(fixtureEntity("b", "5"))}, - {Resource: fixtureEntity("b", "6"), Synth: dynamic.Synthesize(fixtureEntity("b", "6"))}, - } - got := cache.Get("b") - if !reflect.DeepEqual(got, want) { - t.Fatalf("bad resources: got %v, want %v", got, want) - } -} - -func TestCacheGetAll(t *testing.T) { - cache := Resource{ - cache: buildCache([]corev3.Resource{ - fixtureEntity("a", "1"), - fixtureEntity("a", "2"), - fixtureEntity("b", "1"), - fixtureEntity("b", "2"), - fixtureEntity("b", "3"), - fixtureEntity("c", "1"), - fixtureEntity("c", "2"), - fixtureEntity("c", "3"), - fixtureEntity("c", "4"), - }, - false, - ), - } - got := cache.GetAll() - assert.Equal(t, 9, len(got)) - want := []Value{ - {Resource: fixtureEntity("a", "1")}, - {Resource: fixtureEntity("a", "2")}, - {Resource: fixtureEntity("b", "1")}, - {Resource: fixtureEntity("b", "2")}, - {Resource: fixtureEntity("b", "3")}, - {Resource: fixtureEntity("c", "1")}, - {Resource: fixtureEntity("c", "2")}, - {Resource: fixtureEntity("c", "3")}, - {Resource: fixtureEntity("c", "4")}, - } - for _, v := range want { - assert.Contains(t, got, v) - } -} - -func TestBuildCache(t *testing.T) { - resource1 := corev3.FixtureEntityConfig("resource1") - resource2 := corev3.FixtureEntityConfig("resource2") - resource3 := corev3.FixtureEntityConfig("resource3") - resource3.Metadata.Namespace = "acme" - - cache := buildCache([]corev3.Resource{resource1, resource2, resource3}, false) - - assert.Len(t, cache["acme"], 1) - assert.Len(t, cache["default"], 2) - assert.Len(t, cache, 2) -} - -func TestResourceRebuild(t *testing.T) { - ctx := store.NamespaceContext(context.Background(), "default") - integration.BeforeTestExternal(t) - c := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1}) - defer c.Terminate(t) - client := c.RandClient() - store := etcdstore.NewStore(client) - - // Add namespace resource - namespace := corev2.FixtureNamespace("default") - req := storev2.NewResourceRequestFromV2Resource(ctx, namespace) - wrapper, err := wrap.V2Resource(namespace) - if err != nil { - t.Fatal(err) - } - if err := store.CreateOrUpdate(req, wrapper); err != nil { - t.Fatal(err) - } - - cacher := Resource{ - cache: make(map[string][]Value), - client: client, - resourceT: &corev3.EntityConfig{}, - } - - // Resource added to a new namespace - foo := corev3.FixtureEntityConfig("foo") - req = storev2.NewResourceRequestFromResource(ctx, foo) - fooWrapper, err := storev2.WrapResource(foo) - if err != nil { - t.Fatal(err) - } - if err := store.CreateOrUpdate(req, fooWrapper); err != nil { - t.Fatal(err) - } - if updates, err := cacher.rebuild(ctx); err != nil { - t.Fatal(err) - } else if !updates { - t.Fatal("expected updates") - } - assert.Len(t, cacher.cache["default"], 1) - assert.Equal(t, int64(1), cacher.Count()) - - // Resource added to an existing namespace - bar := corev3.FixtureEntityConfig("bar") - req = storev2.NewResourceRequestFromResource(ctx, bar) - barWrapper, err := storev2.WrapResource(bar) - if err != nil { - t.Fatal(err) - } - if err := store.CreateOrUpdate(req, barWrapper); err != nil { - t.Fatal(err) - } - if updates, err := cacher.rebuild(ctx); err != nil { - t.Fatal(err) - } else if !updates { - t.Fatal("expected updates") - } - assert.Len(t, cacher.cache["default"], 2) - assert.Equal(t, int64(2), cacher.Count()) - - // Resource updated - bar.User = "acme" - req = storev2.NewResourceRequestFromResource(ctx, bar) - barWrapper, err = storev2.WrapResource(bar) - if err != nil { - t.Fatal(err) - } - if err := store.CreateOrUpdate(req, barWrapper); err != nil { - t.Fatal(err) - } - if updates, err := cacher.rebuild(ctx); err != nil { - t.Fatal(err) - } else if !updates { - t.Fatal("expected updates") - } - assert.Len(t, cacher.cache["default"], 2) - assert.Equal(t, int64(2), cacher.Count()) - - // Resource deleted - req = storev2.NewResourceRequestFromResource(ctx, bar) - if err := store.Delete(req); err != nil { - t.Fatal(err) - } - if updates, err := cacher.rebuild(ctx); err != nil { - t.Fatal(err) - } else if !updates { - t.Fatal("expected updates") - } - assert.Len(t, cacher.cache["default"], 1) - assert.Equal(t, int64(1), cacher.Count()) -} diff --git a/backend/store/etcd/watcher_test.go b/backend/store/etcd/watcher_test.go deleted file mode 100644 index a52200604b..0000000000 --- a/backend/store/etcd/watcher_test.go +++ /dev/null @@ -1,351 +0,0 @@ -//go:build integration && !race -// +build integration,!race - -package etcd - -import ( - "context" - "reflect" - "testing" - "time" - - corev2 "github.com/sensu/core/v2" - "github.com/sensu/sensu-go/backend/store" - "github.com/sensu/sensu-go/testing/fixture" - "github.com/sirupsen/logrus/hooks/test" - "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/tests/v3/integration" -) - -const timeout = 10 - -func TestWatch(t *testing.T) { - type storeFunc func(context.Context, store.Store) - foo := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "foo"}} - fooBis := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "foo"}, Foo: "acme"} - - testWithEtcdClient(t, func(s store.Store, client *clientv3.Client) { - tests := []struct { - name string - key string - storeFunc storeFunc - wantAction store.WatchActionType - wantResource corev2.Resource - }{ - { - name: "resource is created", - key: EtcdRoot + "/" + foo.StorePrefix(), - storeFunc: func(ctx context.Context, s store.Store) { - if err := s.CreateOrUpdateResource(ctx, foo); err != nil { - t.Fatal(err) - } - }, - wantAction: store.WatchCreate, - wantResource: foo, - }, - { - name: "resource is updated", - key: EtcdRoot + "/" + fooBis.StorePrefix(), - storeFunc: func(ctx context.Context, s store.Store) { - if err := s.CreateOrUpdateResource(ctx, fooBis); err != nil { - t.Fatal(err) - } - }, - wantAction: store.WatchUpdate, - wantResource: fooBis, - }, - { - name: "resource is deleted", - key: EtcdRoot + "/" + foo.StorePrefix(), - storeFunc: func(ctx context.Context, s store.Store) { - if err := s.DeleteResource(ctx, foo.StorePrefix(), foo.GetObjectMeta().Name); err != nil { - t.Fatal(err) - } - }, - wantAction: store.WatchDelete, - wantResource: fooBis, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - w := Watch(ctx, client, tt.key, true) - tt.storeFunc(ctx, s) - - testCheckResult(t, w, tt.wantAction, tt.wantResource) - - cancel() - testCheckStoppedWatcher(t, w) - }) - } - }) -} - -func TestWatchErrConnClosed(t *testing.T) { - testWithEtcdClient(t, func(s store.Store, client *clientv3.Client) { - w := &Watcher{ - ctx: context.Background(), - client: client, - key: EtcdRoot, - recursive: true, - resultChan: make(chan store.WatchEvent, resultChanBufSize), - logger: logger, - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - opts := []clientv3.OpOption{clientv3.WithCreatedNotify(), clientv3.WithPrefix()} - watchChanStopped := make(chan struct{}) - w.watch(ctx, opts, watchChanStopped) - - if err := client.Close(); err != nil && err != context.Canceled { - t.Fatal(err) - } - - select { - case <-time.After(timeout * time.Second): - t.Fatalf("timeout after waiting %d for resultChan", timeout) - case <-watchChanStopped: - } - }) -} - -func TestWatchContextCancel(t *testing.T) { - testWithEtcdClient(t, func(s store.Store, client *clientv3.Client) { - ctx, cancel := context.WithCancel(context.Background()) - - w := &Watcher{ - ctx: ctx, - cancel: cancel, - client: client, - key: EtcdRoot, - recursive: true, - resultChan: make(chan store.WatchEvent, resultChanBufSize), - logger: logger, - } - - w.start() - cancel() - - testCheckStoppedWatcher(t, w) - }) -} - -func TestWatchQueueEvent(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - nullLogger, hook := test.NewNullLogger() - w := &Watcher{ - ctx: ctx, - resultChan: make(chan store.WatchEvent, 1), - logger: nullLogger.WithField("testing", true), - } - - // Queue a first event, we should not have any log entry - w.queueEvent(ctx, store.WatchEvent{}) - - // Inject a second event, which should block because the resultChan buffer is - // full. We should therefore receive a warning - go func() { - w.queueEvent(ctx, store.WatchEvent{}) - }() - time.Sleep(1 * time.Second) - if len(hook.AllEntries()) != 1 { - t.Errorf("expected one log entry, got %d", len(hook.Entries)) - } - - cancel() -} - -func TestWatchRetry(t *testing.T) { - integration.BeforeTestExternal(t) - c := integration.NewClusterV3(t, &integration.ClusterConfig{GRPCKeepAliveInterval: 1 * time.Second, GRPCKeepAliveTimeout: 2 * time.Second, Size: 3}) - defer c.Terminate(t) - - ctx, cancel := context.WithCancel(context.Background()) - - client := c.Client(0) - s := NewStore(client, "store0") - w := Watch(ctx, client, "/sensu.io", true) - - // Create resource - foo := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "foo"}} - if err := s.CreateOrUpdateResource(ctx, foo); err != nil { - t.Fatal(err) - } - testCheckResult(t, w, store.WatchCreate, foo) - - // Create a failure with the watcher by partioning our etcd cluster - c.Members[0].InjectPartition(t, c.Members[1], c.Members[2]) - time.Sleep(1 * time.Second) - - c.Members[0].RecoverPartition(t, c.Members[1], c.Members[2]) - c.Members[0].WaitOK(t) - time.Sleep(1 * time.Second) - - // Update resource - foo.Foo = "acme" - if err := s.CreateOrUpdateResource(ctx, foo); err != nil { - t.Fatal(err) - } - - testCheckResult(t, w, store.WatchUpdate, foo) - cancel() -} - -func TestWatchCompactedRevision(t *testing.T) { - integration.BeforeTestExternal(t) - c := integration.NewClusterV3(t, &integration.ClusterConfig{GRPCKeepAliveInterval: 1 * time.Second, GRPCKeepAliveTimeout: 2 * time.Second, Size: 3}) - defer c.Terminate(t) - - ctx, cancel := context.WithCancel(context.Background()) - - client := c.Client(0) - s := NewStore(client, "store") - - // Create the 'foo' resource to generate a new revision (revision=2) - foo := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "foo"}} - if err := s.CreateOrUpdateResource(ctx, foo); err != nil { - t.Fatal(err) - } - - // Update the 'foo' resource to generate an additional revision (revision=3) - foo.Foo = "acme" - if err := s.CreateOrUpdateResource(ctx, foo); err != nil { - t.Fatal(err) - } - - // Compact to the latest revision - if _, err := client.Compact(ctx, int64(3), clientv3.WithCompactPhysical()); err != nil { - t.Fatal(err) - } - - // Start a watcher with a compacted revision (1) - w := &Watcher{ - ctx: context.Background(), - client: client, - key: EtcdRoot, - recursive: true, - revision: int64(1), - resultChan: make(chan store.WatchEvent, resultChanBufSize), - logger: logger, - } - w.start() - - // The watcher should return the event associated with the latest revision - // (3), which corresponds to the update to the foo resource - testCheckResult(t, w, store.WatchError, nil) - testCheckResult(t, w, store.WatchUpdate, foo) - - // Since we handled the revision 3, if the watcher was to be restarted, it - // should pick up from revision 4 - if w.revision != 4 { - t.Errorf("watcher revision = %d, want %d", w.revision, 4) - } - - cancel() -} - -func TestWatchRevisions(t *testing.T) { - integration.BeforeTestExternal(t) - c := integration.NewClusterV3(t, &integration.ClusterConfig{GRPCKeepAliveInterval: 1 * time.Second, GRPCKeepAliveTimeout: 2 * time.Second, Size: 3}) - defer c.Terminate(t) - - ctx, cancel := context.WithCancel(context.Background()) - - client := c.Client(0) - s := NewStore(client, "store") - - // Create the 'foo' resource to generate a new revision (revision=2) - foo := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "foo"}} - if err := s.CreateOrUpdateResource(ctx, foo); err != nil { - t.Fatal(err) - } - - // Update the 'foo' resource to generate an additional revision (revision=3) - fooBis := &fixture.Resource{ObjectMeta: corev2.ObjectMeta{Name: "foo"}} - fooBis.Foo = "acme" - if err := s.CreateOrUpdateResource(ctx, fooBis); err != nil { - t.Fatal(err) - } - - // Start a watcher with a compacted revision (1) - w := &Watcher{ - ctx: context.Background(), - client: client, - key: EtcdRoot, - recursive: true, - revision: int64(1), - resultChan: make(chan store.WatchEvent, resultChanBufSize), - logger: logger, - } - w.start() - - // The watcher should return all events from revision 1 - testCheckResult(t, w, store.WatchCreate, foo) - testCheckResult(t, w, store.WatchUpdate, fooBis) - - // Since we handled the revision 3, if the watcher was to be restarted, it - // should pick up from revision 4 - if w.revision != 4 { - t.Errorf("watcher revision = %d, want %d", w.revision, 4) - } - - // Update the 'foo' resource to generate an additional revision (revision=4) - fooBis.Foo = "bar" - if err := s.CreateOrUpdateResource(ctx, fooBis); err != nil { - t.Fatal(err) - } - - // The watcher should also return this new watch event - testCheckResult(t, w, store.WatchUpdate, fooBis) - - // The tracked revision should also be bumped - if w.revision != 5 { - t.Errorf("watcher revision = %d, want %d", w.revision, 5) - } - - cancel() -} - -func testCheckResult(t *testing.T, w *Watcher, action store.WatchActionType, resource corev2.Resource) { - t.Helper() - - select { - case event := <-w.Result(): - if event.Type != action { - t.Errorf("event type = %v, want %v", event.Type, action) - } - - if event.Type == store.WatchError { - return - } - - got := &fixture.Resource{} - if err := unmarshal(event.Object, got); err != nil { - t.Errorf("could not decode event object: %v", err) - return - } - - if !reflect.DeepEqual(resource, got) { - t.Errorf("watch result = %#v, want %#v", got, resource) - return - } - case <-time.After(timeout * time.Second): - t.Fatalf("timeout after waiting %d for the Result() chan", timeout) - } -} - -func testCheckStoppedWatcher(t *testing.T, w *Watcher) { - t.Helper() - - select { - case _, ok := <-w.resultChan: - if ok { - t.Fatal("resultChan should have been closed") - } - case <-time.After(timeout * time.Second): - t.Fatalf("timeout after waiting %d for resultChan", timeout) - } -} diff --git a/go.mod b/go.mod index 4a768ba645..0aa1d03cba 100644 --- a/go.mod +++ b/go.mod @@ -17,12 +17,12 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/go-resty/resty/v2 v2.5.0 github.com/gogo/protobuf v1.3.2 - github.com/golang-jwt/jwt/v4 v4.4.3 + github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/protobuf v1.5.3 github.com/golang/snappy v0.0.4 - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.3.1 github.com/gorilla/mux v1.8.0 - github.com/gorilla/websocket v1.4.2 + github.com/gorilla/websocket v1.5.0 github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c github.com/graphql-go/graphql v0.8.1 github.com/gxed/GoEndian v0.0.0-20160916112711-0f5c6873267e // indirect @@ -31,7 +31,6 @@ require ( github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 github.com/ipfs/go-log v1.0.4 // indirect github.com/jbenet/go-reuseport v0.0.0-20180416043609-15a1cd37f050 // indirect - github.com/json-iterator/go v1.1.12 // indirect github.com/libp2p/go-reuseport v0.0.0-20180416043609-15a1cd37f050 // indirect github.com/libp2p/go-sockaddr v0.1.0 // indirect github.com/mattn/go-colorable v0.1.6 // indirect @@ -41,45 +40,63 @@ require ( github.com/mitchellh/hashstructure v1.0.0 github.com/mitchellh/mapstructure v1.1.2 github.com/olekukonko/tablewriter v0.0.5 - github.com/prometheus/client_golang v1.11.1 - github.com/prometheus/client_model v0.4.0 - github.com/prometheus/common v0.26.0 + github.com/prometheus/client_golang v1.17.0 + github.com/prometheus/client_model v0.5.0 + github.com/prometheus/common v0.45.0 github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 github.com/shirou/gopsutil/v3 v3.23.2 github.com/sirupsen/logrus v1.9.3 - github.com/spf13/cobra v1.1.3 + github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.0 - github.com/stretchr/testify v1.8.3 + github.com/stretchr/testify v1.8.4 github.com/ulikunitz/xz v0.5.10 // indirect github.com/willf/pad v0.0.0-20160331131008-b3d780601022 - go.etcd.io/bbolt v1.3.7 - go.etcd.io/etcd/api/v3 v3.5.10-0.20231019092136-3521aaad9a05 - go.etcd.io/etcd/client/pkg/v3 v3.5.10-0.20231019092136-3521aaad9a05 - go.etcd.io/etcd/client/v3 v3.5.10-0.20231019092136-3521aaad9a05 - go.etcd.io/etcd/server/v3 v3.5.10-0.20231019092136-3521aaad9a05 - go.etcd.io/etcd/tests/v3 v3.5.10-0.20231019092136-3521aaad9a05 - go.uber.org/atomic v1.7.0 - go.uber.org/zap v1.17.0 + go.etcd.io/bbolt v1.3.8 + go.etcd.io/etcd/api/v3 v3.5.10 + go.etcd.io/etcd/client/pkg/v3 v3.5.10 + go.etcd.io/etcd/client/v3 v3.5.10 + go.etcd.io/etcd/server/v3 v3.5.10 + go.uber.org/atomic v1.11.0 + go.uber.org/zap v1.26.0 golang.org/x/crypto v0.14.0 golang.org/x/mod v0.11.0 golang.org/x/net v0.17.0 golang.org/x/sys v0.13.0 golang.org/x/time v0.3.0 golang.org/x/tools v0.10.0 - google.golang.org/grpc v1.58.3 + google.golang.org/grpc v1.59.0 gopkg.in/h2non/filetype.v1 v1.0.3 gopkg.in/yaml.v2 v2.4.0 ) require ( + github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect + github.com/coreos/go-systemd/v22 v22.5.0 // indirect + github.com/creack/pty v1.1.20 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/go-test/deep v1.0.8 + github.com/google/btree v1.1.2 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect + github.com/jonboulle/clockwork v0.4.0 // indirect github.com/kr/pty v1.1.8 // indirect - github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317 - github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317 + github.com/prometheus/procfs v0.12.0 // indirect + github.com/sensu/core/v2 v2.19.0 + github.com/sensu/core/v3 v3.8.1 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 - github.com/sensu/sensu-go/types v0.12.0-alpha9 + github.com/sensu/sensu-go/types v0.12.0-alpha6 + github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect + github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index c61f9005e2..ebd761412b 100644 --- a/go.sum +++ b/go.sum @@ -5,7 +5,6 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= @@ -38,18 +37,26 @@ cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFO cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= -cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= +cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= +cloud.google.com/go/accessapproval v1.7.2/go.mod h1:/gShiq9/kK/h8T/eEn1BTzalDvk0mZxJlhfw0p+Xuc0= +cloud.google.com/go/accessapproval v1.7.3/go.mod h1:4l8+pwIxGTNqSf4T3ds8nLO94NQf0W/KnMNuQ9PbnP8= cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK76AMelMzgZCvJfsi2c+ps= cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= +cloud.google.com/go/accesscontextmanager v1.8.2/go.mod h1:E6/SCRM30elQJ2PKtFMs2YhfJpZSNcJyejhuzoId4Zk= +cloud.google.com/go/accesscontextmanager v1.8.3/go.mod h1:4i/JkF2JiFbhLnnpnfoTX5vRXfhf9ukhU1ANOTALTOQ= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= @@ -57,24 +64,38 @@ cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6l cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= cloud.google.com/go/aiplatform v1.45.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/aiplatform v1.48.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/aiplatform v1.50.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= +cloud.google.com/go/aiplatform v1.51.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= +cloud.google.com/go/aiplatform v1.51.1/go.mod h1:kY3nIMAVQOK2XDqDPHaOuD9e+FdMA6OOpfBjsvaFSOo= +cloud.google.com/go/aiplatform v1.51.2/go.mod h1:hCqVYB3mY45w99TmetEoe8eCQEwZEp9WHxeZdcv9phw= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/analytics v0.21.4/go.mod h1:zZgNCxLCy8b2rKKVfC1YkC2vTrpfZmeRCySM3aUbskA= +cloud.google.com/go/analytics v0.21.5/go.mod h1:BQtOBHWTlJ96axpPPnw5CvGJ6i3Ve/qX2fTxR8qWyr8= cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= +cloud.google.com/go/apigateway v1.6.2/go.mod h1:CwMC90nnZElorCW63P2pAYm25AtQrHfuOkbRSHj0bT8= +cloud.google.com/go/apigateway v1.6.3/go.mod h1:k68PXWpEs6BVDTtnLQAyG606Q3mz8pshItwPXjgv44Y= cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= +cloud.google.com/go/apigeeconnect v1.6.2/go.mod h1:s6O0CgXT9RgAxlq3DLXvG8riw8PYYbU/v25jqP3Dy18= +cloud.google.com/go/apigeeconnect v1.6.3/go.mod h1:peG0HFQ0si2bN15M6QSjEW/W7Gy3NYkWGz7pFz13cbo= cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= +cloud.google.com/go/apigeeregistry v0.7.2/go.mod h1:9CA2B2+TGsPKtfi3F7/1ncCCsL62NXBRfM6iPoGSM+8= +cloud.google.com/go/apigeeregistry v0.8.1/go.mod h1:MW4ig1N4JZQsXmBSwH4rwpgDonocz7FPBSw6XPGHmYw= cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= @@ -84,11 +105,15 @@ cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= +cloud.google.com/go/appengine v1.8.2/go.mod h1:WMeJV9oZ51pvclqFN2PqHoGnys7rK0rz6s3Mp6yMvDo= +cloud.google.com/go/appengine v1.8.3/go.mod h1:2oUPZ1LVZ5EXi+AF1ihNAF+S8JrzQ3till5m9VQkrsk= cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= +cloud.google.com/go/area120 v0.8.2/go.mod h1:a5qfo+x77SRLXnCynFWPUZhnZGeSgvQ+Y0v1kSItkh4= +cloud.google.com/go/area120 v0.8.3/go.mod h1:5zj6pMzVTH+SVHljdSKC35sriR/CVvQZzG/Icdyriw0= cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= @@ -98,6 +123,9 @@ cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9e cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= +cloud.google.com/go/artifactregistry v1.14.2/go.mod h1:Xk+QbsKEb0ElmyeMfdHAey41B+qBq3q5R5f5xD4XT3U= +cloud.google.com/go/artifactregistry v1.14.3/go.mod h1:A2/E9GXnsyXl7GUvQ/2CjHA+mVRoWAXC0brg2os+kNI= +cloud.google.com/go/artifactregistry v1.14.4/go.mod h1:SJJcZTMv6ce0LDMUnihCN7WSrI+kBSFV0KIKo8S8aYU= cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= @@ -107,6 +135,9 @@ cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrd cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= +cloud.google.com/go/asset v1.15.0/go.mod h1:tpKafV6mEut3+vN9ScGvCHXHj7FALFVta+okxFECHcg= +cloud.google.com/go/asset v1.15.1/go.mod h1:yX/amTvFWRpp5rcFq6XbCxzKT8RJUam1UoboE179jU4= +cloud.google.com/go/asset v1.15.2/go.mod h1:B6H5tclkXvXz7PD22qCA2TDxSVQfasa3iDlM89O2NXs= cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= @@ -114,23 +145,39 @@ cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEar cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= +cloud.google.com/go/assuredworkloads v1.11.2/go.mod h1:O1dfr+oZJMlE6mw0Bp0P1KZSlj5SghMBvTpZqIcUAW4= +cloud.google.com/go/assuredworkloads v1.11.3/go.mod h1:vEjfTKYyRUaIeA0bsGJceFV2JKpVRgyG2op3jfa59Zs= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= +cloud.google.com/go/automl v1.13.2/go.mod h1:gNY/fUmDEN40sP8amAX3MaXkxcqPIn7F1UIIPZpy4Mg= +cloud.google.com/go/automl v1.13.3/go.mod h1:Y8KwvyAZFOsMAPqUCfNu1AyclbC6ivCUF/MTwORymyY= cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= +cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA= +cloud.google.com/go/baremetalsolution v1.2.0/go.mod h1:68wi9AwPYkEWIUT4SvSGS9UJwKzNpshjHsH4lzk8iOw= +cloud.google.com/go/baremetalsolution v1.2.1/go.mod h1:3qKpKIw12RPXStwQXcbhfxVj1dqQGEvcmA+SX/mUR88= +cloud.google.com/go/baremetalsolution v1.2.2/go.mod h1:O5V6Uu1vzVelYahKfwEWRMaS3AbCkeYHy3145s1FkhM= cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= +cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A= +cloud.google.com/go/batch v1.4.1/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= +cloud.google.com/go/batch v1.5.0/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= +cloud.google.com/go/batch v1.5.1/go.mod h1:RpBuIYLkQu8+CWDk3dFD/t/jOCGuUpkpX+Y0n1Xccs8= +cloud.google.com/go/batch v1.6.1/go.mod h1:urdpD13zPe6YOK+6iZs/8/x2VBRofvblLpx0t57vM98= cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= +cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= +cloud.google.com/go/beyondcorp v1.0.1/go.mod h1:zl/rWWAFVeV+kx+X2Javly7o1EIQThU4WlkynffL/lk= +cloud.google.com/go/beyondcorp v1.0.2/go.mod h1:m8cpG7caD+5su+1eZr+TSvF6r21NdLJk4f9u4SP2Ntc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -145,6 +192,9 @@ cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/bigquery v1.55.0/go.mod h1:9Y5I3PN9kQWuid6183JFhOGOW3GcirA5LpsKCUn+2ec= +cloud.google.com/go/bigquery v1.56.0/go.mod h1:KDcsploXTEY7XT3fDQzMUZlpQLHzE4itubHrnmhUrZA= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= @@ -152,31 +202,50 @@ cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOA cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= +cloud.google.com/go/billing v1.17.0/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= +cloud.google.com/go/billing v1.17.1/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= +cloud.google.com/go/billing v1.17.2/go.mod h1:u/AdV/3wr3xoRBk5xvUzYMS1IawOAPwQMuHgHMdljDg= +cloud.google.com/go/billing v1.17.3/go.mod h1:z83AkoZ7mZwBGT3yTnt6rSGI1OOsHSIi6a5M3mJ8NaU= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= +cloud.google.com/go/binaryauthorization v1.7.0/go.mod h1:Zn+S6QqTMn6odcMU1zDZCJxPjU2tZPV1oDl45lWY154= +cloud.google.com/go/binaryauthorization v1.7.1/go.mod h1:GTAyfRWYgcbsP3NJogpV3yeunbUIjx2T9xVeYovtURE= +cloud.google.com/go/binaryauthorization v1.7.2/go.mod h1:kFK5fQtxEp97m92ziy+hbu+uKocka1qRRL8MVJIgjv0= cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= +cloud.google.com/go/certificatemanager v1.7.2/go.mod h1:15SYTDQMd00kdoW0+XY5d9e+JbOPjp24AvF48D8BbcQ= +cloud.google.com/go/certificatemanager v1.7.3/go.mod h1:T/sZYuC30PTag0TLo28VedIRIj1KPGcOQzjWAptHa00= cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= +cloud.google.com/go/channel v1.17.0/go.mod h1:RpbhJsGi/lXWAUM1eF4IbQGbsfVlg2o8Iiy2/YLfVT0= +cloud.google.com/go/channel v1.17.1/go.mod h1:xqfzcOZAcP4b/hUDH0GkGg1Sd5to6di1HOJn/pi5uBQ= +cloud.google.com/go/channel v1.17.2/go.mod h1:aT2LhnftnyfQceFql5I/mP8mIbiiJS4lWqgXA815zMk= cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.14.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.14.1/go.mod h1:K7wGc/3zfvmYWOWwYTgF/d/UVJhS4pu+HAy7PL7mCsU= +cloud.google.com/go/cloudbuild v1.14.2/go.mod h1:Bn6RO0mBYk8Vlrt+8NLrru7WXlQ9/RDWz2uo5KG1/sg= cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= +cloud.google.com/go/clouddms v1.7.0/go.mod h1:MW1dC6SOtI/tPNCciTsXtsGNEM0i0OccykPvv3hiYeM= +cloud.google.com/go/clouddms v1.7.1/go.mod h1:o4SR8U95+P7gZ/TX+YbJxehOCsM+fe6/brlrFquiszk= +cloud.google.com/go/clouddms v1.7.2/go.mod h1:Rk32TmWmHo64XqDvW7jgkFQet1tUKNVzs7oajtJT3jU= cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= @@ -184,6 +253,9 @@ cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQky cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/cloudtasks v1.12.2/go.mod h1:A7nYkjNlW2gUoROg1kvJrQGhJP/38UaWwsnuBDOBVUk= +cloud.google.com/go/cloudtasks v1.12.3/go.mod h1:GPVXhIOSGEaR+3xT4Fp72ScI+HjHffSS4B8+BaBB5Ys= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= @@ -202,25 +274,41 @@ cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IK cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go/compute v1.23.2 h1:nWEMDhgbBkBJjfpVySqU4jgWdc22PLR0o4vEexZHers= +cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= cloud.google.com/go/contactcenterinsights v1.9.1/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/contactcenterinsights v1.11.0/go.mod h1:hutBdImE4XNZ1NV4vbPJKSFOnQruhC5Lj9bZqWMTKiU= +cloud.google.com/go/contactcenterinsights v1.11.1/go.mod h1:FeNP3Kg8iteKM80lMwSk3zZZKVxr+PGnAId6soKuXwE= +cloud.google.com/go/contactcenterinsights v1.11.2/go.mod h1:A9PIR5ov5cRcd28KlDbmmXE8Aay+Gccer2h4wzkYFso= cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= cloud.google.com/go/container v1.22.1/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/container v1.26.0/go.mod h1:YJCmRet6+6jnYYRS000T6k0D0xUXQgBSaJ7VwI8FBj4= +cloud.google.com/go/container v1.26.1/go.mod h1:5smONjPRUxeEpDG7bMKWfDL4sauswqEtnBK1/KKpR04= +cloud.google.com/go/container v1.26.2/go.mod h1:YlO84xCt5xupVbLaMY4s3XNE79MUJ+49VmkInr6HvF4= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= +cloud.google.com/go/containeranalysis v0.11.0/go.mod h1:4n2e99ZwpGxpNcz+YsFT1dfOHPQFGcAC8FN2M2/ne/U= +cloud.google.com/go/containeranalysis v0.11.1/go.mod h1:rYlUOM7nem1OJMKwE1SadufX0JP3wnXj844EtZAwWLY= +cloud.google.com/go/containeranalysis v0.11.2/go.mod h1:xibioGBC1MD2j4reTyV1xY1/MvKaz+fyM9ENWhmIeP8= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= @@ -231,42 +319,68 @@ cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3 cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= cloud.google.com/go/datacatalog v1.14.0/go.mod h1:h0PrGtlihoutNMp/uvwhawLQ9+c63Kz65UFqh49Yo+E= cloud.google.com/go/datacatalog v1.14.1/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/datacatalog v1.16.0/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/datacatalog v1.17.1/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= +cloud.google.com/go/datacatalog v1.18.0/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= +cloud.google.com/go/datacatalog v1.18.1/go.mod h1:TzAWaz+ON1tkNr4MOcak8EBHX7wIRX/gZKM+yTVsv+A= +cloud.google.com/go/datacatalog v1.18.2/go.mod h1:SPVgWW2WEMuWHA+fHodYjmxPiMqcOiWfhc9OD5msigk= cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= +cloud.google.com/go/dataflow v0.9.2/go.mod h1:vBfdBZ/ejlTaYIGB3zB4T08UshH70vbtZeMD+urnUSo= +cloud.google.com/go/dataflow v0.9.3/go.mod h1:HI4kMVjcHGTs3jTHW/kv3501YW+eloiJSLxkJa/vqFE= cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= +cloud.google.com/go/dataform v0.8.2/go.mod h1:X9RIqDs6NbGPLR80tnYoPNiO1w0wenKTb8PxxlhTMKM= +cloud.google.com/go/dataform v0.8.3/go.mod h1:8nI/tvv5Fso0drO3pEjtowz58lodx8MVkdV2q0aPlqg= cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= +cloud.google.com/go/datafusion v1.7.2/go.mod h1:62K2NEC6DRlpNmI43WHMWf9Vg/YvN6QVi8EVwifElI0= +cloud.google.com/go/datafusion v1.7.3/go.mod h1:eoLt1uFXKGBq48jy9LZ+Is8EAVLnmn50lNncLzwYokE= cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= +cloud.google.com/go/datalabeling v0.8.2/go.mod h1:cyDvGHuJWu9U/cLDA7d8sb9a0tWLEletStu2sTmg3BE= +cloud.google.com/go/datalabeling v0.8.3/go.mod h1:tvPhpGyS/V7lqjmb3V0TaDdGvhzgR1JoW7G2bpi2UTI= cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= cloud.google.com/go/dataplex v1.8.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.9.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.10.1/go.mod h1:1MzmBv8FvjYfc7vDdxhnLFNskikkB+3vl475/XdCDhs= +cloud.google.com/go/dataplex v1.10.2/go.mod h1:xdC8URdTrCrZMW6keY779ZT1cTOfV8KEPNsw+LTRT1Y= cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= +cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= +cloud.google.com/go/dataproc/v2 v2.2.0/go.mod h1:lZR7AQtwZPvmINx5J87DSOOpTfof9LVZju6/Qo4lmcY= +cloud.google.com/go/dataproc/v2 v2.2.1/go.mod h1:QdAJLaBjh+l4PVlVZcmrmhGccosY/omC1qwfQ61Zv/o= +cloud.google.com/go/dataproc/v2 v2.2.2/go.mod h1:aocQywVmQVF4i8CL740rNI/ZRpsaaC1Wh2++BJ7HEJ4= cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= +cloud.google.com/go/dataqna v0.8.2/go.mod h1:KNEqgx8TTmUipnQsScOoDpq/VlXVptUqVMZnt30WAPs= +cloud.google.com/go/dataqna v0.8.3/go.mod h1:wXNBW2uvc9e7Gl5k8adyAMnLush1KVV6lZUhB+rqNu4= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= cloud.google.com/go/datastore v1.12.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= cloud.google.com/go/datastore v1.12.1/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.14.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= +cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= @@ -274,11 +388,17 @@ cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2 cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/datastream v1.10.1/go.mod h1:7ngSYwnw95YFyTd5tOGBxHlOZiL+OtpjheqU7t2/s/c= +cloud.google.com/go/datastream v1.10.2/go.mod h1:W42TFgKAs/om6x/CdXX5E4oiAsKlH+e8MTGy81zdYt0= cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/deploy v1.13.1/go.mod h1:8jeadyLkH9qu9xgO3hVWw8jVr29N1mnW42gRJT8GY6g= +cloud.google.com/go/deploy v1.14.1/go.mod h1:N8S0b+aIHSEeSr5ORVoC0+/mOPUysVt8ae4QkZYolAw= cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= @@ -288,10 +408,17 @@ cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHih cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= cloud.google.com/go/dialogflow v1.38.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dialogflow v1.43.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= +cloud.google.com/go/dialogflow v1.44.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= +cloud.google.com/go/dialogflow v1.44.1/go.mod h1:n/h+/N2ouKOO+rbe/ZnI186xImpqvCVj2DdsWS/0EAk= +cloud.google.com/go/dialogflow v1.44.2/go.mod h1:QzFYndeJhpVPElnFkUXxdlptx0wPnBWLCBT9BvtC3/c= cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= +cloud.google.com/go/dlp v1.10.2/go.mod h1:ZbdKIhcnyhILgccwVDzkwqybthh7+MplGC3kZVZsIOQ= +cloud.google.com/go/dlp v1.10.3/go.mod h1:iUaTc/ln8I+QT6Ai5vmuwfw8fqTk2kaz0FvCwhLCom0= cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= @@ -299,33 +426,52 @@ cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= cloud.google.com/go/documentai v1.20.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/documentai v1.22.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/documentai v1.22.1/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= +cloud.google.com/go/documentai v1.23.0/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= +cloud.google.com/go/documentai v1.23.2/go.mod h1:Q/wcRT+qnuXOpjAkvOV4A+IeQl04q2/ReT7SSbytLSo= +cloud.google.com/go/documentai v1.23.4/go.mod h1:4MYAaEMnADPN1LPN5xboDR5QVB6AgsaxgFdJhitlE2Y= cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= +cloud.google.com/go/domains v0.9.2/go.mod h1:3YvXGYzZG1Temjbk7EyGCuGGiXHJwVNmwIf+E/cUp5I= +cloud.google.com/go/domains v0.9.3/go.mod h1:29k66YNDLDY9LCFKpGFeh6Nj9r62ZKm5EsUJxAl84KU= cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= +cloud.google.com/go/edgecontainer v1.1.2/go.mod h1:wQRjIzqxEs9e9wrtle4hQPSR1Y51kqN75dgF7UllZZ4= +cloud.google.com/go/edgecontainer v1.1.3/go.mod h1:Ll2DtIABzEfaxaVSbwj3QHFaOOovlDFiWVDu349jSsA= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= +cloud.google.com/go/essentialcontacts v1.6.3/go.mod h1:yiPCD7f2TkP82oJEFXFTou8Jl8L6LBRPeBEkTaO0Ggo= +cloud.google.com/go/essentialcontacts v1.6.4/go.mod h1:iju5Vy3d9tJUg0PYMd1nHhjV7xoCXaOAVabrwLaPBEM= cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/eventarc v1.13.1/go.mod h1:EqBxmGHFrruIara4FUQ3RHlgfCn7yo1HYsu2Hpt/C3Y= +cloud.google.com/go/eventarc v1.13.2/go.mod h1:X9A80ShVu19fb4e5sc/OLV7mpFUKZMwfJFeeWhcIObM= cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= +cloud.google.com/go/filestore v1.7.2/go.mod h1:TYOlyJs25f/omgj+vY7/tIG/E7BX369triSPzE4LdgE= +cloud.google.com/go/filestore v1.7.3/go.mod h1:Qp8WaEERR3cSkxToxFPHh/b8AACkSut+4qlCjAmKTV0= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/firestore v1.12.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/firestore v1.13.0/go.mod h1:QojqqOh8IntInDUSTAh0c8ZsPYAr68Ma8c5DWOy8xb8= +cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ= cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= @@ -334,6 +480,8 @@ cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1Yb cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= +cloud.google.com/go/functions v1.15.2/go.mod h1:CHAjtcR6OU4XF2HuiVeriEdELNcnvRZSk1Q8RMqy4lE= +cloud.google.com/go/functions v1.15.3/go.mod h1:r/AMHwBheapkkySEhiZYLDBwVJCdlRwsm4ieJu35/Ug= cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= @@ -343,25 +491,38 @@ cloud.google.com/go/gaming v1.10.1/go.mod h1:XQQvtfP8Rb9Rxnxm5wFVpAp9zCQkJi2bLIb cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= +cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= +cloud.google.com/go/gkebackup v1.3.1/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= +cloud.google.com/go/gkebackup v1.3.2/go.mod h1:OMZbXzEJloyXMC7gqdSB+EOEQ1AKcpGYvO3s1ec5ixk= +cloud.google.com/go/gkebackup v1.3.3/go.mod h1:eMk7/wVV5P22KBakhQnJxWSVftL1p4VBFLpv0kIft7I= cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= +cloud.google.com/go/gkeconnect v0.8.2/go.mod h1:6nAVhwchBJYgQCXD2pHBFQNiJNyAd/wyxljpaa6ZPrY= +cloud.google.com/go/gkeconnect v0.8.3/go.mod h1:i9GDTrfzBSUZGCe98qSu1B8YB8qfapT57PenIb820Jo= cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= +cloud.google.com/go/gkehub v0.14.2/go.mod h1:iyjYH23XzAxSdhrbmfoQdePnlMj2EWcvnR+tHdBQsCY= +cloud.google.com/go/gkehub v0.14.3/go.mod h1:jAl6WafkHHW18qgq7kqcrXYzN08hXeK/Va3utN8VKg8= cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= +cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= +cloud.google.com/go/gkemulticloud v1.0.1/go.mod h1:AcrGoin6VLKT/fwZEYuqvVominLriQBCKmbjtnbMjG8= +cloud.google.com/go/gkemulticloud v1.0.2/go.mod h1:+ee5VXxKb3H1l4LZAcgWB/rvI16VTNTrInWxDjAGsGo= cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= +cloud.google.com/go/gsuiteaddons v1.6.2/go.mod h1:K65m9XSgs8hTF3X9nNTPi8IQueljSdYo9F+Mi+s4MyU= +cloud.google.com/go/gsuiteaddons v1.6.3/go.mod h1:sCFJkZoMrLZT3JTb8uJqgKPNshH2tfXeCwTFRebTq48= cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= @@ -374,21 +535,31 @@ cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCta cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBalRE8= cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= +cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= +cloud.google.com/go/iap v1.9.0/go.mod h1:01OFxd1R+NFrg78S+hoPV5PxEzv22HXaNqUUlmNHFuY= +cloud.google.com/go/iap v1.9.1/go.mod h1:SIAkY7cGMLohLSdBR25BuIxO+I4fXJiL06IBL7cy/5Q= +cloud.google.com/go/iap v1.9.2/go.mod h1:GwDTOs047PPSnwRD0Us5FKf4WDRcVvHg1q9WVkKBhdI= cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= +cloud.google.com/go/ids v1.4.2/go.mod h1:3vw8DX6YddRu9BncxuzMyWn0g8+ooUjI2gslJ7FH3vk= +cloud.google.com/go/ids v1.4.3/go.mod h1:9CXPqI3GedjmkjbMWCUhMZ2P2N7TUMzAkVXYEH2orYU= cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= +cloud.google.com/go/iot v1.7.2/go.mod h1:q+0P5zr1wRFpw7/MOgDXrG/HVA+l+cSwdObffkrpnSg= +cloud.google.com/go/iot v1.7.3/go.mod h1:t8itFchkol4VgNbHnIq9lXoOOtHNR3uAACQMYbN9N4I= cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= @@ -398,52 +569,81 @@ cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63 cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= cloud.google.com/go/kms v1.11.0/go.mod h1:hwdiYC0xjnWsKQQCQQmIQnS9asjYVSK6jtXm+zFqXLM= cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/kms v1.15.2/go.mod h1:3hopT4+7ooWRCjc2DxgnpESFxhIraaI2IpAVUEhbT/w= +cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= +cloud.google.com/go/kms v1.15.4/go.mod h1:L3Sdj6QTHK8dfwK5D1JLsAyELsNMnd3tAIwGS4ltKpc= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= +cloud.google.com/go/language v1.11.0/go.mod h1:uDx+pFDdAKTY8ehpWbiXyQdz8tDSYLJbQcXsCkjYyvQ= +cloud.google.com/go/language v1.11.1/go.mod h1:Xyid9MG9WOX3utvDbpX7j3tXDmmDooMyMDqgUVpH17U= +cloud.google.com/go/language v1.12.1/go.mod h1:zQhalE2QlQIxbKIZt54IASBzmZpN/aDASea5zl1l+J4= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= +cloud.google.com/go/lifesciences v0.9.2/go.mod h1:QHEOO4tDzcSAzeJg7s2qwnLM2ji8IRpQl4p6m5Z9yTA= +cloud.google.com/go/lifesciences v0.9.3/go.mod h1:gNGBOJV80IWZdkd+xz4GQj4mbqaz737SCLHn2aRhQKM= cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= cloud.google.com/go/longrunning v0.4.2/go.mod h1:OHrnaYyLUV6oqwh0xiS7e5sLQhP1m0QU9R+WhGDMgIQ= cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= +cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= +cloud.google.com/go/longrunning v0.5.3/go.mod h1:y/0ga59EYu58J6SHmmQOvekvND2qODbu8ywBBW7EK7Y= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= +cloud.google.com/go/managedidentities v1.6.2/go.mod h1:5c2VG66eCa0WIq6IylRk3TBW83l161zkFvCj28X7jn8= +cloud.google.com/go/managedidentities v1.6.3/go.mod h1:tewiat9WLyFN0Fi7q1fDD5+0N4VUoL0SCX0OTCthZq4= cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= +cloud.google.com/go/maps v1.3.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= +cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= +cloud.google.com/go/maps v1.4.1/go.mod h1:BxSa0BnW1g2U2gNdbq5zikLlHUuHW0GFWh7sgML2kIY= +cloud.google.com/go/maps v1.5.1/go.mod h1:NPMZw1LJwQZYCfz4y+EIw+SI+24A4bpdFJqdKVr0lt4= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= +cloud.google.com/go/mediatranslation v0.8.2/go.mod h1:c9pUaDRLkgHRx3irYE5ZC8tfXGrMYwNZdmDqKMSfFp8= +cloud.google.com/go/mediatranslation v0.8.3/go.mod h1:F9OnXTy336rteOEywtY7FOqCk+J43o2RF638hkOQl4Y= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= +cloud.google.com/go/memcache v1.10.2/go.mod h1:f9ZzJHLBrmd4BkguIAa/l/Vle6uTHzHokdnzSWOdQ6A= +cloud.google.com/go/memcache v1.10.3/go.mod h1:6z89A41MT2DVAW0P4iIRdu5cmRTsbsFn4cyiIx8gbwo= cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/metastore v1.13.0/go.mod h1:URDhpG6XLeh5K+Glq0NOt74OfrPKTwS62gEPZzb5SOk= +cloud.google.com/go/metastore v1.13.1/go.mod h1:IbF62JLxuZmhItCppcIfzBBfUFq0DIB9HPDoLgWrVOU= +cloud.google.com/go/metastore v1.13.2/go.mod h1:KS59dD+unBji/kFebVp8XU/quNSyo8b6N6tPGspKszA= cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= +cloud.google.com/go/monitoring v1.16.0/go.mod h1:Ptp15HgAyM1fNICAojDMoNc/wUmn67mLHQfyqbw+poY= +cloud.google.com/go/monitoring v1.16.1/go.mod h1:6HsxddR+3y9j+o/cMJH6q/KJ/CBTvM/38L/1m7bTRJ4= +cloud.google.com/go/monitoring v1.16.2/go.mod h1:B44KGwi4ZCF8Rk/5n+FWeispDXoKSk9oss2QNlXJBgc= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= @@ -451,15 +651,24 @@ cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5Mp cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= +cloud.google.com/go/networkconnectivity v1.13.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= +cloud.google.com/go/networkconnectivity v1.14.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= +cloud.google.com/go/networkconnectivity v1.14.1/go.mod h1:LyGPXR742uQcDxZ/wv4EI0Vu5N6NKJ77ZYVnDe69Zug= +cloud.google.com/go/networkconnectivity v1.14.2/go.mod h1:5UFlwIisZylSkGG1AdwK/WZUaoz12PKu6wODwIbFzJo= cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= +cloud.google.com/go/networkmanagement v1.9.0/go.mod h1:UTUaEU9YwbCAhhz3jEOHr+2/K/MrBk2XxOLS89LQzFw= +cloud.google.com/go/networkmanagement v1.9.1/go.mod h1:CCSYgrQQvW73EJawO2QamemYcOb57LvrDdDU51F0mcI= +cloud.google.com/go/networkmanagement v1.9.2/go.mod h1:iDGvGzAoYRghhp4j2Cji7sF899GnfGQcQRQwgVOWnDw= cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= +cloud.google.com/go/networksecurity v0.9.2/go.mod h1:jG0SeAttWzPMUILEHDUvFYdQTl8L/E/KC8iZDj85lEI= +cloud.google.com/go/networksecurity v0.9.3/go.mod h1:l+C0ynM6P+KV9YjOnx+kk5IZqMSLccdBqW6GUoF4p/0= cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= @@ -467,19 +676,29 @@ cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vu cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= +cloud.google.com/go/notebooks v1.10.0/go.mod h1:SOPYMZnttHxqot0SGSFSkRrwE29eqnKPBJFqgWmiK2k= +cloud.google.com/go/notebooks v1.10.1/go.mod h1:5PdJc2SgAybE76kFQCWrTfJolCOUQXF97e+gteUUA6A= +cloud.google.com/go/notebooks v1.11.1/go.mod h1:V2Zkv8wX9kDCGRJqYoI+bQAaoVeE5kSiz4yYHd2yJwQ= cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= +cloud.google.com/go/optimization v1.5.0/go.mod h1:evo1OvTxeBRBu6ydPlrIRizKY/LJKo/drDMMRKqGEUU= +cloud.google.com/go/optimization v1.5.1/go.mod h1:NC0gnUD5MWVAF7XLdoYVPmYYVth93Q6BUzqAq3ZwtV8= +cloud.google.com/go/optimization v1.6.1/go.mod h1:hH2RYPTTM9e9zOiTaYPTiGPcGdNZVnBSBxjIAJzUkqo= cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= +cloud.google.com/go/orchestration v1.8.2/go.mod h1:T1cP+6WyTmh6LSZzeUhvGf0uZVmJyTx7t8z7Vg87+A0= +cloud.google.com/go/orchestration v1.8.3/go.mod h1:xhgWAYqlbYjlz2ftbFghdyqENYW+JXuhBx9KsjMoGHs= cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1za/0ZfpOs1M= cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= +cloud.google.com/go/orgpolicy v1.11.2/go.mod h1:biRDpNwfyytYnmCRWZWxrKF22Nkz9eNVj9zyaBdpm1o= +cloud.google.com/go/orgpolicy v1.11.3/go.mod h1:oKAtJ/gkMjum5icv2aujkP4CxROxPXsBbYGCDbPO8MM= cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= @@ -487,26 +706,39 @@ cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjwnjqWI7NVBc= cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= +cloud.google.com/go/osconfig v1.12.2/go.mod h1:eh9GPaMZpI6mEJEuhEjUJmaxvQ3gav+fFEJon1Y8Iw0= +cloud.google.com/go/osconfig v1.12.3/go.mod h1:L/fPS8LL6bEYUi1au832WtMnPeQNT94Zo3FwwV1/xGM= cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= +cloud.google.com/go/oslogin v1.11.0/go.mod h1:8GMTJs4X2nOAUVJiPGqIWVcDaF0eniEto3xlOxaboXE= +cloud.google.com/go/oslogin v1.11.1/go.mod h1:OhD2icArCVNUxKqtK0mcSmKL7lgr0LVlQz+v9s1ujTg= +cloud.google.com/go/oslogin v1.12.1/go.mod h1:VfwTeFJGbnakxAY236eN8fsnglLiVXndlbcNomY4iZU= cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= +cloud.google.com/go/phishingprotection v0.8.2/go.mod h1:LhJ91uyVHEYKSKcMGhOa14zMMWfbEdxG032oT6ECbC8= +cloud.google.com/go/phishingprotection v0.8.3/go.mod h1:3B01yO7T2Ra/TMojifn8EoGd4G9jts/6cIO0DgDY9J8= cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= cloud.google.com/go/policytroubleshooter v1.7.1/go.mod h1:0NaT5v3Ag1M7U5r0GfDCpUFkWd9YqpubBWsQlhanRv0= +cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcVQT7nTag2+DuH3uHmKd1HU= +cloud.google.com/go/policytroubleshooter v1.9.0/go.mod h1:+E2Lga7TycpeSTj2FsH4oXxTnrbHJGRlKhVZBLGgU64= +cloud.google.com/go/policytroubleshooter v1.9.1/go.mod h1:MYI8i0bCrL8cW+VHN1PoiBTyNZTstCg2WUw2eVC4c4U= +cloud.google.com/go/policytroubleshooter v1.10.1/go.mod h1:5C0rhT3TDZVxAu8813bwmTvd57Phbl8mr9F4ipOsxEs= cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= +cloud.google.com/go/privatecatalog v0.9.2/go.mod h1:RMA4ATa8IXfzvjrhhK8J6H4wwcztab+oZph3c6WmtFc= +cloud.google.com/go/privatecatalog v0.9.3/go.mod h1:K5pn2GrVmOPjXz3T26mzwXLcKivfIJ9R5N79AFCF9UE= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -516,6 +748,7 @@ cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhz cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= cloud.google.com/go/pubsub v1.32.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= +cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= @@ -529,42 +762,62 @@ cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91j cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.0/go.mod h1:QuE8EdU9dEnesG8/kG3XuJyNsjEqMlMzg3v3scCJ46c= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.1/go.mod h1:JZYZJOeZjgSSTGP4uz7NlQ4/d1w5hGmksVgM0lbEij0= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.2/go.mod h1:kpaDBOpkwD4G0GVMzG1W6Doy1tFFC97XAV3xy+Rd/pw= cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= +cloud.google.com/go/recommendationengine v0.8.2/go.mod h1:QIybYHPK58qir9CV2ix/re/M//Ty10OxjnnhWdaKS1Y= +cloud.google.com/go/recommendationengine v0.8.3/go.mod h1:m3b0RZV02BnODE9FeSvGv1qibFo8g0OnmB/RMwYy4V8= cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= +cloud.google.com/go/recommender v1.11.0/go.mod h1:kPiRQhPyTJ9kyXPCG6u/dlPLbYfFlkwHNRwdzPVAoII= +cloud.google.com/go/recommender v1.11.1/go.mod h1:sGwFFAyI57v2Hc5LbIj+lTwXipGu9NW015rkaEM5B18= +cloud.google.com/go/recommender v1.11.2/go.mod h1:AeoJuzOvFR/emIcXdVFkspVXVTYpliRCmKNYDnyBv6Y= cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= +cloud.google.com/go/redis v1.13.2/go.mod h1:0Hg7pCMXS9uz02q+LoEVl5dNHUkIQv+C/3L76fandSA= +cloud.google.com/go/redis v1.13.3/go.mod h1:vbUpCKUAZSYzFcWKmICnYgRAhTFg9r+djWqFxDYXi4U= cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= +cloud.google.com/go/resourcemanager v1.9.2/go.mod h1:OujkBg1UZg5lX2yIyMo5Vz9O5hf7XQOSV7WxqxxMtQE= +cloud.google.com/go/resourcemanager v1.9.3/go.mod h1:IqrY+g0ZgLsihcfcmqSe+RKp1hzjXwG904B92AwBz6U= cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= +cloud.google.com/go/resourcesettings v1.6.2/go.mod h1:mJIEDd9MobzunWMeniaMp6tzg4I2GvD3TTmPkc8vBXk= +cloud.google.com/go/resourcesettings v1.6.3/go.mod h1:pno5D+7oDYkMWZ5BpPsb4SO0ewg3IXcmmrUZaMJrFic= cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= +cloud.google.com/go/retail v1.14.2/go.mod h1:W7rrNRChAEChX336QF7bnMxbsjugcOCPU44i5kbLiL8= +cloud.google.com/go/retail v1.14.3/go.mod h1:Omz2akDHeSlfCq8ArPKiBxlnRpKEBjUH386JYFLUvXo= cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= +cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo= +cloud.google.com/go/run v1.3.0/go.mod h1:S/osX/4jIPZGg+ssuqh6GNgg7syixKe3YnprwehzHKU= +cloud.google.com/go/run v1.3.1/go.mod h1:cymddtZOzdwLIAsmS6s+Asl4JoXIDm/K1cpZTxV4Q5s= +cloud.google.com/go/run v1.3.2/go.mod h1:SIhmqArbjdU/D9M6JoHaAqnAMKLFtXaVdNeq04NjnVE= cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= @@ -572,11 +825,15 @@ cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJe cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= +cloud.google.com/go/scheduler v1.10.2/go.mod h1:O3jX6HRH5eKCA3FutMw375XHZJudNIKVonSCHv7ropY= +cloud.google.com/go/scheduler v1.10.3/go.mod h1:8ANskEM33+sIbpJ+R4xRfw/jzOG+ZFE8WVLy7/yGvbc= cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= +cloud.google.com/go/secretmanager v1.11.2/go.mod h1:MQm4t3deoSub7+WNwiC4/tRYgDBHJgJPvswqQVB1Vss= +cloud.google.com/go/secretmanager v1.11.3/go.mod h1:0bA2o6FabmShrEy328i67aV+65XoUFFSmVeLBn/51jI= cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= @@ -585,6 +842,8 @@ cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= +cloud.google.com/go/security v1.15.2/go.mod h1:2GVE/v1oixIRHDaClVbHuPcZwAqFM28mXuAKCfMgYIg= +cloud.google.com/go/security v1.15.3/go.mod h1:gQ/7Q2JYUZZgOzqKtw9McShH+MjNvtDpL40J1cT+vBs= cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= @@ -592,6 +851,8 @@ cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZ cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= +cloud.google.com/go/securitycenter v1.23.1/go.mod h1:w2HV3Mv/yKhbXKwOCu2i8bCuLtNP1IMHuiYQn4HJq5s= +cloud.google.com/go/securitycenter v1.24.1/go.mod h1:3h9IdjjHhVMXdQnmqzVnM7b0wMn/1O/U20eWVpMpZjI= cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= @@ -604,6 +865,9 @@ cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UV cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/servicedirectory v1.11.1/go.mod h1:tJywXimEWzNzw9FvtNjsQxxJ3/41jseeILgwU/QLrGI= +cloud.google.com/go/servicedirectory v1.11.2/go.mod h1:KD9hCLhncWRV5jJphwIpugKwM5bn1x0GyVVD4NO8mGg= cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= @@ -616,10 +880,15 @@ cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IW cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= +cloud.google.com/go/shell v1.7.2/go.mod h1:KqRPKwBV0UyLickMn0+BY1qIyE98kKyI216sH/TuHmc= +cloud.google.com/go/shell v1.7.3/go.mod h1:cTTEz/JdaBsQAeTQ3B6HHldZudFoYBOqjteev07FbIc= cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= +cloud.google.com/go/spanner v1.49.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= +cloud.google.com/go/spanner v1.50.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= +cloud.google.com/go/spanner v1.51.0/go.mod h1:c5KNo5LQ1X5tJwma9rSQZsXNBDNvj4/n8BVc3LNahq0= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= @@ -627,6 +896,9 @@ cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSy cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/speech v1.19.1/go.mod h1:WcuaWz/3hOlzPFOVo9DUsblMIHwxP589y6ZMtaG+iAA= +cloud.google.com/go/speech v1.19.2/go.mod h1:2OYFfj+Ch5LWjsaSINuCZsre/789zlcCI3SY4oAi2oI= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -644,31 +916,45 @@ cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= +cloud.google.com/go/storagetransfer v1.10.1/go.mod h1:rS7Sy0BtPviWYTTJVWCSV4QrbBitgPeuK4/FKa4IdLs= +cloud.google.com/go/storagetransfer v1.10.2/go.mod h1:meIhYQup5rg9juQJdyppnA/WLQCOguxtk1pr3/vBWzA= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= +cloud.google.com/go/talent v1.6.3/go.mod h1:xoDO97Qd4AK43rGjJvyBHMskiEf3KulgYzcH6YWOVoo= +cloud.google.com/go/talent v1.6.4/go.mod h1:QsWvi5eKeh6gG2DlBkpMaFYZYrYUnIpo34f6/V5QykY= cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= +cloud.google.com/go/texttospeech v1.7.2/go.mod h1:VYPT6aTOEl3herQjFHYErTlSZJ4vB00Q2ZTmuVgluD4= +cloud.google.com/go/texttospeech v1.7.3/go.mod h1:Av/zpkcgWfXlDLRYob17lqMstGZ3GqlvJXqKMp2u8so= cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= +cloud.google.com/go/tpu v1.6.2/go.mod h1:NXh3NDwt71TsPZdtGWgAG5ThDfGd32X1mJ2cMaRlVgU= +cloud.google.com/go/tpu v1.6.3/go.mod h1:lxiueqfVMlSToZY1151IaZqp89ELPSrk+3HIQ5HRkbY= cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= +cloud.google.com/go/trace v1.10.2/go.mod h1:NPXemMi6MToRFcSxRl2uDnu/qAlAQ3oULUphcHGh1vA= +cloud.google.com/go/trace v1.10.3/go.mod h1:Ke1bgfc73RV3wUFml+uQp7EsDw4dGaETLxB7Iq/r4CY= cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= cloud.google.com/go/translate v1.8.1/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.9.0/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.9.1/go.mod h1:TWIgDZknq2+JD4iRcojgeDtqGEp154HN/uL6hMvylS8= +cloud.google.com/go/translate v1.9.2/go.mod h1:E3Tc6rUTsQkVrXW6avbUhKJSr7ZE3j7zNmqzXKHqRrY= cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= @@ -676,12 +962,18 @@ cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1t cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= cloud.google.com/go/video v1.17.1/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/video v1.20.0/go.mod h1:U3G3FTnsvAGqglq9LxgqzOiBc/Nt8zis8S+850N2DUM= +cloud.google.com/go/video v1.20.1/go.mod h1:3gJS+iDprnj8SY6pe0SwLeC5BUW80NjhwX7INWEuWGU= +cloud.google.com/go/video v1.20.2/go.mod h1:lrixr5JeKNThsgfM9gqtwb6Okuqzfo4VrY2xynaViTA= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= +cloud.google.com/go/videointelligence v1.11.2/go.mod h1:ocfIGYtIVmIcWk1DsSGOoDiXca4vaZQII1C85qtoplc= +cloud.google.com/go/videointelligence v1.11.3/go.mod h1:tf0NUaGTjU1iS2KEkGWvO5hRHeCkFK3nPo0/cOZhZAo= cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= @@ -690,35 +982,51 @@ cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98z cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= +cloud.google.com/go/vision/v2 v2.7.3/go.mod h1:V0IcLCY7W+hpMKXK1JYE0LV5llEqVmj+UJChjvA1WsM= +cloud.google.com/go/vision/v2 v2.7.4/go.mod h1:ynDKnsDN/0RtqkKxQZ2iatv3Dm9O+HfRb5djl7l4Vvw= cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= +cloud.google.com/go/vmmigration v1.7.2/go.mod h1:iA2hVj22sm2LLYXGPT1pB63mXHhrH1m/ruux9TwWLd8= +cloud.google.com/go/vmmigration v1.7.3/go.mod h1:ZCQC7cENwmSWlwyTrZcWivchn78YnFniEQYRWQ65tBo= cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vmwareengine v1.0.1/go.mod h1:aT3Xsm5sNx0QShk1Jc1B8OddrxAScYLwzVoaiXfdzzk= +cloud.google.com/go/vmwareengine v1.0.2/go.mod h1:xMSNjIk8/itYrz1JA8nV3Ajg4L4n3N+ugP8JKzk3OaA= cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= +cloud.google.com/go/vpcaccess v1.7.2/go.mod h1:mmg/MnRHv+3e8FJUjeSibVFvQF1cCy2MsFaFqxeY1HU= +cloud.google.com/go/vpcaccess v1.7.3/go.mod h1:YX4skyfW3NC8vI3Fk+EegJnlYFatA+dXK4o236EUCUc= cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= +cloud.google.com/go/webrisk v1.9.2/go.mod h1:pY9kfDgAqxUpDBOrG4w8deLfhvJmejKB0qd/5uQIPBc= +cloud.google.com/go/webrisk v1.9.3/go.mod h1:RUYXe9X/wBDXhVilss7EDLW9ZNa06aowPuinUOPCXH8= cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= +cloud.google.com/go/websecurityscanner v1.6.2/go.mod h1:7YgjuU5tun7Eg2kpKgGnDuEOXWIrh8x8lWrJT4zfmas= +cloud.google.com/go/websecurityscanner v1.6.3/go.mod h1:x9XANObUFR+83Cya3g/B9M/yoHVqzxPnFtgF8yYGAXw= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= +cloud.google.com/go/workflows v1.12.0/go.mod h1:PYhSk2b6DhZ508tj8HXKaBh+OFe+xdl0dHF/tJdzPQM= +cloud.google.com/go/workflows v1.12.1/go.mod h1:5A95OhD/edtOhQd/O741NSfIMezNTbCwLM1P1tBRGHM= +cloud.google.com/go/workflows v1.12.2/go.mod h1:+OmBIgNqYJPVggnMo9nqmizW0qEXHhmnAzK/CnBqsHc= code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= @@ -736,12 +1044,14 @@ github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= +github.com/alecthomas/kingpin/v2 v2.3.1/go.mod h1:oYL5vtsvEHZGHxU7DMp32Dvx+qL+ptGn6lWaot2vCNE= +github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= @@ -757,6 +1067,7 @@ github.com/ash2k/stager v0.0.0-20170622123058-6e9c7b0eacd4 h1:pG7CUDQmAqAxVv4smD github.com/ash2k/stager v0.0.0-20170622123058-6e9c7b0eacd4/go.mod h1:20N8GhJtHSLeRJvNhy5D1SnEHni4Xlt6p13JQMHYdDY= github.com/atlassian/gostatsd v0.0.0-20180514010436-af796620006e h1:6TWp0L2h6cWOtpqdG4TLr6GIUWc/vivgeEkcnkT2bVw= github.com/atlassian/gostatsd v0.0.0-20180514010436-af796620006e/go.mod h1:zLXcNafAnnRRoK1bsbvHLp0yz3uZ2f7oy6WeNwjhqmA= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -767,15 +1078,16 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -796,24 +1108,29 @@ github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0/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 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.20 h1:VIPb/a2s17qNeQgDnkfZC35RScx+blkKF8GV68n80J4= +github.com/creack/pty v1.1.20/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1 h1:mbMd//7aY7CL51mT/YZ5DJ4yZYA/E4ZKVSgCh5yN7yU= github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -825,7 +1142,6 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= @@ -854,8 +1170,8 @@ github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0+ github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca/go.mod h1:49H/RkXP8pKaZy4h0d+NW16rSLhyVBt4o6VLJbmOqDE= github.com/evanphx/json-patch/v5 v5.1.0 h1:B0aXl1o/1cP8NbviYiBMkcHBtUjIJ1/Ccg6b+SwCLQg= github.com/evanphx/json-patch/v5 v5.1.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -879,11 +1195,20 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= @@ -901,17 +1226,18 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= -github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -938,7 +1264,6 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -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/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -948,8 +1273,9 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -967,6 +1293,7 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8 github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -992,14 +1319,18 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -1014,29 +1345,34 @@ github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38 github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 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 v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/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/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c h1:94S+uoVVMpQAEOrqGjCDyUdML4dJDkh6aC4MYmXECg4= github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= github.com/graphql-go/graphql v0.8.1 h1:p7/Ou/WpmulocJeEx7wjQy611rtXGQaAcXGqanuMMgc= github.com/graphql-go/graphql v0.8.1/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk= github.com/gxed/GoEndian v0.0.0-20160916112711-0f5c6873267e h1:eIhARPSF2zPr1hKxiL81XWQ392f5stEEcs38UzZVSWo= github.com/gxed/GoEndian v0.0.0-20160916112711-0f5c6873267e/go.mod h1:vckkIQ0K+GGne8aC4LseYg586YwBQhOxXMXGAmKsCdY= github.com/gxed/eventfd v0.0.0-20160916113412-80a92cca79a8 h1:N97hyGE4Q7bfXLQHvCtVvhLA9ofDkh5nzFcaB+1kLic= @@ -1070,8 +1406,9 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= 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.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 h1:vilfsDSy7TDxedi9gyBkMvAirat/oRcL0lFdJBf6tdM= github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= @@ -1082,8 +1419,9 @@ github.com/jbenet/go-reuseport v0.0.0-20180416043609-15a1cd37f050 h1:bfBi3IYMggK github.com/jbenet/go-reuseport v0.0.0-20180416043609-15a1cd37f050/go.mod h1:hry/Nwg2mFor95Ql+X52uC4zdrZsdH8a0noOj8BLt9g= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= +github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -1106,7 +1444,6 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.2 h1:LfVyl+ZlLlLDeQ/d2AqfGIIH4qEDu0Ed2S5GyhCWIWY= github.com/klauspost/compress v1.9.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= @@ -1118,10 +1455,11 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -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/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI= @@ -1147,7 +1485,6 @@ github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+v github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= @@ -1156,8 +1493,11 @@ github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/Qd github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mholt/archiver/v3 v3.3.1-0.20191129193105-44285f7ed244 h1:gk4jSQeyGCvG2yz2laVVPH98aCVFb2+KMASNQcF/Mcs= @@ -1223,28 +1563,44 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= @@ -1257,27 +1613,29 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sensu/core/v2 v2.20.0-alpha2 h1:UzPYH2ol31/nvzZxem0shGfX96/UEUXWL4/Qlk6/zFQ= -github.com/sensu/core/v2 v2.20.0-alpha2/go.mod h1:OrEkpMFO6ToEIxaxVYnILhDd2C2lUDr0YQsmmHpBNHI= -github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173635-6e2e6c17d8b1/go.mod h1:31dWC2jAXPNrvrTlqOkByvdVbNxQIGrbVaWRAH9+UYg= -github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317 h1:NjwGufblDsTKTTtWt9pwiAHvU07KQ0QFIaJfJsXnpbg= -github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317/go.mod h1:31dWC2jAXPNrvrTlqOkByvdVbNxQIGrbVaWRAH9+UYg= -github.com/sensu/core/v3 v3.9.0-alpha3 h1:9em3mLuHG2DZH1IXn6AkeaZ7B9gjkkKn5oG80wKQBYM= -github.com/sensu/core/v3 v3.9.0-alpha3/go.mod h1:G/X29uswsUlyN9hyN7K0C4OVWGu27HceYsDHivZKK2c= -github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317 h1:9ikTRk1/DHpRJwCLrZt1qnnpi8geenzaliI9Nga1KqU= -github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317/go.mod h1:5zS1z8nqGy2FWZYIp3H8tHr5a1/nhT9iZUoUpfOwlY4= +github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= +github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= +github.com/sensu/core/v2 v2.17.0/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= +github.com/sensu/core/v2 v2.19.0 h1:EoCOYr1sNFUXNTrN5WcYcsc77N+Jbhliz8XnAXiSi7o= +github.com/sensu/core/v2 v2.19.0/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= +github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= +github.com/sensu/core/v3 v3.8.1 h1:RhSlvUUOmIR2SF3AqtjVvowSLgRVAaAKAh1SOQRDx5E= +github.com/sensu/core/v3 v3.8.1/go.mod h1:pxfUL8YOhebsaE2SUBov/gsUUqIzkeLM61yFpTeavhs= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= -github.com/sensu/sensu-go/types v0.12.0-alpha9 h1:LTPpc5LokFjwF6VeGEXG4Fy5yW7DtLc4vtcvb2kOqxw= -github.com/sensu/sensu-go/types v0.12.0-alpha9/go.mod h1:rWBpXJ6zpa1Jx0b+Sb3uv57OV8Y/7D0mYF5B0u09kPY= +github.com/sensu/sensu-go/types v0.12.0-alpha6 h1:tPuPysl6Ew0x0u5USLeSk/3NMMt7GLJh2uO1kVFRwQY= +github.com/sensu/sensu-go/types v0.12.0-alpha6/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -1285,6 +1643,8 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= @@ -1295,7 +1655,6 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= @@ -1303,8 +1662,9 @@ github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1327,10 +1687,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= @@ -1338,17 +1698,21 @@ github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7Am github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= +github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/willf/pad v0.0.0-20160331131008-b3d780601022 h1:W5wMm7sF44Z3K9bpq+CHOMOipvLHN1ElD6nyQbbiy/0= github.com/willf/pad v0.0.0-20160331131008-b3d780601022/go.mod h1:+pVHwmjc9CH7ugBFxESIwQkXkVj0gUj4cFp63TLwP1Y= +github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= +github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chqDkyE9Z4N61UnQd+KOfgp5Iu53llk= +github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1361,36 +1725,23 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= -go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= -go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= -go.etcd.io/etcd/api/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:eGmulxTfbfBflZZ/zkelWngOCDv2U2fw/BfT5PxEGkE= -go.etcd.io/etcd/api/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= -go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= -go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= -go.etcd.io/etcd/client/pkg/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:uSfjfXeL2KkO2TkWKgFdF9HZyZR3Xs2c9Oj/I6GsCFA= -go.etcd.io/etcd/client/pkg/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= -go.etcd.io/etcd/client/v2 v2.305.9 h1:YZ2OLi0OvR0H75AcgSUajjd5uqKDKocQUqROTG11jIo= -go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= -go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= -go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= -go.etcd.io/etcd/client/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:Bk6dzk5LBZc8EOIgSRtxzlFQjyTuCXsVO6u3fNBkEyU= -go.etcd.io/etcd/client/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:uYn/tCn0v3dkeqT4lYGOhyfBvdzFmifq9bIgCPh47wI= -go.etcd.io/etcd/etcdutl/v3 v3.5.9/go.mod h1:rQ6z0HAAxVgYwBTWJbs3ei8gMYiNQzF51lQ2kI+6LZU= -go.etcd.io/etcd/pkg/v3 v3.5.9 h1:6R2jg/aWd/zB9+9JxmijDKStGJAPFsX3e6BeJkMi6eQ= -go.etcd.io/etcd/pkg/v3 v3.5.9/go.mod h1:BZl0SAShQFk0IpLWR78T/+pyt8AruMHhTNNX73hkNVY= -go.etcd.io/etcd/raft/v3 v3.5.9 h1:ZZ1GIHoUlHsn0QVqiRysAm3/81Xx7+i2d7nSdWxlOiI= -go.etcd.io/etcd/raft/v3 v3.5.9/go.mod h1:WnFkqzFdZua4LVlVXQEGhmooLeyS7mqzS4Pf4BCVqXg= -go.etcd.io/etcd/server/v3 v3.5.9 h1:vomEmmxeztLtS5OEH7d0hBAg4cjVIu9wXuNzUZx2ZA0= -go.etcd.io/etcd/server/v3 v3.5.9/go.mod h1:GgI1fQClQCFIzuVjlvdbMxNbnISt90gdfYyqiAIt65g= -go.etcd.io/etcd/server/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:W4apnE2r8hbyrw1eDQ+eGL6NwmTZcX3ndD7on4dAmQA= -go.etcd.io/etcd/server/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:BvNuCIeNSPZK4Ab5ZUzuSJdXsGnpEeqkF12HM4y/dys= -go.etcd.io/etcd/tests/v3 v3.5.9 h1:G7OmdapSW6h2CE1JoqiTZ6BWPoF4nT0HyQ79oDQnhBg= -go.etcd.io/etcd/tests/v3 v3.5.9/go.mod h1:rB3KZRFNV4Zq9Vv439TOaJ3rf9YDWgg0WNmx/EJDxQE= -go.etcd.io/etcd/tests/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:dGOIhjirYnv/xdK1rEP2yXHvm/7QzA4R33mUC79YG3g= -go.etcd.io/etcd/tests/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:qmN884HXuae6sBjkcFeTBTJEQIZJOUIEejd8XUBftdU= +go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= +go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= +go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= +go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= +go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= +go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= +go.etcd.io/etcd/pkg/v3 v3.5.10 h1:WPR8K0e9kWl1gAhB5A7gEa5ZBTNkT9NdNWrR8Qpo1CM= +go.etcd.io/etcd/pkg/v3 v3.5.10/go.mod h1:TKTuCKKcF1zxmfKWDkfz5qqYaE3JncKKZPFf8c1nFUs= +go.etcd.io/etcd/raft/v3 v3.5.10 h1:cgNAYe7xrsrn/5kXMSaH8kM/Ky8mAdMqGOxyYwpP0LA= +go.etcd.io/etcd/raft/v3 v3.5.10/go.mod h1:odD6kr8XQXTy9oQnyMPBOr0TVe+gT0neQhElQ6jbGRc= +go.etcd.io/etcd/server/v3 v3.5.10 h1:4NOGyOwD5sUZ22PiWYKmfxqoeh72z6EhYjNosKGLmZg= +go.etcd.io/etcd/server/v3 v3.5.10/go.mod h1:gBplPHfs6YI0L+RpGkTQO7buDbHv5HJGG/Bst0/zIPo= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -1400,37 +1751,54 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0 h1:Wx7nFnvCaissIUZxPkBqDz2963Z+Cl+PkYbDKzTxDqQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0/go.mod h1:E5NNboN0UqSAki0Atn9kVwaN7I+l25gGxDqBueo/74E= -go.opentelemetry.io/otel v1.0.1 h1:4XKyXmfqJLOQ7feyV5DB6gsBFZ0ltB8vLtp6pj4JIcc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 h1:RsQi0qJ2imFfCvZabqzM9cNXBG8k6gXMv1A0cXRmH6A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM= go.opentelemetry.io/otel v1.0.1/go.mod h1:OPEOD4jIT2SlZPMmwT6FqZz2C0ZNdQqiWcoK6M0SNFU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1 h1:ofMbch7i29qIUf7VtF+r0HRF6ac0SBaPSziSsKp7wkk= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1/go.mod h1:Kv8liBeVNFkkkbilbgWRpV+wWuu+H5xdOT6HAgd30iw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1 h1:CFMFNoz+CGprjFAFy+RJFrfEe4GBia3RRm2a4fREvCA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1/go.mod h1:xOvWoTOrQjxjW61xtOmD/WKGRYb/P4NzRo3bs65U6Rk= -go.opentelemetry.io/otel/sdk v1.0.1 h1:wXxFEWGo7XfXupPwVJvTBOaPBC9FEg0wB8hMNrKk+cA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= go.opentelemetry.io/otel/sdk v1.0.1/go.mod h1:HrdXne+BiwsOHYYkBE5ysIcv2bvdZstxzmCQhxTcZkI= -go.opentelemetry.io/otel/trace v1.0.1 h1:StTeIH6Q3G4r0Fiw34LTokUFESZgIDUr0qIJ7mKmAfw= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x7ZTuYBr3sUk= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.9.0 h1:C0g6TWmQYvjKRnljRULLWUVJGy8Uvu0NEL/5frY2/t4= go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -1444,14 +1812,13 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= -golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1508,7 +1875,6 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -1558,9 +1924,11 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1575,24 +1943,23 @@ golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -1620,6 +1987,9 @@ golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1635,7 +2005,6 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/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 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= @@ -1710,9 +2079,11 @@ golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1733,13 +2104,14 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1749,13 +2121,14 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1771,18 +2144,17 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1811,6 +2183,7 @@ golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1855,8 +2228,6 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= -golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= @@ -1941,13 +2312,15 @@ google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZ google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= +google.golang.org/api v0.139.0/go.mod h1:CVagp6Eekz9CjGZ718Z+sloknzkDJE7Vc1Ckj9+viBk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1994,7 +2367,6 @@ google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= @@ -2085,29 +2457,59 @@ google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= +google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto v0.0.0-20230821184602-ccc8af3d0e93/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:CCviP9RmpZ1mxVr8MUjCnSiY09IbAXZxhLE6EhHIdPU= +google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= +google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= +google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U= +google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= +google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 h1:HJMDndgxest5n2y77fnErkM62iUsptE/H8p0dC2Huo4= +google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405/go.mod h1:oT32Z4o8Zv2xPQTg0pbVaPr0MPOH6f14RgXt7zfIpwg= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920183334-c177e329c48b/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -2134,7 +2536,6 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= @@ -2152,9 +2553,14 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2168,7 +2574,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= @@ -2179,8 +2584,8 @@ google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -2188,8 +2593,9 @@ gopkg.in/h2non/filetype.v1 v1.0.3 h1:EhZ9p3H8eDdFHiKljxJ59EeQ9Pu88wrgY7/B1WRK/VE gopkg.in/h2non/filetype.v1 v1.0.3/go.mod h1:M0yem4rwSX5lLVrkEuRRp2/NinFMD5vgJ4DlAhZcfNo= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/readline.v1 v1.0.0-20160726135117-62c6fe619375/go.mod h1:lNEQeAhU009zbRxng+XOj5ITVgY24WcbNnQopyfKoYQ= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= @@ -2272,5 +2678,6 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/metrics/influx_bridge_test.go b/metrics/influx_bridge_test.go index 14f6090526..8c20dd85af 100644 --- a/metrics/influx_bridge_test.go +++ b/metrics/influx_bridge_test.go @@ -42,8 +42,8 @@ func TestInfluxBridgePush(t *testing.T) { } // expect to get at least N metrics metrics := strings.Split(buf.String(), "\n") - if got, want := len(metrics), 35; got < want { - t.Errorf("expected at least %d metrics, got %d", got, want) + if got, want := len(metrics), 34; got < want { + t.Errorf("expected at least %d metrics, got %d: %+v", want, got, metrics) } parser := influx.NewStreamParser(buf) for { From 9624ceeaf9ca4ddc6cda16fe930873a80fe14374 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Tue, 31 Oct 2023 10:45:51 -0700 Subject: [PATCH 130/173] bump core/v2 & core/v3 modules Signed-off-by: Justin Kolberg --- go.mod | 8 +- go.sum | 10 +- types/go.mod | 4 +- types/go.sum | 383 +++++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 378 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 0aa1d03cba..4e509fface 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,6 @@ require ( ) require ( - github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/creack/pty v1.1.20 // indirect @@ -85,8 +84,8 @@ require ( github.com/jonboulle/clockwork v0.4.0 // indirect github.com/kr/pty v1.1.8 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/sensu/core/v2 v2.19.0 - github.com/sensu/core/v3 v3.8.1 + github.com/sensu/core/v2 v2.20.0-alpha3 + github.com/sensu/core/v3 v3.9.0-alpha4 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/sensu/sensu-go/types v0.12.0-alpha6 github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect @@ -94,9 +93,6 @@ require ( go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect go.uber.org/multierr v1.11.0 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index ebd761412b..73e4a4df70 100644 --- a/go.sum +++ b/go.sum @@ -1226,6 +1226,7 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -1624,12 +1625,11 @@ github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmR github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= -github.com/sensu/core/v2 v2.17.0/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= -github.com/sensu/core/v2 v2.19.0 h1:EoCOYr1sNFUXNTrN5WcYcsc77N+Jbhliz8XnAXiSi7o= -github.com/sensu/core/v2 v2.19.0/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= +github.com/sensu/core/v2 v2.20.0-alpha3 h1:lRdfPHZqBBJG9K4kJ9udA5kjblAgwmubpF+UMOidDPc= +github.com/sensu/core/v2 v2.20.0-alpha3/go.mod h1:fzr3qioLAHyLsBfq9I6ELVjL01NUNjqmQx4kj2tbDLo= github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= -github.com/sensu/core/v3 v3.8.1 h1:RhSlvUUOmIR2SF3AqtjVvowSLgRVAaAKAh1SOQRDx5E= -github.com/sensu/core/v3 v3.8.1/go.mod h1:pxfUL8YOhebsaE2SUBov/gsUUqIzkeLM61yFpTeavhs= +github.com/sensu/core/v3 v3.9.0-alpha4 h1:jLy1ZjUMUMlce2uSeoxKa4rmjlisela06AIHQw/g9ts= +github.com/sensu/core/v3 v3.9.0-alpha4/go.mod h1:n+s31i1W5lIJZH0Dfvq41R49LxYcTUANqQOerAZNEKw= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= diff --git a/types/go.mod b/types/go.mod index 037c8fb665..9a4626212c 100644 --- a/types/go.mod +++ b/types/go.mod @@ -4,8 +4,8 @@ go 1.16 require ( github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 - github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317 - github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317 + github.com/sensu/core/v2 v2.20.0-alpha3 + github.com/sensu/core/v3 v3.9.0-alpha4 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/stretchr/testify v1.8.3 ) diff --git a/types/go.sum b/types/go.sum index b3b4f986a2..07f7fc1837 100644 --- a/types/go.sum +++ b/types/go.sum @@ -38,16 +38,24 @@ cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= +cloud.google.com/go/accessapproval v1.7.2/go.mod h1:/gShiq9/kK/h8T/eEn1BTzalDvk0mZxJlhfw0p+Xuc0= +cloud.google.com/go/accessapproval v1.7.3/go.mod h1:4l8+pwIxGTNqSf4T3ds8nLO94NQf0W/KnMNuQ9PbnP8= cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK76AMelMzgZCvJfsi2c+ps= cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= +cloud.google.com/go/accesscontextmanager v1.8.2/go.mod h1:E6/SCRM30elQJ2PKtFMs2YhfJpZSNcJyejhuzoId4Zk= +cloud.google.com/go/accesscontextmanager v1.8.3/go.mod h1:4i/JkF2JiFbhLnnpnfoTX5vRXfhf9ukhU1ANOTALTOQ= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= @@ -55,24 +63,38 @@ cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6l cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= cloud.google.com/go/aiplatform v1.45.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/aiplatform v1.48.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/aiplatform v1.50.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= +cloud.google.com/go/aiplatform v1.51.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= +cloud.google.com/go/aiplatform v1.51.1/go.mod h1:kY3nIMAVQOK2XDqDPHaOuD9e+FdMA6OOpfBjsvaFSOo= +cloud.google.com/go/aiplatform v1.51.2/go.mod h1:hCqVYB3mY45w99TmetEoe8eCQEwZEp9WHxeZdcv9phw= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/analytics v0.21.4/go.mod h1:zZgNCxLCy8b2rKKVfC1YkC2vTrpfZmeRCySM3aUbskA= +cloud.google.com/go/analytics v0.21.5/go.mod h1:BQtOBHWTlJ96axpPPnw5CvGJ6i3Ve/qX2fTxR8qWyr8= cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= +cloud.google.com/go/apigateway v1.6.2/go.mod h1:CwMC90nnZElorCW63P2pAYm25AtQrHfuOkbRSHj0bT8= +cloud.google.com/go/apigateway v1.6.3/go.mod h1:k68PXWpEs6BVDTtnLQAyG606Q3mz8pshItwPXjgv44Y= cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= +cloud.google.com/go/apigeeconnect v1.6.2/go.mod h1:s6O0CgXT9RgAxlq3DLXvG8riw8PYYbU/v25jqP3Dy18= +cloud.google.com/go/apigeeconnect v1.6.3/go.mod h1:peG0HFQ0si2bN15M6QSjEW/W7Gy3NYkWGz7pFz13cbo= cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= +cloud.google.com/go/apigeeregistry v0.7.2/go.mod h1:9CA2B2+TGsPKtfi3F7/1ncCCsL62NXBRfM6iPoGSM+8= +cloud.google.com/go/apigeeregistry v0.8.1/go.mod h1:MW4ig1N4JZQsXmBSwH4rwpgDonocz7FPBSw6XPGHmYw= cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= @@ -82,11 +104,15 @@ cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= +cloud.google.com/go/appengine v1.8.2/go.mod h1:WMeJV9oZ51pvclqFN2PqHoGnys7rK0rz6s3Mp6yMvDo= +cloud.google.com/go/appengine v1.8.3/go.mod h1:2oUPZ1LVZ5EXi+AF1ihNAF+S8JrzQ3till5m9VQkrsk= cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= +cloud.google.com/go/area120 v0.8.2/go.mod h1:a5qfo+x77SRLXnCynFWPUZhnZGeSgvQ+Y0v1kSItkh4= +cloud.google.com/go/area120 v0.8.3/go.mod h1:5zj6pMzVTH+SVHljdSKC35sriR/CVvQZzG/Icdyriw0= cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= @@ -96,6 +122,9 @@ cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9e cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= +cloud.google.com/go/artifactregistry v1.14.2/go.mod h1:Xk+QbsKEb0ElmyeMfdHAey41B+qBq3q5R5f5xD4XT3U= +cloud.google.com/go/artifactregistry v1.14.3/go.mod h1:A2/E9GXnsyXl7GUvQ/2CjHA+mVRoWAXC0brg2os+kNI= +cloud.google.com/go/artifactregistry v1.14.4/go.mod h1:SJJcZTMv6ce0LDMUnihCN7WSrI+kBSFV0KIKo8S8aYU= cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= @@ -105,6 +134,9 @@ cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrd cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= +cloud.google.com/go/asset v1.15.0/go.mod h1:tpKafV6mEut3+vN9ScGvCHXHj7FALFVta+okxFECHcg= +cloud.google.com/go/asset v1.15.1/go.mod h1:yX/amTvFWRpp5rcFq6XbCxzKT8RJUam1UoboE179jU4= +cloud.google.com/go/asset v1.15.2/go.mod h1:B6H5tclkXvXz7PD22qCA2TDxSVQfasa3iDlM89O2NXs= cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= @@ -112,23 +144,39 @@ cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEar cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= +cloud.google.com/go/assuredworkloads v1.11.2/go.mod h1:O1dfr+oZJMlE6mw0Bp0P1KZSlj5SghMBvTpZqIcUAW4= +cloud.google.com/go/assuredworkloads v1.11.3/go.mod h1:vEjfTKYyRUaIeA0bsGJceFV2JKpVRgyG2op3jfa59Zs= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= +cloud.google.com/go/automl v1.13.2/go.mod h1:gNY/fUmDEN40sP8amAX3MaXkxcqPIn7F1UIIPZpy4Mg= +cloud.google.com/go/automl v1.13.3/go.mod h1:Y8KwvyAZFOsMAPqUCfNu1AyclbC6ivCUF/MTwORymyY= cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= +cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA= +cloud.google.com/go/baremetalsolution v1.2.0/go.mod h1:68wi9AwPYkEWIUT4SvSGS9UJwKzNpshjHsH4lzk8iOw= +cloud.google.com/go/baremetalsolution v1.2.1/go.mod h1:3qKpKIw12RPXStwQXcbhfxVj1dqQGEvcmA+SX/mUR88= +cloud.google.com/go/baremetalsolution v1.2.2/go.mod h1:O5V6Uu1vzVelYahKfwEWRMaS3AbCkeYHy3145s1FkhM= cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= +cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A= +cloud.google.com/go/batch v1.4.1/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= +cloud.google.com/go/batch v1.5.0/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= +cloud.google.com/go/batch v1.5.1/go.mod h1:RpBuIYLkQu8+CWDk3dFD/t/jOCGuUpkpX+Y0n1Xccs8= +cloud.google.com/go/batch v1.6.1/go.mod h1:urdpD13zPe6YOK+6iZs/8/x2VBRofvblLpx0t57vM98= cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= +cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= +cloud.google.com/go/beyondcorp v1.0.1/go.mod h1:zl/rWWAFVeV+kx+X2Javly7o1EIQThU4WlkynffL/lk= +cloud.google.com/go/beyondcorp v1.0.2/go.mod h1:m8cpG7caD+5su+1eZr+TSvF6r21NdLJk4f9u4SP2Ntc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -143,6 +191,9 @@ cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/bigquery v1.55.0/go.mod h1:9Y5I3PN9kQWuid6183JFhOGOW3GcirA5LpsKCUn+2ec= +cloud.google.com/go/bigquery v1.56.0/go.mod h1:KDcsploXTEY7XT3fDQzMUZlpQLHzE4itubHrnmhUrZA= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= @@ -150,31 +201,50 @@ cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOA cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= +cloud.google.com/go/billing v1.17.0/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= +cloud.google.com/go/billing v1.17.1/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= +cloud.google.com/go/billing v1.17.2/go.mod h1:u/AdV/3wr3xoRBk5xvUzYMS1IawOAPwQMuHgHMdljDg= +cloud.google.com/go/billing v1.17.3/go.mod h1:z83AkoZ7mZwBGT3yTnt6rSGI1OOsHSIi6a5M3mJ8NaU= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= +cloud.google.com/go/binaryauthorization v1.7.0/go.mod h1:Zn+S6QqTMn6odcMU1zDZCJxPjU2tZPV1oDl45lWY154= +cloud.google.com/go/binaryauthorization v1.7.1/go.mod h1:GTAyfRWYgcbsP3NJogpV3yeunbUIjx2T9xVeYovtURE= +cloud.google.com/go/binaryauthorization v1.7.2/go.mod h1:kFK5fQtxEp97m92ziy+hbu+uKocka1qRRL8MVJIgjv0= cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= +cloud.google.com/go/certificatemanager v1.7.2/go.mod h1:15SYTDQMd00kdoW0+XY5d9e+JbOPjp24AvF48D8BbcQ= +cloud.google.com/go/certificatemanager v1.7.3/go.mod h1:T/sZYuC30PTag0TLo28VedIRIj1KPGcOQzjWAptHa00= cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= +cloud.google.com/go/channel v1.17.0/go.mod h1:RpbhJsGi/lXWAUM1eF4IbQGbsfVlg2o8Iiy2/YLfVT0= +cloud.google.com/go/channel v1.17.1/go.mod h1:xqfzcOZAcP4b/hUDH0GkGg1Sd5to6di1HOJn/pi5uBQ= +cloud.google.com/go/channel v1.17.2/go.mod h1:aT2LhnftnyfQceFql5I/mP8mIbiiJS4lWqgXA815zMk= cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.14.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.14.1/go.mod h1:K7wGc/3zfvmYWOWwYTgF/d/UVJhS4pu+HAy7PL7mCsU= +cloud.google.com/go/cloudbuild v1.14.2/go.mod h1:Bn6RO0mBYk8Vlrt+8NLrru7WXlQ9/RDWz2uo5KG1/sg= cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= +cloud.google.com/go/clouddms v1.7.0/go.mod h1:MW1dC6SOtI/tPNCciTsXtsGNEM0i0OccykPvv3hiYeM= +cloud.google.com/go/clouddms v1.7.1/go.mod h1:o4SR8U95+P7gZ/TX+YbJxehOCsM+fe6/brlrFquiszk= +cloud.google.com/go/clouddms v1.7.2/go.mod h1:Rk32TmWmHo64XqDvW7jgkFQet1tUKNVzs7oajtJT3jU= cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= @@ -182,6 +252,9 @@ cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQky cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/cloudtasks v1.12.2/go.mod h1:A7nYkjNlW2gUoROg1kvJrQGhJP/38UaWwsnuBDOBVUk= +cloud.google.com/go/cloudtasks v1.12.3/go.mod h1:GPVXhIOSGEaR+3xT4Fp72ScI+HjHffSS4B8+BaBB5Ys= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= @@ -200,6 +273,9 @@ cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IK cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= @@ -208,17 +284,28 @@ cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbT cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= cloud.google.com/go/contactcenterinsights v1.9.1/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/contactcenterinsights v1.11.0/go.mod h1:hutBdImE4XNZ1NV4vbPJKSFOnQruhC5Lj9bZqWMTKiU= +cloud.google.com/go/contactcenterinsights v1.11.1/go.mod h1:FeNP3Kg8iteKM80lMwSk3zZZKVxr+PGnAId6soKuXwE= +cloud.google.com/go/contactcenterinsights v1.11.2/go.mod h1:A9PIR5ov5cRcd28KlDbmmXE8Aay+Gccer2h4wzkYFso= cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= cloud.google.com/go/container v1.22.1/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/container v1.26.0/go.mod h1:YJCmRet6+6jnYYRS000T6k0D0xUXQgBSaJ7VwI8FBj4= +cloud.google.com/go/container v1.26.1/go.mod h1:5smONjPRUxeEpDG7bMKWfDL4sauswqEtnBK1/KKpR04= +cloud.google.com/go/container v1.26.2/go.mod h1:YlO84xCt5xupVbLaMY4s3XNE79MUJ+49VmkInr6HvF4= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= +cloud.google.com/go/containeranalysis v0.11.0/go.mod h1:4n2e99ZwpGxpNcz+YsFT1dfOHPQFGcAC8FN2M2/ne/U= +cloud.google.com/go/containeranalysis v0.11.1/go.mod h1:rYlUOM7nem1OJMKwE1SadufX0JP3wnXj844EtZAwWLY= +cloud.google.com/go/containeranalysis v0.11.2/go.mod h1:xibioGBC1MD2j4reTyV1xY1/MvKaz+fyM9ENWhmIeP8= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= @@ -229,42 +316,68 @@ cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3 cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= cloud.google.com/go/datacatalog v1.14.0/go.mod h1:h0PrGtlihoutNMp/uvwhawLQ9+c63Kz65UFqh49Yo+E= cloud.google.com/go/datacatalog v1.14.1/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/datacatalog v1.16.0/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/datacatalog v1.17.1/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= +cloud.google.com/go/datacatalog v1.18.0/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= +cloud.google.com/go/datacatalog v1.18.1/go.mod h1:TzAWaz+ON1tkNr4MOcak8EBHX7wIRX/gZKM+yTVsv+A= +cloud.google.com/go/datacatalog v1.18.2/go.mod h1:SPVgWW2WEMuWHA+fHodYjmxPiMqcOiWfhc9OD5msigk= cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= +cloud.google.com/go/dataflow v0.9.2/go.mod h1:vBfdBZ/ejlTaYIGB3zB4T08UshH70vbtZeMD+urnUSo= +cloud.google.com/go/dataflow v0.9.3/go.mod h1:HI4kMVjcHGTs3jTHW/kv3501YW+eloiJSLxkJa/vqFE= cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= +cloud.google.com/go/dataform v0.8.2/go.mod h1:X9RIqDs6NbGPLR80tnYoPNiO1w0wenKTb8PxxlhTMKM= +cloud.google.com/go/dataform v0.8.3/go.mod h1:8nI/tvv5Fso0drO3pEjtowz58lodx8MVkdV2q0aPlqg= cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= +cloud.google.com/go/datafusion v1.7.2/go.mod h1:62K2NEC6DRlpNmI43WHMWf9Vg/YvN6QVi8EVwifElI0= +cloud.google.com/go/datafusion v1.7.3/go.mod h1:eoLt1uFXKGBq48jy9LZ+Is8EAVLnmn50lNncLzwYokE= cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= +cloud.google.com/go/datalabeling v0.8.2/go.mod h1:cyDvGHuJWu9U/cLDA7d8sb9a0tWLEletStu2sTmg3BE= +cloud.google.com/go/datalabeling v0.8.3/go.mod h1:tvPhpGyS/V7lqjmb3V0TaDdGvhzgR1JoW7G2bpi2UTI= cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= cloud.google.com/go/dataplex v1.8.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.9.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.10.1/go.mod h1:1MzmBv8FvjYfc7vDdxhnLFNskikkB+3vl475/XdCDhs= +cloud.google.com/go/dataplex v1.10.2/go.mod h1:xdC8URdTrCrZMW6keY779ZT1cTOfV8KEPNsw+LTRT1Y= cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= +cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= +cloud.google.com/go/dataproc/v2 v2.2.0/go.mod h1:lZR7AQtwZPvmINx5J87DSOOpTfof9LVZju6/Qo4lmcY= +cloud.google.com/go/dataproc/v2 v2.2.1/go.mod h1:QdAJLaBjh+l4PVlVZcmrmhGccosY/omC1qwfQ61Zv/o= +cloud.google.com/go/dataproc/v2 v2.2.2/go.mod h1:aocQywVmQVF4i8CL740rNI/ZRpsaaC1Wh2++BJ7HEJ4= cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= +cloud.google.com/go/dataqna v0.8.2/go.mod h1:KNEqgx8TTmUipnQsScOoDpq/VlXVptUqVMZnt30WAPs= +cloud.google.com/go/dataqna v0.8.3/go.mod h1:wXNBW2uvc9e7Gl5k8adyAMnLush1KVV6lZUhB+rqNu4= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= cloud.google.com/go/datastore v1.12.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= cloud.google.com/go/datastore v1.12.1/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.14.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= +cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= @@ -272,11 +385,17 @@ cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2 cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/datastream v1.10.1/go.mod h1:7ngSYwnw95YFyTd5tOGBxHlOZiL+OtpjheqU7t2/s/c= +cloud.google.com/go/datastream v1.10.2/go.mod h1:W42TFgKAs/om6x/CdXX5E4oiAsKlH+e8MTGy81zdYt0= cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/deploy v1.13.1/go.mod h1:8jeadyLkH9qu9xgO3hVWw8jVr29N1mnW42gRJT8GY6g= +cloud.google.com/go/deploy v1.14.1/go.mod h1:N8S0b+aIHSEeSr5ORVoC0+/mOPUysVt8ae4QkZYolAw= cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= @@ -286,10 +405,17 @@ cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHih cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= cloud.google.com/go/dialogflow v1.38.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dialogflow v1.43.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= +cloud.google.com/go/dialogflow v1.44.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= +cloud.google.com/go/dialogflow v1.44.1/go.mod h1:n/h+/N2ouKOO+rbe/ZnI186xImpqvCVj2DdsWS/0EAk= +cloud.google.com/go/dialogflow v1.44.2/go.mod h1:QzFYndeJhpVPElnFkUXxdlptx0wPnBWLCBT9BvtC3/c= cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= +cloud.google.com/go/dlp v1.10.2/go.mod h1:ZbdKIhcnyhILgccwVDzkwqybthh7+MplGC3kZVZsIOQ= +cloud.google.com/go/dlp v1.10.3/go.mod h1:iUaTc/ln8I+QT6Ai5vmuwfw8fqTk2kaz0FvCwhLCom0= cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= @@ -297,32 +423,51 @@ cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= cloud.google.com/go/documentai v1.20.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/documentai v1.22.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/documentai v1.22.1/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= +cloud.google.com/go/documentai v1.23.0/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= +cloud.google.com/go/documentai v1.23.2/go.mod h1:Q/wcRT+qnuXOpjAkvOV4A+IeQl04q2/ReT7SSbytLSo= +cloud.google.com/go/documentai v1.23.4/go.mod h1:4MYAaEMnADPN1LPN5xboDR5QVB6AgsaxgFdJhitlE2Y= cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= +cloud.google.com/go/domains v0.9.2/go.mod h1:3YvXGYzZG1Temjbk7EyGCuGGiXHJwVNmwIf+E/cUp5I= +cloud.google.com/go/domains v0.9.3/go.mod h1:29k66YNDLDY9LCFKpGFeh6Nj9r62ZKm5EsUJxAl84KU= cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= +cloud.google.com/go/edgecontainer v1.1.2/go.mod h1:wQRjIzqxEs9e9wrtle4hQPSR1Y51kqN75dgF7UllZZ4= +cloud.google.com/go/edgecontainer v1.1.3/go.mod h1:Ll2DtIABzEfaxaVSbwj3QHFaOOovlDFiWVDu349jSsA= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= +cloud.google.com/go/essentialcontacts v1.6.3/go.mod h1:yiPCD7f2TkP82oJEFXFTou8Jl8L6LBRPeBEkTaO0Ggo= +cloud.google.com/go/essentialcontacts v1.6.4/go.mod h1:iju5Vy3d9tJUg0PYMd1nHhjV7xoCXaOAVabrwLaPBEM= cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/eventarc v1.13.1/go.mod h1:EqBxmGHFrruIara4FUQ3RHlgfCn7yo1HYsu2Hpt/C3Y= +cloud.google.com/go/eventarc v1.13.2/go.mod h1:X9A80ShVu19fb4e5sc/OLV7mpFUKZMwfJFeeWhcIObM= cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= +cloud.google.com/go/filestore v1.7.2/go.mod h1:TYOlyJs25f/omgj+vY7/tIG/E7BX369triSPzE4LdgE= +cloud.google.com/go/filestore v1.7.3/go.mod h1:Qp8WaEERR3cSkxToxFPHh/b8AACkSut+4qlCjAmKTV0= cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/firestore v1.12.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/firestore v1.13.0/go.mod h1:QojqqOh8IntInDUSTAh0c8ZsPYAr68Ma8c5DWOy8xb8= +cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ= cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= @@ -331,6 +476,8 @@ cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1Yb cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= +cloud.google.com/go/functions v1.15.2/go.mod h1:CHAjtcR6OU4XF2HuiVeriEdELNcnvRZSk1Q8RMqy4lE= +cloud.google.com/go/functions v1.15.3/go.mod h1:r/AMHwBheapkkySEhiZYLDBwVJCdlRwsm4ieJu35/Ug= cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= @@ -340,25 +487,38 @@ cloud.google.com/go/gaming v1.10.1/go.mod h1:XQQvtfP8Rb9Rxnxm5wFVpAp9zCQkJi2bLIb cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= +cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= +cloud.google.com/go/gkebackup v1.3.1/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= +cloud.google.com/go/gkebackup v1.3.2/go.mod h1:OMZbXzEJloyXMC7gqdSB+EOEQ1AKcpGYvO3s1ec5ixk= +cloud.google.com/go/gkebackup v1.3.3/go.mod h1:eMk7/wVV5P22KBakhQnJxWSVftL1p4VBFLpv0kIft7I= cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= +cloud.google.com/go/gkeconnect v0.8.2/go.mod h1:6nAVhwchBJYgQCXD2pHBFQNiJNyAd/wyxljpaa6ZPrY= +cloud.google.com/go/gkeconnect v0.8.3/go.mod h1:i9GDTrfzBSUZGCe98qSu1B8YB8qfapT57PenIb820Jo= cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= +cloud.google.com/go/gkehub v0.14.2/go.mod h1:iyjYH23XzAxSdhrbmfoQdePnlMj2EWcvnR+tHdBQsCY= +cloud.google.com/go/gkehub v0.14.3/go.mod h1:jAl6WafkHHW18qgq7kqcrXYzN08hXeK/Va3utN8VKg8= cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= +cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= +cloud.google.com/go/gkemulticloud v1.0.1/go.mod h1:AcrGoin6VLKT/fwZEYuqvVominLriQBCKmbjtnbMjG8= +cloud.google.com/go/gkemulticloud v1.0.2/go.mod h1:+ee5VXxKb3H1l4LZAcgWB/rvI16VTNTrInWxDjAGsGo= cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= +cloud.google.com/go/gsuiteaddons v1.6.2/go.mod h1:K65m9XSgs8hTF3X9nNTPi8IQueljSdYo9F+Mi+s4MyU= +cloud.google.com/go/gsuiteaddons v1.6.3/go.mod h1:sCFJkZoMrLZT3JTb8uJqgKPNshH2tfXeCwTFRebTq48= cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= @@ -371,21 +531,31 @@ cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCta cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBalRE8= cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= +cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= +cloud.google.com/go/iap v1.9.0/go.mod h1:01OFxd1R+NFrg78S+hoPV5PxEzv22HXaNqUUlmNHFuY= +cloud.google.com/go/iap v1.9.1/go.mod h1:SIAkY7cGMLohLSdBR25BuIxO+I4fXJiL06IBL7cy/5Q= +cloud.google.com/go/iap v1.9.2/go.mod h1:GwDTOs047PPSnwRD0Us5FKf4WDRcVvHg1q9WVkKBhdI= cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= +cloud.google.com/go/ids v1.4.2/go.mod h1:3vw8DX6YddRu9BncxuzMyWn0g8+ooUjI2gslJ7FH3vk= +cloud.google.com/go/ids v1.4.3/go.mod h1:9CXPqI3GedjmkjbMWCUhMZ2P2N7TUMzAkVXYEH2orYU= cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= +cloud.google.com/go/iot v1.7.2/go.mod h1:q+0P5zr1wRFpw7/MOgDXrG/HVA+l+cSwdObffkrpnSg= +cloud.google.com/go/iot v1.7.3/go.mod h1:t8itFchkol4VgNbHnIq9lXoOOtHNR3uAACQMYbN9N4I= cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= @@ -395,52 +565,81 @@ cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63 cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= cloud.google.com/go/kms v1.11.0/go.mod h1:hwdiYC0xjnWsKQQCQQmIQnS9asjYVSK6jtXm+zFqXLM= cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/kms v1.15.2/go.mod h1:3hopT4+7ooWRCjc2DxgnpESFxhIraaI2IpAVUEhbT/w= +cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= +cloud.google.com/go/kms v1.15.4/go.mod h1:L3Sdj6QTHK8dfwK5D1JLsAyELsNMnd3tAIwGS4ltKpc= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= +cloud.google.com/go/language v1.11.0/go.mod h1:uDx+pFDdAKTY8ehpWbiXyQdz8tDSYLJbQcXsCkjYyvQ= +cloud.google.com/go/language v1.11.1/go.mod h1:Xyid9MG9WOX3utvDbpX7j3tXDmmDooMyMDqgUVpH17U= +cloud.google.com/go/language v1.12.1/go.mod h1:zQhalE2QlQIxbKIZt54IASBzmZpN/aDASea5zl1l+J4= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= +cloud.google.com/go/lifesciences v0.9.2/go.mod h1:QHEOO4tDzcSAzeJg7s2qwnLM2ji8IRpQl4p6m5Z9yTA= +cloud.google.com/go/lifesciences v0.9.3/go.mod h1:gNGBOJV80IWZdkd+xz4GQj4mbqaz737SCLHn2aRhQKM= cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= cloud.google.com/go/longrunning v0.4.2/go.mod h1:OHrnaYyLUV6oqwh0xiS7e5sLQhP1m0QU9R+WhGDMgIQ= cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= +cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= +cloud.google.com/go/longrunning v0.5.3/go.mod h1:y/0ga59EYu58J6SHmmQOvekvND2qODbu8ywBBW7EK7Y= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= +cloud.google.com/go/managedidentities v1.6.2/go.mod h1:5c2VG66eCa0WIq6IylRk3TBW83l161zkFvCj28X7jn8= +cloud.google.com/go/managedidentities v1.6.3/go.mod h1:tewiat9WLyFN0Fi7q1fDD5+0N4VUoL0SCX0OTCthZq4= cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= +cloud.google.com/go/maps v1.3.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= +cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= +cloud.google.com/go/maps v1.4.1/go.mod h1:BxSa0BnW1g2U2gNdbq5zikLlHUuHW0GFWh7sgML2kIY= +cloud.google.com/go/maps v1.5.1/go.mod h1:NPMZw1LJwQZYCfz4y+EIw+SI+24A4bpdFJqdKVr0lt4= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= +cloud.google.com/go/mediatranslation v0.8.2/go.mod h1:c9pUaDRLkgHRx3irYE5ZC8tfXGrMYwNZdmDqKMSfFp8= +cloud.google.com/go/mediatranslation v0.8.3/go.mod h1:F9OnXTy336rteOEywtY7FOqCk+J43o2RF638hkOQl4Y= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= +cloud.google.com/go/memcache v1.10.2/go.mod h1:f9ZzJHLBrmd4BkguIAa/l/Vle6uTHzHokdnzSWOdQ6A= +cloud.google.com/go/memcache v1.10.3/go.mod h1:6z89A41MT2DVAW0P4iIRdu5cmRTsbsFn4cyiIx8gbwo= cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/metastore v1.13.0/go.mod h1:URDhpG6XLeh5K+Glq0NOt74OfrPKTwS62gEPZzb5SOk= +cloud.google.com/go/metastore v1.13.1/go.mod h1:IbF62JLxuZmhItCppcIfzBBfUFq0DIB9HPDoLgWrVOU= +cloud.google.com/go/metastore v1.13.2/go.mod h1:KS59dD+unBji/kFebVp8XU/quNSyo8b6N6tPGspKszA= cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= +cloud.google.com/go/monitoring v1.16.0/go.mod h1:Ptp15HgAyM1fNICAojDMoNc/wUmn67mLHQfyqbw+poY= +cloud.google.com/go/monitoring v1.16.1/go.mod h1:6HsxddR+3y9j+o/cMJH6q/KJ/CBTvM/38L/1m7bTRJ4= +cloud.google.com/go/monitoring v1.16.2/go.mod h1:B44KGwi4ZCF8Rk/5n+FWeispDXoKSk9oss2QNlXJBgc= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= @@ -448,15 +647,24 @@ cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5Mp cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= +cloud.google.com/go/networkconnectivity v1.13.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= +cloud.google.com/go/networkconnectivity v1.14.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= +cloud.google.com/go/networkconnectivity v1.14.1/go.mod h1:LyGPXR742uQcDxZ/wv4EI0Vu5N6NKJ77ZYVnDe69Zug= +cloud.google.com/go/networkconnectivity v1.14.2/go.mod h1:5UFlwIisZylSkGG1AdwK/WZUaoz12PKu6wODwIbFzJo= cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= +cloud.google.com/go/networkmanagement v1.9.0/go.mod h1:UTUaEU9YwbCAhhz3jEOHr+2/K/MrBk2XxOLS89LQzFw= +cloud.google.com/go/networkmanagement v1.9.1/go.mod h1:CCSYgrQQvW73EJawO2QamemYcOb57LvrDdDU51F0mcI= +cloud.google.com/go/networkmanagement v1.9.2/go.mod h1:iDGvGzAoYRghhp4j2Cji7sF899GnfGQcQRQwgVOWnDw= cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= +cloud.google.com/go/networksecurity v0.9.2/go.mod h1:jG0SeAttWzPMUILEHDUvFYdQTl8L/E/KC8iZDj85lEI= +cloud.google.com/go/networksecurity v0.9.3/go.mod h1:l+C0ynM6P+KV9YjOnx+kk5IZqMSLccdBqW6GUoF4p/0= cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= @@ -464,19 +672,29 @@ cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vu cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= +cloud.google.com/go/notebooks v1.10.0/go.mod h1:SOPYMZnttHxqot0SGSFSkRrwE29eqnKPBJFqgWmiK2k= +cloud.google.com/go/notebooks v1.10.1/go.mod h1:5PdJc2SgAybE76kFQCWrTfJolCOUQXF97e+gteUUA6A= +cloud.google.com/go/notebooks v1.11.1/go.mod h1:V2Zkv8wX9kDCGRJqYoI+bQAaoVeE5kSiz4yYHd2yJwQ= cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= +cloud.google.com/go/optimization v1.5.0/go.mod h1:evo1OvTxeBRBu6ydPlrIRizKY/LJKo/drDMMRKqGEUU= +cloud.google.com/go/optimization v1.5.1/go.mod h1:NC0gnUD5MWVAF7XLdoYVPmYYVth93Q6BUzqAq3ZwtV8= +cloud.google.com/go/optimization v1.6.1/go.mod h1:hH2RYPTTM9e9zOiTaYPTiGPcGdNZVnBSBxjIAJzUkqo= cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= +cloud.google.com/go/orchestration v1.8.2/go.mod h1:T1cP+6WyTmh6LSZzeUhvGf0uZVmJyTx7t8z7Vg87+A0= +cloud.google.com/go/orchestration v1.8.3/go.mod h1:xhgWAYqlbYjlz2ftbFghdyqENYW+JXuhBx9KsjMoGHs= cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1za/0ZfpOs1M= cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= +cloud.google.com/go/orgpolicy v1.11.2/go.mod h1:biRDpNwfyytYnmCRWZWxrKF22Nkz9eNVj9zyaBdpm1o= +cloud.google.com/go/orgpolicy v1.11.3/go.mod h1:oKAtJ/gkMjum5icv2aujkP4CxROxPXsBbYGCDbPO8MM= cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= @@ -484,26 +702,39 @@ cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjwnjqWI7NVBc= cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= +cloud.google.com/go/osconfig v1.12.2/go.mod h1:eh9GPaMZpI6mEJEuhEjUJmaxvQ3gav+fFEJon1Y8Iw0= +cloud.google.com/go/osconfig v1.12.3/go.mod h1:L/fPS8LL6bEYUi1au832WtMnPeQNT94Zo3FwwV1/xGM= cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= +cloud.google.com/go/oslogin v1.11.0/go.mod h1:8GMTJs4X2nOAUVJiPGqIWVcDaF0eniEto3xlOxaboXE= +cloud.google.com/go/oslogin v1.11.1/go.mod h1:OhD2icArCVNUxKqtK0mcSmKL7lgr0LVlQz+v9s1ujTg= +cloud.google.com/go/oslogin v1.12.1/go.mod h1:VfwTeFJGbnakxAY236eN8fsnglLiVXndlbcNomY4iZU= cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= +cloud.google.com/go/phishingprotection v0.8.2/go.mod h1:LhJ91uyVHEYKSKcMGhOa14zMMWfbEdxG032oT6ECbC8= +cloud.google.com/go/phishingprotection v0.8.3/go.mod h1:3B01yO7T2Ra/TMojifn8EoGd4G9jts/6cIO0DgDY9J8= cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= cloud.google.com/go/policytroubleshooter v1.7.1/go.mod h1:0NaT5v3Ag1M7U5r0GfDCpUFkWd9YqpubBWsQlhanRv0= +cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcVQT7nTag2+DuH3uHmKd1HU= +cloud.google.com/go/policytroubleshooter v1.9.0/go.mod h1:+E2Lga7TycpeSTj2FsH4oXxTnrbHJGRlKhVZBLGgU64= +cloud.google.com/go/policytroubleshooter v1.9.1/go.mod h1:MYI8i0bCrL8cW+VHN1PoiBTyNZTstCg2WUw2eVC4c4U= +cloud.google.com/go/policytroubleshooter v1.10.1/go.mod h1:5C0rhT3TDZVxAu8813bwmTvd57Phbl8mr9F4ipOsxEs= cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= +cloud.google.com/go/privatecatalog v0.9.2/go.mod h1:RMA4ATa8IXfzvjrhhK8J6H4wwcztab+oZph3c6WmtFc= +cloud.google.com/go/privatecatalog v0.9.3/go.mod h1:K5pn2GrVmOPjXz3T26mzwXLcKivfIJ9R5N79AFCF9UE= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -513,6 +744,7 @@ cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhz cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= cloud.google.com/go/pubsub v1.32.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= +cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= @@ -526,42 +758,62 @@ cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91j cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.0/go.mod h1:QuE8EdU9dEnesG8/kG3XuJyNsjEqMlMzg3v3scCJ46c= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.1/go.mod h1:JZYZJOeZjgSSTGP4uz7NlQ4/d1w5hGmksVgM0lbEij0= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.2/go.mod h1:kpaDBOpkwD4G0GVMzG1W6Doy1tFFC97XAV3xy+Rd/pw= cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= +cloud.google.com/go/recommendationengine v0.8.2/go.mod h1:QIybYHPK58qir9CV2ix/re/M//Ty10OxjnnhWdaKS1Y= +cloud.google.com/go/recommendationengine v0.8.3/go.mod h1:m3b0RZV02BnODE9FeSvGv1qibFo8g0OnmB/RMwYy4V8= cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= +cloud.google.com/go/recommender v1.11.0/go.mod h1:kPiRQhPyTJ9kyXPCG6u/dlPLbYfFlkwHNRwdzPVAoII= +cloud.google.com/go/recommender v1.11.1/go.mod h1:sGwFFAyI57v2Hc5LbIj+lTwXipGu9NW015rkaEM5B18= +cloud.google.com/go/recommender v1.11.2/go.mod h1:AeoJuzOvFR/emIcXdVFkspVXVTYpliRCmKNYDnyBv6Y= cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= +cloud.google.com/go/redis v1.13.2/go.mod h1:0Hg7pCMXS9uz02q+LoEVl5dNHUkIQv+C/3L76fandSA= +cloud.google.com/go/redis v1.13.3/go.mod h1:vbUpCKUAZSYzFcWKmICnYgRAhTFg9r+djWqFxDYXi4U= cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= +cloud.google.com/go/resourcemanager v1.9.2/go.mod h1:OujkBg1UZg5lX2yIyMo5Vz9O5hf7XQOSV7WxqxxMtQE= +cloud.google.com/go/resourcemanager v1.9.3/go.mod h1:IqrY+g0ZgLsihcfcmqSe+RKp1hzjXwG904B92AwBz6U= cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= +cloud.google.com/go/resourcesettings v1.6.2/go.mod h1:mJIEDd9MobzunWMeniaMp6tzg4I2GvD3TTmPkc8vBXk= +cloud.google.com/go/resourcesettings v1.6.3/go.mod h1:pno5D+7oDYkMWZ5BpPsb4SO0ewg3IXcmmrUZaMJrFic= cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= +cloud.google.com/go/retail v1.14.2/go.mod h1:W7rrNRChAEChX336QF7bnMxbsjugcOCPU44i5kbLiL8= +cloud.google.com/go/retail v1.14.3/go.mod h1:Omz2akDHeSlfCq8ArPKiBxlnRpKEBjUH386JYFLUvXo= cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= +cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo= +cloud.google.com/go/run v1.3.0/go.mod h1:S/osX/4jIPZGg+ssuqh6GNgg7syixKe3YnprwehzHKU= +cloud.google.com/go/run v1.3.1/go.mod h1:cymddtZOzdwLIAsmS6s+Asl4JoXIDm/K1cpZTxV4Q5s= +cloud.google.com/go/run v1.3.2/go.mod h1:SIhmqArbjdU/D9M6JoHaAqnAMKLFtXaVdNeq04NjnVE= cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= @@ -569,11 +821,15 @@ cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJe cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= +cloud.google.com/go/scheduler v1.10.2/go.mod h1:O3jX6HRH5eKCA3FutMw375XHZJudNIKVonSCHv7ropY= +cloud.google.com/go/scheduler v1.10.3/go.mod h1:8ANskEM33+sIbpJ+R4xRfw/jzOG+ZFE8WVLy7/yGvbc= cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= +cloud.google.com/go/secretmanager v1.11.2/go.mod h1:MQm4t3deoSub7+WNwiC4/tRYgDBHJgJPvswqQVB1Vss= +cloud.google.com/go/secretmanager v1.11.3/go.mod h1:0bA2o6FabmShrEy328i67aV+65XoUFFSmVeLBn/51jI= cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= @@ -582,6 +838,8 @@ cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= +cloud.google.com/go/security v1.15.2/go.mod h1:2GVE/v1oixIRHDaClVbHuPcZwAqFM28mXuAKCfMgYIg= +cloud.google.com/go/security v1.15.3/go.mod h1:gQ/7Q2JYUZZgOzqKtw9McShH+MjNvtDpL40J1cT+vBs= cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= @@ -589,6 +847,8 @@ cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZ cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= +cloud.google.com/go/securitycenter v1.23.1/go.mod h1:w2HV3Mv/yKhbXKwOCu2i8bCuLtNP1IMHuiYQn4HJq5s= +cloud.google.com/go/securitycenter v1.24.1/go.mod h1:3h9IdjjHhVMXdQnmqzVnM7b0wMn/1O/U20eWVpMpZjI= cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= @@ -601,6 +861,9 @@ cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UV cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/servicedirectory v1.11.1/go.mod h1:tJywXimEWzNzw9FvtNjsQxxJ3/41jseeILgwU/QLrGI= +cloud.google.com/go/servicedirectory v1.11.2/go.mod h1:KD9hCLhncWRV5jJphwIpugKwM5bn1x0GyVVD4NO8mGg= cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= @@ -613,10 +876,15 @@ cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IW cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= +cloud.google.com/go/shell v1.7.2/go.mod h1:KqRPKwBV0UyLickMn0+BY1qIyE98kKyI216sH/TuHmc= +cloud.google.com/go/shell v1.7.3/go.mod h1:cTTEz/JdaBsQAeTQ3B6HHldZudFoYBOqjteev07FbIc= cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= +cloud.google.com/go/spanner v1.49.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= +cloud.google.com/go/spanner v1.50.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= +cloud.google.com/go/spanner v1.51.0/go.mod h1:c5KNo5LQ1X5tJwma9rSQZsXNBDNvj4/n8BVc3LNahq0= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= @@ -624,6 +892,9 @@ cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSy cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/speech v1.19.1/go.mod h1:WcuaWz/3hOlzPFOVo9DUsblMIHwxP589y6ZMtaG+iAA= +cloud.google.com/go/speech v1.19.2/go.mod h1:2OYFfj+Ch5LWjsaSINuCZsre/789zlcCI3SY4oAi2oI= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -641,31 +912,45 @@ cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= +cloud.google.com/go/storagetransfer v1.10.1/go.mod h1:rS7Sy0BtPviWYTTJVWCSV4QrbBitgPeuK4/FKa4IdLs= +cloud.google.com/go/storagetransfer v1.10.2/go.mod h1:meIhYQup5rg9juQJdyppnA/WLQCOguxtk1pr3/vBWzA= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= +cloud.google.com/go/talent v1.6.3/go.mod h1:xoDO97Qd4AK43rGjJvyBHMskiEf3KulgYzcH6YWOVoo= +cloud.google.com/go/talent v1.6.4/go.mod h1:QsWvi5eKeh6gG2DlBkpMaFYZYrYUnIpo34f6/V5QykY= cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= +cloud.google.com/go/texttospeech v1.7.2/go.mod h1:VYPT6aTOEl3herQjFHYErTlSZJ4vB00Q2ZTmuVgluD4= +cloud.google.com/go/texttospeech v1.7.3/go.mod h1:Av/zpkcgWfXlDLRYob17lqMstGZ3GqlvJXqKMp2u8so= cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= +cloud.google.com/go/tpu v1.6.2/go.mod h1:NXh3NDwt71TsPZdtGWgAG5ThDfGd32X1mJ2cMaRlVgU= +cloud.google.com/go/tpu v1.6.3/go.mod h1:lxiueqfVMlSToZY1151IaZqp89ELPSrk+3HIQ5HRkbY= cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= +cloud.google.com/go/trace v1.10.2/go.mod h1:NPXemMi6MToRFcSxRl2uDnu/qAlAQ3oULUphcHGh1vA= +cloud.google.com/go/trace v1.10.3/go.mod h1:Ke1bgfc73RV3wUFml+uQp7EsDw4dGaETLxB7Iq/r4CY= cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= cloud.google.com/go/translate v1.8.1/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.9.0/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.9.1/go.mod h1:TWIgDZknq2+JD4iRcojgeDtqGEp154HN/uL6hMvylS8= +cloud.google.com/go/translate v1.9.2/go.mod h1:E3Tc6rUTsQkVrXW6avbUhKJSr7ZE3j7zNmqzXKHqRrY= cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= @@ -673,12 +958,18 @@ cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1t cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= cloud.google.com/go/video v1.17.1/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/video v1.20.0/go.mod h1:U3G3FTnsvAGqglq9LxgqzOiBc/Nt8zis8S+850N2DUM= +cloud.google.com/go/video v1.20.1/go.mod h1:3gJS+iDprnj8SY6pe0SwLeC5BUW80NjhwX7INWEuWGU= +cloud.google.com/go/video v1.20.2/go.mod h1:lrixr5JeKNThsgfM9gqtwb6Okuqzfo4VrY2xynaViTA= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= +cloud.google.com/go/videointelligence v1.11.2/go.mod h1:ocfIGYtIVmIcWk1DsSGOoDiXca4vaZQII1C85qtoplc= +cloud.google.com/go/videointelligence v1.11.3/go.mod h1:tf0NUaGTjU1iS2KEkGWvO5hRHeCkFK3nPo0/cOZhZAo= cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= @@ -687,35 +978,51 @@ cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98z cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= +cloud.google.com/go/vision/v2 v2.7.3/go.mod h1:V0IcLCY7W+hpMKXK1JYE0LV5llEqVmj+UJChjvA1WsM= +cloud.google.com/go/vision/v2 v2.7.4/go.mod h1:ynDKnsDN/0RtqkKxQZ2iatv3Dm9O+HfRb5djl7l4Vvw= cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= +cloud.google.com/go/vmmigration v1.7.2/go.mod h1:iA2hVj22sm2LLYXGPT1pB63mXHhrH1m/ruux9TwWLd8= +cloud.google.com/go/vmmigration v1.7.3/go.mod h1:ZCQC7cENwmSWlwyTrZcWivchn78YnFniEQYRWQ65tBo= cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vmwareengine v1.0.1/go.mod h1:aT3Xsm5sNx0QShk1Jc1B8OddrxAScYLwzVoaiXfdzzk= +cloud.google.com/go/vmwareengine v1.0.2/go.mod h1:xMSNjIk8/itYrz1JA8nV3Ajg4L4n3N+ugP8JKzk3OaA= cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= +cloud.google.com/go/vpcaccess v1.7.2/go.mod h1:mmg/MnRHv+3e8FJUjeSibVFvQF1cCy2MsFaFqxeY1HU= +cloud.google.com/go/vpcaccess v1.7.3/go.mod h1:YX4skyfW3NC8vI3Fk+EegJnlYFatA+dXK4o236EUCUc= cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= +cloud.google.com/go/webrisk v1.9.2/go.mod h1:pY9kfDgAqxUpDBOrG4w8deLfhvJmejKB0qd/5uQIPBc= +cloud.google.com/go/webrisk v1.9.3/go.mod h1:RUYXe9X/wBDXhVilss7EDLW9ZNa06aowPuinUOPCXH8= cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= +cloud.google.com/go/websecurityscanner v1.6.2/go.mod h1:7YgjuU5tun7Eg2kpKgGnDuEOXWIrh8x8lWrJT4zfmas= +cloud.google.com/go/websecurityscanner v1.6.3/go.mod h1:x9XANObUFR+83Cya3g/B9M/yoHVqzxPnFtgF8yYGAXw= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= +cloud.google.com/go/workflows v1.12.0/go.mod h1:PYhSk2b6DhZ508tj8HXKaBh+OFe+xdl0dHF/tJdzPQM= +cloud.google.com/go/workflows v1.12.1/go.mod h1:5A95OhD/edtOhQd/O741NSfIMezNTbCwLM1P1tBRGHM= +cloud.google.com/go/workflows v1.12.2/go.mod h1:+OmBIgNqYJPVggnMo9nqmizW0qEXHhmnAzK/CnBqsHc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= @@ -762,8 +1069,9 @@ github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/creack/pty v1.1.9/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= @@ -819,6 +1127,7 @@ github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGw github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -872,6 +1181,7 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8 github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -896,14 +1206,18 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -918,6 +1232,7 @@ github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38 github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -986,11 +1301,10 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= -github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173635-6e2e6c17d8b1/go.mod h1:31dWC2jAXPNrvrTlqOkByvdVbNxQIGrbVaWRAH9+UYg= -github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317 h1:NjwGufblDsTKTTtWt9pwiAHvU07KQ0QFIaJfJsXnpbg= -github.com/sensu/core/v2 v2.20.0-alpha2.0.20231026173741-00c14700f317/go.mod h1:31dWC2jAXPNrvrTlqOkByvdVbNxQIGrbVaWRAH9+UYg= -github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317 h1:9ikTRk1/DHpRJwCLrZt1qnnpi8geenzaliI9Nga1KqU= -github.com/sensu/core/v3 v3.9.0-alpha3.0.20231026173741-00c14700f317/go.mod h1:5zS1z8nqGy2FWZYIp3H8tHr5a1/nhT9iZUoUpfOwlY4= +github.com/sensu/core/v2 v2.20.0-alpha3 h1:lRdfPHZqBBJG9K4kJ9udA5kjblAgwmubpF+UMOidDPc= +github.com/sensu/core/v2 v2.20.0-alpha3/go.mod h1:fzr3qioLAHyLsBfq9I6ELVjL01NUNjqmQx4kj2tbDLo= +github.com/sensu/core/v3 v3.9.0-alpha4 h1:jLy1ZjUMUMlce2uSeoxKa4rmjlisela06AIHQw/g9ts= +github.com/sensu/core/v3 v3.9.0-alpha4/go.mod h1:n+s31i1W5lIJZH0Dfvq41R49LxYcTUANqQOerAZNEKw= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -1022,8 +1336,8 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -go.etcd.io/etcd/api/v3 v3.5.10-0.20231019092136-3521aaad9a05 h1:eGmulxTfbfBflZZ/zkelWngOCDv2U2fw/BfT5PxEGkE= -go.etcd.io/etcd/api/v3 v3.5.10-0.20231019092136-3521aaad9a05/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= +go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -1050,6 +1364,7 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1172,6 +1487,7 @@ golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1205,6 +1521,7 @@ golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1305,6 +1622,7 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1319,6 +1637,7 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1338,6 +1657,7 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1490,6 +1810,8 @@ google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZ google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= +google.golang.org/api v0.139.0/go.mod h1:CVagp6Eekz9CjGZ718Z+sloknzkDJE7Vc1Ckj9+viBk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1631,29 +1953,59 @@ google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= +google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto v0.0.0-20230821184602-ccc8af3d0e93/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:CCviP9RmpZ1mxVr8MUjCnSiY09IbAXZxhLE6EhHIdPU= +google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= +google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= +google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U= +google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= +google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 h1:HJMDndgxest5n2y77fnErkM62iUsptE/H8p0dC2Huo4= +google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405/go.mod h1:oT32Z4o8Zv2xPQTg0pbVaPr0MPOH6f14RgXt7zfIpwg= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920183334-c177e329c48b/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1696,9 +2048,13 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1729,7 +2085,6 @@ gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From 65bc4bf80b38c33ba219bf1dbab73f1232976217 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Tue, 31 Oct 2023 10:55:02 -0700 Subject: [PATCH 131/173] bump types to v0.9.1-alpha3 Signed-off-by: Justin Kolberg --- go.mod | 2 +- go.sum | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 4e509fface..34396cd267 100644 --- a/go.mod +++ b/go.mod @@ -87,7 +87,7 @@ require ( github.com/sensu/core/v2 v2.20.0-alpha3 github.com/sensu/core/v3 v3.9.0-alpha4 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 - github.com/sensu/sensu-go/types v0.12.0-alpha6 + github.com/sensu/sensu-go/types v0.9.1-alpha3 github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect diff --git a/go.sum b/go.sum index 73e4a4df70..8beeb9baa7 100644 --- a/go.sum +++ b/go.sum @@ -1623,19 +1623,16 @@ github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= -github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= github.com/sensu/core/v2 v2.20.0-alpha3 h1:lRdfPHZqBBJG9K4kJ9udA5kjblAgwmubpF+UMOidDPc= github.com/sensu/core/v2 v2.20.0-alpha3/go.mod h1:fzr3qioLAHyLsBfq9I6ELVjL01NUNjqmQx4kj2tbDLo= -github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= github.com/sensu/core/v3 v3.9.0-alpha4 h1:jLy1ZjUMUMlce2uSeoxKa4rmjlisela06AIHQw/g9ts= github.com/sensu/core/v3 v3.9.0-alpha4/go.mod h1:n+s31i1W5lIJZH0Dfvq41R49LxYcTUANqQOerAZNEKw= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= -github.com/sensu/sensu-go/types v0.12.0-alpha6 h1:tPuPysl6Ew0x0u5USLeSk/3NMMt7GLJh2uO1kVFRwQY= -github.com/sensu/sensu-go/types v0.12.0-alpha6/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= +github.com/sensu/sensu-go/types v0.9.1-alpha3 h1:45X04ldGFam98hnSJH0LxU7DBSL2lMWfn2BEXNQ8Z2Y= +github.com/sensu/sensu-go/types v0.9.1-alpha3/go.mod h1:dRXJYjmo+iERzGkiyYKg495tCEC36yoColAKG8mlchA= github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -1644,7 +1641,6 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= @@ -1727,7 +1723,6 @@ github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaD go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= From b82c83a5428148d1798e836f69cbf1d960b76d04 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Fri, 10 Nov 2023 11:56:46 -0800 Subject: [PATCH 132/173] Revert "bump types to v0.9.1-alpha3" This reverts commit 1905d8301af507edbd09243cdd94c3b1f57a7e92. Signed-off-by: Christian Kruse --- go.mod | 2 +- go.sum | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 34396cd267..4e509fface 100644 --- a/go.mod +++ b/go.mod @@ -87,7 +87,7 @@ require ( github.com/sensu/core/v2 v2.20.0-alpha3 github.com/sensu/core/v3 v3.9.0-alpha4 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 - github.com/sensu/sensu-go/types v0.9.1-alpha3 + github.com/sensu/sensu-go/types v0.12.0-alpha6 github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect diff --git a/go.sum b/go.sum index 8beeb9baa7..73e4a4df70 100644 --- a/go.sum +++ b/go.sum @@ -1623,16 +1623,19 @@ github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= +github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= github.com/sensu/core/v2 v2.20.0-alpha3 h1:lRdfPHZqBBJG9K4kJ9udA5kjblAgwmubpF+UMOidDPc= github.com/sensu/core/v2 v2.20.0-alpha3/go.mod h1:fzr3qioLAHyLsBfq9I6ELVjL01NUNjqmQx4kj2tbDLo= +github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= github.com/sensu/core/v3 v3.9.0-alpha4 h1:jLy1ZjUMUMlce2uSeoxKa4rmjlisela06AIHQw/g9ts= github.com/sensu/core/v3 v3.9.0-alpha4/go.mod h1:n+s31i1W5lIJZH0Dfvq41R49LxYcTUANqQOerAZNEKw= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= -github.com/sensu/sensu-go/types v0.9.1-alpha3 h1:45X04ldGFam98hnSJH0LxU7DBSL2lMWfn2BEXNQ8Z2Y= -github.com/sensu/sensu-go/types v0.9.1-alpha3/go.mod h1:dRXJYjmo+iERzGkiyYKg495tCEC36yoColAKG8mlchA= +github.com/sensu/sensu-go/types v0.12.0-alpha6 h1:tPuPysl6Ew0x0u5USLeSk/3NMMt7GLJh2uO1kVFRwQY= +github.com/sensu/sensu-go/types v0.12.0-alpha6/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -1641,6 +1644,7 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= @@ -1723,6 +1727,7 @@ github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaD go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= From bb168efca07939f8bfd28f948ad7f799cb81f0aa Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Fri, 10 Nov 2023 11:52:18 -0800 Subject: [PATCH 133/173] Lift corev2 resources in types.Wrapper Signed-off-by: Christian Kruse --- types/wrapper.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/types/wrapper.go b/types/wrapper.go index f3d2aa07b9..e88c8cf56f 100644 --- a/types/wrapper.go +++ b/types/wrapper.go @@ -69,6 +69,10 @@ type lifter interface { Lift() corev3Resource } +type lifterV2 interface { + Lift() corev2.Resource +} + // toMap produces a map from a struct by serializing it to JSON and then // deserializing the JSON into a map. This is done to preserve business logic // expressed in customer marshalers, and JSON struct tag semantics. @@ -237,6 +241,8 @@ V3RESOURCE: // providers. if lifter, ok := resource.(lifter); ok { resource = lifter.Lift() + } else if lifter, ok := resource.(lifterV2); ok { + resource = lifter.Lift() } // Set the resource as the wrapper's value From a3362151ad897e151f47d1bf765fc792ad3ada9a Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Fri, 10 Nov 2023 11:59:37 -0800 Subject: [PATCH 134/173] bump types to dev version Signed-off-by: Christian Kruse --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 4e509fface..7e7f146046 100644 --- a/go.mod +++ b/go.mod @@ -87,7 +87,7 @@ require ( github.com/sensu/core/v2 v2.20.0-alpha3 github.com/sensu/core/v3 v3.9.0-alpha4 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 - github.com/sensu/sensu-go/types v0.12.0-alpha6 + github.com/sensu/sensu-go/types v0.12.0-alpha9.0.20231110195803-ecfe0db936ab github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect diff --git a/go.sum b/go.sum index 73e4a4df70..d3e81b820a 100644 --- a/go.sum +++ b/go.sum @@ -1636,6 +1636,8 @@ github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiT github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= github.com/sensu/sensu-go/types v0.12.0-alpha6 h1:tPuPysl6Ew0x0u5USLeSk/3NMMt7GLJh2uO1kVFRwQY= github.com/sensu/sensu-go/types v0.12.0-alpha6/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= +github.com/sensu/sensu-go/types v0.12.0-alpha9.0.20231110195803-ecfe0db936ab h1:KxCYKkQ5YdheXcwvVCLkIKnYcyoauBVnJF6ep+y+Qm8= +github.com/sensu/sensu-go/types v0.12.0-alpha9.0.20231110195803-ecfe0db936ab/go.mod h1:dRXJYjmo+iERzGkiyYKg495tCEC36yoColAKG8mlchA= github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= From fb013e3a47e523be6c72db007c2e6c4645de79ad Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 20 Nov 2023 15:00:20 -0800 Subject: [PATCH 135/173] go mod tidy Signed-off-by: Justin Kolberg --- go.sum | 7 ------- 1 file changed, 7 deletions(-) diff --git a/go.sum b/go.sum index d3e81b820a..ed77fc9db4 100644 --- a/go.sum +++ b/go.sum @@ -1623,19 +1623,14 @@ github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= -github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= github.com/sensu/core/v2 v2.20.0-alpha3 h1:lRdfPHZqBBJG9K4kJ9udA5kjblAgwmubpF+UMOidDPc= github.com/sensu/core/v2 v2.20.0-alpha3/go.mod h1:fzr3qioLAHyLsBfq9I6ELVjL01NUNjqmQx4kj2tbDLo= -github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= github.com/sensu/core/v3 v3.9.0-alpha4 h1:jLy1ZjUMUMlce2uSeoxKa4rmjlisela06AIHQw/g9ts= github.com/sensu/core/v3 v3.9.0-alpha4/go.mod h1:n+s31i1W5lIJZH0Dfvq41R49LxYcTUANqQOerAZNEKw= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= -github.com/sensu/sensu-go/types v0.12.0-alpha6 h1:tPuPysl6Ew0x0u5USLeSk/3NMMt7GLJh2uO1kVFRwQY= -github.com/sensu/sensu-go/types v0.12.0-alpha6/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= github.com/sensu/sensu-go/types v0.12.0-alpha9.0.20231110195803-ecfe0db936ab h1:KxCYKkQ5YdheXcwvVCLkIKnYcyoauBVnJF6ep+y+Qm8= github.com/sensu/sensu-go/types v0.12.0-alpha9.0.20231110195803-ecfe0db936ab/go.mod h1:dRXJYjmo+iERzGkiyYKg495tCEC36yoColAKG8mlchA= github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= @@ -1646,7 +1641,6 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= @@ -1729,7 +1723,6 @@ github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaD go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= From 7190d45def938012238dc1717749280827b7428d Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 20 Nov 2023 22:24:04 -0800 Subject: [PATCH 136/173] bump verison of Go for staticcheck ci job Signed-off-by: Justin Kolberg --- .github/workflows/static-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static-check.yml b/.github/workflows/static-check.yml index ad1d6bdcd9..d008bcbf8c 100644 --- a/.github/workflows/static-check.yml +++ b/.github/workflows/static-check.yml @@ -20,4 +20,4 @@ jobs: with: version: "2021.1.1" env: - GO_VERSION: 1.17.1 + GO_VERSION: 1.21.3 From 72648af990ef19ff294bf69eb761a6d4335685fd Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 20 Nov 2023 22:28:32 -0800 Subject: [PATCH 137/173] set minimum go verison for staticcheck Signed-off-by: Justin Kolberg --- .github/workflows/static-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/static-check.yml b/.github/workflows/static-check.yml index d008bcbf8c..8aa2b4a15c 100644 --- a/.github/workflows/static-check.yml +++ b/.github/workflows/static-check.yml @@ -19,5 +19,6 @@ jobs: - uses: dominikh/staticcheck-action@v1.0.0 with: version: "2021.1.1" + min-go-version: 1.21.3 env: GO_VERSION: 1.21.3 From 0b279fb5384466177dd06690cd5aa67eb34b3f8e Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 20 Nov 2023 22:35:48 -0800 Subject: [PATCH 138/173] install specific version of Go with staticcheck Signed-off-by: Justin Kolberg --- .github/workflows/static-check.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/static-check.yml b/.github/workflows/static-check.yml index 8aa2b4a15c..2cbecd7e15 100644 --- a/.github/workflows/static-check.yml +++ b/.github/workflows/static-check.yml @@ -13,12 +13,16 @@ jobs: name: staticcheck (project) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: fetch-depth: 1 + - uses: WillAbides/setup-go-faster@v1.8.0 + with: + go-version: "1.21.x" - uses: dominikh/staticcheck-action@v1.0.0 with: version: "2021.1.1" - min-go-version: 1.21.3 + install-go: false + cache-key: "1.21.x" env: GO_VERSION: 1.21.3 From 415dadb4040a340c3f539d7e3773b1c13edb2a73 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 20 Nov 2023 22:40:03 -0800 Subject: [PATCH 139/173] bump staticcheck version to 2023.1.6 Signed-off-by: Justin Kolberg --- .github/workflows/static-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static-check.yml b/.github/workflows/static-check.yml index 2cbecd7e15..e76f55aa5a 100644 --- a/.github/workflows/static-check.yml +++ b/.github/workflows/static-check.yml @@ -21,7 +21,7 @@ jobs: go-version: "1.21.x" - uses: dominikh/staticcheck-action@v1.0.0 with: - version: "2021.1.1" + version: "2023.1.6" install-go: false cache-key: "1.21.x" env: From b2ffa3cafffe6bdc202b8ad88f0a08761286b216 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Mon, 20 Nov 2023 23:57:59 -0800 Subject: [PATCH 140/173] fix issues staticcheck detected Signed-off-by: Justin Kolberg --- agent/check_handler.go | 4 +--- backend/messaging/wizard_bus_test.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/agent/check_handler.go b/agent/check_handler.go index 03c49a66af..e9677beb2f 100644 --- a/agent/check_handler.go +++ b/agent/check_handler.go @@ -11,8 +11,8 @@ import ( "time" "github.com/google/uuid" - "github.com/sensu/sensu-go/agent/transformers" corev2 "github.com/sensu/core/v2" + "github.com/sensu/sensu-go/agent/transformers" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/token" @@ -48,8 +48,6 @@ func (a *Agent) handleCheck(ctx context.Context, payload []byte) error { request := &corev2.CheckRequest{} if err := a.unmarshal(payload, request); err != nil { return err - } else if request == nil { - return errors.New("given check configuration appears invalid") } checkConfig := request.Config diff --git a/backend/messaging/wizard_bus_test.go b/backend/messaging/wizard_bus_test.go index 25d362e21c..f800e1fa05 100644 --- a/backend/messaging/wizard_bus_test.go +++ b/backend/messaging/wizard_bus_test.go @@ -127,7 +127,7 @@ func TestBug1407(t *testing.T) { subscription, err := bus.Subscribe("topic", "a", subscriber) require.NoError(t, err) require.NoError(t, subscription.Cancel()) - subscription, err = bus.Subscribe("topic", "a", subscriber) + _, err = bus.Subscribe("topic", "a", subscriber) require.NoError(t, err) value, _ := bus.topics.Load("topic") topic := value.(*wizardTopic) From 8034d5167e9d9a74b2399b55e2d0e6d605090204 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Tue, 21 Nov 2023 01:15:44 -0800 Subject: [PATCH 141/173] bump go version for appveyor Signed-off-by: Justin Kolberg --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 852cd9f896..426a0c787d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -16,7 +16,7 @@ cache: environment: GOPATH: c:\gopath GOROOT: c:\Program Files\Go - GOVERSION: 1.17.12 + GOVERSION: 1.21.3 GO111MODULE: 'on' GOPROXY: 'https://proxy.golang.org' From 7b15de1a3446bd40b3382ad737ddd8a731a3526c Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Tue, 21 Nov 2023 11:24:07 -0800 Subject: [PATCH 142/173] bump core/v2 & core/v3 modules in types Signed-off-by: Justin Kolberg --- types/go.mod | 4 ++-- types/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/types/go.mod b/types/go.mod index 9a4626212c..16a4476a7c 100644 --- a/types/go.mod +++ b/types/go.mod @@ -4,8 +4,8 @@ go 1.16 require ( github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 - github.com/sensu/core/v2 v2.20.0-alpha3 - github.com/sensu/core/v3 v3.9.0-alpha4 + github.com/sensu/core/v2 v2.20.0 + github.com/sensu/core/v3 v3.9.0 github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 github.com/stretchr/testify v1.8.3 ) diff --git a/types/go.sum b/types/go.sum index 07f7fc1837..b0f348b3e0 100644 --- a/types/go.sum +++ b/types/go.sum @@ -1301,10 +1301,10 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= -github.com/sensu/core/v2 v2.20.0-alpha3 h1:lRdfPHZqBBJG9K4kJ9udA5kjblAgwmubpF+UMOidDPc= -github.com/sensu/core/v2 v2.20.0-alpha3/go.mod h1:fzr3qioLAHyLsBfq9I6ELVjL01NUNjqmQx4kj2tbDLo= -github.com/sensu/core/v3 v3.9.0-alpha4 h1:jLy1ZjUMUMlce2uSeoxKa4rmjlisela06AIHQw/g9ts= -github.com/sensu/core/v3 v3.9.0-alpha4/go.mod h1:n+s31i1W5lIJZH0Dfvq41R49LxYcTUANqQOerAZNEKw= +github.com/sensu/core/v2 v2.20.0 h1:QJQbqZiXSQ2dUE8LUvwUcKaqxHjYYCQwJ1Mil0cap4U= +github.com/sensu/core/v2 v2.20.0/go.mod h1:fzr3qioLAHyLsBfq9I6ELVjL01NUNjqmQx4kj2tbDLo= +github.com/sensu/core/v3 v3.9.0 h1:7wz4ILGwPbHHTT/8sKTtflBAgOuJgTaKhUlN4lyUdSY= +github.com/sensu/core/v3 v3.9.0/go.mod h1:AuupbIzmjYdzEkaEdmpzP/ZgrqQgHTovXVejzyTN6u4= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= From 4731b2b349089f4eabe4c242aecd452abb942515 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Tue, 21 Nov 2023 11:35:49 -0800 Subject: [PATCH 143/173] use types@v0.13.0 Signed-off-by: Justin Kolberg --- go.mod | 21 ++++--- go.sum | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 179 insertions(+), 30 deletions(-) diff --git a/go.mod b/go.mod index 7e7f146046..59c5fe480d 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/protobuf v1.5.3 github.com/golang/snappy v0.0.4 - github.com/google/uuid v1.3.1 + github.com/google/uuid v1.4.0 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c @@ -43,7 +43,7 @@ require ( github.com/prometheus/client_golang v1.17.0 github.com/prometheus/client_model v0.5.0 github.com/prometheus/common v0.45.0 - github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 + github.com/robertkrimen/otto v0.2.1 github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 github.com/shirou/gopsutil/v3 v3.23.2 @@ -61,10 +61,10 @@ require ( go.etcd.io/etcd/server/v3 v3.5.10 go.uber.org/atomic v1.11.0 go.uber.org/zap v1.26.0 - golang.org/x/crypto v0.14.0 + golang.org/x/crypto v0.15.0 golang.org/x/mod v0.11.0 - golang.org/x/net v0.17.0 - golang.org/x/sys v0.13.0 + golang.org/x/net v0.18.0 + golang.org/x/sys v0.14.0 golang.org/x/time v0.3.0 golang.org/x/tools v0.10.0 google.golang.org/grpc v1.59.0 @@ -84,15 +84,18 @@ require ( github.com/jonboulle/clockwork v0.4.0 // indirect github.com/kr/pty v1.1.8 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/sensu/core/v2 v2.20.0-alpha3 - github.com/sensu/core/v3 v3.9.0-alpha4 - github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 - github.com/sensu/sensu-go/types v0.12.0-alpha9.0.20231110195803-ecfe0db936ab + github.com/sensu/core/v2 v2.20.0 + github.com/sensu/core/v3 v3.9.0 + github.com/sensu/sensu-api-tools v0.2.1 + github.com/sensu/sensu-go/types v0.13.0 github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect go.uber.org/multierr v1.11.0 // indirect + google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index ed77fc9db4..b25a55b1cf 100644 --- a/go.sum +++ b/go.sum @@ -41,14 +41,16 @@ cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5x cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= -cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= +cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= +cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= cloud.google.com/go/accessapproval v1.7.2/go.mod h1:/gShiq9/kK/h8T/eEn1BTzalDvk0mZxJlhfw0p+Xuc0= cloud.google.com/go/accessapproval v1.7.3/go.mod h1:4l8+pwIxGTNqSf4T3ds8nLO94NQf0W/KnMNuQ9PbnP8= +cloud.google.com/go/accessapproval v1.7.4/go.mod h1:/aTEh45LzplQgFYdQdwPMR9YdX0UlhBmvB84uAmQKUc= cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= @@ -57,6 +59,7 @@ cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= cloud.google.com/go/accesscontextmanager v1.8.2/go.mod h1:E6/SCRM30elQJ2PKtFMs2YhfJpZSNcJyejhuzoId4Zk= cloud.google.com/go/accesscontextmanager v1.8.3/go.mod h1:4i/JkF2JiFbhLnnpnfoTX5vRXfhf9ukhU1ANOTALTOQ= +cloud.google.com/go/accesscontextmanager v1.8.4/go.mod h1:ParU+WbMpD34s5JFEnGAnPBYAgUHozaTmDJU7aCU9+M= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= @@ -69,6 +72,8 @@ cloud.google.com/go/aiplatform v1.50.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP cloud.google.com/go/aiplatform v1.51.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= cloud.google.com/go/aiplatform v1.51.1/go.mod h1:kY3nIMAVQOK2XDqDPHaOuD9e+FdMA6OOpfBjsvaFSOo= cloud.google.com/go/aiplatform v1.51.2/go.mod h1:hCqVYB3mY45w99TmetEoe8eCQEwZEp9WHxeZdcv9phw= +cloud.google.com/go/aiplatform v1.52.0/go.mod h1:pwZMGvqe0JRkI1GWSZCtnAfrR4K1bv65IHILGA//VEU= +cloud.google.com/go/aiplatform v1.54.0/go.mod h1:pwZMGvqe0JRkI1GWSZCtnAfrR4K1bv65IHILGA//VEU= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= @@ -78,24 +83,28 @@ cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= cloud.google.com/go/analytics v0.21.4/go.mod h1:zZgNCxLCy8b2rKKVfC1YkC2vTrpfZmeRCySM3aUbskA= cloud.google.com/go/analytics v0.21.5/go.mod h1:BQtOBHWTlJ96axpPPnw5CvGJ6i3Ve/qX2fTxR8qWyr8= +cloud.google.com/go/analytics v0.21.6/go.mod h1:eiROFQKosh4hMaNhF85Oc9WO97Cpa7RggD40e/RBy8w= cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= cloud.google.com/go/apigateway v1.6.2/go.mod h1:CwMC90nnZElorCW63P2pAYm25AtQrHfuOkbRSHj0bT8= cloud.google.com/go/apigateway v1.6.3/go.mod h1:k68PXWpEs6BVDTtnLQAyG606Q3mz8pshItwPXjgv44Y= +cloud.google.com/go/apigateway v1.6.4/go.mod h1:0EpJlVGH5HwAN4VF4Iec8TAzGN1aQgbxAWGJsnPCGGY= cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= cloud.google.com/go/apigeeconnect v1.6.2/go.mod h1:s6O0CgXT9RgAxlq3DLXvG8riw8PYYbU/v25jqP3Dy18= cloud.google.com/go/apigeeconnect v1.6.3/go.mod h1:peG0HFQ0si2bN15M6QSjEW/W7Gy3NYkWGz7pFz13cbo= +cloud.google.com/go/apigeeconnect v1.6.4/go.mod h1:CapQCWZ8TCjnU0d7PobxhpOdVz/OVJ2Hr/Zcuu1xFx0= cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= cloud.google.com/go/apigeeregistry v0.7.2/go.mod h1:9CA2B2+TGsPKtfi3F7/1ncCCsL62NXBRfM6iPoGSM+8= cloud.google.com/go/apigeeregistry v0.8.1/go.mod h1:MW4ig1N4JZQsXmBSwH4rwpgDonocz7FPBSw6XPGHmYw= +cloud.google.com/go/apigeeregistry v0.8.2/go.mod h1:h4v11TDGdeXJDJvImtgK2AFVvMIgGWjSb0HRnBSjcX8= cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= @@ -107,6 +116,7 @@ cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45n cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= cloud.google.com/go/appengine v1.8.2/go.mod h1:WMeJV9oZ51pvclqFN2PqHoGnys7rK0rz6s3Mp6yMvDo= cloud.google.com/go/appengine v1.8.3/go.mod h1:2oUPZ1LVZ5EXi+AF1ihNAF+S8JrzQ3till5m9VQkrsk= +cloud.google.com/go/appengine v1.8.4/go.mod h1:TZ24v+wXBujtkK77CXCpjZbnuTvsFNT41MUaZ28D6vg= cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= @@ -114,6 +124,7 @@ cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1N cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= cloud.google.com/go/area120 v0.8.2/go.mod h1:a5qfo+x77SRLXnCynFWPUZhnZGeSgvQ+Y0v1kSItkh4= cloud.google.com/go/area120 v0.8.3/go.mod h1:5zj6pMzVTH+SVHljdSKC35sriR/CVvQZzG/Icdyriw0= +cloud.google.com/go/area120 v0.8.4/go.mod h1:jfawXjxf29wyBXr48+W+GyX/f8fflxp642D/bb9v68M= cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= @@ -126,6 +137,7 @@ cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346 cloud.google.com/go/artifactregistry v1.14.2/go.mod h1:Xk+QbsKEb0ElmyeMfdHAey41B+qBq3q5R5f5xD4XT3U= cloud.google.com/go/artifactregistry v1.14.3/go.mod h1:A2/E9GXnsyXl7GUvQ/2CjHA+mVRoWAXC0brg2os+kNI= cloud.google.com/go/artifactregistry v1.14.4/go.mod h1:SJJcZTMv6ce0LDMUnihCN7WSrI+kBSFV0KIKo8S8aYU= +cloud.google.com/go/artifactregistry v1.14.6/go.mod h1:np9LSFotNWHcjnOgh8UVK0RFPCTUGbO0ve3384xyHfE= cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= @@ -138,6 +150,7 @@ cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi0 cloud.google.com/go/asset v1.15.0/go.mod h1:tpKafV6mEut3+vN9ScGvCHXHj7FALFVta+okxFECHcg= cloud.google.com/go/asset v1.15.1/go.mod h1:yX/amTvFWRpp5rcFq6XbCxzKT8RJUam1UoboE179jU4= cloud.google.com/go/asset v1.15.2/go.mod h1:B6H5tclkXvXz7PD22qCA2TDxSVQfasa3iDlM89O2NXs= +cloud.google.com/go/asset v1.15.3/go.mod h1:yYLfUD4wL4X589A9tYrv4rFrba0QlDeag0CMcM5ggXU= cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= @@ -147,6 +160,7 @@ cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJ cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= cloud.google.com/go/assuredworkloads v1.11.2/go.mod h1:O1dfr+oZJMlE6mw0Bp0P1KZSlj5SghMBvTpZqIcUAW4= cloud.google.com/go/assuredworkloads v1.11.3/go.mod h1:vEjfTKYyRUaIeA0bsGJceFV2JKpVRgyG2op3jfa59Zs= +cloud.google.com/go/assuredworkloads v1.11.4/go.mod h1:4pwwGNwy1RP0m+y12ef3Q/8PaiWrIDQ6nD2E8kvWI9U= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= @@ -155,6 +169,7 @@ cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfG cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= cloud.google.com/go/automl v1.13.2/go.mod h1:gNY/fUmDEN40sP8amAX3MaXkxcqPIn7F1UIIPZpy4Mg= cloud.google.com/go/automl v1.13.3/go.mod h1:Y8KwvyAZFOsMAPqUCfNu1AyclbC6ivCUF/MTwORymyY= +cloud.google.com/go/automl v1.13.4/go.mod h1:ULqwX/OLZ4hBVfKQaMtxMSTlPx0GqGbWN8uA/1EqCP8= cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= @@ -162,6 +177,7 @@ cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZ cloud.google.com/go/baremetalsolution v1.2.0/go.mod h1:68wi9AwPYkEWIUT4SvSGS9UJwKzNpshjHsH4lzk8iOw= cloud.google.com/go/baremetalsolution v1.2.1/go.mod h1:3qKpKIw12RPXStwQXcbhfxVj1dqQGEvcmA+SX/mUR88= cloud.google.com/go/baremetalsolution v1.2.2/go.mod h1:O5V6Uu1vzVelYahKfwEWRMaS3AbCkeYHy3145s1FkhM= +cloud.google.com/go/baremetalsolution v1.2.3/go.mod h1:/UAQ5xG3faDdy180rCUv47e0jvpp3BFxT+Cl0PFjw5g= cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= @@ -170,6 +186,7 @@ cloud.google.com/go/batch v1.4.1/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mu cloud.google.com/go/batch v1.5.0/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= cloud.google.com/go/batch v1.5.1/go.mod h1:RpBuIYLkQu8+CWDk3dFD/t/jOCGuUpkpX+Y0n1Xccs8= cloud.google.com/go/batch v1.6.1/go.mod h1:urdpD13zPe6YOK+6iZs/8/x2VBRofvblLpx0t57vM98= +cloud.google.com/go/batch v1.6.3/go.mod h1:J64gD4vsNSA2O5TtDB5AAux3nJ9iV8U3ilg3JDBYejU= cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= @@ -178,6 +195,7 @@ cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/V cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= cloud.google.com/go/beyondcorp v1.0.1/go.mod h1:zl/rWWAFVeV+kx+X2Javly7o1EIQThU4WlkynffL/lk= cloud.google.com/go/beyondcorp v1.0.2/go.mod h1:m8cpG7caD+5su+1eZr+TSvF6r21NdLJk4f9u4SP2Ntc= +cloud.google.com/go/beyondcorp v1.0.3/go.mod h1:HcBvnEd7eYr+HGDd5ZbuVmBYX019C6CEXBonXbCVwJo= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -195,6 +213,7 @@ cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6Pm cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= cloud.google.com/go/bigquery v1.55.0/go.mod h1:9Y5I3PN9kQWuid6183JFhOGOW3GcirA5LpsKCUn+2ec= cloud.google.com/go/bigquery v1.56.0/go.mod h1:KDcsploXTEY7XT3fDQzMUZlpQLHzE4itubHrnmhUrZA= +cloud.google.com/go/bigquery v1.57.1/go.mod h1:iYzC0tGVWt1jqSzBHqCr3lrRn0u13E8e+AqowBsDgug= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= @@ -206,6 +225,7 @@ cloud.google.com/go/billing v1.17.0/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlp cloud.google.com/go/billing v1.17.1/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= cloud.google.com/go/billing v1.17.2/go.mod h1:u/AdV/3wr3xoRBk5xvUzYMS1IawOAPwQMuHgHMdljDg= cloud.google.com/go/billing v1.17.3/go.mod h1:z83AkoZ7mZwBGT3yTnt6rSGI1OOsHSIi6a5M3mJ8NaU= +cloud.google.com/go/billing v1.17.4/go.mod h1:5DOYQStCxquGprqfuid/7haD7th74kyMBHkjO/OvDtk= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= @@ -215,12 +235,14 @@ cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxi cloud.google.com/go/binaryauthorization v1.7.0/go.mod h1:Zn+S6QqTMn6odcMU1zDZCJxPjU2tZPV1oDl45lWY154= cloud.google.com/go/binaryauthorization v1.7.1/go.mod h1:GTAyfRWYgcbsP3NJogpV3yeunbUIjx2T9xVeYovtURE= cloud.google.com/go/binaryauthorization v1.7.2/go.mod h1:kFK5fQtxEp97m92ziy+hbu+uKocka1qRRL8MVJIgjv0= +cloud.google.com/go/binaryauthorization v1.7.3/go.mod h1:VQ/nUGRKhrStlGr+8GMS8f6/vznYLkdK5vaKfdCIpvU= cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= cloud.google.com/go/certificatemanager v1.7.2/go.mod h1:15SYTDQMd00kdoW0+XY5d9e+JbOPjp24AvF48D8BbcQ= cloud.google.com/go/certificatemanager v1.7.3/go.mod h1:T/sZYuC30PTag0TLo28VedIRIj1KPGcOQzjWAptHa00= +cloud.google.com/go/certificatemanager v1.7.4/go.mod h1:FHAylPe/6IIKuaRmHbjbdLhGhVQ+CWHSD5Jq0k4+cCE= cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= @@ -229,6 +251,7 @@ cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeH cloud.google.com/go/channel v1.17.0/go.mod h1:RpbhJsGi/lXWAUM1eF4IbQGbsfVlg2o8Iiy2/YLfVT0= cloud.google.com/go/channel v1.17.1/go.mod h1:xqfzcOZAcP4b/hUDH0GkGg1Sd5to6di1HOJn/pi5uBQ= cloud.google.com/go/channel v1.17.2/go.mod h1:aT2LhnftnyfQceFql5I/mP8mIbiiJS4lWqgXA815zMk= +cloud.google.com/go/channel v1.17.3/go.mod h1:QcEBuZLGGrUMm7kNj9IbU1ZfmJq2apotsV83hbxX7eE= cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= @@ -239,6 +262,8 @@ cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2 cloud.google.com/go/cloudbuild v1.14.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= cloud.google.com/go/cloudbuild v1.14.1/go.mod h1:K7wGc/3zfvmYWOWwYTgF/d/UVJhS4pu+HAy7PL7mCsU= cloud.google.com/go/cloudbuild v1.14.2/go.mod h1:Bn6RO0mBYk8Vlrt+8NLrru7WXlQ9/RDWz2uo5KG1/sg= +cloud.google.com/go/cloudbuild v1.14.3/go.mod h1:eIXYWmRt3UtggLnFGx4JvXcMj4kShhVzGndL1LwleEM= +cloud.google.com/go/cloudbuild v1.15.0/go.mod h1:eIXYWmRt3UtggLnFGx4JvXcMj4kShhVzGndL1LwleEM= cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= @@ -246,6 +271,7 @@ cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+Pl cloud.google.com/go/clouddms v1.7.0/go.mod h1:MW1dC6SOtI/tPNCciTsXtsGNEM0i0OccykPvv3hiYeM= cloud.google.com/go/clouddms v1.7.1/go.mod h1:o4SR8U95+P7gZ/TX+YbJxehOCsM+fe6/brlrFquiszk= cloud.google.com/go/clouddms v1.7.2/go.mod h1:Rk32TmWmHo64XqDvW7jgkFQet1tUKNVzs7oajtJT3jU= +cloud.google.com/go/clouddms v1.7.3/go.mod h1:fkN2HQQNUYInAU3NQ3vRLkV2iWs8lIdmBKOx4nrL6Hc= cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= @@ -256,6 +282,7 @@ cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8o cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= cloud.google.com/go/cloudtasks v1.12.2/go.mod h1:A7nYkjNlW2gUoROg1kvJrQGhJP/38UaWwsnuBDOBVUk= cloud.google.com/go/cloudtasks v1.12.3/go.mod h1:GPVXhIOSGEaR+3xT4Fp72ScI+HjHffSS4B8+BaBB5Ys= +cloud.google.com/go/cloudtasks v1.12.4/go.mod h1:BEPu0Gtt2dU6FxZHNqqNdGqIG86qyWKBPGnsb7udGY0= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= @@ -276,8 +303,9 @@ cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdi cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= -cloud.google.com/go/compute v1.23.2 h1:nWEMDhgbBkBJjfpVySqU4jgWdc22PLR0o4vEexZHers= cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= @@ -291,6 +319,8 @@ cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9o cloud.google.com/go/contactcenterinsights v1.11.0/go.mod h1:hutBdImE4XNZ1NV4vbPJKSFOnQruhC5Lj9bZqWMTKiU= cloud.google.com/go/contactcenterinsights v1.11.1/go.mod h1:FeNP3Kg8iteKM80lMwSk3zZZKVxr+PGnAId6soKuXwE= cloud.google.com/go/contactcenterinsights v1.11.2/go.mod h1:A9PIR5ov5cRcd28KlDbmmXE8Aay+Gccer2h4wzkYFso= +cloud.google.com/go/contactcenterinsights v1.11.3/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= +cloud.google.com/go/contactcenterinsights v1.12.0/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= @@ -301,6 +331,8 @@ cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq cloud.google.com/go/container v1.26.0/go.mod h1:YJCmRet6+6jnYYRS000T6k0D0xUXQgBSaJ7VwI8FBj4= cloud.google.com/go/container v1.26.1/go.mod h1:5smONjPRUxeEpDG7bMKWfDL4sauswqEtnBK1/KKpR04= cloud.google.com/go/container v1.26.2/go.mod h1:YlO84xCt5xupVbLaMY4s3XNE79MUJ+49VmkInr6HvF4= +cloud.google.com/go/container v1.27.1/go.mod h1:b1A1gJeTBXVLQ6GGw9/9M4FG94BEGsqJ5+t4d/3N7O4= +cloud.google.com/go/container v1.28.0/go.mod h1:b1A1gJeTBXVLQ6GGw9/9M4FG94BEGsqJ5+t4d/3N7O4= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= @@ -309,6 +341,7 @@ cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMN cloud.google.com/go/containeranalysis v0.11.0/go.mod h1:4n2e99ZwpGxpNcz+YsFT1dfOHPQFGcAC8FN2M2/ne/U= cloud.google.com/go/containeranalysis v0.11.1/go.mod h1:rYlUOM7nem1OJMKwE1SadufX0JP3wnXj844EtZAwWLY= cloud.google.com/go/containeranalysis v0.11.2/go.mod h1:xibioGBC1MD2j4reTyV1xY1/MvKaz+fyM9ENWhmIeP8= +cloud.google.com/go/containeranalysis v0.11.3/go.mod h1:kMeST7yWFQMGjiG9K7Eov+fPNQcGhb8mXj/UcTiWw9U= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= @@ -324,12 +357,15 @@ cloud.google.com/go/datacatalog v1.17.1/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/U cloud.google.com/go/datacatalog v1.18.0/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= cloud.google.com/go/datacatalog v1.18.1/go.mod h1:TzAWaz+ON1tkNr4MOcak8EBHX7wIRX/gZKM+yTVsv+A= cloud.google.com/go/datacatalog v1.18.2/go.mod h1:SPVgWW2WEMuWHA+fHodYjmxPiMqcOiWfhc9OD5msigk= +cloud.google.com/go/datacatalog v1.18.3/go.mod h1:5FR6ZIF8RZrtml0VUao22FxhdjkoG+a0866rEnObryM= +cloud.google.com/go/datacatalog v1.19.0/go.mod h1:5FR6ZIF8RZrtml0VUao22FxhdjkoG+a0866rEnObryM= cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= cloud.google.com/go/dataflow v0.9.2/go.mod h1:vBfdBZ/ejlTaYIGB3zB4T08UshH70vbtZeMD+urnUSo= cloud.google.com/go/dataflow v0.9.3/go.mod h1:HI4kMVjcHGTs3jTHW/kv3501YW+eloiJSLxkJa/vqFE= +cloud.google.com/go/dataflow v0.9.4/go.mod h1:4G8vAkHYCSzU8b/kmsoR2lWyHJD85oMJPHMtan40K8w= cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= @@ -338,18 +374,21 @@ cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2 cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= cloud.google.com/go/dataform v0.8.2/go.mod h1:X9RIqDs6NbGPLR80tnYoPNiO1w0wenKTb8PxxlhTMKM= cloud.google.com/go/dataform v0.8.3/go.mod h1:8nI/tvv5Fso0drO3pEjtowz58lodx8MVkdV2q0aPlqg= +cloud.google.com/go/dataform v0.9.1/go.mod h1:pWTg+zGQ7i16pyn0bS1ruqIE91SdL2FDMvEYu/8oQxs= cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= cloud.google.com/go/datafusion v1.7.2/go.mod h1:62K2NEC6DRlpNmI43WHMWf9Vg/YvN6QVi8EVwifElI0= cloud.google.com/go/datafusion v1.7.3/go.mod h1:eoLt1uFXKGBq48jy9LZ+Is8EAVLnmn50lNncLzwYokE= +cloud.google.com/go/datafusion v1.7.4/go.mod h1:BBs78WTOLYkT4GVZIXQCZT3GFpkpDN4aBY4NDX/jVlM= cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= cloud.google.com/go/datalabeling v0.8.2/go.mod h1:cyDvGHuJWu9U/cLDA7d8sb9a0tWLEletStu2sTmg3BE= cloud.google.com/go/datalabeling v0.8.3/go.mod h1:tvPhpGyS/V7lqjmb3V0TaDdGvhzgR1JoW7G2bpi2UTI= +cloud.google.com/go/datalabeling v0.8.4/go.mod h1:Z1z3E6LHtffBGrNUkKwbwbDxTiXEApLzIgmymj8A3S8= cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= @@ -359,6 +398,8 @@ cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MP cloud.google.com/go/dataplex v1.9.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= cloud.google.com/go/dataplex v1.10.1/go.mod h1:1MzmBv8FvjYfc7vDdxhnLFNskikkB+3vl475/XdCDhs= cloud.google.com/go/dataplex v1.10.2/go.mod h1:xdC8URdTrCrZMW6keY779ZT1cTOfV8KEPNsw+LTRT1Y= +cloud.google.com/go/dataplex v1.11.1/go.mod h1:mHJYQQ2VEJHsyoC0OdNyy988DvEbPhqFs5OOLffLX0c= +cloud.google.com/go/dataplex v1.11.2/go.mod h1:mHJYQQ2VEJHsyoC0OdNyy988DvEbPhqFs5OOLffLX0c= cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= @@ -366,12 +407,15 @@ cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcw cloud.google.com/go/dataproc/v2 v2.2.0/go.mod h1:lZR7AQtwZPvmINx5J87DSOOpTfof9LVZju6/Qo4lmcY= cloud.google.com/go/dataproc/v2 v2.2.1/go.mod h1:QdAJLaBjh+l4PVlVZcmrmhGccosY/omC1qwfQ61Zv/o= cloud.google.com/go/dataproc/v2 v2.2.2/go.mod h1:aocQywVmQVF4i8CL740rNI/ZRpsaaC1Wh2++BJ7HEJ4= +cloud.google.com/go/dataproc/v2 v2.2.3/go.mod h1:G5R6GBc9r36SXv/RtZIVfB8SipI+xVn0bX5SxUzVYbY= +cloud.google.com/go/dataproc/v2 v2.3.0/go.mod h1:G5R6GBc9r36SXv/RtZIVfB8SipI+xVn0bX5SxUzVYbY= cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= cloud.google.com/go/dataqna v0.8.2/go.mod h1:KNEqgx8TTmUipnQsScOoDpq/VlXVptUqVMZnt30WAPs= cloud.google.com/go/dataqna v0.8.3/go.mod h1:wXNBW2uvc9e7Gl5k8adyAMnLush1KVV6lZUhB+rqNu4= +cloud.google.com/go/dataqna v0.8.4/go.mod h1:mySRKjKg5Lz784P6sCov3p1QD+RZQONRMRjzGNcFd0c= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= @@ -391,6 +435,7 @@ cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZ cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= cloud.google.com/go/datastream v1.10.1/go.mod h1:7ngSYwnw95YFyTd5tOGBxHlOZiL+OtpjheqU7t2/s/c= cloud.google.com/go/datastream v1.10.2/go.mod h1:W42TFgKAs/om6x/CdXX5E4oiAsKlH+e8MTGy81zdYt0= +cloud.google.com/go/datastream v1.10.3/go.mod h1:YR0USzgjhqA/Id0Ycu1VvZe8hEWwrkjuXrGbzeDOSEA= cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= @@ -399,6 +444,8 @@ cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCN cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= cloud.google.com/go/deploy v1.13.1/go.mod h1:8jeadyLkH9qu9xgO3hVWw8jVr29N1mnW42gRJT8GY6g= cloud.google.com/go/deploy v1.14.1/go.mod h1:N8S0b+aIHSEeSr5ORVoC0+/mOPUysVt8ae4QkZYolAw= +cloud.google.com/go/deploy v1.14.2/go.mod h1:e5XOUI5D+YGldyLNZ21wbp9S8otJbBE4i88PtO9x/2g= +cloud.google.com/go/deploy v1.15.0/go.mod h1:e5XOUI5D+YGldyLNZ21wbp9S8otJbBE4i88PtO9x/2g= cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= @@ -413,12 +460,14 @@ cloud.google.com/go/dialogflow v1.43.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+ cloud.google.com/go/dialogflow v1.44.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= cloud.google.com/go/dialogflow v1.44.1/go.mod h1:n/h+/N2ouKOO+rbe/ZnI186xImpqvCVj2DdsWS/0EAk= cloud.google.com/go/dialogflow v1.44.2/go.mod h1:QzFYndeJhpVPElnFkUXxdlptx0wPnBWLCBT9BvtC3/c= +cloud.google.com/go/dialogflow v1.44.3/go.mod h1:mHly4vU7cPXVweuB5R0zsYKPMzy240aQdAu06SqBbAQ= cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= cloud.google.com/go/dlp v1.10.2/go.mod h1:ZbdKIhcnyhILgccwVDzkwqybthh7+MplGC3kZVZsIOQ= cloud.google.com/go/dlp v1.10.3/go.mod h1:iUaTc/ln8I+QT6Ai5vmuwfw8fqTk2kaz0FvCwhLCom0= +cloud.google.com/go/dlp v1.11.1/go.mod h1:/PA2EnioBeXTL/0hInwgj0rfsQb3lpE3R8XUJxqUNKI= cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= @@ -431,12 +480,14 @@ cloud.google.com/go/documentai v1.22.1/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJx cloud.google.com/go/documentai v1.23.0/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= cloud.google.com/go/documentai v1.23.2/go.mod h1:Q/wcRT+qnuXOpjAkvOV4A+IeQl04q2/ReT7SSbytLSo= cloud.google.com/go/documentai v1.23.4/go.mod h1:4MYAaEMnADPN1LPN5xboDR5QVB6AgsaxgFdJhitlE2Y= +cloud.google.com/go/documentai v1.23.5/go.mod h1:ghzBsyVTiVdkfKaUCum/9bGBEyBjDO4GfooEcYKhN+g= cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= cloud.google.com/go/domains v0.9.2/go.mod h1:3YvXGYzZG1Temjbk7EyGCuGGiXHJwVNmwIf+E/cUp5I= cloud.google.com/go/domains v0.9.3/go.mod h1:29k66YNDLDY9LCFKpGFeh6Nj9r62ZKm5EsUJxAl84KU= +cloud.google.com/go/domains v0.9.4/go.mod h1:27jmJGShuXYdUNjyDG0SodTfT5RwLi7xmH334Gvi3fY= cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= @@ -444,6 +495,7 @@ cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6Esb cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= cloud.google.com/go/edgecontainer v1.1.2/go.mod h1:wQRjIzqxEs9e9wrtle4hQPSR1Y51kqN75dgF7UllZZ4= cloud.google.com/go/edgecontainer v1.1.3/go.mod h1:Ll2DtIABzEfaxaVSbwj3QHFaOOovlDFiWVDu349jSsA= +cloud.google.com/go/edgecontainer v1.1.4/go.mod h1:AvFdVuZuVGdgaE5YvlL1faAoa1ndRR/5XhXZvPBHbsE= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= @@ -451,6 +503,7 @@ cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aU cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= cloud.google.com/go/essentialcontacts v1.6.3/go.mod h1:yiPCD7f2TkP82oJEFXFTou8Jl8L6LBRPeBEkTaO0Ggo= cloud.google.com/go/essentialcontacts v1.6.4/go.mod h1:iju5Vy3d9tJUg0PYMd1nHhjV7xoCXaOAVabrwLaPBEM= +cloud.google.com/go/essentialcontacts v1.6.5/go.mod h1:jjYbPzw0x+yglXC890l6ECJWdYeZ5dlYACTFL0U/VuM= cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= @@ -459,6 +512,7 @@ cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8 cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= cloud.google.com/go/eventarc v1.13.1/go.mod h1:EqBxmGHFrruIara4FUQ3RHlgfCn7yo1HYsu2Hpt/C3Y= cloud.google.com/go/eventarc v1.13.2/go.mod h1:X9A80ShVu19fb4e5sc/OLV7mpFUKZMwfJFeeWhcIObM= +cloud.google.com/go/eventarc v1.13.3/go.mod h1:RWH10IAZIRcj1s/vClXkBgMHwh59ts7hSWcqD3kaclg= cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= @@ -466,6 +520,8 @@ cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466d cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= cloud.google.com/go/filestore v1.7.2/go.mod h1:TYOlyJs25f/omgj+vY7/tIG/E7BX369triSPzE4LdgE= cloud.google.com/go/filestore v1.7.3/go.mod h1:Qp8WaEERR3cSkxToxFPHh/b8AACkSut+4qlCjAmKTV0= +cloud.google.com/go/filestore v1.7.4/go.mod h1:S5JCxIbFjeBhWMTfIYH2Jx24J6BqjwpkkPl+nBA5DlI= +cloud.google.com/go/filestore v1.8.0/go.mod h1:S5JCxIbFjeBhWMTfIYH2Jx24J6BqjwpkkPl+nBA5DlI= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= @@ -482,6 +538,7 @@ cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/ cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= cloud.google.com/go/functions v1.15.2/go.mod h1:CHAjtcR6OU4XF2HuiVeriEdELNcnvRZSk1Q8RMqy4lE= cloud.google.com/go/functions v1.15.3/go.mod h1:r/AMHwBheapkkySEhiZYLDBwVJCdlRwsm4ieJu35/Ug= +cloud.google.com/go/functions v1.15.4/go.mod h1:CAsTc3VlRMVvx+XqXxKqVevguqJpnVip4DdonFsX28I= cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= @@ -495,12 +552,14 @@ cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6 cloud.google.com/go/gkebackup v1.3.1/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= cloud.google.com/go/gkebackup v1.3.2/go.mod h1:OMZbXzEJloyXMC7gqdSB+EOEQ1AKcpGYvO3s1ec5ixk= cloud.google.com/go/gkebackup v1.3.3/go.mod h1:eMk7/wVV5P22KBakhQnJxWSVftL1p4VBFLpv0kIft7I= +cloud.google.com/go/gkebackup v1.3.4/go.mod h1:gLVlbM8h/nHIs09ns1qx3q3eaXcGSELgNu1DWXYz1HI= cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= cloud.google.com/go/gkeconnect v0.8.2/go.mod h1:6nAVhwchBJYgQCXD2pHBFQNiJNyAd/wyxljpaa6ZPrY= cloud.google.com/go/gkeconnect v0.8.3/go.mod h1:i9GDTrfzBSUZGCe98qSu1B8YB8qfapT57PenIb820Jo= +cloud.google.com/go/gkeconnect v0.8.4/go.mod h1:84hZz4UMlDCKl8ifVW8layK4WHlMAFeq8vbzjU0yJkw= cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= @@ -508,6 +567,7 @@ cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VB cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= cloud.google.com/go/gkehub v0.14.2/go.mod h1:iyjYH23XzAxSdhrbmfoQdePnlMj2EWcvnR+tHdBQsCY= cloud.google.com/go/gkehub v0.14.3/go.mod h1:jAl6WafkHHW18qgq7kqcrXYzN08hXeK/Va3utN8VKg8= +cloud.google.com/go/gkehub v0.14.4/go.mod h1:Xispfu2MqnnFt8rV/2/3o73SK1snL8s9dYJ9G2oQMfc= cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= @@ -515,6 +575,7 @@ cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZVi cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= cloud.google.com/go/gkemulticloud v1.0.1/go.mod h1:AcrGoin6VLKT/fwZEYuqvVominLriQBCKmbjtnbMjG8= cloud.google.com/go/gkemulticloud v1.0.2/go.mod h1:+ee5VXxKb3H1l4LZAcgWB/rvI16VTNTrInWxDjAGsGo= +cloud.google.com/go/gkemulticloud v1.0.3/go.mod h1:7NpJBN94U6DY1xHIbsDqB2+TFZUfjLUKLjUX8NGLor0= cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= @@ -523,6 +584,7 @@ cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdI cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= cloud.google.com/go/gsuiteaddons v1.6.2/go.mod h1:K65m9XSgs8hTF3X9nNTPi8IQueljSdYo9F+Mi+s4MyU= cloud.google.com/go/gsuiteaddons v1.6.3/go.mod h1:sCFJkZoMrLZT3JTb8uJqgKPNshH2tfXeCwTFRebTq48= +cloud.google.com/go/gsuiteaddons v1.6.4/go.mod h1:rxtstw7Fx22uLOXBpsvb9DUbC+fiXs7rF4U29KHM/pE= cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= @@ -538,6 +600,7 @@ cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+K cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= @@ -547,12 +610,14 @@ cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyX cloud.google.com/go/iap v1.9.0/go.mod h1:01OFxd1R+NFrg78S+hoPV5PxEzv22HXaNqUUlmNHFuY= cloud.google.com/go/iap v1.9.1/go.mod h1:SIAkY7cGMLohLSdBR25BuIxO+I4fXJiL06IBL7cy/5Q= cloud.google.com/go/iap v1.9.2/go.mod h1:GwDTOs047PPSnwRD0Us5FKf4WDRcVvHg1q9WVkKBhdI= +cloud.google.com/go/iap v1.9.3/go.mod h1:DTdutSZBqkkOm2HEOTBzhZxh2mwwxshfD/h3yofAiCw= cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= cloud.google.com/go/ids v1.4.2/go.mod h1:3vw8DX6YddRu9BncxuzMyWn0g8+ooUjI2gslJ7FH3vk= cloud.google.com/go/ids v1.4.3/go.mod h1:9CXPqI3GedjmkjbMWCUhMZ2P2N7TUMzAkVXYEH2orYU= +cloud.google.com/go/ids v1.4.4/go.mod h1:z+WUc2eEl6S/1aZWzwtVNWoSZslgzPxAboS0lZX0HjI= cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= @@ -560,6 +625,7 @@ cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= cloud.google.com/go/iot v1.7.2/go.mod h1:q+0P5zr1wRFpw7/MOgDXrG/HVA+l+cSwdObffkrpnSg= cloud.google.com/go/iot v1.7.3/go.mod h1:t8itFchkol4VgNbHnIq9lXoOOtHNR3uAACQMYbN9N4I= +cloud.google.com/go/iot v1.7.4/go.mod h1:3TWqDVvsddYBG++nHSZmluoCAVGr1hAcabbWZNKEZLk= cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= @@ -573,6 +639,7 @@ cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N cloud.google.com/go/kms v1.15.2/go.mod h1:3hopT4+7ooWRCjc2DxgnpESFxhIraaI2IpAVUEhbT/w= cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= cloud.google.com/go/kms v1.15.4/go.mod h1:L3Sdj6QTHK8dfwK5D1JLsAyELsNMnd3tAIwGS4ltKpc= +cloud.google.com/go/kms v1.15.5/go.mod h1:cU2H5jnp6G2TDpUGZyqTCoy1n16fbubHZjmVXSMtwDI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= @@ -582,12 +649,14 @@ cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIb cloud.google.com/go/language v1.11.0/go.mod h1:uDx+pFDdAKTY8ehpWbiXyQdz8tDSYLJbQcXsCkjYyvQ= cloud.google.com/go/language v1.11.1/go.mod h1:Xyid9MG9WOX3utvDbpX7j3tXDmmDooMyMDqgUVpH17U= cloud.google.com/go/language v1.12.1/go.mod h1:zQhalE2QlQIxbKIZt54IASBzmZpN/aDASea5zl1l+J4= +cloud.google.com/go/language v1.12.2/go.mod h1:9idWapzr/JKXBBQ4lWqVX/hcadxB194ry20m/bTrhWc= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= cloud.google.com/go/lifesciences v0.9.2/go.mod h1:QHEOO4tDzcSAzeJg7s2qwnLM2ji8IRpQl4p6m5Z9yTA= cloud.google.com/go/lifesciences v0.9.3/go.mod h1:gNGBOJV80IWZdkd+xz4GQj4mbqaz737SCLHn2aRhQKM= +cloud.google.com/go/lifesciences v0.9.4/go.mod h1:bhm64duKhMi7s9jR9WYJYvjAFJwRqNj+Nia7hF0Z7JA= cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= @@ -599,12 +668,14 @@ cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPk cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= cloud.google.com/go/longrunning v0.5.3/go.mod h1:y/0ga59EYu58J6SHmmQOvekvND2qODbu8ywBBW7EK7Y= +cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= cloud.google.com/go/managedidentities v1.6.2/go.mod h1:5c2VG66eCa0WIq6IylRk3TBW83l161zkFvCj28X7jn8= cloud.google.com/go/managedidentities v1.6.3/go.mod h1:tewiat9WLyFN0Fi7q1fDD5+0N4VUoL0SCX0OTCthZq4= +cloud.google.com/go/managedidentities v1.6.4/go.mod h1:WgyaECfHmF00t/1Uk8Oun3CQ2PGUtjc3e9Alh79wyiM= cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= @@ -612,12 +683,14 @@ cloud.google.com/go/maps v1.3.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9v cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= cloud.google.com/go/maps v1.4.1/go.mod h1:BxSa0BnW1g2U2gNdbq5zikLlHUuHW0GFWh7sgML2kIY= cloud.google.com/go/maps v1.5.1/go.mod h1:NPMZw1LJwQZYCfz4y+EIw+SI+24A4bpdFJqdKVr0lt4= +cloud.google.com/go/maps v1.6.1/go.mod h1:4+buOHhYXFBp58Zj/K+Lc1rCmJssxxF4pJ5CJnhdz18= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= cloud.google.com/go/mediatranslation v0.8.2/go.mod h1:c9pUaDRLkgHRx3irYE5ZC8tfXGrMYwNZdmDqKMSfFp8= cloud.google.com/go/mediatranslation v0.8.3/go.mod h1:F9OnXTy336rteOEywtY7FOqCk+J43o2RF638hkOQl4Y= +cloud.google.com/go/mediatranslation v0.8.4/go.mod h1:9WstgtNVAdN53m6TQa5GjIjLqKQPXe74hwSCxUP6nj4= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= @@ -626,6 +699,7 @@ cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQ cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= cloud.google.com/go/memcache v1.10.2/go.mod h1:f9ZzJHLBrmd4BkguIAa/l/Vle6uTHzHokdnzSWOdQ6A= cloud.google.com/go/memcache v1.10.3/go.mod h1:6z89A41MT2DVAW0P4iIRdu5cmRTsbsFn4cyiIx8gbwo= +cloud.google.com/go/memcache v1.10.4/go.mod h1:v/d8PuC8d1gD6Yn5+I3INzLR01IDn0N4Ym56RgikSI0= cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= @@ -636,6 +710,7 @@ cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/Ml cloud.google.com/go/metastore v1.13.0/go.mod h1:URDhpG6XLeh5K+Glq0NOt74OfrPKTwS62gEPZzb5SOk= cloud.google.com/go/metastore v1.13.1/go.mod h1:IbF62JLxuZmhItCppcIfzBBfUFq0DIB9HPDoLgWrVOU= cloud.google.com/go/metastore v1.13.2/go.mod h1:KS59dD+unBji/kFebVp8XU/quNSyo8b6N6tPGspKszA= +cloud.google.com/go/metastore v1.13.3/go.mod h1:K+wdjXdtkdk7AQg4+sXS8bRrQa9gcOr+foOMF2tqINE= cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= @@ -644,6 +719,7 @@ cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3o cloud.google.com/go/monitoring v1.16.0/go.mod h1:Ptp15HgAyM1fNICAojDMoNc/wUmn67mLHQfyqbw+poY= cloud.google.com/go/monitoring v1.16.1/go.mod h1:6HsxddR+3y9j+o/cMJH6q/KJ/CBTvM/38L/1m7bTRJ4= cloud.google.com/go/monitoring v1.16.2/go.mod h1:B44KGwi4ZCF8Rk/5n+FWeispDXoKSk9oss2QNlXJBgc= +cloud.google.com/go/monitoring v1.16.3/go.mod h1:KwSsX5+8PnXv5NJnICZzW2R8pWTis8ypC4zmdRD63Tw= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= @@ -655,6 +731,7 @@ cloud.google.com/go/networkconnectivity v1.13.0/go.mod h1:SAnGPes88pl7QRLUen2Hmc cloud.google.com/go/networkconnectivity v1.14.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= cloud.google.com/go/networkconnectivity v1.14.1/go.mod h1:LyGPXR742uQcDxZ/wv4EI0Vu5N6NKJ77ZYVnDe69Zug= cloud.google.com/go/networkconnectivity v1.14.2/go.mod h1:5UFlwIisZylSkGG1AdwK/WZUaoz12PKu6wODwIbFzJo= +cloud.google.com/go/networkconnectivity v1.14.3/go.mod h1:4aoeFdrJpYEXNvrnfyD5kIzs8YtHg945Og4koAjHQek= cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= @@ -662,6 +739,7 @@ cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vD cloud.google.com/go/networkmanagement v1.9.0/go.mod h1:UTUaEU9YwbCAhhz3jEOHr+2/K/MrBk2XxOLS89LQzFw= cloud.google.com/go/networkmanagement v1.9.1/go.mod h1:CCSYgrQQvW73EJawO2QamemYcOb57LvrDdDU51F0mcI= cloud.google.com/go/networkmanagement v1.9.2/go.mod h1:iDGvGzAoYRghhp4j2Cji7sF899GnfGQcQRQwgVOWnDw= +cloud.google.com/go/networkmanagement v1.9.3/go.mod h1:y7WMO1bRLaP5h3Obm4tey+NquUvB93Co1oh4wpL+XcU= cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= @@ -669,6 +747,7 @@ cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8Ic cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= cloud.google.com/go/networksecurity v0.9.2/go.mod h1:jG0SeAttWzPMUILEHDUvFYdQTl8L/E/KC8iZDj85lEI= cloud.google.com/go/networksecurity v0.9.3/go.mod h1:l+C0ynM6P+KV9YjOnx+kk5IZqMSLccdBqW6GUoF4p/0= +cloud.google.com/go/networksecurity v0.9.4/go.mod h1:E9CeMZ2zDsNBkr8axKSYm8XyTqNhiCHf1JO/Vb8mD1w= cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= @@ -679,6 +758,7 @@ cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPc cloud.google.com/go/notebooks v1.10.0/go.mod h1:SOPYMZnttHxqot0SGSFSkRrwE29eqnKPBJFqgWmiK2k= cloud.google.com/go/notebooks v1.10.1/go.mod h1:5PdJc2SgAybE76kFQCWrTfJolCOUQXF97e+gteUUA6A= cloud.google.com/go/notebooks v1.11.1/go.mod h1:V2Zkv8wX9kDCGRJqYoI+bQAaoVeE5kSiz4yYHd2yJwQ= +cloud.google.com/go/notebooks v1.11.2/go.mod h1:z0tlHI/lREXC8BS2mIsUeR3agM1AkgLiS+Isov3SS70= cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= @@ -686,12 +766,14 @@ cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN cloud.google.com/go/optimization v1.5.0/go.mod h1:evo1OvTxeBRBu6ydPlrIRizKY/LJKo/drDMMRKqGEUU= cloud.google.com/go/optimization v1.5.1/go.mod h1:NC0gnUD5MWVAF7XLdoYVPmYYVth93Q6BUzqAq3ZwtV8= cloud.google.com/go/optimization v1.6.1/go.mod h1:hH2RYPTTM9e9zOiTaYPTiGPcGdNZVnBSBxjIAJzUkqo= +cloud.google.com/go/optimization v1.6.2/go.mod h1:mWNZ7B9/EyMCcwNl1frUGEuY6CPijSkz88Fz2vwKPOY= cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= cloud.google.com/go/orchestration v1.8.2/go.mod h1:T1cP+6WyTmh6LSZzeUhvGf0uZVmJyTx7t8z7Vg87+A0= cloud.google.com/go/orchestration v1.8.3/go.mod h1:xhgWAYqlbYjlz2ftbFghdyqENYW+JXuhBx9KsjMoGHs= +cloud.google.com/go/orchestration v1.8.4/go.mod h1:d0lywZSVYtIoSZXb0iFjv9SaL13PGyVOKDxqGxEf/qI= cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= @@ -699,6 +781,7 @@ cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1 cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= cloud.google.com/go/orgpolicy v1.11.2/go.mod h1:biRDpNwfyytYnmCRWZWxrKF22Nkz9eNVj9zyaBdpm1o= cloud.google.com/go/orgpolicy v1.11.3/go.mod h1:oKAtJ/gkMjum5icv2aujkP4CxROxPXsBbYGCDbPO8MM= +cloud.google.com/go/orgpolicy v1.11.4/go.mod h1:0+aNV/nrfoTQ4Mytv+Aw+stBDBjNf4d8fYRA9herfJI= cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= @@ -708,6 +791,7 @@ cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjw cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= cloud.google.com/go/osconfig v1.12.2/go.mod h1:eh9GPaMZpI6mEJEuhEjUJmaxvQ3gav+fFEJon1Y8Iw0= cloud.google.com/go/osconfig v1.12.3/go.mod h1:L/fPS8LL6bEYUi1au832WtMnPeQNT94Zo3FwwV1/xGM= +cloud.google.com/go/osconfig v1.12.4/go.mod h1:B1qEwJ/jzqSRslvdOCI8Kdnp0gSng0xW4LOnIebQomA= cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= @@ -717,12 +801,14 @@ cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4s cloud.google.com/go/oslogin v1.11.0/go.mod h1:8GMTJs4X2nOAUVJiPGqIWVcDaF0eniEto3xlOxaboXE= cloud.google.com/go/oslogin v1.11.1/go.mod h1:OhD2icArCVNUxKqtK0mcSmKL7lgr0LVlQz+v9s1ujTg= cloud.google.com/go/oslogin v1.12.1/go.mod h1:VfwTeFJGbnakxAY236eN8fsnglLiVXndlbcNomY4iZU= +cloud.google.com/go/oslogin v1.12.2/go.mod h1:CQ3V8Jvw4Qo4WRhNPF0o+HAM4DiLuE27Ul9CX9g2QdY= cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= cloud.google.com/go/phishingprotection v0.8.2/go.mod h1:LhJ91uyVHEYKSKcMGhOa14zMMWfbEdxG032oT6ECbC8= cloud.google.com/go/phishingprotection v0.8.3/go.mod h1:3B01yO7T2Ra/TMojifn8EoGd4G9jts/6cIO0DgDY9J8= +cloud.google.com/go/phishingprotection v0.8.4/go.mod h1:6b3kNPAc2AQ6jZfFHioZKg9MQNybDg4ixFd4RPZZ2nE= cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= @@ -732,6 +818,7 @@ cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcV cloud.google.com/go/policytroubleshooter v1.9.0/go.mod h1:+E2Lga7TycpeSTj2FsH4oXxTnrbHJGRlKhVZBLGgU64= cloud.google.com/go/policytroubleshooter v1.9.1/go.mod h1:MYI8i0bCrL8cW+VHN1PoiBTyNZTstCg2WUw2eVC4c4U= cloud.google.com/go/policytroubleshooter v1.10.1/go.mod h1:5C0rhT3TDZVxAu8813bwmTvd57Phbl8mr9F4ipOsxEs= +cloud.google.com/go/policytroubleshooter v1.10.2/go.mod h1:m4uF3f6LseVEnMV6nknlN2vYGRb+75ylQwJdnOXfnv0= cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= @@ -739,6 +826,7 @@ cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPi cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= cloud.google.com/go/privatecatalog v0.9.2/go.mod h1:RMA4ATa8IXfzvjrhhK8J6H4wwcztab+oZph3c6WmtFc= cloud.google.com/go/privatecatalog v0.9.3/go.mod h1:K5pn2GrVmOPjXz3T26mzwXLcKivfIJ9R5N79AFCF9UE= +cloud.google.com/go/privatecatalog v0.9.4/go.mod h1:SOjm93f+5hp/U3PqMZAHTtBtluqLygrDrVO8X8tYtG0= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -765,12 +853,15 @@ cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkse cloud.google.com/go/recaptchaenterprise/v2 v2.8.0/go.mod h1:QuE8EdU9dEnesG8/kG3XuJyNsjEqMlMzg3v3scCJ46c= cloud.google.com/go/recaptchaenterprise/v2 v2.8.1/go.mod h1:JZYZJOeZjgSSTGP4uz7NlQ4/d1w5hGmksVgM0lbEij0= cloud.google.com/go/recaptchaenterprise/v2 v2.8.2/go.mod h1:kpaDBOpkwD4G0GVMzG1W6Doy1tFFC97XAV3xy+Rd/pw= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.3/go.mod h1:Dak54rw6lC2gBY8FBznpOCAR58wKf+R+ZSJRoeJok4w= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.4/go.mod h1:Dak54rw6lC2gBY8FBznpOCAR58wKf+R+ZSJRoeJok4w= cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= cloud.google.com/go/recommendationengine v0.8.2/go.mod h1:QIybYHPK58qir9CV2ix/re/M//Ty10OxjnnhWdaKS1Y= cloud.google.com/go/recommendationengine v0.8.3/go.mod h1:m3b0RZV02BnODE9FeSvGv1qibFo8g0OnmB/RMwYy4V8= +cloud.google.com/go/recommendationengine v0.8.4/go.mod h1:GEteCf1PATl5v5ZsQ60sTClUE0phbWmo3rQ1Js8louU= cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= @@ -780,6 +871,7 @@ cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA cloud.google.com/go/recommender v1.11.0/go.mod h1:kPiRQhPyTJ9kyXPCG6u/dlPLbYfFlkwHNRwdzPVAoII= cloud.google.com/go/recommender v1.11.1/go.mod h1:sGwFFAyI57v2Hc5LbIj+lTwXipGu9NW015rkaEM5B18= cloud.google.com/go/recommender v1.11.2/go.mod h1:AeoJuzOvFR/emIcXdVFkspVXVTYpliRCmKNYDnyBv6Y= +cloud.google.com/go/recommender v1.11.3/go.mod h1:+FJosKKJSId1MBFeJ/TTyoGQZiEelQQIZMKYYD8ruK4= cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= @@ -788,6 +880,7 @@ cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0 cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= cloud.google.com/go/redis v1.13.2/go.mod h1:0Hg7pCMXS9uz02q+LoEVl5dNHUkIQv+C/3L76fandSA= cloud.google.com/go/redis v1.13.3/go.mod h1:vbUpCKUAZSYzFcWKmICnYgRAhTFg9r+djWqFxDYXi4U= +cloud.google.com/go/redis v1.14.1/go.mod h1:MbmBxN8bEnQI4doZPC1BzADU4HGocHBk2de3SbgOkqs= cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= @@ -796,12 +889,14 @@ cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95 cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= cloud.google.com/go/resourcemanager v1.9.2/go.mod h1:OujkBg1UZg5lX2yIyMo5Vz9O5hf7XQOSV7WxqxxMtQE= cloud.google.com/go/resourcemanager v1.9.3/go.mod h1:IqrY+g0ZgLsihcfcmqSe+RKp1hzjXwG904B92AwBz6U= +cloud.google.com/go/resourcemanager v1.9.4/go.mod h1:N1dhP9RFvo3lUfwtfLWVxfUWq8+KUQ+XLlHLH3BoFJ0= cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= cloud.google.com/go/resourcesettings v1.6.2/go.mod h1:mJIEDd9MobzunWMeniaMp6tzg4I2GvD3TTmPkc8vBXk= cloud.google.com/go/resourcesettings v1.6.3/go.mod h1:pno5D+7oDYkMWZ5BpPsb4SO0ewg3IXcmmrUZaMJrFic= +cloud.google.com/go/resourcesettings v1.6.4/go.mod h1:pYTTkWdv2lmQcjsthbZLNBP4QW140cs7wqA3DuqErVI= cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= @@ -810,6 +905,7 @@ cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQk cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= cloud.google.com/go/retail v1.14.2/go.mod h1:W7rrNRChAEChX336QF7bnMxbsjugcOCPU44i5kbLiL8= cloud.google.com/go/retail v1.14.3/go.mod h1:Omz2akDHeSlfCq8ArPKiBxlnRpKEBjUH386JYFLUvXo= +cloud.google.com/go/retail v1.14.4/go.mod h1:l/N7cMtY78yRnJqp5JW8emy7MB1nz8E4t2yfOmklYfg= cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= @@ -818,6 +914,7 @@ cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3 cloud.google.com/go/run v1.3.0/go.mod h1:S/osX/4jIPZGg+ssuqh6GNgg7syixKe3YnprwehzHKU= cloud.google.com/go/run v1.3.1/go.mod h1:cymddtZOzdwLIAsmS6s+Asl4JoXIDm/K1cpZTxV4Q5s= cloud.google.com/go/run v1.3.2/go.mod h1:SIhmqArbjdU/D9M6JoHaAqnAMKLFtXaVdNeq04NjnVE= +cloud.google.com/go/run v1.3.3/go.mod h1:WSM5pGyJ7cfYyYbONVQBN4buz42zFqwG67Q3ch07iK4= cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= @@ -827,6 +924,8 @@ cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcb cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= cloud.google.com/go/scheduler v1.10.2/go.mod h1:O3jX6HRH5eKCA3FutMw375XHZJudNIKVonSCHv7ropY= cloud.google.com/go/scheduler v1.10.3/go.mod h1:8ANskEM33+sIbpJ+R4xRfw/jzOG+ZFE8WVLy7/yGvbc= +cloud.google.com/go/scheduler v1.10.4/go.mod h1:MTuXcrJC9tqOHhixdbHDFSIuh7xZF2IysiINDuiq6NI= +cloud.google.com/go/scheduler v1.10.5/go.mod h1:MTuXcrJC9tqOHhixdbHDFSIuh7xZF2IysiINDuiq6NI= cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= @@ -834,6 +933,7 @@ cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hb cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= cloud.google.com/go/secretmanager v1.11.2/go.mod h1:MQm4t3deoSub7+WNwiC4/tRYgDBHJgJPvswqQVB1Vss= cloud.google.com/go/secretmanager v1.11.3/go.mod h1:0bA2o6FabmShrEy328i67aV+65XoUFFSmVeLBn/51jI= +cloud.google.com/go/secretmanager v1.11.4/go.mod h1:wreJlbS9Zdq21lMzWmJ0XhWW2ZxgPeahsqeV/vZoJ3w= cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= @@ -844,6 +944,7 @@ cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKV cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= cloud.google.com/go/security v1.15.2/go.mod h1:2GVE/v1oixIRHDaClVbHuPcZwAqFM28mXuAKCfMgYIg= cloud.google.com/go/security v1.15.3/go.mod h1:gQ/7Q2JYUZZgOzqKtw9McShH+MjNvtDpL40J1cT+vBs= +cloud.google.com/go/security v1.15.4/go.mod h1:oN7C2uIZKhxCLiAAijKUCuHLZbIt/ghYEo8MqwD/Ty4= cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= @@ -853,6 +954,7 @@ cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= cloud.google.com/go/securitycenter v1.23.1/go.mod h1:w2HV3Mv/yKhbXKwOCu2i8bCuLtNP1IMHuiYQn4HJq5s= cloud.google.com/go/securitycenter v1.24.1/go.mod h1:3h9IdjjHhVMXdQnmqzVnM7b0wMn/1O/U20eWVpMpZjI= +cloud.google.com/go/securitycenter v1.24.2/go.mod h1:l1XejOngggzqwr4Fa2Cn+iWZGf+aBLTXtB/vXjy5vXM= cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= @@ -868,6 +970,7 @@ cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6 cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= cloud.google.com/go/servicedirectory v1.11.1/go.mod h1:tJywXimEWzNzw9FvtNjsQxxJ3/41jseeILgwU/QLrGI= cloud.google.com/go/servicedirectory v1.11.2/go.mod h1:KD9hCLhncWRV5jJphwIpugKwM5bn1x0GyVVD4NO8mGg= +cloud.google.com/go/servicedirectory v1.11.3/go.mod h1:LV+cHkomRLr67YoQy3Xq2tUXBGOs5z5bPofdq7qtiAw= cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= @@ -882,6 +985,7 @@ cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+ cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= cloud.google.com/go/shell v1.7.2/go.mod h1:KqRPKwBV0UyLickMn0+BY1qIyE98kKyI216sH/TuHmc= cloud.google.com/go/shell v1.7.3/go.mod h1:cTTEz/JdaBsQAeTQ3B6HHldZudFoYBOqjteev07FbIc= +cloud.google.com/go/shell v1.7.4/go.mod h1:yLeXB8eKLxw0dpEmXQ/FjriYrBijNsONpwnWsdPqlKM= cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= @@ -889,6 +993,7 @@ cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSq cloud.google.com/go/spanner v1.49.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= cloud.google.com/go/spanner v1.50.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= cloud.google.com/go/spanner v1.51.0/go.mod h1:c5KNo5LQ1X5tJwma9rSQZsXNBDNvj4/n8BVc3LNahq0= +cloud.google.com/go/spanner v1.53.0/go.mod h1:liG4iCeLqm5L3fFLU5whFITqP0e0orsAW1uUSrd4rws= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= @@ -899,6 +1004,8 @@ cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= cloud.google.com/go/speech v1.19.1/go.mod h1:WcuaWz/3hOlzPFOVo9DUsblMIHwxP589y6ZMtaG+iAA= cloud.google.com/go/speech v1.19.2/go.mod h1:2OYFfj+Ch5LWjsaSINuCZsre/789zlcCI3SY4oAi2oI= +cloud.google.com/go/speech v1.20.1/go.mod h1:wwolycgONvfz2EDU8rKuHRW3+wc9ILPsAWoikBEWavY= +cloud.google.com/go/speech v1.21.0/go.mod h1:wwolycgONvfz2EDU8rKuHRW3+wc9ILPsAWoikBEWavY= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -918,6 +1025,7 @@ cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7 cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= cloud.google.com/go/storagetransfer v1.10.1/go.mod h1:rS7Sy0BtPviWYTTJVWCSV4QrbBitgPeuK4/FKa4IdLs= cloud.google.com/go/storagetransfer v1.10.2/go.mod h1:meIhYQup5rg9juQJdyppnA/WLQCOguxtk1pr3/vBWzA= +cloud.google.com/go/storagetransfer v1.10.3/go.mod h1:Up8LY2p6X68SZ+WToswpQbQHnJpOty/ACcMafuey8gc= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= @@ -926,18 +1034,21 @@ cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQ cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= cloud.google.com/go/talent v1.6.3/go.mod h1:xoDO97Qd4AK43rGjJvyBHMskiEf3KulgYzcH6YWOVoo= cloud.google.com/go/talent v1.6.4/go.mod h1:QsWvi5eKeh6gG2DlBkpMaFYZYrYUnIpo34f6/V5QykY= +cloud.google.com/go/talent v1.6.5/go.mod h1:Mf5cma696HmE+P2BWJ/ZwYqeJXEeU0UqjHFXVLadEDI= cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= cloud.google.com/go/texttospeech v1.7.2/go.mod h1:VYPT6aTOEl3herQjFHYErTlSZJ4vB00Q2ZTmuVgluD4= cloud.google.com/go/texttospeech v1.7.3/go.mod h1:Av/zpkcgWfXlDLRYob17lqMstGZ3GqlvJXqKMp2u8so= +cloud.google.com/go/texttospeech v1.7.4/go.mod h1:vgv0002WvR4liGuSd5BJbWy4nDn5Ozco0uJymY5+U74= cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= cloud.google.com/go/tpu v1.6.2/go.mod h1:NXh3NDwt71TsPZdtGWgAG5ThDfGd32X1mJ2cMaRlVgU= cloud.google.com/go/tpu v1.6.3/go.mod h1:lxiueqfVMlSToZY1151IaZqp89ELPSrk+3HIQ5HRkbY= +cloud.google.com/go/tpu v1.6.4/go.mod h1:NAm9q3Rq2wIlGnOhpYICNI7+bpBebMJbh0yyp3aNw1Y= cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= @@ -945,6 +1056,7 @@ cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= cloud.google.com/go/trace v1.10.2/go.mod h1:NPXemMi6MToRFcSxRl2uDnu/qAlAQ3oULUphcHGh1vA= cloud.google.com/go/trace v1.10.3/go.mod h1:Ke1bgfc73RV3wUFml+uQp7EsDw4dGaETLxB7Iq/r4CY= +cloud.google.com/go/trace v1.10.4/go.mod h1:Nso99EDIK8Mj5/zmB+iGr9dosS/bzWCJ8wGmE6TXNWY= cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= @@ -955,6 +1067,7 @@ cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNW cloud.google.com/go/translate v1.9.0/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= cloud.google.com/go/translate v1.9.1/go.mod h1:TWIgDZknq2+JD4iRcojgeDtqGEp154HN/uL6hMvylS8= cloud.google.com/go/translate v1.9.2/go.mod h1:E3Tc6rUTsQkVrXW6avbUhKJSr7ZE3j7zNmqzXKHqRrY= +cloud.google.com/go/translate v1.9.3/go.mod h1:Kbq9RggWsbqZ9W5YpM94Q1Xv4dshw/gr/SHfsl5yCZ0= cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= @@ -966,6 +1079,7 @@ cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM cloud.google.com/go/video v1.20.0/go.mod h1:U3G3FTnsvAGqglq9LxgqzOiBc/Nt8zis8S+850N2DUM= cloud.google.com/go/video v1.20.1/go.mod h1:3gJS+iDprnj8SY6pe0SwLeC5BUW80NjhwX7INWEuWGU= cloud.google.com/go/video v1.20.2/go.mod h1:lrixr5JeKNThsgfM9gqtwb6Okuqzfo4VrY2xynaViTA= +cloud.google.com/go/video v1.20.3/go.mod h1:TnH/mNZKVHeNtpamsSPygSR0iHtvrR/cW1/GDjN5+GU= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= @@ -974,6 +1088,7 @@ cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQu cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= cloud.google.com/go/videointelligence v1.11.2/go.mod h1:ocfIGYtIVmIcWk1DsSGOoDiXca4vaZQII1C85qtoplc= cloud.google.com/go/videointelligence v1.11.3/go.mod h1:tf0NUaGTjU1iS2KEkGWvO5hRHeCkFK3nPo0/cOZhZAo= +cloud.google.com/go/videointelligence v1.11.4/go.mod h1:kPBMAYsTPFiQxMLmmjpcZUMklJp3nC9+ipJJtprccD8= cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= @@ -984,6 +1099,7 @@ cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= cloud.google.com/go/vision/v2 v2.7.3/go.mod h1:V0IcLCY7W+hpMKXK1JYE0LV5llEqVmj+UJChjvA1WsM= cloud.google.com/go/vision/v2 v2.7.4/go.mod h1:ynDKnsDN/0RtqkKxQZ2iatv3Dm9O+HfRb5djl7l4Vvw= +cloud.google.com/go/vision/v2 v2.7.5/go.mod h1:GcviprJLFfK9OLf0z8Gm6lQb6ZFUulvpZws+mm6yPLM= cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= @@ -991,6 +1107,7 @@ cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54 cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= cloud.google.com/go/vmmigration v1.7.2/go.mod h1:iA2hVj22sm2LLYXGPT1pB63mXHhrH1m/ruux9TwWLd8= cloud.google.com/go/vmmigration v1.7.3/go.mod h1:ZCQC7cENwmSWlwyTrZcWivchn78YnFniEQYRWQ65tBo= +cloud.google.com/go/vmmigration v1.7.4/go.mod h1:yBXCmiLaB99hEl/G9ZooNx2GyzgsjKnw5fWcINRgD70= cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= @@ -998,12 +1115,14 @@ cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkG cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= cloud.google.com/go/vmwareengine v1.0.1/go.mod h1:aT3Xsm5sNx0QShk1Jc1B8OddrxAScYLwzVoaiXfdzzk= cloud.google.com/go/vmwareengine v1.0.2/go.mod h1:xMSNjIk8/itYrz1JA8nV3Ajg4L4n3N+ugP8JKzk3OaA= +cloud.google.com/go/vmwareengine v1.0.3/go.mod h1:QSpdZ1stlbfKtyt6Iu19M6XRxjmXO+vb5a/R6Fvy2y4= cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= cloud.google.com/go/vpcaccess v1.7.2/go.mod h1:mmg/MnRHv+3e8FJUjeSibVFvQF1cCy2MsFaFqxeY1HU= cloud.google.com/go/vpcaccess v1.7.3/go.mod h1:YX4skyfW3NC8vI3Fk+EegJnlYFatA+dXK4o236EUCUc= +cloud.google.com/go/vpcaccess v1.7.4/go.mod h1:lA0KTvhtEOb/VOdnH/gwPuOzGgM+CWsmGu6bb4IoMKk= cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= @@ -1012,12 +1131,14 @@ cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72 cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= cloud.google.com/go/webrisk v1.9.2/go.mod h1:pY9kfDgAqxUpDBOrG4w8deLfhvJmejKB0qd/5uQIPBc= cloud.google.com/go/webrisk v1.9.3/go.mod h1:RUYXe9X/wBDXhVilss7EDLW9ZNa06aowPuinUOPCXH8= +cloud.google.com/go/webrisk v1.9.4/go.mod h1:w7m4Ib4C+OseSr2GL66m0zMBywdrVNTDKsdEsfMl7X0= cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= cloud.google.com/go/websecurityscanner v1.6.2/go.mod h1:7YgjuU5tun7Eg2kpKgGnDuEOXWIrh8x8lWrJT4zfmas= cloud.google.com/go/websecurityscanner v1.6.3/go.mod h1:x9XANObUFR+83Cya3g/B9M/yoHVqzxPnFtgF8yYGAXw= +cloud.google.com/go/websecurityscanner v1.6.4/go.mod h1:mUiyMQ+dGpPPRkHgknIZeCzSHJ45+fY4F52nZFDHm2o= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= @@ -1027,6 +1148,7 @@ cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvo cloud.google.com/go/workflows v1.12.0/go.mod h1:PYhSk2b6DhZ508tj8HXKaBh+OFe+xdl0dHF/tJdzPQM= cloud.google.com/go/workflows v1.12.1/go.mod h1:5A95OhD/edtOhQd/O741NSfIMezNTbCwLM1P1tBRGHM= cloud.google.com/go/workflows v1.12.2/go.mod h1:+OmBIgNqYJPVggnMo9nqmizW0qEXHhmnAzK/CnBqsHc= +cloud.google.com/go/workflows v1.12.3/go.mod h1:fmOUeeqEwPzIU81foMjTRQIdwQHADi/vEr1cx9R1m5g= code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= @@ -1091,8 +1213,10 @@ github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -1292,9 +1416,11 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= +github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -1323,8 +1449,9 @@ github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkj github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= @@ -1332,6 +1459,7 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5 github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -1605,8 +1733,9 @@ github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3c github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 h1:AFhmAXZqMm6PgNkco+BTBk//EQS8NLE1YLc2EO3bcLE= github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52/go.mod h1:/mK7FZ3mFYEn9zvNPhpngTyatyehSwte5bJZ4ehL5Xw= +github.com/robertkrimen/otto v0.2.1 h1:FVP0PJ0AHIjC+N4pKCG9yCDz6LHNPCwi/GKID5pGGF0= +github.com/robertkrimen/otto v0.2.1/go.mod h1:UPwtJ1Xu7JrLcZjNWN8orJaM5n5YEtqL//farB5FlRY= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -1623,16 +1752,17 @@ github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sensu/core/v2 v2.20.0-alpha3 h1:lRdfPHZqBBJG9K4kJ9udA5kjblAgwmubpF+UMOidDPc= -github.com/sensu/core/v2 v2.20.0-alpha3/go.mod h1:fzr3qioLAHyLsBfq9I6ELVjL01NUNjqmQx4kj2tbDLo= -github.com/sensu/core/v3 v3.9.0-alpha4 h1:jLy1ZjUMUMlce2uSeoxKa4rmjlisela06AIHQw/g9ts= -github.com/sensu/core/v3 v3.9.0-alpha4/go.mod h1:n+s31i1W5lIJZH0Dfvq41R49LxYcTUANqQOerAZNEKw= +github.com/sensu/core/v2 v2.20.0 h1:QJQbqZiXSQ2dUE8LUvwUcKaqxHjYYCQwJ1Mil0cap4U= +github.com/sensu/core/v2 v2.20.0/go.mod h1:fzr3qioLAHyLsBfq9I6ELVjL01NUNjqmQx4kj2tbDLo= +github.com/sensu/core/v3 v3.9.0 h1:7wz4ILGwPbHHTT/8sKTtflBAgOuJgTaKhUlN4lyUdSY= +github.com/sensu/core/v3 v3.9.0/go.mod h1:AuupbIzmjYdzEkaEdmpzP/ZgrqQgHTovXVejzyTN6u4= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= -github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= -github.com/sensu/sensu-go/types v0.12.0-alpha9.0.20231110195803-ecfe0db936ab h1:KxCYKkQ5YdheXcwvVCLkIKnYcyoauBVnJF6ep+y+Qm8= -github.com/sensu/sensu-go/types v0.12.0-alpha9.0.20231110195803-ecfe0db936ab/go.mod h1:dRXJYjmo+iERzGkiyYKg495tCEC36yoColAKG8mlchA= +github.com/sensu/sensu-api-tools v0.2.1 h1:wjT5AFdboQ3jDwzBMcD38VJEwwWhPIIuReZrCi9Ezos= +github.com/sensu/sensu-api-tools v0.2.1/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= +github.com/sensu/sensu-go/types v0.13.0 h1:Cu1yLciXXakckkiv6u+VuNxPkVWQslaZogOVpR4IDAg= +github.com/sensu/sensu-go/types v0.13.0/go.mod h1:Xb1E+aKOtebJ85CjyQCagxlV9lJzGrK6PfPqHj/z6z0= github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -1814,8 +1944,9 @@ golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45 golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1949,8 +2080,10 @@ golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1983,8 +2116,9 @@ golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4 golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2003,6 +2137,7 @@ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2107,8 +2242,9 @@ golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2124,8 +2260,9 @@ golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2145,8 +2282,9 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2309,6 +2447,7 @@ google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvy google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= google.golang.org/api v0.139.0/go.mod h1:CVagp6Eekz9CjGZ718Z+sloknzkDJE7Vc1Ckj9+viBk= +google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2467,8 +2606,10 @@ google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:CCviP9Rm google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= +google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f h1:Vn+VyHU5guc9KjB5KrjI2q0wCOWEOIh0OEsleqakHJg= +google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f/go.mod h1:nWSwAFPb+qfNJXsoeO3Io7zf4tMSfN8EA8RlDA04GhY= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= @@ -2484,10 +2625,13 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go. google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 h1:HJMDndgxest5n2y77fnErkM62iUsptE/H8p0dC2Huo4= google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405/go.mod h1:oT32Z4o8Zv2xPQTg0pbVaPr0MPOH6f14RgXt7zfIpwg= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= +google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY= +google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20231030173426-d783a09b4405/go.mod h1:GRUCuLdzVqZte8+Dl/D4N25yLzcGqqWaYkeVOwulFqw= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= @@ -2503,8 +2647,10 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= From b2bb21d72460aee0af455ebea0fa9b96008c18f0 Mon Sep 17 00:00:00 2001 From: Rajshekar Chavakula Date: Wed, 31 Jan 2024 18:08:48 +0530 Subject: [PATCH 144/173] new silenced setting attributes addition Signed-off-by: Rajshekar Chavakula --- backend/backend.go | 7 ++++ backend/cmd/start.go | 15 +++++++++ backend/config.go | 4 +++ backend/store/etcd/silenced_store.go | 16 ++++++++++ backend/store/etcd/silenced_store_test.go | 39 ++++++++++++++++++++--- backend/store/etcd/store.go | 12 +++++++ backend/store/etcd/store_test.go | 10 ++++++ backend/store/store.go | 9 ++++++ 8 files changed, 107 insertions(+), 5 deletions(-) diff --git a/backend/backend.go b/backend/backend.go index ab2ae5e95c..c61ac841ce 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -328,6 +328,13 @@ func Initialize(ctx context.Context, config *Config) (*Backend, error) { // Create the store, which lives on top of etcd stor := etcdstore.NewStore(b.Client, config.EtcdName) + + // set config details + scfg := etcdstore.Config{} + scfg.DefaultSilencedExpiryTime = config.DefaultSilencedExpiryTime + scfg.MaxSilencedExpiryTimeAllowed = config.MaxSilencedExpiryTimeAllowed + etcdstore.SetConfig(scfg, stor) + b.Store = stor storv2 := etcdstorev2.NewStore(b.Client) var storev2Proxy storev2.Proxy diff --git a/backend/cmd/start.go b/backend/cmd/start.go index 1d0d28d044..12757449a4 100644 --- a/backend/cmd/start.go +++ b/backend/cmd/start.go @@ -72,6 +72,10 @@ const ( flagLabels = "labels" flagAnnotations = "annotations" + // silenced expiry flags + flagMaxSilencedExpiryTimeAllowed = "max-silenced-expiry-time-allowed" + flagDefaultSilencedExpiryTime = "default-silenced-expiry-time" + // Etcd flag constants flagEtcdClientURLs = "etcd-client-urls" flagEtcdListenClientURLs = "etcd-listen-client-urls" @@ -255,6 +259,9 @@ func StartCommand(initialize InitializeFunc) *cobra.Command { CacheDir: viper.GetString(flagCacheDir), StateDir: viper.GetString(flagStateDir), + DefaultSilencedExpiryTime: viper.GetDuration(flagDefaultSilencedExpiryTime), + MaxSilencedExpiryTimeAllowed: viper.GetDuration(flagMaxSilencedExpiryTimeAllowed), + EtcdAdvertiseClientURLs: viper.GetStringSlice(flagEtcdAdvertiseClientURLs), EtcdListenClientURLs: viper.GetStringSlice(flagEtcdListenClientURLs), EtcdClientURLs: fallbackStringSlice(flagEtcdClientURLs, flagEtcdAdvertiseClientURLs), @@ -448,6 +455,10 @@ func handleConfig(cmd *cobra.Command, arguments []string, server bool) error { viper.SetDefault(flagEventLogBufferSize, 100000) viper.SetDefault(flagEventLogFile, "") viper.SetDefault(flagEventLogParallelEncoders, false) + + // default silenced value are set for 1 day = 1440m + viper.SetDefault(flagMaxSilencedExpiryTimeAllowed, "1440m") + viper.SetDefault(flagDefaultSilencedExpiryTime, "1440m") } // Etcd defaults @@ -583,6 +594,10 @@ func flagSet(server bool) *pflag.FlagSet { flagSet.Duration(flagPlatformMetricsLoggingInterval, viper.GetDuration(flagPlatformMetricsLoggingInterval), "platform metrics logging interval") flagSet.String(flagPlatformMetricsLogFile, viper.GetString(flagPlatformMetricsLogFile), "platform metrics log file path") + // silenced configuration flags + flagSet.Duration(flagDefaultSilencedExpiryTime, viper.GetDuration(flagDefaultSilencedExpiryTime), "Default expiry time for silenced if not set in minutes") + flagSet.Duration(flagMaxSilencedExpiryTimeAllowed, viper.GetDuration(flagMaxSilencedExpiryTimeAllowed), "Maximum expiry time allowed for silenced in minutes") + // Etcd server flags flagSet.StringSlice(flagEtcdPeerURLs, viper.GetStringSlice(flagEtcdPeerURLs), "list of URLs to listen on for peer traffic") _ = flagSet.SetAnnotation(flagEtcdPeerURLs, "categories", []string{"store"}) diff --git a/backend/config.go b/backend/config.go index 1c353f7f9e..87f84dfb16 100644 --- a/backend/config.go +++ b/backend/config.go @@ -132,4 +132,8 @@ type Config struct { EventLogBufferWait time.Duration EventLogFile string EventLogParallelEncoders bool + + // expiry setting for silences + DefaultSilencedExpiryTime time.Duration + MaxSilencedExpiryTimeAllowed time.Duration } diff --git a/backend/store/etcd/silenced_store.go b/backend/store/etcd/silenced_store.go index 7c9127f914..8c28c5fdf9 100644 --- a/backend/store/etcd/silenced_store.go +++ b/backend/store/etcd/silenced_store.go @@ -207,6 +207,13 @@ func (s *Store) UpdateSilencedEntry(ctx context.Context, silenced *corev2.Silenc if err := silenced.Validate(); err != nil { return &store.ErrNotValid{Err: err} } + allowedMaxTime := time.Now().Add(s.cfg.MaxSilencedExpiryTimeAllowed).Unix() + + // check for maximum allowed duration for silenced allowed + if silenced.ExpireAt > 0 && (silenced.ExpireAt > allowedMaxTime) { + err := errors.New("silenced crossed maximum duration allowed") + return &store.ErrThreshold{Err: err} + } if silenced.ExpireAt == 0 && silenced.Expire > 0 { start := time.Now() @@ -216,6 +223,15 @@ func (s *Store) UpdateSilencedEntry(ctx context.Context, silenced *corev2.Silenc silenced.ExpireAt = start.Add(time.Duration(silenced.Expire) * time.Second).Unix() } + // set default silenced expiry time configured in backend yaml file + if silenced.Expire <= 0 && silenced.ExpireAt == 0 { + start := time.Now() + if silenced.Begin > 0 { + start = time.Unix(silenced.Begin, 0) + } + silenced.ExpireAt = start.Add(s.cfg.DefaultSilencedExpiryTime).Unix() + } + silencedBytes, err := proto.Marshal(silenced) if err != nil { return &store.ErrEncode{Err: err} diff --git a/backend/store/etcd/silenced_store_test.go b/backend/store/etcd/silenced_store_test.go index 2fd687b0b1..c47b9a27ef 100644 --- a/backend/store/etcd/silenced_store_test.go +++ b/backend/store/etcd/silenced_store_test.go @@ -67,8 +67,9 @@ func TestSilencedStorage(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, entry) assert.Equal(t, "subscription:*", entry.Name) - // Entries without expirations should return -1 - assert.Equal(t, int64(-1), entry.Expire) + + // check entries without -1 expiry + assert.NotEqual(t, int64(-1), entry.Expire) // Delete silenced entry by name err = store.DeleteSilencedEntryByName(ctx, silenced.Name) @@ -76,6 +77,7 @@ func TestSilencedStorage(t *testing.T) { // Update a silenced entry's expire time silenced.Expire = 2 + silenced.ExpireAt = 0 err = store.UpdateSilencedEntry(ctx, silenced) assert.NoError(t, err) @@ -100,6 +102,7 @@ func TestSilencedStorageWithExpire(t *testing.T) { silenced := types.FixtureSilenced("subscription:checkname") silenced.Namespace = "default" silenced.Expire = 15 + silenced.ExpireAt = 0 ctx := context.WithValue(context.Background(), types.NamespaceKey, silenced.Namespace) err := store.UpdateSilencedEntry(ctx, silenced) @@ -120,9 +123,9 @@ func TestSilencedStorageWithBegin(t *testing.T) { silenced := types.FixtureSilenced("subscription:checkname") silenced.Namespace = "default" // set a begin time in the future - silenced.Begin = time.Date(1970, 01, 01, 01, 00, 00, 00, time.UTC).Unix() + silenced.Begin = time.Now().Add(time.Duration(1) * time.Second).Unix() // current time is before the start time - currentTime := time.Date(1970, 01, 01, 00, 00, 00, 00, time.UTC).Unix() + currentTime := time.Now().Unix() ctx := context.WithValue(context.Background(), types.NamespaceKey, silenced.Namespace) err := store.UpdateSilencedEntry(ctx, silenced) @@ -137,8 +140,11 @@ func TestSilencedStorageWithBegin(t *testing.T) { require.NotNil(t, entry) assert.False(t, entry.Begin < currentTime) + // Wait for begin time to elapse current time. i.e let silencing begin + time.Sleep(3 * time.Second) + // reset current time to be ahead of begin time - currentTime = time.Date(1970, 01, 01, 02, 00, 00, 00, time.UTC).Unix() + currentTime = time.Now().Unix() assert.True(t, entry.Begin < currentTime) }) } @@ -168,3 +174,26 @@ func TestSilencedStorageWithBeginAndExpire(t *testing.T) { assert.Equal(t, entry.Expire, int64(15)) }) } + +func TestSilencedStorageWithMaxAllowedThresholdExpiry(t *testing.T) { + testWithEtcd(t, func(store store.Store) { + silenced := types.FixtureSilenced("subscription:checkname") + silenced.Namespace = "default" + silenced.ExpireAt = time.Now().Add(time.Duration(30000) * time.Second).Unix() + // set a begin time + silenced.Begin = time.Now().Unix() + ctx := context.WithValue(context.Background(), types.NamespaceKey, silenced.Namespace) + + err := store.UpdateSilencedEntry(ctx, silenced) + + // assert that error is thrown for breaching max expiry time allowed + assert.Error(t, err) + + entry, err := store.GetSilencedEntryByName(ctx, silenced.Name) + + // assert that entry is nil + assert.NoError(t, err) + assert.Nil(t, entry) + + }) +} diff --git a/backend/store/etcd/store.go b/backend/store/etcd/store.go index f1bd46c22e..618f9c7f3b 100644 --- a/backend/store/etcd/store.go +++ b/backend/store/etcd/store.go @@ -7,6 +7,7 @@ import ( "path" "reflect" "strings" + "time" "github.com/gogo/protobuf/proto" "github.com/sensu/sensu-go/backend/store" @@ -22,10 +23,16 @@ const ( EtcdRoot = "/sensu.io" ) +type Config struct { + DefaultSilencedExpiryTime time.Duration + MaxSilencedExpiryTimeAllowed time.Duration +} + // Store is an implementation of the sensu-go/backend/store.Store iface. type Store struct { client *clientv3.Client keepalivesPath string + cfg Config } // NewStore creates a new Store. @@ -38,6 +45,11 @@ func NewStore(client *clientv3.Client, name string) *Store { return store } +// SetConfig adds Store configurations +func SetConfig(cfg Config, store *Store) { + store.cfg = cfg +} + // Create the given key with the serialized object. func Create(ctx context.Context, client *clientv3.Client, key, namespace string, object interface{}) error { bytes, err := marshal(object) diff --git a/backend/store/etcd/store_test.go b/backend/store/etcd/store_test.go index 58b729c0ff..c11524942a 100644 --- a/backend/store/etcd/store_test.go +++ b/backend/store/etcd/store_test.go @@ -8,6 +8,7 @@ import ( "encoding/json" "fmt" "testing" + "time" "github.com/gogo/protobuf/proto" corev2 "github.com/sensu/core/v2" @@ -28,6 +29,9 @@ func testWithEtcd(t *testing.T, f func(store.Store)) { s := NewStore(client, e.Name()) + s.cfg.MaxSilencedExpiryTimeAllowed = time.Duration(3000 * time.Second) + s.cfg.DefaultSilencedExpiryTime = time.Duration(3000 * time.Second) + // Mock a default namespace require.NoError(t, s.CreateNamespace(context.Background(), types.FixtureNamespace("default"))) @@ -42,6 +46,9 @@ func testWithEtcdStore(t *testing.T, f func(*Store)) { s := NewStore(client, e.Name()) + s.cfg.MaxSilencedExpiryTimeAllowed = time.Duration(3000 * time.Second) + s.cfg.DefaultSilencedExpiryTime = time.Duration(3000 * time.Second) + // Mock a default namespace require.NoError(t, s.CreateNamespace(context.Background(), types.FixtureNamespace("default"))) @@ -56,6 +63,9 @@ func testWithEtcdClient(t *testing.T, f func(store.Store, *clientv3.Client)) { s := NewStore(client, e.Name()) + s.cfg.MaxSilencedExpiryTimeAllowed = time.Duration(3000 * time.Second) + s.cfg.DefaultSilencedExpiryTime = time.Duration(3000 * time.Second) + // Mock a default namespace require.NoError(t, s.CreateNamespace(context.Background(), types.FixtureNamespace("default"))) diff --git a/backend/store/store.go b/backend/store/store.go index 8953242c89..48b892a1c0 100644 --- a/backend/store/store.go +++ b/backend/store/store.go @@ -60,6 +60,15 @@ func (e *ErrNotFound) Error() string { return fmt.Sprintf("key %s not found", e.Key) } +// ErrThreshold is returned when configured thresholds are reached +type ErrThreshold struct { + Err error +} + +func (e *ErrThreshold) Error() string { + return fmt.Sprintf("Threshold reached: %s", e.Err.Error()) +} + // ErrNotValid is returned when an object failed validation type ErrNotValid struct { Err error From 9587df6d89d222ccc791ecf842229dbd8936a884 Mon Sep 17 00:00:00 2001 From: Justin Kolberg Date: Wed, 31 Jan 2024 13:38:33 -0800 Subject: [PATCH 145/173] Update CHANGELOG for 6.11.0 Signed-off-by: Justin Kolberg --- CHANGELOG-6.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 5551cd6094..119040c1ad 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## Unreleased +## [6.11.0] - 2024-01-31 ### Changed - Upgraded CI Go version to 1.21.3 From 3b29d198c318636abe73bce3be5ed03a2bec5ea3 Mon Sep 17 00:00:00 2001 From: Rajshekar Chavakula Date: Fri, 2 Feb 2024 15:04:41 +0530 Subject: [PATCH 146/173] Condition modification for interactive create silence option Signed-off-by: Rajshekar Chavakula --- backend/store/etcd/silenced_store.go | 9 ++++- backend/store/etcd/silenced_store_test.go | 46 +++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/backend/store/etcd/silenced_store.go b/backend/store/etcd/silenced_store.go index 8c28c5fdf9..c7fe3319ce 100644 --- a/backend/store/etcd/silenced_store.go +++ b/backend/store/etcd/silenced_store.go @@ -17,6 +17,7 @@ import ( const ( silencedPathPrefix = "silenced" maxTxnOps = 64 // this is half of the etcd default maximum + silencedLimitError = "silenced crossed maximum duration allowed" ) var ( @@ -211,7 +212,7 @@ func (s *Store) UpdateSilencedEntry(ctx context.Context, silenced *corev2.Silenc // check for maximum allowed duration for silenced allowed if silenced.ExpireAt > 0 && (silenced.ExpireAt > allowedMaxTime) { - err := errors.New("silenced crossed maximum duration allowed") + err := errors.New(silencedLimitError) return &store.ErrThreshold{Err: err} } @@ -221,6 +222,12 @@ func (s *Store) UpdateSilencedEntry(ctx context.Context, silenced *corev2.Silenc start = time.Unix(silenced.Begin, 0) } silenced.ExpireAt = start.Add(time.Duration(silenced.Expire) * time.Second).Unix() + + // check for maximum allowed duration for silenced allowed + if silenced.ExpireAt > allowedMaxTime { + err := errors.New(silencedLimitError) + return &store.ErrThreshold{Err: err} + } } // set default silenced expiry time configured in backend yaml file diff --git a/backend/store/etcd/silenced_store_test.go b/backend/store/etcd/silenced_store_test.go index c47b9a27ef..709551af00 100644 --- a/backend/store/etcd/silenced_store_test.go +++ b/backend/store/etcd/silenced_store_test.go @@ -197,3 +197,49 @@ func TestSilencedStorageWithMaxAllowedThresholdExpiry(t *testing.T) { }) } + +func TestSilencedStorageWithMaxAllowedThresholdExpiryWithError(t *testing.T) { + testWithEtcd(t, func(store store.Store) { + silenced := types.FixtureSilenced("subscription:checkname") + silenced.Namespace = "default" + silenced.ExpireAt = 0 + silenced.Expire = 3001 + silenced.Begin = time.Now().Unix() + ctx := context.WithValue(context.Background(), types.NamespaceKey, silenced.Namespace) + + err := store.UpdateSilencedEntry(ctx, silenced) + + // assert that error is thrown for breaching max expiry time allowed + assert.Error(t, err) + + entry, err := store.GetSilencedEntryByName(ctx, silenced.Name) + + // assert that entry is nil + assert.NoError(t, err) + assert.Nil(t, entry) + + }) +} + +func TestSilencedStorageWithMaxAllowedThresholdExpiryAndWithoutError(t *testing.T) { + testWithEtcd(t, func(store store.Store) { + silenced := types.FixtureSilenced("subscription:checkname") + silenced.Namespace = "default" + silenced.ExpireAt = 0 + silenced.Expire = 100 + silenced.Begin = time.Now().Unix() + ctx := context.WithValue(context.Background(), types.NamespaceKey, silenced.Namespace) + + err := store.UpdateSilencedEntry(ctx, silenced) + + // assert that error is nil + assert.Nil(t, err) + + entry, err := store.GetSilencedEntryByName(ctx, silenced.Name) + + // assert that entry is not nil + assert.NoError(t, err) + assert.NotNil(t, entry) + + }) +} From 2df7fbd15a0f43b9135a560fe7b0c6ba47be7d16 Mon Sep 17 00:00:00 2001 From: Rajshekar Chavakula Date: Fri, 2 Feb 2024 15:15:31 +0530 Subject: [PATCH 147/173] Test case failure change Signed-off-by: Rajshekar Chavakula --- backend/store/etcd/silenced_store_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/store/etcd/silenced_store_test.go b/backend/store/etcd/silenced_store_test.go index 709551af00..a206806471 100644 --- a/backend/store/etcd/silenced_store_test.go +++ b/backend/store/etcd/silenced_store_test.go @@ -156,7 +156,7 @@ func TestSilencedStorageWithBeginAndExpire(t *testing.T) { silenced.Expire = 15 currentTime := time.Now().UTC().Unix() // set a begin time in the future - silenced.Begin = currentTime + 3600 + silenced.Begin = currentTime + 100 // current time is before the start time ctx := context.WithValue(context.Background(), types.NamespaceKey, silenced.Namespace) From e133e8855750ced6eba07cabb253bb8c5ef85558 Mon Sep 17 00:00:00 2001 From: Rajshekar Chavakula Date: Tue, 6 Feb 2024 12:17:18 +0530 Subject: [PATCH 148/173] graphql error code addition Signed-off-by: Rajshekar Chavakula --- backend/apid/actions/error.go | 4 ++++ backend/apid/graphql/error.go | 2 ++ backend/apid/graphql/schema/errors.gql.go | 8 ++++++++ backend/apid/graphql/schema/errors.graphql | 6 ++++++ 4 files changed, 20 insertions(+) diff --git a/backend/apid/actions/error.go b/backend/apid/actions/error.go index 533ad29b1c..9b3e3b7aeb 100644 --- a/backend/apid/actions/error.go +++ b/backend/apid/actions/error.go @@ -52,6 +52,9 @@ const ( // the operation has completed successfully. For example, a successful // response from a server could have been delayed long DeadlineExceeded + + // Threshold set in config reached. These settings are done in config of backend.yaml + ThresholdReached ) // Default error messages if not message is provided. @@ -65,6 +68,7 @@ var standardErrorMessages = map[ErrCode]string{ PaymentRequired: "license required", PreconditionFailed: "precondition failed", DeadlineExceeded: "deadline exceeded", + ThresholdReached: "Threshold reached", } // Error describes an issue that ocurred while performing the action. diff --git a/backend/apid/graphql/error.go b/backend/apid/graphql/error.go index a85b85e8b8..e81c66dd50 100644 --- a/backend/apid/graphql/error.go +++ b/backend/apid/graphql/error.go @@ -30,6 +30,8 @@ func newStdErr(input string, err error) stdErr { out.code = schema.ErrCodes.ERR_ALREADY_EXISTS case (*store.ErrNotFound): out.code = schema.ErrCodes.ERR_NOT_FOUND + case (*store.ErrThreshold): + out.code = schema.ErrCodes.ERR_THRESHOLD_REACHED } return out } diff --git a/backend/apid/graphql/schema/errors.gql.go b/backend/apid/graphql/schema/errors.gql.go index c78d38ae39..de1469e57d 100644 --- a/backend/apid/graphql/schema/errors.gql.go +++ b/backend/apid/graphql/schema/errors.gql.go @@ -208,6 +208,7 @@ var ErrCodes = _EnumTypeErrCodeValues{ ERR_INTERNAL: "ERR_INTERNAL", ERR_NOT_FOUND: "ERR_NOT_FOUND", ERR_PERMISSION_DENIED: "ERR_PERMISSION_DENIED", + ERR_THRESHOLD_REACHED: "ERR_THRESHOLD_REACHED", } // ErrCodeType A terse description of an error. @@ -242,6 +243,11 @@ func _EnumTypeErrCodeConfigFn() graphql1.EnumConfig { Description: "Operation was canceled because the authorization token did not have sufficient\npermissions.", Value: "ERR_PERMISSION_DENIED", }, + "ERR_THRESHOLD_REACHED": &graphql1.EnumValueConfig{ + DeprecationReason: "", + Description: "Indicates that set thresholds in configured have reached", + Value: "ERR_THRESHOLD_REACHED", + }, }, } } @@ -267,4 +273,6 @@ type _EnumTypeErrCodeValues struct { permissions. */ ERR_PERMISSION_DENIED ErrCode + // ERR_THRESHOLD_REACHED - Indicates that set thresholds in configured have reached + ERR_THRESHOLD_REACHED ErrCode } diff --git a/backend/apid/graphql/schema/errors.graphql b/backend/apid/graphql/schema/errors.graphql index ef462ca582..29c0887723 100644 --- a/backend/apid/graphql/schema/errors.graphql +++ b/backend/apid/graphql/schema/errors.graphql @@ -51,4 +51,10 @@ enum ErrCode { permissions. """ ERR_PERMISSION_DENIED + + """ + Indicates that set thresholds in configured have reached + """ + ERR_THRESHOLD_REACHED + } From 37c80f4f69ca01843fb9df378a1d8a1c7b30dfa7 Mon Sep 17 00:00:00 2001 From: Rajshekar Chavakula Date: Wed, 14 Feb 2024 21:42:26 +0530 Subject: [PATCH 149/173] condition change to support password reset Signed-off-by: Rajshekar Chavakula --- backend/apid/middlewares/authorization_attributes.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/apid/middlewares/authorization_attributes.go b/backend/apid/middlewares/authorization_attributes.go index cffa691c63..386750cc73 100644 --- a/backend/apid/middlewares/authorization_attributes.go +++ b/backend/apid/middlewares/authorization_attributes.go @@ -93,9 +93,8 @@ func (a AuthorizationAttributes) Then(next http.Handler) http.Handler { attrs.Resource = types.LocalSelfUserResource } - // Change the resource to LocalSelfUserResource if a user tries to change - // its own password - if attrs.Verb == "update" && vars["subresource"] == "password" { + switch vars["subresource"] { + case "password", "": attrs.Resource = types.LocalSelfUserResource } } From d63e7afaf572e3d8409f106e06260fa1ef739cfc Mon Sep 17 00:00:00 2001 From: Rajshekar Chavakula Date: Thu, 29 Feb 2024 14:19:27 +0530 Subject: [PATCH 150/173] creation of new router for password change from webui Signed-off-by: Rajshekar Chavakula --- .../middlewares/authorization_attributes.go | 7 +++- backend/apid/routers/users.go | 32 +++++++++++++++++++ backend/apid/routers/users_test.go | 15 +++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/backend/apid/middlewares/authorization_attributes.go b/backend/apid/middlewares/authorization_attributes.go index 386750cc73..c55350d53a 100644 --- a/backend/apid/middlewares/authorization_attributes.go +++ b/backend/apid/middlewares/authorization_attributes.go @@ -93,8 +93,13 @@ func (a AuthorizationAttributes) Then(next http.Handler) http.Handler { attrs.Resource = types.LocalSelfUserResource } + // check if request comes from webui + if strings.Contains(r.URL.Path, "/change_password") { + attrs.Resource = types.LocalSelfUserResource + } + switch vars["subresource"] { - case "password", "": + case "password": attrs.Resource = types.LocalSelfUserResource } } diff --git a/backend/apid/routers/users.go b/backend/apid/routers/users.go index 2b81d4e913..69714eaff9 100644 --- a/backend/apid/routers/users.go +++ b/backend/apid/routers/users.go @@ -59,6 +59,9 @@ func (r *UsersRouter) Mount(parent *mux.Router) { // Password change & reset routes.Path("{id}/{subresource:password}", r.updatePassword).Methods(http.MethodPut) routes.Path("{id}/{subresource:reset_password}", r.resetPassword).Methods(http.MethodPut) + + // password update from web ui + routes.Path("{id}/{subresource:change_password}", r.changePasswordFromWeb).Methods(http.MethodPut) } func (r *UsersRouter) get(req *http.Request) (interface{}, error) { @@ -153,6 +156,35 @@ func (r *UsersRouter) updatePassword(req *http.Request) (interface{}, error) { return nil, err } +// changePasswordFromWeb updates user password when requests are sent from web UI +func (r *UsersRouter) changePasswordFromWeb(req *http.Request) (interface{}, error) { + params := map[string]string{} + if err := UnmarshalBody(req, ¶ms); err != nil { + return nil, err + } + + vars := mux.Vars(req) + username, err := url.PathUnescape(vars["id"]) + if err != nil { + return nil, err + } + newPassword := params["newPassword"] + oldPassword := params["password"] + + user, err := r.controller.AuthenticateUser(req.Context(), username, oldPassword) + if err != nil { + return nil, err + } + + // set new password for updating into store + user.Password = newPassword + + // Remove any old password hash + user.PasswordHash = "" + err = r.controller.CreateOrReplace(req.Context(), user) + return nil, err +} + // resetPassword updates a user password without any kind of verification func (r *UsersRouter) resetPassword(req *http.Request) (interface{}, error) { params := map[string]string{} diff --git a/backend/apid/routers/users_test.go b/backend/apid/routers/users_test.go index 7d8b0cfe59..30c754fa48 100644 --- a/backend/apid/routers/users_test.go +++ b/backend/apid/routers/users_test.go @@ -235,6 +235,21 @@ func TestUsersRouter(t *testing.T) { }, wantStatusCode: http.StatusCreated, }, + { + name: "update password from web ui", + method: http.MethodPut, + path: path.Join(fixture.URIPath(), "change_password"), + body: []byte(`{"username":"foo","password":"admin123","newPassword":"admin123"}`), + controllerFunc: func(c *mockUserController) { + c.On("AuthenticateUser", mock.Anything, mock.Anything, mock.Anything). + Return(&corev2.User{Username: "foo", Password: "admin123", PasswordHash: "admin123_hash"}, nil). + Once() + c.On("CreateOrReplace", mock.Anything, mock.Anything). + Return(nil). + Once() + }, + wantStatusCode: http.StatusCreated, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { From 175493b538e0239b2b45ca0eaf56cb299829cc3b Mon Sep 17 00:00:00 2001 From: Rajshekar Chavakula Date: Fri, 1 Mar 2024 13:29:42 +0530 Subject: [PATCH 151/173] changelog added for silenced backend settings Signed-off-by: Rajshekar Chavakula --- CHANGELOG-6.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 5551cd6094..8d8950e152 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -8,6 +8,11 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +### Added +- Added `max-silenced-expiry-time-allowed` (in minutes) backend configuration variable to control maximum time an alert can be silenced. +- Added `default-silenced-expiry-time` (in minutes) backend configuration variable to create silenced with a default expiry time if user doesn't set expiry time while creating an silence. + + ### Changed - Upgraded CI Go version to 1.21.3 - Upgraded jwt version to 4.4.3 From 0ad2ebe8f3c6bda100d686b3ce973bf5302b1424 Mon Sep 17 00:00:00 2001 From: Rajshekar Chavakula Date: Fri, 1 Mar 2024 17:21:24 +0530 Subject: [PATCH 152/173] variable name change to maintain consistency Signed-off-by: Rajshekar Chavakula --- backend/apid/routers/users.go | 2 +- backend/apid/routers/users_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apid/routers/users.go b/backend/apid/routers/users.go index 69714eaff9..9a200a1206 100644 --- a/backend/apid/routers/users.go +++ b/backend/apid/routers/users.go @@ -168,7 +168,7 @@ func (r *UsersRouter) changePasswordFromWeb(req *http.Request) (interface{}, err if err != nil { return nil, err } - newPassword := params["newPassword"] + newPassword := params["password_new"] oldPassword := params["password"] user, err := r.controller.AuthenticateUser(req.Context(), username, oldPassword) diff --git a/backend/apid/routers/users_test.go b/backend/apid/routers/users_test.go index 30c754fa48..039e3cf9f3 100644 --- a/backend/apid/routers/users_test.go +++ b/backend/apid/routers/users_test.go @@ -239,7 +239,7 @@ func TestUsersRouter(t *testing.T) { name: "update password from web ui", method: http.MethodPut, path: path.Join(fixture.URIPath(), "change_password"), - body: []byte(`{"username":"foo","password":"admin123","newPassword":"admin123"}`), + body: []byte(`{"username":"foo","password":"admin123","password_new":"admin123"}`), controllerFunc: func(c *mockUserController) { c.On("AuthenticateUser", mock.Anything, mock.Anything, mock.Anything). Return(&corev2.User{Username: "foo", Password: "admin123", PasswordHash: "admin123_hash"}, nil). From a3e6388c7c9791c54dd5625b68abddce0748be43 Mon Sep 17 00:00:00 2001 From: Rajshekar Chavakula Date: Fri, 15 Mar 2024 11:39:04 +0530 Subject: [PATCH 153/173] review comment addressal related to url fragment check Signed-off-by: Rajshekar Chavakula --- backend/apid/middlewares/authorization_attributes.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/backend/apid/middlewares/authorization_attributes.go b/backend/apid/middlewares/authorization_attributes.go index c55350d53a..ca748cd313 100644 --- a/backend/apid/middlewares/authorization_attributes.go +++ b/backend/apid/middlewares/authorization_attributes.go @@ -93,13 +93,8 @@ func (a AuthorizationAttributes) Then(next http.Handler) http.Handler { attrs.Resource = types.LocalSelfUserResource } - // check if request comes from webui - if strings.Contains(r.URL.Path, "/change_password") { - attrs.Resource = types.LocalSelfUserResource - } - switch vars["subresource"] { - case "password": + case "password", "change_password": attrs.Resource = types.LocalSelfUserResource } } From 5b52880822c5aa2fe12a5b615d8965346698bf70 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 12 Sep 2024 15:07:37 +0530 Subject: [PATCH 154/173] etcd user session cleanup every 11 minutes Signed-off-by: manisha kumari --- backend/store/etcd/session.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/store/etcd/session.go b/backend/store/etcd/session.go index 9f95b85bf1..b0098e819f 100644 --- a/backend/store/etcd/session.go +++ b/backend/store/etcd/session.go @@ -30,12 +30,15 @@ func (s *Store) GetSession(ctx context.Context, username, sessionID string) (str } // UpdateSession applies the supplied state to the session uniquely identified -// by the given username and session ID. +// by the given username and session ID and TTL of 11 minutes func (s *Store) UpdateSession(ctx context.Context, username, sessionID, state string) error { - if _, err := s.client.Put(ctx, userSessionPath(username, sessionID), state); err != nil { + leaseResp, err := s.client.Grant(ctx, 60*11) + if err != nil { + fmt.Errorf("%s", err) + } + if _, err := s.client.Put(ctx, userSessionPath(username, sessionID), state, clientv3.WithLease(leaseResp.ID)); err != nil { return err } - return nil } From edf94b0d9d61c1d6ac553a97e4238323e3149c4f Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 12 Sep 2024 15:55:58 +0530 Subject: [PATCH 155/173] added change log Signed-off-by: manisha kumari --- CHANGELOG-6.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 119040c1ad..22a7c1a08d 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [6.11.1] - 2024-09-12 + +### Changed +- Added TTl to each entry in user-session within etcd +- TTl value is 11 minutes + ## [6.11.0] - 2024-01-31 ### Changed From 18565620e23f90efaa05e0e61d4db0375e27cca2 Mon Sep 17 00:00:00 2001 From: ManishaKumari295 <138477142+ManishaKumari295@users.noreply.github.com> Date: Thu, 12 Sep 2024 18:53:53 +0530 Subject: [PATCH 156/173] 5002-manual check execution bugfix (#5042) Signed-off-by: manisha kumari --- CHANGELOG-6.md | 831 ++++++++++++++-------------- backend/schedulerd/executor.go | 7 +- backend/schedulerd/executor_test.go | 63 ++- 3 files changed, 482 insertions(+), 419 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 119040c1ad..3ad4503336 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -8,6 +8,11 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## [6.11.0] - 2024-01-31 +### Fixed +- Manual check execution of scheduled check will also be able to fetch the matched entities + +## [6.11.0] - 2024-01-31 + ### Changed - Upgraded CI Go version to 1.21.3 - Upgraded jwt version to 4.4.3 @@ -62,41 +67,41 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Added - A sensu.io/output\_truncated\_bytes label is now applied to events when -the check output has been truncated due to a check's max\_output\_size -configuration. + the check output has been truncated due to a check's max\_output\_size + configuration. ## [6.8.1] - 2022-09-13 ### Changed - Check subdues are now evaluated on a half open interval such that there -should be no unintended gaps between overlapping subdues. + should be no unintended gaps between overlapping subdues. ### Security - Addresses issue where the entity list view would display values of redacted -labels. + labels. ## [6.8.0] - 2022-08-24 ### Changed - Eventd now prioritizes keepalive events over other events in order to -mitigate the potential of keepalive event creation storms and mass agent -disconnects. + mitigate the potential of keepalive event creation storms and mass agent + disconnects. ### Added - GlobalResource interface in core/v3 allows core/v3 resources to -be marked as global resources. + be marked as global resources. - Added `--api-serve-wait-time` backend flag to delay serving API requests -for a period of time after startup. + for a period of time after startup. - Added `/ready` endpoint to the sensu-go API. Returns 200 when the API is ready -to serve traffic. + to serve traffic. - Added `--agent-serve-wait-time` backend flag to delay accepting agent -connections for a period of time after startup. + connections for a period of time after startup. - Added `/ready` endpoint to the agent listener. Returns 200 when the listener -is ready to accept agent connections. + is ready to accept agent connections. ### Fixed - Fixed a bug where sensu-backend could crash if the BackendIDGetter -encounters etcd client unavailability. + encounters etcd client unavailability. ## [6.7.5] - 2022-08-10 @@ -112,16 +117,16 @@ encounters etcd client unavailability. ### Changed - Agents will no longer execute check requests with equal or older issued -timestamps than the issued timestamp for the last executed check request with -the same check name. + timestamps than the issued timestamp for the last executed check request with + the same check name. ## [6.7.2] - 2022-05-12 ### Added - Added the `etcd-unsafe-no-fsync` backend configuration option, -making it possible to run a sensu-backend with an embedded etcd node -for testing and development without placing lots of load on the file -system. + making it possible to run a sensu-backend with an embedded etcd node + for testing and development without placing lots of load on the file + system. ### Fixed - Print the correct round robin scheduler source (etcd or postgres). @@ -133,7 +138,7 @@ system. ### Changed - Cron scheduler now logs that it is stopping before it begins the process of -stopping. + stopping. ### Fixed - Fixed several data races in schedulerd. @@ -151,9 +156,9 @@ stopping. - Log agent IP address for connections with faulty TLS configurations. - ARM Version detection - Fixed a bug where pipelines in check configuration were not represented in -the check object of events that were produced with the check configuration. + the check object of events that were produced with the check configuration. - Socket handlers will no longer cause sensu-backend to panic when interrupted -mid-write. + mid-write. ### Changed - The default embedded etcd heartbeat interval has been increased from 100 to 300. @@ -165,15 +170,15 @@ mid-write. ### Fixed - [GraphQL] Fixed issue where one could not use an offset >= 500 when paging -through entities. + through entities. ## [6.6.5] - 2022-02-03 ### Fixed - Fixed interactive wording for `sensu-backend upgrade`. The wording no longer -refers to Sensu 5.x. + refers to Sensu 5.x. - Resolves unpredictable ringv2 behavior when identical subscriptions are -created from different contexts. + created from different contexts. ### Added - Added metric threshold service checks. @@ -185,18 +190,18 @@ created from different contexts. ### Changed - Agent now persists prometheus HELP messages as a metric tag. - Resource specifications can now use precise core/v2 and core/v3 module -versions. For instance, api_version: core/v2.5.1 or core/v2.3. The resource -validation system will reject the resource if Sensu does not have at least the -specified version. + versions. For instance, api_version: core/v2.5.1 or core/v2.3. The resource + validation system will reject the resource if Sensu does not have at least the + specified version. ### Fixed - Empty map fields (e.g. an entity with no labels) are no longer treated as nil -when used with token substitution. + when used with token substitution. ## [6.6.4] - 2022-01-13 ### Added - Add `sensu_go_event_metric_points_processed` counter metric and -included it in tessen reporting. + included it in tessen reporting. ### Fixed - Referencing a non-existent handler in a pipeline no longer results in a crash. @@ -205,28 +210,28 @@ included it in tessen reporting. ### Added - Added `etcd-client-log-level` configuration flag for setting the log level of -the etcd client used internally within sensu-backend. + the etcd client used internally within sensu-backend. ### Changed - [GraphQL] Improvements to entity list response times and significant reduction -in memory usage. + in memory usage. - The agentd daemon now starts up after all other daemons which improves the -chances of a cluster recovering after the loss of a backend. + chances of a cluster recovering after the loss of a backend. - sensu-backend will now crash when its daemons do not stop within 30s. This can -happen as the result of an intentional shutdown, or when an internal restart is -triggered by database unavailability. This only applies when --no-embed-etcd is -true. Embedded etcd sensu-backend will do everything it can to avoid crashing, -which is necessary to avoid member corruption. + happen as the result of an intentional shutdown, or when an internal restart is + triggered by database unavailability. This only applies when --no-embed-etcd is + true. Embedded etcd sensu-backend will do everything it can to avoid crashing, + which is necessary to avoid member corruption. ### Fixed - New agent sessions will no longer result in a leaked Etcd lease. - sensu-backend now prints warning and continues instead of crashing -when --event-log-file cannot be written to. + when --event-log-file cannot be written to. - Fixed a crash that can occur when keepalive leases are revoked on another -backend, or by an etcd operator. + backend, or by an etcd operator. - Fixed an issue where sensu-backend would not terminate correctly. - Proxy entity state is now created when it is missing and a matching entity -config already exists. + config already exists. ### Changed - Removed unused rate limiting code in the liveness package. @@ -234,56 +239,56 @@ config already exists. ### Added - Add `sensu_go_event_metric_points_processed` counter metric and -included it in tessen reporting. + included it in tessen reporting. ## [6.6.1, 6.6.2] - 2021-11-29 ### Added - Check & CheckConfig validation errors related to cron now provide additional -context. + context. ### Fixed - Remove debugging log entry. - Event executed timestamps are now set when resolving an event through -sensuctl or the webui. + sensuctl or the webui. ## [6.6.0] - 2021-11-25 ### Added - Add backend label to logged metrics. - Check & CheckConfig validation errors related to cron now provide additional -context. + context. ### Fixed - In addition to the context error print the connection error when -sensu-go can't connect to etcd. + sensu-go can't connect to etcd. - Fixed a bug where sensu-backend could crash if the BackendIDGetter -encounters etcd client unavailability. + encounters etcd client unavailability. ### Changed - Empty and zero value configuration parameters for `etcd` do not -overwrite defaults anymore. + overwrite defaults anymore. ## [6.5.5] - 2021-11-19 ### Added - Added objectives (0.5, 0.9, 0.99) to `graphql_duration_seconds` metric. - Added `graphql_duration_seconds`, `graphql_duration_seconds_sum` & -`graphql_duration_seconds_count` to the metrics log. + `graphql_duration_seconds_count` to the metrics log. - Added new prometheus metrics for tracking lease operations. - Added `sensu_go_lease_ops` to the metrics log. - Added `--api-write-timeout` & `--dashboard-write-timeout` flags to allow -end users to configure the HTTP server's write timeout value + end users to configure the HTTP server's write timeout value ### Fixed - Duration metrics for assets, pipeline, and eventd have been updated to use -milliseconds to match other duration metrics. + milliseconds to match other duration metrics. - Fixed an error where sensu-backend or sensu-agent could panic due to -concurrent websocket writes. + concurrent websocket writes. - The sensu-backend's /version API has updated to reflect the version of a an -external etcd cluster. + external etcd cluster. - When keepalive lease grant operations fail due to rate limiting, they are now -retried. + retried. ## [6.5.3, 6.5.4] - 2021-10-29 @@ -292,16 +297,16 @@ retried. ### Fixed - Fixed a bug where API validation caused javascript environment variable -specifications to be rejected. + specifications to be rejected. - Fixed a bug where the asset expansion error was not handled ## [6.5.2] - 2021-10-28 ### Added - Added `status` & `event_type` labels to the sensu_go_event_handler_duration -metric. + metric. - Added `sensu_go_event_handler_duration_sum` & -`sensu_go_event_handler_duration_count` to the metrics log. + `sensu_go_event_handler_duration_count` to the metrics log. - Added metric `sensu_go_eventd_create_proxy_entity_duration`. - Added metric `sensu_go_eventd_update_event_duration`. - Added metric `sensu_go_eventd_bus_publish_duration`. @@ -332,32 +337,32 @@ metric. ### Added - Added javascript mutators, which can be selected by setting -"type": "javascript" on core/v2.Mutators, and specifying valid ECMAScript 5 -code in the "eval" field. See documentation for details. + "type": "javascript" on core/v2.Mutators, and specifying valid ECMAScript 5 + code in the "eval" field. See documentation for details. - Added `core/v2.Pipeline` resource for configuring event pipelines. - Added `pipelines` field to `Check` and `CheckConfig` - Added the platform metrics log. This log contains a listing of core Sensu -metrics in influx-line format. It is enabled by default but can be disabled -with the --disable-platform-metrics flag. By default the log is appended to -every 60s, and written to /var/lib/sensu/sensu-backend/stats.log. + metrics in influx-line format. It is enabled by default but can be disabled + with the --disable-platform-metrics flag. By default the log is appended to + every 60s, and written to /var/lib/sensu/sensu-backend/stats.log. - Open-sourced the previously enterprise-only event logger. The event logger -can be used to send the events a backend processes to a rotatable log file. + can be used to send the events a backend processes to a rotatable log file. - Added sensuctl commands for pipeline list, info, and delete. - Added support for `SENSU_BACKEND_ETCD_CLIENT_USERNAME` and -`SENSU_BACKEND_ETCD_CLIENT_PASSWORD` environment variables for connecting to -external etcds that use user/password authentication instead of client -certificate authentication. Typical with DBaaS etcd providers. These can only be -set via these environment variables and intentionally cannot be set via flags. + `SENSU_BACKEND_ETCD_CLIENT_PASSWORD` environment variables for connecting to + external etcds that use user/password authentication instead of client + certificate authentication. Typical with DBaaS etcd providers. These can only be + set via these environment variables and intentionally cannot be set via flags. ### Fixed - `sensuctl env` now properly displays the `SENSU_API_KEY` and `SENSU_TIMEOUT` -environment variables. + environment variables. - `sensuctl command exec` now properly adds the `SENSU_API_KEY` and -`SENSU_TIMEOUT` variables to the command's environment. + `SENSU_TIMEOUT` variables to the command's environment. - Fixed a crash when running the backend on `darwin/arm64` when compressing a -wrapped resource. + wrapped resource. - Fixed a bug where large number of silences could cause etcd errors by not -exceeding etcd'd default maximum number of transaction operations. + exceeding etcd'd default maximum number of transaction operations. ### Changed - Upgraded Go version from 1.16.5 to 1.17.1. @@ -366,51 +371,51 @@ exceeding etcd'd default maximum number of transaction operations. ### Added - Added `sensu_go_agentd_event_bytes` & `sensu_go_store_event_bytes` summary -metrics to the `/metrics` endpoint. + metrics to the `/metrics` endpoint. ## [6.4.1] - 2021-08-24 ### Added - Added `ignore-already-initialized` configuration flag to the sensu-backend -init command for returning exit code 0 when a cluster has already been -initialized. + init command for returning exit code 0 when a cluster has already been + initialized. - Added --retry-min, --retry-max, and --retry-multiplier flags to sensu-agent -for controlling agent retry exponential backoff behaviour. --retry-min and ---retry-max expect duration values like 1s, 10m, 4h. --retry-multiplier expects -a decimal multiplier value. + for controlling agent retry exponential backoff behaviour. --retry-min and + --retry-max expect duration values like 1s, 10m, 4h. --retry-multiplier expects + a decimal multiplier value. - Added ProcessedBy field to check results. The ProcessedBy field indicates which -agent processed a particular event. + agent processed a particular event. - Added API key support for admin user at cluster init time. - Added `sensu_go_agentd_event_bytes` & `sensu_go_store_event_bytes` summary -metrics to the `/metrics` endpoint. + metrics to the `/metrics` endpoint. - Added support for environment variable arguments in `sensuctl`. ### Changed - When deleting resource with sensuctl, the resource type will now be displayed -in the confirmation prompt + in the confirmation prompt - When keepalived encounters round-robin ring errors, the backend no longer -internally restarts. + internally restarts. - The core/v2.Mutator type now has a Type field which can be used to tell -Sensu that the mutator is a different type from the default (pipe). Currently, -the supported types are "pipe" and "javascript". + Sensu that the mutator is a different type from the default (pipe). Currently, + the supported types are "pipe" and "javascript". - The default retry values have been increased from a minimum of 10ms to 1s, a -maximum of 10s to 120s, and the multiplier decreased from 10.0 to 2.0. + maximum of 10s to 120s, and the multiplier decreased from 10.0 to 2.0. - The backend internal bus default buffer sizes have been increased from 100 -to 1000 items. + to 1000 items. ### Fixed - Sensu Go OSS can now be built on `darwin/arm64`. - Fixed a regression in `sensu-backend init` where the exit status returned 0 -if the store was already initialized. + if the store was already initialized. - Guard against potential crash in the sensuctl cluster member-list command when -the etcd response header is nil. + the etcd response header is nil. - Agent events API now accepts metrics event. - Fixed rare cases where the agent could fail to delete temporary files when -downloading assets. + downloading assets. - Forwards compatibility with newer Sensu backends has been improved. Users can -now create resources with fields that are unknown to Sensu. + now create resources with fields that are unknown to Sensu. - The `--retry-min`, `--retry-max` and `--retry-multiplier` flags are now listed -in the `sensu-agent start --help` output. + in the `sensu-agent start --help` output. ### Changed - API and agent services now log at warn level when the start up, not at info. @@ -420,9 +425,9 @@ in the `sensu-agent start --help` output. ### Added - Added `etcd-log-level` configuration flag for setting the log level of the -embedded etcd server. + embedded etcd server. - Added wait flag to the sensu-backend init command which toggles waiting -indefinitely for etcd to become available. + indefinitely for etcd to become available. - Added sensu_go_keepalives prometheus counter. ### Changed @@ -430,19 +435,19 @@ indefinitely for etcd to become available. - Upgraded Etcd version from 3.3.22 to 3.5.0. - The loadit tool now uses UUIDv4 instead of UUIDv1 for agent names. - Some Prometheus metric names have changed with the upgrade to Etcd 3.5. See -https://etcd.io/docs/v3.5/metrics/etcd-metrics-latest.txt for the metrics that -Etcd 3.5 exposes. + https://etcd.io/docs/v3.5/metrics/etcd-metrics-latest.txt for the metrics that + Etcd 3.5 exposes. - The timeout flag for `sensu-backend init` is now treated as a duration instead -of seconds. If the value is less than 1 second, the value is converted to -seconds. + of seconds. If the value is less than 1 second, the value is converted to + seconds. ### Fixed - Fixed config deprecation warnings from being shown when deprecated config -options weren't set. + options weren't set. - Fixed issue with keepalive status remaining in OK status after agent shutdown. - Fixed a bug where role bindings that refer to missing roles would cause the -wrong status to be returned from the HTTP API, and the dashboard to go into a -crash loop. + wrong status to be returned from the HTTP API, and the dashboard to go into a + crash loop. - Fixed a bug where an empty subscription was present in the deregistration event's check. - Fixed issue with Windows agent not handling command timeouts properly - Sensu Go OSS can now be built on `darwin/arm64`. @@ -452,7 +457,7 @@ crash loop. ### Added - Added API key authentication support to sensuctl. - Added ResourceTemplate resource. ResourceTemplate will be used to populate -namespaces with initial resources. + namespaces with initial resources. - Added `GetResourceV3Watcher()` to the `store/etcd` package. - Add `EntityServiceClass` constant to the `corev2` package, representing BSM Services. - Added ResourceTemplate instantiation on namespace creation. @@ -462,11 +467,11 @@ namespaces with initial resources. - Both V2 & V3 resources are now validated when used with storev2. - Initialize labels & annotations for v3 resources when fields are nil. - Fixed the `agent-managed-entity` agent config attribute when no labels are -defined. + defined. - Fixed a bug where the scheduler could crash in rare circumstances, when using -round robin checks. + round robin checks. - Fixed a bug where build information would get calculated for every keepalive -in OSS builds. + in OSS builds. - Don't trigger internal restart on SIGHUP. - Concatenated YAML files now support CRLF. - Remove extraneous auto-completion suggestions. @@ -477,47 +482,47 @@ in OSS builds. - Fixed a potential crash in tessend. - Fixed a potential deadlock in agentd. - Fixed a bug where some Etcd watchers could try to process watch events holding -invalid pointers. + invalid pointers. ## [6.2.3] - 2021-01-21 ### Fixed - Fixed the `agent-managed-entity` agent config attribute when no labels are -defined. + defined. - Fixed a bug where events from namespaces other than the one requested could -appear in sensuctl dump output. The bug only applied to users who had access to -the other namespaces. + appear in sensuctl dump output. The bug only applied to users who had access to + the other namespaces. ## [6.2.1, 6.2.2] - 2021-01-08 ### Fixed - The expire field of silenced entries represents the configured expiration, in -seconds, not the remaining duration. + seconds, not the remaining duration. - Allow agents labels & annotations to be configured via configuration flags. - Fixed a bug where a small amount of extra etcd or postgres traffic was -generated on keepalive failure. + generated on keepalive failure. - Event check history now contains an entry for the first received event. ## [6.2.0] - 2020-12-17 ### Added - Sensuctl and sensu-backend ask for password retype when a new password is -created when in interactive mode. + created when in interactive mode. - Build info is now exposed as a prometheus metric via the /metrics endpoint. - Added `/health` endpoint to agentd. - Added the Scheduler field to Check and CheckConfig. - Add support for environment variables to define configuration file paths of -sensu-backend (`SENSU_BACKEND_CONFIG_FILE`) & sensu-agent (`SENSU_CONFIG_FILE`). + sensu-backend (`SENSU_BACKEND_CONFIG_FILE`) & sensu-agent (`SENSU_CONFIG_FILE`). - Added event sequence numbers. - Entities may now be managed exclusively by their agents when sensu-agent is -started with the new `agent-managed-entity` configuration attribute. + started with the new `agent-managed-entity` configuration attribute. ### Changed - Adjust the date and duration formats used when listing and displaying silenced -entries in sensuctl. + entries in sensuctl. - Make `event_id` usage in logging consistent. - Changed sensuctl commands that only contain subcommands to exit with status -code 46 when no arguments or incorrect arguments are given. + code 46 when no arguments or incorrect arguments are given. ### Fixed - The config-file flag is no longer order dependant. @@ -543,14 +548,14 @@ code 46 when no arguments or incorrect arguments are given. ### Fixed - Fixed a bug where silences could take longer to expire than they should, if -the cluster goes through a restart, or an etcd election. + the cluster goes through a restart, or an etcd election. - Fixed a bug where sensu-agent would not shut down correctly. - The per-entity subscription now persists with PATCH requests. - sensuctl now resolves symbolic links. - Allow HookConfig to be exported via `sensuctl dump`. - Properly log any API error in `sensuctl dump`. - An RBAC rule with the `update` permission now properly authorizes PATCH -requests. + requests. - eventd errors now include additional context for debugging. - Entities are now properly created using `sensuctl create`. @@ -559,25 +564,25 @@ requests. ### Added - A warning is now logged when a runtime asset was requested but does not exist. - Added Prometheus transformer for extracting metrics from check output -using the Prometheus Exposition Text Format. + using the Prometheus Exposition Text Format. - The backend flag `--api-request-limit` is now available to configure the -maximum API request body size, in bytes. + maximum API request body size, in bytes. - Add support for the PATCH method on the REST API for most configuration -resources. + resources. ### Changed - The trusted CA file is now used for agent, backend and sensuctl asset retrieval. ### Fixed - The backend will no longer start when the dashboard TLS configuration is not -fully specified. + fully specified. - Include the agent entity in data passed to the command process' STDIN. - Per-entity subscriptions (ex. `entity:entityName`) are always available on agent entities, -even if removed via the `/entities` API. + even if removed via the `/entities` API. - Fixed a crash in the backend and agent related to Javascript execution. - Proxy entities that are used in round-robin check requests are no longer stale. - Fixed a bug where entity listing would be incorrect if agent entities were -created via the API instead of with sensu-agent. + created via the API instead of with sensu-agent. - Close the response body when done reading from it while downloading assets. - `sensuctl user hash-password` command no longer requires a config to run. @@ -590,46 +595,46 @@ created via the API instead of with sensu-agent. ### Added - Log a warning when secrets cannot be sent to an agent because mTLS is not -enabled. + enabled. - Added the is_silenced boolean key to event.Check object. ### Fixed - Clarifies wording around a secret provider error message. - Logs and returns an error if a mutator cannot be found. - User-Agent header is only set on new client creation rather than on each -request. + request. - Fixed a bug where highly concurrent event filtering could result in a panic. - Fixed a bug where nil labels or annotations in an event filtering context -would result in a bad user experience, with the user having to explicitly -check if the annotations or labels are undefined. Now, the user is guaranteed -that labels and annotations are always defined, though they may be empty. + would result in a bad user experience, with the user having to explicitly + check if the annotations or labels are undefined. Now, the user is guaranteed + that labels and annotations are always defined, though they may be empty. - Automatically capitalize the roleRef and subject types in ClusterRoleBindings -and RoleBindings. + and RoleBindings. - Log the proper CA certificate path in the error message when it can't be -properly parsed by the agent. + properly parsed by the agent. - Fix the log entry field for the check's name in schedulerd. - Store fewer keys in etcd for agents. - Keepalive and round robin scheduling leases are now dealt with more efficiently. ### Breaking - The web interface is now a standalone product and no longer distributed -inside the sensu-backend binary. Refer to https://github.com/sensu/web for -more. + inside the sensu-backend binary. Refer to https://github.com/sensu/web for + more. - The database schema for entities has changed. After upgrading, users will not -be able to use their database with older versions of Sensu. + be able to use their database with older versions of Sensu. - After initial creation, sensu-agent entity configuration cannot be changed -by modifying the agent's configuration file. + by modifying the agent's configuration file. ### Changed - Entities are now stored as two separate data structures, in order to optimize -data access patterns. + data access patterns. - The `dead` and `handleUpdate` methods in keepalived now use `EntityConfig` and -`EntityState` respectively. + `EntityState` respectively. - The `dead()` and `createProxyEntity()` methods in eventd now use `corev3.EntityConfig` and `corev3.EntityState`. - sensu-agent configuration can now be managed via the HTTP API. - ClusterRoleBinding and RoleBinding subjects names can now contain any unicode -characters. + characters. - Enriches output of `sensuctl asset add` with help usage for how to use the runtime asset. - Unless the entity is a proxy entity, updates to entities now ignore state related fields. @@ -644,7 +649,7 @@ characters. ### Fixed - Fixed potential Web UI crash when fetching events in namespace with > 1000 events. - Errors produced in the agent by assets, check validation, token substitution, -and event unmarshaling are logged once again. + and event unmarshaling are logged once again. ## [5.21.0] - 2020-06-10 @@ -652,9 +657,9 @@ and event unmarshaling are logged once again. - Added `SENSU_LICENSE_FILE` environment variable to handler executions. - Added the `sensuctl user hash-password` command to generate password hashes - Added the ability to reset passwords via the backend API & `sensuctl user -reset-password` + reset-password` - The user resource now has a `password_hash` field to specify the password -hash, in place of the cleartext password + hash, in place of the cleartext password - Added the beginnings of the core/v3 API. - Added automatically generated tests for the core/v2 API. @@ -665,14 +670,14 @@ hash, in place of the cleartext password ### Fixed - The password verification logic when running `sensuctl user change-password` -has been moved from sensuctl to the backend API. + has been moved from sensuctl to the backend API. - Errors while publishing proxy check requests do not block scheduling for other -entities. + entities. - Listing namespaces in sensuctl with `--chunk-size` now works properly. - Prevent the agent from immediately exiting in certain scenarios where -components are disabled. + components are disabled. - Fixed an issue where a GraphQL query could fail when querying a namespace -containing event data in excess of 2GBs. + containing event data in excess of 2GBs. - Deregistration events now contain a timestamp. - Checks configured with missing hooks no longer cause the agent to crash. @@ -688,7 +693,7 @@ containing event data in excess of 2GBs. - The proper libc implementation is now displayed for Ubuntu entities. - Add validation for subjects in RBAC RoleBinding and ClusterRoleBinding. - Fixed a bug where single-letter subscriptions were not allowed, even though -they were intended to be. + they were intended to be. - Fix retrieving command assets from bonsai. ## [5.20.1] - 2020-05-15 @@ -707,7 +712,7 @@ they were intended to be. - Added the `event.is_silenced` & `event.check.is_silenced` field selectors. - Added `processes` field to the system type to store agent local processes (commercial feature). - Users can now increment the logging level by sending SIGUSR1 to the -sensu-backend or sensu-agent process. + sensu-backend or sensu-agent process. - Added a new `sensuctl describe-type` command to list all resource types. - Added `labels` and `annotations` as backend config options. - Added token substitution for assets. @@ -722,31 +727,31 @@ sensu-backend or sensu-agent process. - Warning messages from Resty library are now suppressed in sensuctl. - Notepad is now the default editor on Windows, instead of vi. - [Web] Any leading and trailing whitespace is now trimmed from the username -when authenticating. + when authenticating. - [Web] A toast is now displayed when a user attempts to delete an event but -does not have appropriate authorization. + does not have appropriate authorization. - [Web] Only the first five groups a user belongs to are displayed in the -preferences dialog. Showing too many made it difficult for users to locate the -sign-out button. + preferences dialog. Showing too many made it difficult for users to locate the + sign-out button. ### Fixed - Windows agent now accepts and remembers arguments passed to 'service run' and -'service install'. + 'service install'. - Windows agent synchronizes writes to its log file, ensuring that file size -will update with every log line written. + will update with every log line written. - Windows agent now logs to both console and log file when 'service run' is used. - [Web] Fixed issue where the de-registration handler would always show up as -undefined on the entity details page. + undefined on the entity details page. ## [5.19.3] - 2020-04-30 ### Added - Added a `timeout` flag to `sensu-backend init`. - [Web] Added the ability for labels and annotations with links to images to be -displayed inline. + displayed inline. - [Web] Added additional modes for those with colour blindness. - Added support for restarting the backend via SIGHUP. Config reloading is not -supported yet. + supported yet. ### Changed - Removed deprecated flags in `sensuctl silenced update` subcommand. @@ -755,24 +760,24 @@ supported yet. - Fixes a bug in multi-line metric extraction that appeared in windows agents. - Fixed an authn bug where sensu-backend would restart when agents disconnect. - Fixed a bug where check state and last_ok were not computed until the second -instance of the event. + instance of the event. - Fix the validation for env_vars to allow the equal sign in values. - Log to the warning level when an asset is not installed because none of the -filters matched. + filters matched. - Return underlying errors when fetching an asset. - Fixed a bug where the etcd event store would return prefixed matches rather than exact matches when getting events by entity. - `sensuctl logout` now resets the TLS configuration. - [Web] Fixes issue where labels with links could lead to a crash. - Added a global rate limit for fetching assets so that asset retries are not abusive (can be -configured using `--assets-rate-limit` and `--assets-burst-limit` on the agent and backend). + configured using `--assets-rate-limit` and `--assets-burst-limit` on the agent and backend). - [Web] Fixed an issue where trying to use an unregistered theme could lead to a -crash. + crash. - Fixed a bug that would cause the backend to crash. - Fixed a bug that would cause messages like "unary invoker failed" to appear -in the logs. + in the logs. - Fixed several goroutine leaks. - Fixed a bug that would cause the backend to crash when the etcd client got an -error saying "etcdserver: too many requests". + error saying "etcdserver: too many requests". ## [5.19.2] - 2020-04-27 *No changelog for this release.* @@ -782,31 +787,31 @@ error saying "etcdserver: too many requests". ### Fixed - Require that pipe handlers have a command set. - The config file default path is now shown in the help for sensu-backend start -and sensu-agent start. + and sensu-agent start. - Keepalives can now be published via the HTTP API. - Token substitution templates can now express escape-quoted strings. - [Web] Fixes issue where labels with links could lead to a crash. - Fixed a bug where keepalives would not always fire correctly when using -the postgres event store. + the postgres event store. - The REST API now uses a timeout of 3 seconds by default when querying -etcd health. + etcd health. - sensu-agent will not longer allow configuring keepalive timeouts less than -the keepalive interval. + the keepalive interval. - Eventd can no longer mistake keepalive events for checks with TTL. - Keepalives now generate a new event UUID for each keepalive failure event. - Agents now correctly reset keepalive switches on reconnect, fixing a bug -where old keepalive timeout settings would persist too long. + where old keepalive timeout settings would persist too long. - The system's libc_type attribute is now populated on alpine containers. ## [5.19.0] - 2020-03-26 ### Added - The `sensu.io/managed_by` label is now automatically applied to resources -created via `sensuctl create`. + created via `sensuctl create`. - Added `created_by` to object metadata and populate that field via the HTTP API. - Added agent discovery of libc type, VM system/role, and cloud provider. - Added `float_type` field to system type to store which float type (softfloat, -hardfloat) a system is using. + hardfloat) a system is using. - Additional Tessen resource metrics can now be registered at runtime. - Added a generic client POST function that can return the response. - Tessen now reports the type of store used for events ("etcd or "postgres"). @@ -815,15 +820,15 @@ hardfloat) a system is using. - Updated the store so that it may _create_ wrapped resources. - Bonsai client now logs at debug level instead of info level. - The dashboard service now returns an error if the client User-Agent is curl -or sensuctl. This should prevent users from using the dashboard port by -mistake. + or sensuctl. This should prevent users from using the dashboard port by + mistake. ### Fixed - Fixed a bug where the agent could connect to a backend using a namespace that -doesn't exist. + doesn't exist. - Subscriptions can no longer be empty strings (#2932) - The proper HTTP status codes are returned for unauthenticated & permission -denied errors in the REST API. + denied errors in the REST API. ## [5.18.1] - 2020-03-10 @@ -832,11 +837,11 @@ denied errors in the REST API. - Fixed bug where flapping would incorrectly end when `total_state_change` was below `high_flap_threshold` instead of below `low_flap_threshold`. - sensu-backend no longers hang indefinitely if a file lock for the asset -manager cannot be obtained, and returns instead an error after 60 seconds. + manager cannot be obtained, and returns instead an error after 60 seconds. - Stopped using the etcd embedded client, which seems to trigger nil pointer -panics when used against an etcd that is shutting down. + panics when used against an etcd that is shutting down. - 64-bit align the `Resource` struct in the store cache to fix a crash on -32-bit systems. + 32-bit systems. - Fixed a bug where sensu-backend would restart when agents disconnect. ## [5.18.0] - 2020-02-24 @@ -847,44 +852,44 @@ panics when used against an etcd that is shutting down. ### Fixed - sensuctl now supports the http_proxy, https_proxy, and no_proxy environment -variables. + variables. - returns 401 instead of 500 when issues occur refreshing the access token. - Support Bonsai assets versions prefixed with the letter `v`. - Fixed a bug where wrapped resources were not getting their namespaces set by -the default sensuctl configuration. + the default sensuctl configuration. - read/writes `initializationKey` to/from `EtcdRoot`, while support legacy as fallback (read-only) - check for a non-200 response when fetching assets - `/silenced` now supports API filtering (commercial feature). - Fixed event payload validation on the backend events API to validate the -payload with the URL parameters on the /events/:entity/:check endpoint and -reject events that do not match. + payload with the URL parameters on the /events/:entity/:check endpoint and + reject events that do not match. - The `auth/test` endpoint now returns the correct error messages. - The `log-level` configuration option is now properly applied when running the -Sensu Agent Windows service. + Sensu Agent Windows service. ### Changed - Updated Go version from 1.13.5 to 1.13.7. - Default `event.entity.entity_class` to `proxy` in the POST/PUT `/events` API. - Proxy entities are now automatically created when events are published with an -entity that does not exist. + entity that does not exist. ## [5.17.2] - 2020-02-19 ### Fixed - Fixed a bug where on an internal restart, enterprise HTTP routes could fail -to intialize. + to intialize. ## [5.17.1] - 2020-01-31 ### Fixed - Cluster configuration of sensuctl should be reset when `configure` is called. - Some namespaces would not appear in the curated namespace functionality under -certain circonstances. + certain circonstances. - Fix a bug with tar assets that contain hardlinked files. - Assets name may contain capital letters. - When `--trusted-ca-file` is used to configure sensuctl, it now detects and saves -the absolute file path in the cluster config. + the absolute file path in the cluster config. - [Web] Changing order on event list will no longer cause filters to be reset. - [Web] URLs inside annotations are now rendered as links. @@ -892,10 +897,10 @@ the absolute file path in the cluster config. ### Added - Added the secrets provider interface and secrets provider manager to be used -by commercial secrets providers. Implemented for checks, mutators, and handlers. + by commercial secrets providers. Implemented for checks, mutators, and handlers. - Added the `secrets` field to checks, mutators, and handlers. - Added the `keepalive-handlers` configuration flag on the agent to specify the -entity's keepalive handlers. + entity's keepalive handlers. - Added `event.entity.name` as a supported field selector. ### Fixed @@ -903,32 +908,32 @@ entity's keepalive handlers. - [Web] Labels with links can now be followed. - [Web] Fixed a inconsistent crash that occurred in Firefox browsers. - [Web] Fixed bug where event history was duplicated in the event timeline -chart. + chart. - [Web] Fixed issue where silenced entries with a start date would result in a -crash. + crash. - Fixed a bug where `sensuctl entity delete` was not returning an error -when attempting to delete a non-existent entity. + when attempting to delete a non-existent entity. - sensuctl command assets installed via Bonsai will now use the "sensuctl" -namespace. + namespace. - Fixed a memory leak in the entity cache - Users with implicit permissions to a namespace can now display resources -within that namespace via the Web UI. + within that namespace via the Web UI. - Explicit access to namespaces can only be granted via cluster-wide RBAC -resources. + resources. - Split rules ClusterRole and Role verbs, resources and resource names on comma. - Add support for the `--format` flag in the `sensuctl command list` subcommand. - Namespace can be ommited from event when performing an HTTP POST request to -the `/events` endpoint. + the `/events` endpoint. - Fixed a bug where failing check TTL events could occur event if keepalive -failures had already occurred. + failures had already occurred. ## [5.16.1] - 2019-12-18 ### Fixed - Initialize the sensu_go_events_processed counter with the `success` label so -it's always displayed. + it's always displayed. - Fixed a performance regression that was introduced in 5.15.0, which would -cause the API to timeout past 20k agent sessions. + cause the API to timeout past 20k agent sessions. ## [5.16.0] - 2019-12-11 @@ -936,50 +941,50 @@ cause the API to timeout past 20k agent sessions. - Display the JWT expiration Unix timestamp in `sensuctl config view`. - Added the 'sensu-backend init' subcommand. - Added a new flag, --etcd-client-urls, which should be used with sensu-backend -when it is not operating as an etcd member. The flag is also used by the new -sensu-backend init tool. + when it is not operating as an etcd member. The flag is also used by the new + sensu-backend init tool. - Added the cluster's distribution to Tessen data. - Added a new field, ClusterIDHex, to the ClusterHealth datatype. - Added the `--etcd-discovery` and `--etcd-discovery-srv` flags to -`sensu-backend`. These are used to take advantage of the embedded etcd's -auto-discovery features. + `sensu-backend`. These are used to take advantage of the embedded etcd's + auto-discovery features. - Added `--keepalive-critical-timeout` to define the time after which a -critical keepalive event should be created for an agent. + critical keepalive event should be created for an agent. - Added `--keepalive-warning-timeout` which is an alias of `--keepalive-timeout` -for backwards compatibility. + for backwards compatibility. ### Fixed - Add a timeout to etcd requests when retrieving the nodes health. - Show the correct default value for the format flag in `sensuctl dump` help -usage. + usage. - Installing sensuctl commands via Bonsai will now check for correct labels -before checking if the asset has 1 or more builds. + before checking if the asset has 1 or more builds. - Listing assets with no results returns an empty array. - Fixed a panic that could occur when creating resources in a namespace that -does not exist. + does not exist. - [Web] Links to documentation now point to the version of the product being run -instead of the latest; helpful when running an older version of Sensu. + instead of the latest; helpful when running an older version of Sensu. - Fixed issue where keepalive events and events created through the agent's -socket interface could be missing a namespace. + socket interface could be missing a namespace. - Fixed an issue where 'sensuctl cluster health' would hang indefinitely. - Fixed several issues around the metadata of resources encoded using the -wrapped-json format, where the metadata would go missing when listing -resources or prevent resources from being created. + wrapped-json format, where the metadata would go missing when listing + resources or prevent resources from being created. ### Changed - The backend will no longer automatically be seeded with a default admin -username and password. Users will need to run 'sensu-backend init' on every -new installation. + username and password. Users will need to run 'sensu-backend init' on every + new installation. - Several deprecated flags were removed from sensu-backend. - [Web] Changes to navigation. The app bar has been replaced by an omnipresent -drawer increasing the available space for content. Additionally, each page now -includes breadcrumbs. + drawer increasing the available space for content. Additionally, each page now + includes breadcrumbs. - [Web] Switching namespaces is easier than ever, with the new and improved -switcher. The new component can be accessed from the drawer or with the shortcut -ctrl+k. For those with many namespaces the switcher now includes fuzzy search -and improved keyboard navigation. + switcher. The new component can be accessed from the drawer or with the shortcut + ctrl+k. For those with many namespaces the switcher now includes fuzzy search + and improved keyboard navigation. - 'sensuctl cluster health' will now use a 3s timeout when gathering cluster -health information. + health information. - 'sensuctl cluster health' now collects cluster health information concurrently. ## [5.15.0] - 2019-11-18 @@ -999,28 +1004,28 @@ health information. ### Changed - Moved `corev2.BonsaiAsset` to `bonsai.Asset` and moved -`corev2.OutdatedBonsaiAsset` to `bonsai.OutdatedAsset` along with subsequent -bonsai package refactors. + `corev2.OutdatedBonsaiAsset` to `bonsai.OutdatedAsset` along with subsequent + bonsai package refactors. - Colons and periods are now allowed to be used in all resource names, with -the exception of users. + the exception of users. ## [5.14.2] - 2019-11-04 ### Changed - Upgraded etcd to 3.3.17 - Listing namespaces is now done implicitly based on access to resources within -a namespace. Users will no longer be able to list all namespaces by default, in -new installations. Existing installations will function as before. Operators can -change to the new behaviour, by modifying the system:user role. + a namespace. Users will no longer be able to list all namespaces by default, in + new installations. Existing installations will function as before. Operators can + change to the new behaviour, by modifying the system:user role. ### Fixed - As a result of upgrading etcd, TLS etcd clients that lose their connection will -successfully reconnect when using --no-embed-etcd. + successfully reconnect when using --no-embed-etcd. - Check TTL switches are now correctly buried when associated events and entities -are deleted. + are deleted. - Keepalive switches are now correctly buried when the keepalive event is deleted. - Sensu now uses far fewer leases for keepalives and check TTLs, resulting in a -stability improvement for most deployments. + stability improvement for most deployments. - Fixed a minor UX issue in interactive filter commands in sensuctl. - Silences now successfully apply to proxy entities where the check doesn't contain the same subscriptions as the entity (#3356) @@ -1032,56 +1037,56 @@ stability improvement for most deployments. ### Fixed - Opening an already open Bolt database should not cause sensu-agent to hang -indefinitely. + indefinitely. - [CLI] Dump multiple types as YAML to a file would print separator STDOUT -instead of specified file + instead of specified file - Fixed a bug where Sensu would crash with a panic due to a send on a closed channel. ## [5.14.0] - 2019-10-08 ### Added - [Web] Added an additional option to the error dialog allowing users to -completely wipe the application's persisted state; in lieu of them having to -manually wipe their local / session storage. This may help in the rare cases -where something in said state is leading to an uncaught exception. + completely wipe the application's persisted state; in lieu of them having to + manually wipe their local / session storage. This may help in the rare cases + where something in said state is leading to an uncaught exception. - [Web] For operating systems with support for selecting a preferred light /dark -theme, the application now respects the system preference by default. + theme, the application now respects the system preference by default. - sensuctl dump can now list the types of supported resources with --types. - Added the `sensu_agent_version` field to the `Entity` resource, which reflects -the Sensu semver version of the agent entity. + the Sensu semver version of the agent entity. - Added the `--etcd-heartbeat-interval` and `--etcd-election-timeout` flags to -`sensu-backend` + `sensu-backend` ### Changed - [Web] Github is not always the best place for feature requests and discussion, -as such we've changed CTA for feedback to point to Discourse instead of the -web repository's issues page. + as such we've changed CTA for feedback to point to Discourse instead of the + web repository's issues page. - [Web] When a user lands on a page inside a namespace that no longer exists or -they do not have access to, the drawer is now opened so that namespace switcher -is front and center. Hopefully this should reduce any confusion around next -steps. + they do not have access to, the drawer is now opened so that namespace switcher + is front and center. Hopefully this should reduce any confusion around next + steps. - Support agent TLS authentication, usable with a licensed sensu-backend. - Updated Go version from 1.12.3 to 1.13.1. - [GraphQL] `putWrapped` mutation now accepts wrapped JSON with empty -outer objectmeta. + outer objectmeta. ### Fixed - [Web] Fixed issue where a user with an appropriate role may have been unable -to resolve events, queue checks, and create silenced entries. + to resolve events, queue checks, and create silenced entries. - Splayed proxy checks are now executed every interval, instead of every -`interval + interval * splay_coverage`. + `interval + interval * splay_coverage`. - [GraphQL] Ensures that proxy entity label & annotations are redacted. - Fixed a bug in the ring where round robin schedules would not recover -after quorum loss. + after quorum loss. - [Web] Unauthorized errors emitted while creating silences or resolving events -are now caught and a toast is presented to communicate what occurred. + are now caught and a toast is presented to communicate what occurred. - [Web] Internal errors are now avoided when a user attempts to queue an ad-hoc -check for a keepalive. + check for a keepalive. - Do not separate asset builds into several assets unless the the tabular format -is used in `sensuctl asset list`. + is used in `sensuctl asset list`. - Fix the 'flag accessed but not defined' error in `sensuctl asset outdated` - Fix generic API client's `SetTypeMeta` method. The APIGroup is now correctly -configured and by virtue unintended authorization denied errs are avoided. + configured and by virtue unintended authorization denied errs are avoided. - Fixed a bug where checks would stop executing after a network error. - Fixed a bug where sensuctl create with stdin was not working. @@ -1107,19 +1112,19 @@ configured and by virtue unintended authorization denied errs are avoided. ### Fixed - sensuctl dump no longer silently discards errors. - Interactive check create and update modes now have 'none' as the first -highlighted option, instead of nagios-perfdata. + highlighted option, instead of nagios-perfdata. - Fixed a bug where silences would not expire on event resolution. ## [5.12.0] - 2019-08-22 ### Added - Added functionality for the agent `--allow-list` configuration, which -whitelists check and check hook executables. + whitelists check and check hook executables. - Added the `runtime_assets` field to `HookConfig`. Assets are enabled -for check hook execution. + for check hook execution. - Added backwards compatible content negotiation to the websocket connection. -Protobuf will be used for serialization/deserialization unless indicated by the -backend to use JSON. + Protobuf will be used for serialization/deserialization unless indicated by the + backend to use JSON. - Added delete functionality for assets in the API and sensuctl. - Added `sensuctl dump` to dump resources to a file or STDOUT. - Added `event.check.name` as a supported field selector. @@ -1127,7 +1132,7 @@ backend to use JSON. - Added `entity.system.arm_version` to record the value of `GOARM` at compile time. - Added `ProviderType` field to `AuthProviderClaims` - Added `builds` field to the `Asset` type to allow assets to specify different -URLs for each platform/architecture/arch_version. + URLs for each platform/architecture/arch_version. ### Changed - The project now uses Go modules instead of dep for dependency management. @@ -1135,50 +1140,50 @@ URLs for each platform/architecture/arch_version. - The generic etcd watcher now keeps track of revisions. - The resource caches can now rebuild themselves in case of failures. - Event and Entity resources can now be created without an explicit namespace; -the system will refer to the namespace in the URL. + the system will refer to the namespace in the URL. - Events and Entities can now be created with the POST verb. - [Web] Changed styling of namespace labels. - Log token substitution failures more clearly. ### Fixed - Fixed the tabular output of `sensuctl filter list` so inclusive filter expressions -are joined with `&&` and exclusive filter expressions are joined with `||`. + are joined with `&&` and exclusive filter expressions are joined with `||`. - The REST API now correctly only returns events for the specific entity -queried in the `GET /events/:entity` endpoint (#3141) + queried in the `GET /events/:entity` endpoint (#3141) - Prevent a segmentation fault when running `sensuctl config view` without -configuration. + configuration. - Added entity name to the interactive sensuctl survey. - Check hooks with `stdin: true` now receive actual event data on STDIN instead of an empty event. - Prevent a segmentation fault on the agent when a command execution returns an -error. + error. - [Web] Fixed issue where a bad or revoked access token could crash the app. ### Removed - Removed encoded protobuf payloads from log messages (when decoded, they can reveal -redacted secrets). + redacted secrets). ## [5.11.1] - 2019-07-18 ### Fixed - The agent now sends heartbeats to the backend in order to detect network -failures and reconnect faster. + failures and reconnect faster. - The default handshake timeout for the WebSocket connection negotiation has -been lowered from 45 to 15 seconds and is now configurable. + been lowered from 45 to 15 seconds and is now configurable. ## [5.11.0] - 2019-07-10 ### Added - Silenced entries are now retrieved from the cache when determining if an event -is silenced. + is silenced. - Added --disable-assets flag to sensu-agent. - Added ability to query mutators to the GraphQL service - Added ability to query event filters to the GraphQL service - Added prometheus metrics for topics in wizard bus and agent sessions. - The buffer size and worker count of keepalived, eventd & pipelined can now be -configured on sensu-backend. + configured on sensu-backend. - Added a `headers` field to the `Asset` struct. Headers is a map of key/value -string pairs used as HTTP headers for asset retrieval. + string pairs used as HTTP headers for asset retrieval. - Added the current user to the output of `sensuctl config view`. - [Web] Adds list and details views for mutators - [Web] Adds list and details views for event filters @@ -1187,25 +1192,25 @@ string pairs used as HTTP headers for asset retrieval. ### Changed - [Web] Updated embedded web assets from `46cd0ee` ... `8f50155` - The REST API now returns the `201 Created` success status response code for -POST & PUT requests instead of `204 No Content`. + POST & PUT requests instead of `204 No Content`. ### Fixed - The REST API now returns an error when trying to delete an entity that does -not exist. + not exist. - Fixed a bug where basic authorization was not being performed on the agent websocket connection. - Fixed an aliasing regression where event timestamps from the /events API -were not getting properly populated. + were not getting properly populated. - Fixed a bug where multiple nested set handlers could be incorrectly flagged as -deeply nested. + deeply nested. - Fixed a bug where round robin proxy checks could fail to execute. - Fixed a bug where watchers could enter a tight loop, causing very high CPU -usage until sensu-backend was restarted. + usage until sensu-backend was restarted. ## [5.10.1] - 2019-06-25 ### Fixed - Fixed the entity_attributes in proxy_requests so all attributes must match -instead of only one of them. + instead of only one of them. - Fixed a bug where events were not deleted when their corresponding entity was. ## [5.10.0] - 2019-06-18 @@ -1213,7 +1218,7 @@ instead of only one of them. ### Added - Added POST `/api/core/v2/tessen/metrics`. - Added the ability in TessenD to listen for metric points on the message bus, -populate, and send them to the Tessen service. + populate, and send them to the Tessen service. - [Web] Adds ability to delete entities - [GraphQL] Adds simple auto-suggestion feature. - Added a tag to all Tessen metrics to differentiate internal builds. @@ -1224,16 +1229,16 @@ populate, and send them to the Tessen service. - [Web] Updated embedded web assets from `275386a` ... `46cd0ee` - Refactoring of the REST API. - Changed the identifying cluster id in TessenD from the etcd cluster id to -the sensu cluster id. + the sensu cluster id. - [GraphQL] Updates `PutResource` mutation to accept an `upsert` boolean flag parameter. The `upsert` param defaults to `true`, but if set to `false` the mutation will return an error when attempting to create a duplicate resource. - Eventd has been refactored. Users should not perceive any changes, but a -substantial amount of business logic has been moved into other packages. + substantial amount of business logic has been moved into other packages. - The `sensuctl create` command now accepts resources without a declared -namespace. If the namespace is omitted, the resource will be created in the -current namespace, or overridden by the `--namespace` flag. + namespace. If the namespace is omitted, the resource will be created in the + current namespace, or overridden by the `--namespace` flag. - Eventd now uses a constant number of requests to etcd when working with -silenced entries, instead of a number that is proportional to the number of -subscriptions in a check. + silenced entries, instead of a number that is proportional to the number of + subscriptions in a check. ### Fixed - The check state and check total_state_change properties are now more correct. @@ -1242,7 +1247,7 @@ subscriptions in a check. - [Web] Ensure that we redirect user to a valid namespace when first signing in. - [Web] Correctly display timeout value for handlers. - [Web] Avoid exception when parsing non-standard cron statements. (Eg. -`@every 1h` or `@weekly`) + `@every 1h` or `@weekly`) - The resources metadata are now validated with the request URI. ## [5.9.0] - 2019-05-29 @@ -1283,7 +1288,7 @@ subscriptions in a check. ### Fixed - Only bury switchsets of checks that no longer have a TTL, in order to reduce -the number of write operations made to etcd. + the number of write operations made to etcd. - Fixed keepalives switchsets for entities with deregistration. - Fixed continue token generation in namespace and user pagination. @@ -1291,7 +1296,7 @@ the number of write operations made to etcd. ### Added - Added a Windows service wrapper for sensu-agent. See -"sensu-agent service --help" for more information. + "sensu-agent service --help" for more information. ### Fixed - Fixed `sensuctl` color output on Windows. @@ -1308,7 +1313,7 @@ the number of write operations made to etcd. - Added the message bus to Tessend in order to track Tessen configuration changes from the API. - Added a performance optimizing `Count()` function to the generic store. - Added a hexadecimal Cluster ID title to the `sensuctl cluster health` and -`sensuctl cluster member-list` commands in tabular format. + `sensuctl cluster member-list` commands in tabular format. - Added a `Header` field to the `HealthResponse` type returned by `/health`. ### Fixed @@ -1328,10 +1333,10 @@ the number of write operations made to etcd. ### Fixed - Fixed an issue where etcd watchers were used incorrectly. This was causing -100% CPU usage in some components, as they would loop endlessly trying to get -results from watchers that broke, due to their stream terminating. Other -components would simply stop updating. Watchers now get reinstated when the -client regains connectivity. + 100% CPU usage in some components, as they would loop endlessly trying to get + results from watchers that broke, due to their stream terminating. Other + components would simply stop updating. Watchers now get reinstated when the + client regains connectivity. - Fixed the `/events/:entity` route in the REST API. - Fixed a bug where the --labels arg was not working as expected in sensu-agent. @@ -1341,7 +1346,7 @@ client regains connectivity. - Added the TessenD daemon. - Added an etcd watcher for tessen configuration. - Added ring support for TessenD so that the service is invoked in a -round-robin fashion within a cluster. + round-robin fashion within a cluster. - Added `tessen opt-in` command to `sensuctl`. - Added `tessen opt-out` command to `sensuctl`. - Added `tessen info` command to `sensuctl`. @@ -1425,7 +1430,7 @@ round-robin fashion within a cluster. ### Fixed - Fixed a regression in the agent that would not allow proxy checks to be -run for subsequent executions. + run for subsequent executions. ### Added - Web UI - support for labels and annotations @@ -1433,17 +1438,17 @@ run for subsequent executions. ### Added - Added support for the following TLS related options to `sensuctl`: -`--trusted-ca-file` and `--insecure-skip-tls-verify`. This allows sensuctl -users to use a self-signed certificate without adding it to the operating -system's CA store, either by explicitly trusting the signer, or by disabling -TLS hostname verification. + `--trusted-ca-file` and `--insecure-skip-tls-verify`. This allows sensuctl + users to use a self-signed certificate without adding it to the operating + system's CA store, either by explicitly trusting the signer, or by disabling + TLS hostname verification. - Added a generic watcher in the store. - Added `RemoveProvider` method to authenticator. - Check output truncation support has been added. Check output can be truncated -by adjusting the max_output_size and discard_output properties. + by adjusting the max_output_size and discard_output properties. - Added ability to silence/unsilence from the event details page. - Added support for wrapped resources in the API with `sensuctl create` & -`sensuctl edit`. + `sensuctl edit`. - Web UI - platform version displays on the entity details page. - Web UI - include proxy request configuration on check details page. - Web UI - display deregistration config on the entity details page. @@ -1453,23 +1458,23 @@ by adjusting the max_output_size and discard_output properties. - Moved the `Provider` interface to `api/core/v2` package. - Moved the `Authenticator` interface to `backend/authentication` package. - Updated confirmation messages for sensuctl commands: `Created`, `Deleted` and -`Updated` instead of `OK`. + `Updated` instead of `OK`. - Exported some functions and methods in the CLI client. - The API authenticator now identifies providers by their name only. ### Fixed - Check TTL failure events are now much more reliable, and will persist even -in the presence cluster member failures and cluster restarts. + in the presence cluster member failures and cluster restarts. - Fix snakeCase version of keys in typeMap for acronyms. - Fixed a bug in keepalive processing that could result in a crash. - Pin childprocess to v0.9.0 in CircleCI so fpm can be installed. - Substitutions applied to command & hooks are now omitted from events. - Fixes a bug where generic store methods assumed a namespace was provided for non-namespaced resources. - Keepalive and check TTL database state is now properly garbage-collected on -entity deletion. + entity deletion. - Fixed a bug where `sensuctl version` required configuration files to exist. - Updates the copy on the confirm disable dialog to accurately reflect the -operation. + operation. ## [5.1.1] - 2019-01-24 @@ -1480,7 +1485,7 @@ operation. - Improved logging for errors in proxy check requests. - Updated Go version from 1.10 to 1.11.4. - Refactoring of the internal authentication mechanism into a `basic` -authentication provider. + authentication provider. - Modified private generic store methods as public functions. - Improved logging for errors in proxy check requests. - Updated Go version from 1.10 to 1.11.4. @@ -1491,14 +1496,14 @@ authentication provider. - Fixed a bug where adhoc checks were not retrieving asset dependencies. - Fixed a bug where check updates would cause the check to immediately fire. - Fixed a bug where a bad line in check output would abort metric extraction. -An error is now logged instead, and extraction continues after a bad line is encountered. + An error is now logged instead, and extraction continues after a bad line is encountered. - Keepalive events will now continue to fire after cluster restarts. - Fixed a panic in the dashboardd shutdown routine. - Fixed a bug where deleting a non-existent entity with sensuctl would not return an error. - Web UI - toolbar menu buttons now switch with dark theme. - Web UI - some buttons easier to see with dark theme. - Agents will now take proxy entity names into consideration when guarding -against duplicate check requests. + against duplicate check requests. ### Changed - Improved logging for errors in proxy check requests. @@ -1549,11 +1554,11 @@ against duplicate check requests. ### Removed - Check subdue functionality has been disabled. Users that have checks with -subdues defined should delete and recreate the check. The subdue feature was -found to have issues, and we are re-working the feature for a future release. + subdues defined should delete and recreate the check. The subdue feature was + found to have issues, and we are re-working the feature for a future release. - Filter when functionality has been disabled. Users that have filters with -'when' properties defined should delete and recreate the filter. Filter when -uses the same facility as check subdue for handling time windows. + 'when' properties defined should delete and recreate the filter. Filter when + uses the same facility as check subdue for handling time windows. - Removed event.Hooks and event.Silenced deprecated fields - Extensions have been removed until we have time to revisit the feature. @@ -1565,10 +1570,10 @@ uses the same facility as check subdue for handling time windows. - Assets and mutators environments are now merged, with a preference given to the values coming from the mutator's environment. - Metadata from wrappers and resources is now merged, with a preference given to -the values coming from the wrapper. Labels and annotations are deep-merged. + the values coming from the wrapper. Labels and annotations are deep-merged. - Round-robin scheduling has been temporarily disabled. - The dashboard now uses the `api-url` configuration attribute to connect to the -API. + API. ### Fixed - Fixed several resource leaks in the check scheduler. @@ -1581,7 +1586,7 @@ API. - Fixed a bug where resources from namespaces that share a common prefix, eg: "sensu" and "sensu-devel", could be listed together. - Fixed a bug in the agent where the agent would deadlock after a significant -period of disconnection from the backend. + period of disconnection from the backend. - Fixed a bug where logging events without checks would cause a nil panic. - Removed the ability to rerun keepalives on the events list page - A panic in keepalive/check ttl monitors causing a panic. @@ -1589,13 +1594,13 @@ period of disconnection from the backend. - Updating a users groups will no longer corrupt their password - Prevent empty error messages in sensuctl. - Fixed a bug where keepalive failures could be influenced by check TTL -successes, and vice versa. + successes, and vice versa. - Fixed a bug where check TTL events were not formed correctly. - Fixed a web-ui bug causing the app to crash on window resize in FireFox ### Breaking Changes - The backend configuration attributes `api-host` & `api-port` have been -replaced with `api-listen-address`. + replaced with `api-listen-address`. ## [2.0.0-beta.8-1] - 2018-11-15 @@ -1609,9 +1614,9 @@ replaced with `api-listen-address`. - Add support for setting labels on agents with the command line. - The sensuctl tool now supports yaml. - Add support for `--all-namespaces` flag in `sensuctl extension list` -subcommand. + subcommand. - Added functionality to the dynamic synthesize function, allowing it to -flatten embedded and non-embedded fields to the top level. + flatten embedded and non-embedded fields to the top level. - Added the sensuctl edit command. - Added javascript filtering. @@ -1643,18 +1648,18 @@ flatten embedded and non-embedded fields to the top level. - Agent subscriptions are now specified in the config file as an array instead instead of a comma-delimited list of strings. - Extended attributes have been removed and replaced with labels. Labels are -string-string key-value pairs. + string-string key-value pairs. - Silenced `id`/`ID` field has changed to `name`/`Name`. - Entity `id`/`ID` field has changed to `name`/`Name`. - Entity `class`/`Class` field has changed to `entity_class`/`EntityClass`. - Check `proxy_entity_id`/`ProxyEntityID` field has changed to `proxy_entity_name`/`ProxyEntityName`. - Objects containing both a `name`/`Name` and `namespace`/`Namespace` field have been -replaced with `metadata`/`ObjectMeta` (which contains both of those fields). + replaced with `metadata`/`ObjectMeta` (which contains both of those fields). - Role-based access control (RBAC) has been completely redesigned. - Filter and token substitution variable names now match API naming. Most names -that were previously UpperCased are now lower_cased. + that were previously UpperCased are now lower_cased. - Filter statements are now called expressions. Users should update their -filter definitions to use this new naming. + filter definitions to use this new naming. ## [2.0.0-beta.7-1] - 2018-10-26 @@ -1678,35 +1683,35 @@ filter definitions to use this new naming. ### Removed - Staging resources and configurations have been removed from sensu-go. - Removed handlers/slack from sensu/sensu-go. It can now be found in -sensu/slack-handler. + sensu/slack-handler. - Removed the `Error` store and type. ### Changed - Changed sensu-agent's internal asset manager to use BoltDB. - Changed sensuctl title colour to use terminal's configured default for bold -text. + text. - The backend no longer forcibly binds to localhost. - Keepalive intervals and timeouts are now configured in the check object of -keepalive events. + keepalive events. - The sensu-agent binary is now located at ./cmd/sensu-agent. - Sensuctl no longer uses auto text wrapping. - The backend no longer requires embedded etcd. External etcd instances can be -used by providing the --no-embed option. In this case, the client will dial -the URLs provided by --listen-client-urls. + used by providing the --no-embed option. In this case, the client will dial + the URLs provided by --listen-client-urls. - The sensu-agent binary is now located at ./cmd/sensu-agent. - Sensuctl no longer uses auto text wrapping. - The backend no longer requires embedded etcd. External etcd instances can be -used by providing the --no-embed option. In this case, the client will dial -the URLs provided by --listen-client-urls. + used by providing the --no-embed option. In this case, the client will dial + the URLs provided by --listen-client-urls. - Deprecated daemon `Status()` functions and `/info` (`/info` will be -re-implemented in https://github.com/sensu/sensu-go/issues/1739). + re-implemented in https://github.com/sensu/sensu-go/issues/1739). - The sensu-backend flags related to etcd are now all prefixed with `etcd` and -the older versions are now deprecated. + the older versions are now deprecated. - Web ui entity recent events are sorted by last ok. - etcd is now the last component to shutdown during a graceful shutdown. - Web ui entity recent events are sorted by last ok - Deprecated --custom-attributes in the sensu-agent command, changed to ---extended-attributes. + --extended-attributes. - Interfaced command execution and mocked it for testing. - Updated the version of `libprotoc` used to 3.6.1. @@ -1716,28 +1721,28 @@ the older versions are now deprecated. - Fixes a bug in `sensuctl cluster health` so the correct error is handled. - Fixed a bug where assets could not extract git tarballs. - Fixed a bug where assets would not install if given cache directory was a -relative path. + relative path. - Fixed a bug where an agent's collection of system information could delay -sending of keepalive messages. + sending of keepalive messages. - Fixed a bug in nagios perfdata parsing. - Etcd client URLs can now be a comma-separated list. - Fixed a bug where output metric format could not be unset. - Fixed a bug where the agent does not validate the ID at startup. - Fixed a bug in `sensuctl cluster health` that resulted in an unmarshal -error in an unhealthy cluster. + error in an unhealthy cluster. - Fixed a bug in the web ui, removed references to keepaliveTimeout. - Keepalive checks now have a history. - Some keepalive events were misinterpreted as resolution events, which caused -these events to be handled instead of filtered. + these events to be handled instead of filtered. - Some failing keepalive events were not properly emitted after a restart of -sensu-backend. + sensu-backend. - The check output attribute is still present in JSON-encoded events even if -empty. + empty. - Prevent an empty Path environment variable for agents on Windows. - Fixed a bug in `sensuctl check update` interactive mode. Boolean defaults -were being displayed rather than the check's current values. + were being displayed rather than the check's current values. - Use the provided etcd client TLS information when the flag `--no-embed-etcd` -is used. + is used. - Increase duration delta in TestPeriodicKeepalive integration test. - Fixed some problems introduced by Go 1.11. @@ -1755,24 +1760,24 @@ is used. ### Changed - API responses are inspected after each request for the Sensu Edition header. - Rename list-rules subcommand to info in sensuctl role commmand with alias -for backward compatibility. + for backward compatibility. - Updated gogo/protobuf and golang/protobuf versions. - Health API now returns etcd alarms in addition to cluster health. ### Fixed - Fixed agentd so it does not subscribe to empty subscriptions. - Rules are now implicitly granting read permission to their configured -environment & organization. + environment & organization. - The splay_coverage attribute is no longer mandatory in sensuctl for proxy -check requests and use its default value instead. + check requests and use its default value instead. - sensu-agent & sensu-backend no longer display help usage and duplicated error -message on startup failure. + message on startup failure. - `Issued` & `History` are now set on keepalive events. - Resolves a potential panic in `sensuctl cluster health`. - Fixed a bug in InfluxDB metric parsing. The timestamp is now optional and -compliant with InfluxDB line protocol. + compliant with InfluxDB line protocol. - Fixed an issue where adhoc checks would not be issued to all agents in a -clustered installation. + clustered installation. ### Breaking Changes - Corrects the check field `total_state-change` json tag to `total_state_change`. @@ -1791,26 +1796,26 @@ clustered installation. ### Changed - The Backend struct has been refactored to allow easier customization in -enterprise edition. + enterprise edition. - Use etcd monitor instead of in-memory monitor. - Refactoring of the cmd package for sensuctl to allow easier customization in -the enterprise edition. + the enterprise edition. - Upgrade dep to v0.5.0 - Added cluster health information to /health endpoint in sensu-backend. ### Fixed - Fixed `sensuctl completion` help for bash and zsh. - Fixed a bug in build.sh where versions for Windows and Mac OS were not -generated correctly. + generated correctly. - Display the name of extensions with table formatting in sensuctl. - Fixed TLS issue that occurred when dashboard communicated with API. - Check TTL now works with round robin checks. - Format string for --format flag help now shows actual arguments. - Push the sensu/sensu:nightly docker image to the Docker Hub. - Replaced dummy certs with ones that won't expire until 100 years in the -future. + future. - Fixed a bug where clustered round robin check execution executed checks -too often. + too often. - Catch errors in type assertions in cli. - Fixed a bug where users could accidentally create invalid gRPC handlers. @@ -1825,7 +1830,7 @@ too often. ### Added - Performed an audit of events and checks. Added `event.HasCheck()` nil checks -prior to assuming the existence of said check. + prior to assuming the existence of said check. - Added a Create method to the entities api. - Added the ability to set round robin scheduling in sensuctl - Added Output field to GRPC handlers @@ -1833,12 +1838,12 @@ prior to assuming the existence of said check. - Accept additional time formats in sensuctl - Entities can now be created via sensuctl. - Added the format `wrapped-json` to sensuctl `configure`, `list` and `info` -commands, which is compatible with `sensuctl create`. + commands, which is compatible with `sensuctl create`. - Added debug event log with all event data. - Added yml.example configurations for staging backend and agents. - Added test resources in `testing/config/resources.json` to be used in staging. - Added all missing configuration options to `agent.yml.example` and -`backend.yml.example`. + `backend.yml.example`. - Added environment variables to checks. - Added logging redaction integration test. - Added check token substitution integration test. @@ -1853,19 +1858,19 @@ commands, which is compatible with `sensuctl create`. - Split out the docker commands in build script so that building images and pushing can be done separately. - Migrated the InfluxDB handler from the sensu-go repository to -github.com/nikkiki/sensu-influxdb-handler + github.com/nikkiki/sensu-influxdb-handler - Entry point for sensu-backend has been changed to `github.com/sensu/sensu-go/cmd/sensu-backend` - Don't allow unknown fields in types that do not support custom attributes -when creating resources with `sensuctl create`. + when creating resources with `sensuctl create`. - Provided additional context to metric event logs. - Updated goversion in the appveyor configuration for minor releases. - Use a default hostname if one cannot be retrieved. - Return an error from `sensuctl configure` when the configured organization -or environment does not exist. + or environment does not exist. - Remove an unnecessary parameter from sensuctl environment create. - The profile environment & organization values are used by default when -creating a resource with sensuctl. + creating a resource with sensuctl. - Migrated docker image to sensu Docker Hub organization from sensuapp. - Use the sensu/sensu image instead of sensu/sensu-go in Docker Hub. @@ -1877,11 +1882,11 @@ creating a resource with sensuctl. - Metrics with zero-values are now displayed correctly - Fix handler validation routine - Fixed a small bug in the opentsdb transformer so that it trims trailing -whitespace characters. + whitespace characters. - Sensu-agent logs an error if the statsd listener is unable to start due to an -invalid address or is stopped due to any other error. + invalid address or is stopped due to any other error. - Fixed a bug where --organization and --environment flags were hidden for all -commands + commands - Fix a bug where environments could not be created with sensuctl create - StatsD listener on Windows is functional - Add version output for dev and nightly builds (#1320). @@ -1889,35 +1894,35 @@ commands - Fixed `sensuctl create -f` for `Role` - Fixed `sensuctl create -f` for `Event` - Added validation for asset SHA512 checksum, requiring that it be at least 128 -characters and therefore fixing a bug in sensuctl + characters and therefore fixing a bug in sensuctl - Silenced IDs are now generated when not set in `create -f` resources - API requests that result in a 404 response are now logged - Fixed a bug where only a single resource could be created with -`sensuctl create` at a time. + `sensuctl create` at a time. - Fixed a bug where environments couldn't be deleted if there was an asset in -the organization they reside in. + the organization they reside in. - Dashboard's backend reverse proxy now works with TLS certs are configured. - Fixed a bug with the IN operator in query statements. - Boolean fields with a value of `false` now appear in json format (removed -`omitempty` from protobufs). + `omitempty` from protobufs). - The sensuctl create command no longer prints a spurious warning when -non-default organizations or environments are configured. + non-default organizations or environments are configured. - When installing assets, errors no longer cause file descriptors to leak, or -lockfiles to not be cleaned up. + lockfiles to not be cleaned up. - Fixed a bug where the CLI default for round robin checks was not appearing. - Missing custom attributes in govaluate expressions no longer result in -an error being logged. Instead, a debug message is logged. + an error being logged. Instead, a debug message is logged. - Update AppVeyor API token to enable GitHub deployments. - Allow creation of metric events via backend API. - Fixed a bug where in some circumstances checks created with sensuctl create -would never fail. + would never fail. - Fixed a goroutine leak in the ring. - Fixed `sensuctl completion` help for bash and zsh. ### Removed - Removed Linux/386 & Windows/386 e2e jobs on Travis CI & AppVeyor - Removed check output metric extraction e2e test, in favor of more detailed -integration coverage. + integration coverage. - Removed the `leader` package - Removed logging redaction e2e test, in favor of integration coverage. - Removed check token substitution e2e test, in favor of integration coverage. @@ -1948,47 +1953,47 @@ integration coverage. - Added extension registry to the store. - Add sensuctl create command. - Adds a statsd server to the sensu-agent which runs statsd at a configurable -flush interval and converts gostatsd metrics to Sensu Metric Format. + flush interval and converts gostatsd metrics to Sensu Metric Format. - Add event filtering to extensions. - Proper 404 page for web UI. - Add sensuctl extension command. - Add extensions to pipelined. - Added more tests surrounding the sensu-agent's statsd server and udp port. - Add the `--statsd-event-handlers` flag to sensu-agent which configures the -event handlers for statsd metrics. + event handlers for statsd metrics. - Add default user with username "sensu" with global, read-only permissions. - Add end-to-end test for extensions. - Add configuration setting for backend and agent log level. - Add extension package for building third-party Sensu extensions in Go. - Add the `--statsd-disable` flag to sensu-agent which configures the -statsd listener. The listener is enabled by default. + statsd listener. The listener is enabled by default. - Added an influx-db handler for events containing metrics. - Add 'remove-when' and 'set-when' subcommands to sensuctl filter command. - Added the Transformer interface. - Added a Graphite Plain Text transformer. - Add support for `metric_format` and `metric_handlers` fields in the Check and -CheckConfig structs. + CheckConfig structs. - Add CLI support for `metric_format` and `metric_handlers` fields in `sensuctl`. - Add support for metric extraction from check output for `graphite_plaintext` -transformer. + transformer. - Added a OpenTSDB transformer. - Add support for metric extraction from check output for `opentsdb_line` - Added a Nagios performance data transformer. - Add support for metric extraction from check output for `nagios_perfdata` - Added an InfluxDB Line transformer. - Add support for metric extraction from check output for `influxdb_line` -transformer. + transformer. - Add e2e test for metric extraction. ### Changed - Changed the maximum number of open file descriptors on a system to from 1024 -(default) to 65535. + (default) to 65535. - Increased the default etcd size limit from 2GB to 4GB. - Move Hooks and Silenced out of Event and into Check. - Handle round-robin scheduling in wizardbus. - Added informational logging for failed entity keepalives. - Replaced fileb0x with vfsgen for bundling static assets into binary. Nodejs 8+ -and yarn are now dependencies for building the backend. + and yarn are now dependencies for building the backend. - Updated etcd to 3.3.2 from 3.3.1 to fix an issue with autocompaction settings. - Updated and corrected logging style for variable fields. - Build protobufs with go generate. @@ -2005,7 +2010,7 @@ and yarn are now dependencies for building the backend. - Disable gostatsd internal metric collection. - Improved log entries produced by pipelined. - Allow the InfluxDB handler to parse the Sensu metric for an InfluxDB field tag -and measurement. + and measurement. - Removed organization and environment flags from create command. - Changed `metric_format` to `output_metric_format`. - Changed `metric_handlers` to `output_metric_handlers`. @@ -2023,7 +2028,7 @@ and measurement. - Silenced entries using an asterisk can be deleted - Improve json unmarshaling performance. - Events created from the metrics passed to the statsd listener are no longer -swallowed. The events are sent through the pipeline. + swallowed. The events are sent through the pipeline. - Fixed a bug where the Issued field was never populated. - When creating a new statsd server, use the default flush interval if given 0. - Fixed a bug where check and checkconfig handlers and subscriptions are null in rendered JSON. @@ -2035,7 +2040,7 @@ swallowed. The events are sent through the pipeline. - Check event entities now have a last_seen timestamp. - Improved silenced entry display and UX. - Fixed a small bug in the opentsdb transformer so that it trims trailing -whitespace characters. + whitespace characters. ## [2.0.0-nightly.1] - 2018-03-07 ### Added @@ -2043,11 +2048,11 @@ whitespace characters. - Add CLI support for adhoc check requests. - Check scheduler now handles adhoc check requests. - Added `set-FIELD` and `remove-FIELD` commands for all updatable fields -of a check. This allows updating single fields and completely clearing out -non-required fields. + of a check. This allows updating single fields and completely clearing out + non-required fields. - Add built-in only_check_output mutator to pipelined. - Allow publish, cron, ttl, timeout, low flap threshold and more fields to be -set when importing legacy settings. + set when importing legacy settings. - Add CPU architecture in system information of entities. - The `sensuctl user change-password` subcommand now accepts flag parameters. - Configured and enabled etcd autocompaction. @@ -2055,7 +2060,7 @@ set when importing legacy settings. - Agents now try to reconnect to the backend if the connection is lost. - Added non-functional selections for resolving and silencing to web ui - Add LastOk to check type. This will be updated to reflect the last timestamp -of a successful check. + of a successful check. - Added GraphQL explorer to web UI. - Added check occurrences and occurrences_watermark attributes from Sensu 1.x. - Added issue template for GitHub. @@ -2063,25 +2068,25 @@ of a successful check. ### Changed - Refactor Check data structure to not depend on CheckConfig. This is a breaking -change that will cause existing Sensu alpha installations to break if upgraded. -This change was made before beta release so that further breaking changes could -be avoided. + change that will cause existing Sensu alpha installations to break if upgraded. + This change was made before beta release so that further breaking changes could + be avoided. - Make indentation in protocol buffers files consistent. - Refactor Hook data structure. This is similar to what was done to Check, -except that HookConfig is now embedded in Hook. + except that HookConfig is now embedded in Hook. - Refactor CheckExecutor and AdhocRequestExecutor into an Executor interface. - Changed the sensu-backend etcd flag constants to match the etcd flag names. - Upgraded to Etcd v3.3.1 - Removed 3DES from the list of allowed ciphers in the backend and agent. - Password input fields are now aligned in `sensuctl user change-password` -subcommand. + subcommand. - Agent backend URLs without a port specified will now default to port 8081. - Travis encrypted variables have been updated to work with travis-ci.org - Upgraded all builds to use Go 1.10. - Use megacheck instead of errcheck. - Cleaned agent configuration. - We no longer duplicate hook execution for types that fall into both an exit -code and severity (ex. 0, ok). + code and severity (ex. 0, ok). - Updated the sensuctl guidelines. - Changed travis badge to use travis-ci.org in README.md. - Govaluate's modifier tokens can now be optionally forbidden. @@ -2091,19 +2096,19 @@ code and severity (ex. 0, ok). ### Fixed - Fixed a bug in time.InWindow that in some cases would cause subdued checks to -be executed. + be executed. - Fixed a bug in the HTTP API where resource names could not contain special -characters. + characters. - Resolved a bug in the keepalive monitor timer which was causing it to -erroneously expire. + erroneously expire. - Resolved a bug in how an executor processes checks. If a check contains proxy -requests, the check should not duplicately execute after the proxy requests. + requests, the check should not duplicately execute after the proxy requests. - Removed an erroneous validation statement in check handler. - Fixed HookList `hooks` validation and updated `type` validation message to -allow "0" as a valid type. + allow "0" as a valid type. - Events' check statuses & execution times are now properly added to CheckHistory. - Sensu v1 Check's with TTL, timeout and threshold values can now be imported -correctly. + correctly. - Use uint32 for status so it's not empty when marshalling. - Automatically create a "default" environment when creating a new organization. @@ -2114,14 +2119,14 @@ correctly. - Add API support for adhoc check requests. - Check scheduler now supports round-robin scheduling. - Added better error checking for CLI commands and support for mutually -exclusive fields. + exclusive fields. - Added `--interactive` flag to CLI which is required to run interactive mode. - Added CLI role rule-add Organization and Environment interactive prompts. - Added events page list and simple buttons to filter ### Changed - Silenced `begin` supports human readable time (Format: Jan 02 2006 3:04PM MST) -in `sensuctl` with optional timezone. Stores the field as unix epoch time. + in `sensuctl` with optional timezone. Stores the field as unix epoch time. - Increased the timeout in the store's watchers tests. - Incremental retry mechanism when waiting for agent and backend in e2e tests. - Renamed CLI asset create interactive prompt "Org" to "Organization". @@ -2139,10 +2144,10 @@ in `sensuctl` with optional timezone. Stores the field as unix epoch time. ### Fixed - Tracks in-progress checks with a map and mutex rather than an array to -increase time efficiency and synchronize goroutines reading from and writing -to that map. + increase time efficiency and synchronize goroutines reading from and writing + to that map. - Fixed a bug where we were attempting to kill processes that had already -finished before its allotted execution timeout. + finished before its allotted execution timeout. - Fixed a bug where an event could erroneously be shown as silenced. - Properly log errors whenever a check request can't be published. - Fixed some build tags for tests using etcd stores. @@ -2169,7 +2174,7 @@ finished before its allotted execution timeout. - Entities have been added to the state manager and synchronizer. - Added package leader, for facilitating execution by a single backend. - Proxy check requests are now published to all entities described in -`ProxyRequests` and `EntityAttributes`. + `ProxyRequests` and `EntityAttributes`. - Add quick navigation component for dashboard ### Changed @@ -2178,7 +2183,7 @@ finished before its allotted execution timeout. ### Fixed - Fixed a bug where retrieving check hooks were only from the check's -organization, rather than the check's environment, too. + organization, rather than the check's environment, too. ## [2.0.0-alpha.14] - 2018-01-23 ### Added @@ -2189,9 +2194,9 @@ organization, rather than the check's environment, too. - Token substitution is now available for check hooks - Add an e2e test for logging redaction - Support for `When` field in `Filter` which enables filtering based on days -and times of the week. + and times of the week. - New gRPC inspired GraphQL implementation. See -[graphql/README](backend/apid/graphql/README.md) for usage. + [graphql/README](backend/apid/graphql/README.md) for usage. - Support for TTLs in check configs to monitor stale check results. ### Changed @@ -2206,7 +2211,7 @@ and times of the week. - Fixed e2e test for token substitution on Windows - Fixed check subdue unit test for token substitution on Windows - Consider the first and last seconds of a time window when comparing the -current time + current time - Fixed Travis deploy stage by removing caching for $GOPATH - Parse for [traditional cron](https://en.wikipedia.org/wiki/Cron) strings, rather than [GoDoc cron](https://godoc.org/github.com/robfig/cron) strings. @@ -2217,11 +2222,11 @@ current time ## [2.0.0-alpha.12] - 2018-01-09 ### Added - Add check subdue mechanism. Checks can now be subdued for specified time -windows. + windows. - Silenced entries now include a `begin` timestamp for scheduled maintenance. - Store clients can now use [watchers](https://github.com/sensu/sensu-go/pull/792) to be notified of changes to objects in the store. - Add check `Cron` field. Checks can now be scheduled according to the cron -string stored in this field. + string stored in this field. - Add a distributed queue package for use in the backend. - Token substitution is now available for checks. - CLI functionality for check `Cron` field. @@ -2231,11 +2236,11 @@ string stored in this field. ## [2.0.0-alpha.11] - 2017-12-19 ### Breaking Changes - The `Source` field on a check has been renamed to `ProxyEntityID`. Any checks -using the Source field will have to be recreated. + using the Source field will have to be recreated. ### Added - Silenced entries with ExpireOnResolve set to true will now be deleted when an -event which has previously failing was resolved + event which has previously failing was resolved - TCP/UDP sockets now accept 1.x backward compatible payloads. 1.x Check Result gets translated to a 2.x Event. - Custom attributes can be added to the agent at start. - New and improved Check Hooks are implemented (see whats new about hooks here: [Hooks](https://github.com/sensu/sensu-alpha-documentation/blob/master/08-hooks.md)) @@ -2247,10 +2252,10 @@ event which has previously failing was resolved - Pulled in latest [github.com/coreos/etcd](https://github.com/coreos/etcd). - Includes fix for panic that occurred on shutdown. - Refer to their -[changelog](https://github.com/gyuho/etcd/blob/f444abaae344e562fc69323c75e1cf772c436543/CHANGELOG.md) -for more. + [changelog](https://github.com/gyuho/etcd/blob/f444abaae344e562fc69323c75e1cf772c436543/CHANGELOG.md) + for more. - Switch to using [github.com/golang/dep](https://github.com/golang/dep) for -managing dependencies; `vendor/` directory has been removed. + managing dependencies; `vendor/` directory has been removed. - See [README](README.md) for usage. ## [2.0.0-alpha.10] - 2017-12-12 @@ -2260,29 +2265,29 @@ managing dependencies; `vendor/` directory has been removed. ### Changed - Events that transitioned from incidents to a healthy state are no longer -filtered by the pipeline + filtered by the pipeline - Errcheck was added to the build script, and the project was given a once-over -to clean up existing errcheck lint. + to clean up existing errcheck lint. - Creating a silenced entry via sensuctl no longer requires an expiry value ### Fixed - Entities can now be silenced using their entity subscription - Fixed a bug in the agent where it was ignoring keepalive interval and timeout -settings on start + settings on start - Keepalives now alert when entities go away! - Fixed a bug in package dynamic that could lead to an error in json.Marshal -in certain cases. + in certain cases. - Fixed an issue in keepalived to handle cases of nil entities in keepalive -messages + messages ## [2.0.0-alpha.9] - 2017-12-5 ### Added - Proxy entities are now dynamically created through the "Source" attribute of a -check configuration + check configuration - Flag to sensuctl configure allowing it to be configured non-interactively -(usage: --non-interactive or -n) + (usage: --non-interactive or -n) - New function SetField in package dynamic, for setting fields on types -supporting extended attributes. + supporting extended attributes. - Automatically append entity:entityID subscription for agent entities - Add silenced command to sensuctl for silencing checks and subscriptions. - Add healthz endpoint to agent api for checking agent liveness. @@ -2290,11 +2295,11 @@ supporting extended attributes. - Add POST /events endpoint to manually create, update, and resolve events. - Add "event resolve" command to sensuctl to manually resolve events. - Add the time.InWindow & time.InWindows functions to support time windows, used -in filters and check subdue + in filters and check subdue ### Fixed - Fixed a bug in how silenced entries were deleted. Only one silenced entry will -be deleted at a time, regardless of wildcard presence for subscription or check. + be deleted at a time, regardless of wildcard presence for subscription or check. ## [2.0.0-alpha.8] - 2017-11-28 ### Added diff --git a/backend/schedulerd/executor.go b/backend/schedulerd/executor.go index a6b30570e1..bb5d7073b3 100644 --- a/backend/schedulerd/executor.go +++ b/backend/schedulerd/executor.go @@ -198,7 +198,9 @@ func (a *AdhocRequestExecutor) listenQueue(ctx context.Context) { continue } - if err = a.processCheck(ctx, &check); err != nil { + //create a new context + newCtx := corev2.SetContextFromResource(ctx, &check) + if err = a.processCheck(newCtx, &check); err != nil { select { case a.listenQueueErr <- err: case <-ctx.Done(): @@ -213,6 +215,7 @@ func (a *AdhocRequestExecutor) listenQueue(ctx context.Context) { } continue } + if err = item.Ack(ctx); err != nil { select { case a.listenQueueErr <- err: @@ -304,7 +307,7 @@ func processCheck(ctx context.Context, executor Executor, check *corev2.CheckCon if err != nil { return err } - // publish proxy requests on matching entities + // publish the proxy requests on matching entities if matchedEntities := matchEntities(entities, check.ProxyRequests); len(matchedEntities) != 0 { if err := executor.publishProxyCheckRequests(matchedEntities, check); err != nil { logger.WithFields(fields).WithError(err).Error("error publishing proxy check requests") diff --git a/backend/schedulerd/executor_test.go b/backend/schedulerd/executor_test.go index d59bf2b69d..d713f7e52a 100644 --- a/backend/schedulerd/executor_test.go +++ b/backend/schedulerd/executor_test.go @@ -7,9 +7,6 @@ import ( "context" "encoding/json" "fmt" - "sync" - "testing" - corev2 "github.com/sensu/core/v2" corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" @@ -19,6 +16,8 @@ import ( "github.com/sensu/sensu-go/backend/store/etcd/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "sync" + "testing" ) func TestAdhocExecutor(t *testing.T) { @@ -66,7 +65,6 @@ func TestAdhocExecutor(t *testing.T) { if err = newAdhocExec.adhocQueue.Enqueue(context.Background(), string(marshaledCheck)); err != nil { assert.FailNow(t, err.Error()) } - msg := <-ch result, ok := msg.(*corev2.CheckRequest) assert.True(t, ok) @@ -346,3 +344,60 @@ func TestCheckBuildRequestAdhoc_GH2201(t *testing.T) { assert.NoError(scheduler.msgBus.Stop()) } + +func TestProcessCheck(t *testing.T) { + t.Parallel() + // Create a MockExecutor + store, err := testutil.NewStoreInstance() + if err != nil { + assert.FailNow(t, err.Error()) + } + bus, err := messaging.NewWizardBus(messaging.WizardBusConfig{}) + require.NoError(t, err) + pm := secrets.NewProviderManager(&mockEventReceiver{}) + executor := NewAdhocRequestExecutor(context.Background(), store, &queue.Memory{}, bus, &cachev2.Resource{}, pm) + defer executor.Stop() + assert.NoError(t, executor.bus.Start()) + + //create check with required values + goodCheck := corev2.FixtureCheckConfig("goodCheck") + goodCheck.Labels = nil + goodCheck.Annotations = nil + goodCheck.Subscriptions = []string{"subscription1"} + goodCheck.Namespace = "Entity1" + goodCheckRequest := &corev2.CheckRequest{} + goodCheckRequest.Config = goodCheck + goodCheck.ProxyRequests = corev2.FixtureProxyRequests(true) + + // Create a context for testing + ctx := context.Background() + newCtx := corev2.SetContextFromResource(ctx, goodCheck) + + // Call the function being tested + err1 := processCheck(newCtx, executor, goodCheck) + _, err2 := executor.getEntities(newCtx) + err3 := executor.execute(goodCheck) + proxyVal := goodCheck.ProxyRequests + boolCheck := assert.NotNil(t, proxyVal) + if !boolCheck { + t.Fatal("Proxy Request execution returned nil") + } + // Assert expectations + assert.NoError(t, err, "Expected ,no error from processCheck") + assert.NoError(t, err2, "No Error from getEntities") + assert.NoError(t, err3, "No Error returned from execute call") + + // Printing Errors if occurred + if err1 != nil { + t.Errorf("processCheck returned an unexpected error: %v", err1) + t.Fail() + } + if err2 != nil { + t.Errorf("Error in executing Get Entities : %v", err2) + t.Fail() + } + if err3 != nil { + t.Errorf("Error in execute call : %v", err3) + t.Fail() + } +} From 7ace8870758a4458e88b52385c2f629af32969cc Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 17 Sep 2024 14:05:38 +0530 Subject: [PATCH 157/173] 6 mins ttl for user sessions Signed-off-by: manisha kumari --- backend/store/etcd/session.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/store/etcd/session.go b/backend/store/etcd/session.go index b0098e819f..f6fe7c9a4c 100644 --- a/backend/store/etcd/session.go +++ b/backend/store/etcd/session.go @@ -30,9 +30,9 @@ func (s *Store) GetSession(ctx context.Context, username, sessionID string) (str } // UpdateSession applies the supplied state to the session uniquely identified -// by the given username and session ID and TTL of 11 minutes +// by the given username and session ID and TTL of 6 minutes considering access token expires in 5 minutes func (s *Store) UpdateSession(ctx context.Context, username, sessionID, state string) error { - leaseResp, err := s.client.Grant(ctx, 60*11) + leaseResp, err := s.client.Grant(ctx, 60*6) if err != nil { fmt.Errorf("%s", err) } @@ -48,6 +48,5 @@ func (s *Store) DeleteSession(ctx context.Context, username, sessionID string) e if _, err := s.client.Delete(ctx, userSessionPath(username, sessionID)); err != nil { return err } - return nil } From 6c08054e47663a04f7ed95224da310fb74332369 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 17 Sep 2024 14:34:07 +0530 Subject: [PATCH 158/173] 6 mins ttl for user sessions Signed-off-by: manisha kumari --- backend/store/etcd/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/store/etcd/session.go b/backend/store/etcd/session.go index f6fe7c9a4c..910d098738 100644 --- a/backend/store/etcd/session.go +++ b/backend/store/etcd/session.go @@ -30,7 +30,7 @@ func (s *Store) GetSession(ctx context.Context, username, sessionID string) (str } // UpdateSession applies the supplied state to the session uniquely identified -// by the given username and session ID and TTL of 6 minutes considering access token expires in 5 minutes +// by the given username and session ID and TTL of 6 minutes added considering access token expires in 5 minutes func (s *Store) UpdateSession(ctx context.Context, username, sessionID, state string) error { leaseResp, err := s.client.Grant(ctx, 60*6) if err != nil { From da0b51af382b407096e24f38acc46b03e11a6206 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 17 Sep 2024 14:45:15 +0530 Subject: [PATCH 159/173] added 6 mins ttl for user sessions Signed-off-by: manisha kumari --- backend/store/etcd/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/store/etcd/session.go b/backend/store/etcd/session.go index 910d098738..d46925cab7 100644 --- a/backend/store/etcd/session.go +++ b/backend/store/etcd/session.go @@ -30,7 +30,7 @@ func (s *Store) GetSession(ctx context.Context, username, sessionID string) (str } // UpdateSession applies the supplied state to the session uniquely identified -// by the given username and session ID and TTL of 6 minutes added considering access token expires in 5 minutes +// by the given username and session ID and TTL of 6 minutes added considering access token gets expired in 5 minutes func (s *Store) UpdateSession(ctx context.Context, username, sessionID, state string) error { leaseResp, err := s.client.Grant(ctx, 60*6) if err != nil { From 2d32a3d6fc7225cae7a1bf2e50609952afbe95d8 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 17 Sep 2024 14:57:11 +0530 Subject: [PATCH 160/173] added 6 mins ttl for each user sessions Signed-off-by: manisha kumari --- backend/store/etcd/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/store/etcd/session.go b/backend/store/etcd/session.go index d46925cab7..910d098738 100644 --- a/backend/store/etcd/session.go +++ b/backend/store/etcd/session.go @@ -30,7 +30,7 @@ func (s *Store) GetSession(ctx context.Context, username, sessionID string) (str } // UpdateSession applies the supplied state to the session uniquely identified -// by the given username and session ID and TTL of 6 minutes added considering access token gets expired in 5 minutes +// by the given username and session ID and TTL of 6 minutes added considering access token expires in 5 minutes func (s *Store) UpdateSession(ctx context.Context, username, sessionID, state string) error { leaseResp, err := s.client.Grant(ctx, 60*6) if err != nil { From d1eb3fb0caf412ad50a73920ff654fc37715783f Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 17 Sep 2024 15:19:06 +0530 Subject: [PATCH 161/173] added 6 mins ttl for each user_sessions Signed-off-by: manisha kumari --- CHANGELOG-6.md | 2 +- backend/store/etcd/session.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 22a7c1a08d..9a8eccde01 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -10,7 +10,7 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Changed - Added TTl to each entry in user-session within etcd -- TTl value is 11 minutes +- TTl value is 6 minutes ## [6.11.0] - 2024-01-31 diff --git a/backend/store/etcd/session.go b/backend/store/etcd/session.go index 910d098738..8dc8ac7152 100644 --- a/backend/store/etcd/session.go +++ b/backend/store/etcd/session.go @@ -34,7 +34,7 @@ func (s *Store) GetSession(ctx context.Context, username, sessionID string) (str func (s *Store) UpdateSession(ctx context.Context, username, sessionID, state string) error { leaseResp, err := s.client.Grant(ctx, 60*6) if err != nil { - fmt.Errorf("%s", err) + return fmt.Errorf("%s", err) } if _, err := s.client.Put(ctx, userSessionPath(username, sessionID), state, clientv3.WithLease(leaseResp.ID)); err != nil { return err From 596c9067df8216dac2203a89644c0cd0d4dc63a9 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Wed, 25 Sep 2024 13:37:00 +0530 Subject: [PATCH 162/173] ttl hardcoding removed Signed-off-by: manisha kumari --- CHANGELOG-6.md | 4 ++-- backend/authentication/jwt/jwt.go | 8 ++++---- backend/authentication/jwt/jwt_test.go | 6 +++--- backend/store/etcd/session.go | 9 ++++++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 9a8eccde01..8a9a7494b9 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -9,8 +9,8 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## [6.11.1] - 2024-09-12 ### Changed -- Added TTl to each entry in user-session within etcd -- TTl value is 6 minutes +- ADD TTL to each user session in the etcd data store to prevent leak. +- TTl value is DefaultAccessTokenLifeSpan + 1 minute ## [6.11.0] - 2024-01-31 diff --git a/backend/authentication/jwt/jwt.go b/backend/authentication/jwt/jwt.go index 09c65d526f..7e2d513ec0 100644 --- a/backend/authentication/jwt/jwt.go +++ b/backend/authentication/jwt/jwt.go @@ -26,7 +26,7 @@ const ( ) var ( - defaultAccessTokenLifespan = 5 * time.Minute + DefaultAccessTokenLifespan = 5 * time.Minute defaultRefreshTokenLifespan = 12 * time.Hour secret []byte privateKey *ecdsa.PrivateKey @@ -58,7 +58,7 @@ func AccessToken(claims *corev2.Claims) (*jwt.Token, string, error) { claims.Id = jti // Add an expiration to the token - claims.ExpiresAt = time.Now().Add(defaultAccessTokenLifespan).Unix() + claims.ExpiresAt = time.Now().Add(DefaultAccessTokenLifespan).Unix() token := jwt.NewWithClaims(signingMethod, claims) @@ -78,7 +78,7 @@ func AccessToken(claims *corev2.Claims) (*jwt.Token, string, error) { return token, tokenString, nil } -// NewClaims creates new claim based on username +:q// NewClaims creates new claim based on username func NewClaims(user *corev2.User) (*corev2.Claims, error) { // Create a unique identifier for the token jti, err := GenJTI() @@ -91,7 +91,7 @@ func NewClaims(user *corev2.User) (*corev2.Claims, error) { // library's documentation. We should replace its usage with // RegisteredClaims. StandardClaims: jwt.StandardClaims{ - ExpiresAt: time.Now().Add(defaultAccessTokenLifespan).Unix(), + ExpiresAt: time.Now().Add(DefaultAccessTokenLifespan).Unix(), Id: jti, Subject: user.Username, }, diff --git a/backend/authentication/jwt/jwt_test.go b/backend/authentication/jwt/jwt_test.go index 0abc6ba5ec..bbfea67569 100644 --- a/backend/authentication/jwt/jwt_test.go +++ b/backend/authentication/jwt/jwt_test.go @@ -121,7 +121,7 @@ func TestValidateTokenError(t *testing.T) { assert.NoError(t, err) // The token should expire after the expiration time - testTime.Set(time.Now().Add(defaultAccessTokenLifespan + time.Hour)) + testTime.Set(time.Now().Add(DefaultAccessTokenLifespan + time.Hour)) _, err = ValidateToken(tokenString) assert.Error(t, err) } @@ -134,7 +134,7 @@ func TestValidateExpiredToken(t *testing.T) { _, tokenString, _ := AccessToken(claims) // Wait for the token to expire - testTime.Set(time.Now().Add(defaultAccessTokenLifespan + time.Second)) + testTime.Set(time.Now().Add(DefaultAccessTokenLifespan + time.Second)) _, err := ValidateExpiredToken(tokenString) assert.NoError(t, err, "An expired token should not be considered as invalid") } @@ -158,7 +158,7 @@ func TestValidateExpiredTokenInvalid(t *testing.T) { _, tokenString, _ := AccessToken(claims) // The token will expire - testTime.Set(time.Now().Add(defaultAccessTokenLifespan + time.Second)) + testTime.Set(time.Now().Add(DefaultAccessTokenLifespan + time.Second)) // Modify the secret so it's no longer valid secret = []byte("qux") diff --git a/backend/store/etcd/session.go b/backend/store/etcd/session.go index 8dc8ac7152..2af98e8391 100644 --- a/backend/store/etcd/session.go +++ b/backend/store/etcd/session.go @@ -3,7 +3,7 @@ package etcd import ( "context" "fmt" - + "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "go.etcd.io/etcd/client/v3" ) @@ -30,9 +30,12 @@ func (s *Store) GetSession(ctx context.Context, username, sessionID string) (str } // UpdateSession applies the supplied state to the session uniquely identified -// by the given username and session ID and TTL of 6 minutes added considering access token expires in 5 minutes +// by the given username and session ID with attached lease for TTL of the key func (s *Store) UpdateSession(ctx context.Context, username, sessionID, state string) error { - leaseResp, err := s.client.Grant(ctx, 60*6) + + leaseDuration := jwt.DefaultAccessTokenLifespan + ttl := int64(leaseDuration.Minutes()+1) * 60 + leaseResp, err := s.client.Grant(ctx, ttl) if err != nil { return fmt.Errorf("%s", err) } From 32e117fac6efc38c3a674dc39d0bf196b60cba34 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Wed, 25 Sep 2024 13:43:06 +0530 Subject: [PATCH 163/173] ttl hardcoding removed Signed-off-by: manisha kumari --- backend/authentication/jwt/jwt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/authentication/jwt/jwt.go b/backend/authentication/jwt/jwt.go index 7e2d513ec0..81fbb84448 100644 --- a/backend/authentication/jwt/jwt.go +++ b/backend/authentication/jwt/jwt.go @@ -78,7 +78,7 @@ func AccessToken(claims *corev2.Claims) (*jwt.Token, string, error) { return token, tokenString, nil } -:q// NewClaims creates new claim based on username +// NewClaims creates new claim based on username func NewClaims(user *corev2.User) (*corev2.Claims, error) { // Create a unique identifier for the token jti, err := GenJTI() From e58913fbd11b22646859508adbe78196e2a789f6 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Wed, 25 Sep 2024 16:38:21 +0530 Subject: [PATCH 164/173] ttl hardcoding removed Signed-off-by: manisha kumari --- backend/store/etcd/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/store/etcd/session.go b/backend/store/etcd/session.go index 2af98e8391..91fdaa8f5a 100644 --- a/backend/store/etcd/session.go +++ b/backend/store/etcd/session.go @@ -30,7 +30,7 @@ func (s *Store) GetSession(ctx context.Context, username, sessionID string) (str } // UpdateSession applies the supplied state to the session uniquely identified -// by the given username and session ID with attached lease for TTL of the key +// by the given username and session ID with attached lease and TTl for each key func (s *Store) UpdateSession(ctx context.Context, username, sessionID, state string) error { leaseDuration := jwt.DefaultAccessTokenLifespan From 75704f6e53c023ba4a4c607b66eca8c0e35a5a10 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 1 Oct 2024 11:52:57 +0530 Subject: [PATCH 165/173] change log statement revised Signed-off-by: manisha kumari --- CHANGELOG-6.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 8a9a7494b9..49d8ea93c5 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -10,7 +10,6 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Changed - ADD TTL to each user session in the etcd data store to prevent leak. -- TTl value is DefaultAccessTokenLifeSpan + 1 minute ## [6.11.0] - 2024-01-31 From 9ab69a60f0f26b0ce23fde85a14c2f6450de45d0 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 15 Oct 2024 10:17:17 +0530 Subject: [PATCH 166/173] changelog.md same as develop/6 Signed-off-by: manisha kumari --- CHANGELOG-6.md | 832 ++++++++++++++++++++++++------------------------- 1 file changed, 416 insertions(+), 416 deletions(-) diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 49d8ea93c5..3ad4503336 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -6,10 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [6.11.1] - 2024-09-12 +## [6.11.0] - 2024-01-31 -### Changed -- ADD TTL to each user session in the etcd data store to prevent leak. +### Fixed +- Manual check execution of scheduled check will also be able to fetch the matched entities ## [6.11.0] - 2024-01-31 @@ -67,41 +67,41 @@ Versioning](http://semver.org/spec/v2.0.0.html). ### Added - A sensu.io/output\_truncated\_bytes label is now applied to events when -the check output has been truncated due to a check's max\_output\_size -configuration. + the check output has been truncated due to a check's max\_output\_size + configuration. ## [6.8.1] - 2022-09-13 ### Changed - Check subdues are now evaluated on a half open interval such that there -should be no unintended gaps between overlapping subdues. + should be no unintended gaps between overlapping subdues. ### Security - Addresses issue where the entity list view would display values of redacted -labels. + labels. ## [6.8.0] - 2022-08-24 ### Changed - Eventd now prioritizes keepalive events over other events in order to -mitigate the potential of keepalive event creation storms and mass agent -disconnects. + mitigate the potential of keepalive event creation storms and mass agent + disconnects. ### Added - GlobalResource interface in core/v3 allows core/v3 resources to -be marked as global resources. + be marked as global resources. - Added `--api-serve-wait-time` backend flag to delay serving API requests -for a period of time after startup. + for a period of time after startup. - Added `/ready` endpoint to the sensu-go API. Returns 200 when the API is ready -to serve traffic. + to serve traffic. - Added `--agent-serve-wait-time` backend flag to delay accepting agent -connections for a period of time after startup. + connections for a period of time after startup. - Added `/ready` endpoint to the agent listener. Returns 200 when the listener -is ready to accept agent connections. + is ready to accept agent connections. ### Fixed - Fixed a bug where sensu-backend could crash if the BackendIDGetter -encounters etcd client unavailability. + encounters etcd client unavailability. ## [6.7.5] - 2022-08-10 @@ -117,16 +117,16 @@ encounters etcd client unavailability. ### Changed - Agents will no longer execute check requests with equal or older issued -timestamps than the issued timestamp for the last executed check request with -the same check name. + timestamps than the issued timestamp for the last executed check request with + the same check name. ## [6.7.2] - 2022-05-12 ### Added - Added the `etcd-unsafe-no-fsync` backend configuration option, -making it possible to run a sensu-backend with an embedded etcd node -for testing and development without placing lots of load on the file -system. + making it possible to run a sensu-backend with an embedded etcd node + for testing and development without placing lots of load on the file + system. ### Fixed - Print the correct round robin scheduler source (etcd or postgres). @@ -138,7 +138,7 @@ system. ### Changed - Cron scheduler now logs that it is stopping before it begins the process of -stopping. + stopping. ### Fixed - Fixed several data races in schedulerd. @@ -156,9 +156,9 @@ stopping. - Log agent IP address for connections with faulty TLS configurations. - ARM Version detection - Fixed a bug where pipelines in check configuration were not represented in -the check object of events that were produced with the check configuration. + the check object of events that were produced with the check configuration. - Socket handlers will no longer cause sensu-backend to panic when interrupted -mid-write. + mid-write. ### Changed - The default embedded etcd heartbeat interval has been increased from 100 to 300. @@ -170,15 +170,15 @@ mid-write. ### Fixed - [GraphQL] Fixed issue where one could not use an offset >= 500 when paging -through entities. + through entities. ## [6.6.5] - 2022-02-03 ### Fixed - Fixed interactive wording for `sensu-backend upgrade`. The wording no longer -refers to Sensu 5.x. + refers to Sensu 5.x. - Resolves unpredictable ringv2 behavior when identical subscriptions are -created from different contexts. + created from different contexts. ### Added - Added metric threshold service checks. @@ -190,18 +190,18 @@ created from different contexts. ### Changed - Agent now persists prometheus HELP messages as a metric tag. - Resource specifications can now use precise core/v2 and core/v3 module -versions. For instance, api_version: core/v2.5.1 or core/v2.3. The resource -validation system will reject the resource if Sensu does not have at least the -specified version. + versions. For instance, api_version: core/v2.5.1 or core/v2.3. The resource + validation system will reject the resource if Sensu does not have at least the + specified version. ### Fixed - Empty map fields (e.g. an entity with no labels) are no longer treated as nil -when used with token substitution. + when used with token substitution. ## [6.6.4] - 2022-01-13 ### Added - Add `sensu_go_event_metric_points_processed` counter metric and -included it in tessen reporting. + included it in tessen reporting. ### Fixed - Referencing a non-existent handler in a pipeline no longer results in a crash. @@ -210,28 +210,28 @@ included it in tessen reporting. ### Added - Added `etcd-client-log-level` configuration flag for setting the log level of -the etcd client used internally within sensu-backend. + the etcd client used internally within sensu-backend. ### Changed - [GraphQL] Improvements to entity list response times and significant reduction -in memory usage. + in memory usage. - The agentd daemon now starts up after all other daemons which improves the -chances of a cluster recovering after the loss of a backend. + chances of a cluster recovering after the loss of a backend. - sensu-backend will now crash when its daemons do not stop within 30s. This can -happen as the result of an intentional shutdown, or when an internal restart is -triggered by database unavailability. This only applies when --no-embed-etcd is -true. Embedded etcd sensu-backend will do everything it can to avoid crashing, -which is necessary to avoid member corruption. + happen as the result of an intentional shutdown, or when an internal restart is + triggered by database unavailability. This only applies when --no-embed-etcd is + true. Embedded etcd sensu-backend will do everything it can to avoid crashing, + which is necessary to avoid member corruption. ### Fixed - New agent sessions will no longer result in a leaked Etcd lease. - sensu-backend now prints warning and continues instead of crashing -when --event-log-file cannot be written to. + when --event-log-file cannot be written to. - Fixed a crash that can occur when keepalive leases are revoked on another -backend, or by an etcd operator. + backend, or by an etcd operator. - Fixed an issue where sensu-backend would not terminate correctly. - Proxy entity state is now created when it is missing and a matching entity -config already exists. + config already exists. ### Changed - Removed unused rate limiting code in the liveness package. @@ -239,56 +239,56 @@ config already exists. ### Added - Add `sensu_go_event_metric_points_processed` counter metric and -included it in tessen reporting. + included it in tessen reporting. ## [6.6.1, 6.6.2] - 2021-11-29 ### Added - Check & CheckConfig validation errors related to cron now provide additional -context. + context. ### Fixed - Remove debugging log entry. - Event executed timestamps are now set when resolving an event through -sensuctl or the webui. + sensuctl or the webui. ## [6.6.0] - 2021-11-25 ### Added - Add backend label to logged metrics. - Check & CheckConfig validation errors related to cron now provide additional -context. + context. ### Fixed - In addition to the context error print the connection error when -sensu-go can't connect to etcd. + sensu-go can't connect to etcd. - Fixed a bug where sensu-backend could crash if the BackendIDGetter -encounters etcd client unavailability. + encounters etcd client unavailability. ### Changed - Empty and zero value configuration parameters for `etcd` do not -overwrite defaults anymore. + overwrite defaults anymore. ## [6.5.5] - 2021-11-19 ### Added - Added objectives (0.5, 0.9, 0.99) to `graphql_duration_seconds` metric. - Added `graphql_duration_seconds`, `graphql_duration_seconds_sum` & -`graphql_duration_seconds_count` to the metrics log. + `graphql_duration_seconds_count` to the metrics log. - Added new prometheus metrics for tracking lease operations. - Added `sensu_go_lease_ops` to the metrics log. - Added `--api-write-timeout` & `--dashboard-write-timeout` flags to allow -end users to configure the HTTP server's write timeout value + end users to configure the HTTP server's write timeout value ### Fixed - Duration metrics for assets, pipeline, and eventd have been updated to use -milliseconds to match other duration metrics. + milliseconds to match other duration metrics. - Fixed an error where sensu-backend or sensu-agent could panic due to -concurrent websocket writes. + concurrent websocket writes. - The sensu-backend's /version API has updated to reflect the version of a an -external etcd cluster. + external etcd cluster. - When keepalive lease grant operations fail due to rate limiting, they are now -retried. + retried. ## [6.5.3, 6.5.4] - 2021-10-29 @@ -297,16 +297,16 @@ retried. ### Fixed - Fixed a bug where API validation caused javascript environment variable -specifications to be rejected. + specifications to be rejected. - Fixed a bug where the asset expansion error was not handled ## [6.5.2] - 2021-10-28 ### Added - Added `status` & `event_type` labels to the sensu_go_event_handler_duration -metric. + metric. - Added `sensu_go_event_handler_duration_sum` & -`sensu_go_event_handler_duration_count` to the metrics log. + `sensu_go_event_handler_duration_count` to the metrics log. - Added metric `sensu_go_eventd_create_proxy_entity_duration`. - Added metric `sensu_go_eventd_update_event_duration`. - Added metric `sensu_go_eventd_bus_publish_duration`. @@ -337,32 +337,32 @@ metric. ### Added - Added javascript mutators, which can be selected by setting -"type": "javascript" on core/v2.Mutators, and specifying valid ECMAScript 5 -code in the "eval" field. See documentation for details. + "type": "javascript" on core/v2.Mutators, and specifying valid ECMAScript 5 + code in the "eval" field. See documentation for details. - Added `core/v2.Pipeline` resource for configuring event pipelines. - Added `pipelines` field to `Check` and `CheckConfig` - Added the platform metrics log. This log contains a listing of core Sensu -metrics in influx-line format. It is enabled by default but can be disabled -with the --disable-platform-metrics flag. By default the log is appended to -every 60s, and written to /var/lib/sensu/sensu-backend/stats.log. + metrics in influx-line format. It is enabled by default but can be disabled + with the --disable-platform-metrics flag. By default the log is appended to + every 60s, and written to /var/lib/sensu/sensu-backend/stats.log. - Open-sourced the previously enterprise-only event logger. The event logger -can be used to send the events a backend processes to a rotatable log file. + can be used to send the events a backend processes to a rotatable log file. - Added sensuctl commands for pipeline list, info, and delete. - Added support for `SENSU_BACKEND_ETCD_CLIENT_USERNAME` and -`SENSU_BACKEND_ETCD_CLIENT_PASSWORD` environment variables for connecting to -external etcds that use user/password authentication instead of client -certificate authentication. Typical with DBaaS etcd providers. These can only be -set via these environment variables and intentionally cannot be set via flags. + `SENSU_BACKEND_ETCD_CLIENT_PASSWORD` environment variables for connecting to + external etcds that use user/password authentication instead of client + certificate authentication. Typical with DBaaS etcd providers. These can only be + set via these environment variables and intentionally cannot be set via flags. ### Fixed - `sensuctl env` now properly displays the `SENSU_API_KEY` and `SENSU_TIMEOUT` -environment variables. + environment variables. - `sensuctl command exec` now properly adds the `SENSU_API_KEY` and -`SENSU_TIMEOUT` variables to the command's environment. + `SENSU_TIMEOUT` variables to the command's environment. - Fixed a crash when running the backend on `darwin/arm64` when compressing a -wrapped resource. + wrapped resource. - Fixed a bug where large number of silences could cause etcd errors by not -exceeding etcd'd default maximum number of transaction operations. + exceeding etcd'd default maximum number of transaction operations. ### Changed - Upgraded Go version from 1.16.5 to 1.17.1. @@ -371,51 +371,51 @@ exceeding etcd'd default maximum number of transaction operations. ### Added - Added `sensu_go_agentd_event_bytes` & `sensu_go_store_event_bytes` summary -metrics to the `/metrics` endpoint. + metrics to the `/metrics` endpoint. ## [6.4.1] - 2021-08-24 ### Added - Added `ignore-already-initialized` configuration flag to the sensu-backend -init command for returning exit code 0 when a cluster has already been -initialized. + init command for returning exit code 0 when a cluster has already been + initialized. - Added --retry-min, --retry-max, and --retry-multiplier flags to sensu-agent -for controlling agent retry exponential backoff behaviour. --retry-min and ---retry-max expect duration values like 1s, 10m, 4h. --retry-multiplier expects -a decimal multiplier value. + for controlling agent retry exponential backoff behaviour. --retry-min and + --retry-max expect duration values like 1s, 10m, 4h. --retry-multiplier expects + a decimal multiplier value. - Added ProcessedBy field to check results. The ProcessedBy field indicates which -agent processed a particular event. + agent processed a particular event. - Added API key support for admin user at cluster init time. - Added `sensu_go_agentd_event_bytes` & `sensu_go_store_event_bytes` summary -metrics to the `/metrics` endpoint. + metrics to the `/metrics` endpoint. - Added support for environment variable arguments in `sensuctl`. ### Changed - When deleting resource with sensuctl, the resource type will now be displayed -in the confirmation prompt + in the confirmation prompt - When keepalived encounters round-robin ring errors, the backend no longer -internally restarts. + internally restarts. - The core/v2.Mutator type now has a Type field which can be used to tell -Sensu that the mutator is a different type from the default (pipe). Currently, -the supported types are "pipe" and "javascript". + Sensu that the mutator is a different type from the default (pipe). Currently, + the supported types are "pipe" and "javascript". - The default retry values have been increased from a minimum of 10ms to 1s, a -maximum of 10s to 120s, and the multiplier decreased from 10.0 to 2.0. + maximum of 10s to 120s, and the multiplier decreased from 10.0 to 2.0. - The backend internal bus default buffer sizes have been increased from 100 -to 1000 items. + to 1000 items. ### Fixed - Sensu Go OSS can now be built on `darwin/arm64`. - Fixed a regression in `sensu-backend init` where the exit status returned 0 -if the store was already initialized. + if the store was already initialized. - Guard against potential crash in the sensuctl cluster member-list command when -the etcd response header is nil. + the etcd response header is nil. - Agent events API now accepts metrics event. - Fixed rare cases where the agent could fail to delete temporary files when -downloading assets. + downloading assets. - Forwards compatibility with newer Sensu backends has been improved. Users can -now create resources with fields that are unknown to Sensu. + now create resources with fields that are unknown to Sensu. - The `--retry-min`, `--retry-max` and `--retry-multiplier` flags are now listed -in the `sensu-agent start --help` output. + in the `sensu-agent start --help` output. ### Changed - API and agent services now log at warn level when the start up, not at info. @@ -425,9 +425,9 @@ in the `sensu-agent start --help` output. ### Added - Added `etcd-log-level` configuration flag for setting the log level of the -embedded etcd server. + embedded etcd server. - Added wait flag to the sensu-backend init command which toggles waiting -indefinitely for etcd to become available. + indefinitely for etcd to become available. - Added sensu_go_keepalives prometheus counter. ### Changed @@ -435,19 +435,19 @@ indefinitely for etcd to become available. - Upgraded Etcd version from 3.3.22 to 3.5.0. - The loadit tool now uses UUIDv4 instead of UUIDv1 for agent names. - Some Prometheus metric names have changed with the upgrade to Etcd 3.5. See -https://etcd.io/docs/v3.5/metrics/etcd-metrics-latest.txt for the metrics that -Etcd 3.5 exposes. + https://etcd.io/docs/v3.5/metrics/etcd-metrics-latest.txt for the metrics that + Etcd 3.5 exposes. - The timeout flag for `sensu-backend init` is now treated as a duration instead -of seconds. If the value is less than 1 second, the value is converted to -seconds. + of seconds. If the value is less than 1 second, the value is converted to + seconds. ### Fixed - Fixed config deprecation warnings from being shown when deprecated config -options weren't set. + options weren't set. - Fixed issue with keepalive status remaining in OK status after agent shutdown. - Fixed a bug where role bindings that refer to missing roles would cause the -wrong status to be returned from the HTTP API, and the dashboard to go into a -crash loop. + wrong status to be returned from the HTTP API, and the dashboard to go into a + crash loop. - Fixed a bug where an empty subscription was present in the deregistration event's check. - Fixed issue with Windows agent not handling command timeouts properly - Sensu Go OSS can now be built on `darwin/arm64`. @@ -457,7 +457,7 @@ crash loop. ### Added - Added API key authentication support to sensuctl. - Added ResourceTemplate resource. ResourceTemplate will be used to populate -namespaces with initial resources. + namespaces with initial resources. - Added `GetResourceV3Watcher()` to the `store/etcd` package. - Add `EntityServiceClass` constant to the `corev2` package, representing BSM Services. - Added ResourceTemplate instantiation on namespace creation. @@ -467,11 +467,11 @@ namespaces with initial resources. - Both V2 & V3 resources are now validated when used with storev2. - Initialize labels & annotations for v3 resources when fields are nil. - Fixed the `agent-managed-entity` agent config attribute when no labels are -defined. + defined. - Fixed a bug where the scheduler could crash in rare circumstances, when using -round robin checks. + round robin checks. - Fixed a bug where build information would get calculated for every keepalive -in OSS builds. + in OSS builds. - Don't trigger internal restart on SIGHUP. - Concatenated YAML files now support CRLF. - Remove extraneous auto-completion suggestions. @@ -482,47 +482,47 @@ in OSS builds. - Fixed a potential crash in tessend. - Fixed a potential deadlock in agentd. - Fixed a bug where some Etcd watchers could try to process watch events holding -invalid pointers. + invalid pointers. ## [6.2.3] - 2021-01-21 ### Fixed - Fixed the `agent-managed-entity` agent config attribute when no labels are -defined. + defined. - Fixed a bug where events from namespaces other than the one requested could -appear in sensuctl dump output. The bug only applied to users who had access to -the other namespaces. + appear in sensuctl dump output. The bug only applied to users who had access to + the other namespaces. ## [6.2.1, 6.2.2] - 2021-01-08 ### Fixed - The expire field of silenced entries represents the configured expiration, in -seconds, not the remaining duration. + seconds, not the remaining duration. - Allow agents labels & annotations to be configured via configuration flags. - Fixed a bug where a small amount of extra etcd or postgres traffic was -generated on keepalive failure. + generated on keepalive failure. - Event check history now contains an entry for the first received event. ## [6.2.0] - 2020-12-17 ### Added - Sensuctl and sensu-backend ask for password retype when a new password is -created when in interactive mode. + created when in interactive mode. - Build info is now exposed as a prometheus metric via the /metrics endpoint. - Added `/health` endpoint to agentd. - Added the Scheduler field to Check and CheckConfig. - Add support for environment variables to define configuration file paths of -sensu-backend (`SENSU_BACKEND_CONFIG_FILE`) & sensu-agent (`SENSU_CONFIG_FILE`). + sensu-backend (`SENSU_BACKEND_CONFIG_FILE`) & sensu-agent (`SENSU_CONFIG_FILE`). - Added event sequence numbers. - Entities may now be managed exclusively by their agents when sensu-agent is -started with the new `agent-managed-entity` configuration attribute. + started with the new `agent-managed-entity` configuration attribute. ### Changed - Adjust the date and duration formats used when listing and displaying silenced -entries in sensuctl. + entries in sensuctl. - Make `event_id` usage in logging consistent. - Changed sensuctl commands that only contain subcommands to exit with status -code 46 when no arguments or incorrect arguments are given. + code 46 when no arguments or incorrect arguments are given. ### Fixed - The config-file flag is no longer order dependant. @@ -548,14 +548,14 @@ code 46 when no arguments or incorrect arguments are given. ### Fixed - Fixed a bug where silences could take longer to expire than they should, if -the cluster goes through a restart, or an etcd election. + the cluster goes through a restart, or an etcd election. - Fixed a bug where sensu-agent would not shut down correctly. - The per-entity subscription now persists with PATCH requests. - sensuctl now resolves symbolic links. - Allow HookConfig to be exported via `sensuctl dump`. - Properly log any API error in `sensuctl dump`. - An RBAC rule with the `update` permission now properly authorizes PATCH -requests. + requests. - eventd errors now include additional context for debugging. - Entities are now properly created using `sensuctl create`. @@ -564,25 +564,25 @@ requests. ### Added - A warning is now logged when a runtime asset was requested but does not exist. - Added Prometheus transformer for extracting metrics from check output -using the Prometheus Exposition Text Format. + using the Prometheus Exposition Text Format. - The backend flag `--api-request-limit` is now available to configure the -maximum API request body size, in bytes. + maximum API request body size, in bytes. - Add support for the PATCH method on the REST API for most configuration -resources. + resources. ### Changed - The trusted CA file is now used for agent, backend and sensuctl asset retrieval. ### Fixed - The backend will no longer start when the dashboard TLS configuration is not -fully specified. + fully specified. - Include the agent entity in data passed to the command process' STDIN. - Per-entity subscriptions (ex. `entity:entityName`) are always available on agent entities, -even if removed via the `/entities` API. + even if removed via the `/entities` API. - Fixed a crash in the backend and agent related to Javascript execution. - Proxy entities that are used in round-robin check requests are no longer stale. - Fixed a bug where entity listing would be incorrect if agent entities were -created via the API instead of with sensu-agent. + created via the API instead of with sensu-agent. - Close the response body when done reading from it while downloading assets. - `sensuctl user hash-password` command no longer requires a config to run. @@ -595,46 +595,46 @@ created via the API instead of with sensu-agent. ### Added - Log a warning when secrets cannot be sent to an agent because mTLS is not -enabled. + enabled. - Added the is_silenced boolean key to event.Check object. ### Fixed - Clarifies wording around a secret provider error message. - Logs and returns an error if a mutator cannot be found. - User-Agent header is only set on new client creation rather than on each -request. + request. - Fixed a bug where highly concurrent event filtering could result in a panic. - Fixed a bug where nil labels or annotations in an event filtering context -would result in a bad user experience, with the user having to explicitly -check if the annotations or labels are undefined. Now, the user is guaranteed -that labels and annotations are always defined, though they may be empty. + would result in a bad user experience, with the user having to explicitly + check if the annotations or labels are undefined. Now, the user is guaranteed + that labels and annotations are always defined, though they may be empty. - Automatically capitalize the roleRef and subject types in ClusterRoleBindings -and RoleBindings. + and RoleBindings. - Log the proper CA certificate path in the error message when it can't be -properly parsed by the agent. + properly parsed by the agent. - Fix the log entry field for the check's name in schedulerd. - Store fewer keys in etcd for agents. - Keepalive and round robin scheduling leases are now dealt with more efficiently. ### Breaking - The web interface is now a standalone product and no longer distributed -inside the sensu-backend binary. Refer to https://github.com/sensu/web for -more. + inside the sensu-backend binary. Refer to https://github.com/sensu/web for + more. - The database schema for entities has changed. After upgrading, users will not -be able to use their database with older versions of Sensu. + be able to use their database with older versions of Sensu. - After initial creation, sensu-agent entity configuration cannot be changed -by modifying the agent's configuration file. + by modifying the agent's configuration file. ### Changed - Entities are now stored as two separate data structures, in order to optimize -data access patterns. + data access patterns. - The `dead` and `handleUpdate` methods in keepalived now use `EntityConfig` and -`EntityState` respectively. + `EntityState` respectively. - The `dead()` and `createProxyEntity()` methods in eventd now use `corev3.EntityConfig` and `corev3.EntityState`. - sensu-agent configuration can now be managed via the HTTP API. - ClusterRoleBinding and RoleBinding subjects names can now contain any unicode -characters. + characters. - Enriches output of `sensuctl asset add` with help usage for how to use the runtime asset. - Unless the entity is a proxy entity, updates to entities now ignore state related fields. @@ -649,7 +649,7 @@ characters. ### Fixed - Fixed potential Web UI crash when fetching events in namespace with > 1000 events. - Errors produced in the agent by assets, check validation, token substitution, -and event unmarshaling are logged once again. + and event unmarshaling are logged once again. ## [5.21.0] - 2020-06-10 @@ -657,9 +657,9 @@ and event unmarshaling are logged once again. - Added `SENSU_LICENSE_FILE` environment variable to handler executions. - Added the `sensuctl user hash-password` command to generate password hashes - Added the ability to reset passwords via the backend API & `sensuctl user -reset-password` + reset-password` - The user resource now has a `password_hash` field to specify the password -hash, in place of the cleartext password + hash, in place of the cleartext password - Added the beginnings of the core/v3 API. - Added automatically generated tests for the core/v2 API. @@ -670,14 +670,14 @@ hash, in place of the cleartext password ### Fixed - The password verification logic when running `sensuctl user change-password` -has been moved from sensuctl to the backend API. + has been moved from sensuctl to the backend API. - Errors while publishing proxy check requests do not block scheduling for other -entities. + entities. - Listing namespaces in sensuctl with `--chunk-size` now works properly. - Prevent the agent from immediately exiting in certain scenarios where -components are disabled. + components are disabled. - Fixed an issue where a GraphQL query could fail when querying a namespace -containing event data in excess of 2GBs. + containing event data in excess of 2GBs. - Deregistration events now contain a timestamp. - Checks configured with missing hooks no longer cause the agent to crash. @@ -693,7 +693,7 @@ containing event data in excess of 2GBs. - The proper libc implementation is now displayed for Ubuntu entities. - Add validation for subjects in RBAC RoleBinding and ClusterRoleBinding. - Fixed a bug where single-letter subscriptions were not allowed, even though -they were intended to be. + they were intended to be. - Fix retrieving command assets from bonsai. ## [5.20.1] - 2020-05-15 @@ -712,7 +712,7 @@ they were intended to be. - Added the `event.is_silenced` & `event.check.is_silenced` field selectors. - Added `processes` field to the system type to store agent local processes (commercial feature). - Users can now increment the logging level by sending SIGUSR1 to the -sensu-backend or sensu-agent process. + sensu-backend or sensu-agent process. - Added a new `sensuctl describe-type` command to list all resource types. - Added `labels` and `annotations` as backend config options. - Added token substitution for assets. @@ -727,31 +727,31 @@ sensu-backend or sensu-agent process. - Warning messages from Resty library are now suppressed in sensuctl. - Notepad is now the default editor on Windows, instead of vi. - [Web] Any leading and trailing whitespace is now trimmed from the username -when authenticating. + when authenticating. - [Web] A toast is now displayed when a user attempts to delete an event but -does not have appropriate authorization. + does not have appropriate authorization. - [Web] Only the first five groups a user belongs to are displayed in the -preferences dialog. Showing too many made it difficult for users to locate the -sign-out button. + preferences dialog. Showing too many made it difficult for users to locate the + sign-out button. ### Fixed - Windows agent now accepts and remembers arguments passed to 'service run' and -'service install'. + 'service install'. - Windows agent synchronizes writes to its log file, ensuring that file size -will update with every log line written. + will update with every log line written. - Windows agent now logs to both console and log file when 'service run' is used. - [Web] Fixed issue where the de-registration handler would always show up as -undefined on the entity details page. + undefined on the entity details page. ## [5.19.3] - 2020-04-30 ### Added - Added a `timeout` flag to `sensu-backend init`. - [Web] Added the ability for labels and annotations with links to images to be -displayed inline. + displayed inline. - [Web] Added additional modes for those with colour blindness. - Added support for restarting the backend via SIGHUP. Config reloading is not -supported yet. + supported yet. ### Changed - Removed deprecated flags in `sensuctl silenced update` subcommand. @@ -760,24 +760,24 @@ supported yet. - Fixes a bug in multi-line metric extraction that appeared in windows agents. - Fixed an authn bug where sensu-backend would restart when agents disconnect. - Fixed a bug where check state and last_ok were not computed until the second -instance of the event. + instance of the event. - Fix the validation for env_vars to allow the equal sign in values. - Log to the warning level when an asset is not installed because none of the -filters matched. + filters matched. - Return underlying errors when fetching an asset. - Fixed a bug where the etcd event store would return prefixed matches rather than exact matches when getting events by entity. - `sensuctl logout` now resets the TLS configuration. - [Web] Fixes issue where labels with links could lead to a crash. - Added a global rate limit for fetching assets so that asset retries are not abusive (can be -configured using `--assets-rate-limit` and `--assets-burst-limit` on the agent and backend). + configured using `--assets-rate-limit` and `--assets-burst-limit` on the agent and backend). - [Web] Fixed an issue where trying to use an unregistered theme could lead to a -crash. + crash. - Fixed a bug that would cause the backend to crash. - Fixed a bug that would cause messages like "unary invoker failed" to appear -in the logs. + in the logs. - Fixed several goroutine leaks. - Fixed a bug that would cause the backend to crash when the etcd client got an -error saying "etcdserver: too many requests". + error saying "etcdserver: too many requests". ## [5.19.2] - 2020-04-27 *No changelog for this release.* @@ -787,31 +787,31 @@ error saying "etcdserver: too many requests". ### Fixed - Require that pipe handlers have a command set. - The config file default path is now shown in the help for sensu-backend start -and sensu-agent start. + and sensu-agent start. - Keepalives can now be published via the HTTP API. - Token substitution templates can now express escape-quoted strings. - [Web] Fixes issue where labels with links could lead to a crash. - Fixed a bug where keepalives would not always fire correctly when using -the postgres event store. + the postgres event store. - The REST API now uses a timeout of 3 seconds by default when querying -etcd health. + etcd health. - sensu-agent will not longer allow configuring keepalive timeouts less than -the keepalive interval. + the keepalive interval. - Eventd can no longer mistake keepalive events for checks with TTL. - Keepalives now generate a new event UUID for each keepalive failure event. - Agents now correctly reset keepalive switches on reconnect, fixing a bug -where old keepalive timeout settings would persist too long. + where old keepalive timeout settings would persist too long. - The system's libc_type attribute is now populated on alpine containers. ## [5.19.0] - 2020-03-26 ### Added - The `sensu.io/managed_by` label is now automatically applied to resources -created via `sensuctl create`. + created via `sensuctl create`. - Added `created_by` to object metadata and populate that field via the HTTP API. - Added agent discovery of libc type, VM system/role, and cloud provider. - Added `float_type` field to system type to store which float type (softfloat, -hardfloat) a system is using. + hardfloat) a system is using. - Additional Tessen resource metrics can now be registered at runtime. - Added a generic client POST function that can return the response. - Tessen now reports the type of store used for events ("etcd or "postgres"). @@ -820,15 +820,15 @@ hardfloat) a system is using. - Updated the store so that it may _create_ wrapped resources. - Bonsai client now logs at debug level instead of info level. - The dashboard service now returns an error if the client User-Agent is curl -or sensuctl. This should prevent users from using the dashboard port by -mistake. + or sensuctl. This should prevent users from using the dashboard port by + mistake. ### Fixed - Fixed a bug where the agent could connect to a backend using a namespace that -doesn't exist. + doesn't exist. - Subscriptions can no longer be empty strings (#2932) - The proper HTTP status codes are returned for unauthenticated & permission -denied errors in the REST API. + denied errors in the REST API. ## [5.18.1] - 2020-03-10 @@ -837,11 +837,11 @@ denied errors in the REST API. - Fixed bug where flapping would incorrectly end when `total_state_change` was below `high_flap_threshold` instead of below `low_flap_threshold`. - sensu-backend no longers hang indefinitely if a file lock for the asset -manager cannot be obtained, and returns instead an error after 60 seconds. + manager cannot be obtained, and returns instead an error after 60 seconds. - Stopped using the etcd embedded client, which seems to trigger nil pointer -panics when used against an etcd that is shutting down. + panics when used against an etcd that is shutting down. - 64-bit align the `Resource` struct in the store cache to fix a crash on -32-bit systems. + 32-bit systems. - Fixed a bug where sensu-backend would restart when agents disconnect. ## [5.18.0] - 2020-02-24 @@ -852,44 +852,44 @@ panics when used against an etcd that is shutting down. ### Fixed - sensuctl now supports the http_proxy, https_proxy, and no_proxy environment -variables. + variables. - returns 401 instead of 500 when issues occur refreshing the access token. - Support Bonsai assets versions prefixed with the letter `v`. - Fixed a bug where wrapped resources were not getting their namespaces set by -the default sensuctl configuration. + the default sensuctl configuration. - read/writes `initializationKey` to/from `EtcdRoot`, while support legacy as fallback (read-only) - check for a non-200 response when fetching assets - `/silenced` now supports API filtering (commercial feature). - Fixed event payload validation on the backend events API to validate the -payload with the URL parameters on the /events/:entity/:check endpoint and -reject events that do not match. + payload with the URL parameters on the /events/:entity/:check endpoint and + reject events that do not match. - The `auth/test` endpoint now returns the correct error messages. - The `log-level` configuration option is now properly applied when running the -Sensu Agent Windows service. + Sensu Agent Windows service. ### Changed - Updated Go version from 1.13.5 to 1.13.7. - Default `event.entity.entity_class` to `proxy` in the POST/PUT `/events` API. - Proxy entities are now automatically created when events are published with an -entity that does not exist. + entity that does not exist. ## [5.17.2] - 2020-02-19 ### Fixed - Fixed a bug where on an internal restart, enterprise HTTP routes could fail -to intialize. + to intialize. ## [5.17.1] - 2020-01-31 ### Fixed - Cluster configuration of sensuctl should be reset when `configure` is called. - Some namespaces would not appear in the curated namespace functionality under -certain circonstances. + certain circonstances. - Fix a bug with tar assets that contain hardlinked files. - Assets name may contain capital letters. - When `--trusted-ca-file` is used to configure sensuctl, it now detects and saves -the absolute file path in the cluster config. + the absolute file path in the cluster config. - [Web] Changing order on event list will no longer cause filters to be reset. - [Web] URLs inside annotations are now rendered as links. @@ -897,10 +897,10 @@ the absolute file path in the cluster config. ### Added - Added the secrets provider interface and secrets provider manager to be used -by commercial secrets providers. Implemented for checks, mutators, and handlers. + by commercial secrets providers. Implemented for checks, mutators, and handlers. - Added the `secrets` field to checks, mutators, and handlers. - Added the `keepalive-handlers` configuration flag on the agent to specify the -entity's keepalive handlers. + entity's keepalive handlers. - Added `event.entity.name` as a supported field selector. ### Fixed @@ -908,32 +908,32 @@ entity's keepalive handlers. - [Web] Labels with links can now be followed. - [Web] Fixed a inconsistent crash that occurred in Firefox browsers. - [Web] Fixed bug where event history was duplicated in the event timeline -chart. + chart. - [Web] Fixed issue where silenced entries with a start date would result in a -crash. + crash. - Fixed a bug where `sensuctl entity delete` was not returning an error -when attempting to delete a non-existent entity. + when attempting to delete a non-existent entity. - sensuctl command assets installed via Bonsai will now use the "sensuctl" -namespace. + namespace. - Fixed a memory leak in the entity cache - Users with implicit permissions to a namespace can now display resources -within that namespace via the Web UI. + within that namespace via the Web UI. - Explicit access to namespaces can only be granted via cluster-wide RBAC -resources. + resources. - Split rules ClusterRole and Role verbs, resources and resource names on comma. - Add support for the `--format` flag in the `sensuctl command list` subcommand. - Namespace can be ommited from event when performing an HTTP POST request to -the `/events` endpoint. + the `/events` endpoint. - Fixed a bug where failing check TTL events could occur event if keepalive -failures had already occurred. + failures had already occurred. ## [5.16.1] - 2019-12-18 ### Fixed - Initialize the sensu_go_events_processed counter with the `success` label so -it's always displayed. + it's always displayed. - Fixed a performance regression that was introduced in 5.15.0, which would -cause the API to timeout past 20k agent sessions. + cause the API to timeout past 20k agent sessions. ## [5.16.0] - 2019-12-11 @@ -941,50 +941,50 @@ cause the API to timeout past 20k agent sessions. - Display the JWT expiration Unix timestamp in `sensuctl config view`. - Added the 'sensu-backend init' subcommand. - Added a new flag, --etcd-client-urls, which should be used with sensu-backend -when it is not operating as an etcd member. The flag is also used by the new -sensu-backend init tool. + when it is not operating as an etcd member. The flag is also used by the new + sensu-backend init tool. - Added the cluster's distribution to Tessen data. - Added a new field, ClusterIDHex, to the ClusterHealth datatype. - Added the `--etcd-discovery` and `--etcd-discovery-srv` flags to -`sensu-backend`. These are used to take advantage of the embedded etcd's -auto-discovery features. + `sensu-backend`. These are used to take advantage of the embedded etcd's + auto-discovery features. - Added `--keepalive-critical-timeout` to define the time after which a -critical keepalive event should be created for an agent. + critical keepalive event should be created for an agent. - Added `--keepalive-warning-timeout` which is an alias of `--keepalive-timeout` -for backwards compatibility. + for backwards compatibility. ### Fixed - Add a timeout to etcd requests when retrieving the nodes health. - Show the correct default value for the format flag in `sensuctl dump` help -usage. + usage. - Installing sensuctl commands via Bonsai will now check for correct labels -before checking if the asset has 1 or more builds. + before checking if the asset has 1 or more builds. - Listing assets with no results returns an empty array. - Fixed a panic that could occur when creating resources in a namespace that -does not exist. + does not exist. - [Web] Links to documentation now point to the version of the product being run -instead of the latest; helpful when running an older version of Sensu. + instead of the latest; helpful when running an older version of Sensu. - Fixed issue where keepalive events and events created through the agent's -socket interface could be missing a namespace. + socket interface could be missing a namespace. - Fixed an issue where 'sensuctl cluster health' would hang indefinitely. - Fixed several issues around the metadata of resources encoded using the -wrapped-json format, where the metadata would go missing when listing -resources or prevent resources from being created. + wrapped-json format, where the metadata would go missing when listing + resources or prevent resources from being created. ### Changed - The backend will no longer automatically be seeded with a default admin -username and password. Users will need to run 'sensu-backend init' on every -new installation. + username and password. Users will need to run 'sensu-backend init' on every + new installation. - Several deprecated flags were removed from sensu-backend. - [Web] Changes to navigation. The app bar has been replaced by an omnipresent -drawer increasing the available space for content. Additionally, each page now -includes breadcrumbs. + drawer increasing the available space for content. Additionally, each page now + includes breadcrumbs. - [Web] Switching namespaces is easier than ever, with the new and improved -switcher. The new component can be accessed from the drawer or with the shortcut -ctrl+k. For those with many namespaces the switcher now includes fuzzy search -and improved keyboard navigation. + switcher. The new component can be accessed from the drawer or with the shortcut + ctrl+k. For those with many namespaces the switcher now includes fuzzy search + and improved keyboard navigation. - 'sensuctl cluster health' will now use a 3s timeout when gathering cluster -health information. + health information. - 'sensuctl cluster health' now collects cluster health information concurrently. ## [5.15.0] - 2019-11-18 @@ -1004,28 +1004,28 @@ health information. ### Changed - Moved `corev2.BonsaiAsset` to `bonsai.Asset` and moved -`corev2.OutdatedBonsaiAsset` to `bonsai.OutdatedAsset` along with subsequent -bonsai package refactors. + `corev2.OutdatedBonsaiAsset` to `bonsai.OutdatedAsset` along with subsequent + bonsai package refactors. - Colons and periods are now allowed to be used in all resource names, with -the exception of users. + the exception of users. ## [5.14.2] - 2019-11-04 ### Changed - Upgraded etcd to 3.3.17 - Listing namespaces is now done implicitly based on access to resources within -a namespace. Users will no longer be able to list all namespaces by default, in -new installations. Existing installations will function as before. Operators can -change to the new behaviour, by modifying the system:user role. + a namespace. Users will no longer be able to list all namespaces by default, in + new installations. Existing installations will function as before. Operators can + change to the new behaviour, by modifying the system:user role. ### Fixed - As a result of upgrading etcd, TLS etcd clients that lose their connection will -successfully reconnect when using --no-embed-etcd. + successfully reconnect when using --no-embed-etcd. - Check TTL switches are now correctly buried when associated events and entities -are deleted. + are deleted. - Keepalive switches are now correctly buried when the keepalive event is deleted. - Sensu now uses far fewer leases for keepalives and check TTLs, resulting in a -stability improvement for most deployments. + stability improvement for most deployments. - Fixed a minor UX issue in interactive filter commands in sensuctl. - Silences now successfully apply to proxy entities where the check doesn't contain the same subscriptions as the entity (#3356) @@ -1037,56 +1037,56 @@ stability improvement for most deployments. ### Fixed - Opening an already open Bolt database should not cause sensu-agent to hang -indefinitely. + indefinitely. - [CLI] Dump multiple types as YAML to a file would print separator STDOUT -instead of specified file + instead of specified file - Fixed a bug where Sensu would crash with a panic due to a send on a closed channel. ## [5.14.0] - 2019-10-08 ### Added - [Web] Added an additional option to the error dialog allowing users to -completely wipe the application's persisted state; in lieu of them having to -manually wipe their local / session storage. This may help in the rare cases -where something in said state is leading to an uncaught exception. + completely wipe the application's persisted state; in lieu of them having to + manually wipe their local / session storage. This may help in the rare cases + where something in said state is leading to an uncaught exception. - [Web] For operating systems with support for selecting a preferred light /dark -theme, the application now respects the system preference by default. + theme, the application now respects the system preference by default. - sensuctl dump can now list the types of supported resources with --types. - Added the `sensu_agent_version` field to the `Entity` resource, which reflects -the Sensu semver version of the agent entity. + the Sensu semver version of the agent entity. - Added the `--etcd-heartbeat-interval` and `--etcd-election-timeout` flags to -`sensu-backend` + `sensu-backend` ### Changed - [Web] Github is not always the best place for feature requests and discussion, -as such we've changed CTA for feedback to point to Discourse instead of the -web repository's issues page. + as such we've changed CTA for feedback to point to Discourse instead of the + web repository's issues page. - [Web] When a user lands on a page inside a namespace that no longer exists or -they do not have access to, the drawer is now opened so that namespace switcher -is front and center. Hopefully this should reduce any confusion around next -steps. + they do not have access to, the drawer is now opened so that namespace switcher + is front and center. Hopefully this should reduce any confusion around next + steps. - Support agent TLS authentication, usable with a licensed sensu-backend. - Updated Go version from 1.12.3 to 1.13.1. - [GraphQL] `putWrapped` mutation now accepts wrapped JSON with empty -outer objectmeta. + outer objectmeta. ### Fixed - [Web] Fixed issue where a user with an appropriate role may have been unable -to resolve events, queue checks, and create silenced entries. + to resolve events, queue checks, and create silenced entries. - Splayed proxy checks are now executed every interval, instead of every -`interval + interval * splay_coverage`. + `interval + interval * splay_coverage`. - [GraphQL] Ensures that proxy entity label & annotations are redacted. - Fixed a bug in the ring where round robin schedules would not recover -after quorum loss. + after quorum loss. - [Web] Unauthorized errors emitted while creating silences or resolving events -are now caught and a toast is presented to communicate what occurred. + are now caught and a toast is presented to communicate what occurred. - [Web] Internal errors are now avoided when a user attempts to queue an ad-hoc -check for a keepalive. + check for a keepalive. - Do not separate asset builds into several assets unless the the tabular format -is used in `sensuctl asset list`. + is used in `sensuctl asset list`. - Fix the 'flag accessed but not defined' error in `sensuctl asset outdated` - Fix generic API client's `SetTypeMeta` method. The APIGroup is now correctly -configured and by virtue unintended authorization denied errs are avoided. + configured and by virtue unintended authorization denied errs are avoided. - Fixed a bug where checks would stop executing after a network error. - Fixed a bug where sensuctl create with stdin was not working. @@ -1112,19 +1112,19 @@ configured and by virtue unintended authorization denied errs are avoided. ### Fixed - sensuctl dump no longer silently discards errors. - Interactive check create and update modes now have 'none' as the first -highlighted option, instead of nagios-perfdata. + highlighted option, instead of nagios-perfdata. - Fixed a bug where silences would not expire on event resolution. ## [5.12.0] - 2019-08-22 ### Added - Added functionality for the agent `--allow-list` configuration, which -whitelists check and check hook executables. + whitelists check and check hook executables. - Added the `runtime_assets` field to `HookConfig`. Assets are enabled -for check hook execution. + for check hook execution. - Added backwards compatible content negotiation to the websocket connection. -Protobuf will be used for serialization/deserialization unless indicated by the -backend to use JSON. + Protobuf will be used for serialization/deserialization unless indicated by the + backend to use JSON. - Added delete functionality for assets in the API and sensuctl. - Added `sensuctl dump` to dump resources to a file or STDOUT. - Added `event.check.name` as a supported field selector. @@ -1132,7 +1132,7 @@ backend to use JSON. - Added `entity.system.arm_version` to record the value of `GOARM` at compile time. - Added `ProviderType` field to `AuthProviderClaims` - Added `builds` field to the `Asset` type to allow assets to specify different -URLs for each platform/architecture/arch_version. + URLs for each platform/architecture/arch_version. ### Changed - The project now uses Go modules instead of dep for dependency management. @@ -1140,50 +1140,50 @@ URLs for each platform/architecture/arch_version. - The generic etcd watcher now keeps track of revisions. - The resource caches can now rebuild themselves in case of failures. - Event and Entity resources can now be created without an explicit namespace; -the system will refer to the namespace in the URL. + the system will refer to the namespace in the URL. - Events and Entities can now be created with the POST verb. - [Web] Changed styling of namespace labels. - Log token substitution failures more clearly. ### Fixed - Fixed the tabular output of `sensuctl filter list` so inclusive filter expressions -are joined with `&&` and exclusive filter expressions are joined with `||`. + are joined with `&&` and exclusive filter expressions are joined with `||`. - The REST API now correctly only returns events for the specific entity -queried in the `GET /events/:entity` endpoint (#3141) + queried in the `GET /events/:entity` endpoint (#3141) - Prevent a segmentation fault when running `sensuctl config view` without -configuration. + configuration. - Added entity name to the interactive sensuctl survey. - Check hooks with `stdin: true` now receive actual event data on STDIN instead of an empty event. - Prevent a segmentation fault on the agent when a command execution returns an -error. + error. - [Web] Fixed issue where a bad or revoked access token could crash the app. ### Removed - Removed encoded protobuf payloads from log messages (when decoded, they can reveal -redacted secrets). + redacted secrets). ## [5.11.1] - 2019-07-18 ### Fixed - The agent now sends heartbeats to the backend in order to detect network -failures and reconnect faster. + failures and reconnect faster. - The default handshake timeout for the WebSocket connection negotiation has -been lowered from 45 to 15 seconds and is now configurable. + been lowered from 45 to 15 seconds and is now configurable. ## [5.11.0] - 2019-07-10 ### Added - Silenced entries are now retrieved from the cache when determining if an event -is silenced. + is silenced. - Added --disable-assets flag to sensu-agent. - Added ability to query mutators to the GraphQL service - Added ability to query event filters to the GraphQL service - Added prometheus metrics for topics in wizard bus and agent sessions. - The buffer size and worker count of keepalived, eventd & pipelined can now be -configured on sensu-backend. + configured on sensu-backend. - Added a `headers` field to the `Asset` struct. Headers is a map of key/value -string pairs used as HTTP headers for asset retrieval. + string pairs used as HTTP headers for asset retrieval. - Added the current user to the output of `sensuctl config view`. - [Web] Adds list and details views for mutators - [Web] Adds list and details views for event filters @@ -1192,25 +1192,25 @@ string pairs used as HTTP headers for asset retrieval. ### Changed - [Web] Updated embedded web assets from `46cd0ee` ... `8f50155` - The REST API now returns the `201 Created` success status response code for -POST & PUT requests instead of `204 No Content`. + POST & PUT requests instead of `204 No Content`. ### Fixed - The REST API now returns an error when trying to delete an entity that does -not exist. + not exist. - Fixed a bug where basic authorization was not being performed on the agent websocket connection. - Fixed an aliasing regression where event timestamps from the /events API -were not getting properly populated. + were not getting properly populated. - Fixed a bug where multiple nested set handlers could be incorrectly flagged as -deeply nested. + deeply nested. - Fixed a bug where round robin proxy checks could fail to execute. - Fixed a bug where watchers could enter a tight loop, causing very high CPU -usage until sensu-backend was restarted. + usage until sensu-backend was restarted. ## [5.10.1] - 2019-06-25 ### Fixed - Fixed the entity_attributes in proxy_requests so all attributes must match -instead of only one of them. + instead of only one of them. - Fixed a bug where events were not deleted when their corresponding entity was. ## [5.10.0] - 2019-06-18 @@ -1218,7 +1218,7 @@ instead of only one of them. ### Added - Added POST `/api/core/v2/tessen/metrics`. - Added the ability in TessenD to listen for metric points on the message bus, -populate, and send them to the Tessen service. + populate, and send them to the Tessen service. - [Web] Adds ability to delete entities - [GraphQL] Adds simple auto-suggestion feature. - Added a tag to all Tessen metrics to differentiate internal builds. @@ -1229,16 +1229,16 @@ populate, and send them to the Tessen service. - [Web] Updated embedded web assets from `275386a` ... `46cd0ee` - Refactoring of the REST API. - Changed the identifying cluster id in TessenD from the etcd cluster id to -the sensu cluster id. + the sensu cluster id. - [GraphQL] Updates `PutResource` mutation to accept an `upsert` boolean flag parameter. The `upsert` param defaults to `true`, but if set to `false` the mutation will return an error when attempting to create a duplicate resource. - Eventd has been refactored. Users should not perceive any changes, but a -substantial amount of business logic has been moved into other packages. + substantial amount of business logic has been moved into other packages. - The `sensuctl create` command now accepts resources without a declared -namespace. If the namespace is omitted, the resource will be created in the -current namespace, or overridden by the `--namespace` flag. + namespace. If the namespace is omitted, the resource will be created in the + current namespace, or overridden by the `--namespace` flag. - Eventd now uses a constant number of requests to etcd when working with -silenced entries, instead of a number that is proportional to the number of -subscriptions in a check. + silenced entries, instead of a number that is proportional to the number of + subscriptions in a check. ### Fixed - The check state and check total_state_change properties are now more correct. @@ -1247,7 +1247,7 @@ subscriptions in a check. - [Web] Ensure that we redirect user to a valid namespace when first signing in. - [Web] Correctly display timeout value for handlers. - [Web] Avoid exception when parsing non-standard cron statements. (Eg. -`@every 1h` or `@weekly`) + `@every 1h` or `@weekly`) - The resources metadata are now validated with the request URI. ## [5.9.0] - 2019-05-29 @@ -1288,7 +1288,7 @@ subscriptions in a check. ### Fixed - Only bury switchsets of checks that no longer have a TTL, in order to reduce -the number of write operations made to etcd. + the number of write operations made to etcd. - Fixed keepalives switchsets for entities with deregistration. - Fixed continue token generation in namespace and user pagination. @@ -1296,7 +1296,7 @@ the number of write operations made to etcd. ### Added - Added a Windows service wrapper for sensu-agent. See -"sensu-agent service --help" for more information. + "sensu-agent service --help" for more information. ### Fixed - Fixed `sensuctl` color output on Windows. @@ -1313,7 +1313,7 @@ the number of write operations made to etcd. - Added the message bus to Tessend in order to track Tessen configuration changes from the API. - Added a performance optimizing `Count()` function to the generic store. - Added a hexadecimal Cluster ID title to the `sensuctl cluster health` and -`sensuctl cluster member-list` commands in tabular format. + `sensuctl cluster member-list` commands in tabular format. - Added a `Header` field to the `HealthResponse` type returned by `/health`. ### Fixed @@ -1333,10 +1333,10 @@ the number of write operations made to etcd. ### Fixed - Fixed an issue where etcd watchers were used incorrectly. This was causing -100% CPU usage in some components, as they would loop endlessly trying to get -results from watchers that broke, due to their stream terminating. Other -components would simply stop updating. Watchers now get reinstated when the -client regains connectivity. + 100% CPU usage in some components, as they would loop endlessly trying to get + results from watchers that broke, due to their stream terminating. Other + components would simply stop updating. Watchers now get reinstated when the + client regains connectivity. - Fixed the `/events/:entity` route in the REST API. - Fixed a bug where the --labels arg was not working as expected in sensu-agent. @@ -1346,7 +1346,7 @@ client regains connectivity. - Added the TessenD daemon. - Added an etcd watcher for tessen configuration. - Added ring support for TessenD so that the service is invoked in a -round-robin fashion within a cluster. + round-robin fashion within a cluster. - Added `tessen opt-in` command to `sensuctl`. - Added `tessen opt-out` command to `sensuctl`. - Added `tessen info` command to `sensuctl`. @@ -1430,7 +1430,7 @@ round-robin fashion within a cluster. ### Fixed - Fixed a regression in the agent that would not allow proxy checks to be -run for subsequent executions. + run for subsequent executions. ### Added - Web UI - support for labels and annotations @@ -1438,17 +1438,17 @@ run for subsequent executions. ### Added - Added support for the following TLS related options to `sensuctl`: -`--trusted-ca-file` and `--insecure-skip-tls-verify`. This allows sensuctl -users to use a self-signed certificate without adding it to the operating -system's CA store, either by explicitly trusting the signer, or by disabling -TLS hostname verification. + `--trusted-ca-file` and `--insecure-skip-tls-verify`. This allows sensuctl + users to use a self-signed certificate without adding it to the operating + system's CA store, either by explicitly trusting the signer, or by disabling + TLS hostname verification. - Added a generic watcher in the store. - Added `RemoveProvider` method to authenticator. - Check output truncation support has been added. Check output can be truncated -by adjusting the max_output_size and discard_output properties. + by adjusting the max_output_size and discard_output properties. - Added ability to silence/unsilence from the event details page. - Added support for wrapped resources in the API with `sensuctl create` & -`sensuctl edit`. + `sensuctl edit`. - Web UI - platform version displays on the entity details page. - Web UI - include proxy request configuration on check details page. - Web UI - display deregistration config on the entity details page. @@ -1458,23 +1458,23 @@ by adjusting the max_output_size and discard_output properties. - Moved the `Provider` interface to `api/core/v2` package. - Moved the `Authenticator` interface to `backend/authentication` package. - Updated confirmation messages for sensuctl commands: `Created`, `Deleted` and -`Updated` instead of `OK`. + `Updated` instead of `OK`. - Exported some functions and methods in the CLI client. - The API authenticator now identifies providers by their name only. ### Fixed - Check TTL failure events are now much more reliable, and will persist even -in the presence cluster member failures and cluster restarts. + in the presence cluster member failures and cluster restarts. - Fix snakeCase version of keys in typeMap for acronyms. - Fixed a bug in keepalive processing that could result in a crash. - Pin childprocess to v0.9.0 in CircleCI so fpm can be installed. - Substitutions applied to command & hooks are now omitted from events. - Fixes a bug where generic store methods assumed a namespace was provided for non-namespaced resources. - Keepalive and check TTL database state is now properly garbage-collected on -entity deletion. + entity deletion. - Fixed a bug where `sensuctl version` required configuration files to exist. - Updates the copy on the confirm disable dialog to accurately reflect the -operation. + operation. ## [5.1.1] - 2019-01-24 @@ -1485,7 +1485,7 @@ operation. - Improved logging for errors in proxy check requests. - Updated Go version from 1.10 to 1.11.4. - Refactoring of the internal authentication mechanism into a `basic` -authentication provider. + authentication provider. - Modified private generic store methods as public functions. - Improved logging for errors in proxy check requests. - Updated Go version from 1.10 to 1.11.4. @@ -1496,14 +1496,14 @@ authentication provider. - Fixed a bug where adhoc checks were not retrieving asset dependencies. - Fixed a bug where check updates would cause the check to immediately fire. - Fixed a bug where a bad line in check output would abort metric extraction. -An error is now logged instead, and extraction continues after a bad line is encountered. + An error is now logged instead, and extraction continues after a bad line is encountered. - Keepalive events will now continue to fire after cluster restarts. - Fixed a panic in the dashboardd shutdown routine. - Fixed a bug where deleting a non-existent entity with sensuctl would not return an error. - Web UI - toolbar menu buttons now switch with dark theme. - Web UI - some buttons easier to see with dark theme. - Agents will now take proxy entity names into consideration when guarding -against duplicate check requests. + against duplicate check requests. ### Changed - Improved logging for errors in proxy check requests. @@ -1554,11 +1554,11 @@ against duplicate check requests. ### Removed - Check subdue functionality has been disabled. Users that have checks with -subdues defined should delete and recreate the check. The subdue feature was -found to have issues, and we are re-working the feature for a future release. + subdues defined should delete and recreate the check. The subdue feature was + found to have issues, and we are re-working the feature for a future release. - Filter when functionality has been disabled. Users that have filters with -'when' properties defined should delete and recreate the filter. Filter when -uses the same facility as check subdue for handling time windows. + 'when' properties defined should delete and recreate the filter. Filter when + uses the same facility as check subdue for handling time windows. - Removed event.Hooks and event.Silenced deprecated fields - Extensions have been removed until we have time to revisit the feature. @@ -1570,10 +1570,10 @@ uses the same facility as check subdue for handling time windows. - Assets and mutators environments are now merged, with a preference given to the values coming from the mutator's environment. - Metadata from wrappers and resources is now merged, with a preference given to -the values coming from the wrapper. Labels and annotations are deep-merged. + the values coming from the wrapper. Labels and annotations are deep-merged. - Round-robin scheduling has been temporarily disabled. - The dashboard now uses the `api-url` configuration attribute to connect to the -API. + API. ### Fixed - Fixed several resource leaks in the check scheduler. @@ -1586,7 +1586,7 @@ API. - Fixed a bug where resources from namespaces that share a common prefix, eg: "sensu" and "sensu-devel", could be listed together. - Fixed a bug in the agent where the agent would deadlock after a significant -period of disconnection from the backend. + period of disconnection from the backend. - Fixed a bug where logging events without checks would cause a nil panic. - Removed the ability to rerun keepalives on the events list page - A panic in keepalive/check ttl monitors causing a panic. @@ -1594,13 +1594,13 @@ period of disconnection from the backend. - Updating a users groups will no longer corrupt their password - Prevent empty error messages in sensuctl. - Fixed a bug where keepalive failures could be influenced by check TTL -successes, and vice versa. + successes, and vice versa. - Fixed a bug where check TTL events were not formed correctly. - Fixed a web-ui bug causing the app to crash on window resize in FireFox ### Breaking Changes - The backend configuration attributes `api-host` & `api-port` have been -replaced with `api-listen-address`. + replaced with `api-listen-address`. ## [2.0.0-beta.8-1] - 2018-11-15 @@ -1614,9 +1614,9 @@ replaced with `api-listen-address`. - Add support for setting labels on agents with the command line. - The sensuctl tool now supports yaml. - Add support for `--all-namespaces` flag in `sensuctl extension list` -subcommand. + subcommand. - Added functionality to the dynamic synthesize function, allowing it to -flatten embedded and non-embedded fields to the top level. + flatten embedded and non-embedded fields to the top level. - Added the sensuctl edit command. - Added javascript filtering. @@ -1648,18 +1648,18 @@ flatten embedded and non-embedded fields to the top level. - Agent subscriptions are now specified in the config file as an array instead instead of a comma-delimited list of strings. - Extended attributes have been removed and replaced with labels. Labels are -string-string key-value pairs. + string-string key-value pairs. - Silenced `id`/`ID` field has changed to `name`/`Name`. - Entity `id`/`ID` field has changed to `name`/`Name`. - Entity `class`/`Class` field has changed to `entity_class`/`EntityClass`. - Check `proxy_entity_id`/`ProxyEntityID` field has changed to `proxy_entity_name`/`ProxyEntityName`. - Objects containing both a `name`/`Name` and `namespace`/`Namespace` field have been -replaced with `metadata`/`ObjectMeta` (which contains both of those fields). + replaced with `metadata`/`ObjectMeta` (which contains both of those fields). - Role-based access control (RBAC) has been completely redesigned. - Filter and token substitution variable names now match API naming. Most names -that were previously UpperCased are now lower_cased. + that were previously UpperCased are now lower_cased. - Filter statements are now called expressions. Users should update their -filter definitions to use this new naming. + filter definitions to use this new naming. ## [2.0.0-beta.7-1] - 2018-10-26 @@ -1683,35 +1683,35 @@ filter definitions to use this new naming. ### Removed - Staging resources and configurations have been removed from sensu-go. - Removed handlers/slack from sensu/sensu-go. It can now be found in -sensu/slack-handler. + sensu/slack-handler. - Removed the `Error` store and type. ### Changed - Changed sensu-agent's internal asset manager to use BoltDB. - Changed sensuctl title colour to use terminal's configured default for bold -text. + text. - The backend no longer forcibly binds to localhost. - Keepalive intervals and timeouts are now configured in the check object of -keepalive events. + keepalive events. - The sensu-agent binary is now located at ./cmd/sensu-agent. - Sensuctl no longer uses auto text wrapping. - The backend no longer requires embedded etcd. External etcd instances can be -used by providing the --no-embed option. In this case, the client will dial -the URLs provided by --listen-client-urls. + used by providing the --no-embed option. In this case, the client will dial + the URLs provided by --listen-client-urls. - The sensu-agent binary is now located at ./cmd/sensu-agent. - Sensuctl no longer uses auto text wrapping. - The backend no longer requires embedded etcd. External etcd instances can be -used by providing the --no-embed option. In this case, the client will dial -the URLs provided by --listen-client-urls. + used by providing the --no-embed option. In this case, the client will dial + the URLs provided by --listen-client-urls. - Deprecated daemon `Status()` functions and `/info` (`/info` will be -re-implemented in https://github.com/sensu/sensu-go/issues/1739). + re-implemented in https://github.com/sensu/sensu-go/issues/1739). - The sensu-backend flags related to etcd are now all prefixed with `etcd` and -the older versions are now deprecated. + the older versions are now deprecated. - Web ui entity recent events are sorted by last ok. - etcd is now the last component to shutdown during a graceful shutdown. - Web ui entity recent events are sorted by last ok - Deprecated --custom-attributes in the sensu-agent command, changed to ---extended-attributes. + --extended-attributes. - Interfaced command execution and mocked it for testing. - Updated the version of `libprotoc` used to 3.6.1. @@ -1721,28 +1721,28 @@ the older versions are now deprecated. - Fixes a bug in `sensuctl cluster health` so the correct error is handled. - Fixed a bug where assets could not extract git tarballs. - Fixed a bug where assets would not install if given cache directory was a -relative path. + relative path. - Fixed a bug where an agent's collection of system information could delay -sending of keepalive messages. + sending of keepalive messages. - Fixed a bug in nagios perfdata parsing. - Etcd client URLs can now be a comma-separated list. - Fixed a bug where output metric format could not be unset. - Fixed a bug where the agent does not validate the ID at startup. - Fixed a bug in `sensuctl cluster health` that resulted in an unmarshal -error in an unhealthy cluster. + error in an unhealthy cluster. - Fixed a bug in the web ui, removed references to keepaliveTimeout. - Keepalive checks now have a history. - Some keepalive events were misinterpreted as resolution events, which caused -these events to be handled instead of filtered. + these events to be handled instead of filtered. - Some failing keepalive events were not properly emitted after a restart of -sensu-backend. + sensu-backend. - The check output attribute is still present in JSON-encoded events even if -empty. + empty. - Prevent an empty Path environment variable for agents on Windows. - Fixed a bug in `sensuctl check update` interactive mode. Boolean defaults -were being displayed rather than the check's current values. + were being displayed rather than the check's current values. - Use the provided etcd client TLS information when the flag `--no-embed-etcd` -is used. + is used. - Increase duration delta in TestPeriodicKeepalive integration test. - Fixed some problems introduced by Go 1.11. @@ -1760,24 +1760,24 @@ is used. ### Changed - API responses are inspected after each request for the Sensu Edition header. - Rename list-rules subcommand to info in sensuctl role commmand with alias -for backward compatibility. + for backward compatibility. - Updated gogo/protobuf and golang/protobuf versions. - Health API now returns etcd alarms in addition to cluster health. ### Fixed - Fixed agentd so it does not subscribe to empty subscriptions. - Rules are now implicitly granting read permission to their configured -environment & organization. + environment & organization. - The splay_coverage attribute is no longer mandatory in sensuctl for proxy -check requests and use its default value instead. + check requests and use its default value instead. - sensu-agent & sensu-backend no longer display help usage and duplicated error -message on startup failure. + message on startup failure. - `Issued` & `History` are now set on keepalive events. - Resolves a potential panic in `sensuctl cluster health`. - Fixed a bug in InfluxDB metric parsing. The timestamp is now optional and -compliant with InfluxDB line protocol. + compliant with InfluxDB line protocol. - Fixed an issue where adhoc checks would not be issued to all agents in a -clustered installation. + clustered installation. ### Breaking Changes - Corrects the check field `total_state-change` json tag to `total_state_change`. @@ -1796,26 +1796,26 @@ clustered installation. ### Changed - The Backend struct has been refactored to allow easier customization in -enterprise edition. + enterprise edition. - Use etcd monitor instead of in-memory monitor. - Refactoring of the cmd package for sensuctl to allow easier customization in -the enterprise edition. + the enterprise edition. - Upgrade dep to v0.5.0 - Added cluster health information to /health endpoint in sensu-backend. ### Fixed - Fixed `sensuctl completion` help for bash and zsh. - Fixed a bug in build.sh where versions for Windows and Mac OS were not -generated correctly. + generated correctly. - Display the name of extensions with table formatting in sensuctl. - Fixed TLS issue that occurred when dashboard communicated with API. - Check TTL now works with round robin checks. - Format string for --format flag help now shows actual arguments. - Push the sensu/sensu:nightly docker image to the Docker Hub. - Replaced dummy certs with ones that won't expire until 100 years in the -future. + future. - Fixed a bug where clustered round robin check execution executed checks -too often. + too often. - Catch errors in type assertions in cli. - Fixed a bug where users could accidentally create invalid gRPC handlers. @@ -1830,7 +1830,7 @@ too often. ### Added - Performed an audit of events and checks. Added `event.HasCheck()` nil checks -prior to assuming the existence of said check. + prior to assuming the existence of said check. - Added a Create method to the entities api. - Added the ability to set round robin scheduling in sensuctl - Added Output field to GRPC handlers @@ -1838,12 +1838,12 @@ prior to assuming the existence of said check. - Accept additional time formats in sensuctl - Entities can now be created via sensuctl. - Added the format `wrapped-json` to sensuctl `configure`, `list` and `info` -commands, which is compatible with `sensuctl create`. + commands, which is compatible with `sensuctl create`. - Added debug event log with all event data. - Added yml.example configurations for staging backend and agents. - Added test resources in `testing/config/resources.json` to be used in staging. - Added all missing configuration options to `agent.yml.example` and -`backend.yml.example`. + `backend.yml.example`. - Added environment variables to checks. - Added logging redaction integration test. - Added check token substitution integration test. @@ -1858,19 +1858,19 @@ commands, which is compatible with `sensuctl create`. - Split out the docker commands in build script so that building images and pushing can be done separately. - Migrated the InfluxDB handler from the sensu-go repository to -github.com/nikkiki/sensu-influxdb-handler + github.com/nikkiki/sensu-influxdb-handler - Entry point for sensu-backend has been changed to `github.com/sensu/sensu-go/cmd/sensu-backend` - Don't allow unknown fields in types that do not support custom attributes -when creating resources with `sensuctl create`. + when creating resources with `sensuctl create`. - Provided additional context to metric event logs. - Updated goversion in the appveyor configuration for minor releases. - Use a default hostname if one cannot be retrieved. - Return an error from `sensuctl configure` when the configured organization -or environment does not exist. + or environment does not exist. - Remove an unnecessary parameter from sensuctl environment create. - The profile environment & organization values are used by default when -creating a resource with sensuctl. + creating a resource with sensuctl. - Migrated docker image to sensu Docker Hub organization from sensuapp. - Use the sensu/sensu image instead of sensu/sensu-go in Docker Hub. @@ -1882,11 +1882,11 @@ creating a resource with sensuctl. - Metrics with zero-values are now displayed correctly - Fix handler validation routine - Fixed a small bug in the opentsdb transformer so that it trims trailing -whitespace characters. + whitespace characters. - Sensu-agent logs an error if the statsd listener is unable to start due to an -invalid address or is stopped due to any other error. + invalid address or is stopped due to any other error. - Fixed a bug where --organization and --environment flags were hidden for all -commands + commands - Fix a bug where environments could not be created with sensuctl create - StatsD listener on Windows is functional - Add version output for dev and nightly builds (#1320). @@ -1894,35 +1894,35 @@ commands - Fixed `sensuctl create -f` for `Role` - Fixed `sensuctl create -f` for `Event` - Added validation for asset SHA512 checksum, requiring that it be at least 128 -characters and therefore fixing a bug in sensuctl + characters and therefore fixing a bug in sensuctl - Silenced IDs are now generated when not set in `create -f` resources - API requests that result in a 404 response are now logged - Fixed a bug where only a single resource could be created with -`sensuctl create` at a time. + `sensuctl create` at a time. - Fixed a bug where environments couldn't be deleted if there was an asset in -the organization they reside in. + the organization they reside in. - Dashboard's backend reverse proxy now works with TLS certs are configured. - Fixed a bug with the IN operator in query statements. - Boolean fields with a value of `false` now appear in json format (removed -`omitempty` from protobufs). + `omitempty` from protobufs). - The sensuctl create command no longer prints a spurious warning when -non-default organizations or environments are configured. + non-default organizations or environments are configured. - When installing assets, errors no longer cause file descriptors to leak, or -lockfiles to not be cleaned up. + lockfiles to not be cleaned up. - Fixed a bug where the CLI default for round robin checks was not appearing. - Missing custom attributes in govaluate expressions no longer result in -an error being logged. Instead, a debug message is logged. + an error being logged. Instead, a debug message is logged. - Update AppVeyor API token to enable GitHub deployments. - Allow creation of metric events via backend API. - Fixed a bug where in some circumstances checks created with sensuctl create -would never fail. + would never fail. - Fixed a goroutine leak in the ring. - Fixed `sensuctl completion` help for bash and zsh. ### Removed - Removed Linux/386 & Windows/386 e2e jobs on Travis CI & AppVeyor - Removed check output metric extraction e2e test, in favor of more detailed -integration coverage. + integration coverage. - Removed the `leader` package - Removed logging redaction e2e test, in favor of integration coverage. - Removed check token substitution e2e test, in favor of integration coverage. @@ -1953,47 +1953,47 @@ integration coverage. - Added extension registry to the store. - Add sensuctl create command. - Adds a statsd server to the sensu-agent which runs statsd at a configurable -flush interval and converts gostatsd metrics to Sensu Metric Format. + flush interval and converts gostatsd metrics to Sensu Metric Format. - Add event filtering to extensions. - Proper 404 page for web UI. - Add sensuctl extension command. - Add extensions to pipelined. - Added more tests surrounding the sensu-agent's statsd server and udp port. - Add the `--statsd-event-handlers` flag to sensu-agent which configures the -event handlers for statsd metrics. + event handlers for statsd metrics. - Add default user with username "sensu" with global, read-only permissions. - Add end-to-end test for extensions. - Add configuration setting for backend and agent log level. - Add extension package for building third-party Sensu extensions in Go. - Add the `--statsd-disable` flag to sensu-agent which configures the -statsd listener. The listener is enabled by default. + statsd listener. The listener is enabled by default. - Added an influx-db handler for events containing metrics. - Add 'remove-when' and 'set-when' subcommands to sensuctl filter command. - Added the Transformer interface. - Added a Graphite Plain Text transformer. - Add support for `metric_format` and `metric_handlers` fields in the Check and -CheckConfig structs. + CheckConfig structs. - Add CLI support for `metric_format` and `metric_handlers` fields in `sensuctl`. - Add support for metric extraction from check output for `graphite_plaintext` -transformer. + transformer. - Added a OpenTSDB transformer. - Add support for metric extraction from check output for `opentsdb_line` - Added a Nagios performance data transformer. - Add support for metric extraction from check output for `nagios_perfdata` - Added an InfluxDB Line transformer. - Add support for metric extraction from check output for `influxdb_line` -transformer. + transformer. - Add e2e test for metric extraction. ### Changed - Changed the maximum number of open file descriptors on a system to from 1024 -(default) to 65535. + (default) to 65535. - Increased the default etcd size limit from 2GB to 4GB. - Move Hooks and Silenced out of Event and into Check. - Handle round-robin scheduling in wizardbus. - Added informational logging for failed entity keepalives. - Replaced fileb0x with vfsgen for bundling static assets into binary. Nodejs 8+ -and yarn are now dependencies for building the backend. + and yarn are now dependencies for building the backend. - Updated etcd to 3.3.2 from 3.3.1 to fix an issue with autocompaction settings. - Updated and corrected logging style for variable fields. - Build protobufs with go generate. @@ -2010,7 +2010,7 @@ and yarn are now dependencies for building the backend. - Disable gostatsd internal metric collection. - Improved log entries produced by pipelined. - Allow the InfluxDB handler to parse the Sensu metric for an InfluxDB field tag -and measurement. + and measurement. - Removed organization and environment flags from create command. - Changed `metric_format` to `output_metric_format`. - Changed `metric_handlers` to `output_metric_handlers`. @@ -2028,7 +2028,7 @@ and measurement. - Silenced entries using an asterisk can be deleted - Improve json unmarshaling performance. - Events created from the metrics passed to the statsd listener are no longer -swallowed. The events are sent through the pipeline. + swallowed. The events are sent through the pipeline. - Fixed a bug where the Issued field was never populated. - When creating a new statsd server, use the default flush interval if given 0. - Fixed a bug where check and checkconfig handlers and subscriptions are null in rendered JSON. @@ -2040,7 +2040,7 @@ swallowed. The events are sent through the pipeline. - Check event entities now have a last_seen timestamp. - Improved silenced entry display and UX. - Fixed a small bug in the opentsdb transformer so that it trims trailing -whitespace characters. + whitespace characters. ## [2.0.0-nightly.1] - 2018-03-07 ### Added @@ -2048,11 +2048,11 @@ whitespace characters. - Add CLI support for adhoc check requests. - Check scheduler now handles adhoc check requests. - Added `set-FIELD` and `remove-FIELD` commands for all updatable fields -of a check. This allows updating single fields and completely clearing out -non-required fields. + of a check. This allows updating single fields and completely clearing out + non-required fields. - Add built-in only_check_output mutator to pipelined. - Allow publish, cron, ttl, timeout, low flap threshold and more fields to be -set when importing legacy settings. + set when importing legacy settings. - Add CPU architecture in system information of entities. - The `sensuctl user change-password` subcommand now accepts flag parameters. - Configured and enabled etcd autocompaction. @@ -2060,7 +2060,7 @@ set when importing legacy settings. - Agents now try to reconnect to the backend if the connection is lost. - Added non-functional selections for resolving and silencing to web ui - Add LastOk to check type. This will be updated to reflect the last timestamp -of a successful check. + of a successful check. - Added GraphQL explorer to web UI. - Added check occurrences and occurrences_watermark attributes from Sensu 1.x. - Added issue template for GitHub. @@ -2068,25 +2068,25 @@ of a successful check. ### Changed - Refactor Check data structure to not depend on CheckConfig. This is a breaking -change that will cause existing Sensu alpha installations to break if upgraded. -This change was made before beta release so that further breaking changes could -be avoided. + change that will cause existing Sensu alpha installations to break if upgraded. + This change was made before beta release so that further breaking changes could + be avoided. - Make indentation in protocol buffers files consistent. - Refactor Hook data structure. This is similar to what was done to Check, -except that HookConfig is now embedded in Hook. + except that HookConfig is now embedded in Hook. - Refactor CheckExecutor and AdhocRequestExecutor into an Executor interface. - Changed the sensu-backend etcd flag constants to match the etcd flag names. - Upgraded to Etcd v3.3.1 - Removed 3DES from the list of allowed ciphers in the backend and agent. - Password input fields are now aligned in `sensuctl user change-password` -subcommand. + subcommand. - Agent backend URLs without a port specified will now default to port 8081. - Travis encrypted variables have been updated to work with travis-ci.org - Upgraded all builds to use Go 1.10. - Use megacheck instead of errcheck. - Cleaned agent configuration. - We no longer duplicate hook execution for types that fall into both an exit -code and severity (ex. 0, ok). + code and severity (ex. 0, ok). - Updated the sensuctl guidelines. - Changed travis badge to use travis-ci.org in README.md. - Govaluate's modifier tokens can now be optionally forbidden. @@ -2096,19 +2096,19 @@ code and severity (ex. 0, ok). ### Fixed - Fixed a bug in time.InWindow that in some cases would cause subdued checks to -be executed. + be executed. - Fixed a bug in the HTTP API where resource names could not contain special -characters. + characters. - Resolved a bug in the keepalive monitor timer which was causing it to -erroneously expire. + erroneously expire. - Resolved a bug in how an executor processes checks. If a check contains proxy -requests, the check should not duplicately execute after the proxy requests. + requests, the check should not duplicately execute after the proxy requests. - Removed an erroneous validation statement in check handler. - Fixed HookList `hooks` validation and updated `type` validation message to -allow "0" as a valid type. + allow "0" as a valid type. - Events' check statuses & execution times are now properly added to CheckHistory. - Sensu v1 Check's with TTL, timeout and threshold values can now be imported -correctly. + correctly. - Use uint32 for status so it's not empty when marshalling. - Automatically create a "default" environment when creating a new organization. @@ -2119,14 +2119,14 @@ correctly. - Add API support for adhoc check requests. - Check scheduler now supports round-robin scheduling. - Added better error checking for CLI commands and support for mutually -exclusive fields. + exclusive fields. - Added `--interactive` flag to CLI which is required to run interactive mode. - Added CLI role rule-add Organization and Environment interactive prompts. - Added events page list and simple buttons to filter ### Changed - Silenced `begin` supports human readable time (Format: Jan 02 2006 3:04PM MST) -in `sensuctl` with optional timezone. Stores the field as unix epoch time. + in `sensuctl` with optional timezone. Stores the field as unix epoch time. - Increased the timeout in the store's watchers tests. - Incremental retry mechanism when waiting for agent and backend in e2e tests. - Renamed CLI asset create interactive prompt "Org" to "Organization". @@ -2144,10 +2144,10 @@ in `sensuctl` with optional timezone. Stores the field as unix epoch time. ### Fixed - Tracks in-progress checks with a map and mutex rather than an array to -increase time efficiency and synchronize goroutines reading from and writing -to that map. + increase time efficiency and synchronize goroutines reading from and writing + to that map. - Fixed a bug where we were attempting to kill processes that had already -finished before its allotted execution timeout. + finished before its allotted execution timeout. - Fixed a bug where an event could erroneously be shown as silenced. - Properly log errors whenever a check request can't be published. - Fixed some build tags for tests using etcd stores. @@ -2174,7 +2174,7 @@ finished before its allotted execution timeout. - Entities have been added to the state manager and synchronizer. - Added package leader, for facilitating execution by a single backend. - Proxy check requests are now published to all entities described in -`ProxyRequests` and `EntityAttributes`. + `ProxyRequests` and `EntityAttributes`. - Add quick navigation component for dashboard ### Changed @@ -2183,7 +2183,7 @@ finished before its allotted execution timeout. ### Fixed - Fixed a bug where retrieving check hooks were only from the check's -organization, rather than the check's environment, too. + organization, rather than the check's environment, too. ## [2.0.0-alpha.14] - 2018-01-23 ### Added @@ -2194,9 +2194,9 @@ organization, rather than the check's environment, too. - Token substitution is now available for check hooks - Add an e2e test for logging redaction - Support for `When` field in `Filter` which enables filtering based on days -and times of the week. + and times of the week. - New gRPC inspired GraphQL implementation. See -[graphql/README](backend/apid/graphql/README.md) for usage. + [graphql/README](backend/apid/graphql/README.md) for usage. - Support for TTLs in check configs to monitor stale check results. ### Changed @@ -2211,7 +2211,7 @@ and times of the week. - Fixed e2e test for token substitution on Windows - Fixed check subdue unit test for token substitution on Windows - Consider the first and last seconds of a time window when comparing the -current time + current time - Fixed Travis deploy stage by removing caching for $GOPATH - Parse for [traditional cron](https://en.wikipedia.org/wiki/Cron) strings, rather than [GoDoc cron](https://godoc.org/github.com/robfig/cron) strings. @@ -2222,11 +2222,11 @@ current time ## [2.0.0-alpha.12] - 2018-01-09 ### Added - Add check subdue mechanism. Checks can now be subdued for specified time -windows. + windows. - Silenced entries now include a `begin` timestamp for scheduled maintenance. - Store clients can now use [watchers](https://github.com/sensu/sensu-go/pull/792) to be notified of changes to objects in the store. - Add check `Cron` field. Checks can now be scheduled according to the cron -string stored in this field. + string stored in this field. - Add a distributed queue package for use in the backend. - Token substitution is now available for checks. - CLI functionality for check `Cron` field. @@ -2236,11 +2236,11 @@ string stored in this field. ## [2.0.0-alpha.11] - 2017-12-19 ### Breaking Changes - The `Source` field on a check has been renamed to `ProxyEntityID`. Any checks -using the Source field will have to be recreated. + using the Source field will have to be recreated. ### Added - Silenced entries with ExpireOnResolve set to true will now be deleted when an -event which has previously failing was resolved + event which has previously failing was resolved - TCP/UDP sockets now accept 1.x backward compatible payloads. 1.x Check Result gets translated to a 2.x Event. - Custom attributes can be added to the agent at start. - New and improved Check Hooks are implemented (see whats new about hooks here: [Hooks](https://github.com/sensu/sensu-alpha-documentation/blob/master/08-hooks.md)) @@ -2252,10 +2252,10 @@ event which has previously failing was resolved - Pulled in latest [github.com/coreos/etcd](https://github.com/coreos/etcd). - Includes fix for panic that occurred on shutdown. - Refer to their -[changelog](https://github.com/gyuho/etcd/blob/f444abaae344e562fc69323c75e1cf772c436543/CHANGELOG.md) -for more. + [changelog](https://github.com/gyuho/etcd/blob/f444abaae344e562fc69323c75e1cf772c436543/CHANGELOG.md) + for more. - Switch to using [github.com/golang/dep](https://github.com/golang/dep) for -managing dependencies; `vendor/` directory has been removed. + managing dependencies; `vendor/` directory has been removed. - See [README](README.md) for usage. ## [2.0.0-alpha.10] - 2017-12-12 @@ -2265,29 +2265,29 @@ managing dependencies; `vendor/` directory has been removed. ### Changed - Events that transitioned from incidents to a healthy state are no longer -filtered by the pipeline + filtered by the pipeline - Errcheck was added to the build script, and the project was given a once-over -to clean up existing errcheck lint. + to clean up existing errcheck lint. - Creating a silenced entry via sensuctl no longer requires an expiry value ### Fixed - Entities can now be silenced using their entity subscription - Fixed a bug in the agent where it was ignoring keepalive interval and timeout -settings on start + settings on start - Keepalives now alert when entities go away! - Fixed a bug in package dynamic that could lead to an error in json.Marshal -in certain cases. + in certain cases. - Fixed an issue in keepalived to handle cases of nil entities in keepalive -messages + messages ## [2.0.0-alpha.9] - 2017-12-5 ### Added - Proxy entities are now dynamically created through the "Source" attribute of a -check configuration + check configuration - Flag to sensuctl configure allowing it to be configured non-interactively -(usage: --non-interactive or -n) + (usage: --non-interactive or -n) - New function SetField in package dynamic, for setting fields on types -supporting extended attributes. + supporting extended attributes. - Automatically append entity:entityID subscription for agent entities - Add silenced command to sensuctl for silencing checks and subscriptions. - Add healthz endpoint to agent api for checking agent liveness. @@ -2295,11 +2295,11 @@ supporting extended attributes. - Add POST /events endpoint to manually create, update, and resolve events. - Add "event resolve" command to sensuctl to manually resolve events. - Add the time.InWindow & time.InWindows functions to support time windows, used -in filters and check subdue + in filters and check subdue ### Fixed - Fixed a bug in how silenced entries were deleted. Only one silenced entry will -be deleted at a time, regardless of wildcard presence for subscription or check. + be deleted at a time, regardless of wildcard presence for subscription or check. ## [2.0.0-alpha.8] - 2017-11-28 ### Added From a770f45c0e9085ae3c40315ec7475fd2c179352d Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 24 Oct 2024 20:07:29 +0530 Subject: [PATCH 167/173] etcd version update to 3.5.15 Signed-off-by: manisha kumari --- backend/etcd/etcd.go | 5 +- go.mod | 86 ++++++++++-- go.sum | 318 +++++++------------------------------------ 3 files changed, 123 insertions(+), 286 deletions(-) diff --git a/backend/etcd/etcd.go b/backend/etcd/etcd.go index 5dd25bf5ca..0658780396 100644 --- a/backend/etcd/etcd.go +++ b/backend/etcd/etcd.go @@ -361,6 +361,7 @@ func (e *Etcd) NewEmbeddedClientWithContext(ctx context.Context) *clientv3.Clien // Set etcd client log level logConfig := logutil.DefaultZapLoggerConfig logConfig.Level.SetLevel(LogLevelToZap(e.cfg.ClientLogLevel)) + clientLogger, err := logConfig.Build() if err != nil { panic(fmt.Sprintf("error building etcd client logger: %s", err)) @@ -373,11 +374,11 @@ func (e *Etcd) NewEmbeddedClientWithContext(ctx context.Context) *clientv3.Clien lc := adapter.LeaseServerToLeaseClient(v3rpc.NewQuotaLeaseServer(e.etcd.Server)) c.Lease = clientv3.NewLeaseFromLeaseClient(lc, c, time.Second) - +:: wc := adapter.WatchServerToWatchClient(v3rpc.NewWatchServer(e.etcd.Server)) c.Watcher = &watchWrapper{clientv3.NewWatchFromWatchClient(wc, c)} - mc := adapter.MaintenanceServerToMaintenanceClient(v3rpc.NewMaintenanceServer(e.etcd.Server)) + mc := adapter.MaintenanceServerToMaintenanceClient(v3rpc.NewMaintenanceServer(e.etcd.Server, nil)) c.Maintenance = clientv3.NewMaintenanceFromMaintenanceClient(mc, c) clc := adapter.ClusterServerToClusterClient(v3rpc.NewClusterServer(e.etcd.Server)) diff --git a/go.mod b/go.mod index 59c5fe480d..c57bdb9ebd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/sensu/sensu-go -go 1.16 +go 1.22 require ( github.com/AlecAivazis/survey/v2 v2.2.14 @@ -18,7 +18,7 @@ require ( github.com/go-resty/resty/v2 v2.5.0 github.com/gogo/protobuf v1.3.2 github.com/golang-jwt/jwt/v4 v4.5.0 - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/golang/snappy v0.0.4 github.com/google/uuid v1.4.0 github.com/gorilla/mux v1.8.0 @@ -54,17 +54,17 @@ require ( github.com/stretchr/testify v1.8.4 github.com/ulikunitz/xz v0.5.10 // indirect github.com/willf/pad v0.0.0-20160331131008-b3d780601022 - go.etcd.io/bbolt v1.3.8 - go.etcd.io/etcd/api/v3 v3.5.10 - go.etcd.io/etcd/client/pkg/v3 v3.5.10 - go.etcd.io/etcd/client/v3 v3.5.10 - go.etcd.io/etcd/server/v3 v3.5.10 + go.etcd.io/bbolt v1.3.10 + go.etcd.io/etcd/api/v3 v3.5.15 + go.etcd.io/etcd/client/pkg/v3 v3.5.15 + go.etcd.io/etcd/client/v3 v3.5.15 + go.etcd.io/etcd/server/v3 v3.5.15 go.uber.org/atomic v1.11.0 go.uber.org/zap v1.26.0 - golang.org/x/crypto v0.15.0 + golang.org/x/crypto v0.21.0 golang.org/x/mod v0.11.0 - golang.org/x/net v0.18.0 - golang.org/x/sys v0.14.0 + golang.org/x/net v0.23.0 + golang.org/x/sys v0.18.0 golang.org/x/time v0.3.0 golang.org/x/tools v0.10.0 google.golang.org/grpc v1.59.0 @@ -73,7 +73,6 @@ require ( ) require ( - github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/creack/pty v1.1.20 // indirect github.com/go-logr/logr v1.3.0 // indirect @@ -90,8 +89,8 @@ require ( github.com/sensu/sensu-go/types v0.13.0 github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect go.uber.org/multierr v1.11.0 // indirect google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f // indirect google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect @@ -99,3 +98,64 @@ require ( gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) + +require ( + github.com/andybalholm/brotli v1.0.4 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/coreos/go-semver v0.3.1 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dsnet/compress v0.0.1 // indirect + github.com/fsnotify/fsnotify v1.4.7 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/ipfs/go-log/v2 v2.0.5 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/klauspost/compress v1.15.9 // indirect + github.com/klauspost/pgzip v1.2.1 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.1 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/nwaples/rardecode v1.0.0 // indirect + github.com/opentracing/opentracing-go v1.1.0 // indirect + github.com/pelletier/go-toml v1.2.0 // indirect + github.com/pierrec/lz4/v3 v3.0.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/soheilhy/cmux v0.1.5 // indirect + github.com/spf13/afero v1.9.2 // indirect + github.com/spf13/cast v1.3.0 // indirect + github.com/spf13/jwalterweatherman v1.0.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + github.com/tklauser/go-sysconf v0.3.11 // indirect + github.com/tklauser/numcpus v0.6.0 // indirect + github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect + github.com/yusufpapurcu/wmi v1.2.2 // indirect + go.etcd.io/etcd/client/v2 v2.305.15 // indirect + go.etcd.io/etcd/pkg/v3 v3.5.15 // indirect + go.etcd.io/etcd/raft/v3 v3.5.15 // indirect + go.opentelemetry.io/otel v1.20.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect + go.opentelemetry.io/otel/metric v1.20.0 // indirect + go.opentelemetry.io/otel/sdk v1.20.0 // indirect + go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/proto/otlp v1.0.0 // indirect + golang.org/x/term v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect + gopkg.in/ini.v1 v1.51.0 // indirect + gopkg.in/sourcemap.v1 v1.0.5 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum index b25a55b1cf..790a40354d 100644 --- a/go.sum +++ b/go.sum @@ -43,14 +43,12 @@ cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5x cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= cloud.google.com/go/accessapproval v1.7.2/go.mod h1:/gShiq9/kK/h8T/eEn1BTzalDvk0mZxJlhfw0p+Xuc0= cloud.google.com/go/accessapproval v1.7.3/go.mod h1:4l8+pwIxGTNqSf4T3ds8nLO94NQf0W/KnMNuQ9PbnP8= -cloud.google.com/go/accessapproval v1.7.4/go.mod h1:/aTEh45LzplQgFYdQdwPMR9YdX0UlhBmvB84uAmQKUc= cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= @@ -59,7 +57,6 @@ cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= cloud.google.com/go/accesscontextmanager v1.8.2/go.mod h1:E6/SCRM30elQJ2PKtFMs2YhfJpZSNcJyejhuzoId4Zk= cloud.google.com/go/accesscontextmanager v1.8.3/go.mod h1:4i/JkF2JiFbhLnnpnfoTX5vRXfhf9ukhU1ANOTALTOQ= -cloud.google.com/go/accesscontextmanager v1.8.4/go.mod h1:ParU+WbMpD34s5JFEnGAnPBYAgUHozaTmDJU7aCU9+M= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= @@ -72,8 +69,6 @@ cloud.google.com/go/aiplatform v1.50.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP cloud.google.com/go/aiplatform v1.51.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= cloud.google.com/go/aiplatform v1.51.1/go.mod h1:kY3nIMAVQOK2XDqDPHaOuD9e+FdMA6OOpfBjsvaFSOo= cloud.google.com/go/aiplatform v1.51.2/go.mod h1:hCqVYB3mY45w99TmetEoe8eCQEwZEp9WHxeZdcv9phw= -cloud.google.com/go/aiplatform v1.52.0/go.mod h1:pwZMGvqe0JRkI1GWSZCtnAfrR4K1bv65IHILGA//VEU= -cloud.google.com/go/aiplatform v1.54.0/go.mod h1:pwZMGvqe0JRkI1GWSZCtnAfrR4K1bv65IHILGA//VEU= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= @@ -83,28 +78,24 @@ cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= cloud.google.com/go/analytics v0.21.4/go.mod h1:zZgNCxLCy8b2rKKVfC1YkC2vTrpfZmeRCySM3aUbskA= cloud.google.com/go/analytics v0.21.5/go.mod h1:BQtOBHWTlJ96axpPPnw5CvGJ6i3Ve/qX2fTxR8qWyr8= -cloud.google.com/go/analytics v0.21.6/go.mod h1:eiROFQKosh4hMaNhF85Oc9WO97Cpa7RggD40e/RBy8w= cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= cloud.google.com/go/apigateway v1.6.2/go.mod h1:CwMC90nnZElorCW63P2pAYm25AtQrHfuOkbRSHj0bT8= cloud.google.com/go/apigateway v1.6.3/go.mod h1:k68PXWpEs6BVDTtnLQAyG606Q3mz8pshItwPXjgv44Y= -cloud.google.com/go/apigateway v1.6.4/go.mod h1:0EpJlVGH5HwAN4VF4Iec8TAzGN1aQgbxAWGJsnPCGGY= cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= cloud.google.com/go/apigeeconnect v1.6.2/go.mod h1:s6O0CgXT9RgAxlq3DLXvG8riw8PYYbU/v25jqP3Dy18= cloud.google.com/go/apigeeconnect v1.6.3/go.mod h1:peG0HFQ0si2bN15M6QSjEW/W7Gy3NYkWGz7pFz13cbo= -cloud.google.com/go/apigeeconnect v1.6.4/go.mod h1:CapQCWZ8TCjnU0d7PobxhpOdVz/OVJ2Hr/Zcuu1xFx0= cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= cloud.google.com/go/apigeeregistry v0.7.2/go.mod h1:9CA2B2+TGsPKtfi3F7/1ncCCsL62NXBRfM6iPoGSM+8= cloud.google.com/go/apigeeregistry v0.8.1/go.mod h1:MW4ig1N4JZQsXmBSwH4rwpgDonocz7FPBSw6XPGHmYw= -cloud.google.com/go/apigeeregistry v0.8.2/go.mod h1:h4v11TDGdeXJDJvImtgK2AFVvMIgGWjSb0HRnBSjcX8= cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= @@ -116,7 +107,6 @@ cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45n cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= cloud.google.com/go/appengine v1.8.2/go.mod h1:WMeJV9oZ51pvclqFN2PqHoGnys7rK0rz6s3Mp6yMvDo= cloud.google.com/go/appengine v1.8.3/go.mod h1:2oUPZ1LVZ5EXi+AF1ihNAF+S8JrzQ3till5m9VQkrsk= -cloud.google.com/go/appengine v1.8.4/go.mod h1:TZ24v+wXBujtkK77CXCpjZbnuTvsFNT41MUaZ28D6vg= cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= @@ -124,7 +114,6 @@ cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1N cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= cloud.google.com/go/area120 v0.8.2/go.mod h1:a5qfo+x77SRLXnCynFWPUZhnZGeSgvQ+Y0v1kSItkh4= cloud.google.com/go/area120 v0.8.3/go.mod h1:5zj6pMzVTH+SVHljdSKC35sriR/CVvQZzG/Icdyriw0= -cloud.google.com/go/area120 v0.8.4/go.mod h1:jfawXjxf29wyBXr48+W+GyX/f8fflxp642D/bb9v68M= cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= @@ -137,7 +126,6 @@ cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346 cloud.google.com/go/artifactregistry v1.14.2/go.mod h1:Xk+QbsKEb0ElmyeMfdHAey41B+qBq3q5R5f5xD4XT3U= cloud.google.com/go/artifactregistry v1.14.3/go.mod h1:A2/E9GXnsyXl7GUvQ/2CjHA+mVRoWAXC0brg2os+kNI= cloud.google.com/go/artifactregistry v1.14.4/go.mod h1:SJJcZTMv6ce0LDMUnihCN7WSrI+kBSFV0KIKo8S8aYU= -cloud.google.com/go/artifactregistry v1.14.6/go.mod h1:np9LSFotNWHcjnOgh8UVK0RFPCTUGbO0ve3384xyHfE= cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= @@ -150,7 +138,6 @@ cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi0 cloud.google.com/go/asset v1.15.0/go.mod h1:tpKafV6mEut3+vN9ScGvCHXHj7FALFVta+okxFECHcg= cloud.google.com/go/asset v1.15.1/go.mod h1:yX/amTvFWRpp5rcFq6XbCxzKT8RJUam1UoboE179jU4= cloud.google.com/go/asset v1.15.2/go.mod h1:B6H5tclkXvXz7PD22qCA2TDxSVQfasa3iDlM89O2NXs= -cloud.google.com/go/asset v1.15.3/go.mod h1:yYLfUD4wL4X589A9tYrv4rFrba0QlDeag0CMcM5ggXU= cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= @@ -160,7 +147,6 @@ cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJ cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= cloud.google.com/go/assuredworkloads v1.11.2/go.mod h1:O1dfr+oZJMlE6mw0Bp0P1KZSlj5SghMBvTpZqIcUAW4= cloud.google.com/go/assuredworkloads v1.11.3/go.mod h1:vEjfTKYyRUaIeA0bsGJceFV2JKpVRgyG2op3jfa59Zs= -cloud.google.com/go/assuredworkloads v1.11.4/go.mod h1:4pwwGNwy1RP0m+y12ef3Q/8PaiWrIDQ6nD2E8kvWI9U= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= @@ -169,7 +155,6 @@ cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfG cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= cloud.google.com/go/automl v1.13.2/go.mod h1:gNY/fUmDEN40sP8amAX3MaXkxcqPIn7F1UIIPZpy4Mg= cloud.google.com/go/automl v1.13.3/go.mod h1:Y8KwvyAZFOsMAPqUCfNu1AyclbC6ivCUF/MTwORymyY= -cloud.google.com/go/automl v1.13.4/go.mod h1:ULqwX/OLZ4hBVfKQaMtxMSTlPx0GqGbWN8uA/1EqCP8= cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= @@ -177,7 +162,6 @@ cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZ cloud.google.com/go/baremetalsolution v1.2.0/go.mod h1:68wi9AwPYkEWIUT4SvSGS9UJwKzNpshjHsH4lzk8iOw= cloud.google.com/go/baremetalsolution v1.2.1/go.mod h1:3qKpKIw12RPXStwQXcbhfxVj1dqQGEvcmA+SX/mUR88= cloud.google.com/go/baremetalsolution v1.2.2/go.mod h1:O5V6Uu1vzVelYahKfwEWRMaS3AbCkeYHy3145s1FkhM= -cloud.google.com/go/baremetalsolution v1.2.3/go.mod h1:/UAQ5xG3faDdy180rCUv47e0jvpp3BFxT+Cl0PFjw5g= cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= @@ -186,7 +170,6 @@ cloud.google.com/go/batch v1.4.1/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mu cloud.google.com/go/batch v1.5.0/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= cloud.google.com/go/batch v1.5.1/go.mod h1:RpBuIYLkQu8+CWDk3dFD/t/jOCGuUpkpX+Y0n1Xccs8= cloud.google.com/go/batch v1.6.1/go.mod h1:urdpD13zPe6YOK+6iZs/8/x2VBRofvblLpx0t57vM98= -cloud.google.com/go/batch v1.6.3/go.mod h1:J64gD4vsNSA2O5TtDB5AAux3nJ9iV8U3ilg3JDBYejU= cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= @@ -195,7 +178,6 @@ cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/V cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= cloud.google.com/go/beyondcorp v1.0.1/go.mod h1:zl/rWWAFVeV+kx+X2Javly7o1EIQThU4WlkynffL/lk= cloud.google.com/go/beyondcorp v1.0.2/go.mod h1:m8cpG7caD+5su+1eZr+TSvF6r21NdLJk4f9u4SP2Ntc= -cloud.google.com/go/beyondcorp v1.0.3/go.mod h1:HcBvnEd7eYr+HGDd5ZbuVmBYX019C6CEXBonXbCVwJo= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -213,7 +195,6 @@ cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6Pm cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= cloud.google.com/go/bigquery v1.55.0/go.mod h1:9Y5I3PN9kQWuid6183JFhOGOW3GcirA5LpsKCUn+2ec= cloud.google.com/go/bigquery v1.56.0/go.mod h1:KDcsploXTEY7XT3fDQzMUZlpQLHzE4itubHrnmhUrZA= -cloud.google.com/go/bigquery v1.57.1/go.mod h1:iYzC0tGVWt1jqSzBHqCr3lrRn0u13E8e+AqowBsDgug= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= @@ -225,7 +206,6 @@ cloud.google.com/go/billing v1.17.0/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlp cloud.google.com/go/billing v1.17.1/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= cloud.google.com/go/billing v1.17.2/go.mod h1:u/AdV/3wr3xoRBk5xvUzYMS1IawOAPwQMuHgHMdljDg= cloud.google.com/go/billing v1.17.3/go.mod h1:z83AkoZ7mZwBGT3yTnt6rSGI1OOsHSIi6a5M3mJ8NaU= -cloud.google.com/go/billing v1.17.4/go.mod h1:5DOYQStCxquGprqfuid/7haD7th74kyMBHkjO/OvDtk= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= @@ -235,14 +215,12 @@ cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxi cloud.google.com/go/binaryauthorization v1.7.0/go.mod h1:Zn+S6QqTMn6odcMU1zDZCJxPjU2tZPV1oDl45lWY154= cloud.google.com/go/binaryauthorization v1.7.1/go.mod h1:GTAyfRWYgcbsP3NJogpV3yeunbUIjx2T9xVeYovtURE= cloud.google.com/go/binaryauthorization v1.7.2/go.mod h1:kFK5fQtxEp97m92ziy+hbu+uKocka1qRRL8MVJIgjv0= -cloud.google.com/go/binaryauthorization v1.7.3/go.mod h1:VQ/nUGRKhrStlGr+8GMS8f6/vznYLkdK5vaKfdCIpvU= cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= cloud.google.com/go/certificatemanager v1.7.2/go.mod h1:15SYTDQMd00kdoW0+XY5d9e+JbOPjp24AvF48D8BbcQ= cloud.google.com/go/certificatemanager v1.7.3/go.mod h1:T/sZYuC30PTag0TLo28VedIRIj1KPGcOQzjWAptHa00= -cloud.google.com/go/certificatemanager v1.7.4/go.mod h1:FHAylPe/6IIKuaRmHbjbdLhGhVQ+CWHSD5Jq0k4+cCE= cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= @@ -251,7 +229,6 @@ cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeH cloud.google.com/go/channel v1.17.0/go.mod h1:RpbhJsGi/lXWAUM1eF4IbQGbsfVlg2o8Iiy2/YLfVT0= cloud.google.com/go/channel v1.17.1/go.mod h1:xqfzcOZAcP4b/hUDH0GkGg1Sd5to6di1HOJn/pi5uBQ= cloud.google.com/go/channel v1.17.2/go.mod h1:aT2LhnftnyfQceFql5I/mP8mIbiiJS4lWqgXA815zMk= -cloud.google.com/go/channel v1.17.3/go.mod h1:QcEBuZLGGrUMm7kNj9IbU1ZfmJq2apotsV83hbxX7eE= cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= @@ -262,8 +239,6 @@ cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2 cloud.google.com/go/cloudbuild v1.14.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= cloud.google.com/go/cloudbuild v1.14.1/go.mod h1:K7wGc/3zfvmYWOWwYTgF/d/UVJhS4pu+HAy7PL7mCsU= cloud.google.com/go/cloudbuild v1.14.2/go.mod h1:Bn6RO0mBYk8Vlrt+8NLrru7WXlQ9/RDWz2uo5KG1/sg= -cloud.google.com/go/cloudbuild v1.14.3/go.mod h1:eIXYWmRt3UtggLnFGx4JvXcMj4kShhVzGndL1LwleEM= -cloud.google.com/go/cloudbuild v1.15.0/go.mod h1:eIXYWmRt3UtggLnFGx4JvXcMj4kShhVzGndL1LwleEM= cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= @@ -271,7 +246,6 @@ cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+Pl cloud.google.com/go/clouddms v1.7.0/go.mod h1:MW1dC6SOtI/tPNCciTsXtsGNEM0i0OccykPvv3hiYeM= cloud.google.com/go/clouddms v1.7.1/go.mod h1:o4SR8U95+P7gZ/TX+YbJxehOCsM+fe6/brlrFquiszk= cloud.google.com/go/clouddms v1.7.2/go.mod h1:Rk32TmWmHo64XqDvW7jgkFQet1tUKNVzs7oajtJT3jU= -cloud.google.com/go/clouddms v1.7.3/go.mod h1:fkN2HQQNUYInAU3NQ3vRLkV2iWs8lIdmBKOx4nrL6Hc= cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= @@ -282,7 +256,6 @@ cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8o cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= cloud.google.com/go/cloudtasks v1.12.2/go.mod h1:A7nYkjNlW2gUoROg1kvJrQGhJP/38UaWwsnuBDOBVUk= cloud.google.com/go/cloudtasks v1.12.3/go.mod h1:GPVXhIOSGEaR+3xT4Fp72ScI+HjHffSS4B8+BaBB5Ys= -cloud.google.com/go/cloudtasks v1.12.4/go.mod h1:BEPu0Gtt2dU6FxZHNqqNdGqIG86qyWKBPGnsb7udGY0= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= @@ -319,8 +292,6 @@ cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9o cloud.google.com/go/contactcenterinsights v1.11.0/go.mod h1:hutBdImE4XNZ1NV4vbPJKSFOnQruhC5Lj9bZqWMTKiU= cloud.google.com/go/contactcenterinsights v1.11.1/go.mod h1:FeNP3Kg8iteKM80lMwSk3zZZKVxr+PGnAId6soKuXwE= cloud.google.com/go/contactcenterinsights v1.11.2/go.mod h1:A9PIR5ov5cRcd28KlDbmmXE8Aay+Gccer2h4wzkYFso= -cloud.google.com/go/contactcenterinsights v1.11.3/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= -cloud.google.com/go/contactcenterinsights v1.12.0/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= @@ -331,8 +302,6 @@ cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq cloud.google.com/go/container v1.26.0/go.mod h1:YJCmRet6+6jnYYRS000T6k0D0xUXQgBSaJ7VwI8FBj4= cloud.google.com/go/container v1.26.1/go.mod h1:5smONjPRUxeEpDG7bMKWfDL4sauswqEtnBK1/KKpR04= cloud.google.com/go/container v1.26.2/go.mod h1:YlO84xCt5xupVbLaMY4s3XNE79MUJ+49VmkInr6HvF4= -cloud.google.com/go/container v1.27.1/go.mod h1:b1A1gJeTBXVLQ6GGw9/9M4FG94BEGsqJ5+t4d/3N7O4= -cloud.google.com/go/container v1.28.0/go.mod h1:b1A1gJeTBXVLQ6GGw9/9M4FG94BEGsqJ5+t4d/3N7O4= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= @@ -341,7 +310,6 @@ cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMN cloud.google.com/go/containeranalysis v0.11.0/go.mod h1:4n2e99ZwpGxpNcz+YsFT1dfOHPQFGcAC8FN2M2/ne/U= cloud.google.com/go/containeranalysis v0.11.1/go.mod h1:rYlUOM7nem1OJMKwE1SadufX0JP3wnXj844EtZAwWLY= cloud.google.com/go/containeranalysis v0.11.2/go.mod h1:xibioGBC1MD2j4reTyV1xY1/MvKaz+fyM9ENWhmIeP8= -cloud.google.com/go/containeranalysis v0.11.3/go.mod h1:kMeST7yWFQMGjiG9K7Eov+fPNQcGhb8mXj/UcTiWw9U= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= @@ -357,15 +325,12 @@ cloud.google.com/go/datacatalog v1.17.1/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/U cloud.google.com/go/datacatalog v1.18.0/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= cloud.google.com/go/datacatalog v1.18.1/go.mod h1:TzAWaz+ON1tkNr4MOcak8EBHX7wIRX/gZKM+yTVsv+A= cloud.google.com/go/datacatalog v1.18.2/go.mod h1:SPVgWW2WEMuWHA+fHodYjmxPiMqcOiWfhc9OD5msigk= -cloud.google.com/go/datacatalog v1.18.3/go.mod h1:5FR6ZIF8RZrtml0VUao22FxhdjkoG+a0866rEnObryM= -cloud.google.com/go/datacatalog v1.19.0/go.mod h1:5FR6ZIF8RZrtml0VUao22FxhdjkoG+a0866rEnObryM= cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= cloud.google.com/go/dataflow v0.9.2/go.mod h1:vBfdBZ/ejlTaYIGB3zB4T08UshH70vbtZeMD+urnUSo= cloud.google.com/go/dataflow v0.9.3/go.mod h1:HI4kMVjcHGTs3jTHW/kv3501YW+eloiJSLxkJa/vqFE= -cloud.google.com/go/dataflow v0.9.4/go.mod h1:4G8vAkHYCSzU8b/kmsoR2lWyHJD85oMJPHMtan40K8w= cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= @@ -374,21 +339,18 @@ cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2 cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= cloud.google.com/go/dataform v0.8.2/go.mod h1:X9RIqDs6NbGPLR80tnYoPNiO1w0wenKTb8PxxlhTMKM= cloud.google.com/go/dataform v0.8.3/go.mod h1:8nI/tvv5Fso0drO3pEjtowz58lodx8MVkdV2q0aPlqg= -cloud.google.com/go/dataform v0.9.1/go.mod h1:pWTg+zGQ7i16pyn0bS1ruqIE91SdL2FDMvEYu/8oQxs= cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= cloud.google.com/go/datafusion v1.7.2/go.mod h1:62K2NEC6DRlpNmI43WHMWf9Vg/YvN6QVi8EVwifElI0= cloud.google.com/go/datafusion v1.7.3/go.mod h1:eoLt1uFXKGBq48jy9LZ+Is8EAVLnmn50lNncLzwYokE= -cloud.google.com/go/datafusion v1.7.4/go.mod h1:BBs78WTOLYkT4GVZIXQCZT3GFpkpDN4aBY4NDX/jVlM= cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= cloud.google.com/go/datalabeling v0.8.2/go.mod h1:cyDvGHuJWu9U/cLDA7d8sb9a0tWLEletStu2sTmg3BE= cloud.google.com/go/datalabeling v0.8.3/go.mod h1:tvPhpGyS/V7lqjmb3V0TaDdGvhzgR1JoW7G2bpi2UTI= -cloud.google.com/go/datalabeling v0.8.4/go.mod h1:Z1z3E6LHtffBGrNUkKwbwbDxTiXEApLzIgmymj8A3S8= cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= @@ -398,8 +360,6 @@ cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MP cloud.google.com/go/dataplex v1.9.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= cloud.google.com/go/dataplex v1.10.1/go.mod h1:1MzmBv8FvjYfc7vDdxhnLFNskikkB+3vl475/XdCDhs= cloud.google.com/go/dataplex v1.10.2/go.mod h1:xdC8URdTrCrZMW6keY779ZT1cTOfV8KEPNsw+LTRT1Y= -cloud.google.com/go/dataplex v1.11.1/go.mod h1:mHJYQQ2VEJHsyoC0OdNyy988DvEbPhqFs5OOLffLX0c= -cloud.google.com/go/dataplex v1.11.2/go.mod h1:mHJYQQ2VEJHsyoC0OdNyy988DvEbPhqFs5OOLffLX0c= cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= @@ -407,15 +367,12 @@ cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcw cloud.google.com/go/dataproc/v2 v2.2.0/go.mod h1:lZR7AQtwZPvmINx5J87DSOOpTfof9LVZju6/Qo4lmcY= cloud.google.com/go/dataproc/v2 v2.2.1/go.mod h1:QdAJLaBjh+l4PVlVZcmrmhGccosY/omC1qwfQ61Zv/o= cloud.google.com/go/dataproc/v2 v2.2.2/go.mod h1:aocQywVmQVF4i8CL740rNI/ZRpsaaC1Wh2++BJ7HEJ4= -cloud.google.com/go/dataproc/v2 v2.2.3/go.mod h1:G5R6GBc9r36SXv/RtZIVfB8SipI+xVn0bX5SxUzVYbY= -cloud.google.com/go/dataproc/v2 v2.3.0/go.mod h1:G5R6GBc9r36SXv/RtZIVfB8SipI+xVn0bX5SxUzVYbY= cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= cloud.google.com/go/dataqna v0.8.2/go.mod h1:KNEqgx8TTmUipnQsScOoDpq/VlXVptUqVMZnt30WAPs= cloud.google.com/go/dataqna v0.8.3/go.mod h1:wXNBW2uvc9e7Gl5k8adyAMnLush1KVV6lZUhB+rqNu4= -cloud.google.com/go/dataqna v0.8.4/go.mod h1:mySRKjKg5Lz784P6sCov3p1QD+RZQONRMRjzGNcFd0c= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= @@ -435,7 +392,6 @@ cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZ cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= cloud.google.com/go/datastream v1.10.1/go.mod h1:7ngSYwnw95YFyTd5tOGBxHlOZiL+OtpjheqU7t2/s/c= cloud.google.com/go/datastream v1.10.2/go.mod h1:W42TFgKAs/om6x/CdXX5E4oiAsKlH+e8MTGy81zdYt0= -cloud.google.com/go/datastream v1.10.3/go.mod h1:YR0USzgjhqA/Id0Ycu1VvZe8hEWwrkjuXrGbzeDOSEA= cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= @@ -444,8 +400,6 @@ cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCN cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= cloud.google.com/go/deploy v1.13.1/go.mod h1:8jeadyLkH9qu9xgO3hVWw8jVr29N1mnW42gRJT8GY6g= cloud.google.com/go/deploy v1.14.1/go.mod h1:N8S0b+aIHSEeSr5ORVoC0+/mOPUysVt8ae4QkZYolAw= -cloud.google.com/go/deploy v1.14.2/go.mod h1:e5XOUI5D+YGldyLNZ21wbp9S8otJbBE4i88PtO9x/2g= -cloud.google.com/go/deploy v1.15.0/go.mod h1:e5XOUI5D+YGldyLNZ21wbp9S8otJbBE4i88PtO9x/2g= cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= @@ -460,14 +414,12 @@ cloud.google.com/go/dialogflow v1.43.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+ cloud.google.com/go/dialogflow v1.44.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= cloud.google.com/go/dialogflow v1.44.1/go.mod h1:n/h+/N2ouKOO+rbe/ZnI186xImpqvCVj2DdsWS/0EAk= cloud.google.com/go/dialogflow v1.44.2/go.mod h1:QzFYndeJhpVPElnFkUXxdlptx0wPnBWLCBT9BvtC3/c= -cloud.google.com/go/dialogflow v1.44.3/go.mod h1:mHly4vU7cPXVweuB5R0zsYKPMzy240aQdAu06SqBbAQ= cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= cloud.google.com/go/dlp v1.10.2/go.mod h1:ZbdKIhcnyhILgccwVDzkwqybthh7+MplGC3kZVZsIOQ= cloud.google.com/go/dlp v1.10.3/go.mod h1:iUaTc/ln8I+QT6Ai5vmuwfw8fqTk2kaz0FvCwhLCom0= -cloud.google.com/go/dlp v1.11.1/go.mod h1:/PA2EnioBeXTL/0hInwgj0rfsQb3lpE3R8XUJxqUNKI= cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= @@ -480,14 +432,12 @@ cloud.google.com/go/documentai v1.22.1/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJx cloud.google.com/go/documentai v1.23.0/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= cloud.google.com/go/documentai v1.23.2/go.mod h1:Q/wcRT+qnuXOpjAkvOV4A+IeQl04q2/ReT7SSbytLSo= cloud.google.com/go/documentai v1.23.4/go.mod h1:4MYAaEMnADPN1LPN5xboDR5QVB6AgsaxgFdJhitlE2Y= -cloud.google.com/go/documentai v1.23.5/go.mod h1:ghzBsyVTiVdkfKaUCum/9bGBEyBjDO4GfooEcYKhN+g= cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= cloud.google.com/go/domains v0.9.2/go.mod h1:3YvXGYzZG1Temjbk7EyGCuGGiXHJwVNmwIf+E/cUp5I= cloud.google.com/go/domains v0.9.3/go.mod h1:29k66YNDLDY9LCFKpGFeh6Nj9r62ZKm5EsUJxAl84KU= -cloud.google.com/go/domains v0.9.4/go.mod h1:27jmJGShuXYdUNjyDG0SodTfT5RwLi7xmH334Gvi3fY= cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= @@ -495,7 +445,6 @@ cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6Esb cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= cloud.google.com/go/edgecontainer v1.1.2/go.mod h1:wQRjIzqxEs9e9wrtle4hQPSR1Y51kqN75dgF7UllZZ4= cloud.google.com/go/edgecontainer v1.1.3/go.mod h1:Ll2DtIABzEfaxaVSbwj3QHFaOOovlDFiWVDu349jSsA= -cloud.google.com/go/edgecontainer v1.1.4/go.mod h1:AvFdVuZuVGdgaE5YvlL1faAoa1ndRR/5XhXZvPBHbsE= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= @@ -503,7 +452,6 @@ cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aU cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= cloud.google.com/go/essentialcontacts v1.6.3/go.mod h1:yiPCD7f2TkP82oJEFXFTou8Jl8L6LBRPeBEkTaO0Ggo= cloud.google.com/go/essentialcontacts v1.6.4/go.mod h1:iju5Vy3d9tJUg0PYMd1nHhjV7xoCXaOAVabrwLaPBEM= -cloud.google.com/go/essentialcontacts v1.6.5/go.mod h1:jjYbPzw0x+yglXC890l6ECJWdYeZ5dlYACTFL0U/VuM= cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= @@ -512,7 +460,6 @@ cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8 cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= cloud.google.com/go/eventarc v1.13.1/go.mod h1:EqBxmGHFrruIara4FUQ3RHlgfCn7yo1HYsu2Hpt/C3Y= cloud.google.com/go/eventarc v1.13.2/go.mod h1:X9A80ShVu19fb4e5sc/OLV7mpFUKZMwfJFeeWhcIObM= -cloud.google.com/go/eventarc v1.13.3/go.mod h1:RWH10IAZIRcj1s/vClXkBgMHwh59ts7hSWcqD3kaclg= cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= @@ -520,8 +467,6 @@ cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466d cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= cloud.google.com/go/filestore v1.7.2/go.mod h1:TYOlyJs25f/omgj+vY7/tIG/E7BX369triSPzE4LdgE= cloud.google.com/go/filestore v1.7.3/go.mod h1:Qp8WaEERR3cSkxToxFPHh/b8AACkSut+4qlCjAmKTV0= -cloud.google.com/go/filestore v1.7.4/go.mod h1:S5JCxIbFjeBhWMTfIYH2Jx24J6BqjwpkkPl+nBA5DlI= -cloud.google.com/go/filestore v1.8.0/go.mod h1:S5JCxIbFjeBhWMTfIYH2Jx24J6BqjwpkkPl+nBA5DlI= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= @@ -538,7 +483,6 @@ cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/ cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= cloud.google.com/go/functions v1.15.2/go.mod h1:CHAjtcR6OU4XF2HuiVeriEdELNcnvRZSk1Q8RMqy4lE= cloud.google.com/go/functions v1.15.3/go.mod h1:r/AMHwBheapkkySEhiZYLDBwVJCdlRwsm4ieJu35/Ug= -cloud.google.com/go/functions v1.15.4/go.mod h1:CAsTc3VlRMVvx+XqXxKqVevguqJpnVip4DdonFsX28I= cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= @@ -552,14 +496,12 @@ cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6 cloud.google.com/go/gkebackup v1.3.1/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= cloud.google.com/go/gkebackup v1.3.2/go.mod h1:OMZbXzEJloyXMC7gqdSB+EOEQ1AKcpGYvO3s1ec5ixk= cloud.google.com/go/gkebackup v1.3.3/go.mod h1:eMk7/wVV5P22KBakhQnJxWSVftL1p4VBFLpv0kIft7I= -cloud.google.com/go/gkebackup v1.3.4/go.mod h1:gLVlbM8h/nHIs09ns1qx3q3eaXcGSELgNu1DWXYz1HI= cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= cloud.google.com/go/gkeconnect v0.8.2/go.mod h1:6nAVhwchBJYgQCXD2pHBFQNiJNyAd/wyxljpaa6ZPrY= cloud.google.com/go/gkeconnect v0.8.3/go.mod h1:i9GDTrfzBSUZGCe98qSu1B8YB8qfapT57PenIb820Jo= -cloud.google.com/go/gkeconnect v0.8.4/go.mod h1:84hZz4UMlDCKl8ifVW8layK4WHlMAFeq8vbzjU0yJkw= cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= @@ -567,7 +509,6 @@ cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VB cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= cloud.google.com/go/gkehub v0.14.2/go.mod h1:iyjYH23XzAxSdhrbmfoQdePnlMj2EWcvnR+tHdBQsCY= cloud.google.com/go/gkehub v0.14.3/go.mod h1:jAl6WafkHHW18qgq7kqcrXYzN08hXeK/Va3utN8VKg8= -cloud.google.com/go/gkehub v0.14.4/go.mod h1:Xispfu2MqnnFt8rV/2/3o73SK1snL8s9dYJ9G2oQMfc= cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= @@ -575,7 +516,6 @@ cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZVi cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= cloud.google.com/go/gkemulticloud v1.0.1/go.mod h1:AcrGoin6VLKT/fwZEYuqvVominLriQBCKmbjtnbMjG8= cloud.google.com/go/gkemulticloud v1.0.2/go.mod h1:+ee5VXxKb3H1l4LZAcgWB/rvI16VTNTrInWxDjAGsGo= -cloud.google.com/go/gkemulticloud v1.0.3/go.mod h1:7NpJBN94U6DY1xHIbsDqB2+TFZUfjLUKLjUX8NGLor0= cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= @@ -584,7 +524,6 @@ cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdI cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= cloud.google.com/go/gsuiteaddons v1.6.2/go.mod h1:K65m9XSgs8hTF3X9nNTPi8IQueljSdYo9F+Mi+s4MyU= cloud.google.com/go/gsuiteaddons v1.6.3/go.mod h1:sCFJkZoMrLZT3JTb8uJqgKPNshH2tfXeCwTFRebTq48= -cloud.google.com/go/gsuiteaddons v1.6.4/go.mod h1:rxtstw7Fx22uLOXBpsvb9DUbC+fiXs7rF4U29KHM/pE= cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= @@ -600,7 +539,6 @@ cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+K cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= -cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= @@ -610,14 +548,12 @@ cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyX cloud.google.com/go/iap v1.9.0/go.mod h1:01OFxd1R+NFrg78S+hoPV5PxEzv22HXaNqUUlmNHFuY= cloud.google.com/go/iap v1.9.1/go.mod h1:SIAkY7cGMLohLSdBR25BuIxO+I4fXJiL06IBL7cy/5Q= cloud.google.com/go/iap v1.9.2/go.mod h1:GwDTOs047PPSnwRD0Us5FKf4WDRcVvHg1q9WVkKBhdI= -cloud.google.com/go/iap v1.9.3/go.mod h1:DTdutSZBqkkOm2HEOTBzhZxh2mwwxshfD/h3yofAiCw= cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= cloud.google.com/go/ids v1.4.2/go.mod h1:3vw8DX6YddRu9BncxuzMyWn0g8+ooUjI2gslJ7FH3vk= cloud.google.com/go/ids v1.4.3/go.mod h1:9CXPqI3GedjmkjbMWCUhMZ2P2N7TUMzAkVXYEH2orYU= -cloud.google.com/go/ids v1.4.4/go.mod h1:z+WUc2eEl6S/1aZWzwtVNWoSZslgzPxAboS0lZX0HjI= cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= @@ -625,7 +561,6 @@ cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= cloud.google.com/go/iot v1.7.2/go.mod h1:q+0P5zr1wRFpw7/MOgDXrG/HVA+l+cSwdObffkrpnSg= cloud.google.com/go/iot v1.7.3/go.mod h1:t8itFchkol4VgNbHnIq9lXoOOtHNR3uAACQMYbN9N4I= -cloud.google.com/go/iot v1.7.4/go.mod h1:3TWqDVvsddYBG++nHSZmluoCAVGr1hAcabbWZNKEZLk= cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= @@ -639,7 +574,6 @@ cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N cloud.google.com/go/kms v1.15.2/go.mod h1:3hopT4+7ooWRCjc2DxgnpESFxhIraaI2IpAVUEhbT/w= cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= cloud.google.com/go/kms v1.15.4/go.mod h1:L3Sdj6QTHK8dfwK5D1JLsAyELsNMnd3tAIwGS4ltKpc= -cloud.google.com/go/kms v1.15.5/go.mod h1:cU2H5jnp6G2TDpUGZyqTCoy1n16fbubHZjmVXSMtwDI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= @@ -649,14 +583,12 @@ cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIb cloud.google.com/go/language v1.11.0/go.mod h1:uDx+pFDdAKTY8ehpWbiXyQdz8tDSYLJbQcXsCkjYyvQ= cloud.google.com/go/language v1.11.1/go.mod h1:Xyid9MG9WOX3utvDbpX7j3tXDmmDooMyMDqgUVpH17U= cloud.google.com/go/language v1.12.1/go.mod h1:zQhalE2QlQIxbKIZt54IASBzmZpN/aDASea5zl1l+J4= -cloud.google.com/go/language v1.12.2/go.mod h1:9idWapzr/JKXBBQ4lWqVX/hcadxB194ry20m/bTrhWc= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= cloud.google.com/go/lifesciences v0.9.2/go.mod h1:QHEOO4tDzcSAzeJg7s2qwnLM2ji8IRpQl4p6m5Z9yTA= cloud.google.com/go/lifesciences v0.9.3/go.mod h1:gNGBOJV80IWZdkd+xz4GQj4mbqaz737SCLHn2aRhQKM= -cloud.google.com/go/lifesciences v0.9.4/go.mod h1:bhm64duKhMi7s9jR9WYJYvjAFJwRqNj+Nia7hF0Z7JA= cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= @@ -668,14 +600,12 @@ cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPk cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= cloud.google.com/go/longrunning v0.5.3/go.mod h1:y/0ga59EYu58J6SHmmQOvekvND2qODbu8ywBBW7EK7Y= -cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= cloud.google.com/go/managedidentities v1.6.2/go.mod h1:5c2VG66eCa0WIq6IylRk3TBW83l161zkFvCj28X7jn8= cloud.google.com/go/managedidentities v1.6.3/go.mod h1:tewiat9WLyFN0Fi7q1fDD5+0N4VUoL0SCX0OTCthZq4= -cloud.google.com/go/managedidentities v1.6.4/go.mod h1:WgyaECfHmF00t/1Uk8Oun3CQ2PGUtjc3e9Alh79wyiM= cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= @@ -683,14 +613,12 @@ cloud.google.com/go/maps v1.3.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9v cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= cloud.google.com/go/maps v1.4.1/go.mod h1:BxSa0BnW1g2U2gNdbq5zikLlHUuHW0GFWh7sgML2kIY= cloud.google.com/go/maps v1.5.1/go.mod h1:NPMZw1LJwQZYCfz4y+EIw+SI+24A4bpdFJqdKVr0lt4= -cloud.google.com/go/maps v1.6.1/go.mod h1:4+buOHhYXFBp58Zj/K+Lc1rCmJssxxF4pJ5CJnhdz18= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= cloud.google.com/go/mediatranslation v0.8.2/go.mod h1:c9pUaDRLkgHRx3irYE5ZC8tfXGrMYwNZdmDqKMSfFp8= cloud.google.com/go/mediatranslation v0.8.3/go.mod h1:F9OnXTy336rteOEywtY7FOqCk+J43o2RF638hkOQl4Y= -cloud.google.com/go/mediatranslation v0.8.4/go.mod h1:9WstgtNVAdN53m6TQa5GjIjLqKQPXe74hwSCxUP6nj4= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= @@ -699,7 +627,6 @@ cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQ cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= cloud.google.com/go/memcache v1.10.2/go.mod h1:f9ZzJHLBrmd4BkguIAa/l/Vle6uTHzHokdnzSWOdQ6A= cloud.google.com/go/memcache v1.10.3/go.mod h1:6z89A41MT2DVAW0P4iIRdu5cmRTsbsFn4cyiIx8gbwo= -cloud.google.com/go/memcache v1.10.4/go.mod h1:v/d8PuC8d1gD6Yn5+I3INzLR01IDn0N4Ym56RgikSI0= cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= @@ -710,7 +637,6 @@ cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/Ml cloud.google.com/go/metastore v1.13.0/go.mod h1:URDhpG6XLeh5K+Glq0NOt74OfrPKTwS62gEPZzb5SOk= cloud.google.com/go/metastore v1.13.1/go.mod h1:IbF62JLxuZmhItCppcIfzBBfUFq0DIB9HPDoLgWrVOU= cloud.google.com/go/metastore v1.13.2/go.mod h1:KS59dD+unBji/kFebVp8XU/quNSyo8b6N6tPGspKszA= -cloud.google.com/go/metastore v1.13.3/go.mod h1:K+wdjXdtkdk7AQg4+sXS8bRrQa9gcOr+foOMF2tqINE= cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= @@ -719,7 +645,6 @@ cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3o cloud.google.com/go/monitoring v1.16.0/go.mod h1:Ptp15HgAyM1fNICAojDMoNc/wUmn67mLHQfyqbw+poY= cloud.google.com/go/monitoring v1.16.1/go.mod h1:6HsxddR+3y9j+o/cMJH6q/KJ/CBTvM/38L/1m7bTRJ4= cloud.google.com/go/monitoring v1.16.2/go.mod h1:B44KGwi4ZCF8Rk/5n+FWeispDXoKSk9oss2QNlXJBgc= -cloud.google.com/go/monitoring v1.16.3/go.mod h1:KwSsX5+8PnXv5NJnICZzW2R8pWTis8ypC4zmdRD63Tw= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= @@ -731,7 +656,6 @@ cloud.google.com/go/networkconnectivity v1.13.0/go.mod h1:SAnGPes88pl7QRLUen2Hmc cloud.google.com/go/networkconnectivity v1.14.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= cloud.google.com/go/networkconnectivity v1.14.1/go.mod h1:LyGPXR742uQcDxZ/wv4EI0Vu5N6NKJ77ZYVnDe69Zug= cloud.google.com/go/networkconnectivity v1.14.2/go.mod h1:5UFlwIisZylSkGG1AdwK/WZUaoz12PKu6wODwIbFzJo= -cloud.google.com/go/networkconnectivity v1.14.3/go.mod h1:4aoeFdrJpYEXNvrnfyD5kIzs8YtHg945Og4koAjHQek= cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= @@ -739,7 +663,6 @@ cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vD cloud.google.com/go/networkmanagement v1.9.0/go.mod h1:UTUaEU9YwbCAhhz3jEOHr+2/K/MrBk2XxOLS89LQzFw= cloud.google.com/go/networkmanagement v1.9.1/go.mod h1:CCSYgrQQvW73EJawO2QamemYcOb57LvrDdDU51F0mcI= cloud.google.com/go/networkmanagement v1.9.2/go.mod h1:iDGvGzAoYRghhp4j2Cji7sF899GnfGQcQRQwgVOWnDw= -cloud.google.com/go/networkmanagement v1.9.3/go.mod h1:y7WMO1bRLaP5h3Obm4tey+NquUvB93Co1oh4wpL+XcU= cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= @@ -747,7 +670,6 @@ cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8Ic cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= cloud.google.com/go/networksecurity v0.9.2/go.mod h1:jG0SeAttWzPMUILEHDUvFYdQTl8L/E/KC8iZDj85lEI= cloud.google.com/go/networksecurity v0.9.3/go.mod h1:l+C0ynM6P+KV9YjOnx+kk5IZqMSLccdBqW6GUoF4p/0= -cloud.google.com/go/networksecurity v0.9.4/go.mod h1:E9CeMZ2zDsNBkr8axKSYm8XyTqNhiCHf1JO/Vb8mD1w= cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= @@ -758,7 +680,6 @@ cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPc cloud.google.com/go/notebooks v1.10.0/go.mod h1:SOPYMZnttHxqot0SGSFSkRrwE29eqnKPBJFqgWmiK2k= cloud.google.com/go/notebooks v1.10.1/go.mod h1:5PdJc2SgAybE76kFQCWrTfJolCOUQXF97e+gteUUA6A= cloud.google.com/go/notebooks v1.11.1/go.mod h1:V2Zkv8wX9kDCGRJqYoI+bQAaoVeE5kSiz4yYHd2yJwQ= -cloud.google.com/go/notebooks v1.11.2/go.mod h1:z0tlHI/lREXC8BS2mIsUeR3agM1AkgLiS+Isov3SS70= cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= @@ -766,14 +687,12 @@ cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN cloud.google.com/go/optimization v1.5.0/go.mod h1:evo1OvTxeBRBu6ydPlrIRizKY/LJKo/drDMMRKqGEUU= cloud.google.com/go/optimization v1.5.1/go.mod h1:NC0gnUD5MWVAF7XLdoYVPmYYVth93Q6BUzqAq3ZwtV8= cloud.google.com/go/optimization v1.6.1/go.mod h1:hH2RYPTTM9e9zOiTaYPTiGPcGdNZVnBSBxjIAJzUkqo= -cloud.google.com/go/optimization v1.6.2/go.mod h1:mWNZ7B9/EyMCcwNl1frUGEuY6CPijSkz88Fz2vwKPOY= cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= cloud.google.com/go/orchestration v1.8.2/go.mod h1:T1cP+6WyTmh6LSZzeUhvGf0uZVmJyTx7t8z7Vg87+A0= cloud.google.com/go/orchestration v1.8.3/go.mod h1:xhgWAYqlbYjlz2ftbFghdyqENYW+JXuhBx9KsjMoGHs= -cloud.google.com/go/orchestration v1.8.4/go.mod h1:d0lywZSVYtIoSZXb0iFjv9SaL13PGyVOKDxqGxEf/qI= cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= @@ -781,7 +700,6 @@ cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1 cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= cloud.google.com/go/orgpolicy v1.11.2/go.mod h1:biRDpNwfyytYnmCRWZWxrKF22Nkz9eNVj9zyaBdpm1o= cloud.google.com/go/orgpolicy v1.11.3/go.mod h1:oKAtJ/gkMjum5icv2aujkP4CxROxPXsBbYGCDbPO8MM= -cloud.google.com/go/orgpolicy v1.11.4/go.mod h1:0+aNV/nrfoTQ4Mytv+Aw+stBDBjNf4d8fYRA9herfJI= cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= @@ -791,7 +709,6 @@ cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjw cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= cloud.google.com/go/osconfig v1.12.2/go.mod h1:eh9GPaMZpI6mEJEuhEjUJmaxvQ3gav+fFEJon1Y8Iw0= cloud.google.com/go/osconfig v1.12.3/go.mod h1:L/fPS8LL6bEYUi1au832WtMnPeQNT94Zo3FwwV1/xGM= -cloud.google.com/go/osconfig v1.12.4/go.mod h1:B1qEwJ/jzqSRslvdOCI8Kdnp0gSng0xW4LOnIebQomA= cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= @@ -801,14 +718,12 @@ cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4s cloud.google.com/go/oslogin v1.11.0/go.mod h1:8GMTJs4X2nOAUVJiPGqIWVcDaF0eniEto3xlOxaboXE= cloud.google.com/go/oslogin v1.11.1/go.mod h1:OhD2icArCVNUxKqtK0mcSmKL7lgr0LVlQz+v9s1ujTg= cloud.google.com/go/oslogin v1.12.1/go.mod h1:VfwTeFJGbnakxAY236eN8fsnglLiVXndlbcNomY4iZU= -cloud.google.com/go/oslogin v1.12.2/go.mod h1:CQ3V8Jvw4Qo4WRhNPF0o+HAM4DiLuE27Ul9CX9g2QdY= cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= cloud.google.com/go/phishingprotection v0.8.2/go.mod h1:LhJ91uyVHEYKSKcMGhOa14zMMWfbEdxG032oT6ECbC8= cloud.google.com/go/phishingprotection v0.8.3/go.mod h1:3B01yO7T2Ra/TMojifn8EoGd4G9jts/6cIO0DgDY9J8= -cloud.google.com/go/phishingprotection v0.8.4/go.mod h1:6b3kNPAc2AQ6jZfFHioZKg9MQNybDg4ixFd4RPZZ2nE= cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= @@ -818,7 +733,6 @@ cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcV cloud.google.com/go/policytroubleshooter v1.9.0/go.mod h1:+E2Lga7TycpeSTj2FsH4oXxTnrbHJGRlKhVZBLGgU64= cloud.google.com/go/policytroubleshooter v1.9.1/go.mod h1:MYI8i0bCrL8cW+VHN1PoiBTyNZTstCg2WUw2eVC4c4U= cloud.google.com/go/policytroubleshooter v1.10.1/go.mod h1:5C0rhT3TDZVxAu8813bwmTvd57Phbl8mr9F4ipOsxEs= -cloud.google.com/go/policytroubleshooter v1.10.2/go.mod h1:m4uF3f6LseVEnMV6nknlN2vYGRb+75ylQwJdnOXfnv0= cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= @@ -826,7 +740,6 @@ cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPi cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= cloud.google.com/go/privatecatalog v0.9.2/go.mod h1:RMA4ATa8IXfzvjrhhK8J6H4wwcztab+oZph3c6WmtFc= cloud.google.com/go/privatecatalog v0.9.3/go.mod h1:K5pn2GrVmOPjXz3T26mzwXLcKivfIJ9R5N79AFCF9UE= -cloud.google.com/go/privatecatalog v0.9.4/go.mod h1:SOjm93f+5hp/U3PqMZAHTtBtluqLygrDrVO8X8tYtG0= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -853,15 +766,12 @@ cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkse cloud.google.com/go/recaptchaenterprise/v2 v2.8.0/go.mod h1:QuE8EdU9dEnesG8/kG3XuJyNsjEqMlMzg3v3scCJ46c= cloud.google.com/go/recaptchaenterprise/v2 v2.8.1/go.mod h1:JZYZJOeZjgSSTGP4uz7NlQ4/d1w5hGmksVgM0lbEij0= cloud.google.com/go/recaptchaenterprise/v2 v2.8.2/go.mod h1:kpaDBOpkwD4G0GVMzG1W6Doy1tFFC97XAV3xy+Rd/pw= -cloud.google.com/go/recaptchaenterprise/v2 v2.8.3/go.mod h1:Dak54rw6lC2gBY8FBznpOCAR58wKf+R+ZSJRoeJok4w= -cloud.google.com/go/recaptchaenterprise/v2 v2.8.4/go.mod h1:Dak54rw6lC2gBY8FBznpOCAR58wKf+R+ZSJRoeJok4w= cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= cloud.google.com/go/recommendationengine v0.8.2/go.mod h1:QIybYHPK58qir9CV2ix/re/M//Ty10OxjnnhWdaKS1Y= cloud.google.com/go/recommendationengine v0.8.3/go.mod h1:m3b0RZV02BnODE9FeSvGv1qibFo8g0OnmB/RMwYy4V8= -cloud.google.com/go/recommendationengine v0.8.4/go.mod h1:GEteCf1PATl5v5ZsQ60sTClUE0phbWmo3rQ1Js8louU= cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= @@ -871,7 +781,6 @@ cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA cloud.google.com/go/recommender v1.11.0/go.mod h1:kPiRQhPyTJ9kyXPCG6u/dlPLbYfFlkwHNRwdzPVAoII= cloud.google.com/go/recommender v1.11.1/go.mod h1:sGwFFAyI57v2Hc5LbIj+lTwXipGu9NW015rkaEM5B18= cloud.google.com/go/recommender v1.11.2/go.mod h1:AeoJuzOvFR/emIcXdVFkspVXVTYpliRCmKNYDnyBv6Y= -cloud.google.com/go/recommender v1.11.3/go.mod h1:+FJosKKJSId1MBFeJ/TTyoGQZiEelQQIZMKYYD8ruK4= cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= @@ -880,7 +789,6 @@ cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0 cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= cloud.google.com/go/redis v1.13.2/go.mod h1:0Hg7pCMXS9uz02q+LoEVl5dNHUkIQv+C/3L76fandSA= cloud.google.com/go/redis v1.13.3/go.mod h1:vbUpCKUAZSYzFcWKmICnYgRAhTFg9r+djWqFxDYXi4U= -cloud.google.com/go/redis v1.14.1/go.mod h1:MbmBxN8bEnQI4doZPC1BzADU4HGocHBk2de3SbgOkqs= cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= @@ -889,14 +797,12 @@ cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95 cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= cloud.google.com/go/resourcemanager v1.9.2/go.mod h1:OujkBg1UZg5lX2yIyMo5Vz9O5hf7XQOSV7WxqxxMtQE= cloud.google.com/go/resourcemanager v1.9.3/go.mod h1:IqrY+g0ZgLsihcfcmqSe+RKp1hzjXwG904B92AwBz6U= -cloud.google.com/go/resourcemanager v1.9.4/go.mod h1:N1dhP9RFvo3lUfwtfLWVxfUWq8+KUQ+XLlHLH3BoFJ0= cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= cloud.google.com/go/resourcesettings v1.6.2/go.mod h1:mJIEDd9MobzunWMeniaMp6tzg4I2GvD3TTmPkc8vBXk= cloud.google.com/go/resourcesettings v1.6.3/go.mod h1:pno5D+7oDYkMWZ5BpPsb4SO0ewg3IXcmmrUZaMJrFic= -cloud.google.com/go/resourcesettings v1.6.4/go.mod h1:pYTTkWdv2lmQcjsthbZLNBP4QW140cs7wqA3DuqErVI= cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= @@ -905,7 +811,6 @@ cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQk cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= cloud.google.com/go/retail v1.14.2/go.mod h1:W7rrNRChAEChX336QF7bnMxbsjugcOCPU44i5kbLiL8= cloud.google.com/go/retail v1.14.3/go.mod h1:Omz2akDHeSlfCq8ArPKiBxlnRpKEBjUH386JYFLUvXo= -cloud.google.com/go/retail v1.14.4/go.mod h1:l/N7cMtY78yRnJqp5JW8emy7MB1nz8E4t2yfOmklYfg= cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= @@ -914,7 +819,6 @@ cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3 cloud.google.com/go/run v1.3.0/go.mod h1:S/osX/4jIPZGg+ssuqh6GNgg7syixKe3YnprwehzHKU= cloud.google.com/go/run v1.3.1/go.mod h1:cymddtZOzdwLIAsmS6s+Asl4JoXIDm/K1cpZTxV4Q5s= cloud.google.com/go/run v1.3.2/go.mod h1:SIhmqArbjdU/D9M6JoHaAqnAMKLFtXaVdNeq04NjnVE= -cloud.google.com/go/run v1.3.3/go.mod h1:WSM5pGyJ7cfYyYbONVQBN4buz42zFqwG67Q3ch07iK4= cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= @@ -924,8 +828,6 @@ cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcb cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= cloud.google.com/go/scheduler v1.10.2/go.mod h1:O3jX6HRH5eKCA3FutMw375XHZJudNIKVonSCHv7ropY= cloud.google.com/go/scheduler v1.10.3/go.mod h1:8ANskEM33+sIbpJ+R4xRfw/jzOG+ZFE8WVLy7/yGvbc= -cloud.google.com/go/scheduler v1.10.4/go.mod h1:MTuXcrJC9tqOHhixdbHDFSIuh7xZF2IysiINDuiq6NI= -cloud.google.com/go/scheduler v1.10.5/go.mod h1:MTuXcrJC9tqOHhixdbHDFSIuh7xZF2IysiINDuiq6NI= cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= @@ -933,7 +835,6 @@ cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hb cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= cloud.google.com/go/secretmanager v1.11.2/go.mod h1:MQm4t3deoSub7+WNwiC4/tRYgDBHJgJPvswqQVB1Vss= cloud.google.com/go/secretmanager v1.11.3/go.mod h1:0bA2o6FabmShrEy328i67aV+65XoUFFSmVeLBn/51jI= -cloud.google.com/go/secretmanager v1.11.4/go.mod h1:wreJlbS9Zdq21lMzWmJ0XhWW2ZxgPeahsqeV/vZoJ3w= cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= @@ -944,7 +845,6 @@ cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKV cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= cloud.google.com/go/security v1.15.2/go.mod h1:2GVE/v1oixIRHDaClVbHuPcZwAqFM28mXuAKCfMgYIg= cloud.google.com/go/security v1.15.3/go.mod h1:gQ/7Q2JYUZZgOzqKtw9McShH+MjNvtDpL40J1cT+vBs= -cloud.google.com/go/security v1.15.4/go.mod h1:oN7C2uIZKhxCLiAAijKUCuHLZbIt/ghYEo8MqwD/Ty4= cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= @@ -954,7 +854,6 @@ cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= cloud.google.com/go/securitycenter v1.23.1/go.mod h1:w2HV3Mv/yKhbXKwOCu2i8bCuLtNP1IMHuiYQn4HJq5s= cloud.google.com/go/securitycenter v1.24.1/go.mod h1:3h9IdjjHhVMXdQnmqzVnM7b0wMn/1O/U20eWVpMpZjI= -cloud.google.com/go/securitycenter v1.24.2/go.mod h1:l1XejOngggzqwr4Fa2Cn+iWZGf+aBLTXtB/vXjy5vXM= cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= @@ -970,7 +869,6 @@ cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6 cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= cloud.google.com/go/servicedirectory v1.11.1/go.mod h1:tJywXimEWzNzw9FvtNjsQxxJ3/41jseeILgwU/QLrGI= cloud.google.com/go/servicedirectory v1.11.2/go.mod h1:KD9hCLhncWRV5jJphwIpugKwM5bn1x0GyVVD4NO8mGg= -cloud.google.com/go/servicedirectory v1.11.3/go.mod h1:LV+cHkomRLr67YoQy3Xq2tUXBGOs5z5bPofdq7qtiAw= cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= @@ -985,7 +883,6 @@ cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+ cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= cloud.google.com/go/shell v1.7.2/go.mod h1:KqRPKwBV0UyLickMn0+BY1qIyE98kKyI216sH/TuHmc= cloud.google.com/go/shell v1.7.3/go.mod h1:cTTEz/JdaBsQAeTQ3B6HHldZudFoYBOqjteev07FbIc= -cloud.google.com/go/shell v1.7.4/go.mod h1:yLeXB8eKLxw0dpEmXQ/FjriYrBijNsONpwnWsdPqlKM= cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= @@ -993,7 +890,6 @@ cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSq cloud.google.com/go/spanner v1.49.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= cloud.google.com/go/spanner v1.50.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= cloud.google.com/go/spanner v1.51.0/go.mod h1:c5KNo5LQ1X5tJwma9rSQZsXNBDNvj4/n8BVc3LNahq0= -cloud.google.com/go/spanner v1.53.0/go.mod h1:liG4iCeLqm5L3fFLU5whFITqP0e0orsAW1uUSrd4rws= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= @@ -1004,8 +900,6 @@ cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= cloud.google.com/go/speech v1.19.1/go.mod h1:WcuaWz/3hOlzPFOVo9DUsblMIHwxP589y6ZMtaG+iAA= cloud.google.com/go/speech v1.19.2/go.mod h1:2OYFfj+Ch5LWjsaSINuCZsre/789zlcCI3SY4oAi2oI= -cloud.google.com/go/speech v1.20.1/go.mod h1:wwolycgONvfz2EDU8rKuHRW3+wc9ILPsAWoikBEWavY= -cloud.google.com/go/speech v1.21.0/go.mod h1:wwolycgONvfz2EDU8rKuHRW3+wc9ILPsAWoikBEWavY= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -1025,7 +919,6 @@ cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7 cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= cloud.google.com/go/storagetransfer v1.10.1/go.mod h1:rS7Sy0BtPviWYTTJVWCSV4QrbBitgPeuK4/FKa4IdLs= cloud.google.com/go/storagetransfer v1.10.2/go.mod h1:meIhYQup5rg9juQJdyppnA/WLQCOguxtk1pr3/vBWzA= -cloud.google.com/go/storagetransfer v1.10.3/go.mod h1:Up8LY2p6X68SZ+WToswpQbQHnJpOty/ACcMafuey8gc= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= @@ -1034,21 +927,18 @@ cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQ cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= cloud.google.com/go/talent v1.6.3/go.mod h1:xoDO97Qd4AK43rGjJvyBHMskiEf3KulgYzcH6YWOVoo= cloud.google.com/go/talent v1.6.4/go.mod h1:QsWvi5eKeh6gG2DlBkpMaFYZYrYUnIpo34f6/V5QykY= -cloud.google.com/go/talent v1.6.5/go.mod h1:Mf5cma696HmE+P2BWJ/ZwYqeJXEeU0UqjHFXVLadEDI= cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= cloud.google.com/go/texttospeech v1.7.2/go.mod h1:VYPT6aTOEl3herQjFHYErTlSZJ4vB00Q2ZTmuVgluD4= cloud.google.com/go/texttospeech v1.7.3/go.mod h1:Av/zpkcgWfXlDLRYob17lqMstGZ3GqlvJXqKMp2u8so= -cloud.google.com/go/texttospeech v1.7.4/go.mod h1:vgv0002WvR4liGuSd5BJbWy4nDn5Ozco0uJymY5+U74= cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= cloud.google.com/go/tpu v1.6.2/go.mod h1:NXh3NDwt71TsPZdtGWgAG5ThDfGd32X1mJ2cMaRlVgU= cloud.google.com/go/tpu v1.6.3/go.mod h1:lxiueqfVMlSToZY1151IaZqp89ELPSrk+3HIQ5HRkbY= -cloud.google.com/go/tpu v1.6.4/go.mod h1:NAm9q3Rq2wIlGnOhpYICNI7+bpBebMJbh0yyp3aNw1Y= cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= @@ -1056,7 +946,6 @@ cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= cloud.google.com/go/trace v1.10.2/go.mod h1:NPXemMi6MToRFcSxRl2uDnu/qAlAQ3oULUphcHGh1vA= cloud.google.com/go/trace v1.10.3/go.mod h1:Ke1bgfc73RV3wUFml+uQp7EsDw4dGaETLxB7Iq/r4CY= -cloud.google.com/go/trace v1.10.4/go.mod h1:Nso99EDIK8Mj5/zmB+iGr9dosS/bzWCJ8wGmE6TXNWY= cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= @@ -1067,7 +956,6 @@ cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNW cloud.google.com/go/translate v1.9.0/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= cloud.google.com/go/translate v1.9.1/go.mod h1:TWIgDZknq2+JD4iRcojgeDtqGEp154HN/uL6hMvylS8= cloud.google.com/go/translate v1.9.2/go.mod h1:E3Tc6rUTsQkVrXW6avbUhKJSr7ZE3j7zNmqzXKHqRrY= -cloud.google.com/go/translate v1.9.3/go.mod h1:Kbq9RggWsbqZ9W5YpM94Q1Xv4dshw/gr/SHfsl5yCZ0= cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= @@ -1079,7 +967,6 @@ cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM cloud.google.com/go/video v1.20.0/go.mod h1:U3G3FTnsvAGqglq9LxgqzOiBc/Nt8zis8S+850N2DUM= cloud.google.com/go/video v1.20.1/go.mod h1:3gJS+iDprnj8SY6pe0SwLeC5BUW80NjhwX7INWEuWGU= cloud.google.com/go/video v1.20.2/go.mod h1:lrixr5JeKNThsgfM9gqtwb6Okuqzfo4VrY2xynaViTA= -cloud.google.com/go/video v1.20.3/go.mod h1:TnH/mNZKVHeNtpamsSPygSR0iHtvrR/cW1/GDjN5+GU= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= @@ -1088,7 +975,6 @@ cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQu cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= cloud.google.com/go/videointelligence v1.11.2/go.mod h1:ocfIGYtIVmIcWk1DsSGOoDiXca4vaZQII1C85qtoplc= cloud.google.com/go/videointelligence v1.11.3/go.mod h1:tf0NUaGTjU1iS2KEkGWvO5hRHeCkFK3nPo0/cOZhZAo= -cloud.google.com/go/videointelligence v1.11.4/go.mod h1:kPBMAYsTPFiQxMLmmjpcZUMklJp3nC9+ipJJtprccD8= cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= @@ -1099,7 +985,6 @@ cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= cloud.google.com/go/vision/v2 v2.7.3/go.mod h1:V0IcLCY7W+hpMKXK1JYE0LV5llEqVmj+UJChjvA1WsM= cloud.google.com/go/vision/v2 v2.7.4/go.mod h1:ynDKnsDN/0RtqkKxQZ2iatv3Dm9O+HfRb5djl7l4Vvw= -cloud.google.com/go/vision/v2 v2.7.5/go.mod h1:GcviprJLFfK9OLf0z8Gm6lQb6ZFUulvpZws+mm6yPLM= cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= @@ -1107,7 +992,6 @@ cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54 cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= cloud.google.com/go/vmmigration v1.7.2/go.mod h1:iA2hVj22sm2LLYXGPT1pB63mXHhrH1m/ruux9TwWLd8= cloud.google.com/go/vmmigration v1.7.3/go.mod h1:ZCQC7cENwmSWlwyTrZcWivchn78YnFniEQYRWQ65tBo= -cloud.google.com/go/vmmigration v1.7.4/go.mod h1:yBXCmiLaB99hEl/G9ZooNx2GyzgsjKnw5fWcINRgD70= cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= @@ -1115,14 +999,12 @@ cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkG cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= cloud.google.com/go/vmwareengine v1.0.1/go.mod h1:aT3Xsm5sNx0QShk1Jc1B8OddrxAScYLwzVoaiXfdzzk= cloud.google.com/go/vmwareengine v1.0.2/go.mod h1:xMSNjIk8/itYrz1JA8nV3Ajg4L4n3N+ugP8JKzk3OaA= -cloud.google.com/go/vmwareengine v1.0.3/go.mod h1:QSpdZ1stlbfKtyt6Iu19M6XRxjmXO+vb5a/R6Fvy2y4= cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= cloud.google.com/go/vpcaccess v1.7.2/go.mod h1:mmg/MnRHv+3e8FJUjeSibVFvQF1cCy2MsFaFqxeY1HU= cloud.google.com/go/vpcaccess v1.7.3/go.mod h1:YX4skyfW3NC8vI3Fk+EegJnlYFatA+dXK4o236EUCUc= -cloud.google.com/go/vpcaccess v1.7.4/go.mod h1:lA0KTvhtEOb/VOdnH/gwPuOzGgM+CWsmGu6bb4IoMKk= cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= @@ -1131,14 +1013,12 @@ cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72 cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= cloud.google.com/go/webrisk v1.9.2/go.mod h1:pY9kfDgAqxUpDBOrG4w8deLfhvJmejKB0qd/5uQIPBc= cloud.google.com/go/webrisk v1.9.3/go.mod h1:RUYXe9X/wBDXhVilss7EDLW9ZNa06aowPuinUOPCXH8= -cloud.google.com/go/webrisk v1.9.4/go.mod h1:w7m4Ib4C+OseSr2GL66m0zMBywdrVNTDKsdEsfMl7X0= cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= cloud.google.com/go/websecurityscanner v1.6.2/go.mod h1:7YgjuU5tun7Eg2kpKgGnDuEOXWIrh8x8lWrJT4zfmas= cloud.google.com/go/websecurityscanner v1.6.3/go.mod h1:x9XANObUFR+83Cya3g/B9M/yoHVqzxPnFtgF8yYGAXw= -cloud.google.com/go/websecurityscanner v1.6.4/go.mod h1:mUiyMQ+dGpPPRkHgknIZeCzSHJ45+fY4F52nZFDHm2o= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= @@ -1148,7 +1028,6 @@ cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvo cloud.google.com/go/workflows v1.12.0/go.mod h1:PYhSk2b6DhZ508tj8HXKaBh+OFe+xdl0dHF/tJdzPQM= cloud.google.com/go/workflows v1.12.1/go.mod h1:5A95OhD/edtOhQd/O741NSfIMezNTbCwLM1P1tBRGHM= cloud.google.com/go/workflows v1.12.2/go.mod h1:+OmBIgNqYJPVggnMo9nqmizW0qEXHhmnAzK/CnBqsHc= -cloud.google.com/go/workflows v1.12.3/go.mod h1:fmOUeeqEwPzIU81foMjTRQIdwQHADi/vEr1cx9R1m5g= code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= @@ -1166,14 +1045,8 @@ github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= -github.com/alecthomas/kingpin/v2 v2.3.1/go.mod h1:oYL5vtsvEHZGHxU7DMp32Dvx+qL+ptGn6lWaot2vCNE= -github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= @@ -1200,23 +1073,18 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -1242,17 +1110,12 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/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/creack/pty v1.1.20 h1:VIPb/a2s17qNeQgDnkfZC35RScx+blkKF8GV68n80J4= github.com/creack/pty v1.1.20/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1 h1:mbMd//7aY7CL51mT/YZ5DJ4yZYA/E4ZKVSgCh5yN7yU= @@ -1317,18 +1180,13 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -1349,7 +1207,6 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= @@ -1390,15 +1247,15 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -1420,7 +1277,6 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= -github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -1459,7 +1315,6 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5 github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -1489,7 +1344,6 @@ github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c/go.mod h1 github.com/graphql-go/graphql v0.8.1 h1:p7/Ou/WpmulocJeEx7wjQy611rtXGQaAcXGqanuMMgc= github.com/graphql-go/graphql v0.8.1/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= @@ -1499,7 +1353,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk= github.com/gxed/GoEndian v0.0.0-20160916112711-0f5c6873267e h1:eIhARPSF2zPr1hKxiL81XWQ392f5stEEcs38UzZVSWo= @@ -1535,7 +1388,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= 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.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 h1:vilfsDSy7TDxedi9gyBkMvAirat/oRcL0lFdJBf6tdM= @@ -1548,13 +1400,9 @@ github.com/jbenet/go-reuseport v0.0.0-20180416043609-15a1cd37f050 h1:bfBi3IYMggK github.com/jbenet/go-reuseport v0.0.0-20180416043609-15a1cd37f050/go.mod h1:hry/Nwg2mFor95Ql+X52uC4zdrZsdH8a0noOj8BLt9g= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -1562,7 +1410,6 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= 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= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= @@ -1581,7 +1428,6 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/pgzip v1.2.1 h1:oIPZROsWuPHpOdMVWLuJZXwgjhrW8r1yEX8UqMyeNHM= github.com/klauspost/pgzip v1.2.1/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -1623,8 +1469,6 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= @@ -1650,12 +1494,10 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 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/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/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nwaples/rardecode v1.0.0 h1:r7vGuS5akxOnR4JQSkko62RJ1ReCMXxQRPtxsiFMBOs= github.com/nwaples/rardecode v1.0.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -1690,13 +1532,6 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1705,29 +1540,14 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= @@ -1745,7 +1565,6 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= @@ -1765,11 +1584,8 @@ github.com/sensu/sensu-go/types v0.13.0 h1:Cu1yLciXXakckkiv6u+VuNxPkVWQslaZogOVp github.com/sensu/sensu-go/types v0.13.0/go.mod h1:Xb1E+aKOtebJ85CjyQCagxlV9lJzGrK6PfPqHj/z6z0= github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= @@ -1788,7 +1604,6 @@ github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= @@ -1824,7 +1639,6 @@ github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7Am github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= @@ -1832,8 +1646,6 @@ github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/willf/pad v0.0.0-20160331131008-b3d780601022 h1:W5wMm7sF44Z3K9bpq+CHOMOipvLHN1ElD6nyQbbiy/0= github.com/willf/pad v0.0.0-20160331131008-b3d780601022/go.mod h1:+pVHwmjc9CH7ugBFxESIwQkXkVj0gUj4cFp63TLwP1Y= -github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= -github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= @@ -1851,23 +1663,23 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= -go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= -go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= -go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= -go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= -go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= -go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= -go.etcd.io/etcd/pkg/v3 v3.5.10 h1:WPR8K0e9kWl1gAhB5A7gEa5ZBTNkT9NdNWrR8Qpo1CM= -go.etcd.io/etcd/pkg/v3 v3.5.10/go.mod h1:TKTuCKKcF1zxmfKWDkfz5qqYaE3JncKKZPFf8c1nFUs= -go.etcd.io/etcd/raft/v3 v3.5.10 h1:cgNAYe7xrsrn/5kXMSaH8kM/Ky8mAdMqGOxyYwpP0LA= -go.etcd.io/etcd/raft/v3 v3.5.10/go.mod h1:odD6kr8XQXTy9oQnyMPBOr0TVe+gT0neQhElQ6jbGRc= -go.etcd.io/etcd/server/v3 v3.5.10 h1:4NOGyOwD5sUZ22PiWYKmfxqoeh72z6EhYjNosKGLmZg= -go.etcd.io/etcd/server/v3 v3.5.10/go.mod h1:gBplPHfs6YI0L+RpGkTQO7buDbHv5HJGG/Bst0/zIPo= -go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= +go.etcd.io/etcd/api/v3 v3.5.15 h1:3KpLJir1ZEBrYuV2v+Twaa/e2MdDCEZ/70H+lzEiwsk= +go.etcd.io/etcd/api/v3 v3.5.15/go.mod h1:N9EhGzXq58WuMllgH9ZvnEr7SI9pS0k0+DHZezGp7jM= +go.etcd.io/etcd/client/pkg/v3 v3.5.15 h1:fo0HpWz/KlHGMCC+YejpiCmyWDEuIpnTDzpJLB5fWlA= +go.etcd.io/etcd/client/pkg/v3 v3.5.15/go.mod h1:mXDI4NAOwEiszrHCb0aqfAYNCrZP4e9hRca3d1YK8EU= +go.etcd.io/etcd/client/v2 v2.305.15 h1:VG2xbf8Vz1KJh65Ar2V5eDmfkp1bpzkSEHlhJM3usp8= +go.etcd.io/etcd/client/v2 v2.305.15/go.mod h1:Ad5dRjPVb/n5yXgAWQ/hXzuXXkBk0Y658ocuXYaUU48= +go.etcd.io/etcd/client/v3 v3.5.15 h1:23M0eY4Fd/inNv1ZfU3AxrbbOdW79r9V9Rl62Nm6ip4= +go.etcd.io/etcd/client/v3 v3.5.15/go.mod h1:CLSJxrYjvLtHsrPKsy7LmZEE+DK2ktfd2bN4RhBMwlU= +go.etcd.io/etcd/pkg/v3 v3.5.15 h1:/Iu6Sr3iYaAjy++8sIDoZW9/EfhcwLZwd4FOZX2mMOU= +go.etcd.io/etcd/pkg/v3 v3.5.15/go.mod h1:e3Acf298sPFmTCGTrnGvkClEw9RYIyPtNzi1XM8rets= +go.etcd.io/etcd/raft/v3 v3.5.15 h1:jOA2HJF7zb3wy8H/pL13e8geWqkEa/kUs0waUggZC0I= +go.etcd.io/etcd/raft/v3 v3.5.15/go.mod h1:k3r7P4seEiUcgxOPLp+mloJWV3Q4QLPGNvy/OgC8OtM= +go.etcd.io/etcd/server/v3 v3.5.15 h1:x35jrWnZgsRwMsFsUJIUdT1bvzIz1B+29HjMfRYVN/E= +go.etcd.io/etcd/server/v3 v3.5.15/go.mod h1:l9jX9oa/iuArjqz0RNX/TDbc70dLXxRZo/nmPucrpFo= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -1876,28 +1688,21 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0/go.mod h1:E5NNboN0UqSAki0Atn9kVwaN7I+l25gGxDqBueo/74E= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 h1:RsQi0qJ2imFfCvZabqzM9cNXBG8k6gXMv1A0cXRmH6A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM= -go.opentelemetry.io/otel v1.0.1/go.mod h1:OPEOD4jIT2SlZPMmwT6FqZz2C0ZNdQqiWcoK6M0SNFU= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1/go.mod h1:Kv8liBeVNFkkkbilbgWRpV+wWuu+H5xdOT6HAgd30iw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1/go.mod h1:xOvWoTOrQjxjW61xtOmD/WKGRYb/P4NzRo3bs65U6Rk= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.0.1/go.mod h1:HrdXne+BiwsOHYYkBE5ysIcv2bvdZstxzmCQhxTcZkI= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= -go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x7ZTuYBr3sUk= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= +go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= +go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= @@ -1908,19 +1713,16 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= @@ -1943,10 +1745,9 @@ golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0 golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2021,7 +1822,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -2050,7 +1850,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -2079,11 +1878,9 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2116,9 +1913,8 @@ golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4 golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= -golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2137,7 +1933,8 @@ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2161,7 +1958,6 @@ golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2175,8 +1971,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2185,7 +1979,6 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2193,12 +1986,10 @@ golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2213,7 +2004,6 @@ golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2241,10 +2031,9 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2259,10 +2048,9 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2288,7 +2076,6 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= @@ -2447,7 +2234,6 @@ google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvy google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= google.golang.org/api v0.139.0/go.mod h1:CVagp6Eekz9CjGZ718Z+sloknzkDJE7Vc1Ckj9+viBk= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2607,7 +2393,6 @@ google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqv google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f h1:Vn+VyHU5guc9KjB5KrjI2q0wCOWEOIh0OEsleqakHJg= google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f/go.mod h1:nWSwAFPb+qfNJXsoeO3Io7zf4tMSfN8EA8RlDA04GhY= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= @@ -2626,12 +2411,10 @@ google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go. google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405/go.mod h1:oT32Z4o8Zv2xPQTg0pbVaPr0MPOH6f14RgXt7zfIpwg= -google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY= google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20231030173426-d783a09b4405/go.mod h1:GRUCuLdzVqZte8+Dl/D4N25yLzcGqqWaYkeVOwulFqw= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= @@ -2648,7 +2431,6 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -2677,7 +2459,6 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= @@ -2697,7 +2478,6 @@ google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGO google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= @@ -2720,12 +2500,12 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -2734,7 +2514,6 @@ gopkg.in/h2non/filetype.v1 v1.0.3 h1:EhZ9p3H8eDdFHiKljxJ59EeQ9Pu88wrgY7/B1WRK/VE gopkg.in/h2non/filetype.v1 v1.0.3/go.mod h1:M0yem4rwSX5lLVrkEuRRp2/NinFMD5vgJ4DlAhZcfNo= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/readline.v1 v1.0.0-20160726135117-62c6fe619375/go.mod h1:lNEQeAhU009zbRxng+XOj5ITVgY24WcbNnQopyfKoYQ= @@ -2747,9 +2526,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 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/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= @@ -2819,6 +2596,5 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= From d6021a04ca6dc531cc34b80305eaa70da938f1f1 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Mon, 28 Oct 2024 12:34:02 +0530 Subject: [PATCH 168/173] etcd version update to 3.5.15 Signed-off-by: manisha kumari --- backend/etcd/etcd.go | 1 - go.mod | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/etcd/etcd.go b/backend/etcd/etcd.go index 0658780396..694d2b198d 100644 --- a/backend/etcd/etcd.go +++ b/backend/etcd/etcd.go @@ -374,7 +374,6 @@ func (e *Etcd) NewEmbeddedClientWithContext(ctx context.Context) *clientv3.Clien lc := adapter.LeaseServerToLeaseClient(v3rpc.NewQuotaLeaseServer(e.etcd.Server)) c.Lease = clientv3.NewLeaseFromLeaseClient(lc, c, time.Second) -:: wc := adapter.WatchServerToWatchClient(v3rpc.NewWatchServer(e.etcd.Server)) c.Watcher = &watchWrapper{clientv3.NewWatchFromWatchClient(wc, c)} diff --git a/go.mod b/go.mod index c57bdb9ebd..74a5d74636 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/sensu/sensu-go -go 1.22 +go 1.21.11 require ( github.com/AlecAivazis/survey/v2 v2.2.14 From a48268a0e5507cae6b54461bb7afb7ad39ac3052 Mon Sep 17 00:00:00 2001 From: Rajshekar Date: Fri, 15 Nov 2024 11:42:00 +0530 Subject: [PATCH 169/173] Change log update (#5069) * change log & CI version update Signed-off-by: Rajshekar Chavakula --- .circleci/config.yml | 2 +- CHANGELOG-6.md | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 12b3ffff4d..e0405c4d33 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ orbs: parameters: go_version: type: string - default: "1.21.3" + default: "1.21.11" sensu_go_build_env: &sensu_go_build_env docker: diff --git a/CHANGELOG-6.md b/CHANGELOG-6.md index 5a36faf857..986c1b901e 100644 --- a/CHANGELOG-6.md +++ b/CHANGELOG-6.md @@ -6,17 +6,20 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [6.11.0] - 2024-01-31 +## [6.12.0] - 2024-11-13 ### Fixed - Manual check execution of scheduled check will also be able to fetch the matched entities -## [6.11.0] - 2024-01-31 - ### Added - Added `max-silenced-expiry-time-allowed` (in minutes) backend configuration variable to control maximum time an alert can be silenced. - Added `default-silenced-expiry-time` (in minutes) backend configuration variable to create silenced with a default expiry time if user doesn't set expiry time while creating an silence. +### Changed +- Upgraded CI Go version to 1.21.11 + + +## [6.11.0] - 2024-01-31 ### Changed - Upgraded CI Go version to 1.21.3 From 72718bb2759d00d178273354ec92b8cdff20fb2a Mon Sep 17 00:00:00 2001 From: Rajshekar Date: Fri, 15 Nov 2024 12:41:03 +0530 Subject: [PATCH 170/173] go version update (#5070) Signed-off-by: Rajshekar Chavakula --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 426a0c787d..f93914dc05 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -16,7 +16,7 @@ cache: environment: GOPATH: c:\gopath GOROOT: c:\Program Files\Go - GOVERSION: 1.21.3 + GOVERSION: 1.21.11 GO111MODULE: 'on' GOPROXY: 'https://proxy.golang.org' From 5d719d28542296b9fc0d961341ff1a3a4fea2d52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 06:52:10 +0000 Subject: [PATCH 171/173] Bump golang.org/x/time from 0.3.0 to 0.9.0 Bumps [golang.org/x/time](https://github.com/golang/time) from 0.3.0 to 0.9.0. - [Commits](https://github.com/golang/time/compare/v0.3.0...v0.9.0) --- updated-dependencies: - dependency-name: golang.org/x/time dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 74a5d74636..cf13a65ec0 100644 --- a/go.mod +++ b/go.mod @@ -65,7 +65,7 @@ require ( golang.org/x/mod v0.11.0 golang.org/x/net v0.23.0 golang.org/x/sys v0.18.0 - golang.org/x/time v0.3.0 + golang.org/x/time v0.9.0 golang.org/x/tools v0.10.0 google.golang.org/grpc v1.59.0 gopkg.in/h2non/filetype.v1 v1.0.3 diff --git a/go.sum b/go.sum index 790a40354d..1407b48ef6 100644 --- a/go.sum +++ b/go.sum @@ -2078,8 +2078,9 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 1837067fbe5495d14495ea99791e7e7cf07cd9a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 06:52:19 +0000 Subject: [PATCH 172/173] Bump github.com/dave/jennifer Bumps [github.com/dave/jennifer](https://github.com/dave/jennifer) from 0.0.0-20171207062344-d8bdbdbee4e1 to 1.7.1. - [Commits](https://github.com/dave/jennifer/commits/v1.7.1) --- updated-dependencies: - dependency-name: github.com/dave/jennifer dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 74a5d74636..e5b96fa253 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/ash2k/stager v0.0.0-20170622123058-6e9c7b0eacd4 // indirect github.com/atlassian/gostatsd v0.0.0-20180514010436-af796620006e github.com/blang/semver/v4 v4.0.0 - github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1 + github.com/dave/jennifer v1.7.1 github.com/dustin/go-humanize v1.0.1 github.com/echlebek/crock v1.0.1 github.com/echlebek/timeproxy v1.0.0 diff --git a/go.sum b/go.sum index 790a40354d..2f9256934a 100644 --- a/go.sum +++ b/go.sum @@ -1118,8 +1118,8 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.20 h1:VIPb/a2s17qNeQgDnkfZC35RScx+blkKF8GV68n80J4= github.com/creack/pty v1.1.20/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1 h1:mbMd//7aY7CL51mT/YZ5DJ4yZYA/E4ZKVSgCh5yN7yU= -github.com/dave/jennifer v0.0.0-20171207062344-d8bdbdbee4e1/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= +github.com/dave/jennifer v1.7.1 h1:B4jJJDHelWcDhlRQxWeo0Npa/pYKBLrirAQoTN45txo= +github.com/dave/jennifer v1.7.1/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= From 7d577d84818cedebacbeeaddcb1231c7199878e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 14:42:57 +0000 Subject: [PATCH 173/173] Bump golang.org/x/crypto from 0.21.0 to 0.32.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.21.0 to 0.32.0. - [Commits](https://github.com/golang/crypto/compare/v0.21.0...v0.32.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 15 ++++++++------- go.sum | 30 ++++++++++++++++-------------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index d728b2f139..18e72805df 100644 --- a/go.mod +++ b/go.mod @@ -61,12 +61,11 @@ require ( go.etcd.io/etcd/server/v3 v3.5.15 go.uber.org/atomic v1.11.0 go.uber.org/zap v1.26.0 - golang.org/x/crypto v0.21.0 - golang.org/x/mod v0.11.0 - golang.org/x/net v0.23.0 - golang.org/x/sys v0.18.0 + golang.org/x/crypto v0.32.0 + golang.org/x/mod v0.17.0 + golang.org/x/net v0.25.0 + golang.org/x/sys v0.29.0 golang.org/x/time v0.9.0 - golang.org/x/tools v0.10.0 google.golang.org/grpc v1.59.0 gopkg.in/h2non/filetype.v1 v1.0.3 gopkg.in/yaml.v2 v2.4.0 @@ -99,6 +98,8 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) +require golang.org/x/tools/go/vcs v0.1.0-deprecated + require ( github.com/andybalholm/brotli v1.0.4 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -152,8 +153,8 @@ require ( go.opentelemetry.io/otel/sdk v1.20.0 // indirect go.opentelemetry.io/otel/trace v1.20.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/term v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.51.0 // indirect gopkg.in/sourcemap.v1 v1.0.5 // indirect diff --git a/go.sum b/go.sum index 455a6d930e..927eda01e3 100644 --- a/go.sum +++ b/go.sum @@ -1746,8 +1746,8 @@ golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45 golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= +golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1806,8 +1806,9 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1879,8 +1880,8 @@ golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1933,8 +1934,8 @@ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2032,8 +2033,8 @@ golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2049,8 +2050,8 @@ golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= +golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2071,8 +2072,8 @@ golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2153,8 +2154,9 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= -golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= +golang.org/x/tools/go/vcs v0.1.0-deprecated h1:cOIJqWBl99H1dH5LWizPa+0ImeeJq3t3cJjaeOWUAL4= +golang.org/x/tools/go/vcs v0.1.0-deprecated/go.mod h1:zUrvATBAvEI9535oC0yWYsLsHIV4Z7g63sNPVMtuBy8= 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=