v2

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	ID   int64  `json:"id"`
	Tags []Tag  `json:"tags"`
	Type string `json:"type,omitempty"`
}

type Client

type Client struct {
	Name, Namespace string

	*cmhttp.HttpClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c client.Client, namespacedName types.NamespacedName, scheme *runtime.Scheme, httpClient *cmhttp.HttpClient) *Client

NewClient is api client of harbor v2 registry

func (*Client) DeleteManifest added in v0.3.2

func (c *Client) DeleteManifest(image string, manifest *image.ImageManifest) error

DeleteManifest deletes manifest in the registry

func (*Client) ExistBlob added in v0.3.2

func (c *Client) ExistBlob(repository, digest string) (bool, error)

ExistBlob checks if blob exists

func (*Client) GetManifest added in v0.3.2

func (c *Client) GetManifest(image string) (*image.ImageManifest, error)

GetManifest gets manifests of image in the registry

func (*Client) ListRepositories

func (c *Client) ListRepositories() *image.APIRepositories

ListRepositories get repository list from registry server

func (*Client) ListTags

func (c *Client) ListTags(repository string) *image.APIRepository

ListTags get tag list of repository from registry server

func (*Client) PullBlob added in v0.3.2

func (c *Client) PullBlob(repository, digest string) (string, int64, error)

PullBlob pulls and stores blob

func (*Client) PushBlob added in v0.3.2

func (c *Client) PushBlob(repository, digest, blobPath string, size int64) error

PushBlob pushes and stores blob

func (*Client) PutManifest added in v0.3.2

func (c *Client) PutManifest(image string, manifest *image.ImageManifest) error

PutManifest updates manifest in the registry

func (*Client) SetAuth

func (c *Client) SetAuth(req *http.Request)

SetAuth sets Authorization header

func (*Client) Synchronize

func (c *Client) Synchronize() error

Synchronize synchronizes repository list between tmax.io.Repository resource and Registry server

type Project

type Project struct {
	ID       int64                  `json:"project_id"`
	Name     string                 `json:"name"`
	Metadata map[string]interface{} `json:"metadata"`
}

Project Metadata:

public: "true" / "false"

type Repository

type Repository struct {
	Name string `json:"name"`
}

type Tag

type Tag struct {
	ID         int64  `json:"id"`
	ArtifactID int64  `json:"artifact_id"`
	Name       string `json:"name"`
}

Jump to

Keyboard shortcuts

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