( ctx context.Context, email string, serviceLabel string, errorLabel string, scopes []string, factory googleServiceFactory[T], )
| 88 | } |
| 89 | |
| 90 | func newGoogleServiceForServiceAccountScopes[T any]( |
| 91 | ctx context.Context, |
| 92 | email string, |
| 93 | serviceLabel string, |
| 94 | errorLabel string, |
| 95 | scopes []string, |
| 96 | factory googleServiceFactory[T], |
| 97 | ) (*T, error) { |
| 98 | opts, err := optionsForServiceAccountScopes(ctx, serviceLabel, email, scopes) |
| 99 | if err != nil { |
| 100 | return nil, fmt.Errorf("%s options: %w", errorLabel, err) |
| 101 | } |
| 102 | |
| 103 | return newGoogleService(ctx, errorLabel, opts, factory) |
| 104 | } |
| 105 | |
| 106 | func newGoogleService[T any]( |
| 107 | ctx context.Context, |
no test coverage detected