client

package
v0.0.0-...-94e4715 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CatalogResult

type CatalogResult struct {
	Repositories []string          `json:"repositories"`
	Details      []*ImageTagResult `json:"details"`
}

type Client

type Client interface {
	Ping(ctx context.Context) error

	ListImages(ctx context.Context, input *api.ContainerRegistryListImagesInput) (jsonutils.JSONObject, error)

	ListImageTags(ctx context.Context, image string) (jsonutils.JSONObject, error)

	AnalysisImageTarMetadata(tarPath string) (*ImageMetadata, error)

	PushImage(ctx context.Context, input *ImageMetadata, tarPath string) error
}

func NewClient

func NewClient(regUrl string, authConf DockerAuthConfig) (Client, error)

type DockerAuthConfig

type DockerAuthConfig struct {
	Username string
	Password string
	// IdentityToken can be used as a refresh_token in place of username and
	// password to obtain the bearer/access token in oauth2 flow. If identity
	// token is set, password should not be set.
	// Ref: https://docs.docker.com/registry/spec/auth/oauth/
	IdentityToken string
}

DockerAuthConfig contains authorization information for connecting to a registry. the value of Username and Password can be empty for accessing the registry anonymously

type ImageMetadata

type ImageMetadata struct {
	Ref ref.Ref
}

type ImageTagResult

type ImageTagResult struct {
	Name  string   `json:"name"`
	Tags  []string `json:"tags"`
	Image string   `json:"image"`
}

Jump to

Keyboard shortcuts

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