diff --git a/.github/workflows/go-maintenance.yml b/.github/workflows/go-maintenance.yml index a013cebb0..3075dffb4 100644 --- a/.github/workflows/go-maintenance.yml +++ b/.github/workflows/go-maintenance.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18.5 + go-version: 1.19.0 - name: Mock web assets run: make mock-assets diff --git a/.github/workflows/go-mod-tidy.yml b/.github/workflows/go-mod-tidy.yml index dff4ee4ec..0c3bf146d 100644 --- a/.github/workflows/go-mod-tidy.yml +++ b/.github/workflows/go-mod-tidy.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18.5 + go-version: 1.19.0 - name: Run go mod tidy run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa4ea92cb..2675e101e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18.5 + go-version: 1.19.0 - name: Cache Go modules id: cache-go-modules @@ -69,7 +69,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18.5 + go-version: 1.19.0 - name: Cache Go modules id: cache-go-modules @@ -147,7 +147,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18.5 + go-version: 1.19.0 - name: Format Go code run: make format-go @@ -302,7 +302,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18.5 + go-version: 1.19.0 - name: Cache Go uses: actions/cache@v3 @@ -408,7 +408,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18.5 + go-version: 1.19.0 - name: Cache Go uses: actions/cache@v3 diff --git a/internal/mapper/v017/client/alert/alert_client.go b/internal/mapper/v017/client/alert/alert_client.go index 71ea6e0da..6046d46f9 100644 --- a/internal/mapper/v017/client/alert/alert_client.go +++ b/internal/mapper/v017/client/alert/alert_client.go @@ -38,7 +38,7 @@ type ClientService interface { } /* - GetAlerts Get a list of alerts +GetAlerts Get a list of alerts */ func (a *Client) GetAlerts(params *GetAlertsParams, opts ...ClientOption) (*GetAlertsOK, error) { // TODO: Validate the params before sending @@ -76,7 +76,7 @@ func (a *Client) GetAlerts(params *GetAlertsParams, opts ...ClientOption) (*GetA } /* - PostAlerts Create new Alerts +PostAlerts Create new Alerts */ func (a *Client) PostAlerts(params *PostAlertsParams, opts ...ClientOption) (*PostAlertsOK, error) { // TODO: Validate the params before sending diff --git a/internal/mapper/v017/client/alert/get_alerts_parameters.go b/internal/mapper/v017/client/alert/get_alerts_parameters.go index a213b53d7..0e4b2bb00 100644 --- a/internal/mapper/v017/client/alert/get_alerts_parameters.go +++ b/internal/mapper/v017/client/alert/get_alerts_parameters.go @@ -53,10 +53,12 @@ func NewGetAlertsParamsWithHTTPClient(client *http.Client) *GetAlertsParams { } } -/* GetAlertsParams contains all the parameters to send to the API endpoint - for the get alerts operation. +/* +GetAlertsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get alerts operation. + + Typically these are written to a http.Request. */ type GetAlertsParams struct { diff --git a/internal/mapper/v017/client/alert/get_alerts_responses.go b/internal/mapper/v017/client/alert/get_alerts_responses.go index 4adbc9818..12a71f598 100644 --- a/internal/mapper/v017/client/alert/get_alerts_responses.go +++ b/internal/mapper/v017/client/alert/get_alerts_responses.go @@ -51,7 +51,8 @@ func NewGetAlertsOK() *GetAlertsOK { return &GetAlertsOK{} } -/* GetAlertsOK describes a response with status code 200, with default header values. +/* + GetAlertsOK describes a response with status code 200, with default header values. Get alerts response */ @@ -81,7 +82,8 @@ func NewGetAlertsBadRequest() *GetAlertsBadRequest { return &GetAlertsBadRequest{} } -/* GetAlertsBadRequest describes a response with status code 400, with default header values. +/* + GetAlertsBadRequest describes a response with status code 400, with default header values. Bad request */ @@ -111,7 +113,8 @@ func NewGetAlertsInternalServerError() *GetAlertsInternalServerError { return &GetAlertsInternalServerError{} } -/* GetAlertsInternalServerError describes a response with status code 500, with default header values. +/* + GetAlertsInternalServerError describes a response with status code 500, with default header values. Internal server error */ diff --git a/internal/mapper/v017/client/alert/post_alerts_parameters.go b/internal/mapper/v017/client/alert/post_alerts_parameters.go index a749940e6..53db0f998 100644 --- a/internal/mapper/v017/client/alert/post_alerts_parameters.go +++ b/internal/mapper/v017/client/alert/post_alerts_parameters.go @@ -54,10 +54,12 @@ func NewPostAlertsParamsWithHTTPClient(client *http.Client) *PostAlertsParams { } } -/* PostAlertsParams contains all the parameters to send to the API endpoint - for the post alerts operation. +/* +PostAlertsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the post alerts operation. + + Typically these are written to a http.Request. */ type PostAlertsParams struct { diff --git a/internal/mapper/v017/client/alert/post_alerts_responses.go b/internal/mapper/v017/client/alert/post_alerts_responses.go index 6c6676101..6566fb220 100644 --- a/internal/mapper/v017/client/alert/post_alerts_responses.go +++ b/internal/mapper/v017/client/alert/post_alerts_responses.go @@ -49,7 +49,8 @@ func NewPostAlertsOK() *PostAlertsOK { return &PostAlertsOK{} } -/* PostAlertsOK describes a response with status code 200, with default header values. +/* + PostAlertsOK describes a response with status code 200, with default header values. Create alerts response */ @@ -70,7 +71,8 @@ func NewPostAlertsBadRequest() *PostAlertsBadRequest { return &PostAlertsBadRequest{} } -/* PostAlertsBadRequest describes a response with status code 400, with default header values. +/* + PostAlertsBadRequest describes a response with status code 400, with default header values. Bad request */ @@ -100,7 +102,8 @@ func NewPostAlertsInternalServerError() *PostAlertsInternalServerError { return &PostAlertsInternalServerError{} } -/* PostAlertsInternalServerError describes a response with status code 500, with default header values. +/* + PostAlertsInternalServerError describes a response with status code 500, with default header values. Internal server error */ diff --git a/internal/mapper/v017/client/alertgroup/alertgroup_client.go b/internal/mapper/v017/client/alertgroup/alertgroup_client.go index 3d7c8f977..48a55ba68 100644 --- a/internal/mapper/v017/client/alertgroup/alertgroup_client.go +++ b/internal/mapper/v017/client/alertgroup/alertgroup_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - GetAlertGroups Get a list of alert groups +GetAlertGroups Get a list of alert groups */ func (a *Client) GetAlertGroups(params *GetAlertGroupsParams, opts ...ClientOption) (*GetAlertGroupsOK, error) { // TODO: Validate the params before sending diff --git a/internal/mapper/v017/client/alertgroup/get_alert_groups_parameters.go b/internal/mapper/v017/client/alertgroup/get_alert_groups_parameters.go index 4cd073864..8a5610869 100644 --- a/internal/mapper/v017/client/alertgroup/get_alert_groups_parameters.go +++ b/internal/mapper/v017/client/alertgroup/get_alert_groups_parameters.go @@ -53,10 +53,12 @@ func NewGetAlertGroupsParamsWithHTTPClient(client *http.Client) *GetAlertGroupsP } } -/* GetAlertGroupsParams contains all the parameters to send to the API endpoint - for the get alert groups operation. +/* +GetAlertGroupsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get alert groups operation. + + Typically these are written to a http.Request. */ type GetAlertGroupsParams struct { diff --git a/internal/mapper/v017/client/alertgroup/get_alert_groups_responses.go b/internal/mapper/v017/client/alertgroup/get_alert_groups_responses.go index 0f2aa7919..9f9bcf254 100644 --- a/internal/mapper/v017/client/alertgroup/get_alert_groups_responses.go +++ b/internal/mapper/v017/client/alertgroup/get_alert_groups_responses.go @@ -51,7 +51,8 @@ func NewGetAlertGroupsOK() *GetAlertGroupsOK { return &GetAlertGroupsOK{} } -/* GetAlertGroupsOK describes a response with status code 200, with default header values. +/* + GetAlertGroupsOK describes a response with status code 200, with default header values. Get alert groups response */ @@ -81,7 +82,8 @@ func NewGetAlertGroupsBadRequest() *GetAlertGroupsBadRequest { return &GetAlertGroupsBadRequest{} } -/* GetAlertGroupsBadRequest describes a response with status code 400, with default header values. +/* + GetAlertGroupsBadRequest describes a response with status code 400, with default header values. Bad request */ @@ -111,7 +113,8 @@ func NewGetAlertGroupsInternalServerError() *GetAlertGroupsInternalServerError { return &GetAlertGroupsInternalServerError{} } -/* GetAlertGroupsInternalServerError describes a response with status code 500, with default header values. +/* + GetAlertGroupsInternalServerError describes a response with status code 500, with default header values. Internal server error */ diff --git a/internal/mapper/v017/client/general/general_client.go b/internal/mapper/v017/client/general/general_client.go index e48d2a30e..2fa2be13e 100644 --- a/internal/mapper/v017/client/general/general_client.go +++ b/internal/mapper/v017/client/general/general_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - GetStatus Get current status of an Alertmanager instance and its cluster +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 diff --git a/internal/mapper/v017/client/general/get_status_parameters.go b/internal/mapper/v017/client/general/get_status_parameters.go index 2428f0a93..fe4612b2f 100644 --- a/internal/mapper/v017/client/general/get_status_parameters.go +++ b/internal/mapper/v017/client/general/get_status_parameters.go @@ -52,10 +52,12 @@ func NewGetStatusParamsWithHTTPClient(client *http.Client) *GetStatusParams { } } -/* GetStatusParams contains all the parameters to send to the API endpoint - for the get status operation. +/* +GetStatusParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get status operation. + + Typically these are written to a http.Request. */ type GetStatusParams struct { timeout time.Duration diff --git a/internal/mapper/v017/client/general/get_status_responses.go b/internal/mapper/v017/client/general/get_status_responses.go index 143c558e1..544be431d 100644 --- a/internal/mapper/v017/client/general/get_status_responses.go +++ b/internal/mapper/v017/client/general/get_status_responses.go @@ -39,7 +39,8 @@ func NewGetStatusOK() *GetStatusOK { return &GetStatusOK{} } -/* GetStatusOK describes a response with status code 200, with default header values. +/* + GetStatusOK describes a response with status code 200, with default header values. Get status response */ diff --git a/internal/mapper/v017/client/receiver/get_receivers_parameters.go b/internal/mapper/v017/client/receiver/get_receivers_parameters.go index 8fc8c264d..3de12083f 100644 --- a/internal/mapper/v017/client/receiver/get_receivers_parameters.go +++ b/internal/mapper/v017/client/receiver/get_receivers_parameters.go @@ -52,10 +52,12 @@ func NewGetReceiversParamsWithHTTPClient(client *http.Client) *GetReceiversParam } } -/* GetReceiversParams contains all the parameters to send to the API endpoint - for the get receivers operation. +/* +GetReceiversParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get receivers operation. + + Typically these are written to a http.Request. */ type GetReceiversParams struct { timeout time.Duration diff --git a/internal/mapper/v017/client/receiver/get_receivers_responses.go b/internal/mapper/v017/client/receiver/get_receivers_responses.go index fc504619c..fd7714c60 100644 --- a/internal/mapper/v017/client/receiver/get_receivers_responses.go +++ b/internal/mapper/v017/client/receiver/get_receivers_responses.go @@ -39,7 +39,8 @@ func NewGetReceiversOK() *GetReceiversOK { return &GetReceiversOK{} } -/* GetReceiversOK describes a response with status code 200, with default header values. +/* + GetReceiversOK describes a response with status code 200, with default header values. Get receivers response */ diff --git a/internal/mapper/v017/client/receiver/receiver_client.go b/internal/mapper/v017/client/receiver/receiver_client.go index 2f5da6c4c..600b78c92 100644 --- a/internal/mapper/v017/client/receiver/receiver_client.go +++ b/internal/mapper/v017/client/receiver/receiver_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - GetReceivers Get list of all receivers (name of notification integrations) +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 diff --git a/internal/mapper/v017/client/silence/delete_silence_parameters.go b/internal/mapper/v017/client/silence/delete_silence_parameters.go index 358dc68b6..728c3c7bb 100644 --- a/internal/mapper/v017/client/silence/delete_silence_parameters.go +++ b/internal/mapper/v017/client/silence/delete_silence_parameters.go @@ -52,10 +52,12 @@ func NewDeleteSilenceParamsWithHTTPClient(client *http.Client) *DeleteSilencePar } } -/* DeleteSilenceParams contains all the parameters to send to the API endpoint - for the delete silence operation. +/* +DeleteSilenceParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the delete silence operation. + + Typically these are written to a http.Request. */ type DeleteSilenceParams struct { diff --git a/internal/mapper/v017/client/silence/delete_silence_responses.go b/internal/mapper/v017/client/silence/delete_silence_responses.go index 098041924..535da8f09 100644 --- a/internal/mapper/v017/client/silence/delete_silence_responses.go +++ b/internal/mapper/v017/client/silence/delete_silence_responses.go @@ -43,7 +43,8 @@ func NewDeleteSilenceOK() *DeleteSilenceOK { return &DeleteSilenceOK{} } -/* DeleteSilenceOK describes a response with status code 200, with default header values. +/* + DeleteSilenceOK describes a response with status code 200, with default header values. Delete silence response */ @@ -64,7 +65,8 @@ func NewDeleteSilenceInternalServerError() *DeleteSilenceInternalServerError { return &DeleteSilenceInternalServerError{} } -/* DeleteSilenceInternalServerError describes a response with status code 500, with default header values. +/* + DeleteSilenceInternalServerError describes a response with status code 500, with default header values. Internal server error */ diff --git a/internal/mapper/v017/client/silence/get_silence_parameters.go b/internal/mapper/v017/client/silence/get_silence_parameters.go index 907d00fd9..cfbbb70e5 100644 --- a/internal/mapper/v017/client/silence/get_silence_parameters.go +++ b/internal/mapper/v017/client/silence/get_silence_parameters.go @@ -52,10 +52,12 @@ func NewGetSilenceParamsWithHTTPClient(client *http.Client) *GetSilenceParams { } } -/* GetSilenceParams contains all the parameters to send to the API endpoint - for the get silence operation. +/* +GetSilenceParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get silence operation. + + Typically these are written to a http.Request. */ type GetSilenceParams struct { diff --git a/internal/mapper/v017/client/silence/get_silence_responses.go b/internal/mapper/v017/client/silence/get_silence_responses.go index dc3382629..3548276ec 100644 --- a/internal/mapper/v017/client/silence/get_silence_responses.go +++ b/internal/mapper/v017/client/silence/get_silence_responses.go @@ -51,7 +51,8 @@ func NewGetSilenceOK() *GetSilenceOK { return &GetSilenceOK{} } -/* GetSilenceOK describes a response with status code 200, with default header values. +/* + GetSilenceOK describes a response with status code 200, with default header values. Get silence response */ @@ -83,7 +84,8 @@ func NewGetSilenceNotFound() *GetSilenceNotFound { return &GetSilenceNotFound{} } -/* GetSilenceNotFound describes a response with status code 404, with default header values. +/* + GetSilenceNotFound describes a response with status code 404, with default header values. A silence with the specified ID was not found */ @@ -104,7 +106,8 @@ func NewGetSilenceInternalServerError() *GetSilenceInternalServerError { return &GetSilenceInternalServerError{} } -/* GetSilenceInternalServerError describes a response with status code 500, with default header values. +/* + GetSilenceInternalServerError describes a response with status code 500, with default header values. Internal server error */ diff --git a/internal/mapper/v017/client/silence/get_silences_parameters.go b/internal/mapper/v017/client/silence/get_silences_parameters.go index d6aa61045..1d0608e75 100644 --- a/internal/mapper/v017/client/silence/get_silences_parameters.go +++ b/internal/mapper/v017/client/silence/get_silences_parameters.go @@ -53,10 +53,12 @@ func NewGetSilencesParamsWithHTTPClient(client *http.Client) *GetSilencesParams } } -/* GetSilencesParams contains all the parameters to send to the API endpoint - for the get silences operation. +/* +GetSilencesParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get silences operation. + + Typically these are written to a http.Request. */ type GetSilencesParams struct { diff --git a/internal/mapper/v017/client/silence/get_silences_responses.go b/internal/mapper/v017/client/silence/get_silences_responses.go index 91de43bab..0a9058b23 100644 --- a/internal/mapper/v017/client/silence/get_silences_responses.go +++ b/internal/mapper/v017/client/silence/get_silences_responses.go @@ -45,7 +45,8 @@ func NewGetSilencesOK() *GetSilencesOK { return &GetSilencesOK{} } -/* GetSilencesOK describes a response with status code 200, with default header values. +/* + GetSilencesOK describes a response with status code 200, with default header values. Get silences response */ @@ -75,7 +76,8 @@ func NewGetSilencesInternalServerError() *GetSilencesInternalServerError { return &GetSilencesInternalServerError{} } -/* GetSilencesInternalServerError describes a response with status code 500, with default header values. +/* + GetSilencesInternalServerError describes a response with status code 500, with default header values. Internal server error */ diff --git a/internal/mapper/v017/client/silence/post_silences_parameters.go b/internal/mapper/v017/client/silence/post_silences_parameters.go index ba6f1c4c0..74fc113c9 100644 --- a/internal/mapper/v017/client/silence/post_silences_parameters.go +++ b/internal/mapper/v017/client/silence/post_silences_parameters.go @@ -54,10 +54,12 @@ func NewPostSilencesParamsWithHTTPClient(client *http.Client) *PostSilencesParam } } -/* PostSilencesParams contains all the parameters to send to the API endpoint - for the post silences operation. +/* +PostSilencesParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the post silences operation. + + Typically these are written to a http.Request. */ type PostSilencesParams struct { diff --git a/internal/mapper/v017/client/silence/post_silences_responses.go b/internal/mapper/v017/client/silence/post_silences_responses.go index 7d83daea9..147b38738 100644 --- a/internal/mapper/v017/client/silence/post_silences_responses.go +++ b/internal/mapper/v017/client/silence/post_silences_responses.go @@ -51,7 +51,8 @@ func NewPostSilencesOK() *PostSilencesOK { return &PostSilencesOK{} } -/* PostSilencesOK describes a response with status code 200, with default header values. +/* + PostSilencesOK describes a response with status code 200, with default header values. Create / update silence response */ @@ -83,7 +84,8 @@ func NewPostSilencesBadRequest() *PostSilencesBadRequest { return &PostSilencesBadRequest{} } -/* PostSilencesBadRequest describes a response with status code 400, with default header values. +/* + PostSilencesBadRequest describes a response with status code 400, with default header values. Bad request */ @@ -113,7 +115,8 @@ func NewPostSilencesNotFound() *PostSilencesNotFound { return &PostSilencesNotFound{} } -/* PostSilencesNotFound describes a response with status code 404, with default header values. +/* + PostSilencesNotFound describes a response with status code 404, with default header values. A silence with the specified ID was not found */ @@ -138,7 +141,8 @@ func (o *PostSilencesNotFound) readResponse(response runtime.ClientResponse, con return nil } -/*PostSilencesOKBody post silences o k body +/* +PostSilencesOKBody post silences o k body swagger:model PostSilencesOKBody */ type PostSilencesOKBody struct { diff --git a/internal/mapper/v017/client/silence/silence_client.go b/internal/mapper/v017/client/silence/silence_client.go index b22e163cf..b4b927fb9 100644 --- a/internal/mapper/v017/client/silence/silence_client.go +++ b/internal/mapper/v017/client/silence/silence_client.go @@ -42,7 +42,7 @@ type ClientService interface { } /* - DeleteSilence Delete a silence by its ID +DeleteSilence Delete a silence by its ID */ func (a *Client) DeleteSilence(params *DeleteSilenceParams, opts ...ClientOption) (*DeleteSilenceOK, error) { // TODO: Validate the params before sending @@ -80,7 +80,7 @@ func (a *Client) DeleteSilence(params *DeleteSilenceParams, opts ...ClientOption } /* - GetSilence Get a silence by its ID +GetSilence Get a silence by its ID */ func (a *Client) GetSilence(params *GetSilenceParams, opts ...ClientOption) (*GetSilenceOK, error) { // TODO: Validate the params before sending @@ -118,7 +118,7 @@ func (a *Client) GetSilence(params *GetSilenceParams, opts ...ClientOption) (*Ge } /* - GetSilences Get a list of silences +GetSilences Get a list of silences */ func (a *Client) GetSilences(params *GetSilencesParams, opts ...ClientOption) (*GetSilencesOK, error) { // TODO: Validate the params before sending @@ -156,7 +156,7 @@ func (a *Client) GetSilences(params *GetSilencesParams, opts ...ClientOption) (* } /* - PostSilences Post a new silence or update an existing one +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 diff --git a/internal/models/alert.go b/internal/models/alert.go index bd0e02639..ca9fb88f8 100644 --- a/internal/models/alert.go +++ b/internal/models/alert.go @@ -119,9 +119,9 @@ func (ls Labels) Set(name, value string) Labels { // Alert is vanilla alert + some additional attributes // karma extends an alert object with: -// * Links map, it's generated from annotations if annotation value is an url -// it's pulled out of annotation map and returned under links field, -// karma UI used this to show links differently than other annotations +// - Links map, it's generated from annotations if annotation value is an url +// it's pulled out of annotation map and returned under links field, +// karma UI used this to show links differently than other annotations type Alert struct { Annotations Annotations `json:"annotations"` Labels Labels `json:"labels"`