| 29 | ) |
| 30 | |
| 31 | func newDefaultRuntime() *app.Runtime { |
| 32 | keyringOptions := systemKeyringOpenOptions(config.Layout{}, nil) |
| 33 | runtime := &app.Runtime{ |
| 34 | IO: app.IO{ |
| 35 | In: os.Stdin, |
| 36 | Out: os.Stdout, |
| 37 | Err: os.Stderr, |
| 38 | }, |
| 39 | Services: app.Services{ |
| 40 | Zoom: newZoomMeetingClient, |
| 41 | DriveDownload: driveDownload, |
| 42 | DriveExport: driveExportDownload, |
| 43 | OpenURL: openPhotosPickerBrowser, |
| 44 | }, |
| 45 | Auth: app.AuthOperations{ |
| 46 | AuthorizeGoogle: googleauth.Authorize, |
| 47 | CheckRefreshToken: googleauth.CheckRefreshToken, |
| 48 | EnsureKeychainAccess: secrets.EnsureKeychainAccessContext, |
| 49 | FetchAuthorizedIdentity: googleauth.IdentityForRefreshToken, |
| 50 | ManualAuthURL: googleauth.ManualAuthURL, |
| 51 | }, |
| 52 | KeyringOptions: &keyringOptions, |
| 53 | ServicesManaged: true, |
| 54 | } |
| 55 | |
| 56 | return runtime |
| 57 | } |
| 58 | |
| 59 | func systemKeyringOpenOptions(layout config.Layout, store *config.ConfigStore) secrets.OpenOptions { |
| 60 | return secrets.OpenOptionsFromLookup( |