artifact

package
v5.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition string
const (
	AdditionBuildHistory Addition = "build_history"
	AdditionValuesYAML   Addition = "values.yaml"
	AdditionReadme       Addition = "readme.md"
	AdditionDependencies Addition = "dependencies"
)

type Client

type Client interface {
	AddArtifactLabel(ctx context.Context, projectName, repositoryName, reference string, label *model.Label) error
	CopyArtifact(ctx context.Context, from *CopyReference, projectName, repositoryName string) error
	CreateTag(ctx context.Context, projectName, repositoryName, reference string, tag *model.Tag) error
	DeleteTag(ctx context.Context, projectName, repositoryName, reference, tagName string) error
	GetArtifact(ctx context.Context, projectName, repositoryName, reference string) (*model.Artifact, error)
	DeleteArtifact(ctx context.Context, projectName, repositoryName, reference string) error
	ListArtifacts(ctx context.Context, projectName, repositoryName string) ([]*model.Artifact, error)
	ListTags(ctx context.Context, projectName, repositoryName, reference string) ([]*model.Tag, error)
	RemoveLabel(ctx context.Context, projectName, repositoryName, reference string, id int64) error
}

type CopyReference

type CopyReference struct {
	ProjectName    string
	RepositoryName string
	Tag            string
	Digest         string
}

CopyReference defines the parameters needed for an artifact copy.

type RESTClient

type RESTClient struct {
	// Options contains optional configuration when making API calls.
	Options *config.Options

	// The new client of the harbor v2 API
	V2Client *v2client.Harbor

	// AuthInfo contains the auth information that is provided on API calls.
	AuthInfo runtime.ClientAuthInfoWriter
}

RESTClient is a subclient for handling artifact related actions.

func NewClient

func NewClient(v2Client *v2client.Harbor, opts *config.Options, authInfo runtime.ClientAuthInfoWriter) *RESTClient

func (*RESTClient) AddArtifactLabel

func (c *RESTClient) AddArtifactLabel(ctx context.Context, projectName, repositoryName, reference string, label *model.Label) error

func (*RESTClient) CopyArtifact

func (c *RESTClient) CopyArtifact(ctx context.Context, from *CopyReference, projectName, repositoryName string) error

func (*RESTClient) CreateTag

func (c *RESTClient) CreateTag(ctx context.Context, projectName, repositoryName, reference string, tag *model.Tag) error

func (*RESTClient) DeleteArtifact added in v5.2.0

func (c *RESTClient) DeleteArtifact(ctx context.Context, projectName, repositoryName, reference string) error

func (*RESTClient) DeleteTag

func (c *RESTClient) DeleteTag(ctx context.Context, projectName, repositoryName, reference, tagName string) error

func (*RESTClient) GetArtifact

func (c *RESTClient) GetArtifact(ctx context.Context, projectName, repositoryName, reference string) (*model.Artifact, error)

func (*RESTClient) ListArtifacts

func (c *RESTClient) ListArtifacts(ctx context.Context, projectName, repositoryName string) ([]*model.Artifact, error)

func (*RESTClient) ListTags

func (c *RESTClient) ListTags(ctx context.Context, projectName, repositoryName, reference string) ([]*model.Tag, error)

func (*RESTClient) RemoveLabel

func (c *RESTClient) RemoveLabel(ctx context.Context, projectName, repositoryName, reference string, id int64) error

Jump to

Keyboard shortcuts

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