settings.go 674 B

1234567891011121314151617181920212223
  1. // Package internal supports the options and transport packages.
  2. package internal
  3. import (
  4. "net/http"
  5. "golang.org/x/oauth2"
  6. "google.golang.org/grpc"
  7. )
  8. // DialSettings holds information needed to establish a connection with a
  9. // Google API service.
  10. type DialSettings struct {
  11. Endpoint string
  12. Scopes []string
  13. ServiceAccountJSONFilename string // if set, TokenSource is ignored.
  14. TokenSource oauth2.TokenSource
  15. UserAgent string
  16. APIKey string
  17. HTTPClient *http.Client
  18. GRPCDialOpts []grpc.DialOption
  19. GRPCConn *grpc.ClientConn
  20. }