hdo-0.2: A Digital Ocean client in Haskell

Safe HaskellNone
LanguageHaskell2010

Network.DO.Types

Contents

Description

Contains Haskell representation of most data types used for interacting with DigitalOcean's API v2

See https://developers.digitalocean.com/documentation/v2/

Synopsis

Documentation

newtype Error Source #

Constructors

Error 

Fields

data Region Source #

A type for describing Region A region can be assigned an empty object when it is undefined, or be referenced simply by its slug https://developers.digitalocean.com/documentation/v2/#regions

sizeSlugs :: [String] Source #

String representation of size slugs This maps to corresponding expected JSON string value.

data SizeSlug Source #

Enumeration of all possible size slugs

Constructors

M512 
G1 
G2 
G4 
G8 
G16 
G32 
G48 
G64 
G96 

type KeyId = Int Source #

newtype Bytes a Source #

A type for various sizes Type parameter is used to define number's magnitude

Constructors

Bytes 

Fields

newtype Date Source #

Constructors

Date 

Fields

data Network a Source #

Type of a single Network definition

This type is parameterized with a phantom type which lifts the network address type at the type level (could use DataKinds extension...). This allows distinguishing types of of networks while using same parsing.

Constructors

NetworkV4 

Fields

NetworkV6 

jsonNetwork :: (FromJSON a3, FromJSON a2, FromJSON a1, FromJSON a) => (a3 -> a2 -> a1 -> a -> b) -> Object -> Parser b Source #

data Networks Source #

Type of Networks configured for a Droplet

A network is either a list of IPv4 and IPv6 NICs definitions, or no network. We need this because a droplet can contain an 'empty' networks JSON Object entry, instead of null.

Constructors

Networks 

Fields

NoNetworks 

Droplets Actions

data DNSType Source #

Enumeration of possible DNS records types

Constructors

A 
CNAME 
TXT 
PTR 
SRV 
NS 
AAAA 
MX 

failParse :: (Show a1, Monad m) => a1 -> m a Source #

Orphan instances