diff --git a/.mockery.yaml b/.mockery.yaml index eae9c79b83..45f9648cd0 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -69,7 +69,6 @@ packages: github.com/percona/pmm/managed/services/server: interfaces: agentsStateUpdater: - alertmanagerService: checksService: emailer: grafanaClient: diff --git a/Makefile.include b/Makefile.include index 1d691eb6f7..2973578263 100644 --- a/Makefile.include +++ b/Makefile.include @@ -26,7 +26,6 @@ release: ## Build release versions of all components gen: clean ## Generate files make gen-api - make gen-alertmanager make clean_swagger make -C agent gen @@ -103,9 +102,6 @@ gen-api: ## Generate PMM API bin/swagger-order --output=api/swagger/swagger-dev.json api/swagger/swagger-dev.json -gen-alertmanager: ## Generate Alertmanager client - bin/swagger generate client --model-package=ammodels --client-package=amclient --spec=api/alertmanager/openapi.yaml --target=api/alertmanager - clean_swagger: find api -name '*.swagger.json' -print -delete diff --git a/agent/packages.dot b/agent/packages.dot index 6b1c644db5..bb9f70bf21 100644 --- a/agent/packages.dot +++ b/agent/packages.dot @@ -21,10 +21,12 @@ digraph packages { "/agents/noop" -> "/agents"; "/agents/noop.test" -> "/agents/noop"; "/agents/postgres/pgstatmonitor" -> "/agents"; + "/agents/postgres/pgstatmonitor" -> "/queryparser"; "/agents/postgres/pgstatmonitor.test" -> "/agents/postgres/pgstatmonitor"; "/agents/postgres/pgstatstatements" -> "/agents"; "/agents/postgres/pgstatstatements" -> "/agents/cache"; "/agents/postgres/pgstatstatements" -> "/agents/postgres/parser"; + "/agents/postgres/pgstatstatements" -> "/queryparser"; "/agents/postgres/pgstatstatements.test" -> "/agents/postgres/pgstatstatements"; "/agents/process.test" -> "/agents/process"; "/agents/supervisor" -> "/agents"; @@ -38,9 +40,11 @@ digraph packages { "/agents/supervisor" -> "/config"; "/agents/supervisor" -> "/tailog"; "/agents/supervisor.test" -> "/agents/supervisor"; + "/client" -> "/client/cache"; "/client" -> "/client/channel"; "/client" -> "/config"; "/client" -> "/connectionuptime"; + "/client" -> "/models"; "/client" -> "/runner"; "/client" -> "/runner/actions"; "/client" -> "/runner/jobs"; @@ -54,6 +58,7 @@ digraph packages { "/commands" -> "/connectionchecker"; "/commands" -> "/connectionuptime"; "/commands" -> "/runner"; + "/commands" -> "/serviceinfobroker"; "/commands" -> "/tailog"; "/commands" -> "/versioner"; "/connectionchecker" -> "/config"; diff --git a/api-tests/init.go b/api-tests/init.go index cf98b60787..10cd73492c 100644 --- a/api-tests/init.go +++ b/api-tests/init.go @@ -36,7 +36,6 @@ import ( "github.com/sirupsen/logrus" "golang.org/x/sys/unix" - "github.com/percona/pmm/api/alertmanager/amclient" inventoryClient "github.com/percona/pmm/api/inventorypb/json/client" alertingClient "github.com/percona/pmm/api/managementpb/alerting/json/client" backupsClient "github.com/percona/pmm/api/managementpb/backup/json/client" @@ -193,13 +192,10 @@ func init() { } transport := Transport(BaseURL, *serverInsecureTLSF) - alertmanagerTransport := Transport(BaseURL, *serverInsecureTLSF) - alertmanagerTransport.BasePath = "/alertmanager/api/v2" transport.Consumers["application/zip"] = runtime.ByteStreamConsumer() inventoryClient.Default = inventoryClient.New(transport, nil) managementClient.Default = managementClient.New(transport, nil) serverClient.Default = serverClient.New(transport, nil) - amclient.Default = amclient.New(alertmanagerTransport, nil) backupsClient.Default = backupsClient.New(transport, nil) platformClient.Default = platformClient.New(transport, nil) alertingClient.Default = alertingClient.New(transport, nil) diff --git a/api-tests/management/alerting/alerting_test.go b/api-tests/management/alerting/alerting_test.go index 9036e1b250..96e4563b0e 100644 --- a/api-tests/management/alerting/alerting_test.go +++ b/api-tests/management/alerting/alerting_test.go @@ -43,8 +43,6 @@ import ( // we don't enable or disable Alerting explicit in our tests since it is enabled by default through // DISABLE_ALERTING env var. func TestRulesAPI(t *testing.T) { - t.Parallel() - t.Parallel() client := alertingClient.Default.Alerting diff --git a/api-tests/server/alertmanager_test.go b/api-tests/server/alertmanager_test.go deleted file mode 100644 index 1a2ecadab2..0000000000 --- a/api-tests/server/alertmanager_test.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package server - -import ( - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - pmmapitests "github.com/percona/pmm/api-tests" - "github.com/percona/pmm/api/alertmanager/amclient" - "github.com/percona/pmm/api/alertmanager/amclient/alert" -) - -func TestAlertManager(t *testing.T) { - t.Run("TestEndsAtForFailedChecksAlerts", func(t *testing.T) { - if !pmmapitests.RunSTTTests { - t.Skip("Skipping STT tests until we have environment: https://jira.percona.com/browse/PMM-5106") - } - - defer restoreSettingsDefaults(t) - - // sync with pmm-managed - const ( - resolveTimeoutFactor = 3 - defaultResendInterval = 2 * time.Second - ) - - // 120 sec ping for failed checks alerts to appear in alertmanager - for i := 0; i < 120; i++ { - res, err := amclient.Default.Alert.GetAlerts(&alert.GetAlertsParams{ - Filter: []string{"stt_check=1"}, - Context: pmmapitests.Context, - }) - require.NoError(t, err) - if len(res.Payload) == 0 { - time.Sleep(1 * time.Second) - continue - } - - require.NotEmpty(t, res.Payload, "No alerts met") - - // TODO: Expand this test once we are silencing/removing alerts. - alertTTL := resolveTimeoutFactor * defaultResendInterval - for _, v := range res.Payload { - // Since the `EndsAt` timestamp is always resolveTimeoutFactor times the - // `resendInterval` in the future from `UpdatedAt` - // we check whether they lie in that time alertTTL. - assert.WithinDuration(t, time.Time(*v.EndsAt), time.Time(*v.UpdatedAt), alertTTL) - assert.Greater(t, v.EndsAt, v.UpdatedAt) - } - break - } - }) -} diff --git a/api-tests/server/auth_test.go b/api-tests/server/auth_test.go index f8a798a6cb..01089d0338 100644 --- a/api-tests/server/auth_test.go +++ b/api-tests/server/auth_test.go @@ -287,12 +287,6 @@ func TestPermissions(t *testing.T) { {userType: "editor", login: editor, apiKey: editorAPIKey, statusCode: 401}, {userType: "admin", login: admin, apiKey: adminAPIKey, statusCode: 200}, }}, - {name: "alerts-default", url: "/alertmanager/api/v2/alerts", method: http.MethodGet, userCase: []userCase{ - {userType: "default", login: none, statusCode: 401}, - {userType: "viewer", login: viewer, apiKey: viewerAPIKey, statusCode: 401}, - {userType: "editor", login: editor, apiKey: editorAPIKey, statusCode: 401}, - {userType: "admin", login: admin, apiKey: adminAPIKey, statusCode: 200}, - }}, {name: "platform-connect", url: "/v1/Platform/Connect", method: "POST", userCase: []userCase{ {userType: "default", login: none, statusCode: 401}, {userType: "viewer", login: viewer, apiKey: viewerAPIKey, statusCode: 401}, diff --git a/api-tests/server/helpers.go b/api-tests/server/helpers.go index c073820595..a0852219ab 100644 --- a/api-tests/server/helpers.go +++ b/api-tests/server/helpers.go @@ -48,10 +48,8 @@ func restoreSettingsDefaults(t *testing.T) { StandardInterval: "86400s", RareInterval: "280800s", }, - DataRetention: "2592000s", - AWSPartitions: []string{"aws"}, - RemoveAlertManagerURL: true, - RemoveAlertManagerRules: true, + DataRetention: "2592000s", + AWSPartitions: []string{"aws"}, }, Context: pmmapitests.Context, }) @@ -72,8 +70,6 @@ func restoreSettingsDefaults(t *testing.T) { assert.Equal(t, expectedSTTIntervals, res.Payload.Settings.SttCheckIntervals) assert.Equal(t, "2592000s", res.Payload.Settings.DataRetention) assert.Equal(t, []string{"aws"}, res.Payload.Settings.AWSPartitions) - assert.Equal(t, "", res.Payload.Settings.AlertManagerURL) - assert.Equal(t, "", res.Payload.Settings.AlertManagerRules) } func restoreCheckIntervalDefaults(t *testing.T) { diff --git a/api-tests/server/logs_test.go b/api-tests/server/logs_test.go index 7019fa57cb..f0c0d255b1 100644 --- a/api-tests/server/logs_test.go +++ b/api-tests/server/logs_test.go @@ -43,8 +43,6 @@ func TestDownloadLogs(t *testing.T) { assert.NoError(t, err) expected := []string{ - "alertmanager.ini", - "alertmanager.log", "clickhouse-server.log", "client/list.txt", "client/pmm-admin-version.txt", diff --git a/api-tests/server/settings_test.go b/api-tests/server/settings_test.go index 6d227a11ff..e1cb0d42a0 100644 --- a/api-tests/server/settings_test.go +++ b/api-tests/server/settings_test.go @@ -22,17 +22,13 @@ import ( "net/http" "net/http/httputil" "net/url" - "strings" "testing" - "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" pmmapitests "github.com/percona/pmm/api-tests" - "github.com/percona/pmm/api/alertmanager/amclient" - "github.com/percona/pmm/api/alertmanager/amclient/alert" serverClient "github.com/percona/pmm/api/serverpb/json/client" "github.com/percona/pmm/api/serverpb/json/client/server" ) @@ -122,7 +118,7 @@ func TestSettings(t *testing.T) { assert.False(t, res.Payload.Settings.AlertingEnabled) }) - t.Run("InvalidBothEnableAndDisableSTT", func(t *testing.T) { + t.Run("InvalidBothEnableAndDisableAdvisors", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -137,7 +133,7 @@ func TestSettings(t *testing.T) { assert.Empty(t, res) }) - t.Run("EnableSTTAndEnableTelemetry", func(t *testing.T) { + t.Run("EnableAdviorsAndEnableTelemetry", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -157,7 +153,7 @@ func TestSettings(t *testing.T) { assert.True(t, resg.Payload.Settings.SttEnabled) }) - t.Run("EnableSTTAndDisableTelemetry", func(t *testing.T) { + t.Run("EnableAdvisorsAndDisableTelemetry", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -172,7 +168,7 @@ func TestSettings(t *testing.T) { assert.False(t, res.Payload.Settings.TelemetryEnabled) }) - t.Run("DisableSTTAndEnableTelemetry", func(t *testing.T) { + t.Run("DisableAdvisorsAndEnableTelemetry", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -192,7 +188,7 @@ func TestSettings(t *testing.T) { assert.False(t, resg.Payload.Settings.SttEnabled) }) - t.Run("DisableSTTAndDisableTelemetry", func(t *testing.T) { + t.Run("DisableAdvisorsAndDisableTelemetry", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -212,7 +208,7 @@ func TestSettings(t *testing.T) { assert.False(t, resg.Payload.Settings.SttEnabled) }) - t.Run("EnableSTTWhileTelemetryEnabled", func(t *testing.T) { + t.Run("EnableAdvisorsWhileTelemetryEnabled", func(t *testing.T) { defer restoreSettingsDefaults(t) // Ensure Telemetry is enabled @@ -240,62 +236,7 @@ func TestSettings(t *testing.T) { assert.True(t, resg.Payload.Settings.SttEnabled) }) - t.Run("VerifyFailedChecksInAlertmanager", func(t *testing.T) { - if !pmmapitests.RunSTTTests { - t.Skip("Skipping STT tests until we have environment: https://jira.percona.com/browse/PMM-5106") - } - - defer restoreSettingsDefaults(t) - - // Enabling STT - res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ - Body: server.ChangeSettingsBody{ - EnableStt: true, - }, - Context: pmmapitests.Context, - }) - require.NoError(t, err) - assert.True(t, res.Payload.Settings.TelemetryEnabled) - - // 120 sec ping for failed checks alerts to appear in alertmanager - var alertsCount int - for i := 0; i < 120; i++ { - res, err := amclient.Default.Alert.GetAlerts(&alert.GetAlertsParams{ - Filter: []string{"stt_check=1"}, - Context: pmmapitests.Context, - }) - require.NoError(t, err) - if len(res.Payload) == 0 { - time.Sleep(1 * time.Second) - continue - } - - for _, v := range res.Payload { - t.Logf("%+v", v) - - assert.Contains(t, v.Annotations, "summary") - - assert.Equal(t, "1", v.Labels["stt_check"]) - - assert.Contains(t, v.Labels, "agent_id") - assert.Contains(t, v.Labels, "agent_type") - assert.Contains(t, v.Labels, "alert_id") - assert.Contains(t, v.Labels, "alertname") - assert.Contains(t, v.Labels, "node_id") - assert.Contains(t, v.Labels, "node_name") - assert.Contains(t, v.Labels, "node_type") - assert.Contains(t, v.Labels, "service_id") - assert.Contains(t, v.Labels, "service_name") - assert.Contains(t, v.Labels, "service_type") - assert.Contains(t, v.Labels, "severity") - } - alertsCount = len(res.Payload) - break - } - assert.Greater(t, alertsCount, 0, "No alerts met") - }) - - t.Run("DisableSTTWhileItIsDisabled", func(t *testing.T) { + t.Run("DisableAdvisorsWhileItIsDisabled", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -313,7 +254,7 @@ func TestSettings(t *testing.T) { assert.False(t, resg.Payload.Settings.SttEnabled) }) - t.Run("STTEnabledState", func(t *testing.T) { + t.Run("AdvisorsEnabledState", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -331,7 +272,7 @@ func TestSettings(t *testing.T) { assert.True(t, resg.Payload.Settings.TelemetryEnabled) assert.True(t, resg.Payload.Settings.SttEnabled) - t.Run("EnableSTTWhileItIsEnabled", func(t *testing.T) { + t.Run("EnableAdvisorsWhileItIsEnabled", func(t *testing.T) { res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ Body: server.ChangeSettingsBody{ EnableStt: true, @@ -347,7 +288,7 @@ func TestSettings(t *testing.T) { assert.True(t, resg.Payload.Settings.SttEnabled) }) - t.Run("DisableTelemetryWhileSTTEnabled", func(t *testing.T) { + t.Run("DisableTelemetryWhileAdvisorsEnabled", func(t *testing.T) { res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ Body: server.ChangeSettingsBody{ DisableTelemetry: true, @@ -378,7 +319,7 @@ func TestSettings(t *testing.T) { assert.False(t, resg.Payload.Settings.TelemetryEnabled) assert.True(t, resg.Payload.Settings.SttEnabled) - t.Run("EnableSTTWhileTelemetryDisabled", func(t *testing.T) { + t.Run("EnableAdvisorsWhileTelemetryDisabled", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -508,7 +449,7 @@ func TestSettings(t *testing.T) { assert.Empty(t, res) }) - t.Run("STTCheckIntervalInvalid", func(t *testing.T) { + t.Run("AdvisorsCheckIntervalInvalid", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -524,7 +465,7 @@ func TestSettings(t *testing.T) { assert.Empty(t, res) }) - t.Run("STTCheckIntervalTooSmall", func(t *testing.T) { + t.Run("AdvisorsCheckIntervalTooSmall", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -540,7 +481,7 @@ func TestSettings(t *testing.T) { assert.Empty(t, res) }) - t.Run("STTCheckIntervalFractional", func(t *testing.T) { + t.Run("AdviorsCheckIntervalFractional", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -699,7 +640,7 @@ func TestSettings(t *testing.T) { }) }) - t.Run("STTCheckIntervalsValid", func(t *testing.T) { + t.Run("AdvisorCheckIntervalsValid", func(t *testing.T) { defer restoreSettingsDefaults(t) res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ @@ -756,97 +697,6 @@ func TestSettings(t *testing.T) { }) }) - t.Run("AlertManager", func(t *testing.T) { - t.Run("SetInvalid", func(t *testing.T) { - defer restoreSettingsDefaults(t) - - url := "http://localhost:1234/" - rules := `invalid rules` - - _, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ - Body: server.ChangeSettingsBody{ - AlertManagerURL: url, - AlertManagerRules: rules, - }, - Context: pmmapitests.Context, - }) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, `Invalid alerting rules.`) - - gets, err := serverClient.Default.Server.GetSettings(nil) - require.NoError(t, err) - assert.Empty(t, gets.Payload.Settings.AlertManagerURL) - assert.Empty(t, gets.Payload.Settings.AlertManagerRules) - }) - - t.Run("SetAndRemoveInvalid", func(t *testing.T) { - defer restoreSettingsDefaults(t) - - _, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ - Body: server.ChangeSettingsBody{ - AlertManagerURL: "invalid url", - RemoveAlertManagerURL: true, - }, - Context: pmmapitests.Context, - }) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, - `Invalid argument: both alert_manager_url and remove_alert_manager_url are present.`) - - gets, err := serverClient.Default.Server.GetSettings(nil) - require.NoError(t, err) - assert.Empty(t, gets.Payload.Settings.AlertManagerURL) - assert.Empty(t, gets.Payload.Settings.AlertManagerRules) - }) - - t.Run("SetValid", func(t *testing.T) { - defer restoreSettingsDefaults(t) - - url := "http://localhost:1234/" - rules := strings.TrimSpace(` -groups: -- name: example - rules: - - alert: HighRequestLatency - expr: job:request_latency_seconds:mean5m{job="myjob"} > 0.5 - for: 10m - labels: - severity: page - annotations: - summary: High request latency - `) + "\n" - - res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ - Body: server.ChangeSettingsBody{ - AlertManagerURL: url, - AlertManagerRules: rules, - }, - Context: pmmapitests.Context, - }) - require.NoError(t, err) - assert.Equal(t, url, res.Payload.Settings.AlertManagerURL) - assert.Equal(t, rules, res.Payload.Settings.AlertManagerRules) - - gets, err := serverClient.Default.Server.GetSettings(nil) - require.NoError(t, err) - assert.Equal(t, url, gets.Payload.Settings.AlertManagerURL) - assert.Equal(t, rules, gets.Payload.Settings.AlertManagerRules) - - t.Run("EmptyShouldNotRemove", func(t *testing.T) { - defer restoreSettingsDefaults(t) - - _, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{ - Body: server.ChangeSettingsBody{}, - Context: pmmapitests.Context, - }) - require.NoError(t, err) - - gets, err = serverClient.Default.Server.GetSettings(nil) - require.NoError(t, err) - assert.Equal(t, url, gets.Payload.Settings.AlertManagerURL) - assert.Equal(t, rules, gets.Payload.Settings.AlertManagerRules) - }) - }) - }) - t.Run("grpc-gateway", func(t *testing.T) { // Test with pure JSON without swagger for tracking grpc-gateway behavior: // https://github.com/grpc-ecosystem/grpc-gateway/issues/400 diff --git a/api-tests/server/version_test.go b/api-tests/server/version_test.go index 46dbbf9d95..55294af65c 100644 --- a/api-tests/server/version_test.go +++ b/api-tests/server/version_test.go @@ -61,12 +61,12 @@ func TestVersion(t *testing.T) { err = json.Unmarshal(b, &res) require.NoError(t, err) - require.True(t, strings.HasPrefix(res.Version, "2."), - "version = %q must have '2.' prefix for PMM 1.x's pmm-client compatibility checking", res.Version) + require.True(t, strings.HasPrefix(res.Version, "3."), + "version = %q must have '3.' prefix for PMM 1.x's and 2.x's pmm-client compatibility checking", res.Version) require.NotEmpty(t, res.Managed) - assert.True(t, strings.HasPrefix(res.Managed.Version, "2."), - "managed.version = %q must have '2.' prefix ", res.Managed.Version) + assert.True(t, strings.HasPrefix(res.Managed.Version, "3."), + "managed.version = %q must have '3.' prefix ", res.Managed.Version) assert.NotEmpty(t, res.Managed.FullVersion) // check that timestamp is not XX:00:00 diff --git a/api/README.md b/api/README.md index 7edeb6ab58..0bb9a97775 100644 --- a/api/README.md +++ b/api/README.md @@ -23,9 +23,3 @@ make init ``` make gen ``` - - -## Alertmanager - -`alertmanager/openapi.yaml` is copied from https://github.com/prometheus/alertmanager/blob/master/api/v2/openapi.yaml. -Then Swagger client is generated using `make gen-alertmanager`. diff --git a/api/alertmanager/amclient/alert/alert_client.go b/api/alertmanager/amclient/alert/alert_client.go deleted file mode 100644 index 6046d46f9f..0000000000 --- a/api/alertmanager/amclient/alert/alert_client.go +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alert - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new alert API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for alert API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetAlerts(params *GetAlertsParams, opts ...ClientOption) (*GetAlertsOK, error) - - PostAlerts(params *PostAlertsParams, opts ...ClientOption) (*PostAlertsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetAlerts Get a list of alerts -*/ -func (a *Client) GetAlerts(params *GetAlertsParams, opts ...ClientOption) (*GetAlertsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAlertsParams() - } - op := &runtime.ClientOperation{ - ID: "getAlerts", - Method: "GET", - PathPattern: "/alerts", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetAlertsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetAlertsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for getAlerts: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -PostAlerts Create new Alerts -*/ -func (a *Client) PostAlerts(params *PostAlertsParams, opts ...ClientOption) (*PostAlertsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPostAlertsParams() - } - op := &runtime.ClientOperation{ - ID: "postAlerts", - Method: "POST", - PathPattern: "/alerts", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PostAlertsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PostAlertsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for postAlerts: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/alertmanager/amclient/alert/get_alerts_parameters.go b/api/alertmanager/amclient/alert/get_alerts_parameters.go deleted file mode 100644 index af7c1ab562..0000000000 --- a/api/alertmanager/amclient/alert/get_alerts_parameters.go +++ /dev/null @@ -1,366 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alert - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetAlertsParams creates a new GetAlertsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAlertsParams() *GetAlertsParams { - return &GetAlertsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAlertsParamsWithTimeout creates a new GetAlertsParams object -// with the ability to set a timeout on a request. -func NewGetAlertsParamsWithTimeout(timeout time.Duration) *GetAlertsParams { - return &GetAlertsParams{ - timeout: timeout, - } -} - -// NewGetAlertsParamsWithContext creates a new GetAlertsParams object -// with the ability to set a context for a request. -func NewGetAlertsParamsWithContext(ctx context.Context) *GetAlertsParams { - return &GetAlertsParams{ - Context: ctx, - } -} - -// NewGetAlertsParamsWithHTTPClient creates a new GetAlertsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAlertsParamsWithHTTPClient(client *http.Client) *GetAlertsParams { - return &GetAlertsParams{ - HTTPClient: client, - } -} - -/* -GetAlertsParams contains all the parameters to send to the API endpoint - - for the get alerts operation. - - Typically these are written to a http.Request. -*/ -type GetAlertsParams struct { - /* Active. - - Show active alerts - - Default: true - */ - Active *bool - - /* Filter. - - A list of matchers to filter alerts by - */ - Filter []string - - /* Inhibited. - - Show inhibited alerts - - Default: true - */ - Inhibited *bool - - /* Receiver. - - A regex matching receivers to filter alerts by - */ - Receiver *string - - /* Silenced. - - Show silenced alerts - - Default: true - */ - Silenced *bool - - /* Unprocessed. - - Show unprocessed alerts - - Default: true - */ - Unprocessed *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get alerts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertsParams) WithDefaults() *GetAlertsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get alerts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertsParams) SetDefaults() { - var ( - activeDefault = bool(true) - - inhibitedDefault = bool(true) - - silencedDefault = bool(true) - - unprocessedDefault = bool(true) - ) - - val := GetAlertsParams{ - Active: &activeDefault, - Inhibited: &inhibitedDefault, - Silenced: &silencedDefault, - Unprocessed: &unprocessedDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get alerts params -func (o *GetAlertsParams) WithTimeout(timeout time.Duration) *GetAlertsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get alerts params -func (o *GetAlertsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get alerts params -func (o *GetAlertsParams) WithContext(ctx context.Context) *GetAlertsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get alerts params -func (o *GetAlertsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get alerts params -func (o *GetAlertsParams) WithHTTPClient(client *http.Client) *GetAlertsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get alerts params -func (o *GetAlertsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithActive adds the active to the get alerts params -func (o *GetAlertsParams) WithActive(active *bool) *GetAlertsParams { - o.SetActive(active) - return o -} - -// SetActive adds the active to the get alerts params -func (o *GetAlertsParams) SetActive(active *bool) { - o.Active = active -} - -// WithFilter adds the filter to the get alerts params -func (o *GetAlertsParams) WithFilter(filter []string) *GetAlertsParams { - o.SetFilter(filter) - return o -} - -// SetFilter adds the filter to the get alerts params -func (o *GetAlertsParams) SetFilter(filter []string) { - o.Filter = filter -} - -// WithInhibited adds the inhibited to the get alerts params -func (o *GetAlertsParams) WithInhibited(inhibited *bool) *GetAlertsParams { - o.SetInhibited(inhibited) - return o -} - -// SetInhibited adds the inhibited to the get alerts params -func (o *GetAlertsParams) SetInhibited(inhibited *bool) { - o.Inhibited = inhibited -} - -// WithReceiver adds the receiver to the get alerts params -func (o *GetAlertsParams) WithReceiver(receiver *string) *GetAlertsParams { - o.SetReceiver(receiver) - return o -} - -// SetReceiver adds the receiver to the get alerts params -func (o *GetAlertsParams) SetReceiver(receiver *string) { - o.Receiver = receiver -} - -// WithSilenced adds the silenced to the get alerts params -func (o *GetAlertsParams) WithSilenced(silenced *bool) *GetAlertsParams { - o.SetSilenced(silenced) - return o -} - -// SetSilenced adds the silenced to the get alerts params -func (o *GetAlertsParams) SetSilenced(silenced *bool) { - o.Silenced = silenced -} - -// WithUnprocessed adds the unprocessed to the get alerts params -func (o *GetAlertsParams) WithUnprocessed(unprocessed *bool) *GetAlertsParams { - o.SetUnprocessed(unprocessed) - return o -} - -// SetUnprocessed adds the unprocessed to the get alerts params -func (o *GetAlertsParams) SetUnprocessed(unprocessed *bool) { - o.Unprocessed = unprocessed -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAlertsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Active != nil { - - // query param active - var qrActive bool - - if o.Active != nil { - qrActive = *o.Active - } - qActive := swag.FormatBool(qrActive) - if qActive != "" { - if err := r.SetQueryParam("active", qActive); err != nil { - return err - } - } - } - - if o.Filter != nil { - - // binding items for filter - joinedFilter := o.bindParamFilter(reg) - - // query array param filter - if err := r.SetQueryParam("filter", joinedFilter...); err != nil { - return err - } - } - - if o.Inhibited != nil { - - // query param inhibited - var qrInhibited bool - - if o.Inhibited != nil { - qrInhibited = *o.Inhibited - } - qInhibited := swag.FormatBool(qrInhibited) - if qInhibited != "" { - if err := r.SetQueryParam("inhibited", qInhibited); err != nil { - return err - } - } - } - - if o.Receiver != nil { - - // query param receiver - var qrReceiver string - - if o.Receiver != nil { - qrReceiver = *o.Receiver - } - qReceiver := qrReceiver - if qReceiver != "" { - if err := r.SetQueryParam("receiver", qReceiver); err != nil { - return err - } - } - } - - if o.Silenced != nil { - - // query param silenced - var qrSilenced bool - - if o.Silenced != nil { - qrSilenced = *o.Silenced - } - qSilenced := swag.FormatBool(qrSilenced) - if qSilenced != "" { - if err := r.SetQueryParam("silenced", qSilenced); err != nil { - return err - } - } - } - - if o.Unprocessed != nil { - - // query param unprocessed - var qrUnprocessed bool - - if o.Unprocessed != nil { - qrUnprocessed = *o.Unprocessed - } - qUnprocessed := swag.FormatBool(qrUnprocessed) - if qUnprocessed != "" { - if err := r.SetQueryParam("unprocessed", qUnprocessed); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAlerts binds the parameter filter -func (o *GetAlertsParams) bindParamFilter(formats strfmt.Registry) []string { - filterIR := o.Filter - - var filterIC []string - for _, filterIIR := range filterIR { // explode []string - - filterIIV := filterIIR // string as string - filterIC = append(filterIC, filterIIV) - } - - // items.CollectionFormat: "multi" - filterIS := swag.JoinByFormat(filterIC, "multi") - - return filterIS -} diff --git a/api/alertmanager/amclient/alert/get_alerts_responses.go b/api/alertmanager/amclient/alert/get_alerts_responses.go deleted file mode 100644 index 84a48023a0..0000000000 --- a/api/alertmanager/amclient/alert/get_alerts_responses.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alert - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/percona/pmm/api/alertmanager/ammodels" -) - -// GetAlertsReader is a Reader for the GetAlerts structure. -type GetAlertsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAlertsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAlertsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAlertsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAlertsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetAlertsOK creates a GetAlertsOK with default headers values -func NewGetAlertsOK() *GetAlertsOK { - return &GetAlertsOK{} -} - -/* -GetAlertsOK describes a response with status code 200, with default header values. - -Get alerts response -*/ -type GetAlertsOK struct { - Payload ammodels.GettableAlerts -} - -func (o *GetAlertsOK) Error() string { - return fmt.Sprintf("[GET /alerts][%d] getAlertsOK %+v", 200, o.Payload) -} - -func (o *GetAlertsOK) GetPayload() ammodels.GettableAlerts { - return o.Payload -} - -func (o *GetAlertsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAlertsBadRequest creates a GetAlertsBadRequest with default headers values -func NewGetAlertsBadRequest() *GetAlertsBadRequest { - return &GetAlertsBadRequest{} -} - -/* -GetAlertsBadRequest describes a response with status code 400, with default header values. - -Bad request -*/ -type GetAlertsBadRequest struct { - Payload string -} - -func (o *GetAlertsBadRequest) Error() string { - return fmt.Sprintf("[GET /alerts][%d] getAlertsBadRequest %+v", 400, o.Payload) -} - -func (o *GetAlertsBadRequest) GetPayload() string { - return o.Payload -} - -func (o *GetAlertsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAlertsInternalServerError creates a GetAlertsInternalServerError with default headers values -func NewGetAlertsInternalServerError() *GetAlertsInternalServerError { - return &GetAlertsInternalServerError{} -} - -/* -GetAlertsInternalServerError describes a response with status code 500, with default header values. - -Internal server error -*/ -type GetAlertsInternalServerError struct { - Payload string -} - -func (o *GetAlertsInternalServerError) Error() string { - return fmt.Sprintf("[GET /alerts][%d] getAlertsInternalServerError %+v", 500, o.Payload) -} - -func (o *GetAlertsInternalServerError) GetPayload() string { - return o.Payload -} - -func (o *GetAlertsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/api/alertmanager/amclient/alert/post_alerts_parameters.go b/api/alertmanager/amclient/alert/post_alerts_parameters.go deleted file mode 100644 index 57b9a98cb7..0000000000 --- a/api/alertmanager/amclient/alert/post_alerts_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alert - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/percona/pmm/api/alertmanager/ammodels" -) - -// NewPostAlertsParams creates a new PostAlertsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPostAlertsParams() *PostAlertsParams { - return &PostAlertsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPostAlertsParamsWithTimeout creates a new PostAlertsParams object -// with the ability to set a timeout on a request. -func NewPostAlertsParamsWithTimeout(timeout time.Duration) *PostAlertsParams { - return &PostAlertsParams{ - timeout: timeout, - } -} - -// NewPostAlertsParamsWithContext creates a new PostAlertsParams object -// with the ability to set a context for a request. -func NewPostAlertsParamsWithContext(ctx context.Context) *PostAlertsParams { - return &PostAlertsParams{ - Context: ctx, - } -} - -// NewPostAlertsParamsWithHTTPClient creates a new PostAlertsParams object -// with the ability to set a custom HTTPClient for a request. -func NewPostAlertsParamsWithHTTPClient(client *http.Client) *PostAlertsParams { - return &PostAlertsParams{ - HTTPClient: client, - } -} - -/* -PostAlertsParams contains all the parameters to send to the API endpoint - - for the post alerts operation. - - Typically these are written to a http.Request. -*/ -type PostAlertsParams struct { - /* Alerts. - - The alerts to create - */ - Alerts ammodels.PostableAlerts - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the post alerts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PostAlertsParams) WithDefaults() *PostAlertsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the post alerts params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PostAlertsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the post alerts params -func (o *PostAlertsParams) WithTimeout(timeout time.Duration) *PostAlertsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the post alerts params -func (o *PostAlertsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the post alerts params -func (o *PostAlertsParams) WithContext(ctx context.Context) *PostAlertsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the post alerts params -func (o *PostAlertsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the post alerts params -func (o *PostAlertsParams) WithHTTPClient(client *http.Client) *PostAlertsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the post alerts params -func (o *PostAlertsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAlerts adds the alerts to the post alerts params -func (o *PostAlertsParams) WithAlerts(alerts ammodels.PostableAlerts) *PostAlertsParams { - o.SetAlerts(alerts) - return o -} - -// SetAlerts adds the alerts to the post alerts params -func (o *PostAlertsParams) SetAlerts(alerts ammodels.PostableAlerts) { - o.Alerts = alerts -} - -// WriteToRequest writes these params to a swagger request -func (o *PostAlertsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Alerts != nil { - if err := r.SetBodyParam(o.Alerts); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/amclient/alert/post_alerts_responses.go b/api/alertmanager/amclient/alert/post_alerts_responses.go deleted file mode 100644 index 2f64614fef..0000000000 --- a/api/alertmanager/amclient/alert/post_alerts_responses.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alert - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// PostAlertsReader is a Reader for the PostAlerts structure. -type PostAlertsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PostAlertsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPostAlertsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewPostAlertsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPostAlertsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPostAlertsOK creates a PostAlertsOK with default headers values -func NewPostAlertsOK() *PostAlertsOK { - return &PostAlertsOK{} -} - -/* -PostAlertsOK describes a response with status code 200, with default header values. - -Create alerts response -*/ -type PostAlertsOK struct{} - -func (o *PostAlertsOK) Error() string { - return fmt.Sprintf("[POST /alerts][%d] postAlertsOK ", 200) -} - -func (o *PostAlertsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - return nil -} - -// NewPostAlertsBadRequest creates a PostAlertsBadRequest with default headers values -func NewPostAlertsBadRequest() *PostAlertsBadRequest { - return &PostAlertsBadRequest{} -} - -/* -PostAlertsBadRequest describes a response with status code 400, with default header values. - -Bad request -*/ -type PostAlertsBadRequest struct { - Payload string -} - -func (o *PostAlertsBadRequest) Error() string { - return fmt.Sprintf("[POST /alerts][%d] postAlertsBadRequest %+v", 400, o.Payload) -} - -func (o *PostAlertsBadRequest) GetPayload() string { - return o.Payload -} - -func (o *PostAlertsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPostAlertsInternalServerError creates a PostAlertsInternalServerError with default headers values -func NewPostAlertsInternalServerError() *PostAlertsInternalServerError { - return &PostAlertsInternalServerError{} -} - -/* -PostAlertsInternalServerError describes a response with status code 500, with default header values. - -Internal server error -*/ -type PostAlertsInternalServerError struct { - Payload string -} - -func (o *PostAlertsInternalServerError) Error() string { - return fmt.Sprintf("[POST /alerts][%d] postAlertsInternalServerError %+v", 500, o.Payload) -} - -func (o *PostAlertsInternalServerError) GetPayload() string { - return o.Payload -} - -func (o *PostAlertsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/api/alertmanager/amclient/alertgroup/alertgroup_client.go b/api/alertmanager/amclient/alertgroup/alertgroup_client.go deleted file mode 100644 index 48a55ba680..0000000000 --- a/api/alertmanager/amclient/alertgroup/alertgroup_client.go +++ /dev/null @@ -1,79 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alertgroup - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new alertgroup API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for alertgroup API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetAlertGroups(params *GetAlertGroupsParams, opts ...ClientOption) (*GetAlertGroupsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetAlertGroups Get a list of alert groups -*/ -func (a *Client) GetAlertGroups(params *GetAlertGroupsParams, opts ...ClientOption) (*GetAlertGroupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetAlertGroupsParams() - } - op := &runtime.ClientOperation{ - ID: "getAlertGroups", - Method: "GET", - PathPattern: "/alerts/groups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetAlertGroupsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetAlertGroupsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for getAlertGroups: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/alertmanager/amclient/alertgroup/get_alert_groups_parameters.go b/api/alertmanager/amclient/alertgroup/get_alert_groups_parameters.go deleted file mode 100644 index d295764056..0000000000 --- a/api/alertmanager/amclient/alertgroup/get_alert_groups_parameters.go +++ /dev/null @@ -1,328 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alertgroup - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetAlertGroupsParams creates a new GetAlertGroupsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetAlertGroupsParams() *GetAlertGroupsParams { - return &GetAlertGroupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetAlertGroupsParamsWithTimeout creates a new GetAlertGroupsParams object -// with the ability to set a timeout on a request. -func NewGetAlertGroupsParamsWithTimeout(timeout time.Duration) *GetAlertGroupsParams { - return &GetAlertGroupsParams{ - timeout: timeout, - } -} - -// NewGetAlertGroupsParamsWithContext creates a new GetAlertGroupsParams object -// with the ability to set a context for a request. -func NewGetAlertGroupsParamsWithContext(ctx context.Context) *GetAlertGroupsParams { - return &GetAlertGroupsParams{ - Context: ctx, - } -} - -// NewGetAlertGroupsParamsWithHTTPClient creates a new GetAlertGroupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetAlertGroupsParamsWithHTTPClient(client *http.Client) *GetAlertGroupsParams { - return &GetAlertGroupsParams{ - HTTPClient: client, - } -} - -/* -GetAlertGroupsParams contains all the parameters to send to the API endpoint - - for the get alert groups operation. - - Typically these are written to a http.Request. -*/ -type GetAlertGroupsParams struct { - /* Active. - - Show active alerts - - Default: true - */ - Active *bool - - /* Filter. - - A list of matchers to filter alerts by - */ - Filter []string - - /* Inhibited. - - Show inhibited alerts - - Default: true - */ - Inhibited *bool - - /* Receiver. - - A regex matching receivers to filter alerts by - */ - Receiver *string - - /* Silenced. - - Show silenced alerts - - Default: true - */ - Silenced *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get alert groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertGroupsParams) WithDefaults() *GetAlertGroupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get alert groups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetAlertGroupsParams) SetDefaults() { - var ( - activeDefault = bool(true) - - inhibitedDefault = bool(true) - - silencedDefault = bool(true) - ) - - val := GetAlertGroupsParams{ - Active: &activeDefault, - Inhibited: &inhibitedDefault, - Silenced: &silencedDefault, - } - - val.timeout = o.timeout - val.Context = o.Context - val.HTTPClient = o.HTTPClient - *o = val -} - -// WithTimeout adds the timeout to the get alert groups params -func (o *GetAlertGroupsParams) WithTimeout(timeout time.Duration) *GetAlertGroupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get alert groups params -func (o *GetAlertGroupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get alert groups params -func (o *GetAlertGroupsParams) WithContext(ctx context.Context) *GetAlertGroupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get alert groups params -func (o *GetAlertGroupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get alert groups params -func (o *GetAlertGroupsParams) WithHTTPClient(client *http.Client) *GetAlertGroupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get alert groups params -func (o *GetAlertGroupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithActive adds the active to the get alert groups params -func (o *GetAlertGroupsParams) WithActive(active *bool) *GetAlertGroupsParams { - o.SetActive(active) - return o -} - -// SetActive adds the active to the get alert groups params -func (o *GetAlertGroupsParams) SetActive(active *bool) { - o.Active = active -} - -// WithFilter adds the filter to the get alert groups params -func (o *GetAlertGroupsParams) WithFilter(filter []string) *GetAlertGroupsParams { - o.SetFilter(filter) - return o -} - -// SetFilter adds the filter to the get alert groups params -func (o *GetAlertGroupsParams) SetFilter(filter []string) { - o.Filter = filter -} - -// WithInhibited adds the inhibited to the get alert groups params -func (o *GetAlertGroupsParams) WithInhibited(inhibited *bool) *GetAlertGroupsParams { - o.SetInhibited(inhibited) - return o -} - -// SetInhibited adds the inhibited to the get alert groups params -func (o *GetAlertGroupsParams) SetInhibited(inhibited *bool) { - o.Inhibited = inhibited -} - -// WithReceiver adds the receiver to the get alert groups params -func (o *GetAlertGroupsParams) WithReceiver(receiver *string) *GetAlertGroupsParams { - o.SetReceiver(receiver) - return o -} - -// SetReceiver adds the receiver to the get alert groups params -func (o *GetAlertGroupsParams) SetReceiver(receiver *string) { - o.Receiver = receiver -} - -// WithSilenced adds the silenced to the get alert groups params -func (o *GetAlertGroupsParams) WithSilenced(silenced *bool) *GetAlertGroupsParams { - o.SetSilenced(silenced) - return o -} - -// SetSilenced adds the silenced to the get alert groups params -func (o *GetAlertGroupsParams) SetSilenced(silenced *bool) { - o.Silenced = silenced -} - -// WriteToRequest writes these params to a swagger request -func (o *GetAlertGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Active != nil { - - // query param active - var qrActive bool - - if o.Active != nil { - qrActive = *o.Active - } - qActive := swag.FormatBool(qrActive) - if qActive != "" { - if err := r.SetQueryParam("active", qActive); err != nil { - return err - } - } - } - - if o.Filter != nil { - - // binding items for filter - joinedFilter := o.bindParamFilter(reg) - - // query array param filter - if err := r.SetQueryParam("filter", joinedFilter...); err != nil { - return err - } - } - - if o.Inhibited != nil { - - // query param inhibited - var qrInhibited bool - - if o.Inhibited != nil { - qrInhibited = *o.Inhibited - } - qInhibited := swag.FormatBool(qrInhibited) - if qInhibited != "" { - if err := r.SetQueryParam("inhibited", qInhibited); err != nil { - return err - } - } - } - - if o.Receiver != nil { - - // query param receiver - var qrReceiver string - - if o.Receiver != nil { - qrReceiver = *o.Receiver - } - qReceiver := qrReceiver - if qReceiver != "" { - if err := r.SetQueryParam("receiver", qReceiver); err != nil { - return err - } - } - } - - if o.Silenced != nil { - - // query param silenced - var qrSilenced bool - - if o.Silenced != nil { - qrSilenced = *o.Silenced - } - qSilenced := swag.FormatBool(qrSilenced) - if qSilenced != "" { - if err := r.SetQueryParam("silenced", qSilenced); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetAlertGroups binds the parameter filter -func (o *GetAlertGroupsParams) bindParamFilter(formats strfmt.Registry) []string { - filterIR := o.Filter - - var filterIC []string - for _, filterIIR := range filterIR { // explode []string - - filterIIV := filterIIR // string as string - filterIC = append(filterIC, filterIIV) - } - - // items.CollectionFormat: "multi" - filterIS := swag.JoinByFormat(filterIC, "multi") - - return filterIS -} diff --git a/api/alertmanager/amclient/alertgroup/get_alert_groups_responses.go b/api/alertmanager/amclient/alertgroup/get_alert_groups_responses.go deleted file mode 100644 index 65563d7fdf..0000000000 --- a/api/alertmanager/amclient/alertgroup/get_alert_groups_responses.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package alertgroup - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/percona/pmm/api/alertmanager/ammodels" -) - -// GetAlertGroupsReader is a Reader for the GetAlertGroups structure. -type GetAlertGroupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetAlertGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetAlertGroupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetAlertGroupsBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetAlertGroupsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetAlertGroupsOK creates a GetAlertGroupsOK with default headers values -func NewGetAlertGroupsOK() *GetAlertGroupsOK { - return &GetAlertGroupsOK{} -} - -/* -GetAlertGroupsOK describes a response with status code 200, with default header values. - -Get alert groups response -*/ -type GetAlertGroupsOK struct { - Payload ammodels.AlertGroups -} - -func (o *GetAlertGroupsOK) Error() string { - return fmt.Sprintf("[GET /alerts/groups][%d] getAlertGroupsOK %+v", 200, o.Payload) -} - -func (o *GetAlertGroupsOK) GetPayload() ammodels.AlertGroups { - return o.Payload -} - -func (o *GetAlertGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAlertGroupsBadRequest creates a GetAlertGroupsBadRequest with default headers values -func NewGetAlertGroupsBadRequest() *GetAlertGroupsBadRequest { - return &GetAlertGroupsBadRequest{} -} - -/* -GetAlertGroupsBadRequest describes a response with status code 400, with default header values. - -Bad request -*/ -type GetAlertGroupsBadRequest struct { - Payload string -} - -func (o *GetAlertGroupsBadRequest) Error() string { - return fmt.Sprintf("[GET /alerts/groups][%d] getAlertGroupsBadRequest %+v", 400, o.Payload) -} - -func (o *GetAlertGroupsBadRequest) GetPayload() string { - return o.Payload -} - -func (o *GetAlertGroupsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetAlertGroupsInternalServerError creates a GetAlertGroupsInternalServerError with default headers values -func NewGetAlertGroupsInternalServerError() *GetAlertGroupsInternalServerError { - return &GetAlertGroupsInternalServerError{} -} - -/* -GetAlertGroupsInternalServerError describes a response with status code 500, with default header values. - -Internal server error -*/ -type GetAlertGroupsInternalServerError struct { - Payload string -} - -func (o *GetAlertGroupsInternalServerError) Error() string { - return fmt.Sprintf("[GET /alerts/groups][%d] getAlertGroupsInternalServerError %+v", 500, o.Payload) -} - -func (o *GetAlertGroupsInternalServerError) GetPayload() string { - return o.Payload -} - -func (o *GetAlertGroupsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/api/alertmanager/amclient/alertmanager_api_client.go b/api/alertmanager/amclient/alertmanager_api_client.go deleted file mode 100644 index c0a5feecec..0000000000 --- a/api/alertmanager/amclient/alertmanager_api_client.go +++ /dev/null @@ -1,132 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package amclient - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/percona/pmm/api/alertmanager/amclient/alert" - "github.com/percona/pmm/api/alertmanager/amclient/alertgroup" - "github.com/percona/pmm/api/alertmanager/amclient/general" - "github.com/percona/pmm/api/alertmanager/amclient/receiver" - "github.com/percona/pmm/api/alertmanager/amclient/silence" -) - -// Default alertmanager API HTTP client. -var Default = NewHTTPClient(nil) - -const ( - // DefaultHost is the default Host - // found in Meta (info) section of spec file - DefaultHost string = "localhost" - // DefaultBasePath is the default BasePath - // found in Meta (info) section of spec file - DefaultBasePath string = "/" -) - -// DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http"} - -// NewHTTPClient creates a new alertmanager API HTTP client. -func NewHTTPClient(formats strfmt.Registry) *AlertmanagerAPI { - return NewHTTPClientWithConfig(formats, nil) -} - -// NewHTTPClientWithConfig creates a new alertmanager API HTTP client, -// using a customizable transport config. -func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *AlertmanagerAPI { - // ensure nullable parameters have default - if cfg == nil { - cfg = DefaultTransportConfig() - } - - // create transport and client - transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) - return New(transport, formats) -} - -// New creates a new alertmanager API client -func New(transport runtime.ClientTransport, formats strfmt.Registry) *AlertmanagerAPI { - // ensure nullable parameters have default - if formats == nil { - formats = strfmt.Default - } - - cli := new(AlertmanagerAPI) - cli.Transport = transport - cli.Alert = alert.New(transport, formats) - cli.Alertgroup = alertgroup.New(transport, formats) - cli.General = general.New(transport, formats) - cli.Receiver = receiver.New(transport, formats) - cli.Silence = silence.New(transport, formats) - return cli -} - -// DefaultTransportConfig creates a TransportConfig with the -// default settings taken from the meta section of the spec file. -func DefaultTransportConfig() *TransportConfig { - return &TransportConfig{ - Host: DefaultHost, - BasePath: DefaultBasePath, - Schemes: DefaultSchemes, - } -} - -// TransportConfig contains the transport related info, -// found in the meta section of the spec file. -type TransportConfig struct { - Host string - BasePath string - Schemes []string -} - -// WithHost overrides the default host, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithHost(host string) *TransportConfig { - cfg.Host = host - return cfg -} - -// WithBasePath overrides the default basePath, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { - cfg.BasePath = basePath - return cfg -} - -// WithSchemes overrides the default schemes, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { - cfg.Schemes = schemes - return cfg -} - -// AlertmanagerAPI is a client for alertmanager API -type AlertmanagerAPI struct { - Alert alert.ClientService - - Alertgroup alertgroup.ClientService - - General general.ClientService - - Receiver receiver.ClientService - - Silence silence.ClientService - - Transport runtime.ClientTransport -} - -// SetTransport changes the transport on the client and all its subresources -func (c *AlertmanagerAPI) SetTransport(transport runtime.ClientTransport) { - c.Transport = transport - c.Alert.SetTransport(transport) - c.Alertgroup.SetTransport(transport) - c.General.SetTransport(transport) - c.Receiver.SetTransport(transport) - c.Silence.SetTransport(transport) -} diff --git a/api/alertmanager/amclient/general/general_client.go b/api/alertmanager/amclient/general/general_client.go deleted file mode 100644 index 2fa2be13e1..0000000000 --- a/api/alertmanager/amclient/general/general_client.go +++ /dev/null @@ -1,79 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package general - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new general API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for general API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetStatus(params *GetStatusParams, opts ...ClientOption) (*GetStatusOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetStatus Get current status of an Alertmanager instance and its cluster -*/ -func (a *Client) GetStatus(params *GetStatusParams, opts ...ClientOption) (*GetStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetStatusParams() - } - op := &runtime.ClientOperation{ - ID: "getStatus", - Method: "GET", - PathPattern: "/status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetStatusReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetStatusOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for getStatus: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/alertmanager/amclient/general/get_status_parameters.go b/api/alertmanager/amclient/general/get_status_parameters.go deleted file mode 100644 index 0f4ba330a3..0000000000 --- a/api/alertmanager/amclient/general/get_status_parameters.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package general - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetStatusParams creates a new GetStatusParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetStatusParams() *GetStatusParams { - return &GetStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetStatusParamsWithTimeout creates a new GetStatusParams object -// with the ability to set a timeout on a request. -func NewGetStatusParamsWithTimeout(timeout time.Duration) *GetStatusParams { - return &GetStatusParams{ - timeout: timeout, - } -} - -// NewGetStatusParamsWithContext creates a new GetStatusParams object -// with the ability to set a context for a request. -func NewGetStatusParamsWithContext(ctx context.Context) *GetStatusParams { - return &GetStatusParams{ - Context: ctx, - } -} - -// NewGetStatusParamsWithHTTPClient creates a new GetStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetStatusParamsWithHTTPClient(client *http.Client) *GetStatusParams { - return &GetStatusParams{ - HTTPClient: client, - } -} - -/* -GetStatusParams contains all the parameters to send to the API endpoint - - for the get status operation. - - Typically these are written to a http.Request. -*/ -type GetStatusParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStatusParams) WithDefaults() *GetStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get status params -func (o *GetStatusParams) WithTimeout(timeout time.Duration) *GetStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get status params -func (o *GetStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get status params -func (o *GetStatusParams) WithContext(ctx context.Context) *GetStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get status params -func (o *GetStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get status params -func (o *GetStatusParams) WithHTTPClient(client *http.Client) *GetStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get status params -func (o *GetStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/amclient/general/get_status_responses.go b/api/alertmanager/amclient/general/get_status_responses.go deleted file mode 100644 index 646d0d5ac4..0000000000 --- a/api/alertmanager/amclient/general/get_status_responses.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package general - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/percona/pmm/api/alertmanager/ammodels" -) - -// GetStatusReader is a Reader for the GetStatus structure. -type GetStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetStatusOK creates a GetStatusOK with default headers values -func NewGetStatusOK() *GetStatusOK { - return &GetStatusOK{} -} - -/* -GetStatusOK describes a response with status code 200, with default header values. - -Get status response -*/ -type GetStatusOK struct { - Payload *ammodels.AlertmanagerStatus -} - -func (o *GetStatusOK) Error() string { - return fmt.Sprintf("[GET /status][%d] getStatusOK %+v", 200, o.Payload) -} - -func (o *GetStatusOK) GetPayload() *ammodels.AlertmanagerStatus { - return o.Payload -} - -func (o *GetStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ammodels.AlertmanagerStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/api/alertmanager/amclient/receiver/get_receivers_parameters.go b/api/alertmanager/amclient/receiver/get_receivers_parameters.go deleted file mode 100644 index 9373d78fb1..0000000000 --- a/api/alertmanager/amclient/receiver/get_receivers_parameters.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package receiver - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetReceiversParams creates a new GetReceiversParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetReceiversParams() *GetReceiversParams { - return &GetReceiversParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetReceiversParamsWithTimeout creates a new GetReceiversParams object -// with the ability to set a timeout on a request. -func NewGetReceiversParamsWithTimeout(timeout time.Duration) *GetReceiversParams { - return &GetReceiversParams{ - timeout: timeout, - } -} - -// NewGetReceiversParamsWithContext creates a new GetReceiversParams object -// with the ability to set a context for a request. -func NewGetReceiversParamsWithContext(ctx context.Context) *GetReceiversParams { - return &GetReceiversParams{ - Context: ctx, - } -} - -// NewGetReceiversParamsWithHTTPClient creates a new GetReceiversParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetReceiversParamsWithHTTPClient(client *http.Client) *GetReceiversParams { - return &GetReceiversParams{ - HTTPClient: client, - } -} - -/* -GetReceiversParams contains all the parameters to send to the API endpoint - - for the get receivers operation. - - Typically these are written to a http.Request. -*/ -type GetReceiversParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get receivers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReceiversParams) WithDefaults() *GetReceiversParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get receivers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetReceiversParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get receivers params -func (o *GetReceiversParams) WithTimeout(timeout time.Duration) *GetReceiversParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get receivers params -func (o *GetReceiversParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get receivers params -func (o *GetReceiversParams) WithContext(ctx context.Context) *GetReceiversParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get receivers params -func (o *GetReceiversParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get receivers params -func (o *GetReceiversParams) WithHTTPClient(client *http.Client) *GetReceiversParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get receivers params -func (o *GetReceiversParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetReceiversParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/amclient/receiver/get_receivers_responses.go b/api/alertmanager/amclient/receiver/get_receivers_responses.go deleted file mode 100644 index 079c01b381..0000000000 --- a/api/alertmanager/amclient/receiver/get_receivers_responses.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package receiver - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/percona/pmm/api/alertmanager/ammodels" -) - -// GetReceiversReader is a Reader for the GetReceivers structure. -type GetReceiversReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetReceiversReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetReceiversOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetReceiversOK creates a GetReceiversOK with default headers values -func NewGetReceiversOK() *GetReceiversOK { - return &GetReceiversOK{} -} - -/* -GetReceiversOK describes a response with status code 200, with default header values. - -Get receivers response -*/ -type GetReceiversOK struct { - Payload []*ammodels.Receiver -} - -func (o *GetReceiversOK) Error() string { - return fmt.Sprintf("[GET /receivers][%d] getReceiversOK %+v", 200, o.Payload) -} - -func (o *GetReceiversOK) GetPayload() []*ammodels.Receiver { - return o.Payload -} - -func (o *GetReceiversOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/api/alertmanager/amclient/receiver/receiver_client.go b/api/alertmanager/amclient/receiver/receiver_client.go deleted file mode 100644 index 600b78c928..0000000000 --- a/api/alertmanager/amclient/receiver/receiver_client.go +++ /dev/null @@ -1,79 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package receiver - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new receiver API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for receiver API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetReceivers(params *GetReceiversParams, opts ...ClientOption) (*GetReceiversOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetReceivers Get list of all receivers (name of notification integrations) -*/ -func (a *Client) GetReceivers(params *GetReceiversParams, opts ...ClientOption) (*GetReceiversOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetReceiversParams() - } - op := &runtime.ClientOperation{ - ID: "getReceivers", - Method: "GET", - PathPattern: "/receivers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetReceiversReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetReceiversOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for getReceivers: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/alertmanager/amclient/silence/delete_silence_parameters.go b/api/alertmanager/amclient/silence/delete_silence_parameters.go deleted file mode 100644 index dbc90fbb68..0000000000 --- a/api/alertmanager/amclient/silence/delete_silence_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package silence - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteSilenceParams creates a new DeleteSilenceParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteSilenceParams() *DeleteSilenceParams { - return &DeleteSilenceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteSilenceParamsWithTimeout creates a new DeleteSilenceParams object -// with the ability to set a timeout on a request. -func NewDeleteSilenceParamsWithTimeout(timeout time.Duration) *DeleteSilenceParams { - return &DeleteSilenceParams{ - timeout: timeout, - } -} - -// NewDeleteSilenceParamsWithContext creates a new DeleteSilenceParams object -// with the ability to set a context for a request. -func NewDeleteSilenceParamsWithContext(ctx context.Context) *DeleteSilenceParams { - return &DeleteSilenceParams{ - Context: ctx, - } -} - -// NewDeleteSilenceParamsWithHTTPClient creates a new DeleteSilenceParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteSilenceParamsWithHTTPClient(client *http.Client) *DeleteSilenceParams { - return &DeleteSilenceParams{ - HTTPClient: client, - } -} - -/* -DeleteSilenceParams contains all the parameters to send to the API endpoint - - for the delete silence operation. - - Typically these are written to a http.Request. -*/ -type DeleteSilenceParams struct { - /* SilenceID. - - ID of the silence to get - - Format: uuid - */ - SilenceID strfmt.UUID - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete silence params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteSilenceParams) WithDefaults() *DeleteSilenceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete silence params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteSilenceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete silence params -func (o *DeleteSilenceParams) WithTimeout(timeout time.Duration) *DeleteSilenceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete silence params -func (o *DeleteSilenceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete silence params -func (o *DeleteSilenceParams) WithContext(ctx context.Context) *DeleteSilenceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete silence params -func (o *DeleteSilenceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete silence params -func (o *DeleteSilenceParams) WithHTTPClient(client *http.Client) *DeleteSilenceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete silence params -func (o *DeleteSilenceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSilenceID adds the silenceID to the delete silence params -func (o *DeleteSilenceParams) WithSilenceID(silenceID strfmt.UUID) *DeleteSilenceParams { - o.SetSilenceID(silenceID) - return o -} - -// SetSilenceID adds the silenceId to the delete silence params -func (o *DeleteSilenceParams) SetSilenceID(silenceID strfmt.UUID) { - o.SilenceID = silenceID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteSilenceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param silenceID - if err := r.SetPathParam("silenceID", o.SilenceID.String()); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/amclient/silence/delete_silence_responses.go b/api/alertmanager/amclient/silence/delete_silence_responses.go deleted file mode 100644 index 60e4eccc2d..0000000000 --- a/api/alertmanager/amclient/silence/delete_silence_responses.go +++ /dev/null @@ -1,90 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package silence - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// DeleteSilenceReader is a Reader for the DeleteSilence structure. -type DeleteSilenceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteSilenceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteSilenceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewDeleteSilenceInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteSilenceOK creates a DeleteSilenceOK with default headers values -func NewDeleteSilenceOK() *DeleteSilenceOK { - return &DeleteSilenceOK{} -} - -/* -DeleteSilenceOK describes a response with status code 200, with default header values. - -Delete silence response -*/ -type DeleteSilenceOK struct{} - -func (o *DeleteSilenceOK) Error() string { - return fmt.Sprintf("[DELETE /silence/{silenceID}][%d] deleteSilenceOK ", 200) -} - -func (o *DeleteSilenceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - return nil -} - -// NewDeleteSilenceInternalServerError creates a DeleteSilenceInternalServerError with default headers values -func NewDeleteSilenceInternalServerError() *DeleteSilenceInternalServerError { - return &DeleteSilenceInternalServerError{} -} - -/* -DeleteSilenceInternalServerError describes a response with status code 500, with default header values. - -Internal server error -*/ -type DeleteSilenceInternalServerError struct { - Payload string -} - -func (o *DeleteSilenceInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /silence/{silenceID}][%d] deleteSilenceInternalServerError %+v", 500, o.Payload) -} - -func (o *DeleteSilenceInternalServerError) GetPayload() string { - return o.Payload -} - -func (o *DeleteSilenceInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/api/alertmanager/amclient/silence/get_silence_parameters.go b/api/alertmanager/amclient/silence/get_silence_parameters.go deleted file mode 100644 index fd310d51e6..0000000000 --- a/api/alertmanager/amclient/silence/get_silence_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package silence - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetSilenceParams creates a new GetSilenceParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetSilenceParams() *GetSilenceParams { - return &GetSilenceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSilenceParamsWithTimeout creates a new GetSilenceParams object -// with the ability to set a timeout on a request. -func NewGetSilenceParamsWithTimeout(timeout time.Duration) *GetSilenceParams { - return &GetSilenceParams{ - timeout: timeout, - } -} - -// NewGetSilenceParamsWithContext creates a new GetSilenceParams object -// with the ability to set a context for a request. -func NewGetSilenceParamsWithContext(ctx context.Context) *GetSilenceParams { - return &GetSilenceParams{ - Context: ctx, - } -} - -// NewGetSilenceParamsWithHTTPClient creates a new GetSilenceParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSilenceParamsWithHTTPClient(client *http.Client) *GetSilenceParams { - return &GetSilenceParams{ - HTTPClient: client, - } -} - -/* -GetSilenceParams contains all the parameters to send to the API endpoint - - for the get silence operation. - - Typically these are written to a http.Request. -*/ -type GetSilenceParams struct { - /* SilenceID. - - ID of the silence to get - - Format: uuid - */ - SilenceID strfmt.UUID - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get silence params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSilenceParams) WithDefaults() *GetSilenceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get silence params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSilenceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get silence params -func (o *GetSilenceParams) WithTimeout(timeout time.Duration) *GetSilenceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get silence params -func (o *GetSilenceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get silence params -func (o *GetSilenceParams) WithContext(ctx context.Context) *GetSilenceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get silence params -func (o *GetSilenceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get silence params -func (o *GetSilenceParams) WithHTTPClient(client *http.Client) *GetSilenceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get silence params -func (o *GetSilenceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSilenceID adds the silenceID to the get silence params -func (o *GetSilenceParams) WithSilenceID(silenceID strfmt.UUID) *GetSilenceParams { - o.SetSilenceID(silenceID) - return o -} - -// SetSilenceID adds the silenceId to the get silence params -func (o *GetSilenceParams) SetSilenceID(silenceID strfmt.UUID) { - o.SilenceID = silenceID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSilenceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param silenceID - if err := r.SetPathParam("silenceID", o.SilenceID.String()); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/amclient/silence/get_silence_responses.go b/api/alertmanager/amclient/silence/get_silence_responses.go deleted file mode 100644 index c1be70f59c..0000000000 --- a/api/alertmanager/amclient/silence/get_silence_responses.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package silence - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/percona/pmm/api/alertmanager/ammodels" -) - -// GetSilenceReader is a Reader for the GetSilence structure. -type GetSilenceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSilenceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSilenceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetSilenceNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewGetSilenceInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetSilenceOK creates a GetSilenceOK with default headers values -func NewGetSilenceOK() *GetSilenceOK { - return &GetSilenceOK{} -} - -/* -GetSilenceOK describes a response with status code 200, with default header values. - -Get silence response -*/ -type GetSilenceOK struct { - Payload *ammodels.GettableSilence -} - -func (o *GetSilenceOK) Error() string { - return fmt.Sprintf("[GET /silence/{silenceID}][%d] getSilenceOK %+v", 200, o.Payload) -} - -func (o *GetSilenceOK) GetPayload() *ammodels.GettableSilence { - return o.Payload -} - -func (o *GetSilenceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ammodels.GettableSilence) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSilenceNotFound creates a GetSilenceNotFound with default headers values -func NewGetSilenceNotFound() *GetSilenceNotFound { - return &GetSilenceNotFound{} -} - -/* -GetSilenceNotFound describes a response with status code 404, with default header values. - -A silence with the specified ID was not found -*/ -type GetSilenceNotFound struct{} - -func (o *GetSilenceNotFound) Error() string { - return fmt.Sprintf("[GET /silence/{silenceID}][%d] getSilenceNotFound ", 404) -} - -func (o *GetSilenceNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - return nil -} - -// NewGetSilenceInternalServerError creates a GetSilenceInternalServerError with default headers values -func NewGetSilenceInternalServerError() *GetSilenceInternalServerError { - return &GetSilenceInternalServerError{} -} - -/* -GetSilenceInternalServerError describes a response with status code 500, with default header values. - -Internal server error -*/ -type GetSilenceInternalServerError struct { - Payload string -} - -func (o *GetSilenceInternalServerError) Error() string { - return fmt.Sprintf("[GET /silence/{silenceID}][%d] getSilenceInternalServerError %+v", 500, o.Payload) -} - -func (o *GetSilenceInternalServerError) GetPayload() string { - return o.Payload -} - -func (o *GetSilenceInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/api/alertmanager/amclient/silence/get_silences_parameters.go b/api/alertmanager/amclient/silence/get_silences_parameters.go deleted file mode 100644 index 87874ccb08..0000000000 --- a/api/alertmanager/amclient/silence/get_silences_parameters.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package silence - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetSilencesParams creates a new GetSilencesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetSilencesParams() *GetSilencesParams { - return &GetSilencesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetSilencesParamsWithTimeout creates a new GetSilencesParams object -// with the ability to set a timeout on a request. -func NewGetSilencesParamsWithTimeout(timeout time.Duration) *GetSilencesParams { - return &GetSilencesParams{ - timeout: timeout, - } -} - -// NewGetSilencesParamsWithContext creates a new GetSilencesParams object -// with the ability to set a context for a request. -func NewGetSilencesParamsWithContext(ctx context.Context) *GetSilencesParams { - return &GetSilencesParams{ - Context: ctx, - } -} - -// NewGetSilencesParamsWithHTTPClient creates a new GetSilencesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetSilencesParamsWithHTTPClient(client *http.Client) *GetSilencesParams { - return &GetSilencesParams{ - HTTPClient: client, - } -} - -/* -GetSilencesParams contains all the parameters to send to the API endpoint - - for the get silences operation. - - Typically these are written to a http.Request. -*/ -type GetSilencesParams struct { - /* Filter. - - A list of matchers to filter silences by - */ - Filter []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get silences params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSilencesParams) WithDefaults() *GetSilencesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get silences params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetSilencesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get silences params -func (o *GetSilencesParams) WithTimeout(timeout time.Duration) *GetSilencesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get silences params -func (o *GetSilencesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get silences params -func (o *GetSilencesParams) WithContext(ctx context.Context) *GetSilencesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get silences params -func (o *GetSilencesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get silences params -func (o *GetSilencesParams) WithHTTPClient(client *http.Client) *GetSilencesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get silences params -func (o *GetSilencesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFilter adds the filter to the get silences params -func (o *GetSilencesParams) WithFilter(filter []string) *GetSilencesParams { - o.SetFilter(filter) - return o -} - -// SetFilter adds the filter to the get silences params -func (o *GetSilencesParams) SetFilter(filter []string) { - o.Filter = filter -} - -// WriteToRequest writes these params to a swagger request -func (o *GetSilencesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Filter != nil { - - // binding items for filter - joinedFilter := o.bindParamFilter(reg) - - // query array param filter - if err := r.SetQueryParam("filter", joinedFilter...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamGetSilences binds the parameter filter -func (o *GetSilencesParams) bindParamFilter(formats strfmt.Registry) []string { - filterIR := o.Filter - - var filterIC []string - for _, filterIIR := range filterIR { // explode []string - - filterIIV := filterIIR // string as string - filterIC = append(filterIC, filterIIV) - } - - // items.CollectionFormat: "multi" - filterIS := swag.JoinByFormat(filterIC, "multi") - - return filterIS -} diff --git a/api/alertmanager/amclient/silence/get_silences_responses.go b/api/alertmanager/amclient/silence/get_silences_responses.go deleted file mode 100644 index 97d59f5b02..0000000000 --- a/api/alertmanager/amclient/silence/get_silences_responses.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package silence - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/percona/pmm/api/alertmanager/ammodels" -) - -// GetSilencesReader is a Reader for the GetSilences structure. -type GetSilencesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetSilencesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetSilencesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewGetSilencesInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetSilencesOK creates a GetSilencesOK with default headers values -func NewGetSilencesOK() *GetSilencesOK { - return &GetSilencesOK{} -} - -/* -GetSilencesOK describes a response with status code 200, with default header values. - -Get silences response -*/ -type GetSilencesOK struct { - Payload ammodels.GettableSilences -} - -func (o *GetSilencesOK) Error() string { - return fmt.Sprintf("[GET /silences][%d] getSilencesOK %+v", 200, o.Payload) -} - -func (o *GetSilencesOK) GetPayload() ammodels.GettableSilences { - return o.Payload -} - -func (o *GetSilencesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetSilencesInternalServerError creates a GetSilencesInternalServerError with default headers values -func NewGetSilencesInternalServerError() *GetSilencesInternalServerError { - return &GetSilencesInternalServerError{} -} - -/* -GetSilencesInternalServerError describes a response with status code 500, with default header values. - -Internal server error -*/ -type GetSilencesInternalServerError struct { - Payload string -} - -func (o *GetSilencesInternalServerError) Error() string { - return fmt.Sprintf("[GET /silences][%d] getSilencesInternalServerError %+v", 500, o.Payload) -} - -func (o *GetSilencesInternalServerError) GetPayload() string { - return o.Payload -} - -func (o *GetSilencesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/api/alertmanager/amclient/silence/post_silences_parameters.go b/api/alertmanager/amclient/silence/post_silences_parameters.go deleted file mode 100644 index d6cf74f892..0000000000 --- a/api/alertmanager/amclient/silence/post_silences_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package silence - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/percona/pmm/api/alertmanager/ammodels" -) - -// NewPostSilencesParams creates a new PostSilencesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPostSilencesParams() *PostSilencesParams { - return &PostSilencesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPostSilencesParamsWithTimeout creates a new PostSilencesParams object -// with the ability to set a timeout on a request. -func NewPostSilencesParamsWithTimeout(timeout time.Duration) *PostSilencesParams { - return &PostSilencesParams{ - timeout: timeout, - } -} - -// NewPostSilencesParamsWithContext creates a new PostSilencesParams object -// with the ability to set a context for a request. -func NewPostSilencesParamsWithContext(ctx context.Context) *PostSilencesParams { - return &PostSilencesParams{ - Context: ctx, - } -} - -// NewPostSilencesParamsWithHTTPClient creates a new PostSilencesParams object -// with the ability to set a custom HTTPClient for a request. -func NewPostSilencesParamsWithHTTPClient(client *http.Client) *PostSilencesParams { - return &PostSilencesParams{ - HTTPClient: client, - } -} - -/* -PostSilencesParams contains all the parameters to send to the API endpoint - - for the post silences operation. - - Typically these are written to a http.Request. -*/ -type PostSilencesParams struct { - /* Silence. - - The silence to create - */ - Silence *ammodels.PostableSilence - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the post silences params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PostSilencesParams) WithDefaults() *PostSilencesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the post silences params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PostSilencesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the post silences params -func (o *PostSilencesParams) WithTimeout(timeout time.Duration) *PostSilencesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the post silences params -func (o *PostSilencesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the post silences params -func (o *PostSilencesParams) WithContext(ctx context.Context) *PostSilencesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the post silences params -func (o *PostSilencesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the post silences params -func (o *PostSilencesParams) WithHTTPClient(client *http.Client) *PostSilencesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the post silences params -func (o *PostSilencesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSilence adds the silence to the post silences params -func (o *PostSilencesParams) WithSilence(silence *ammodels.PostableSilence) *PostSilencesParams { - o.SetSilence(silence) - return o -} - -// SetSilence adds the silence to the post silences params -func (o *PostSilencesParams) SetSilence(silence *ammodels.PostableSilence) { - o.Silence = silence -} - -// WriteToRequest writes these params to a swagger request -func (o *PostSilencesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Silence != nil { - if err := r.SetBodyParam(o.Silence); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/amclient/silence/post_silences_responses.go b/api/alertmanager/amclient/silence/post_silences_responses.go deleted file mode 100644 index 9e058a1a35..0000000000 --- a/api/alertmanager/amclient/silence/post_silences_responses.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package silence - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PostSilencesReader is a Reader for the PostSilences structure. -type PostSilencesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PostSilencesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPostSilencesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewPostSilencesBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewPostSilencesNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPostSilencesOK creates a PostSilencesOK with default headers values -func NewPostSilencesOK() *PostSilencesOK { - return &PostSilencesOK{} -} - -/* -PostSilencesOK describes a response with status code 200, with default header values. - -Create / update silence response -*/ -type PostSilencesOK struct { - Payload *PostSilencesOKBody -} - -func (o *PostSilencesOK) Error() string { - return fmt.Sprintf("[POST /silences][%d] postSilencesOK %+v", 200, o.Payload) -} - -func (o *PostSilencesOK) GetPayload() *PostSilencesOKBody { - return o.Payload -} - -func (o *PostSilencesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(PostSilencesOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPostSilencesBadRequest creates a PostSilencesBadRequest with default headers values -func NewPostSilencesBadRequest() *PostSilencesBadRequest { - return &PostSilencesBadRequest{} -} - -/* -PostSilencesBadRequest describes a response with status code 400, with default header values. - -Bad request -*/ -type PostSilencesBadRequest struct { - Payload string -} - -func (o *PostSilencesBadRequest) Error() string { - return fmt.Sprintf("[POST /silences][%d] postSilencesBadRequest %+v", 400, o.Payload) -} - -func (o *PostSilencesBadRequest) GetPayload() string { - return o.Payload -} - -func (o *PostSilencesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPostSilencesNotFound creates a PostSilencesNotFound with default headers values -func NewPostSilencesNotFound() *PostSilencesNotFound { - return &PostSilencesNotFound{} -} - -/* -PostSilencesNotFound describes a response with status code 404, with default header values. - -A silence with the specified ID was not found -*/ -type PostSilencesNotFound struct { - Payload string -} - -func (o *PostSilencesNotFound) Error() string { - return fmt.Sprintf("[POST /silences][%d] postSilencesNotFound %+v", 404, o.Payload) -} - -func (o *PostSilencesNotFound) GetPayload() string { - return o.Payload -} - -func (o *PostSilencesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -PostSilencesOKBody post silences o k body -swagger:model PostSilencesOKBody -*/ -type PostSilencesOKBody struct { - // silence ID - SilenceID string `json:"silenceID,omitempty"` -} - -// Validate validates this post silences o k body -func (o *PostSilencesOKBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this post silences o k body based on context it is used -func (o *PostSilencesOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *PostSilencesOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *PostSilencesOKBody) UnmarshalBinary(b []byte) error { - var res PostSilencesOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/alertmanager/amclient/silence/silence_client.go b/api/alertmanager/amclient/silence/silence_client.go deleted file mode 100644 index b4b927fb95..0000000000 --- a/api/alertmanager/amclient/silence/silence_client.go +++ /dev/null @@ -1,199 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package silence - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new silence API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for silence API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteSilence(params *DeleteSilenceParams, opts ...ClientOption) (*DeleteSilenceOK, error) - - GetSilence(params *GetSilenceParams, opts ...ClientOption) (*GetSilenceOK, error) - - GetSilences(params *GetSilencesParams, opts ...ClientOption) (*GetSilencesOK, error) - - PostSilences(params *PostSilencesParams, opts ...ClientOption) (*PostSilencesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeleteSilence Delete a silence by its ID -*/ -func (a *Client) DeleteSilence(params *DeleteSilenceParams, opts ...ClientOption) (*DeleteSilenceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteSilenceParams() - } - op := &runtime.ClientOperation{ - ID: "deleteSilence", - Method: "DELETE", - PathPattern: "/silence/{silenceID}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteSilenceReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteSilenceOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for deleteSilence: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetSilence Get a silence by its ID -*/ -func (a *Client) GetSilence(params *GetSilenceParams, opts ...ClientOption) (*GetSilenceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSilenceParams() - } - op := &runtime.ClientOperation{ - ID: "getSilence", - Method: "GET", - PathPattern: "/silence/{silenceID}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetSilenceReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetSilenceOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for getSilence: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetSilences Get a list of silences -*/ -func (a *Client) GetSilences(params *GetSilencesParams, opts ...ClientOption) (*GetSilencesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetSilencesParams() - } - op := &runtime.ClientOperation{ - ID: "getSilences", - Method: "GET", - PathPattern: "/silences", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetSilencesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetSilencesOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for getSilences: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -PostSilences Post a new silence or update an existing one -*/ -func (a *Client) PostSilences(params *PostSilencesParams, opts ...ClientOption) (*PostSilencesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPostSilencesParams() - } - op := &runtime.ClientOperation{ - ID: "postSilences", - Method: "POST", - PathPattern: "/silences", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PostSilencesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PostSilencesOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for postSilences: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/alertmanager/ammodels/alert.go b/api/alertmanager/ammodels/alert.go deleted file mode 100644 index 9ddec20cc6..0000000000 --- a/api/alertmanager/ammodels/alert.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Alert alert -// -// swagger:model alert -type Alert struct { - // generator URL - // Format: uri - GeneratorURL strfmt.URI `json:"generatorURL,omitempty"` - - // labels - // Required: true - Labels LabelSet `json:"labels"` -} - -// Validate validates this alert -func (m *Alert) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGeneratorURL(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLabels(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Alert) validateGeneratorURL(formats strfmt.Registry) error { - if swag.IsZero(m.GeneratorURL) { // not required - return nil - } - - if err := validate.FormatOf("generatorURL", "body", "uri", m.GeneratorURL.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *Alert) validateLabels(formats strfmt.Registry) error { - if err := validate.Required("labels", "body", m.Labels); err != nil { - return err - } - - if m.Labels != nil { - if err := m.Labels.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labels") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labels") - } - return err - } - } - - return nil -} - -// ContextValidate validate this alert based on the context it is used -func (m *Alert) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLabels(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Alert) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - if err := m.Labels.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labels") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labels") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Alert) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Alert) UnmarshalBinary(b []byte) error { - var res Alert - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/alert_group.go b/api/alertmanager/ammodels/alert_group.go deleted file mode 100644 index 55356edd73..0000000000 --- a/api/alertmanager/ammodels/alert_group.go +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AlertGroup alert group -// -// swagger:model alertGroup -type AlertGroup struct { - // alerts - // Required: true - Alerts []*GettableAlert `json:"alerts"` - - // labels - // Required: true - Labels LabelSet `json:"labels"` - - // receiver - // Required: true - Receiver *Receiver `json:"receiver"` -} - -// Validate validates this alert group -func (m *AlertGroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAlerts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLabels(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReceiver(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertGroup) validateAlerts(formats strfmt.Registry) error { - if err := validate.Required("alerts", "body", m.Alerts); err != nil { - return err - } - - for i := 0; i < len(m.Alerts); i++ { - if swag.IsZero(m.Alerts[i]) { // not required - continue - } - - if m.Alerts[i] != nil { - if err := m.Alerts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alerts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alerts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *AlertGroup) validateLabels(formats strfmt.Registry) error { - if err := validate.Required("labels", "body", m.Labels); err != nil { - return err - } - - if m.Labels != nil { - if err := m.Labels.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labels") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labels") - } - return err - } - } - - return nil -} - -func (m *AlertGroup) validateReceiver(formats strfmt.Registry) error { - if err := validate.Required("receiver", "body", m.Receiver); err != nil { - return err - } - - if m.Receiver != nil { - if err := m.Receiver.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("receiver") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("receiver") - } - return err - } - } - - return nil -} - -// ContextValidate validate this alert group based on the context it is used -func (m *AlertGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAlerts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLabels(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReceiver(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertGroup) contextValidateAlerts(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(m.Alerts); i++ { - if m.Alerts[i] != nil { - if err := m.Alerts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("alerts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("alerts" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -func (m *AlertGroup) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - if err := m.Labels.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labels") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labels") - } - return err - } - - return nil -} - -func (m *AlertGroup) contextValidateReceiver(ctx context.Context, formats strfmt.Registry) error { - if m.Receiver != nil { - if err := m.Receiver.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("receiver") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("receiver") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AlertGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertGroup) UnmarshalBinary(b []byte) error { - var res AlertGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/alert_groups.go b/api/alertmanager/ammodels/alert_groups.go deleted file mode 100644 index 7874cb4767..0000000000 --- a/api/alertmanager/ammodels/alert_groups.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AlertGroups alert groups -// -// swagger:model alertGroups -type AlertGroups []*AlertGroup - -// Validate validates this alert groups -func (m AlertGroups) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this alert groups based on the context it is used -func (m AlertGroups) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/ammodels/alert_status.go b/api/alertmanager/ammodels/alert_status.go deleted file mode 100644 index f9181cc758..0000000000 --- a/api/alertmanager/ammodels/alert_status.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AlertStatus alert status -// -// swagger:model alertStatus -type AlertStatus struct { - // inhibited by - // Required: true - InhibitedBy []string `json:"inhibitedBy"` - - // silenced by - // Required: true - SilencedBy []string `json:"silencedBy"` - - // state - // Required: true - // Enum: [unprocessed active suppressed] - State *string `json:"state"` -} - -// Validate validates this alert status -func (m *AlertStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInhibitedBy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSilencedBy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertStatus) validateInhibitedBy(formats strfmt.Registry) error { - if err := validate.Required("inhibitedBy", "body", m.InhibitedBy); err != nil { - return err - } - - return nil -} - -func (m *AlertStatus) validateSilencedBy(formats strfmt.Registry) error { - if err := validate.Required("silencedBy", "body", m.SilencedBy); err != nil { - return err - } - - return nil -} - -var alertStatusTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["unprocessed","active","suppressed"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - alertStatusTypeStatePropEnum = append(alertStatusTypeStatePropEnum, v) - } -} - -const ( - - // AlertStatusStateUnprocessed captures enum value "unprocessed" - AlertStatusStateUnprocessed string = "unprocessed" - - // AlertStatusStateActive captures enum value "active" - AlertStatusStateActive string = "active" - - // AlertStatusStateSuppressed captures enum value "suppressed" - AlertStatusStateSuppressed string = "suppressed" -) - -// prop value enum -func (m *AlertStatus) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, alertStatusTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *AlertStatus) validateState(formats strfmt.Registry) error { - if err := validate.Required("state", "body", m.State); err != nil { - return err - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this alert status based on context it is used -func (m *AlertStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertStatus) UnmarshalBinary(b []byte) error { - var res AlertStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/alertmanager_config.go b/api/alertmanager/ammodels/alertmanager_config.go deleted file mode 100644 index 9bf4d77ee9..0000000000 --- a/api/alertmanager/ammodels/alertmanager_config.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AlertmanagerConfig alertmanager config -// -// swagger:model alertmanagerConfig -type AlertmanagerConfig struct { - // original - // Required: true - Original *string `json:"original"` -} - -// Validate validates this alertmanager config -func (m *AlertmanagerConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOriginal(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertmanagerConfig) validateOriginal(formats strfmt.Registry) error { - if err := validate.Required("original", "body", m.Original); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this alertmanager config based on context it is used -func (m *AlertmanagerConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AlertmanagerConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertmanagerConfig) UnmarshalBinary(b []byte) error { - var res AlertmanagerConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/alertmanager_status.go b/api/alertmanager/ammodels/alertmanager_status.go deleted file mode 100644 index c15d71e5df..0000000000 --- a/api/alertmanager/ammodels/alertmanager_status.go +++ /dev/null @@ -1,217 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AlertmanagerStatus alertmanager status -// -// swagger:model alertmanagerStatus -type AlertmanagerStatus struct { - // cluster - // Required: true - Cluster *ClusterStatus `json:"cluster"` - - // config - // Required: true - Config *AlertmanagerConfig `json:"config"` - - // uptime - // Required: true - // Format: date-time - Uptime *strfmt.DateTime `json:"uptime"` - - // version info - // Required: true - VersionInfo *VersionInfo `json:"versionInfo"` -} - -// Validate validates this alertmanager status -func (m *AlertmanagerStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCluster(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUptime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersionInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertmanagerStatus) validateCluster(formats strfmt.Registry) error { - if err := validate.Required("cluster", "body", m.Cluster); err != nil { - return err - } - - if m.Cluster != nil { - if err := m.Cluster.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *AlertmanagerStatus) validateConfig(formats strfmt.Registry) error { - if err := validate.Required("config", "body", m.Config); err != nil { - return err - } - - if m.Config != nil { - if err := m.Config.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("config") - } - return err - } - } - - return nil -} - -func (m *AlertmanagerStatus) validateUptime(formats strfmt.Registry) error { - if err := validate.Required("uptime", "body", m.Uptime); err != nil { - return err - } - - if err := validate.FormatOf("uptime", "body", "date-time", m.Uptime.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *AlertmanagerStatus) validateVersionInfo(formats strfmt.Registry) error { - if err := validate.Required("versionInfo", "body", m.VersionInfo); err != nil { - return err - } - - if m.VersionInfo != nil { - if err := m.VersionInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versionInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this alertmanager status based on the context it is used -func (m *AlertmanagerStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCluster(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateVersionInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AlertmanagerStatus) contextValidateCluster(ctx context.Context, formats strfmt.Registry) error { - if m.Cluster != nil { - if err := m.Cluster.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cluster") - } - return err - } - } - - return nil -} - -func (m *AlertmanagerStatus) contextValidateConfig(ctx context.Context, formats strfmt.Registry) error { - if m.Config != nil { - if err := m.Config.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("config") - } - return err - } - } - - return nil -} - -func (m *AlertmanagerStatus) contextValidateVersionInfo(ctx context.Context, formats strfmt.Registry) error { - if m.VersionInfo != nil { - if err := m.VersionInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("versionInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("versionInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AlertmanagerStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AlertmanagerStatus) UnmarshalBinary(b []byte) error { - var res AlertmanagerStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/cluster_status.go b/api/alertmanager/ammodels/cluster_status.go deleted file mode 100644 index ed8ff362a5..0000000000 --- a/api/alertmanager/ammodels/cluster_status.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterStatus cluster status -// -// swagger:model clusterStatus -type ClusterStatus struct { - // name - Name string `json:"name,omitempty"` - - // peers - Peers []*PeerStatus `json:"peers"` - - // status - // Required: true - // Enum: [ready settling disabled] - Status *string `json:"status"` -} - -// Validate validates this cluster status -func (m *ClusterStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePeers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterStatus) validatePeers(formats strfmt.Registry) error { - if swag.IsZero(m.Peers) { // not required - return nil - } - - for i := 0; i < len(m.Peers); i++ { - if swag.IsZero(m.Peers[i]) { // not required - continue - } - - if m.Peers[i] != nil { - if err := m.Peers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("peers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("peers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -var clusterStatusTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ready","settling","disabled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - clusterStatusTypeStatusPropEnum = append(clusterStatusTypeStatusPropEnum, v) - } -} - -const ( - - // ClusterStatusStatusReady captures enum value "ready" - ClusterStatusStatusReady string = "ready" - - // ClusterStatusStatusSettling captures enum value "settling" - ClusterStatusStatusSettling string = "settling" - - // ClusterStatusStatusDisabled captures enum value "disabled" - ClusterStatusStatusDisabled string = "disabled" -) - -// prop value enum -func (m *ClusterStatus) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, clusterStatusTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *ClusterStatus) validateStatus(formats strfmt.Registry) error { - if err := validate.Required("status", "body", m.Status); err != nil { - return err - } - - // value enum - if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this cluster status based on the context it is used -func (m *ClusterStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePeers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterStatus) contextValidatePeers(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(m.Peers); i++ { - if m.Peers[i] != nil { - if err := m.Peers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("peers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("peers" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterStatus) UnmarshalBinary(b []byte) error { - var res ClusterStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/gettable_alert.go b/api/alertmanager/ammodels/gettable_alert.go deleted file mode 100644 index ed9b93972e..0000000000 --- a/api/alertmanager/ammodels/gettable_alert.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GettableAlert gettable alert -// -// swagger:model gettableAlert -type GettableAlert struct { - // annotations - // Required: true - Annotations LabelSet `json:"annotations"` - - // ends at - // Required: true - // Format: date-time - EndsAt *strfmt.DateTime `json:"endsAt"` - - // fingerprint - // Required: true - Fingerprint *string `json:"fingerprint"` - - // receivers - // Required: true - Receivers []*Receiver `json:"receivers"` - - // starts at - // Required: true - // Format: date-time - StartsAt *strfmt.DateTime `json:"startsAt"` - - // status - // Required: true - Status *AlertStatus `json:"status"` - - // updated at - // Required: true - // Format: date-time - UpdatedAt *strfmt.DateTime `json:"updatedAt"` - - Alert -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GettableAlert) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Annotations LabelSet `json:"annotations"` - - EndsAt *strfmt.DateTime `json:"endsAt"` - - Fingerprint *string `json:"fingerprint"` - - Receivers []*Receiver `json:"receivers"` - - StartsAt *strfmt.DateTime `json:"startsAt"` - - Status *AlertStatus `json:"status"` - - UpdatedAt *strfmt.DateTime `json:"updatedAt"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Annotations = dataAO0.Annotations - - m.EndsAt = dataAO0.EndsAt - - m.Fingerprint = dataAO0.Fingerprint - - m.Receivers = dataAO0.Receivers - - m.StartsAt = dataAO0.StartsAt - - m.Status = dataAO0.Status - - m.UpdatedAt = dataAO0.UpdatedAt - - // AO1 - var aO1 Alert - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.Alert = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GettableAlert) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Annotations LabelSet `json:"annotations"` - - EndsAt *strfmt.DateTime `json:"endsAt"` - - Fingerprint *string `json:"fingerprint"` - - Receivers []*Receiver `json:"receivers"` - - StartsAt *strfmt.DateTime `json:"startsAt"` - - Status *AlertStatus `json:"status"` - - UpdatedAt *strfmt.DateTime `json:"updatedAt"` - } - - dataAO0.Annotations = m.Annotations - - dataAO0.EndsAt = m.EndsAt - - dataAO0.Fingerprint = m.Fingerprint - - dataAO0.Receivers = m.Receivers - - dataAO0.StartsAt = m.StartsAt - - dataAO0.Status = m.Status - - dataAO0.UpdatedAt = m.UpdatedAt - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.Alert) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this gettable alert -func (m *GettableAlert) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAnnotations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndsAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFingerprint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReceivers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartsAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpdatedAt(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with Alert - if err := m.Alert.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GettableAlert) validateAnnotations(formats strfmt.Registry) error { - if err := validate.Required("annotations", "body", m.Annotations); err != nil { - return err - } - - if m.Annotations != nil { - if err := m.Annotations.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("annotations") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("annotations") - } - return err - } - } - - return nil -} - -func (m *GettableAlert) validateEndsAt(formats strfmt.Registry) error { - if err := validate.Required("endsAt", "body", m.EndsAt); err != nil { - return err - } - - if err := validate.FormatOf("endsAt", "body", "date-time", m.EndsAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *GettableAlert) validateFingerprint(formats strfmt.Registry) error { - if err := validate.Required("fingerprint", "body", m.Fingerprint); err != nil { - return err - } - - return nil -} - -func (m *GettableAlert) validateReceivers(formats strfmt.Registry) error { - if err := validate.Required("receivers", "body", m.Receivers); err != nil { - return err - } - - for i := 0; i < len(m.Receivers); i++ { - if swag.IsZero(m.Receivers[i]) { // not required - continue - } - - if m.Receivers[i] != nil { - if err := m.Receivers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("receivers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("receivers" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *GettableAlert) validateStartsAt(formats strfmt.Registry) error { - if err := validate.Required("startsAt", "body", m.StartsAt); err != nil { - return err - } - - if err := validate.FormatOf("startsAt", "body", "date-time", m.StartsAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *GettableAlert) validateStatus(formats strfmt.Registry) error { - if err := validate.Required("status", "body", m.Status); err != nil { - return err - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -func (m *GettableAlert) validateUpdatedAt(formats strfmt.Registry) error { - if err := validate.Required("updatedAt", "body", m.UpdatedAt); err != nil { - return err - } - - if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this gettable alert based on the context it is used -func (m *GettableAlert) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAnnotations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReceivers(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with Alert - if err := m.Alert.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GettableAlert) contextValidateAnnotations(ctx context.Context, formats strfmt.Registry) error { - if err := m.Annotations.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("annotations") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("annotations") - } - return err - } - - return nil -} - -func (m *GettableAlert) contextValidateReceivers(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(m.Receivers); i++ { - if m.Receivers[i] != nil { - if err := m.Receivers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("receivers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("receivers" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -func (m *GettableAlert) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - if m.Status != nil { - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GettableAlert) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GettableAlert) UnmarshalBinary(b []byte) error { - var res GettableAlert - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/gettable_alerts.go b/api/alertmanager/ammodels/gettable_alerts.go deleted file mode 100644 index 6c7da339c2..0000000000 --- a/api/alertmanager/ammodels/gettable_alerts.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GettableAlerts gettable alerts -// -// swagger:model gettableAlerts -type GettableAlerts []*GettableAlert - -// Validate validates this gettable alerts -func (m GettableAlerts) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this gettable alerts based on the context it is used -func (m GettableAlerts) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/ammodels/gettable_silence.go b/api/alertmanager/ammodels/gettable_silence.go deleted file mode 100644 index e30488fb42..0000000000 --- a/api/alertmanager/ammodels/gettable_silence.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GettableSilence gettable silence -// -// swagger:model gettableSilence -type GettableSilence struct { - // id - // Required: true - ID *string `json:"id"` - - // status - // Required: true - Status *SilenceStatus `json:"status"` - - // updated at - // Required: true - // Format: date-time - UpdatedAt *strfmt.DateTime `json:"updatedAt"` - - Silence -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GettableSilence) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ID *string `json:"id"` - - Status *SilenceStatus `json:"status"` - - UpdatedAt *strfmt.DateTime `json:"updatedAt"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ID = dataAO0.ID - - m.Status = dataAO0.Status - - m.UpdatedAt = dataAO0.UpdatedAt - - // AO1 - var aO1 Silence - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.Silence = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GettableSilence) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ID *string `json:"id"` - - Status *SilenceStatus `json:"status"` - - UpdatedAt *strfmt.DateTime `json:"updatedAt"` - } - - dataAO0.ID = m.ID - - dataAO0.Status = m.Status - - dataAO0.UpdatedAt = m.UpdatedAt - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.Silence) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this gettable silence -func (m *GettableSilence) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUpdatedAt(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with Silence - if err := m.Silence.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GettableSilence) validateID(formats strfmt.Registry) error { - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - -func (m *GettableSilence) validateStatus(formats strfmt.Registry) error { - if err := validate.Required("status", "body", m.Status); err != nil { - return err - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -func (m *GettableSilence) validateUpdatedAt(formats strfmt.Registry) error { - if err := validate.Required("updatedAt", "body", m.UpdatedAt); err != nil { - return err - } - - if err := validate.FormatOf("updatedAt", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this gettable silence based on the context it is used -func (m *GettableSilence) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with Silence - if err := m.Silence.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GettableSilence) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - if m.Status != nil { - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GettableSilence) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GettableSilence) UnmarshalBinary(b []byte) error { - var res GettableSilence - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/gettable_silences.go b/api/alertmanager/ammodels/gettable_silences.go deleted file mode 100644 index 1716c7666e..0000000000 --- a/api/alertmanager/ammodels/gettable_silences.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GettableSilences gettable silences -// -// swagger:model gettableSilences -type GettableSilences []*GettableSilence - -// Validate validates this gettable silences -func (m GettableSilences) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this gettable silences based on the context it is used -func (m GettableSilences) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/ammodels/label_set.go b/api/alertmanager/ammodels/label_set.go deleted file mode 100644 index 2112083a00..0000000000 --- a/api/alertmanager/ammodels/label_set.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" -) - -// LabelSet label set -// -// swagger:model labelSet -type LabelSet map[string]string - -// Validate validates this label set -func (m LabelSet) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this label set based on context it is used -func (m LabelSet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/api/alertmanager/ammodels/matcher.go b/api/alertmanager/ammodels/matcher.go deleted file mode 100644 index acbf7e8df5..0000000000 --- a/api/alertmanager/ammodels/matcher.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Matcher matcher -// -// swagger:model matcher -type Matcher struct { - // is regex - // Required: true - IsRegex *bool `json:"isRegex"` - - // name - // Required: true - Name *string `json:"name"` - - // value - // Required: true - Value *string `json:"value"` -} - -// Validate validates this matcher -func (m *Matcher) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIsRegex(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Matcher) validateIsRegex(formats strfmt.Registry) error { - if err := validate.Required("isRegex", "body", m.IsRegex); err != nil { - return err - } - - return nil -} - -func (m *Matcher) validateName(formats strfmt.Registry) error { - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -func (m *Matcher) validateValue(formats strfmt.Registry) error { - if err := validate.Required("value", "body", m.Value); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this matcher based on context it is used -func (m *Matcher) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Matcher) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Matcher) UnmarshalBinary(b []byte) error { - var res Matcher - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/matchers.go b/api/alertmanager/ammodels/matchers.go deleted file mode 100644 index 7c85974e31..0000000000 --- a/api/alertmanager/ammodels/matchers.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Matchers matchers -// -// swagger:model matchers -type Matchers []*Matcher - -// Validate validates this matchers -func (m Matchers) Validate(formats strfmt.Registry) error { - var res []error - - iMatchersSize := int64(len(m)) - - if err := validate.MinItems("", "body", iMatchersSize, 1); err != nil { - return err - } - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this matchers based on the context it is used -func (m Matchers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/ammodels/peer_status.go b/api/alertmanager/ammodels/peer_status.go deleted file mode 100644 index 485d1b5a02..0000000000 --- a/api/alertmanager/ammodels/peer_status.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PeerStatus peer status -// -// swagger:model peerStatus -type PeerStatus struct { - // address - // Required: true - Address *string `json:"address"` - - // name - // Required: true - Name *string `json:"name"` -} - -// Validate validates this peer status -func (m *PeerStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAddress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PeerStatus) validateAddress(formats strfmt.Registry) error { - if err := validate.Required("address", "body", m.Address); err != nil { - return err - } - - return nil -} - -func (m *PeerStatus) validateName(formats strfmt.Registry) error { - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this peer status based on context it is used -func (m *PeerStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *PeerStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PeerStatus) UnmarshalBinary(b []byte) error { - var res PeerStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/postable_alert.go b/api/alertmanager/ammodels/postable_alert.go deleted file mode 100644 index f71bcd2984..0000000000 --- a/api/alertmanager/ammodels/postable_alert.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// PostableAlert postable alert -// -// swagger:model postableAlert -type PostableAlert struct { - // annotations - Annotations LabelSet `json:"annotations,omitempty"` - - // ends at - // Format: date-time - EndsAt strfmt.DateTime `json:"endsAt,omitempty"` - - // starts at - // Format: date-time - StartsAt strfmt.DateTime `json:"startsAt,omitempty"` - - Alert -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *PostableAlert) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - Annotations LabelSet `json:"annotations,omitempty"` - - EndsAt strfmt.DateTime `json:"endsAt,omitempty"` - - StartsAt strfmt.DateTime `json:"startsAt,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.Annotations = dataAO0.Annotations - - m.EndsAt = dataAO0.EndsAt - - m.StartsAt = dataAO0.StartsAt - - // AO1 - var aO1 Alert - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.Alert = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m PostableAlert) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - Annotations LabelSet `json:"annotations,omitempty"` - - EndsAt strfmt.DateTime `json:"endsAt,omitempty"` - - StartsAt strfmt.DateTime `json:"startsAt,omitempty"` - } - - dataAO0.Annotations = m.Annotations - - dataAO0.EndsAt = m.EndsAt - - dataAO0.StartsAt = m.StartsAt - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.Alert) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this postable alert -func (m *PostableAlert) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAnnotations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndsAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartsAt(formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with Alert - if err := m.Alert.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PostableAlert) validateAnnotations(formats strfmt.Registry) error { - if swag.IsZero(m.Annotations) { // not required - return nil - } - - if m.Annotations != nil { - if err := m.Annotations.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("annotations") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("annotations") - } - return err - } - } - - return nil -} - -func (m *PostableAlert) validateEndsAt(formats strfmt.Registry) error { - if swag.IsZero(m.EndsAt) { // not required - return nil - } - - if err := validate.FormatOf("endsAt", "body", "date-time", m.EndsAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *PostableAlert) validateStartsAt(formats strfmt.Registry) error { - if swag.IsZero(m.StartsAt) { // not required - return nil - } - - if err := validate.FormatOf("startsAt", "body", "date-time", m.StartsAt.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this postable alert based on the context it is used -func (m *PostableAlert) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAnnotations(ctx, formats); err != nil { - res = append(res, err) - } - - // validation for a type composition with Alert - if err := m.Alert.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PostableAlert) contextValidateAnnotations(ctx context.Context, formats strfmt.Registry) error { - if err := m.Annotations.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("annotations") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("annotations") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PostableAlert) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PostableAlert) UnmarshalBinary(b []byte) error { - var res PostableAlert - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/postable_alerts.go b/api/alertmanager/ammodels/postable_alerts.go deleted file mode 100644 index fe611102e5..0000000000 --- a/api/alertmanager/ammodels/postable_alerts.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PostableAlerts postable alerts -// -// swagger:model postableAlerts -type PostableAlerts []*PostableAlert - -// Validate validates this postable alerts -func (m PostableAlerts) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this postable alerts based on the context it is used -func (m PostableAlerts) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/alertmanager/ammodels/postable_silence.go b/api/alertmanager/ammodels/postable_silence.go deleted file mode 100644 index 499bef9c00..0000000000 --- a/api/alertmanager/ammodels/postable_silence.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PostableSilence postable silence -// -// swagger:model postableSilence -type PostableSilence struct { - // id - ID string `json:"id,omitempty"` - - Silence -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *PostableSilence) UnmarshalJSON(raw []byte) error { - // AO0 - var dataAO0 struct { - ID string `json:"id,omitempty"` - } - if err := swag.ReadJSON(raw, &dataAO0); err != nil { - return err - } - - m.ID = dataAO0.ID - - // AO1 - var aO1 Silence - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.Silence = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m PostableSilence) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - var dataAO0 struct { - ID string `json:"id,omitempty"` - } - - dataAO0.ID = m.ID - - jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) - if errAO0 != nil { - return nil, errAO0 - } - _parts = append(_parts, jsonDataAO0) - - aO1, err := swag.WriteJSON(m.Silence) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this postable silence -func (m *PostableSilence) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Silence - if err := m.Silence.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this postable silence based on the context it is used -func (m *PostableSilence) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Silence - if err := m.Silence.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *PostableSilence) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PostableSilence) UnmarshalBinary(b []byte) error { - var res PostableSilence - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/receiver.go b/api/alertmanager/ammodels/receiver.go deleted file mode 100644 index bcc45e49b0..0000000000 --- a/api/alertmanager/ammodels/receiver.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Receiver receiver -// -// swagger:model receiver -type Receiver struct { - // name - // Required: true - Name *string `json:"name"` -} - -// Validate validates this receiver -func (m *Receiver) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Receiver) validateName(formats strfmt.Registry) error { - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this receiver based on context it is used -func (m *Receiver) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Receiver) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Receiver) UnmarshalBinary(b []byte) error { - var res Receiver - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/silence.go b/api/alertmanager/ammodels/silence.go deleted file mode 100644 index c045daf3f8..0000000000 --- a/api/alertmanager/ammodels/silence.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Silence silence -// -// swagger:model silence -type Silence struct { - // comment - // Required: true - Comment *string `json:"comment"` - - // created by - // Required: true - CreatedBy *string `json:"createdBy"` - - // ends at - // Required: true - // Format: date-time - EndsAt *strfmt.DateTime `json:"endsAt"` - - // matchers - // Required: true - Matchers Matchers `json:"matchers"` - - // starts at - // Required: true - // Format: date-time - StartsAt *strfmt.DateTime `json:"startsAt"` -} - -// Validate validates this silence -func (m *Silence) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateComment(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCreatedBy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateEndsAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMatchers(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartsAt(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Silence) validateComment(formats strfmt.Registry) error { - if err := validate.Required("comment", "body", m.Comment); err != nil { - return err - } - - return nil -} - -func (m *Silence) validateCreatedBy(formats strfmt.Registry) error { - if err := validate.Required("createdBy", "body", m.CreatedBy); err != nil { - return err - } - - return nil -} - -func (m *Silence) validateEndsAt(formats strfmt.Registry) error { - if err := validate.Required("endsAt", "body", m.EndsAt); err != nil { - return err - } - - if err := validate.FormatOf("endsAt", "body", "date-time", m.EndsAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *Silence) validateMatchers(formats strfmt.Registry) error { - if err := validate.Required("matchers", "body", m.Matchers); err != nil { - return err - } - - if err := m.Matchers.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matchers") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matchers") - } - return err - } - - return nil -} - -func (m *Silence) validateStartsAt(formats strfmt.Registry) error { - if err := validate.Required("startsAt", "body", m.StartsAt); err != nil { - return err - } - - if err := validate.FormatOf("startsAt", "body", "date-time", m.StartsAt.String(), formats); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this silence based on the context it is used -func (m *Silence) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMatchers(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Silence) contextValidateMatchers(ctx context.Context, formats strfmt.Registry) error { - if err := m.Matchers.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matchers") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matchers") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Silence) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Silence) UnmarshalBinary(b []byte) error { - var res Silence - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/silence_status.go b/api/alertmanager/ammodels/silence_status.go deleted file mode 100644 index 0dd31aff13..0000000000 --- a/api/alertmanager/ammodels/silence_status.go +++ /dev/null @@ -1,108 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SilenceStatus silence status -// -// swagger:model silenceStatus -type SilenceStatus struct { - // state - // Required: true - // Enum: [expired active pending] - State *string `json:"state"` -} - -// Validate validates this silence status -func (m *SilenceStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var silenceStatusTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["expired","active","pending"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - silenceStatusTypeStatePropEnum = append(silenceStatusTypeStatePropEnum, v) - } -} - -const ( - - // SilenceStatusStateExpired captures enum value "expired" - SilenceStatusStateExpired string = "expired" - - // SilenceStatusStateActive captures enum value "active" - SilenceStatusStateActive string = "active" - - // SilenceStatusStatePending captures enum value "pending" - SilenceStatusStatePending string = "pending" -) - -// prop value enum -func (m *SilenceStatus) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, silenceStatusTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *SilenceStatus) validateState(formats strfmt.Registry) error { - if err := validate.Required("state", "body", m.State); err != nil { - return err - } - - // value enum - if err := m.validateStateEnum("state", "body", *m.State); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this silence status based on context it is used -func (m *SilenceStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SilenceStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SilenceStatus) UnmarshalBinary(b []byte) error { - var res SilenceStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/ammodels/version_info.go b/api/alertmanager/ammodels/version_info.go deleted file mode 100644 index acd897e222..0000000000 --- a/api/alertmanager/ammodels/version_info.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ammodels - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// VersionInfo version info -// -// swagger:model versionInfo -type VersionInfo struct { - // branch - // Required: true - Branch *string `json:"branch"` - - // build date - // Required: true - BuildDate *string `json:"buildDate"` - - // build user - // Required: true - BuildUser *string `json:"buildUser"` - - // go version - // Required: true - GoVersion *string `json:"goVersion"` - - // revision - // Required: true - Revision *string `json:"revision"` - - // version - // Required: true - Version *string `json:"version"` -} - -// Validate validates this version info -func (m *VersionInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBranch(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBuildDate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBuildUser(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGoVersion(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRevision(formats); err != nil { - res = append(res, err) - } - - if err := m.validateVersion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VersionInfo) validateBranch(formats strfmt.Registry) error { - if err := validate.Required("branch", "body", m.Branch); err != nil { - return err - } - - return nil -} - -func (m *VersionInfo) validateBuildDate(formats strfmt.Registry) error { - if err := validate.Required("buildDate", "body", m.BuildDate); err != nil { - return err - } - - return nil -} - -func (m *VersionInfo) validateBuildUser(formats strfmt.Registry) error { - if err := validate.Required("buildUser", "body", m.BuildUser); err != nil { - return err - } - - return nil -} - -func (m *VersionInfo) validateGoVersion(formats strfmt.Registry) error { - if err := validate.Required("goVersion", "body", m.GoVersion); err != nil { - return err - } - - return nil -} - -func (m *VersionInfo) validateRevision(formats strfmt.Registry) error { - if err := validate.Required("revision", "body", m.Revision); err != nil { - return err - } - - return nil -} - -func (m *VersionInfo) validateVersion(formats strfmt.Registry) error { - if err := validate.Required("version", "body", m.Version); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this version info based on context it is used -func (m *VersionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VersionInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VersionInfo) UnmarshalBinary(b []byte) error { - var res VersionInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/alertmanager/openapi.yaml b/api/alertmanager/openapi.yaml deleted file mode 100644 index 84e8297a58..0000000000 --- a/api/alertmanager/openapi.yaml +++ /dev/null @@ -1,520 +0,0 @@ ---- - -swagger: '2.0' - -info: - version: 0.0.1 - title: Alertmanager API - description: API of the Prometheus Alertmanager (https://github.com/prometheus/alertmanager) - license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html - -consumes: - - "application/json" -produces: - - "application/json" - -paths: - /status: - get: - tags: - - general - operationId: getStatus - description: Get current status of an Alertmanager instance and its cluster - responses: - '200': - description: Get status response - schema: - $ref: '#/definitions/alertmanagerStatus' - /receivers: - get: - tags: - - receiver - operationId: getReceivers - description: Get list of all receivers (name of notification integrations) - responses: - '200': - description: Get receivers response - schema: - type: array - items: - $ref: '#/definitions/receiver' - /silences: - get: - tags: - - silence - operationId: getSilences - description: Get a list of silences - responses: - '200': - description: Get silences response - schema: - $ref: '#/definitions/gettableSilences' - '500': - $ref: '#/responses/InternalServerError' - parameters: - - name: filter - in: query - description: A list of matchers to filter silences by - required: false - type: array - collectionFormat: multi - items: - type: string - post: - tags: - - silence - operationId: postSilences - description: Post a new silence or update an existing one - parameters: - - in: body - name: silence - description: The silence to create - required: true - schema: - $ref: '#/definitions/postableSilence' - responses: - '200': - description: Create / update silence response - schema: - type: object - properties: - silenceID: - type: string - '400': - $ref: '#/responses/BadRequest' - '404': - description: A silence with the specified ID was not found - schema: - type: string - /silence/{silenceID}: - parameters: - - in: path - name: silenceID - type: string - format: uuid - required: true - description: ID of the silence to get - get: - tags: - - silence - operationId: getSilence - description: Get a silence by its ID - responses: - '200': - description: Get silence response - schema: - $ref: '#/definitions/gettableSilence' - '404': - description: A silence with the specified ID was not found - '500': - $ref: '#/responses/InternalServerError' - delete: - tags: - - silence - operationId: deleteSilence - description: Delete a silence by its ID - parameters: - - in: path - name: silenceID - type: string - format: uuid - required: true - description: ID of the silence to get - responses: - '200': - description: Delete silence response - '500': - $ref: '#/responses/InternalServerError' - /alerts: - get: - tags: - - alert - operationId: getAlerts - description: Get a list of alerts - parameters: - - in: query - name: active - type: boolean - description: Show active alerts - default: true - - in: query - name: silenced - type: boolean - description: Show silenced alerts - default: true - - in: query - name: inhibited - type: boolean - description: Show inhibited alerts - default: true - - in: query - name: unprocessed - type: boolean - description: Show unprocessed alerts - default: true - - name: filter - in: query - description: A list of matchers to filter alerts by - required: false - type: array - collectionFormat: multi - items: - type: string - - name: receiver - in: query - description: A regex matching receivers to filter alerts by - required: false - type: string - responses: - '200': - description: Get alerts response - schema: - '$ref': '#/definitions/gettableAlerts' - '400': - $ref: '#/responses/BadRequest' - '500': - $ref: '#/responses/InternalServerError' - post: - tags: - - alert - operationId: postAlerts - description: Create new Alerts - parameters: - - in: body - name: alerts - description: The alerts to create - required: true - schema: - $ref: '#/definitions/postableAlerts' - responses: - '200': - description: Create alerts response - '500': - $ref: '#/responses/InternalServerError' - '400': - $ref: '#/responses/BadRequest' - /alerts/groups: - get: - tags: - - alertgroup - operationId: getAlertGroups - description: Get a list of alert groups - parameters: - - in: query - name: active - type: boolean - description: Show active alerts - default: true - - in: query - name: silenced - type: boolean - description: Show silenced alerts - default: true - - in: query - name: inhibited - type: boolean - description: Show inhibited alerts - default: true - - name: filter - in: query - description: A list of matchers to filter alerts by - required: false - type: array - collectionFormat: multi - items: - type: string - - name: receiver - in: query - description: A regex matching receivers to filter alerts by - required: false - type: string - responses: - '200': - description: Get alert groups response - schema: - '$ref': '#/definitions/alertGroups' - '400': - $ref: '#/responses/BadRequest' - '500': - $ref: '#/responses/InternalServerError' - -responses: - BadRequest: - description: Bad request - schema: - type: string - InternalServerError: - description: Internal server error - schema: - type: string - - -definitions: - alertmanagerStatus: - type: object - properties: - cluster: - $ref: '#/definitions/clusterStatus' - versionInfo: - $ref: '#/definitions/versionInfo' - config: - $ref: '#/definitions/alertmanagerConfig' - uptime: - type: string - format: date-time - required: - - cluster - - versionInfo - - config - - uptime - clusterStatus: - type: object - properties: - name: - type: string - status: - type: string - enum: ["ready", "settling", "disabled"] - peers: - type: array - items: - $ref: '#/definitions/peerStatus' - required: - - status - alertmanagerConfig: - type: object - properties: - original: - type: string - required: - - original - versionInfo: - type: object - properties: - version: - type: string - revision: - type: string - branch: - type: string - buildUser: - type: string - buildDate: - type: string - goVersion: - type: string - required: - - version - - revision - - branch - - buildUser - - buildDate - - goVersion - peerStatus: - type: object - properties: - name: - type: string - address: - type: string - required: - - name - - address - silence: - type: object - properties: - matchers: - $ref: '#/definitions/matchers' - startsAt: - type: string - format: date-time - endsAt: - type: string - format: date-time - createdBy: - type: string - comment: - type: string - required: - - matchers - - startsAt - - endsAt - - createdBy - - comment - gettableSilence: - allOf: - - type: object - properties: - id: - type: string - status: - $ref: '#/definitions/silenceStatus' - updatedAt: - type: string - format: date-time - required: - - id - - status - - updatedAt - - $ref: '#/definitions/silence' - postableSilence: - allOf: - - type: object - properties: - id: - type: string - - $ref: '#/definitions/silence' - silenceStatus: - type: object - properties: - state: - type: string - enum: ["expired", "active", "pending"] - required: - - state - gettableSilences: - type: array - items: - $ref: '#/definitions/gettableSilence' - matchers: - type: array - items: - $ref: '#/definitions/matcher' - minItems: 1 - matcher: - type: object - properties: - name: - type: string - value: - type: string - isRegex: - type: boolean - required: - - name - - value - - isRegex - alert: - type: object - properties: - labels: - $ref: '#/definitions/labelSet' - generatorURL: - type: string - format: uri - required: - - labels - gettableAlerts: - type: array - items: - $ref: '#/definitions/gettableAlert' - gettableAlert: - allOf: - - type: object - properties: - annotations: - $ref: '#/definitions/labelSet' - receivers: - type: array - items: - $ref: '#/definitions/receiver' - fingerprint: - type: string - startsAt: - type: string - format: date-time - updatedAt: - type: string - format: date-time - endsAt: - type: string - format: date-time - status: - $ref: '#/definitions/alertStatus' - required: - - receivers - - fingerprint - - startsAt - - updatedAt - - endsAt - - annotations - - status - - $ref: '#/definitions/alert' - postableAlerts: - type: array - items: - $ref: '#/definitions/postableAlert' - postableAlert: - allOf: - - type: object - properties: - startsAt: - type: string - format: date-time - endsAt: - type: string - format: date-time - annotations: - $ref: '#/definitions/labelSet' - - $ref: '#/definitions/alert' - alertGroups: - type: array - items: - $ref: '#/definitions/alertGroup' - alertGroup: - type: object - properties: - labels: - $ref: '#/definitions/labelSet' - receiver: - $ref: '#/definitions/receiver' - alerts: - type: array - items: - $ref: '#/definitions/gettableAlert' - required: - - labels - - receiver - - alerts - alertStatus: - type: object - properties: - state: - type: string - enum: ['unprocessed', 'active', 'suppressed'] - silencedBy: - type: array - items: - type: string - inhibitedBy: - type: array - items: - type: string - required: - - state - - silencedBy - - inhibitedBy - receiver: - type: object - properties: - name: - type: string - required: - - name - labelSet: - type: object - additionalProperties: - type: string - - -tags: - - name: general - description: General Alertmanager operations - - name: receiver - description: Everything related to Alertmanager receivers - - name: silence - description: Everything related to Alertmanager silences - - name: alert - description: Everything related to Alertmanager alerts diff --git a/api/managementpb/checks.pb.go b/api/managementpb/checks.pb.go index c517c94959..c1b0ac2e3a 100644 --- a/api/managementpb/checks.pb.go +++ b/api/managementpb/checks.pb.go @@ -364,8 +364,6 @@ type CheckResult struct { ServiceId string `protobuf:"bytes,7,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` // Name of the check that failed CheckName string `protobuf:"bytes,8,opt,name=check_name,json=checkName,proto3" json:"check_name,omitempty"` - // ID of the check result as stored in AlertManager - AlertId string `protobuf:"bytes,9,opt,name=alert_id,json=alertId,proto3" json:"alert_id,omitempty"` // Silence status of the check result Silenced bool `protobuf:"varint,10,opt,name=silenced,proto3" json:"silenced,omitempty"` } @@ -458,13 +456,6 @@ func (x *CheckResult) GetCheckName() string { return "" } -func (x *CheckResult) GetAlertId() string { - if x != nil { - return x.AlertId - } - return "" -} - func (x *CheckResult) GetSilenced() bool { if x != nil { return x.Silenced @@ -1509,7 +1500,7 @@ var file_managementpb_checks_proto_rawDesc = []byte{ 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0xaf, 0x03, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x22, 0x94, 0x03, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, @@ -1529,268 +1520,267 @@ var file_managementpb_checks_proto_rawDesc = []byte{ 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0xf2, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x12, 0x3d, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x12, 0x36, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, - 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, - 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x22, 0xc2, 0x01, 0x0a, 0x07, 0x41, 0x64, 0x76, - 0x69, 0x73, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x22, 0xa0, 0x01, - 0x0a, 0x19, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x22, 0x24, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x60, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x32, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x1d, 0x0a, 0x1b, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x47, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x61, 0x64, 0x76, 0x69, - 0x73, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x52, - 0x08, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x22, 0x5c, 0x0a, 0x1b, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x46, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x54, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, - 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x70, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x85, 0x01, 0x0a, - 0x17, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x74, 0x61, 0x6c, 0x73, 0x22, 0x4e, 0x0a, 0x17, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x19, 0x0a, 0x08, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69, - 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x69, 0x6c, - 0x65, 0x6e, 0x63, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2a, 0x62, 0x0a, 0x15, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x45, 0x43, - 0x55, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x49, 0x4e, 0x54, 0x45, - 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0c, - 0x0a, 0x08, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, - 0x46, 0x52, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x41, - 0x52, 0x45, 0x10, 0x03, 0x2a, 0x9d, 0x01, 0x0a, 0x12, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x1c, 0x41, - 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, - 0x49, 0x4c, 0x59, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, - 0x1a, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, - 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x10, 0x01, 0x12, 0x23, 0x0a, - 0x1f, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, - 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x47, 0x52, 0x45, 0x53, 0x51, 0x4c, - 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, - 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x4d, 0x4f, 0x4e, 0x47, 0x4f, - 0x44, 0x42, 0x10, 0x03, 0x32, 0xef, 0x0f, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x89, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, - 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa3, 0x01, - 0x92, 0x41, 0x65, 0x12, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x4d, 0x52, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x73, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x01, - 0x2a, 0x22, 0x30, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x12, 0xdf, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, - 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x82, 0x01, 0x92, 0x41, 0x4a, 0x12, 0x11, 0x47, 0x65, 0x74, 0x20, 0x46, 0x61, 0x69, 0x6c, - 0x65, 0x64, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x35, 0x52, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x20, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, - 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0xec, 0x01, 0x0a, 0x10, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x6f, 0x67, - 0x67, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x92, 0x41, 0x4d, 0x12, 0x12, 0x54, 0x6f, 0x67, - 0x67, 0x6c, 0x65, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x1a, - 0x35, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x55, 0x6e, 0x73, 0x69, 0x6c, 0x65, 0x6e, - 0x63, 0x65, 0x20, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x58, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x3a, 0x01, - 0x2a, 0x22, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x2f, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, - 0x74, 0x88, 0x02, 0x01, 0x12, 0x88, 0x02, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x1a, 0x39, 0x0a, + 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf2, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x3d, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x08, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, + 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x22, 0xc2, 0x01, + 0x0a, 0x07, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, + 0x31, 0x0a, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x19, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x08, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x24, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x12, 0x2a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x60, 0x0a, 0x1f, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, + 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x93, 0x01, 0x92, 0x41, 0x55, 0x12, - 0x1a, 0x47, 0x65, 0x74, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x20, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x35, 0x52, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x73, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, 0x54, 0x68, - 0x72, 0x65, 0x61, 0x64, 0x20, 0x54, 0x6f, 0x6f, 0x6c, 0x27, 0x73, 0x20, 0x6c, 0x61, 0x74, 0x65, - 0x73, 0x74, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x2e, 0x58, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a, 0x22, 0x2d, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x47, 0x65, 0x74, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x88, 0x02, 0x01, 0x12, - 0xc9, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe0, 0x01, 0x92, 0x41, 0xae, 0x01, 0x12, - 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x94, 0x01, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x73, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, 0x54, 0x68, 0x72, 0x65, 0x61, - 0x64, 0x20, 0x54, 0x6f, 0x6f, 0x6c, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, 0x6e, - 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, - 0x6c, 0x6c, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x2e, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x61, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x77, 0x69, 0x6c, - 0x6c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x20, 0x69, 0x66, 0x20, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x6e, - 0x27, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, + 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x32, 0x0a, + 0x1a, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1b, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, + 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x22, 0x15, + 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x47, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, + 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, + 0x08, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x76, + 0x69, 0x73, 0x6f, 0x72, 0x52, 0x08, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x22, 0x5c, + 0x0a, 0x1b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x1e, 0x0a, 0x1c, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x54, 0x0a, 0x1a, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0x70, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x22, 0x85, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, + 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x12, 0x37, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x22, 0x4e, 0x0a, 0x17, 0x54, 0x6f, 0x67, + 0x67, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x54, 0x6f, 0x67, + 0x67, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x62, 0x0a, 0x15, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x23, + 0x0a, 0x1f, 0x53, 0x45, 0x43, 0x55, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, + 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, + 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, + 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x52, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, + 0x08, 0x0a, 0x04, 0x52, 0x41, 0x52, 0x45, 0x10, 0x03, 0x2a, 0x9d, 0x01, 0x0a, 0x12, 0x41, 0x64, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, + 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, + 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, + 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, + 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x4d, 0x59, 0x53, 0x51, 0x4c, + 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, + 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x47, + 0x52, 0x45, 0x53, 0x51, 0x4c, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x44, 0x56, 0x49, 0x53, + 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, + 0x4d, 0x4f, 0x4e, 0x47, 0x4f, 0x44, 0x42, 0x10, 0x03, 0x32, 0xef, 0x0f, 0x0a, 0x0e, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x89, 0x02, 0x0a, + 0x12, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, + 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xa3, 0x01, 0x92, 0x41, 0x65, 0x12, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x46, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x4d, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, + 0x66, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, 0x6e, + 0x64, 0x20, 0x61, 0x20, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x35, 0x3a, 0x01, 0x2a, 0x22, 0x30, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0xdb, 0x01, 0x0a, 0x12, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x76, 0x92, 0x41, 0x46, 0x12, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x64, 0x76, - 0x69, 0x73, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x2f, 0x52, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, - 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0xbf, 0x01, 0x0a, 0x0c, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, - 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, - 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6c, 0x92, - 0x41, 0x42, 0x12, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, - 0x73, 0x1a, 0x31, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, - 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x20, 0x61, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x64, - 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x88, 0x02, 0x0a, 0x14, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0xdf, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x22, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, + 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x92, 0x41, 0x4a, 0x12, 0x11, 0x47, 0x65, 0x74, + 0x20, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x35, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x46, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0xec, 0x01, 0x0a, 0x10, 0x54, + 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x12, + 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x6f, 0x67, + 0x67, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x6c, 0x65, + 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x92, 0x41, 0x4d, + 0x12, 0x12, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x41, + 0x6c, 0x65, 0x72, 0x74, 0x1a, 0x35, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x55, 0x6e, + 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x20, 0x66, + 0x6f, 0x72, 0x20, 0x61, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x58, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x33, 0x3a, 0x01, 0x2a, 0x22, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x88, 0x02, 0x01, 0x12, 0x88, 0x02, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x2a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x93, + 0x01, 0x92, 0x41, 0x55, 0x12, 0x1a, 0x47, 0x65, 0x74, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x1a, 0x35, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x20, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x20, 0x54, 0x6f, 0x6f, 0x6c, 0x27, 0x73, + 0x20, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x58, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, + 0x01, 0x2a, 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x2f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x88, 0x02, 0x01, 0x12, 0xc9, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x26, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe0, 0x01, + 0x92, 0x41, 0xae, 0x01, 0x12, 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x20, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x94, 0x01, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x73, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, + 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x20, 0x54, 0x6f, 0x6f, 0x6c, 0x20, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x77, + 0x68, 0x65, 0x6e, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, + 0x72, 0x65, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x2e, 0x20, 0x41, 0x6c, 0x6c, + 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x20, 0x61, 0x72, 0x65, 0x6e, 0x27, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x12, 0xdb, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x76, 0x92, 0x41, 0x46, 0x12, 0x13, 0x4c, 0x69, 0x73, + 0x74, 0x20, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x1a, 0x2f, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, + 0x20, 0x6f, 0x66, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0xbf, + 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x12, + 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x6c, 0x92, 0x41, 0x42, 0x12, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x64, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x1a, 0x31, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, + 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, + 0x72, 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, + 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2f, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x88, 0x02, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x12, 0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c, 0x01, 0x92, 0x41, 0x6a, 0x12, 0x16, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x50, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x20, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x20, 0x54, 0x6f, 0x6f, 0x6c, 0x20, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x74, - 0x68, 0x65, 0x69, 0x72, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x20, 0x62, 0x79, - 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, - 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x8e, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, - 0x62, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0xca, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0xe2, 0x02, 0x16, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c, 0x01, 0x92, + 0x41, 0x6a, 0x12, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x50, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x20, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x20, 0x54, 0x6f, 0x6f, + 0x6c, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x20, 0x62, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x8e, 0x01, 0x0a, 0x0e, + 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0b, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, + 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0xca, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0xe2, 0x02, 0x16, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/managementpb/checks.pb.validate.go b/api/managementpb/checks.pb.validate.go index ee0a2df498..d56cc6fec1 100644 --- a/api/managementpb/checks.pb.validate.go +++ b/api/managementpb/checks.pb.validate.go @@ -309,8 +309,6 @@ func (m *CheckResult) validate(all bool) error { // no validation rules for CheckName - // no validation rules for AlertId - // no validation rules for Silenced if len(errors) > 0 { diff --git a/api/managementpb/checks.proto b/api/managementpb/checks.proto index e2d9f82add..2071b35f14 100644 --- a/api/managementpb/checks.proto +++ b/api/managementpb/checks.proto @@ -72,8 +72,6 @@ message CheckResult { string service_id = 7; // Name of the check that failed string check_name = 8; - // ID of the check result as stored in AlertManager - string alert_id = 9; // Silence status of the check result bool silenced = 10; } diff --git a/api/managementpb/json/client/security_checks/get_failed_checks_responses.go b/api/managementpb/json/client/security_checks/get_failed_checks_responses.go index f095ef0be5..d39d3edf68 100644 --- a/api/managementpb/json/client/security_checks/get_failed_checks_responses.go +++ b/api/managementpb/json/client/security_checks/get_failed_checks_responses.go @@ -566,9 +566,6 @@ type GetFailedChecksOKBodyResultsItems0 struct { // Name of the check that failed CheckName string `json:"check_name,omitempty"` - // ID of the check result as stored in AlertManager - AlertID string `json:"alert_id,omitempty"` - // Silence status of the check result Silenced bool `json:"silenced,omitempty"` } diff --git a/api/managementpb/json/managementpb.json b/api/managementpb/json/managementpb.json index 9316d2a776..83c8b95afb 100644 --- a/api/managementpb/json/managementpb.json +++ b/api/managementpb/json/managementpb.json @@ -6386,11 +6386,6 @@ "description": "CheckResult represents the check results for a given service.", "type": "object", "properties": { - "alert_id": { - "type": "string", - "title": "ID of the check result as stored in AlertManager", - "x-order": 8 - }, "check_name": { "type": "string", "title": "Name of the check that failed", @@ -6442,7 +6437,7 @@ "silenced": { "type": "boolean", "title": "Silence status of the check result", - "x-order": 9 + "x-order": 8 }, "summary": { "type": "string", diff --git a/api/serverpb/json/client/server/change_settings_responses.go b/api/serverpb/json/client/server/change_settings_responses.go index f995d4a894..ba76893daa 100644 --- a/api/serverpb/json/client/server/change_settings_responses.go +++ b/api/serverpb/json/client/server/change_settings_responses.go @@ -144,21 +144,6 @@ type ChangeSettingsBody struct { // aws partitions AWSPartitions []string `json:"aws_partitions"` - // External AlertManager URL (e.g., https://username:password@1.2.3.4/path). - AlertManagerURL string `json:"alert_manager_url,omitempty"` - - // Remove external AlertManager URL. - // - // alert_manager_rules and remove_alert_manager_rules field names are incorrect - // (they never were _Alertmanager_ rules), but we can't rename them for compatibility reasons. - RemoveAlertManagerURL bool `json:"remove_alert_manager_url,omitempty"` - - // Custom alerting or recording rules. - AlertManagerRules string `json:"alert_manager_rules,omitempty"` - - // Remove custom alerting or recording rules. - RemoveAlertManagerRules bool `json:"remove_alert_manager_rules,omitempty"` - // Enable Security Threat Tool. EnableStt bool `json:"enable_stt,omitempty"` @@ -685,15 +670,6 @@ type ChangeSettingsOKBodySettings struct { // aws partitions AWSPartitions []string `json:"aws_partitions"` - // External AlertManager URL (e.g., https://username:password@1.2.3.4/path). - // - // alert_manager_rules field name is incorrect - // (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons. - AlertManagerURL string `json:"alert_manager_url,omitempty"` - - // Custom alerting or recording rules. - AlertManagerRules string `json:"alert_manager_rules,omitempty"` - // True if Security Threat Tool is enabled. SttEnabled bool `json:"stt_enabled,omitempty"` diff --git a/api/serverpb/json/client/server/get_settings_responses.go b/api/serverpb/json/client/server/get_settings_responses.go index 9057eb0ff1..44cad33ce1 100644 --- a/api/serverpb/json/client/server/get_settings_responses.go +++ b/api/serverpb/json/client/server/get_settings_responses.go @@ -479,15 +479,6 @@ type GetSettingsOKBodySettings struct { // aws partitions AWSPartitions []string `json:"aws_partitions"` - // External AlertManager URL (e.g., https://username:password@1.2.3.4/path). - // - // alert_manager_rules field name is incorrect - // (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons. - AlertManagerURL string `json:"alert_manager_url,omitempty"` - - // Custom alerting or recording rules. - AlertManagerRules string `json:"alert_manager_rules,omitempty"` - // True if Security Threat Tool is enabled. SttEnabled bool `json:"stt_enabled,omitempty"` diff --git a/api/serverpb/json/serverpb.json b/api/serverpb/json/serverpb.json index fbcff81f39..43543926c0 100644 --- a/api/serverpb/json/serverpb.json +++ b/api/serverpb/json/serverpb.json @@ -147,16 +147,6 @@ "schema": { "type": "object", "properties": { - "alert_manager_rules": { - "description": "Custom alerting or recording rules.", - "type": "string", - "x-order": 10 - }, - "alert_manager_url": { - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).", - "type": "string", - "x-order": 8 - }, "aws_partitions": { "type": "array", "items": { @@ -172,27 +162,27 @@ "disable_access_control": { "type": "boolean", "title": "Disable Access Control", - "x-order": 24 + "x-order": 20 }, "disable_alerting": { "description": "Disable Alerting.", "type": "boolean", - "x-order": 15 + "x-order": 11 }, "disable_azurediscover": { "description": "Disable Azure Discover.", "type": "boolean", - "x-order": 20 + "x-order": 16 }, "disable_backup_management": { "description": "Disable Backup Management.", "type": "boolean", - "x-order": 22 + "x-order": 18 }, "disable_stt": { "description": "Disable Security Threat Tool.", "type": "boolean", - "x-order": 13 + "x-order": 9 }, "disable_telemetry": { "type": "boolean", @@ -205,27 +195,27 @@ "enable_access_control": { "type": "boolean", "title": "Enable Access Control", - "x-order": 23 + "x-order": 19 }, "enable_alerting": { "description": "Enable Alerting.", "type": "boolean", - "x-order": 14 + "x-order": 10 }, "enable_azurediscover": { "description": "Enable Azure Discover.", "type": "boolean", - "x-order": 19 + "x-order": 15 }, "enable_backup_management": { "description": "Enable Backup Management.", "type": "boolean", - "x-order": 21 + "x-order": 17 }, "enable_stt": { "description": "Enable Security Threat Tool.", "type": "boolean", - "x-order": 12 + "x-order": 8 }, "enable_telemetry": { "type": "boolean", @@ -260,21 +250,11 @@ "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 16 - }, - "remove_alert_manager_rules": { - "description": "Remove custom alerting or recording rules.", - "type": "boolean", - "x-order": 11 - }, - "remove_alert_manager_url": { - "description": "Remove external AlertManager URL.\n\nalert_manager_rules and remove_alert_manager_rules field names are incorrect\n (they never were _Alertmanager_ rules), but we can't rename them for compatibility reasons.", - "type": "boolean", - "x-order": 9 + "x-order": 12 }, "remove_pmm_public_address": { "type": "boolean", - "x-order": 17 + "x-order": 13 }, "ssh_key": { "type": "string", @@ -300,7 +280,7 @@ "x-order": 0 } }, - "x-order": 18 + "x-order": 14 } } } @@ -316,20 +296,10 @@ "description": "Settings represents PMM Server settings.", "type": "object", "properties": { - "alert_manager_rules": { - "description": "Custom alerting or recording rules.", - "type": "string", - "x-order": 7 - }, - "alert_manager_url": { - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).\n\nalert_manager_rules field name is incorrect\n (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons.", - "type": "string", - "x-order": 6 - }, "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 10 + "x-order": 8 }, "aws_partitions": { "type": "array", @@ -341,17 +311,17 @@ "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 14 + "x-order": 12 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 13 + "x-order": 11 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 15 + "x-order": 13 }, "data_retention": { "type": "string", @@ -361,12 +331,12 @@ "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 18 + "x-order": 16 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 15 }, "metrics_resolutions": { "description": "MetricsResolutions represents Prometheus exporters metrics resolutions.", @@ -393,12 +363,12 @@ "platform_email": { "description": "Percona Platform user's email, if this PMM instance is linked to the Platform.", "type": "string", - "x-order": 9 + "x-order": 7 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 11 + "x-order": 9 }, "ssh_key": { "type": "string", @@ -424,12 +394,12 @@ "x-order": 0 } }, - "x-order": 12 + "x-order": 10 }, "stt_enabled": { "description": "True if Security Threat Tool is enabled.", "type": "boolean", - "x-order": 8 + "x-order": 6 }, "telemetry_enabled": { "description": "True if telemetry is enabled.", @@ -442,7 +412,7 @@ "items": { "type": "string" }, - "x-order": 16 + "x-order": 14 }, "updates_disabled": { "description": "True if updates are disabled.", @@ -519,20 +489,10 @@ "description": "Settings represents PMM Server settings.", "type": "object", "properties": { - "alert_manager_rules": { - "description": "Custom alerting or recording rules.", - "type": "string", - "x-order": 7 - }, - "alert_manager_url": { - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).\n\nalert_manager_rules field name is incorrect\n (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons.", - "type": "string", - "x-order": 6 - }, "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 10 + "x-order": 8 }, "aws_partitions": { "type": "array", @@ -544,17 +504,17 @@ "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 14 + "x-order": 12 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 13 + "x-order": 11 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 15 + "x-order": 13 }, "data_retention": { "type": "string", @@ -564,12 +524,12 @@ "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 18 + "x-order": 16 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 15 }, "metrics_resolutions": { "description": "MetricsResolutions represents Prometheus exporters metrics resolutions.", @@ -596,12 +556,12 @@ "platform_email": { "description": "Percona Platform user's email, if this PMM instance is linked to the Platform.", "type": "string", - "x-order": 9 + "x-order": 7 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 11 + "x-order": 9 }, "ssh_key": { "type": "string", @@ -627,12 +587,12 @@ "x-order": 0 } }, - "x-order": 12 + "x-order": 10 }, "stt_enabled": { "description": "True if Security Threat Tool is enabled.", "type": "boolean", - "x-order": 8 + "x-order": 6 }, "telemetry_enabled": { "description": "True if telemetry is enabled.", @@ -645,7 +605,7 @@ "items": { "type": "string" }, - "x-order": 16 + "x-order": 14 }, "updates_disabled": { "description": "True if updates are disabled.", diff --git a/api/serverpb/server.pb.go b/api/serverpb/server.pb.go index 77f7c74da6..ddbae354fc 100644 --- a/api/serverpb/server.pb.go +++ b/api/serverpb/server.pb.go @@ -934,10 +934,6 @@ type Settings struct { DataRetention *durationpb.Duration `protobuf:"bytes,4,opt,name=data_retention,json=dataRetention,proto3" json:"data_retention,omitempty"` SshKey string `protobuf:"bytes,5,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"` AwsPartitions []string `protobuf:"bytes,6,rep,name=aws_partitions,json=awsPartitions,proto3" json:"aws_partitions,omitempty"` - // External AlertManager URL (e.g., https://username:password@1.2.3.4/path). - AlertManagerUrl string `protobuf:"bytes,7,opt,name=alert_manager_url,json=alertManagerUrl,proto3" json:"alert_manager_url,omitempty"` - // Custom alerting or recording rules. - AlertManagerRules string `protobuf:"bytes,8,opt,name=alert_manager_rules,json=alertManagerRules,proto3" json:"alert_manager_rules,omitempty"` // True if Security Threat Tool is enabled. SttEnabled bool `protobuf:"varint,9,opt,name=stt_enabled,json=sttEnabled,proto3" json:"stt_enabled,omitempty"` // Percona Platform user's email, if this PMM instance is linked to the Platform. @@ -1036,20 +1032,6 @@ func (x *Settings) GetAwsPartitions() []string { return nil } -func (x *Settings) GetAlertManagerUrl() string { - if x != nil { - return x.AlertManagerUrl - } - return "" -} - -func (x *Settings) GetAlertManagerRules() string { - if x != nil { - return x.AlertManagerRules - } - return "" -} - func (x *Settings) GetSttEnabled() bool { if x != nil { return x.SttEnabled @@ -1226,14 +1208,6 @@ type ChangeSettingsRequest struct { DataRetention *durationpb.Duration `protobuf:"bytes,4,opt,name=data_retention,json=dataRetention,proto3" json:"data_retention,omitempty"` SshKey string `protobuf:"bytes,5,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"` AwsPartitions []string `protobuf:"bytes,6,rep,name=aws_partitions,json=awsPartitions,proto3" json:"aws_partitions,omitempty"` - // External AlertManager URL (e.g., https://username:password@1.2.3.4/path). - AlertManagerUrl string `protobuf:"bytes,7,opt,name=alert_manager_url,json=alertManagerUrl,proto3" json:"alert_manager_url,omitempty"` - // Remove external AlertManager URL. - RemoveAlertManagerUrl bool `protobuf:"varint,8,opt,name=remove_alert_manager_url,json=removeAlertManagerUrl,proto3" json:"remove_alert_manager_url,omitempty"` - // Custom alerting or recording rules. - AlertManagerRules string `protobuf:"bytes,9,opt,name=alert_manager_rules,json=alertManagerRules,proto3" json:"alert_manager_rules,omitempty"` - // Remove custom alerting or recording rules. - RemoveAlertManagerRules bool `protobuf:"varint,10,opt,name=remove_alert_manager_rules,json=removeAlertManagerRules,proto3" json:"remove_alert_manager_rules,omitempty"` // Enable Security Threat Tool. EnableStt bool `protobuf:"varint,11,opt,name=enable_stt,json=enableStt,proto3" json:"enable_stt,omitempty"` // Disable Security Threat Tool. @@ -1349,34 +1323,6 @@ func (x *ChangeSettingsRequest) GetAwsPartitions() []string { return nil } -func (x *ChangeSettingsRequest) GetAlertManagerUrl() string { - if x != nil { - return x.AlertManagerUrl - } - return "" -} - -func (x *ChangeSettingsRequest) GetRemoveAlertManagerUrl() bool { - if x != nil { - return x.RemoveAlertManagerUrl - } - return false -} - -func (x *ChangeSettingsRequest) GetAlertManagerRules() string { - if x != nil { - return x.AlertManagerRules - } - return "" -} - -func (x *ChangeSettingsRequest) GetRemoveAlertManagerRules() bool { - if x != nil { - return x.RemoveAlertManagerRules - } - return false -} - func (x *ChangeSettingsRequest) GetEnableStt() bool { if x != nil { return x.EnableStt @@ -1712,7 +1658,7 @@ var file_serverpb_server_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, - 0xb7, 0x07, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x29, 0x0a, 0x10, + 0xe7, 0x06, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x65, 0x6c, 0x65, 0x6d, @@ -1731,53 +1677,48 @@ var file_serverpb_server_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x77, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x61, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, - 0x2e, 0x0a, 0x13, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x6c, - 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x74, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x6c, 0x65, 0x72, 0x74, - 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6d, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x70, 0x6d, 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x49, 0x0a, 0x13, 0x73, 0x74, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x54, 0x54, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x11, 0x73, 0x74, 0x74, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x62, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, - 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x7a, 0x75, 0x72, 0x65, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x12, 0x2f, 0x0a, 0x13, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x74, - 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, - 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x4a, 0x04, 0x08, + 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x74, 0x74, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x61, + 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6d, 0x6d, 0x5f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x70, 0x6d, 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x13, 0x73, 0x74, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x54, 0x54, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x11, 0x73, 0x74, + 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, + 0x3a, 0x0a, 0x19, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x17, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x61, + 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x61, 0x7a, 0x75, 0x72, + 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6f, + 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2f, 0x0a, 0x13, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, + 0x79, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x12, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x49, + 0x64, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x0d, 0x10, 0x0e, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x22, 0x88, 0x0a, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, + 0x69, 0x6e, 0x67, 0x73, 0x22, 0xce, 0x08, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x70, @@ -1802,190 +1743,178 @@ var file_serverpb_server_proto_rawDesc = []byte{ 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x77, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x72, - 0x6c, 0x12, 0x37, 0x0a, 0x18, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, - 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, - 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x6c, - 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, - 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x73, 0x74, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x53, 0x74, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x73, 0x74, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x12, 0x29, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, - 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x70, - 0x6d, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6d, 0x6d, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x5f, 0x70, 0x6d, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x72, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6d, 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x13, 0x73, 0x74, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x54, 0x54, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x11, 0x73, 0x74, - 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, - 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x12, 0x33, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x7a, - 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x19, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, - 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x1f, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, - 0x10, 0x10, 0x11, 0x4a, 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, - 0x46, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x43, 0x0a, 0x17, 0x41, 0x57, 0x53, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x1a, 0x0a, 0x18, - 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x66, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1f, - 0x0a, 0x1b, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, - 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x43, 0x4b, 0x45, 0x52, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4f, - 0x56, 0x46, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4d, 0x49, 0x10, 0x03, 0x12, 0x09, 0x0a, - 0x05, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x10, 0x04, 0x12, 0x06, 0x0a, 0x02, 0x44, 0x4f, 0x10, 0x05, - 0x32, 0xe5, 0x0c, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x79, 0x0a, 0x07, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x92, 0x41, 0x27, 0x12, 0x07, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x50, - 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x9e, 0x02, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x69, - 0x6e, 0x65, 0x73, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, - 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdb, 0x01, 0x92, 0x41, 0xc5, 0x01, - 0x12, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, - 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x1a, 0xaa, 0x01, 0x52, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x77, 0x68, 0x65, 0x6e, - 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x73, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x65, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x61, 0x64, 0x79, - 0x20, 0x79, 0x65, 0x74, 0x2e, 0x20, 0x55, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x41, - 0x50, 0x49, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x44, 0x6f, - 0x63, 0x6b, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x20, - 0x61, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x67, 0x20, - 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, - 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, - 0x2f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x12, 0xf7, 0x01, 0x0a, 0x11, 0x4c, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x20, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x9c, 0x01, 0x92, 0x41, 0x79, 0x12, 0x10, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, - 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x1a, 0x65, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x52, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, - 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, - 0x69, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, - 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, - 0x41, 0x39, 0x12, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x1a, 0x28, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x2f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x90, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x48, 0x92, 0x41, 0x29, 0x12, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x20, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x1a, 0x19, 0x53, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x73, 0x2f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x9d, 0x01, 0x0a, 0x0c, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x32, 0x12, 0x0d, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x21, 0x52, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x2f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x0b, 0x47, - 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x34, 0x12, 0x0c, 0x47, 0x65, 0x74, 0x20, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x24, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x12, 0xa1, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x2f, 0x12, 0x0f, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, - 0x1c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0xaa, 0x01, 0x0a, 0x10, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x73, 0x74, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x74, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x73, 0x74, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x74, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x29, + 0x0a, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, + 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6d, 0x6d, + 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6d, 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x5f, 0x70, 0x6d, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x50, 0x6d, 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x49, 0x0a, 0x13, 0x73, 0x74, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x54, 0x54, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x11, 0x73, 0x74, 0x74, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x31, 0x0a, + 0x14, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x12, 0x33, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x7a, 0x75, 0x72, + 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x3a, 0x0a, 0x19, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x19, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x17, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, + 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, + 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x4a, 0x04, 0x08, + 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, + 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0x46, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x43, 0x0a, + 0x17, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x49, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x66, + 0x0a, 0x12, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, 0x55, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x43, 0x4b, 0x45, 0x52, 0x10, + 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x56, 0x46, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4d, + 0x49, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x10, 0x04, 0x12, 0x06, + 0x0a, 0x02, 0x44, 0x4f, 0x10, 0x05, 0x32, 0xe5, 0x0c, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x12, 0x79, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x92, + 0x41, 0x27, 0x12, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x52, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, + 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x9e, 0x02, 0x0a, + 0x09, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, + 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xdb, 0x01, 0x92, 0x41, 0xc5, 0x01, 0x12, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x1a, 0xaa, + 0x01, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x72, + 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x79, 0x65, 0x74, 0x2e, 0x20, 0x55, 0x73, 0x65, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x41, 0x50, 0x49, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x20, 0x6f, 0x66, 0x20, 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x72, + 0x6f, 0x62, 0x69, 0x6e, 0x67, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, + 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x12, 0xf7, 0x01, + 0x0a, 0x11, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x12, 0x20, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4c, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c, 0x01, 0x92, 0x41, 0x79, 0x12, 0x10, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x1a, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2e, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x20, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x69, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, + 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, 0x41, 0x39, 0x12, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x28, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, + 0x66, 0x6f, 0x72, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x50, 0x4d, + 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x90, 0x01, + 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x92, 0x41, 0x29, 0x12, 0x0c, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x1a, 0x19, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, + 0x76, 0x31, 0x2f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x12, 0x9d, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, + 0x32, 0x12, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x1a, 0x21, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, + 0x31, 0x2f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x9a, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x1a, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x34, 0x12, 0x0c, + 0x47, 0x65, 0x74, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x24, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x50, 0x4d, + 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, + 0x2f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x12, 0xa1, 0x01, + 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x50, 0x92, 0x41, 0x2f, 0x12, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x1c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x50, + 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, + 0x31, 0x2f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0xaa, 0x01, 0x0a, 0x10, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x12, 0x1f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x57, 0x53, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x53, 0x92, 0x41, 0x31, 0x12, 0x12, 0x41, 0x57, 0x53, 0x20, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x1b, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x20, 0x41, 0x57, 0x53, 0x20, 0x45, 0x43, 0x32, 0x20, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x49, 0x44, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, - 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x76, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, - 0xaa, 0x02, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0xca, 0x02, 0x06, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0xe2, 0x02, 0x12, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x92, 0x41, 0x31, 0x12, 0x12, + 0x41, 0x57, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x1a, 0x1b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x41, 0x57, 0x53, 0x20, 0x45, + 0x43, 0x32, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x49, 0x44, 0x2e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x41, 0x57, + 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x76, + 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x0b, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, + 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x70, 0x62, + 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0xca, + 0x02, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0xe2, 0x02, 0x12, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/serverpb/server.pb.validate.go b/api/serverpb/server.pb.validate.go index 112163358d..c0d73da0e4 100644 --- a/api/serverpb/server.pb.validate.go +++ b/api/serverpb/server.pb.validate.go @@ -2020,10 +2020,6 @@ func (m *Settings) validate(all bool) error { // no validation rules for SshKey - // no validation rules for AlertManagerUrl - - // no validation rules for AlertManagerRules - // no validation rules for SttEnabled // no validation rules for PlatformEmail @@ -2471,14 +2467,6 @@ func (m *ChangeSettingsRequest) validate(all bool) error { // no validation rules for SshKey - // no validation rules for AlertManagerUrl - - // no validation rules for RemoveAlertManagerUrl - - // no validation rules for AlertManagerRules - - // no validation rules for RemoveAlertManagerRules - // no validation rules for EnableStt // no validation rules for DisableStt diff --git a/api/serverpb/server.proto b/api/serverpb/server.proto index c6dba265c2..cbdf514b70 100644 --- a/api/serverpb/server.proto +++ b/api/serverpb/server.proto @@ -126,7 +126,7 @@ message STTCheckIntervals { // Settings represents PMM Server settings. message Settings { - reserved 13, 14; // Removed fields + reserved 7, 8, 13, 14; // Removed fields // True if updates are disabled. bool updates_disabled = 1; @@ -136,13 +136,6 @@ message Settings { google.protobuf.Duration data_retention = 4; string ssh_key = 5; repeated string aws_partitions = 6; - // External AlertManager URL (e.g., https://username:password@1.2.3.4/path). - string alert_manager_url = 7; - // alert_manager_rules field name is incorrect - // (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons. - - // Custom alerting or recording rules. - string alert_manager_rules = 8; // True if Security Threat Tool is enabled. bool stt_enabled = 9; // Percona Platform user's email, if this PMM instance is linked to the Platform. @@ -174,7 +167,7 @@ message GetSettingsResponse { } message ChangeSettingsRequest { - reserved 15, 16, 17, 18; //Removed fields + reserved 7, 8, 9, 10, 15, 16, 17, 18; //Removed fields bool enable_updates = 28; bool disable_updates = 29; @@ -185,17 +178,6 @@ message ChangeSettingsRequest { google.protobuf.Duration data_retention = 4; string ssh_key = 5; repeated string aws_partitions = 6; - // External AlertManager URL (e.g., https://username:password@1.2.3.4/path). - string alert_manager_url = 7; - // Remove external AlertManager URL. - bool remove_alert_manager_url = 8; - // alert_manager_rules and remove_alert_manager_rules field names are incorrect - // (they never were _Alertmanager_ rules), but we can't rename them for compatibility reasons. - - // Custom alerting or recording rules. - string alert_manager_rules = 9; - // Remove custom alerting or recording rules. - bool remove_alert_manager_rules = 10; // Enable Security Threat Tool. bool enable_stt = 11; // Disable Security Threat Tool. diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index 4d1d9edb6f..20ed4e0ed1 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -3045,54 +3045,34 @@ }, "x-order": 7 }, - "alert_manager_url": { - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).", - "type": "string", - "x-order": 8 - }, - "remove_alert_manager_url": { - "description": "Remove external AlertManager URL.\n\nalert_manager_rules and remove_alert_manager_rules field names are incorrect\n (they never were _Alertmanager_ rules), but we can't rename them for compatibility reasons.", - "type": "boolean", - "x-order": 9 - }, - "alert_manager_rules": { - "description": "Custom alerting or recording rules.", - "type": "string", - "x-order": 10 - }, - "remove_alert_manager_rules": { - "description": "Remove custom alerting or recording rules.", - "type": "boolean", - "x-order": 11 - }, "enable_stt": { "description": "Enable Security Threat Tool.", "type": "boolean", - "x-order": 12 + "x-order": 8 }, "disable_stt": { "description": "Disable Security Threat Tool.", "type": "boolean", - "x-order": 13 + "x-order": 9 }, "enable_alerting": { "description": "Enable Alerting.", "type": "boolean", - "x-order": 14 + "x-order": 10 }, "disable_alerting": { "description": "Disable Alerting.", "type": "boolean", - "x-order": 15 + "x-order": 11 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 16 + "x-order": 12 }, "remove_pmm_public_address": { "type": "boolean", - "x-order": 17 + "x-order": 13 }, "stt_check_intervals": { "description": "STTCheckIntervals represents intervals between STT checks.", @@ -3114,37 +3094,37 @@ "x-order": 2 } }, - "x-order": 18 + "x-order": 14 }, "enable_azurediscover": { "description": "Enable Azure Discover.", "type": "boolean", - "x-order": 19 + "x-order": 15 }, "disable_azurediscover": { "description": "Disable Azure Discover.", "type": "boolean", - "x-order": 20 + "x-order": 16 }, "enable_backup_management": { "description": "Enable Backup Management.", "type": "boolean", - "x-order": 21 + "x-order": 17 }, "disable_backup_management": { "description": "Disable Backup Management.", "type": "boolean", - "x-order": 22 + "x-order": 18 }, "enable_access_control": { "type": "boolean", "title": "Enable Access Control", - "x-order": 23 + "x-order": 19 }, "disable_access_control": { "type": "boolean", "title": "Disable Access Control", - "x-order": 24 + "x-order": 20 } } } @@ -3207,35 +3187,25 @@ }, "x-order": 5 }, - "alert_manager_url": { - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).\n\nalert_manager_rules field name is incorrect\n (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons.", - "type": "string", - "x-order": 6 - }, - "alert_manager_rules": { - "description": "Custom alerting or recording rules.", - "type": "string", - "x-order": 7 - }, "stt_enabled": { "description": "True if Security Threat Tool is enabled.", "type": "boolean", - "x-order": 8 + "x-order": 6 }, "platform_email": { "description": "Percona Platform user's email, if this PMM instance is linked to the Platform.", "type": "string", - "x-order": 9 + "x-order": 7 }, "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 10 + "x-order": 8 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 11 + "x-order": 9 }, "stt_check_intervals": { "description": "STTCheckIntervals represents intervals between STT checks.", @@ -3257,22 +3227,22 @@ "x-order": 2 } }, - "x-order": 12 + "x-order": 10 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 13 + "x-order": 11 }, "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 14 + "x-order": 12 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 15 + "x-order": 13 }, "telemetry_summaries": { "type": "array", @@ -3280,18 +3250,18 @@ "items": { "type": "string" }, - "x-order": 16 + "x-order": 14 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 15 }, "default_role_id": { "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 18 + "x-order": 16 } }, "x-order": 0 @@ -3410,35 +3380,25 @@ }, "x-order": 5 }, - "alert_manager_url": { - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).\n\nalert_manager_rules field name is incorrect\n (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons.", - "type": "string", - "x-order": 6 - }, - "alert_manager_rules": { - "description": "Custom alerting or recording rules.", - "type": "string", - "x-order": 7 - }, "stt_enabled": { "description": "True if Security Threat Tool is enabled.", "type": "boolean", - "x-order": 8 + "x-order": 6 }, "platform_email": { "description": "Percona Platform user's email, if this PMM instance is linked to the Platform.", "type": "string", - "x-order": 9 + "x-order": 7 }, "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 10 + "x-order": 8 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 11 + "x-order": 9 }, "stt_check_intervals": { "description": "STTCheckIntervals represents intervals between STT checks.", @@ -3460,22 +3420,22 @@ "x-order": 2 } }, - "x-order": 12 + "x-order": 10 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 13 + "x-order": 11 }, "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 14 + "x-order": 12 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 15 + "x-order": 13 }, "telemetry_summaries": { "type": "array", @@ -3483,18 +3443,18 @@ "items": { "type": "string" }, - "x-order": 16 + "x-order": 14 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 15 }, "default_role_id": { "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 18 + "x-order": 16 } }, "x-order": 0 @@ -25338,15 +25298,10 @@ "title": "Name of the check that failed", "x-order": 7 }, - "alert_id": { - "type": "string", - "title": "ID of the check result as stored in AlertManager", - "x-order": 8 - }, "silenced": { "type": "boolean", "title": "Silence status of the check result", - "x-order": 9 + "x-order": 8 } } }, diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index 699bf18239..436a77390a 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -201,54 +201,34 @@ }, "x-order": 7 }, - "alert_manager_url": { - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).", - "type": "string", - "x-order": 8 - }, - "remove_alert_manager_url": { - "description": "Remove external AlertManager URL.\n\nalert_manager_rules and remove_alert_manager_rules field names are incorrect\n (they never were _Alertmanager_ rules), but we can't rename them for compatibility reasons.", - "type": "boolean", - "x-order": 9 - }, - "alert_manager_rules": { - "description": "Custom alerting or recording rules.", - "type": "string", - "x-order": 10 - }, - "remove_alert_manager_rules": { - "description": "Remove custom alerting or recording rules.", - "type": "boolean", - "x-order": 11 - }, "enable_stt": { "description": "Enable Security Threat Tool.", "type": "boolean", - "x-order": 12 + "x-order": 8 }, "disable_stt": { "description": "Disable Security Threat Tool.", "type": "boolean", - "x-order": 13 + "x-order": 9 }, "enable_alerting": { "description": "Enable Alerting.", "type": "boolean", - "x-order": 14 + "x-order": 10 }, "disable_alerting": { "description": "Disable Alerting.", "type": "boolean", - "x-order": 15 + "x-order": 11 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 16 + "x-order": 12 }, "remove_pmm_public_address": { "type": "boolean", - "x-order": 17 + "x-order": 13 }, "stt_check_intervals": { "description": "STTCheckIntervals represents intervals between STT checks.", @@ -270,37 +250,37 @@ "x-order": 2 } }, - "x-order": 18 + "x-order": 14 }, "enable_azurediscover": { "description": "Enable Azure Discover.", "type": "boolean", - "x-order": 19 + "x-order": 15 }, "disable_azurediscover": { "description": "Disable Azure Discover.", "type": "boolean", - "x-order": 20 + "x-order": 16 }, "enable_backup_management": { "description": "Enable Backup Management.", "type": "boolean", - "x-order": 21 + "x-order": 17 }, "disable_backup_management": { "description": "Disable Backup Management.", "type": "boolean", - "x-order": 22 + "x-order": 18 }, "enable_access_control": { "type": "boolean", "title": "Enable Access Control", - "x-order": 23 + "x-order": 19 }, "disable_access_control": { "type": "boolean", "title": "Disable Access Control", - "x-order": 24 + "x-order": 20 } } } @@ -363,35 +343,25 @@ }, "x-order": 5 }, - "alert_manager_url": { - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).\n\nalert_manager_rules field name is incorrect\n (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons.", - "type": "string", - "x-order": 6 - }, - "alert_manager_rules": { - "description": "Custom alerting or recording rules.", - "type": "string", - "x-order": 7 - }, "stt_enabled": { "description": "True if Security Threat Tool is enabled.", "type": "boolean", - "x-order": 8 + "x-order": 6 }, "platform_email": { "description": "Percona Platform user's email, if this PMM instance is linked to the Platform.", "type": "string", - "x-order": 9 + "x-order": 7 }, "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 10 + "x-order": 8 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 11 + "x-order": 9 }, "stt_check_intervals": { "description": "STTCheckIntervals represents intervals between STT checks.", @@ -413,22 +383,22 @@ "x-order": 2 } }, - "x-order": 12 + "x-order": 10 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 13 + "x-order": 11 }, "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 14 + "x-order": 12 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 15 + "x-order": 13 }, "telemetry_summaries": { "type": "array", @@ -436,18 +406,18 @@ "items": { "type": "string" }, - "x-order": 16 + "x-order": 14 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 15 }, "default_role_id": { "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 18 + "x-order": 16 } }, "x-order": 0 @@ -566,35 +536,25 @@ }, "x-order": 5 }, - "alert_manager_url": { - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).\n\nalert_manager_rules field name is incorrect\n (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons.", - "type": "string", - "x-order": 6 - }, - "alert_manager_rules": { - "description": "Custom alerting or recording rules.", - "type": "string", - "x-order": 7 - }, "stt_enabled": { "description": "True if Security Threat Tool is enabled.", "type": "boolean", - "x-order": 8 + "x-order": 6 }, "platform_email": { "description": "Percona Platform user's email, if this PMM instance is linked to the Platform.", "type": "string", - "x-order": 9 + "x-order": 7 }, "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 10 + "x-order": 8 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 11 + "x-order": 9 }, "stt_check_intervals": { "description": "STTCheckIntervals represents intervals between STT checks.", @@ -616,22 +576,22 @@ "x-order": 2 } }, - "x-order": 12 + "x-order": 10 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 13 + "x-order": 11 }, "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 14 + "x-order": 12 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 15 + "x-order": 13 }, "telemetry_summaries": { "type": "array", @@ -639,18 +599,18 @@ "items": { "type": "string" }, - "x-order": 16 + "x-order": 14 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 15 }, "default_role_id": { "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 18 + "x-order": 16 } }, "x-order": 0 @@ -21124,15 +21084,10 @@ "title": "Name of the check that failed", "x-order": 7 }, - "alert_id": { - "type": "string", - "title": "ID of the check result as stored in AlertManager", - "x-order": 8 - }, "silenced": { "type": "boolean", "title": "Silence status of the check result", - "x-order": 9 + "x-order": 8 } } }, diff --git a/build/ansible/roles/pmm-images/tasks/main.yml b/build/ansible/roles/pmm-images/tasks/main.yml index 9a8a1cdec3..10673e278b 100644 --- a/build/ansible/roles/pmm-images/tasks/main.yml +++ b/build/ansible/roles/pmm-images/tasks/main.yml @@ -94,7 +94,6 @@ with_items: - /srv/prometheus/data - /srv/prometheus/rules - - /srv/alertmanager/data - /etc/grafana - name: Create directories | Create dirs @@ -123,7 +122,6 @@ - percona-victoriametrics - percona-qan-api2 - percona-dashboards - - percona-alertmanager - pmm-managed - pmm-update - pmm-dump diff --git a/build/packages/rpm/server/SPECS/alertmanager.spec b/build/packages/rpm/server/SPECS/alertmanager.spec deleted file mode 100644 index b1b0747c88..0000000000 --- a/build/packages/rpm/server/SPECS/alertmanager.spec +++ /dev/null @@ -1,56 +0,0 @@ -%undefine _missing_build_ids_terminate_build - -%global repo alertmanager -%global provider github.com/prometheus/%{repo} -%global commit 258fab7cdd551f2cf251ed0348f0ad7289aee789 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -Name: percona-%{repo} -Version: 0.25.0 -Release: 3%{?dist} -Summary: The Prometheus monitoring system and time series database -License: ASL 2.0 -URL: https://%{provider} -Source0: https://%{provider}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz - -%description -%{summary} - -%prep -%setup -q -n %{repo}-%{commit} -mkdir -p ./build/src/github.com/prometheus -ln -s $(pwd) ./build/src/github.com/prometheus/alertmanager - -%build -export GOPATH="$(pwd)/build" -export CGO_ENABLED=0 -export USER=builder - -cd build/src/github.com/prometheus/alertmanager -make build - -%install -install -D -p -m 0755 ./%{repo} %{buildroot}%{_sbindir}/%{repo} -install -D -p -m 0755 ./amtool %{buildroot}%{_bindir}/amtool -install -d %{buildroot}%{_datadir}/%{repo} -install -d %{buildroot}%{_sharedstatedir}/%{repo} - -%files -%doc LICENSE CHANGELOG.md README.md NOTICE -%{_sbindir}/%{repo} -%{_bindir}/amtool -%{_datadir}/%{repo} -%dir %attr(-, nobody, nobody) %{_sharedstatedir}/%{repo} - -%changelog -* Wed Feb 8 2023 Nurlan Moldomurov - 0.25.0 -- PMM-11497 Upgrade AlertManager to 0.25 - -* Tue May 4 2021 David Mikus - 0.21.0 -- PMM-7302 Upgrade AlertManager to 0.21 - -* Thu Jul 2 2020 Mykyta Solomko - 0.20.0-3 -- PMM-5645 built using Golang 1.14 - -* Fri Mar 27 2020 Mykyta Solomko - 0.20.0 -- Init version diff --git a/build/scripts/build-server-rpm-all b/build/scripts/build-server-rpm-all index 7b21335b36..e6accd289a 100755 --- a/build/scripts/build-server-rpm-all +++ b/build/scripts/build-server-rpm-all @@ -14,7 +14,6 @@ ${bin_dir}/build-server-rpm vmproxy pmm # 3rd-party ${bin_dir}/build-server-rpm victoriametrics -${bin_dir}/build-server-rpm alertmanager ${bin_dir}/build-server-rpm grafana # vim: expandtab shiftwidth=4 tabstop=4 diff --git a/descriptor.bin b/descriptor.bin index 9f8d55e4c7..37ca4ef9ca 100644 Binary files a/descriptor.bin and b/descriptor.bin differ diff --git a/docs/api/pmm-server-config/troubleshooting/logs.md b/docs/api/pmm-server-config/troubleshooting/logs.md index 7761796f25..dbb4b30b3f 100644 --- a/docs/api/pmm-server-config/troubleshooting/logs.md +++ b/docs/api/pmm-server-config/troubleshooting/logs.md @@ -13,7 +13,7 @@ The structure of the logs is as follows: { "codes": [ { - "code": "# tree\n├── alertmanager.ini\n├── alertmanager.log\n├── clickhouse-server.err.log\n├── clickhouse-server.log\n├── clickhouse-server.startup.log\n├── client\n│ ├── list.txt\n│ ├── pmm-admin-version.txt\n│ ├── pmm-agent-config.yaml\n│ ├── pmm-agent-version.txt\n│ └── status.json\n├── cron.log\n├── dashboard-upgrade.log\n├── grafana.log\n├── installed.json\n├── nginx.conf\n├── nginx.log\n├── nginx.startup.log\n├── pmm-agent.log\n├── pmm-agent.yaml\n├── pmm-managed.log\n├── pmm-ssl.conf\n├── pmm-update-perform-init.log\n├── pmm-update-perform.log\n├── pmm-version.txt\n├── pmm.conf\n├── pmm.ini\n├── postgresql.log\n├── postgresql.startup.log\n├── prometheus.base.yml\n├── prometheus.log\n├── qan-api2.ini\n├── qan-api2.log\n├── supervisorctl_status.log\n├── supervisord.conf\n├── supervisord.log\n├── systemctl_status.log\n├── victoriametrics-promscrape.yml\n├── victoriametrics.ini\n├── victoriametrics.log\n├── victoriametrics_targets.json\n├── vmalert.ini\n└── vmalert.log", + "code": "# tree\n├── clickhouse-server.err.log\n├── clickhouse-server.log\n├── clickhouse-server.startup.log\n├── client\n│ ├── list.txt\n│ ├── pmm-admin-version.txt\n│ ├── pmm-agent-config.yaml\n│ ├── pmm-agent-version.txt\n│ └── status.json\n├── cron.log\n├── dashboard-upgrade.log\n├── grafana.log\n├── installed.json\n├── nginx.conf\n├── nginx.log\n├── nginx.startup.log\n├── pmm-agent.log\n├── pmm-agent.yaml\n├── pmm-managed.log\n├── pmm-ssl.conf\n├── pmm-update-perform-init.log\n├── pmm-update-perform.log\n├── pmm-version.txt\n├── pmm.conf\n├── pmm.ini\n├── postgresql.log\n├── postgresql.startup.log\n├── prometheus.base.yml\n├── prometheus.log\n├── qan-api2.ini\n├── qan-api2.log\n├── supervisorctl_status.log\n├── supervisord.conf\n├── supervisord.log\n├── systemctl_status.log\n├── victoriametrics-promscrape.yml\n├── victoriametrics.ini\n├── victoriametrics.log\n├── victoriametrics_targets.json\n├── vmalert.ini\n└── vmalert.log", "language": "text" } ] diff --git a/managed/.gitignore b/managed/.gitignore index 238c43f262..4b818000ce 100644 --- a/managed/.gitignore +++ b/managed/.gitignore @@ -16,4 +16,4 @@ pmm-api-tests-junit-report.xml local/ config/telemetry/dev -pmm-managed +./pmm-managed diff --git a/managed/CONTRIBUTING.md b/managed/CONTRIBUTING.md index 08ceaa61ad..ddbafd1018 100644 --- a/managed/CONTRIBUTING.md +++ b/managed/CONTRIBUTING.md @@ -63,7 +63,6 @@ go test -timeout=30s -p 1 ./... | PERCONA_TEST_NICER_API | Enables nicer API with default/zero values in response. | false | | PERCONA_TEST_VERSION_SERVICE_URL | Sets versions service URL | https://check.percona.com/versions/v1 | | PERCONA_TEST_CHECKS_FILE | Specifies path to local checks file and disables downlading checks files from Percona Platform | none | -| PERCONA_TEST_CHECKS_RESEND_INTERVAL | Sets how often checks alerts resent to Alertmanager | 2 seconds | | PERCONA_TEST_CHECKS_DISABLE_START_DELAY | Disables checks service startup delay | false | | PERCONA_TEST_TELEMETRY_INTERVAL | Sets telemetry reporting interval | 24h | | PERCONA_TEST_TELEMETRY_DISABLE_SEND | Disables sending of telemetry data to SaaS. This param doesn't affect telemetry data gathering from the datasources | false | @@ -110,7 +109,7 @@ Devcontainer initialization code is located in `.devcontainer/setup.py`. It uses ├── cmd - code for any scripts run by managed ├── data - alerting templates and generated code ├── models - database helpers and types, the database schema can be found in models/database.go file -├── services - contains all the APIs for interacting with services like alertmanager, checks service, victoriametrics, etc +├── services - contains all the APIs for interacting with services like checks service, victoriametrics, etc ├── testdata - dummy data files used in unit tests ├── utils - utilities ``` diff --git a/managed/cmd/pmm-managed/main.go b/managed/cmd/pmm-managed/main.go index d935c7fa74..a402706a49 100644 --- a/managed/cmd/pmm-managed/main.go +++ b/managed/cmd/pmm-managed/main.go @@ -77,7 +77,6 @@ import ( "github.com/percona/pmm/managed/models" "github.com/percona/pmm/managed/services/agents" agentgrpc "github.com/percona/pmm/managed/services/agents/grpc" - "github.com/percona/pmm/managed/services/alertmanager" "github.com/percona/pmm/managed/services/backup" "github.com/percona/pmm/managed/services/checks" "github.com/percona/pmm/managed/services/config" @@ -196,7 +195,6 @@ type gRPCServerDeps struct { serviceInfoBroker *agents.ServiceInfoBroker grafanaClient *grafana.Client checksService *checks.Service - alertmanager *alertmanager.Service vmalert *vmalert.Service settings *models.Settings templatesService *alerting.Service @@ -508,14 +506,13 @@ func runDebugServer(ctx context.Context) { } type setupDeps struct { - sqlDB *sql.DB - ha *ha.Service - supervisord *supervisord.Service - vmdb *victoriametrics.Service - vmalert *vmalert.Service - alertmanager *alertmanager.Service - server *server.Server - l *logrus.Entry + sqlDB *sql.DB + ha *ha.Service + supervisord *supervisord.Service + vmdb *victoriametrics.Service + vmalert *vmalert.Service + server *server.Server + l *logrus.Entry } // setup performs setup tasks that depend on database. @@ -567,13 +564,6 @@ func setup(ctx context.Context, deps *setupDeps) bool { } deps.vmalert.RequestConfigurationUpdate() - deps.l.Infof("Checking Alertmanager...") - if err = deps.alertmanager.IsReady(ctx); err != nil { - deps.l.Warnf("Alertmanager problem: %+v.", err) - return false - } - deps.alertmanager.RequestConfigurationUpdate() - deps.l.Info("Setup completed.") return true } @@ -883,11 +873,6 @@ func main() { //nolint:cyclop,maintidx connectionCheck := agents.NewConnectionChecker(agentsRegistry) serviceInfoBroker := agents.NewServiceInfoBroker(agentsRegistry) - alertManager := alertmanager.New(db) - // Alertmanager is special due to being added to PMM with invalid /etc/alertmanager.yml. - // Generate configuration file before reloading with supervisord, checking status, etc. - alertManager.GenerateBaseConfigs() - pmmUpdateCheck := supervisord.NewPMMUpdateChecker(logrus.WithField("component", "supervisord/pmm-update-checker")) logs := supervisord.NewLogs(version.FullInfo(), pmmUpdateCheck, vmParams) @@ -989,7 +974,6 @@ func main() { //nolint:cyclop,maintidx VMDB: vmdb, VMAlert: vmalert, AgentsStateUpdater: agentsStateUpdater, - Alertmanager: alertManager, ChecksService: checksService, TemplatesService: alertingService, Supervisord: supervisord, @@ -1031,14 +1015,13 @@ func main() { //nolint:cyclop,maintidx // try synchronously once, then retry in the background deps := &setupDeps{ - sqlDB: sqlDB, - ha: haService, - supervisord: supervisord, - vmdb: vmdb, - vmalert: vmalert, - alertmanager: alertManager, - server: server, - l: logrus.WithField("component", "setup"), + sqlDB: sqlDB, + ha: haService, + supervisord: supervisord, + vmdb: vmdb, + vmalert: vmalert, + server: server, + l: logrus.WithField("component", "setup"), } if !setup(ctx, deps) { go func() { @@ -1087,11 +1070,6 @@ func main() { //nolint:cyclop,maintidx defer wg.Done() vmdb.Run(ctx) }() - wg.Add(1) - go func() { - defer wg.Done() - alertManager.Run(ctx) - }() haService.AddLeaderService(ha.NewContextService("checks", func(ctx context.Context) error { checksService.Run(ctx) @@ -1130,7 +1108,6 @@ func main() { //nolint:cyclop,maintidx agentService: agentService, agentsRegistry: agentsRegistry, agentsStateUpdater: agentsStateUpdater, - alertmanager: alertManager, backupRemovalService: backupRemovalService, backupService: backupService, checksService: checksService, diff --git a/managed/cmd/pmm-managed/main_test.go b/managed/cmd/pmm-managed/main_test.go index 4ce740f9ef..1371fb3499 100644 --- a/managed/cmd/pmm-managed/main_test.go +++ b/managed/cmd/pmm-managed/main_test.go @@ -57,7 +57,6 @@ func TestImports(t *testing.T) { // services should be independent for _, service := range []string{ "github.com/percona/pmm/managed/services/agents", - "github.com/percona/pmm/managed/services/alertmanager", "github.com/percona/pmm/managed/services/checks", "github.com/percona/pmm/managed/services/qan", "github.com/percona/pmm/managed/services/server", @@ -80,7 +79,6 @@ func TestImports(t *testing.T) { "github.com/percona/pmm/managed/services/management", "github.com/percona/pmm/managed/services/server", "github.com/percona/pmm/managed/services/checks", - "github.com/percona/pmm/managed/services/alertmanager", } { constraints[service] = constraint{ blacklistPrefixes: []string{ diff --git a/managed/packages.dot b/managed/cmd/pmm-managed/packages.dot similarity index 65% rename from managed/packages.dot rename to managed/cmd/pmm-managed/packages.dot index 529737a6c2..5b62c0abf6 100644 --- a/managed/packages.dot +++ b/managed/cmd/pmm-managed/packages.dot @@ -1,30 +1,6 @@ digraph packages { - ".test" -> "/"; - "/" -> "/models"; - "/" -> "/services/agents"; - "/" -> "/services/agents/grpc"; - "/" -> "/services/alertmanager"; - "/" -> "/services/backup"; - "/" -> "/services/checks"; - "/" -> "/services/config"; - "/" -> "/services/grafana"; - "/" -> "/services/inventory"; - "/" -> "/services/inventory/grpc"; - "/" -> "/services/management"; - "/" -> "/services/management/backup"; - "/" -> "/services/management/grpc"; - "/" -> "/services/management/ia"; - "/" -> "/services/minio"; - "/" -> "/services/platform"; - "/" -> "/services/qan"; - "/" -> "/services/scheduler"; - "/" -> "/services/server"; - "/" -> "/services/supervisord"; - "/" -> "/services/telemetry"; - "/" -> "/services/versioncache"; - "/" -> "/services/victoriametrics"; - "/" -> "/services/vmalert"; "/cmd/pmm-managed-init" -> "/models"; + "/cmd/pmm-managed-init" -> "/services/supervisord"; "/cmd/pmm-managed-starlark" -> "/services/checks"; "/cmd/pmm-managed-starlark.test" -> "/cmd/pmm-managed-starlark"; "/models.test" -> "/models"; @@ -34,18 +10,19 @@ digraph packages { "/services/agents" -> "/services/agents/channel"; "/services/agents.test" -> "/services/agents"; "/services/agents/grpc" -> "/services/agents"; - "/services/alertmanager" -> "/models"; - "/services/alertmanager" -> "/services"; - "/services/alertmanager.test" -> "/services/alertmanager"; "/services/checks" -> "/models"; "/services/checks" -> "/services"; "/services/checks.test" -> "/services/checks"; + "/services/grafana" -> "/models"; + "/services/grafana" -> "/services"; "/services/grafana.test" -> "/services/grafana"; "/services/inventory" -> "/models"; "/services/inventory" -> "/services"; + "/services/inventory" -> "/services/management/common"; "/services/inventory.test" -> "/services/inventory"; "/services/inventory/grpc" -> "/models"; "/services/inventory/grpc" -> "/services/inventory"; + "/services/inventory/grpc" -> "/services/management/common"; "/services/management" -> "/models"; "/services/management" -> "/services"; "/services/management.test" -> "/services/management"; diff --git a/managed/models/database.go b/managed/models/database.go index bfefbdec13..79d0dfb2a2 100644 --- a/managed/models/database.go +++ b/managed/models/database.go @@ -959,6 +959,9 @@ var databaseSchema = [][]string{ `UPDATE settings SET settings = settings #- '{alerting, email_settings}';`, `UPDATE settings SET settings = settings #- '{alerting, slack_settings}';`, }, + 88: { + `UPDATE settings SET settings = settings - 'alert_manager_url'`, + }, } // ^^^ Avoid default values in schema definition. ^^^ diff --git a/managed/models/settings.go b/managed/models/settings.go index b821a2cc94..49619ac57b 100644 --- a/managed/models/settings.go +++ b/managed/models/settings.go @@ -66,9 +66,6 @@ type Settings struct { SSHKey string `json:"ssh_key"` - // not url.URL to keep username and password - AlertManagerURL string `json:"alert_manager_url"` - VictoriaMetrics struct { CacheEnabled bool `json:"cache_enabled"` } `json:"victoria_metrics"` @@ -142,7 +139,6 @@ func (s *Settings) fillDefaults() { // AWSInstanceChecked is false by default // SSHKey is empty by default - // AlertManagerURL is empty by default // SaaS.STTDisabled is false by default // Alerting.Disabled is false by default // VictoriaMetrics CacheEnable is false by default diff --git a/managed/models/settings_helpers.go b/managed/models/settings_helpers.go index 9892b28919..933d1eefd8 100644 --- a/managed/models/settings_helpers.go +++ b/managed/models/settings_helpers.go @@ -18,8 +18,6 @@ package models import ( "encoding/json" "fmt" - "net/url" - "strings" "time" "github.com/google/uuid" @@ -65,10 +63,6 @@ type ChangeSettingsParams struct { SSHKey string - // not url.URL to keep username and password - AlertManagerURL string - RemoveAlertManagerURL bool - // Enable Security Threat Tool EnableSTT bool // Disable Security Threat Tool @@ -181,12 +175,6 @@ func UpdateSettings(q reform.DBTX, params *ChangeSettingsParams) (*Settings, err if params.SSHKey != "" { settings.SSHKey = params.SSHKey } - if params.AlertManagerURL != "" { - settings.AlertManagerURL = params.AlertManagerURL - } - if params.RemoveAlertManagerURL { - settings.AlertManagerURL = "" - } if params.DisableSTT { settings.SaaS.STTDisabled = true @@ -378,27 +366,6 @@ func ValidateSettings(params *ChangeSettingsParams) error { //nolint:cyclop return err } - if params.AlertManagerURL != "" { - if params.RemoveAlertManagerURL { - return errors.New("both alert_manager_url and remove_alert_manager_url are present") - } - - // custom validation for typical error that is not handled well by url.Parse - if !strings.Contains(params.AlertManagerURL, "//") { - return errors.Errorf("invalid alert_manager_url: %s - missing protocol scheme", params.AlertManagerURL) - } - u, err := url.Parse(params.AlertManagerURL) - if err != nil { - return errors.Errorf("invalid alert_manager_url: %s", err) - } - if u.Scheme == "" { - return errors.Errorf("invalid alert_manager_url: %s - missing protocol scheme", params.AlertManagerURL) - } - if u.Host == "" { - return errors.Errorf("invalid alert_manager_url: %s - missing host", params.AlertManagerURL) - } - } - if params.PMMPublicAddress != "" && params.RemovePMMPublicAddress { return errors.New("both pmm_public_address and remove_pmm_public_address are present") } diff --git a/managed/models/settings_helpers_test.go b/managed/models/settings_helpers_test.go index 0474d3927b..654fd226ae 100644 --- a/managed/models/settings_helpers_test.go +++ b/managed/models/settings_helpers_test.go @@ -116,43 +116,6 @@ func TestSettings(t *testing.T) { assert.Equal(t, []string{"aws"}, settings.AWSPartitions) }) - t.Run("AlertManagerURL", func(t *testing.T) { - _, err := models.UpdateSettings(sqlDB, &models.ChangeSettingsParams{ - AlertManagerURL: "mailto:hello@example.com", - }) - var errInvalidArgument *models.InvalidArgumentError - assert.True(t, errors.As(err, &errInvalidArgument)) - assert.EqualError(t, err, `invalid argument: invalid alert_manager_url: mailto:hello@example.com - missing protocol scheme`) - _, err = models.UpdateSettings(sqlDB, &models.ChangeSettingsParams{ - AlertManagerURL: "1.2.3.4:1234", - }) - assert.True(t, errors.As(err, &errInvalidArgument)) - assert.EqualError(t, err, `invalid argument: invalid alert_manager_url: 1.2.3.4:1234 - missing protocol scheme`) - _, err = models.UpdateSettings(sqlDB, &models.ChangeSettingsParams{ - AlertManagerURL: "1.2.3.4", - }) - assert.True(t, errors.As(err, &errInvalidArgument)) - assert.EqualError(t, err, `invalid argument: invalid alert_manager_url: 1.2.3.4 - missing protocol scheme`) - _, err = models.UpdateSettings(sqlDB, &models.ChangeSettingsParams{ - AlertManagerURL: "1.2.3.4//", - }) - assert.True(t, errors.As(err, &errInvalidArgument)) - assert.EqualError(t, err, `invalid argument: invalid alert_manager_url: 1.2.3.4// - missing protocol scheme`) - _, err = models.UpdateSettings(sqlDB, &models.ChangeSettingsParams{ - AlertManagerURL: "https://", - }) - assert.True(t, errors.As(err, &errInvalidArgument)) - assert.EqualError(t, err, `invalid argument: invalid alert_manager_url: https:// - missing host`) - _, err = models.UpdateSettings(sqlDB, &models.ChangeSettingsParams{ - AlertManagerURL: "https://1.2.3.4", - }) - assert.NoError(t, err) - _, err = models.UpdateSettings(sqlDB, &models.ChangeSettingsParams{ - AlertManagerURL: "https://1.2.3.4:1234/", - }) - assert.NoError(t, err) - }) - t.Run("", func(t *testing.T) { mr := models.MetricsResolutions{MR: 500 * time.Millisecond} // 0.5s _, err := models.UpdateSettings(sqlDB, &models.ChangeSettingsParams{ diff --git a/managed/services/alertmanager/alertmanager.go b/managed/services/alertmanager/alertmanager.go deleted file mode 100644 index 3eaa5b54a3..0000000000 --- a/managed/services/alertmanager/alertmanager.go +++ /dev/null @@ -1,505 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package alertmanager contains business logic of working with Alertmanager. -package alertmanager - -import ( - "context" - _ "embed" // for email templates - "fmt" - "io" - "net/http" - "os" - "os/exec" - "path" - "strings" - "time" - - "github.com/AlekSi/pointer" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/percona/promconfig/alertmanager" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "golang.org/x/sys/unix" - "gopkg.in/reform.v1" - "gopkg.in/yaml.v3" - - "github.com/percona/pmm/api/alertmanager/amclient" - "github.com/percona/pmm/api/alertmanager/amclient/alert" - "github.com/percona/pmm/api/alertmanager/amclient/silence" - "github.com/percona/pmm/api/alertmanager/ammodels" - "github.com/percona/pmm/managed/services" - "github.com/percona/pmm/managed/utils/dir" - "github.com/percona/pmm/utils/pdeathsig" -) - -const ( - updateBatchDelay = time.Second - configurationUpdateTimeout = 3 * time.Second - - alertmanagerDir = "/srv/alertmanager" - alertmanagerCertDir = "/srv/alertmanager/cert" - alertmanagerDataDir = "/srv/alertmanager/data" - dirPerm = os.FileMode(0o775) - - alertmanagerConfigPath = "/etc/alertmanager.yml" - alertmanagerBaseConfigPath = "/srv/alertmanager/alertmanager.base.yml" - - // CheckFilter represents AlertManager filter for Checks/Advisor results. - CheckFilter = "stt_check=1" -) - -var notificationLabels = []string{ - "node_name", "node_id", "service_name", "service_id", "service_type", "rule_id", - "alertgroup", "template_name", "severity", "agent_id", "agent_type", "job", -} - -// Service is responsible for interactions with Alertmanager. -type Service struct { - db *reform.DB - client *http.Client - - l *logrus.Entry - reloadCh chan struct{} -} - -// New creates new service. -func New(db *reform.DB) *Service { - return &Service{ - db: db, - client: &http.Client{}, // TODO instrument with utils/irt; see vmalert package https://jira.percona.com/browse/PMM-7229 - l: logrus.WithField("component", "alertmanager"), - reloadCh: make(chan struct{}, 1), - } -} - -// GenerateBaseConfigs generates alertmanager.base.yml if it is absent, -// and then writes basic alertmanager.yml if it is absent or empty. -// It is needed because Alertmanager was added to PMM -// with invalid configuration file (it will fail with "no route provided in config" error). -func (svc *Service) GenerateBaseConfigs() { - for _, dirPath := range []string{alertmanagerDir, alertmanagerDataDir, alertmanagerCertDir} { - if err := dir.CreateDataDir(dirPath, "pmm", "pmm", dirPerm); err != nil { - svc.l.Error(err) - } - } - - defaultBase := strings.TrimSpace(` ---- -# You can edit this file; changes will be preserved. - -route: - receiver: empty - routes: [] - -receivers: - - name: empty - `) + "\n" - - _, err := os.Stat(alertmanagerBaseConfigPath) - svc.l.Debugf("%s status: %v", alertmanagerBaseConfigPath, err) - if os.IsNotExist(err) { - svc.l.Infof("Creating %s", alertmanagerBaseConfigPath) - err = os.WriteFile(alertmanagerBaseConfigPath, []byte(defaultBase), 0o644) //nolint:gosec - if err != nil { - svc.l.Errorf("Failed to write %s: %s", alertmanagerBaseConfigPath, err) - } - } - - // Don't call updateConfiguration() there as Alertmanager is likely to be in the crash loop at the moment. - // Instead, write alertmanager.yml directly. main.go will request configuration update. - stat, err := os.Stat(alertmanagerConfigPath) - if err != nil || int(stat.Size()) <= len("---\n") { // https://github.com/percona/pmm-server/blob/main/alertmanager.yml - svc.l.Infof("Creating %s", alertmanagerConfigPath) - err = os.WriteFile(alertmanagerConfigPath, []byte(defaultBase), 0o644) //nolint:gosec - if err != nil { - svc.l.Errorf("Failed to write %s: %s", alertmanagerConfigPath, err) - } - } -} - -// Run runs Alertmanager configuration update loop until ctx is canceled. -func (svc *Service) Run(ctx context.Context) { - // If you change this and related methods, - // please do similar changes in victoriametrics and vmalert packages. - - svc.l.Info("Starting...") - defer svc.l.Info("Done.") - - // reloadCh, configuration update loop, and RequestConfigurationUpdate method ensure that configuration - // is reloaded when requested, but several requests are batched together to avoid too often reloads. - // That allows the caller to just call RequestConfigurationUpdate when it seems fit. - if cap(svc.reloadCh) != 1 { - panic("reloadCh should have capacity 1") - } - - for { - select { - case <-ctx.Done(): - return - - case <-svc.reloadCh: - // batch several update requests together by delaying the first one - sleepCtx, sleepCancel := context.WithTimeout(ctx, updateBatchDelay) - <-sleepCtx.Done() - sleepCancel() - - if ctx.Err() != nil { - return - } - - nCtx, cancel := context.WithTimeout(ctx, configurationUpdateTimeout) - if err := svc.updateConfiguration(nCtx); err != nil { - svc.l.Errorf("Failed to update configuration, will retry: %+v.", err) - svc.RequestConfigurationUpdate() - } - cancel() - } - } -} - -// RequestConfigurationUpdate requests Alertmanager configuration update. -func (svc *Service) RequestConfigurationUpdate() { - select { - case svc.reloadCh <- struct{}{}: - default: - } -} - -// updateConfiguration updates Alertmanager configuration. -func (svc *Service) updateConfiguration(ctx context.Context) error { - start := time.Now() - defer func() { - if dur := time.Since(start); dur > time.Second { - svc.l.Warnf("updateConfiguration took %s.", dur) - } - }() - - base := svc.loadBaseConfig() - b, err := svc.marshalConfig(base) - if err != nil { - return err - } - - return svc.configAndReload(ctx, b) -} - -// reload asks Alertmanager to reload configuration. -func (svc *Service) reload(ctx context.Context) error { - u := "http://127.0.0.1:9093/alertmanager/-/reload" - req, err := http.NewRequestWithContext(ctx, http.MethodPost, u, nil) - if err != nil { - return errors.WithStack(err) - } - resp, err := svc.client.Do(req) - if err != nil { - return errors.WithStack(err) - } - defer resp.Body.Close() //nolint:gosec,errcheck - - b, err := io.ReadAll(resp.Body) - svc.l.Debugf("Alertmanager reload: %s", b) - if err != nil { - return errors.WithStack(err) - } - - if resp.StatusCode != http.StatusOK { - return errors.Errorf("expected 200, got %d", resp.StatusCode) - } - return nil -} - -// loadBaseConfig returns parsed base configuration file, or empty configuration on error. -func (svc *Service) loadBaseConfig() *alertmanager.Config { - buf, err := os.ReadFile(alertmanagerBaseConfigPath) - if err != nil { - if !os.IsNotExist(err) { - svc.l.Errorf("Failed to load base Alertmanager config %s: %s", alertmanagerBaseConfigPath, err) - } - - return &alertmanager.Config{} - } - - var cfg alertmanager.Config - if err := yaml.Unmarshal(buf, &cfg); err != nil { - svc.l.Errorf("Failed to parse base Alertmanager config %s: %s.", alertmanagerBaseConfigPath, err) - - return &alertmanager.Config{} - } - - return &cfg -} - -// marshalConfig marshals Alertmanager configuration. -func (svc *Service) marshalConfig(base *alertmanager.Config) ([]byte, error) { - b, err := yaml.Marshal(base) - if err != nil { - return nil, errors.Wrap(err, "can't marshal Alertmanager configuration file") - } - - b = append([]byte("# Managed by pmm-managed. DO NOT EDIT.\n---\n"), b...) - - return b, nil -} - -// validateConfig validates given configuration with `amtool check-config`. -func (svc *Service) validateConfig(ctx context.Context, cfg []byte) error { - f, err := os.CreateTemp("", "pmm-managed-config-alertmanager-") - if err != nil { - return errors.WithStack(err) - } - if _, err = f.Write(cfg); err != nil { - return errors.WithStack(err) - } - defer func() { - _ = f.Close() - _ = os.Remove(f.Name()) - }() - - args := []string{"check-config", "--output=json", f.Name()} - cmd := exec.CommandContext(ctx, "amtool", args...) //nolint:gosec - pdeathsig.Set(cmd, unix.SIGKILL) - - b, err := cmd.CombinedOutput() - if err != nil { - svc.l.Errorf("%s", b) - return errors.Wrap(err, string(b)) - } - svc.l.Debugf("%s", b) - - return nil -} - -// configAndReload saves given Alertmanager configuration to file and reloads Alertmanager. -// If configuration can't be reloaded for some reason, old file is restored, and configuration is reloaded again. -func (svc *Service) configAndReload(ctx context.Context, b []byte) error { - oldCfg, err := os.ReadFile(alertmanagerConfigPath) - if err != nil { - return errors.WithStack(err) - } - - fi, err := os.Stat(alertmanagerConfigPath) - if err != nil { - return errors.WithStack(err) - } - - // restore old content and reload in case of error - var restore bool - defer func() { - if restore { - if err = os.WriteFile(alertmanagerConfigPath, oldCfg, fi.Mode()); err != nil { - svc.l.Error(err) - } - if err = svc.reload(ctx); err != nil { - svc.l.Error(err) - } - } - }() - - if err = svc.validateConfig(ctx, b); err != nil { - return err - } - - restore = true - if err = os.WriteFile(alertmanagerConfigPath, b, fi.Mode()); err != nil { - return errors.WithStack(err) - } - if err = svc.reload(ctx); err != nil { - return err - } - svc.l.Infof("Configuration reloaded.") - restore = false - - return nil -} - -func cleanupTLSConfigFiles() error { - des, err := os.ReadDir(alertmanagerCertDir) - if err != nil { - return errors.Wrap(err, "failed to list alertmanager certificates directory") - } - for _, de := range des { - if de.IsDir() { - continue - } - - if err := os.Remove(path.Join(alertmanagerCertDir, de.Name())); err != nil { - return errors.WithStack(err) - } - } - - return nil -} - -// SendAlerts sends given alerts. It is the caller's responsibility -// to call this method every now and then. -func (svc *Service) SendAlerts(ctx context.Context, alerts ammodels.PostableAlerts) { - if len(alerts) == 0 { - svc.l.Debug("0 alerts to send, exiting.") - return - } - - svc.l.Debugf("Sending %d alerts...", len(alerts)) - _, err := amclient.Default.Alert.PostAlerts(&alert.PostAlertsParams{ - Alerts: alerts, - Context: ctx, - }) - if err != nil { - svc.l.Error(err) - } -} - -// GetAlerts returns alerts available in alertmanager. -func (svc *Service) GetAlerts(ctx context.Context, fp *services.FilterParams) ([]*ammodels.GettableAlert, error) { - alertParams := alert.NewGetAlertsParams() - alertParams.Context = ctx - - if fp != nil { - if fp.IsCheck { - alertParams.Filter = append(alertParams.Filter, CheckFilter) - } - if fp.ServiceID != "" { - alertParams.Filter = append(alertParams.Filter, fmt.Sprintf("service_id=\"%s\"", fp.ServiceID)) - } - if fp.AlertID != "" { - alertParams.Filter = append(alertParams.Filter, fmt.Sprintf("alert_id=\"%s\"", fp.AlertID)) - } - } - - svc.l.Debugf("%+v", alertParams) - resp, err := amclient.Default.Alert.GetAlerts(alertParams) - if err != nil { - return nil, err - } - - return resp.Payload, nil -} - -// FindAlertsByID searches alerts by IDs in alertmanager. -func (svc *Service) FindAlertsByID(ctx context.Context, params *services.FilterParams, ids []string) ([]*ammodels.GettableAlert, error) { - alerts, err := svc.GetAlerts(ctx, params) - if err != nil { - return nil, errors.Wrapf(err, "failed to get alerts from alertmanager") - } - - l := len(ids) - m := make(map[string]struct{}, l) - for _, id := range ids { - m[id] = struct{}{} - } - - res := make([]*ammodels.GettableAlert, 0, l) - for _, a := range alerts { - if _, ok := m[*a.Fingerprint]; ok { - res = append(res, a) - } - } - - return res, nil -} - -// SilenceAlerts silences a group of provided alerts. -func (svc *Service) SilenceAlerts(ctx context.Context, alerts []*ammodels.GettableAlert) error { - var err error - for _, a := range alerts { - if len(a.Status.SilencedBy) != 0 { - // Skip already silenced alerts - continue - } - - matchers := make([]*ammodels.Matcher, 0, len(a.Labels)) - for label, value := range a.Labels { - matchers = append(matchers, - &ammodels.Matcher{ - IsRegex: pointer.ToBool(false), - Name: pointer.ToString(label), - Value: pointer.ToString(value), - }) - } - - starts := strfmt.DateTime(time.Now()) - ends := strfmt.DateTime(time.Now().Add(100 * 365 * 24 * time.Hour)) // Mute for 100 years - _, err = amclient.Default.Silence.PostSilences(&silence.PostSilencesParams{ - Silence: &ammodels.PostableSilence{ - Silence: ammodels.Silence{ - Comment: pointer.ToString(""), - CreatedBy: pointer.ToString("PMM"), - StartsAt: &starts, - EndsAt: &ends, - Matchers: matchers, - }, - }, - Context: ctx, - }) - if err != nil { - return errors.Wrapf(err, "failed to silence alert with id: %s", *a.Fingerprint) - } - } - - return nil -} - -// UnsilenceAlerts unmutes the provided alerts. -func (svc *Service) UnsilenceAlerts(ctx context.Context, alerts []*ammodels.GettableAlert) error { - var err error - for _, a := range alerts { - for _, silenceID := range a.Status.SilencedBy { - _, err = amclient.Default.Silence.DeleteSilence(&silence.DeleteSilenceParams{ - SilenceID: strfmt.UUID(silenceID), - Context: ctx, - }) - - if err != nil { - return errors.Wrapf(err, "failed to delete silence with id %s for alert %s", silenceID, *a.Fingerprint) - } - } - } - - return nil -} - -// IsReady verifies that Alertmanager works. -func (svc *Service) IsReady(ctx context.Context) error { - u := "http://127.0.0.1:9093/alertmanager/-/ready" - req, err := http.NewRequestWithContext(ctx, http.MethodGet, u, nil) - if err != nil { - return errors.WithStack(err) - } - resp, err := svc.client.Do(req) - if err != nil { - return errors.WithStack(err) - } - defer resp.Body.Close() //nolint:gosec,errcheck - - b, err := io.ReadAll(resp.Body) - svc.l.Debugf("Alertmanager ready: %s", b) - if err != nil { - return errors.WithStack(err) - } - if resp.StatusCode != http.StatusOK { - return errors.Errorf("expected 200, got %d", resp.StatusCode) - } - - return nil -} - -// configure default client; we use it mainly because we can't remove it from generated code -// -//nolint:gochecknoinits -func init() { - amclient.Default.SetTransport(httptransport.New("127.0.0.1:9093", "/alertmanager/api/v2", []string{"http"})) -} diff --git a/managed/services/alertmanager/alertmanager_test.go b/managed/services/alertmanager/alertmanager_test.go deleted file mode 100644 index 0ad493e571..0000000000 --- a/managed/services/alertmanager/alertmanager_test.go +++ /dev/null @@ -1,380 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package alertmanager - -import ( - "context" - "strings" - "testing" - - "github.com/percona/promconfig/alertmanager" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "gopkg.in/reform.v1" - "gopkg.in/reform.v1/dialects/postgresql" - - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/utils/testdb" - "github.com/percona/pmm/managed/utils/tests" -) - -var htmlTemplate = `| - - - - - - - {{ template "__subject" . }} - - - - - - - - - - -
-
- - - {{ if eq .CommonLabels.severity "notice" }} - - - - - -
- {{ else if eq .CommonLabels.severity "warning" }} - - {{ else if eq .CommonLabels.severity "error" }} - - {{ else }} - - {{ end }} - You have {{ .Alerts | len }} {{ .CommonLabels.severity }} alert{{ if gt (len .Alerts) 1 }}s{{ end }} firing -
- - - - - {{ range .Alerts.Firing }} - - - - {{ end }} -
- View in {{ template "__alertmanager" . }} -
-
-
- Alert: - {{ if .Labels.severity }} - [{{ .Labels.severity | toUpper }}] - {{ end }} - {{ .Annotations.summary }} -
-
- Description: - {{ .Annotations.description }} -
-
- Violated rule: - {{ .Annotations.rule }} -
- Details:
- {{ with .Labels }} - {{ with .Remove (stringSlice "alertname" "ia" "instance" "node_type" "server") }} - {{ range .SortedPairs }} - • {{ .Name }}: {{ .Value }}
- {{ end }} - {{ end }} - {{ end }} -
-
- - -
-
- - - - ` - -func TestIsReady(t *testing.T) { - New(nil).GenerateBaseConfigs() // this method should not use database - - ctx := context.Background() - sqlDB := testdb.Open(t, models.SkipFixtures, nil) - db := reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - svc := New(db) - - assert.NoError(t, svc.updateConfiguration(ctx)) - assert.NoError(t, svc.IsReady(ctx)) -} - -// marshalAndValidate populates, marshals and validates config. -func marshalAndValidate(t *testing.T, svc *Service, base *alertmanager.Config) string { - t.Helper() - b, err := svc.marshalConfig(base) - require.NoError(t, err) - - t.Logf("config:\n%s", b) - - err = svc.validateConfig(context.Background(), b) - require.NoError(t, err) - return string(b) -} - -func TestConfig(t *testing.T) { - New(nil).GenerateBaseConfigs() // this method should not use database - - t.Run("without receivers and routes", func(t *testing.T) { - tests.SetTestIDReader(t) - sqlDB := testdb.Open(t, models.SkipFixtures, nil) - db := reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - svc := New(db) - - cfg := svc.loadBaseConfig() - cfg.Global = &alertmanager.GlobalConfig{ - SlackAPIURL: "https://hooks.slack.com/services/abc/123/xyz", - } - - actual := marshalAndValidate(t, svc, cfg) - expected := strings.TrimSpace(` -# Managed by pmm-managed. DO NOT EDIT. ---- -global: - resolve_timeout: 0s - smtp_require_tls: false - slack_api_url: https://hooks.slack.com/services/abc/123/xyz -route: - receiver: empty - continue: false -receivers: - - name: empty -templates: [] - `) + "\n" - assert.Equal(t, expected, actual, "actual:\n%s", actual) - }) -} diff --git a/managed/services/checks/checks.go b/managed/services/checks/checks.go index c3e95f0302..e9ec399ab5 100644 --- a/managed/services/checks/checks.go +++ b/managed/services/checks/checks.go @@ -260,7 +260,7 @@ func (s *Service) GetSecurityCheckResults() ([]services.CheckResult, error) { return s.alertsRegistry.getCheckResults(""), nil } -// GetChecksResults returns the failed checks for a given service from AlertManager. +// GetChecksResults returns the failed checks for a given service. func (s *Service) GetChecksResults(_ context.Context, serviceID string) ([]services.CheckResult, error) { settings, err := models.GetSettings(s.db) if err != nil { diff --git a/managed/services/grafana/auth_server.go b/managed/services/grafana/auth_server.go index 0eb6842244..0a83233659 100644 --- a/managed/services/grafana/auth_server.go +++ b/managed/services/grafana/auth_server.go @@ -86,7 +86,6 @@ var rules = map[string]role{ // mustSetupRules group "/prometheus": admin, "/victoriametrics": admin, - "/alertmanager": admin, "/graph": none, "/swagger": none, @@ -111,7 +110,6 @@ const vmProxyHeaderName = "X-Proxy-Filter" var mustSetupRules = []string{ "/prometheus", "/victoriametrics", - "/alertmanager", "/graph", "/swagger", } diff --git a/managed/services/grafana/auth_server_test.go b/managed/services/grafana/auth_server_test.go index 6a3994538d..09cb5cd319 100644 --- a/managed/services/grafana/auth_server_test.go +++ b/managed/services/grafana/auth_server_test.go @@ -233,9 +233,8 @@ func TestAuthServerAuthenticate(t *testing.T) { "/v0/qan/ObjectDetails/GetQueryExample": viewer, - "/prometheus/": admin, - "/alertmanager/": admin, - "/logs.zip": admin, + "/prometheus/": admin, + "/logs.zip": admin, } { for _, role := range []role{viewer, editor, admin} { uri := uri diff --git a/managed/services/server/deps.go b/managed/services/server/deps.go index 4d47530b7b..b675fba85d 100644 --- a/managed/services/server/deps.go +++ b/managed/services/server/deps.go @@ -45,13 +45,6 @@ type prometheusService interface { healthChecker } -// alertmanagerService is a subset of methods of alertmanager.Service used by this package. -// We use it instead of real type for testing and to avoid dependency cycle. -type alertmanagerService interface { - RequestConfigurationUpdate() - healthChecker -} - // checksService is a subset of methods of checks.Service used by this package. // We use it instead of real type for testing and to avoid dependency cycle. type checksService interface { diff --git a/managed/services/server/mock_alertmanager_service_test.go b/managed/services/server/mock_alertmanager_service_test.go deleted file mode 100644 index 8b80e72efd..0000000000 --- a/managed/services/server/mock_alertmanager_service_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package server - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockAlertmanagerService is an autogenerated mock type for the alertmanagerService type -type mockAlertmanagerService struct { - mock.Mock -} - -// IsReady provides a mock function with given fields: ctx -func (_m *mockAlertmanagerService) IsReady(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for IsReady") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// RequestConfigurationUpdate provides a mock function with given fields: -func (_m *mockAlertmanagerService) RequestConfigurationUpdate() { - _m.Called() -} - -// newMockAlertmanagerService creates a new instance of mockAlertmanagerService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAlertmanagerService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAlertmanagerService { - mock := &mockAlertmanagerService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/server/server.go b/managed/services/server/server.go index b7d2d87af2..de305baf2e 100644 --- a/managed/services/server/server.go +++ b/managed/services/server/server.go @@ -53,7 +53,6 @@ type Server struct { agentsState agentsStateUpdater vmalert vmAlertService vmalertExternalRules vmAlertExternalRules - alertmanager alertmanagerService checksService checksService templatesService templatesService supervisord supervisordService @@ -85,7 +84,6 @@ type Params struct { AgentsStateUpdater agentsStateUpdater VMDB prometheusService VMAlert prometheusService - Alertmanager alertmanagerService ChecksService checksService TemplatesService templatesService VMAlertExternalRules vmAlertExternalRules @@ -108,7 +106,6 @@ func NewServer(params *Params) (*Server, error) { vmdb: params.VMDB, agentsState: params.AgentsStateUpdater, vmalert: params.VMAlert, - alertmanager: params.Alertmanager, checksService: params.ChecksService, templatesService: params.TemplatesService, vmalertExternalRules: params.VMAlertExternalRules, @@ -208,7 +205,6 @@ func (s *Server) Version(ctx context.Context, req *serverpb.VersionRequest) (*se func (s *Server) Readiness(ctx context.Context, req *serverpb.ReadinessRequest) (*serverpb.ReadinessResponse, error) { var notReady bool for n, svc := range map[string]healthChecker{ - "alertmanager": s.alertmanager, "grafana": s.grafanaClient, "victoriametrics": s.vmdb, "vmalert": s.vmalert, @@ -439,7 +435,6 @@ func (s *Server) convertSettings(settings *models.Settings, connectedToPlatform DataRetention: durationpb.New(settings.DataRetention), SshKey: settings.SSHKey, AwsPartitions: settings.AWSPartitions, - AlertManagerUrl: settings.AlertManagerURL, SttEnabled: !settings.SaaS.STTDisabled, AzurediscoverEnabled: settings.Azurediscover.Enabled, PmmPublicAddress: settings.PMMPublicAddress, @@ -454,12 +449,6 @@ func (s *Server) convertSettings(settings *models.Settings, connectedToPlatform DefaultRoleId: uint32(settings.DefaultRoleID), } - b, err := s.vmalertExternalRules.ReadRules() - if err != nil { - s.l.Warnf("Cannot load Alert Manager rules: %s", err) - } - res.AlertManagerRules = b - return res } @@ -483,9 +472,6 @@ func (s *Server) GetSettings(ctx context.Context, req *serverpb.GetSettingsReque func (s *Server) validateChangeSettingsRequest(ctx context.Context, req *serverpb.ChangeSettingsRequest) error { metricsRes := req.MetricsResolutions - if req.AlertManagerRules != "" && req.RemoveAlertManagerRules { - return status.Error(codes.InvalidArgument, "Both alert_manager_rules and remove_alert_manager_rules are present.") - } if req.PmmPublicAddress != "" && req.RemovePmmPublicAddress { return status.Error(codes.InvalidArgument, "Both pmm_public_address and remove_pmm_public_address are present.") } @@ -496,12 +482,6 @@ func (s *Server) validateChangeSettingsRequest(ctx context.Context, req *serverp } } - if req.AlertManagerRules != "" { - if err := s.vmalertExternalRules.ValidateRules(ctx, req.AlertManagerRules); err != nil { - return err - } - } - // check request parameters compatibility with environment variables if req.EnableUpdates && s.envSettings.DisableUpdates { @@ -577,8 +557,6 @@ func (s *Server) ChangeSettings(ctx context.Context, req *serverpb.ChangeSetting }, DataRetention: req.DataRetention.AsDuration(), AWSPartitions: req.AwsPartitions, - AlertManagerURL: req.AlertManagerUrl, - RemoveAlertManagerURL: req.RemoveAlertManagerUrl, SSHKey: req.SshKey, EnableSTT: req.EnableStt, DisableSTT: req.DisableStt, @@ -613,17 +591,6 @@ func (s *Server) ChangeSettings(ctx context.Context, req *serverpb.ChangeSetting } } - // absent value means "do not change" - if req.AlertManagerRules != "" { - if err = s.vmalertExternalRules.WriteRules(req.AlertManagerRules); err != nil { - return errors.WithStack(err) - } - } - if req.RemoveAlertManagerRules { - if err = s.vmalertExternalRules.RemoveRulesFile(); err != nil && !os.IsNotExist(err) { - return errors.WithStack(err) - } - } return nil }) if errTX != nil { @@ -695,7 +662,6 @@ func (s *Server) UpdateConfigurations(ctx context.Context) error { } s.vmdb.RequestConfigurationUpdate() s.vmalert.RequestConfigurationUpdate() - s.alertmanager.RequestConfigurationUpdate() return nil } diff --git a/managed/services/server/server_test.go b/managed/services/server/server_test.go index 0ea7039b78..82a67d3cb6 100644 --- a/managed/services/server/server_test.go +++ b/managed/services/server/server_test.go @@ -55,10 +55,6 @@ func TestServer(t *testing.T) { mvmalert.Test(t) mvmalert.On("RequestConfigurationUpdate").Return(nil) - var malertmanager mockAlertmanagerService - malertmanager.Test(t) - malertmanager.On("RequestConfigurationUpdate").Return(nil) - var mtemplatesService mockTemplatesService mtemplatesService.Test(t) mtemplatesService.On("CollectTemplates", context.TODO()).Return(nil) @@ -79,7 +75,6 @@ func TestServer(t *testing.T) { DB: reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)), VMDB: &mvmdb, VMAlert: &mvmalert, - Alertmanager: &malertmanager, ChecksService: &mchecksService, TemplatesService: &mtemplatesService, AgentsStateUpdater: mState, @@ -198,14 +193,8 @@ func TestServer(t *testing.T) { ctx := context.TODO() - expected := status.New(codes.InvalidArgument, "Both alert_manager_rules and remove_alert_manager_rules are present.") - tests.AssertGRPCError(t, expected, s.validateChangeSettingsRequest(ctx, &serverpb.ChangeSettingsRequest{ - AlertManagerRules: "something", - RemoveAlertManagerRules: true, - })) - s.envSettings.DisableUpdates = true - expected = status.New(codes.FailedPrecondition, "Updates are disabled via DISABLE_UPDATES environment variable.") + expected := status.New(codes.FailedPrecondition, "Updates are disabled via DISABLE_UPDATES environment variable.") tests.AssertGRPCError(t, expected, s.validateChangeSettingsRequest(ctx, &serverpb.ChangeSettingsRequest{ EnableUpdates: true, })) diff --git a/managed/services/supervisord/logs.go b/managed/services/supervisord/logs.go index 8fcfcb809f..6f52e14534 100644 --- a/managed/services/supervisord/logs.go +++ b/managed/services/supervisord/logs.go @@ -157,7 +157,6 @@ func (l *Logs) files(ctx context.Context, pprofConfig *PprofConfig) []fileConten "/etc/victoriametrics-promscrape.yml", "/etc/supervisord.conf", - "/etc/supervisord.d/alertmanager.ini", "/etc/supervisord.d/pmm.ini", "/etc/supervisord.d/qan-api2.ini", "/etc/supervisord.d/victoriametrics.ini", diff --git a/managed/services/supervisord/logs_test.go b/managed/services/supervisord/logs_test.go index 6fef01a770..8fb6f2a7aa 100644 --- a/managed/services/supervisord/logs_test.go +++ b/managed/services/supervisord/logs_test.go @@ -36,8 +36,6 @@ import ( ) var commonExpectedFiles = []string{ - "alertmanager.ini", - "alertmanager.log", "clickhouse-server.log", "grafana.log", "installed.json", diff --git a/managed/services/supervisord/supervisord.go b/managed/services/supervisord/supervisord.go index 55718c1b07..8460060cfa 100644 --- a/managed/services/supervisord/supervisord.go +++ b/managed/services/supervisord/supervisord.go @@ -466,10 +466,6 @@ func (s *Service) marshalConfig(tmpl *template.Template, settings *models.Settin templateParams["PerconaSSODetails"] = nil } - if err := addAlertManagerParams(settings.AlertManagerURL, templateParams); err != nil { - return nil, errors.Wrap(err, "cannot add AlertManagerParams to supervisor template") - } - var buf bytes.Buffer if err := tmpl.Execute(&buf, templateParams); err != nil { return nil, errors.Wrapf(err, "failed to render template %q", tmpl.Name()) @@ -478,37 +474,6 @@ func (s *Service) marshalConfig(tmpl *template.Template, settings *models.Settin return b, nil } -// addAlertManagerParams parses alertManagerURL -// and extracts url, username and password from it to templateParams. -func addAlertManagerParams(alertManagerURL string, templateParams map[string]interface{}) error { - templateParams["AlertmanagerURL"] = "http://127.0.0.1:9093/alertmanager" - templateParams["AlertManagerUser"] = "" - templateParams["AlertManagerPassword"] = "" - if alertManagerURL == "" { - return nil - } - u, err := url.Parse(alertManagerURL) - if err != nil { - return errors.Wrap(err, "cannot parse AlertManagerURL") - } - if u.Opaque != "" || u.Host == "" { - return errors.Errorf("AlertmanagerURL parsed incorrectly as %#v", u) - } - password, _ := u.User.Password() - n := url.URL{ - Scheme: u.Scheme, - Host: u.Host, - Path: u.Path, - RawQuery: u.RawQuery, - Fragment: u.Fragment, - } - templateParams["AlertManagerUser"] = fmt.Sprintf(",%s", u.User.Username()) - templateParams["AlertManagerPassword"] = fmt.Sprintf(",%s", strconv.Quote(password)) - templateParams["AlertmanagerURL"] = fmt.Sprintf("http://127.0.0.1:9093/alertmanager,%s", n.String()) - - return nil -} - // addPostgresParams adds pmm-server postgres database params to template config for grafana. func (s *Service) addPostgresParams(templateParams map[string]interface{}) { if s.pgParams == nil { @@ -584,7 +549,7 @@ func (s *Service) saveConfigAndReload(name string, cfg []byte) (bool, error) { return true, nil } -// UpdateConfiguration updates Prometheus, Alertmanager, Grafana and qan-api2 configurations, restarting them if needed. +// UpdateConfiguration updates VictoriaMetrics, Grafana and qan-api2 configurations, restarting them if needed. func (s *Service) UpdateConfiguration(settings *models.Settings, ssoDetails *models.PerconaSSODetails) error { if s.supervisorctlPath == "" { s.l.Errorf("supervisorctl not found, configuration updates are disabled.") @@ -700,9 +665,6 @@ redirect_stderr = true priority = 7 command = /usr/sbin/vmalert - --notifier.url="{{ .AlertmanagerURL }}" - --notifier.basicAuth.password='{{ .AlertManagerPassword }}' - --notifier.basicAuth.username="{{ .AlertManagerUser }}" --external.url={{ .VMURL }} --datasource.url={{ .VMURL }} --remoteRead.url={{ .VMURL }} @@ -748,30 +710,6 @@ stdout_logfile_backups = 3 redirect_stderr = true {{end}} -{{define "alertmanager"}} -[program:alertmanager] -priority = 8 -command = - /usr/sbin/alertmanager - --config.file=/etc/alertmanager.yml - --storage.path=/srv/alertmanager/data - --data.retention={{ .DataRetentionHours }}h - --web.external-url=http://localhost:9093/alertmanager/ - --web.listen-address={{ .InterfaceToBind }}:9093 - --cluster.listen-address="" -user = pmm -autorestart = true -autostart = true -startretries = 1000 -startsecs = 1 -stopsignal = TERM -stopwaitsecs = 10 -stdout_logfile = /srv/logs/alertmanager.log -stdout_logfile_maxbytes = 10MB -stdout_logfile_backups = 3 -redirect_stderr = true -{{end}} - {{define "qan-api2"}} [program:qan-api2] priority = 13 diff --git a/managed/services/supervisord/supervisord_test.go b/managed/services/supervisord/supervisord_test.go index a8fb84c825..1aea3d39cc 100644 --- a/managed/services/supervisord/supervisord_test.go +++ b/managed/services/supervisord/supervisord_test.go @@ -49,8 +49,7 @@ func TestConfig(t *testing.T) { } s := New(configDir, pmmUpdateCheck, &models.Params{VMParams: vmParams, PGParams: pgParams, HAParams: &models.HAParams{}}, gRPCMessageMaxSize) settings := &models.Settings{ - DataRetention: 30 * 24 * time.Hour, - AlertManagerURL: "https://external-user:passw!,ord@external-alertmanager:6443/alerts", + DataRetention: 30 * 24 * time.Hour, } settings.VictoriaMetrics.CacheEnabled = false @@ -83,41 +82,3 @@ func TestParseStatus(t *testing.T) { assert.Equal(t, expected, parseStatus(str), "%q", str) } } - -func TestAddAlertManagerParam(t *testing.T) { - t.Parallel() - - t.Run("empty alertmanager url", func(t *testing.T) { - t.Parallel() - params := make(map[string]interface{}) - err := addAlertManagerParams("", params) - require.NoError(t, err) - require.Equal(t, "http://127.0.0.1:9093/alertmanager", params["AlertmanagerURL"]) - }) - - t.Run("simple alertmanager url", func(t *testing.T) { - t.Parallel() - params := make(map[string]interface{}) - err := addAlertManagerParams("https://some-alertmanager", params) - require.NoError(t, err) - require.Equal(t, "http://127.0.0.1:9093/alertmanager,https://some-alertmanager", params["AlertmanagerURL"]) - }) - - t.Run("extract username and password from alertmanager url", func(t *testing.T) { - t.Parallel() - params := make(map[string]interface{}) - err := addAlertManagerParams("https://username1:PAsds!234@some-alertmanager", params) - require.NoError(t, err) - require.Equal(t, "http://127.0.0.1:9093/alertmanager,https://some-alertmanager", params["AlertmanagerURL"]) - require.Equal(t, ",username1", params["AlertManagerUser"]) - require.Equal(t, `,"PAsds!234"`, params["AlertManagerPassword"]) - }) - - t.Run("incorrect alertmanager url", func(t *testing.T) { - t.Parallel() - params := make(map[string]interface{}) - err := addAlertManagerParams("*:9095", params) - require.EqualError(t, err, `cannot parse AlertManagerURL: parse "*:9095": first path segment in URL cannot contain colon`) - require.Equal(t, "http://127.0.0.1:9093/alertmanager", params["AlertmanagerURL"]) - }) -} diff --git a/managed/services/telemetry/config.default.yml b/managed/services/telemetry/config.default.yml index c03e04430f..c20443b82f 100644 --- a/managed/services/telemetry/config.default.yml +++ b/managed/services/telemetry/config.default.yml @@ -48,14 +48,6 @@ telemetry: - metric_name: "pmm_server_backup_management_enabled" column: "backup_management_enabled" - - id: PMMServerAlertManagerUsed - source: PMMDB_SELECT - query: (CASE alert_manager_url WHEN '""' THEN 'false' ELSE 'true' END) as alert_manager_set FROM settings s, jsonb_extract_path(s.settings, 'alert_manager_url') AS alert_manager_url - summary: "PMM Server alert manager integration - used/not used" - data: - - metric_name: "pmm_server_alert_manager_enabled" - column: "alert_manager_set" - - id: PMMServerAccessControlEnabled source: PMMDB_SELECT query: (CASE WHEN access_control->'enabled' = 'true' THEN '1' ELSE '0' END) AS access_control_enabled FROM settings s, jsonb_extract_path(s.settings, 'access_control') AS access_control diff --git a/managed/services/types.go b/managed/services/types.go index 4cac2c40ed..646fee0ffc 100644 --- a/managed/services/types.go +++ b/managed/services/types.go @@ -84,13 +84,3 @@ type CheckResultSummary struct { InfoCount uint32 DebugCount uint32 } - -// FilterParams provides fields needed to filter alerts from AlertManager. -type FilterParams struct { - // IsCheck specifies if only Checks/Advisors alerts should be matched. - IsCheck bool - // AlertID is the ID of alert to be matched (if any). - AlertID string - // ServiceID is the ID of service to be matched (if any). - ServiceID string -} diff --git a/managed/services/victoriametrics/prometheus.go b/managed/services/victoriametrics/prometheus.go index 2999efd2c9..87691dd8a3 100644 --- a/managed/services/victoriametrics/prometheus.go +++ b/managed/services/victoriametrics/prometheus.go @@ -206,7 +206,6 @@ func AddScrapeConfigs(l *logrus.Entry, cfg *config.Config, q *reform.Querier, s // AddInternalServicesToScrape adds internal services metrics to scrape targets. func AddInternalServicesToScrape(cfg *config.Config, s models.MetricsResolutions) { cfg.ScrapeConfigs = append(cfg.ScrapeConfigs, - scrapeConfigForAlertmanager(s.MR), scrapeConfigForGrafana(s.MR), scrapeConfigForPMMManaged(s.MR), scrapeConfigForQANAPI2(s.MR)) diff --git a/managed/services/victoriametrics/scrape_configs.go b/managed/services/victoriametrics/scrape_configs.go index e9ac99b09f..6ebe6a6453 100644 --- a/managed/services/victoriametrics/scrape_configs.go +++ b/managed/services/victoriametrics/scrape_configs.go @@ -47,21 +47,6 @@ func scrapeTimeout(interval time.Duration) config.Duration { } } -func scrapeConfigForAlertmanager(interval time.Duration) *config.ScrapeConfig { - return &config.ScrapeConfig{ - JobName: "alertmanager", - ScrapeInterval: config.Duration(interval), - ScrapeTimeout: scrapeTimeout(interval), - MetricsPath: "/alertmanager/metrics", - ServiceDiscoveryConfig: config.ServiceDiscoveryConfig{ - StaticConfigs: []*config.Group{{ - Targets: []string{"127.0.0.1:9093"}, - Labels: map[string]string{"instance": "pmm-server"}, - }}, - }, - } -} - func scrapeConfigForGrafana(interval time.Duration) *config.ScrapeConfig { return &config.ScrapeConfig{ JobName: "grafana", diff --git a/managed/services/victoriametrics/victoriametrics.go b/managed/services/victoriametrics/victoriametrics.go index 9508b3f145..e4edd6464d 100644 --- a/managed/services/victoriametrics/victoriametrics.go +++ b/managed/services/victoriametrics/victoriametrics.go @@ -87,7 +87,7 @@ func NewVictoriaMetrics(scrapeConfigPath string, db *reform.DB, params *models.V // Run runs VictoriaMetrics configuration update loop until ctx is canceled. func (svc *Service) Run(ctx context.Context) { // If you change this and related methods, - // please do similar changes in alertmanager and vmalert packages. + // please do similar changes in vmalert package. svc.l.Info("Starting...") defer svc.l.Info("Done.") diff --git a/managed/services/victoriametrics/victoriametrics_test.go b/managed/services/victoriametrics/victoriametrics_test.go index 413afcf5f2..95a11906fe 100644 --- a/managed/services/victoriametrics/victoriametrics_test.go +++ b/managed/services/victoriametrics/victoriametrics_test.go @@ -279,17 +279,6 @@ scrape_configs: labels: instance: pmm-server follow_redirects: false - - job_name: alertmanager - honor_timestamps: false - scrape_interval: 10s - scrape_timeout: 9s - metrics_path: /alertmanager/metrics - static_configs: - - targets: - - 127.0.0.1:9093 - labels: - instance: pmm-server - follow_redirects: false - job_name: grafana honor_timestamps: false scrape_interval: 10s @@ -762,17 +751,6 @@ scrape_configs: - 127.0.0.1:8880 labels: instance: pmm-server - follow_redirects: false -- job_name: alertmanager - honor_timestamps: false - scrape_interval: 10s - scrape_timeout: 9s - metrics_path: /alertmanager/metrics - static_configs: - - targets: - - 127.0.0.1:9093 - labels: - instance: pmm-server follow_redirects: false`))) assert.NoError(t, err) }) @@ -846,17 +824,6 @@ scrape_configs: labels: instance: pmm-server follow_redirects: false - - job_name: alertmanager - honor_timestamps: false - scrape_interval: 10s - scrape_timeout: 9s - metrics_path: /alertmanager/metrics - static_configs: - - targets: - - 127.0.0.1:9093 - labels: - instance: pmm-server - follow_redirects: false - job_name: grafana honor_timestamps: false scrape_interval: 10s diff --git a/managed/services/vmalert/vmalert.go b/managed/services/vmalert/vmalert.go index 382821243f..d3f37dd358 100644 --- a/managed/services/vmalert/vmalert.go +++ b/managed/services/vmalert/vmalert.go @@ -84,7 +84,7 @@ func NewVMAlert(externalRules *ExternalRules, baseURL string) (*Service, error) // Run runs VMAlert configuration update loop until ctx is canceled. func (svc *Service) Run(ctx context.Context) { // If you change this and related methods, - // please do similar changes in alertmanager and victoriametrics packages. + // please do similar changes in victoriametrics packages. svc.l.Info("Starting...") defer svc.l.Info("Done.") diff --git a/managed/testdata/supervisord.d/alertmanager.ini b/managed/testdata/supervisord.d/alertmanager.ini deleted file mode 100644 index 67fb027fd9..0000000000 --- a/managed/testdata/supervisord.d/alertmanager.ini +++ /dev/null @@ -1,23 +0,0 @@ -; Managed by pmm-managed. DO NOT EDIT. - -[program:alertmanager] -priority = 8 -command = - /usr/sbin/alertmanager - --config.file=/etc/alertmanager.yml - --storage.path=/srv/alertmanager/data - --data.retention=720h - --web.external-url=http://localhost:9093/alertmanager/ - --web.listen-address=127.0.0.1:9093 - --cluster.listen-address="" -user = pmm -autorestart = true -autostart = true -startretries = 1000 -startsecs = 1 -stopsignal = TERM -stopwaitsecs = 10 -stdout_logfile = /srv/logs/alertmanager.log -stdout_logfile_maxbytes = 10MB -stdout_logfile_backups = 3 -redirect_stderr = true diff --git a/managed/testdata/supervisord.d/vmalert.ini b/managed/testdata/supervisord.d/vmalert.ini index 0d645ed111..b1670a3021 100644 --- a/managed/testdata/supervisord.d/vmalert.ini +++ b/managed/testdata/supervisord.d/vmalert.ini @@ -4,9 +4,6 @@ priority = 7 command = /usr/sbin/vmalert - --notifier.url="http://127.0.0.1:9093/alertmanager,https://external-alertmanager:6443/alerts" - --notifier.basicAuth.password=',"passw!,ord"' - --notifier.basicAuth.username=",external-user" --external.url=http://127.0.0.1:9090/prometheus/ --datasource.url=http://127.0.0.1:9090/prometheus/ --remoteRead.url=http://127.0.0.1:9090/prometheus/ diff --git a/managed/testdata/victoriametrics/promscrape.yml b/managed/testdata/victoriametrics/promscrape.yml index 2e06cb670c..93ae006617 100644 --- a/managed/testdata/victoriametrics/promscrape.yml +++ b/managed/testdata/victoriametrics/promscrape.yml @@ -26,17 +26,6 @@ scrape_configs: labels: instance: pmm-server follow_redirects: false - - job_name: alertmanager - honor_timestamps: false - scrape_interval: 10s - scrape_timeout: 9s - metrics_path: /alertmanager/metrics - static_configs: - - targets: - - 127.0.0.1:9093 - labels: - instance: pmm-server - follow_redirects: false - job_name: grafana honor_timestamps: false scrape_interval: 10s diff --git a/update/ansible/playbook/tasks/files/datasources.yml b/update/ansible/playbook/tasks/files/datasources.yml index b11fa2d0c8..ce5e7e2f1f 100644 --- a/update/ansible/playbook/tasks/files/datasources.yml +++ b/update/ansible/playbook/tasks/files/datasources.yml @@ -35,14 +35,6 @@ datasources: orgId: 1 type: pmm-pt-summary-datasource access: proxy -- name: Prometheus AlertManager - version: 2 - orgId: 1 - type: camptocamp-prometheus-alertmanager-datasource - access: proxy - url: http://localhost:9093/alertmanager/ - jsonData: - keepCookies: [] - name: ClickHouse orgId: 1 version: 2 diff --git a/update/ansible/playbook/tasks/roles/initialization/tasks/main.yml b/update/ansible/playbook/tasks/roles/initialization/tasks/main.yml index cffa2f73b0..3c5d4dfcbe 100644 --- a/update/ansible/playbook/tasks/roles/initialization/tasks/main.yml +++ b/update/ansible/playbook/tasks/roles/initialization/tasks/main.yml @@ -109,9 +109,6 @@ changed_when: True when: lookup('env','PMM_TEST_HA_BOOTSTRAP') != '' and not pmm_current_version is version(pmm_image_version, '>=') -- name: Create working directory for Alertmanager - file: path=/srv/alertmanager/data state=directory owner=pmm group=pmm - - name: Create working directory for VictoriaMetrics file: path=/srv/victoriametrics/data state=directory owner=pmm group=pmm diff --git a/update/ansible/playbook/tasks/roles/nginx/files/conf.d/pmm.conf b/update/ansible/playbook/tasks/roles/nginx/files/conf.d/pmm.conf index 9a4633467f..b492531041 100644 --- a/update/ansible/playbook/tasks/roles/nginx/files/conf.d/pmm.conf +++ b/update/ansible/playbook/tasks/roles/nginx/files/conf.d/pmm.conf @@ -178,13 +178,6 @@ proxy_set_header Connection ""; } - # Alertmanager - location /alertmanager { - proxy_pass http://127.0.0.1:9093; - proxy_http_version 1.1; - proxy_set_header Connection ""; - } - # Swagger UI rewrite ^/swagger/swagger.json$ /swagger.json permanent; rewrite ^(/swagger)/(.*)$ /swagger permanent; diff --git a/update/ansible/playbook/tasks/update.yml b/update/ansible/playbook/tasks/update.yml index cd2bda5dc2..e9542fa870 100644 --- a/update/ansible/playbook/tasks/update.yml +++ b/update/ansible/playbook/tasks/update.yml @@ -235,8 +235,7 @@ become: true changed_when: true with_nested: - - - alertmanager - - nginx + - - nginx - grafana - qan-api2 - pmm-agent @@ -265,7 +264,7 @@ query: UPDATE "user" SET id='1' WHERE login='admin'; when: not ansible_check_mode - # we need to put this step as one of the last steps, because it removes pmm.ini and /etc/alertmanager.yml + # we need to put this step as one of the last steps, because it removes pmm.ini - name: Remove redundant packages yum: state: absent @@ -286,16 +285,6 @@ register: reread_init__result changed_when: "'No config updates to processes' not in reread_init__result.stdout" - # restarting pmm-managed to regenerate /etc/alertmanager.yml - - name: Restart pmm-managed EL9 - when: - - ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux' - - ansible_distribution_major_version == '9' - command: supervisorctl {{ item }} pmm-managed - become: true - changed_when: true - with_items: ["stop", "remove", "add"] - - name: Update/restart other services EL9 when: - ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'