git

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 40 Imported by: 146

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Supported added in v0.4.0

func Supported() error

Supported returns nil if the system supports Git source

Types

type GitIdentifier added in v0.13.0

type GitIdentifier struct {
	Remote           string
	Ref              string
	Checksum         string
	Subdir           string
	KeepGitDir       bool
	AuthTokenSecret  string
	AuthHeaderSecret string
	MountSSHSock     string
	KnownSSHHosts    string
	SkipSubmodules   bool

	VerifySignature *GitSignatureVerifyOptions
}

func NewGitIdentifier added in v0.13.0

func NewGitIdentifier(remoteURL string) (*GitIdentifier, error)

func (*GitIdentifier) Capture added in v0.13.0

func (id *GitIdentifier) Capture(c *provenance.Capture, pin string) error

func (GitIdentifier) Scheme added in v0.13.0

func (GitIdentifier) Scheme() string

type GitSignatureVerifyOptions added in v0.26.0

type GitSignatureVerifyOptions struct {
	PubKey            []byte
	RejectExpiredKeys bool
	RequireSignedTag  bool // signed tag must be present
	IgnoreSignedTag   bool // even if signed tag is present, verify signature on commit object
}

type Metadata added in v0.26.0

type Metadata struct {
	Ref            string
	Checksum       string
	CommitChecksum string

	CommitObject []byte
	TagObject    []byte
}

type MetadataOpts added in v0.26.0

type MetadataOpts struct {
	ReturnObject bool
}

type Opt

type Opt struct {
	CacheAccessor cache.Accessor
}

type Source added in v0.26.0

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

func NewSource

func NewSource(opt Opt) (*Source, error)

func (*Source) Identifier added in v0.26.0

func (gs *Source) Identifier(scheme, ref string, attrs map[string]string, platform *pb.Platform) (source.Identifier, error)

func (*Source) Resolve added in v0.26.0

func (*Source) ResolveMetadata added in v0.26.0

func (gs *Source) ResolveMetadata(ctx context.Context, id *GitIdentifier, sm *session.Manager, jobCtx solver.JobContext, opt MetadataOpts) (*Metadata, error)

func (*Source) Schemes added in v0.26.0

func (gs *Source) Schemes() []string

Jump to

Keyboard shortcuts

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