docs(credentials): clarify documentation

This commit is contained in:
Aleksey Kulikov 2022-05-05 16:23:04 +03:00
parent e9e70cfc62
commit 64f6a475cc
2 changed files with 15 additions and 2 deletions

View file

@ -4,7 +4,11 @@ class Callbacks {
/// Callback functions used in various methods of [Remote] and with
/// [Repository.clone].
///
/// [credentials] is the [Credentials] object used for authentication.
/// [credentials] is one of the objects used for authentication:
/// - [UserPass]
/// - [Keypair]
/// - [KeypairFromAgent]
/// - [KeypairFromMemory]
///
/// [transferProgress] is the callback function that reports transfer
/// progress.
@ -27,7 +31,11 @@ class Callbacks {
this.pushUpdateReference,
});
/// Credentials used for authentication.
/// Credentials used for authentication. Could be one of:
/// - [UserPass]
/// - [Keypair]
/// - [KeypairFromAgent]
/// - [KeypairFromMemory]
final Credentials? credentials;
/// Callback function that reports transfer progress.

View file

@ -1,5 +1,10 @@
import 'package:libgit2dart/libgit2dart.dart';
/// Abstract class. Use one of the implementations:
/// - [UserPass]
/// - [Keypair]
/// - [KeypairFromAgent]
/// - [KeypairFromMemory]
abstract class Credentials {
/// Returns type of authentication method.
GitCredential get credentialType;