hocker-1.0.3: Interact with the docker registry and generate nix build instructions

Copyright(C) 2016 Awake Networks
LicenseApache-2.0
MaintainerAwake Networks <opensource@awakenetworks.com>
Stabilitystable
Safe HaskellNone
LanguageHaskell2010

Hocker.Types

Description

 

Synopsis

Documentation

type RegistryURI = URIRef Absolute Source #

Docker registry URI.

type Username = Text Source #

Docker registry username.

type Password = Text Source #

Docker registry user password.

type Layer = Text Source #

Docker image layer sha256 hash digest.

type StrippedDigest = Text Source #

SHA256 hash digest with the hash algorithm identifier prefix, stripped

type Manifest = ByteString Source #

Docker image manifest JSON.

type ImageConfigJSON = ByteString Source #

Docker image config JSON.

type RspBS = Response ByteString Source #

Wreq response type parameterized by the lazy bytestring type.

type Extension = String Source #

A file extension.

type RepoNamePart = Text Source #

RepoName is the part before the forward slash in a docker image name, e.g: library in library/debian

type ImageNamePart = Text Source #

ImageName is the part after the forward slash in a docker image name, e.g: library in library/debian

type ConfigDigest = Base32Digest Source #

Docker image config JSON file's sha256 hash digest in Nix's base32 encoding.

NB: it's very important to realize there's a significant difference between Nix's base32 encoding and the standard base32 encoding! (i.e, they're not compatible).

data Options w Source #

Generic top-level optparse-generic CLI args data type and specification.

NOTE: `hocker-layer` does not use this data type because it requires an additional layer sha256 hash digest argument.

Constructors

Options 

Fields

Instances

Show (Options Unwrapped) Source # 
Generic (Options w) Source # 

Associated Types

type Rep (Options w) :: * -> * #

Methods

from :: Options w -> Rep (Options w) x #

to :: Rep (Options w) x -> Options w #

ParseRecord (Options Wrapped) Source # 
type Rep (Options w) Source # 
type Rep (Options w) = D1 * (MetaData "Options" "Hocker.Types" "hocker-1.0.3-A4IgjESPKYNAf6ayskyck6" False) (C1 * (MetaCons "Options" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "registry") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ((:::) w ((<?>) (Maybe RegistryURI) "URI of registry, defaults to the Docker Hub registry")))) (S1 * (MetaSel (Just Symbol "credentials") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Credentials)))) ((:*:) * (S1 * (MetaSel (Just Symbol "out") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ((:::) w ((<?>) (Maybe FilePath) "Write content to location")))) ((:*:) * (S1 * (MetaSel (Just Symbol "imageName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ImageName)) (S1 * (MetaSel (Just Symbol "imageTag") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * ImageTag))))))

newtype Hocker a Source #

Hocker ExceptT and ReaderT transformer stack threading a HockerMeta data type.

Instances

Monad Hocker Source # 

Methods

(>>=) :: Hocker a -> (a -> Hocker b) -> Hocker b #

(>>) :: Hocker a -> Hocker b -> Hocker b #

return :: a -> Hocker a #

fail :: String -> Hocker a #

Functor Hocker Source # 

Methods

fmap :: (a -> b) -> Hocker a -> Hocker b #

(<$) :: a -> Hocker b -> Hocker a #

Applicative Hocker Source # 

Methods

pure :: a -> Hocker a #

(<*>) :: Hocker (a -> b) -> Hocker a -> Hocker b #

liftA2 :: (a -> b -> c) -> Hocker a -> Hocker b -> Hocker c #

(*>) :: Hocker a -> Hocker b -> Hocker b #

(<*) :: Hocker a -> Hocker b -> Hocker a #

MonadIO Hocker Source # 

Methods

liftIO :: IO a -> Hocker a #

MonadReader HockerMeta Hocker Source # 

Methods

ask :: Hocker HockerMeta #

local :: (HockerMeta -> HockerMeta) -> Hocker a -> Hocker a #

reader :: (HockerMeta -> a) -> Hocker a #

MonadError HockerException Hocker Source # 

data HockerMeta Source #

Red wagon record carrying around the environment as we fetch, transform, and assemble docker image artifacts.

newtype Base32Digest Source #

Newtype base32 encoding of a hash digest.

Please note, this base32 encoding is unique to Nix and not compatible with other base32 encodings.

Constructors

Base32Digest Text 

newtype Base16Digest Source #

Newtype base16 encoding of a hash digest.

This encoding has no known idiosyncracies specific to Nix, it should be compatible with other tools and library's expectations.

Constructors

Base16Digest Text 

upperFirst :: String -> String Source #

upperFirst uppercases the first letter of the string.