aboutsummaryrefslogtreecommitdiffstats
path: root/bommom.go
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2012-09-21 13:03:46 +0200
committerbnewbold <bnewbold@robocracy.org>2012-09-21 13:03:46 +0200
commit575dd002be18f170917a98f8bca891b4bd615f78 (patch)
tree5db7245e184110fd0a403b052191fe6d5b3205d4 /bommom.go
parentb0ecc94ef69d489dcc775038a0c6f65c1c960c8e (diff)
downloadbommom-575dd002be18f170917a98f8bca891b4bd615f78.tar.gz
bommom-575dd002be18f170917a98f8bca891b4bd615f78.zip
basic octopart pricing functionality
Diffstat (limited to 'bommom.go')
-rw-r--r--bommom.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bommom.go b/bommom.go
index 55071b8..cebff62 100644
--- a/bommom.go
+++ b/bommom.go
@@ -28,6 +28,7 @@ var (
listenPort = flag.Uint("port", 7070, "port to listen on (HTTP serve)")
listenHost = flag.String("host", "", "hostname to listen on (HTTP serve)")
sessionSecret = flag.String("sessionSecret", "12345", "cookie session secret")
+ octoApiKey = flag.String("octopartApiKey", "", "octopart.com API key (for pricing info)")
)
func main() {
@@ -88,6 +89,10 @@ func openAuthStore() {
auth = DummyAuth(true)
}
+func openPricingSource() {
+ pricingSource = NewOctopartClient(*octoApiKey)
+}
+
func dumpOut(fname string, bm *BomMeta, b *Bom) {
var outFile io.Writer
if fname == "" {