Documentation
¶
Overview ¶
Package oci implements OCI registry adapters.
Package oci implements OCI registry adapters.
Index ¶
- type EnvAuthProvider
- type OCIRegistryAdapter
- func (a *OCIRegistryAdapter) Pull(ctx context.Context, ref values.PluginReference) (*dto.PluginArtifactDTO, error)
- func (a *OCIRegistryAdapter) Push(ctx context.Context, artifact *dto.PluginArtifactDTO) error
- func (a *OCIRegistryAdapter) Resolve(ctx context.Context, ref values.PluginReference) (values.Digest, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvAuthProvider ¶
type EnvAuthProvider struct{}
EnvAuthProvider retrieves credentials from environment variables.
func NewEnvAuthProvider ¶
func NewEnvAuthProvider() *EnvAuthProvider
NewEnvAuthProvider creates a new environment-based auth provider.
func (*EnvAuthProvider) GetCredentials ¶
func (p *EnvAuthProvider) GetCredentials(ctx context.Context, registry string) (username, password string, err error)
GetCredentials returns username and password for a registry.
type OCIRegistryAdapter ¶
type OCIRegistryAdapter struct {
// contains filtered or unexported fields
}
OCIRegistryAdapter implements ports.PluginRegistry using oras-go.
func NewOCIRegistryAdapter ¶
func NewOCIRegistryAdapter(auth ports.AuthProvider) *OCIRegistryAdapter
NewOCIRegistryAdapter creates an OCI registry adapter.
func (*OCIRegistryAdapter) Pull ¶
func (a *OCIRegistryAdapter) Pull(ctx context.Context, ref values.PluginReference) (*dto.PluginArtifactDTO, error)
Pull downloads a plugin from OCI registry.
func (*OCIRegistryAdapter) Push ¶
func (a *OCIRegistryAdapter) Push(ctx context.Context, artifact *dto.PluginArtifactDTO) error
Push uploads a plugin to OCI registry.
func (*OCIRegistryAdapter) Resolve ¶
func (a *OCIRegistryAdapter) Resolve(ctx context.Context, ref values.PluginReference) (values.Digest, error)
Resolve resolves a reference to its digest.
Click to show internal directories.
Click to hide internal directories.