Documentation
¶
Overview ¶
Package generic is the source adapter for any git host (R-091): an HTTPS username and token, or an SSH key with the host's key pinned. It has no API to list repositories with, so an app from it is created by entering the repository's address.
Index ¶
- Constants
- func Info() api.KindInfo
- type Adapter
- func (a *Adapter) BeginAuthorization(context.Context, api.AuthorizationRequest) (api.Authorization, error)
- func (a *Adapter) Category() api.Category
- func (a *Adapter) CompleteAuthorization(context.Context, api.AuthorizationCompletion) (api.AuthorizationResult, error)
- func (a *Adapter) Configure(_ context.Context, raw json.RawMessage) error
- func (a *Adapter) Covers(repoURL string) int
- func (a *Adapter) GitCredential(_ context.Context, repoURL string) (api.GitCredential, error)
- func (a *Adapter) HealthCheck(context.Context) error
- func (a *Adapter) Kind() string
- func (a *Adapter) ListBranches(context.Context, string) ([]string, error)
- func (a *Adapter) ListRepositories(context.Context, api.ListRepositoriesRequest) ([]api.Repository, error)
- func (a *Adapter) Refresh(context.Context) (map[string]secret.Value, error)
- func (a *Adapter) SourceCapabilities() api.SourceCapabilities
Constants ¶
View Source
const Kind = "git"
Kind is the adapter's kind string.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter is one connection to a git host.
func (*Adapter) BeginAuthorization ¶
func (a *Adapter) BeginAuthorization(context.Context, api.AuthorizationRequest) (api.Authorization, error)
func (*Adapter) CompleteAuthorization ¶
func (a *Adapter) CompleteAuthorization(context.Context, api.AuthorizationCompletion) (api.AuthorizationResult, error)
func (*Adapter) GitCredential ¶
GitCredential is the token or the key.
func (*Adapter) HealthCheck ¶
HealthCheck succeeds once configured. Whether the credential still works is learned at the next clone, which reports it (R-146).
func (*Adapter) ListBranches ¶
func (*Adapter) ListRepositories ¶
func (a *Adapter) ListRepositories(context.Context, api.ListRepositoriesRequest) ([]api.Repository, error)
func (*Adapter) Refresh ¶
Refresh has nothing to renew: a token or a key does not expire on a schedule Pando can see.
func (*Adapter) SourceCapabilities ¶
func (a *Adapter) SourceCapabilities() api.SourceCapabilities
Click to show internal directories.
Click to hide internal directories.