tempodb (empty) → 0.1.0.0
raw patch · 7 files changed
+142/−0 lines, 7 filesdep +HTTPdep +HsOpenSSLdep +basesetup-changed
Dependencies added: HTTP, HsOpenSSL, base, bytestring, http-streams, mtl
Files
- CHANGELOG +6/−0
- DEBT +6/−0
- LICENSE +27/−0
- README.org +28/−0
- Setup.hs +2/−0
- src/Database/Tempodb.hs +9/−0
- tempodb.cabal +64/−0
+ CHANGELOG view
@@ -0,0 +1,6 @@+-*- mode: org -*-++The script used to generate this document can be found here:+http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/gitlog-to-changelog++
+ DEBT view
@@ -0,0 +1,6 @@+-*- mode: org -*-++This file is a log (in org-mode format) for all of the areas of the+application, including devops, that need refactoring attention.++
+ LICENSE view
@@ -0,0 +1,27 @@+Copyright (c) 2013, Parnell Springmeyer+All rights reserved.++Redistribution and use in source and binary forms, with or without modification,+are permitted provided that the following conditions are met:++* Redistributions of source code must retain the above copyright notice, this+ list of conditions and the following disclaimer.++* Redistributions in binary form must reproduce the above copyright notice, this+ list of conditions and the following disclaimer in the documentation and/or+ other materials provided with the distribution.++* Neither the name of the {organization} nor the names of its+ contributors may be used to endorse or promote products derived from+ this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ README.org view
@@ -0,0 +1,28 @@+* Welcome!+ This is a small Haskell wrapper around the [[http://tempo-db.com][TempoDB]] REST API.++** Usage is easy+ Create your basic auth record, keys and secrets are newtyped (I+ always mix up which one goes first) and run one of the method+ functions with the runTempoDB monad.+ + #+BEGIN_SRC <language haskell>+ λ: import Database.Tempodb+ λ: let a = BasicAuth (ApiKey "mykey") (ApiSec "mysecret")+ λ: runTempoDB a $ seriesList Nothing+ λ: runTempoDB a $ seriesList [("key", "somekey"), ("key", "another")]+ #+END_SRC++ #+BEGIN_SRC <language haskell>+ λ: :set -XOverloadedStrings+ λ: import Data.ByteString.Char8 as C8+ λ: import Database.Tempodb+ λ: let a = BasicAuth (ApiKey "mykey") (ApiSec "mysecret")+ λ: :{+ λ: runTempoDB a $ do+ λ: f <- seriesList $ Just [("key", "somekey"), ("key", "another")]+ λ: r <- seriesList Nothing+ λ: liftIO . C8.putStrLn $ C8.concat ["Results: ", f, r]+ λ: :}+ λ: [][]+ #+END_SRC
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ src/Database/Tempodb.hs view
@@ -0,0 +1,9 @@+{-# LANGUAGE OverloadedStrings #-}++module Database.Tempodb+( module Database.Tempodb.Types+, module Database.Tempodb.Methods+) where++import Database.Tempodb.Methods+import Database.Tempodb.Types
+ tempodb.cabal view
@@ -0,0 +1,64 @@+name: tempodb+version: 0.1.0.0+synopsis: A small Haskell wrapper around the TempoDB api.++description: TempoDB is a time-series database as-a-service with a+ robust REST API. This module provides a simple API wrapper+ to perform all of the primary requests to TempoDB.++homepage: https://github.com/ixmatus/hs-tempodb+license: BSD3+license-file: LICENSE+author: Parnell Springmeyer+maintainer: parnell@ixmat.us+copyright: (C) 2013 Parnell Springmeyer+category: Database+build-type: Simple+extra-source-files: README.org+cabal-version: >=1.10++extra-source-files:+ LICENSE+ DEBT+ README.org+ CHANGELOG++library+ hs-source-dirs: src+ cpp-options: -Dcabal+ ghc-options: -Wall -fno-warn-type-defaults -fno-warn-unused-do-bind+ build-depends: base >= 4.6 && <4.7,+ http-streams >= 0.6.1.1,+ mtl >= 2.1.2,+ HTTP >= 4000.2.9,+ HsOpenSSL >= 0.10.3.5,+ bytestring >= 0.10.0.2+++ default-language: Haskell2010++ exposed-modules:+ Database.Tempodb++source-repository head+ Type: git+ Location: https://github.com/ixmatus/hs-tempodb++-- test-suite tests+-- type: exitcode-stdio-1.0+-- hs-source-dirs: test+-- main-is: Test.hs+-- -- other-modules:++-- ghc-options:+-- -Wall -threaded -rtsopts++-- build-depends:+-- tempodb,+-- base >= 4.5,+-- QuickCheck >= 2.5,+-- test-framework >= 0.8,+-- test-framework-quickcheck2 >= 0.3.0,+-- test-framework-hunit >= 0.3.0,+-- network >= 2.4.1.2,+-- bytestring >= 0.10.0.2