perkeep/pkg/googlestorage
mpl 40be4d8da2 vendor: go4.org/jsonconfig (and errorutil)
Previously pkg/jsonconfig and pkg/errorutil

Copied from go4.org at rev d1b8a2fb2de6160036e4801aa5e4d855571078b8

Change-Id: I673ed55b0825baa2607289b6082f205100261d7a
2015-12-01 17:21:49 +01:00
..
testdata Update from r60 to [almost] Go 1. 2012-02-18 21:53:06 -08:00
README google blobservers: migrate to golang.org/x/oauth2 2015-04-20 23:17:28 +02:00
googlestorage.go Remove httputil.CloseBody relic. 2015-11-23 19:02:10 -08:00
googlestorage_test.go vendor: go4.org/jsonconfig (and errorutil) 2015-12-01 17:21:49 +01: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.