artifact

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact interface {
	// Fetch fetches the artifact from the storage.
	Download(ctx context.Context, w io.Writer) error
}

Fetcher is the interface that wraps the Fetch method.

func New added in v0.12.0

func New(ctx context.Context, url string, logger *slog.Logger) (Artifact, error)

type GHR

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

func NewGHR

func NewGHR(ctx context.Context, url string, logger *slog.Logger) (*GHR, error)

func (*GHR) Download added in v0.12.0

func (r *GHR) Download(ctx context.Context, w io.Writer) error

Download download artifact.

type GS added in v0.18.0

type GS struct {
	Bucket string `schema:"-"`
	Object string `schema:"-"`
	// contains filtered or unexported fields
}

func NewGS added in v0.18.0

func NewGS(ctx context.Context, strUrl string, logger *slog.Logger) (*GS, error)

gs://<bucket>/<object>

func (*GS) Download added in v0.18.0

func (g *GS) Download(ctx context.Context, w io.Writer) error

type GSClient added in v0.18.0

type GSClient interface {
	Bucket(name string) *storage.BucketHandle
}

type S3

type S3 struct {
	Region   string `schema:"-"`
	Bucket   string `schema:"-"`
	Key      string `schema:"-"`
	Endpoint string `schema:"endpoint"`
	// contains filtered or unexported fields
}

func NewS3

func NewS3(ctx context.Context, strUrl string, logger *slog.Logger) (*S3, error)

s3://<region>/<bucket>/<key>?endpoint=bbb"

func (*S3) Download added in v0.12.0

func (s *S3) Download(ctx context.Context, w io.Writer) error

type S3Client

type S3Client interface {
	GetObject(ctx context.Context, input *s3.GetObjectInput, opts ...func(*s3.Options)) (*s3.GetObjectOutput, error)
}

Jump to

Keyboard shortcuts

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