Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add AlertService #7

Merged
merged 1 commit into from
Aug 22, 2022
Merged

Conversation

mdb
Copy link
Contributor

@mdb mdb commented Jul 6, 2022

This seeks to add a AlertService client for interacting with
the Grafana OnCall alerts HTTP API.

Currently, the AlertService has a single ListAlerts method used
to interact with the only documented OnCall alerts endpoint.

This seeks to add a `AlertService` client for interacting with
the Grafana OnCall [alerts HTTP API](https://grafana.com/docs/grafana-cloud/oncall/oncall-api-reference/alerts/).

Currently, the `AlertService` has a single `ListAlerts` method used
to interact with the only documented OnCall alerts endpoint.

Signed-off-by: Mike Ball <mikedball@gmail.com>
// Alert represents an on-call alert.
type Alert struct {
ID string `json:"id"`
AlertGroupID string `json:"alert_group_id"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I've used all-uppercase acronyms in struct field names, as per Go convention. However, this contrasts a bit with patterns used elsewhere in amixr-api-go-client, such as OnCallShift's TeamId field.

@mdb
Copy link
Contributor Author

mdb commented Jul 13, 2022

Hi @Konstantinov-Innokentii - Would you mind taking a look at this?

@Konstantinov-Innokentii
Copy link
Member

Thanks @mdb, I will take a look

@mdb
Copy link
Contributor Author

mdb commented Jul 30, 2022

@Konstantinov-Innokentii Did you get a chance to take a look at this? Thanks!

@mdb
Copy link
Contributor Author

mdb commented Aug 14, 2022

Hi @Ferril -- I notice you're a contributor to this codebase. Would you be willing to review in place of @Konstantinov-Innokentii ?

@Konstantinov-Innokentii Konstantinov-Innokentii merged commit ad9ba84 into grafana:main Aug 22, 2022
@Konstantinov-Innokentii
Copy link
Member

@mdb merged PR, sorry for the long delay, got a lot on my plate now

@mdb mdb deleted the mdb/alerts-api branch January 23, 2023 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants