|
package notification |
|
|
|
import ( |
|
"context" |
|
|
|
"github.com/target/goalert/auth/authlink" |
|
"github.com/target/goalert/gadb" |
|
) |
|
|
|
|
|
type Receiver interface { |
|
|
|
SetMessageStatus(ctx context.Context, externalID string, status *Status) error |
|
|
|
|
|
Receive(ctx context.Context, callbackID string, result Result) error |
|
|
|
|
|
ReceiveSubject(ctx context.Context, providerID, subjectID, callbackID string, result Result) error |
|
|
|
|
|
AuthLinkURL(ctx context.Context, providerID, subjectID string, meta authlink.Metadata) (string, error) |
|
|
|
|
|
Start(context.Context, gadb.DestV1) error |
|
|
|
|
|
Stop(context.Context, gadb.DestV1) error |
|
|
|
|
|
IsKnownDest(ctx context.Context, dest gadb.DestV1) (bool, error) |
|
} |
|
|
|
|
|
type UnknownSubjectError struct { |
|
AlertID int |
|
} |
|
|
|
func (e UnknownSubjectError) Error() string { |
|
return "unknown subject for that provider" |
|
} |
|
|