Skip to content

Commit

Permalink
add CRUD handlers for user notification rules + remove custom actions…
Browse files Browse the repository at this point in the history
… endpoint handlers (#19)
  • Loading branch information
joeyorlando authored Jul 5, 2024
1 parent c9f68db commit 27e604b
Show file tree
Hide file tree
Showing 6 changed files with 331 additions and 303 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @grafana/grafana-oncall-backend
28 changes: 14 additions & 14 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ type Client struct {
limiter *rate.Limiter
UserAgent string
// List of Services. Keep in sync with func newClient
Alerts *AlertService
Integrations *IntegrationService
EscalationChains *EscalationChainService
Escalations *EscalationService
Users *UserService
Schedules *ScheduleService
Routes *RouteService
SlackChannels *SlackChannelService
UserGroups *UserGroupService
CustomActions *CustomActionService
OnCallShifts *OnCallShiftService
Teams *TeamService
Webhooks *WebhookService
Alerts *AlertService
Integrations *IntegrationService
EscalationChains *EscalationChainService
Escalations *EscalationService
Users *UserService
Schedules *ScheduleService
Routes *RouteService
SlackChannels *SlackChannelService
UserGroups *UserGroupService
OnCallShifts *OnCallShiftService
Teams *TeamService
Webhooks *WebhookService
UserNotificationRules *UserNotificationRuleService
}

func New(base_url, token string) (*Client, error) {
Expand Down Expand Up @@ -108,10 +108,10 @@ func newClient(url string) (*Client, error) {
c.Routes = NewRouteService(c)
c.SlackChannels = NewSlackChannelService(c)
c.UserGroups = NewUserGroupService(c)
c.CustomActions = NewCustomActionService(c)
c.OnCallShifts = NewOnCallShiftService(c)
c.Teams = NewTeamService(c)
c.Webhooks = NewWebhookService(c)
c.UserNotificationRules = NewUserNotificationRuleService(c)

return c, nil
}
Expand Down
170 changes: 0 additions & 170 deletions custom_action.go

This file was deleted.

119 changes: 0 additions & 119 deletions custom_action_test.go

This file was deleted.

Loading

0 comments on commit 27e604b

Please sign in to comment.