Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithEndpoint ¶
func WithEndpoint(u string) *option
WithEndpoint changes the Client.endpoint value.
Types ¶
type HttpClient ¶
HttpClient represents a HTTP client.
type Option ¶
type Option interface { Name() string Value() interface{} }
Option represents a configurable parameter of the Uploader.
type ResumableUploader ¶
type ResumableUploader struct {
// contains filtered or unexported fields
}
ResumableUploader implements resumable uploads. It will require a SessionStorer to keep already upload session.
func NewResumableUploader ¶
func NewResumableUploader(authenticatedClient HttpClient, store SessionStorer, options ...Option) (*ResumableUploader, error)
NewResumableUploader returns an Uploader or error in case of non valid configuration. The supplied authenticatedClient must have the proper authentication to upload files. The supplied store will be used to keep upload sessions.
Use WithLogger(...) and WithEndpoint(...) to customize configuration.
func (ResumableUploader) UploadFile ¶
UploadFile returns the Google Photos upload token after uploading a file. Any non-2xx status code is an error. Response headers are in error.(*googleapi.Error).Header.