Documentation
¶
Overview ¶
Package git implements the source.Fetcher for KindGitRepository.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveLocal ¶
func ResolveLocal( ctx context.Context, location *gitrepo.Location, repositories []*manifest.GitRepository, options LocalOptions, ) (map[manifest.NamedResource]*store.SourceArtifact, error)
ResolveLocal resolves authored refs from an admitted location's own repository. Only matching mutable HEAD inputs may expose working-tree edits; committed artifacts retain their own object storage and use LocalPath solely for ownership. On error, returned artifacts contain only warnings and no usable content.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client retains invocation policy for deferred baseline operations.
func NewClient ¶
func NewClient( cfg ClientConfig, ) (*Client, error)
NewClient requires a caller-owned network, including for local transport overrides.
type ClientConfig ¶
type ClientConfig struct {
Transports Transports
// Network MUST outlive every operation that uses this client.
Network *source.Network
Material source.TransportMaterial
}
ClientConfig requires a Network that outlives every operation.
type Connection ¶
Connection requires Writer().Close() to preserve unread output. The operation owns the connection.
type Fetcher ¶
type Fetcher struct {
Cache *sourcecache.Cache
// Network MUST outlive acquisitions and their cache producers.
Network *source.Network
GitTransports Transports
// Depth bounds history for refs that do not require reachability validation.
Depth int
// RestrictSchemes permits only HTTPS and SSH for untrusted inputs.
RestrictSchemes bool
// contains filtered or unexported fields
}
Fetcher acquires immutable Git generations through the common cache owner.
func (*Fetcher) Fetch ¶
func (f *Fetcher) Fetch( ctx context.Context, repo *manifest.GitRepository, reads *store.ReadSet, policyValue *sourcecache.Policy, ) (source.PreparedFetch, error)
Fetch acquires content using one execution's captured credentials and declarations.
func (*Fetcher) FetchRemoteBase ¶
func (f *Fetcher) FetchRemoteBase( ctx context.Context, requestValue *RemoteBaseRequest, policyValue *sourcecache.Policy, ) (*store.SourceArtifact, error)
FetchRemoteBase returns an immutable lazy view of the whole public repository. An error may retain warnings without usable content.
type LocalOptions ¶
LocalOptions carries the admitted revision and requesting operation's attribution.
type RemoteBaseRequest ¶
type RemoteBaseRequest struct {
Work manifest.WorkScope
URL string
Ref string
Timeout time.Duration
Submodules bool
}
RemoteBaseRequest carries a public base's effective repository and command policy.
type Transport ¶
type Transport func(context.Context, TransportRequest) (Connection, error)
Transport callbacks MUST support concurrent calls and honor cancellation. Their resources MUST outlive the invocation, including lazy baseline reads. A custom connector owns connection security.
type TransportRequest ¶
TransportRequest callbacks MUST NOT mutate URL after returning.
type Transports ¶
Transports keys MUST be exact lowercase schemes. Missing keys use upstream transports. Route behavior MUST remain stable while reusing a cache.