TomGitHubStorage constructor
TomGitHubStorage({
- required TomTokenSource tokens,
- GitHubApiClient clientFactory(
- String secret
- DateTime clock()?,
- TomDiagnostics diagnostics = const TomNullDiagnostics(),
- TomStorageCache? cache,
- String commitMessagePrefix = '',
- GitHubGitIdentity? committer,
A backend that authenticates from tokens on first use (and re-reads
them on every request — see authenticate). clientFactory builds the
client from the secret; the default reaches api.github.com.
Implementation
TomGitHubStorage({
required TomTokenSource tokens,
GitHubApiClient Function(String secret)? clientFactory,
DateTime Function()? clock,
this.diagnostics = const TomNullDiagnostics(),
this.cache,
this.commitMessagePrefix = '',
this.committer,
}) : _tokens = tokens,
_clientFactory = clientFactory ?? _defaultClient,
_clock = clock ?? _utcNow;