TomGitHubStorage.withClient constructor

TomGitHubStorage.withClient(
  1. GitHubApiClient client, {
  2. DateTime clock()?,
  3. TomDiagnostics diagnostics = const TomNullDiagnostics(),
  4. TomStorageCache? cache,
  5. String commitMessagePrefix = '',
  6. GitHubGitIdentity? committer,
})

A backend over an already-authenticated client. For tests and for a caller that obtained a token some other way.

Implementation

TomGitHubStorage.withClient(
  GitHubApiClient client, {
  DateTime Function()? clock,
  this.diagnostics = const TomNullDiagnostics(),
  this.cache,
  this.commitMessagePrefix = '',
  this.committer,
}) : _tokens = null,
     _clientFactory = null,
     _client = client,
     _clock = clock ?? _utcNow;