repository

package
v5.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetRepository(ctx context.Context, projectName, repositoryName string) (*model.Repository, error)
	UpdateRepository(ctx context.Context, projectName, repositoryName string, update *model.Repository) error
	ListAllRepositories(ctx context.Context) ([]*model.Repository, error)
	ListRepositories(ctx context.Context, projectName string) ([]*model.Repository, error)
	DeleteRepository(ctx context.Context, projectName, repositoryName string) error
}

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 repository related actions.

func NewClient

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

func (*RESTClient) DeleteRepository

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

func (*RESTClient) GetRepository

func (c *RESTClient) GetRepository(ctx context.Context, projectName, repositoryName string) (*model.Repository, error)

func (*RESTClient) ListAllRepositories

func (c *RESTClient) ListAllRepositories(ctx context.Context) ([]*model.Repository, error)

func (*RESTClient) ListRepositories

func (c *RESTClient) ListRepositories(ctx context.Context, projectName string) ([]*model.Repository, error)

func (*RESTClient) UpdateRepository

func (c *RESTClient) UpdateRepository(ctx context.Context, projectName, repositoryName string, update *model.Repository) error

Jump to

Keyboard shortcuts

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