pagerduty-0.0.3.1: Client library for PagerDuty Integration and REST APIs.

Safe HaskellNone
LanguageHaskell2010

Network.PagerDuty.REST

Contents

Synopsis

Sending requests

send :: (MonadIO m, FromJSON b) => SubDomain -> Auth s -> Manager -> Request a s b -> m (Either Error b) Source

sendWith :: (MonadIO m, FromJSON b) => Env s -> Request a s b -> m (Either Error b) Source

Configuration

Environment

data Env s Source

The environment containing the parameters required to make PagerDuty requests.

Instances

Monad m => MonadReader (Env s) (PagerDutyT s m) 

envAuth :: forall s s'. Lens (Env s) (Env s') (Auth s) (Auth s') Source

envManager :: forall s. Lens' (Env s) Manager Source

envLogger :: forall s. Lens' (Env s) Logger Source

Logging

data Logger Source

The log level and associated logger function.

Constructors

None 
Debug (Text -> IO ()) 

debug :: MonadIO m => Logger -> Text -> m () Source

Log a message using the debug logger, or if none is specified noop.

Types

Requests

class Paginate a Source

Exists primarily to obtain a constraint for the paginate function.

data Request a s b Source

Errors

Messages

class HasMessage s a | s -> a where Source

Methods

message :: Lens' s a Source

A short human-readable message describing the error.

Fields

class HasErrors s a | s -> a where Source

Methods

errors :: Lens' s a Source

A list of human-readable reasons for the error. These values, and even their format, are subject to change.

Integration

REST

code :: Lens' RESTError Code Source

In the case of an error, the PagerDuty error code can give further details on the nature of the error.

See: description

Authentication

data Security Source

Constructors

Basic 
Token 

Instances

data Auth a where Source

Instances

Eq (Auth a) 
Show (Auth a) 

Keys

Aliases

type ServiceKey = Key "service" Source

type IncidentKey = Key "incident" Source

Identifiers

data Id a Source

Instances

Eq (Id a) 
Show (Id a) 
IsString (Id a) 
ToJSON (Id a) 
FromJSON (Id a) 
ToByteString (Id a) 
QueryValueLike (Id a) 

mkId :: Text -> Id a Source

Aliases

type AlertId = Id "alert" Source

type ContactId = Id "contact" Source

type EmailFilterId = Id "email-filter" Source

type EscalationPolicyId = Id "escalation-policy" Source

type EscalationRuleId = Id "escalation-rule" Source

type IncidentId = Id "incident" Source

type LogEntryId = Id "log-entry" Source

type NoteId = Id "note" Source

type NotificationRuleId = Id "notification-rule" Source

type OverrideId = Id "schedule-override" Source

type RequesterId = Id "requester" Source

type ScheduleId = Id "schedule" Source

type ServiceId = Id "service" Source

type UserId = Id "user" Source

type VendorId = Id "vendor" Source

type WebhookId = Id "webhook" Source

type WindowId = Id "maintenance-window" Source

SubDomain

Address

Miscellaneous

data Empty Source

Constructors

Empty