Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { FileTracker FileTracker TokenManager TokenManager UploadTracker UploadTracker Logger log.Logger }
App represents a running application with all the dependant services.
func (*App) NewOAuth2Client ¶
func (app *App) NewOAuth2Client(ctx context.Context, oauth2Config oauth2.Config, account string) (*http.Client, error)
NewOAuth2Client returns a http client for the supplied Google account. It will try to get the credentials from the Token Manager, if they are not valid will try to refresh the token or ask for authenticate again.
type FileTracker ¶
type FileTracker interface { CacheAsAlreadyUploaded(filePath string) error IsAlreadyUploaded(filePath string) (bool, error) RemoveAsAlreadyUploaded(filePath string) error Close() error }
FileTracker represents a service to track file already uploaded.
Click to show internal directories.
Click to hide internal directories.