Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// Login authenticates against the given registry endpoint using username and password.
Login(ctx context.Context, registry, user, pass string) error
// Push uploads the local file at path to the specified reference
// (e.g., registry/repo:tag) in the remote registry.
Push(ctx context.Context, reference, path string) error
// Pull downloads the artifact identified by reference from the registry
// and returns its raw data bytes.
Pull(ctx context.Context, reference string) ([]byte, error)
}
Client defines the interface for interacting with remote artifact registries over HTTP or OCI protocols. It supports login, push, and pull operations.
func NewClient ¶
NewClient constructs a Client implementation based on the reference type. HTTP(S) references use an HTTP client; OCI references use an OCI client. Default fallback is OCI client for any non-HTTP references.
func NewOCIClient ¶
NewOCIClient returns a new OCIClient initialized with the given configuration.
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient provides basic HTTP(S) access for fetching remote Makefile artifacts. It implements the Client interface with no-op Login and Push methods.
func NewHTTPClient ¶
func NewHTTPClient() *HTTPClient
NewHTTPClient returns a new HTTPClient using the default HTTP client.
func (*HTTPClient) Login ¶
func (h *HTTPClient) Login(ctx context.Context, registry, user, pass string) error
Login is a no-op for HTTPClient since HTTP references do not require authentication.
type OCIClient ¶
type OCIClient struct {
// contains filtered or unexported fields
}
OCIClient provides an implementation of Client for OCI registries. It uses oras and go-containerregistry to authenticate, push, and pull artifacts.
func (*OCIClient) Login ¶
Login authenticates to the specified OCI registry using the provided credentials. Successful login is persisted in the configuration file for future operations.