Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
fix actions errors
Browse files Browse the repository at this point in the history
  • Loading branch information
betorvs committed Jun 11, 2021
1 parent 8d45ef3 commit bfdeb29
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions domain/opsgenie_domain.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package domain

import (
"github.com/betorvs/sensubot/appcontext"
"github.com/opsgenie/opsgenie-go-sdk-v2/alert"
)

// OpsgenieRepository interface
type OpsgenieRepository interface {
appcontext.Component
// GetAlert by tinyID string and return *alert.GetAlertResult, error
GetAlert(tinyID string) (*alert.GetAlertResult, error)
// ListAlert by query string and return (*alert.ListAlertResult, error
ListAlert(query string) (*alert.ListAlertResult, error)
}

// GetOpsgenieRepository func return OpsgenieRepository interface
func GetOpsgenieRepository() OpsgenieRepository {
return appcontext.Current.Get(appcontext.OpsgenieRepository).(OpsgenieRepository)
}

0 comments on commit bfdeb29

Please sign in to comment.