Versions in this module Expand all Collapse all v0 v0.0.1 Sep 25, 2026 Changes in this version + var Version = "v0.0.1" + func GitHubTokenFromEnv() string + func ObjectKey(rawURL string) (string, error) + func Run(ctx context.Context) error + func URLReplacements(artifacts []Artifact, mirrorURL string) (string, error) + type Artifact struct + Backend string + Checksum string + Platform string + Tool string + URL string + Version string + func FilterPlatforms(artifacts []Artifact, platforms []string) []Artifact + func LoadLockFiles(paths []string) ([]Artifact, error) + func ParseLockFile(r io.Reader) ([]Artifact, error) + type CLI struct + Concurrency int + Debug bool + Destination string + DryRun bool + Force bool + LockFiles []string + MirrorURL string + Platforms []string + Version kong.VersionFlag + type LocalStorage struct + func NewLocalStorage(dir string) *LocalStorage + func (s *LocalStorage) Exists(ctx context.Context, key string) (bool, error) + func (s *LocalStorage) Location(key string) string + func (s *LocalStorage) Put(ctx context.Context, key string, src *os.File) error + type Mirror struct + Concurrency int + DryRun bool + Force bool + GitHubToken string + HTTPClient *http.Client + Storage Storage + func (m *Mirror) Run(ctx context.Context, artifacts []Artifact) error + type S3Client interface + HeadObject func(ctx context.Context, params *s3.HeadObjectInput, optFns ...func(*s3.Options)) (*s3.HeadObjectOutput, error) + PutObject func(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error) + type S3Storage struct + func NewS3Storage(client S3Client, bucket, prefix string) *S3Storage + func (s *S3Storage) Exists(ctx context.Context, key string) (bool, error) + func (s *S3Storage) Location(key string) string + func (s *S3Storage) Put(ctx context.Context, key string, src *os.File) error + type Storage interface + Exists func(ctx context.Context, key string) (bool, error) + Location func(key string) string + Put func(ctx context.Context, key string, src *os.File) error + func NewStorage(ctx context.Context, dest string) (Storage, error)