gbs-downloader-0.1.0.0: A library for downloading data from a Great Black Swamp server
Safe HaskellNone
LanguageHaskell2010

Tahoe.Announcement

Description

Represent and work with Tahoe-LAFS storage service announcements.

A storage service announcement includes information about how to find and authenticate a storage service. They are often exchanged using a pubsub system orchestrated by an "introducer". Here, we currently support only reading them from a yaml or json file.

Synopsis

Documentation

data URI #

Instances

Instances details
Eq URI 
Instance details

Defined in Network.URI

Methods

(==) :: URI -> URI -> Bool #

(/=) :: URI -> URI -> Bool #

Data URI 
Instance details

Defined in Network.URI

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> URI -> c URI #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c URI #

toConstr :: URI -> Constr #

dataTypeOf :: URI -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c URI) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URI) #

gmapT :: (forall b. Data b => b -> b) -> URI -> URI #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URI -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URI -> r #

gmapQ :: (forall d. Data d => d -> u) -> URI -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> URI -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> URI -> m URI #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> URI -> m URI #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> URI -> m URI #

Ord URI 
Instance details

Defined in Network.URI

Methods

compare :: URI -> URI -> Ordering #

(<) :: URI -> URI -> Bool #

(<=) :: URI -> URI -> Bool #

(>) :: URI -> URI -> Bool #

(>=) :: URI -> URI -> Bool #

max :: URI -> URI -> URI #

min :: URI -> URI -> URI #

Show URI 
Instance details

Defined in Network.URI

Methods

showsPrec :: Int -> URI -> ShowS #

show :: URI -> String #

showList :: [URI] -> ShowS #

Generic URI 
Instance details

Defined in Network.URI

Associated Types

type Rep URI :: Type -> Type #

Methods

from :: URI -> Rep URI x #

to :: Rep URI x -> URI #

NFData URI 
Instance details

Defined in Network.URI

Methods

rnf :: URI -> () #

Lift URI 
Instance details

Defined in Network.URI

Methods

lift :: URI -> Q Exp #

liftTyped :: URI -> Q (TExp URI) #

type Rep URI 
Instance details

Defined in Network.URI

type Rep URI = D1 ('MetaData "URI" "Network.URI" "network-uri-2.6.4.2-53bce4a854294427cf4b8907cb1c5206a5ffec17f61cc081ae0091c30dfa0cdb" 'False) (C1 ('MetaCons "URI" 'PrefixI 'True) ((S1 ('MetaSel ('Just "uriScheme") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "uriAuthority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe URIAuth))) :*: (S1 ('MetaSel ('Just "uriPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "uriQuery") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "uriFragment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))))

data URIAuth #

Constructors

URIAuth 

Instances

Instances details
Eq URIAuth 
Instance details

Defined in Network.URI

Methods

(==) :: URIAuth -> URIAuth -> Bool #

(/=) :: URIAuth -> URIAuth -> Bool #

Data URIAuth 
Instance details

Defined in Network.URI

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> URIAuth -> c URIAuth #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c URIAuth #

toConstr :: URIAuth -> Constr #

dataTypeOf :: URIAuth -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c URIAuth) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URIAuth) #

gmapT :: (forall b. Data b => b -> b) -> URIAuth -> URIAuth #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URIAuth -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URIAuth -> r #

gmapQ :: (forall d. Data d => d -> u) -> URIAuth -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> URIAuth -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> URIAuth -> m URIAuth #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> URIAuth -> m URIAuth #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> URIAuth -> m URIAuth #

Ord URIAuth 
Instance details

Defined in Network.URI

Show URIAuth 
Instance details

Defined in Network.URI

Generic URIAuth 
Instance details

Defined in Network.URI

Associated Types

type Rep URIAuth :: Type -> Type #

Methods

from :: URIAuth -> Rep URIAuth x #

to :: Rep URIAuth x -> URIAuth #

NFData URIAuth 
Instance details

Defined in Network.URI

Methods

rnf :: URIAuth -> () #

Lift URIAuth 
Instance details

Defined in Network.URI

Methods

lift :: URIAuth -> Q Exp #

liftTyped :: URIAuth -> Q (TExp URIAuth) #

type Rep URIAuth 
Instance details

Defined in Network.URI

type Rep URIAuth = D1 ('MetaData "URIAuth" "Network.URI" "network-uri-2.6.4.2-53bce4a854294427cf4b8907cb1c5206a5ffec17f61cc081ae0091c30dfa0cdb" 'False) (C1 ('MetaCons "URIAuth" 'PrefixI 'True) (S1 ('MetaSel ('Just "uriUserInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "uriRegName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "uriPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))

type StorageServerID = Text Source #

The unique identifier for a particular storage server, conventionally the lowercase base32 encoding of some public key controlled by the server.

data StorageServerAnnouncement Source #

An announcement from a storage server about its storage service.

Instances

Instances details
Eq StorageServerAnnouncement Source # 
Instance details

Defined in Tahoe.Announcement

Ord StorageServerAnnouncement Source # 
Instance details

Defined in Tahoe.Announcement

Show StorageServerAnnouncement Source # 
Instance details

Defined in Tahoe.Announcement

FromJSON StorageServerAnnouncement Source # 
Instance details

Defined in Tahoe.Announcement

Methods

parseJSON :: Value -> Parser StorageServerAnnouncement

parseJSONList :: Value -> Parser [StorageServerAnnouncement]

ToJSON StorageServerAnnouncement Source # 
Instance details

Defined in Tahoe.Announcement

Default StorageServerAnnouncement Source # 
Instance details

Defined in Tahoe.Announcement

newtype Announcements Source #

A map of storage server announcements keyed on the unique server identifier.

Instances

Instances details
Eq Announcements Source # 
Instance details

Defined in Tahoe.Announcement

Show Announcements Source # 
Instance details

Defined in Tahoe.Announcement

FromJSON Announcements Source # 
Instance details

Defined in Tahoe.Announcement

Methods

parseJSON :: Value -> Parser Announcements

parseJSONList :: Value -> Parser [Announcements]

ToJSON Announcements Source # 
Instance details

Defined in Tahoe.Announcement

Methods

toJSON :: Announcements -> Value

toEncoding :: Announcements -> Encoding

toJSONList :: [Announcements] -> Value

toEncodingList :: [Announcements] -> Encoding

greatBlackSwampURIs :: StorageServerAnnouncement -> Maybe URI Source #

If possible, get the URI of a Great Black Swamp server from an announcement.

parseURI' :: Text -> Maybe URI Source #

Parse a Tahoe-LAFS fURL. For example:

pb:/gnuer2axzoq3ggnn7gjoybmfqsjvaow3@tcp:localhost:46185sxytycucj5eeunlx6modfazq5byp2hpb

This *does not* parse NURLs which are the expected way that GBS locations will be communicated.

See https://whetstone.private.storage/privatestorage/gbs-downloader/-/issues/6