git

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitGatherer

type GitGatherer struct {
	GitMetadata
	Authenticator SSHAuthenticator
}

func (*GitGatherer) Gather

func (g *GitGatherer) Gather(ctx context.Context, src, dst string) (metadata.Metadata, error)

func (*GitGatherer) Matcher

func (g *GitGatherer) Matcher(uri string) bool

type GitMetadata

type GitMetadata struct {
	Path         string
	CommitHash   string
	Author       string
	Timestamp    string
	LatestCommit string
}

func (GitMetadata) Get

func (g GitMetadata) Get() interface{}

func (GitMetadata) GetPinnedURL

func (g GitMetadata) GetPinnedURL(u string) (string, error)

type RealSSHAuthenticator

type RealSSHAuthenticator struct{}

RealSSHAuthenticator represents an implementation of the SSHAuthenticator interface.

func (*RealSSHAuthenticator) NewSSHAgentAuth

func (r *RealSSHAuthenticator) NewSSHAgentAuth(user string) (transport.AuthMethod, error)

NewSSHAgentAuth returns an AuthMethod that uses the SSH agent for authentication. It uses the specified user as the username for authentication.

type SSHAuthenticator

type SSHAuthenticator interface {
	// NewSSHAgentAuth returns a new SSH agent authentication method for the given user.
	// It returns an instance of transport.AuthMethod and an error if any.
	NewSSHAgentAuth(user string) (transport.AuthMethod, error)
}

SSHAuthenticator represents an interface for authenticating SSH connections.

Jump to

Keyboard shortcuts

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