Documentation ¶
Overview ¶
Package googlestorage implements a generic Google Storage API client. It does not include any Camlistore-specific logic.
Index ¶
- Constants
- func MakeOauthTransport(clientId string, clientSecret string, refreshToken string) *oauth.Transport
- type Client
- func (gsa *Client) DeleteObject(obj *Object) (err error)
- func (gsa *Client) EnumerateObjects(bucket, after string, limit int) ([]SizedObject, error)
- func (gsa *Client) GetObject(obj *Object) (io.ReadCloser, int64, error)
- func (gsa *Client) PutObject(obj *Object, content io.ReadCloser) (shouldRetry bool, err error)
- func (gsa *Client) StatObject(obj *Object) (size int64, exists bool, err error)
- type Object
- type SizedObject
Constants ¶
View Source
const ( Scope = "https://www.googleapis.com/auth/devstorage.read_write" AuthURL = "https://accounts.google.com/o/oauth2/auth" TokenURL = "https://accounts.google.com/o/oauth2/token" RedirectURL = "urn:ietf:wg:oauth:2.0:oob" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteObject ¶
Removes a GS object. Bucket and Key values are trusted to be valid.
func (*Client) EnumerateObjects ¶
func (gsa *Client) EnumerateObjects(bucket, after string, limit int) ([]SizedObject, error)
List the objects in a GS bucket. If after is nonempty, listing will begin with lexically greater object names If limit is nonzero, the length of the list will be limited to that number.
func (*Client) GetObject ¶
Fetch a GS object. Bucket and Key fields are trusted to be valid. Returns (object reader, object size, err). Reader must be closed.
type SizedObject ¶
func (SizedObject) String ¶
func (sgso SizedObject) String() string
Click to show internal directories.
Click to hide internal directories.