Help us shape the future of Go! Take the 2026 Go Developer Survey

generic

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

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

View Source
const Kind = "git"

Kind is the adapter's kind string.

Variables

This section is empty.

Functions

func Info

func Info() api.KindInfo

Info describes the kind for the console's and the CLI's forms.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter is one connection to a git host.

func New

func New() *Adapter

New returns an unconfigured adapter.

func (*Adapter) BeginAuthorization

func (*Adapter) Category

func (a *Adapter) Category() api.Category

func (*Adapter) Configure

func (a *Adapter) Configure(_ context.Context, raw json.RawMessage) error

Configure reads the connection's settings and credentials.

func (*Adapter) Covers

func (a *Adapter) Covers(repoURL string) int

Covers scores the repository by host and path prefix.

func (*Adapter) GitCredential

func (a *Adapter) GitCredential(_ context.Context, repoURL string) (api.GitCredential, error)

GitCredential is the token or the key.

func (*Adapter) HealthCheck

func (a *Adapter) HealthCheck(context.Context) error

HealthCheck succeeds once configured. Whether the credential still works is learned at the next clone, which reports it (R-146).

func (*Adapter) Kind

func (a *Adapter) Kind() string

func (*Adapter) ListBranches

func (a *Adapter) ListBranches(context.Context, string) ([]string, error)

func (*Adapter) ListRepositories

func (*Adapter) Refresh

func (a *Adapter) Refresh(context.Context) (map[string]secret.Value, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL