1{-# LANGUAGE OverloadedStrings #-}
4-- Module : Example.Storage
5-- Copyright : (c) 2015-2016 Brendan Hay
6-- License : Mozilla Public License, v. 2.0.
7-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
8-- Stability : provisional
9-- Portability : non-portable (GHC extensions)
11module Example.Storage where
14import Data.Text (Text)
15import qualified Data.Text as Text
17import Network.Google.Storage
20example :: Text -> FilePath -> IO ()
22 l <- newLogger Debug stdout
23 e <- newEnv <&> (envLogger .~ l) . allow devstorageReadWriteScope
27 obj = object' & objContentType ?~ "application/octet-stream"
29 runResourceT . runGoogle e $ do
30 _ <- upload (objectsInsert bkt obj & oiName ?~ key) b
31 _ <- download (objectsGet bkt key)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list