packagestore

package
v0.0.0-...-c7f3a94 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataAlias       = "x-gomod-alias"
	MetadataCommitHash  = "x-gomod-commit-hash"
	MetadataCommitTime  = "x-gomod-commit-time"
	MetadataContentType = "Content-Type"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS interface {
	Put(ctx context.Context, path string, body io.Reader, metadata map[string]string) error
	GetBytes(ctx context.Context, path string) ([]byte, error)
	GetReader(ctx context.Context, path string) (io.ReadCloser, *anyfs.FileInfo, error)

	Join(elem ...string) string
}

type PackageStore

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

func NewPackageStore

func NewPackageStore(db sqrlx.Transactor, fs FS) (*PackageStore, error)

func (*PackageStore) GetJ5Image

func (s *PackageStore) GetJ5Image(ctx context.Context, orgName, imageName, version string) (*source_j5pb.SourceImage, error)

func (*PackageStore) GoModInfo

func (src *PackageStore) GoModInfo(ctx context.Context, packageName, version string) (*gomodproxy.Info, error)

func (*PackageStore) GoModLatest

func (src *PackageStore) GoModLatest(ctx context.Context, packageName string) (*gomodproxy.Info, error)

func (*PackageStore) GoModList

func (src *PackageStore) GoModList(ctx context.Context, packageName string) ([]string, error)

func (*PackageStore) GoModMod

func (src *PackageStore) GoModMod(ctx context.Context, packageName, version string) ([]byte, error)

func (*PackageStore) GoModZip

func (src *PackageStore) GoModZip(ctx context.Context, packageName, version string) (io.ReadCloser, error)

func (*PackageStore) UploadGoModule

func (s *PackageStore) UploadGoModule(ctx context.Context, commitInfo *source_j5pb.CommitInfo, root fs.FS) error

func (*PackageStore) UploadJ5Image

func (s *PackageStore) UploadJ5Image(ctx context.Context, commitInfo *source_j5pb.CommitInfo, img *source_j5pb.SourceImage, registry *config_j5pb.RegistryConfig) error

Jump to

Keyboard shortcuts

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