Safe Haskell | None |
---|---|
Language | Haskell2010 |
DigitalOcean
Contents
Description
Contains Haskell representation of most data types used for interacting with DigitalOcean's API v2
- type AuthToken = String
- type Slug = String
- type URI = String
- data ToolConfiguration = Tool {}
- data Region
- = Region {
- regionName :: String
- regionSlug :: Slug
- regionSizes :: [SizeSlug]
- regionAvailable :: Bool
- | RegionSlug Slug
- | NoRegion
- = Region {
- sizeSlugs :: [String]
- data SizeSlug
- type ImageSlug = String
- type KeyId = Int
- defaultImage :: ImageSlug
- data BoxConfiguration = BoxConfiguration {
- configName :: String
- boxRegion :: Region
- size :: SizeSlug
- configImageSlug :: ImageSlug
- keys :: [KeyId]
- type Id = Integer
- data Mega
- data Giga
- newtype Bytes a = Bytes {}
- jsonBytes :: Int -> Parser (Bytes a)
- newtype Date = Date {}
- data Status
- data NetType
- data Network a
- data V4
- data V6
- jsonNetwork :: (FromJSON a3, FromJSON a2, FromJSON a1, FromJSON a) => (a3 -> a2 -> a1 -> a -> b) -> Object -> Parser b
- data Networks
- data Droplet = Droplet {}
- data ImageType
- data Image = Image {
- imageId :: Id
- imageName :: String
- distribution :: String
- imageSlug :: Maybe Slug
- publicImage :: Bool
- imageRegions :: [Region]
- min_disk_size :: Bytes Giga
- image_created_at :: Date
- imageType :: ImageType
- data Key = Key {}
- type TransferRate = Double
- type Price = Double
- data Size = Size {
- szSlug :: SizeSlug
- szMemory :: Bytes Mega
- szVcpus :: Int
- szDisk :: Bytes Giga
- szTransfer :: TransferRate
- szPrice_Monthly :: Price
- szPrice_Hourly :: Price
- szRegions :: [Region]
- szAvailable :: Bool
- data ActionResult = ActionResult {}
- data ActionStatus
- data ActionType
- data Action
- data Domain = Domain {}
- data DNSType
- data DomainRecord = DomainRecord {}
- failParse :: (Show a1, Monad m) => a1 -> m a
Documentation
data ToolConfiguration 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
Constructors
Region | |
Fields
| |
RegionSlug Slug | |
NoRegion |
String representation of size slugs This maps to corresponding expected JSON string value.
Enumeration of all possible size slugs
data BoxConfiguration Source
Constructors
BoxConfiguration | |
Fields
|
Instances
A type for various sizes Type parameter is used to define number's magnitude
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 | |
NetworkV6 | |
Fields
|
jsonNetwork :: (FromJSON a3, FromJSON a2, FromJSON a1, FromJSON a) => (a3 -> a2 -> a1 -> a -> b) -> Object -> Parser b 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
.
(Partial) Type of Droplets
https://developers.digitalocean.com/documentation/v2/#droplets
Constructors
Droplet | |
Type of droplet images
https://developers.digitalocean.com/documentation/v2/#images
Constructors
Image | |
Fields
|
Type of SSH Key
s
https://developers.digitalocean.com/documentation/v2/#ssh-keys
type TransferRate = Double Source
Type of Size objects
Constructors
Size | |
Fields
|
Droplets Actions
data ActionResult Source
Type of action status This is returned when action is initiated or when status of some action is requested
Constructors
ActionResult | |
Fields |
Instances
data ActionType Source
Instances
Type of Domain zones
https://developers.digitalocean.com/documentation/v2/#domains
Enumeration of possible DNS records types
data DomainRecord Source
Type of Domain zone file entries
https://developers.digitalocean.com/documentation/v2/#domain-records
Constructors
DomainRecord | |
Fields
|
Instances