Versions in this module Expand all Collapse all v0 v0.11.2 Mar 9, 2026 Changes in this version + var ErrInvalidCloneConfig = errors.New("invalid clone config: at most one of Branch, Tag, or Commit may be specified") + var ErrInvalidFilePath = errors.New("invalid file path") + var ErrNilRepository = errors.New("repository is nil") + var ErrNotImplemented = errors.New("not implemented") + var ErrTooBig = errors.New("file too big") + var ErrTooManyFiles = errors.New("too many files") + type Client interface + Cleanup func(ctx context.Context, repoInfo *RepositoryInfo) error + Clone func(ctx context.Context, config *CloneConfig) (*RepositoryInfo, error) + GetFileContent func(repoInfo *RepositoryInfo, path string) ([]byte, error) + type ClientOption func(*DefaultGitClient) + func WithAuth(auth transport.AuthMethod) ClientOption + type CloneConfig struct + Branch string + Commit string + Tag string + URL string + type DefaultGitClient struct + func NewDefaultGitClient(opts ...ClientOption) *DefaultGitClient + func (*DefaultGitClient) Cleanup(_ context.Context, repoInfo *RepositoryInfo) error + func (*DefaultGitClient) GetFileContent(repoInfo *RepositoryInfo, path string) ([]byte, error) + func (c *DefaultGitClient) Clone(ctx context.Context, config *CloneConfig) (*RepositoryInfo, error) + type LimitedFs struct + Fs billy.Filesystem + MaxFiles int64 + TotalFileSize int64 + func (*LimitedFs) Chroot(_ string) (billy.Filesystem, error) + func (f *LimitedFs) Create(filename string) (billy.File, error) + func (f *LimitedFs) Join(elem ...string) string + func (f *LimitedFs) Lstat(filename string) (fs.FileInfo, error) + func (f *LimitedFs) MkdirAll(filename string, perm fs.FileMode) error + func (f *LimitedFs) Open(filename string) (billy.File, error) + func (f *LimitedFs) OpenFile(filename string, flag int, perm fs.FileMode) (billy.File, error) + func (f *LimitedFs) ReadDir(path string) ([]fs.FileInfo, error) + func (f *LimitedFs) Readlink(link string) (string, error) + func (f *LimitedFs) Remove(filename string) error + func (f *LimitedFs) Rename(oldpath string, newpath string) error + func (f *LimitedFs) Root() string + func (f *LimitedFs) Stat(filename string) (fs.FileInfo, error) + func (f *LimitedFs) Symlink(target string, link string) error + func (f *LimitedFs) TempFile(dir string, prefix string) (billy.File, error) + type RepositoryInfo struct + Branch string + RemoteURL string + Repository *git.Repository