perkeep/pkg/googlestorage
mpl 5147aff319 google blobservers: migrate to golang.org/x/oauth2
Previous oauth2 (code.google.com/p/goauth2/oauth) still used in:
third_party/github.com/tgulacsi/picago
pkg/importer/picasa
pkg/importer/foursquare

Final cleanup in a subsequent CL.

Change-Id: I805d81fcaa651e03a17823c78abe5040d51346c3
2015-04-20 23:17:28 +02:00
..
testdata
README google blobservers: migrate to golang.org/x/oauth2 2015-04-20 23:17:28 +02:00
googlestorage.go google blobservers: migrate to golang.org/x/oauth2 2015-04-20 23:17:28 +02:00
googlestorage_test.go google blobservers: migrate to golang.org/x/oauth2 2015-04-20 23:17:28 +02: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 googinit' to help obtain the auth config object.