Documentation
¶
Index ¶
- Variables
- func ValidateRepositoryRef(value string) error
- type Client
- func (c *Client) Capabilities() registry.SourceCaps
- func (c *Client) Close() error
- func (c *Client) Download(ctx context.Context, slug string, opts registry.DownloadOpts) (_ *registry.DownloadResult, err error)
- func (c *Client) Info(_ context.Context, slug string) (*registry.Detail, error)
- func (c *Client) Name() string
- func (c *Client) Search(context.Context, string, registry.SearchOpts) ([]registry.Listing, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidRepositoryRef reports a repository URL outside the public HTTPS grammar. ErrInvalidRepositoryRef = errors.New("gitsrc: invalid repository URL") // ErrRepositoryDestinationBlocked reports a repository whose resolved addresses violate policy. ErrRepositoryDestinationBlocked = errors.New("gitsrc: repository destination blocked") // ErrRepositoryTooLarge reports that the checked-out repository exceeds the archive content budget. ErrRepositoryTooLarge = errors.New("gitsrc: repository exceeds max uncompressed size") // ErrRepositoryTooManyFiles reports that the checked-out repository exceeds the archive entry budget. ErrRepositoryTooManyFiles = errors.New("gitsrc: repository exceeds max file count") )
ErrGitUnavailable reports that the required git executable cannot be found.
View Source
var ErrGitVersionUnsupported = errors.New("gitsrc: Git 2.37 or newer is required")
ErrGitVersionUnsupported reports a Git binary too old to pin approved DNS answers.
Functions ¶
func ValidateRepositoryRef ¶
ValidateRepositoryRef enforces the public git-source repository grammar and literal-address policy.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client downloads extension trees from public git repositories.
func (*Client) Capabilities ¶
func (c *Client) Capabilities() registry.SourceCaps
Capabilities reports that arbitrary git repositories are not searchable.
func (*Client) Download ¶
func (c *Client) Download( ctx context.Context, slug string, opts registry.DownloadOpts, ) (_ *registry.DownloadResult, err error)
Download shallow-clones a repository and returns its working tree as a gzip archive.
type Option ¶
type Option func(*Client)
Option configures a git registry client.
func WithLookPath ¶
WithLookPath overrides executable discovery.
func WithTimeout ¶
WithTimeout overrides the clone timeout.
Click to show internal directories.
Click to hide internal directories.