api

package
v0.0.0-...-f1e9103 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginURL

func LoginURL(registryName string) string

LoginURL returns the FQDN for a registry.

func LoginURLWithPrefix

func LoginURLWithPrefix(loginURL string) string

LoginURLWithPrefix return the hostname of a registry.

Types

type AcrCLIClient

type AcrCLIClient struct {
	AutorestClient acrapi.BaseClient
	// contains filtered or unexported fields
}

The AcrCLIClient is the struct that will be in charge of doing the http requests to the registry. it implements the AcrCLIClientInterface.

func GetAcrCLIClientWithAuth

func GetAcrCLIClientWithAuth(loginURL string, username string, password string, configs []string) (*AcrCLIClient, error)

GetAcrCLIClientWithAuth obtains a client that has authentication for making ACR http requests

func (*AcrCLIClient) DeleteAcrTag

func (c *AcrCLIClient) DeleteAcrTag(ctx context.Context, repoName string, reference string) (*autorest.Response, error)

DeleteAcrTag deletes the tag by reference.

func (*AcrCLIClient) DeleteManifest

func (c *AcrCLIClient) DeleteManifest(ctx context.Context, repoName string, reference string) (*autorest.Response, error)

DeleteManifest deletes a manifest using the digest as a reference.

func (*AcrCLIClient) GetAcrManifests

func (c *AcrCLIClient) GetAcrManifests(ctx context.Context, repoName string, orderBy string, last string) (*acrapi.Manifests, error)

GetAcrManifests list all the manifest in a repository with their attributes.

func (*AcrCLIClient) GetAcrTags

func (c *AcrCLIClient) GetAcrTags(ctx context.Context, repoName string, orderBy string, last string) (*acrapi.RepositoryTagsType, error)

GetAcrTags list the tags of a repository with their attributes.

func (*AcrCLIClient) GetManifest

func (c *AcrCLIClient) GetManifest(ctx context.Context, repoName string, reference string) ([]byte, error)

GetManifest fetches a manifest (could be a Manifest List or a v2 manifest) and returns it as a byte array. This is used when a manifest list is wanted, first the bytes are obtained and then unmarshalled into a new struct.

type AcrCLIClientInterface

type AcrCLIClientInterface interface {
	GetAcrTags(ctx context.Context, repoName string, orderBy string, last string) (*acrapi.RepositoryTagsType, error)
	DeleteAcrTag(ctx context.Context, repoName string, reference string) (*autorest.Response, error)
	GetAcrManifests(ctx context.Context, repoName string, orderBy string, last string) (*acrapi.Manifests, error)
	DeleteManifest(ctx context.Context, repoName string, reference string) (*autorest.Response, error)
	GetManifest(ctx context.Context, repoName string, reference string) ([]byte, error)
}

AcrCLIClientInterface defines the required methods that the acr-cli will need to use.

Jump to

Keyboard shortcuts

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