nixery

package
v0.0.0-...-53bcd79 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitSource

type GitSource struct {
	Repository string
}

func (*GitSource) CacheKey

func (g *GitSource) CacheKey(pkgs []string, tag string) string

func (*GitSource) Render

func (g *GitSource) Render(tag string) (string, string)

type S3

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

func NewS3Storage

func NewS3Storage(endpoint, region, accessKey, secretAccessKey, bucket, caCertFile string) *S3

func (*S3) Fetch

func (s *S3) Fetch(ctx context.Context, path string) (io.ReadCloser, error)

Fetch retrieves data from the storage backend.

func (*S3) Move

func (s *S3) Move(ctx context.Context, old, new string) error

Move renames a path inside the storage backend. This is used for staging uploads while calculating their hashes.

func (*S3) Name

func (s *S3) Name() string

func (*S3) Persist

func (s *S3) Persist(ctx context.Context, path, _ string, f nstorage.Persister) (string, int64, error)

Persist provides a user-supplied function with a writer that stores data in the storage backend.

It needs to return the SHA256 hash of the data written as well as the total number of bytes, as those are required for the image manifest.

func (*S3) Serve

func (s *S3) Serve(digest string, req *http.Request, w http.ResponseWriter) error

Serve provides a handler function to serve HTTP requests for objects in the storage backend.

Jump to

Keyboard shortcuts

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