perkeep/pkg/googlestorage
Brad Fitzpatrick f318ad4410 googlestorage: don't use host configuration during tests
Change-Id: Id1415f170dbff650d876fc4c01cff04fb8d41415
2014-02-23 10:04:48 -08:00
..
testdata
README
auth.go
googlestorage.go httputil: add DecodeJSON and CloseBody helpers, then use them everywhere 2014-01-28 22:00:52 -08:00
googlestorage_test.go googlestorage: don't use host configuration during tests 2014-02-23 10:04:48 -08:00

README

Implements the Storage interface for Google Storage.
A GoogleStorage instance stores blobs in a single Google Storage bucket, with
each blob keyed by its blobref.  

Server configuration
=====================

High-level server config is formatted like:

	"googlecloudstorage": "clientId:clientSecret:refreshToken:bucketName"


Testing
========

googlestorage_test.go contains integration tests which run against Google Storage.
In order to run these tests properly, you will need to:

1.  Set up google storage.  See:
	http://code.google.com/apis/storage/docs/signup.html

2.  Upload the contents of the testdata dir to a google storage bucket.  Note
	that all these files begin with 'test-': such files will be ignored when 
	the bucket is used as blobserver storage.

3.  Create the config file '~/.config/camlistore/gstestconfig.json'.  The 
    file should look something like this:

	{
		"gsconf": {
			"auth": {
				"client_id": "your client id",
				"client_secret": "your client secret",
				"refresh_token": "a refresh token"
			},
			"bucket": "bucketName"
		}
	}


	You can use 'camtool gsinit' to help obtain the auth config object.