func (c *CredentialsAsSSHKey) Type() CredType {
	return CredTypeSSHKey
}
Type returns the type of credential
package git
import (
	lib "github.com/libgit2/git2go/v30"
)
type CredType uint8
const (
	CredTypeUserpassPlaintext CredType = iota
	CredTypeSSHKey
	CredTypeSSHAgent
)
type Credential interface {
	Type() CredType
}
type OptionsWithCreds interface {
	authCallbackFunc(string, string, lib.CredType) (lib.ErrorCode, *lib.Cred)
	certCheckCallbackFunc(*lib.Certificate, bool, string) lib.ErrorCode
	creds() Credential
}
type CredentialsAsPlainText struct {
	UserName string
	Password string
}
func (c *CredentialsAsPlainText) Type() CredType {
	return CredTypeUserpassPlaintext
}
type CredentialsAsSSHKey struct {
	UserName       string
	PublicKeyPath  string
	PrivateKeyPath string
	Passphrase     string
}