Documentation ¶
Index ¶
- type Client
- type RESTClient
- func (c *RESTClient) DeleteRegistryByID(ctx context.Context, id int64) error
- func (c *RESTClient) GetRegistryByID(ctx context.Context, id int64) (*modelv2.Registry, error)
- func (c *RESTClient) GetRegistryByName(ctx context.Context, name string) (*modelv2.Registry, error)
- func (c *RESTClient) ListRegistries(ctx context.Context) ([]*modelv2.Registry, error)
- func (c *RESTClient) NewRegistry(ctx context.Context, reg *modelv2.Registry) error
- func (c *RESTClient) UpdateRegistry(ctx context.Context, u *modelv2.RegistryUpdate, id int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { NewRegistry(ctx context.Context, reg *modelv2.Registry) error GetRegistryByID(ctx context.Context, id int64) (*modelv2.Registry, error) GetRegistryByName(ctx context.Context, name string) (*modelv2.Registry, error) ListRegistries(ctx context.Context) ([]*modelv2.Registry, error) DeleteRegistryByID(ctx context.Context, id int64) error UpdateRegistry(ctx context.Context, u *modelv2.RegistryUpdate, id int64) 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 registry related actions.
func NewClient ¶
func NewClient(v2Client *v2client.Harbor, opts *config.Options, authInfo runtime.ClientAuthInfoWriter) *RESTClient
func (*RESTClient) DeleteRegistryByID ¶
func (c *RESTClient) DeleteRegistryByID(ctx context.Context, id int64) error
DeleteRegistryByID deletes a registry identified by ID. Returns an error when no matching registry is found or when having difficulties talking to the API.
func (*RESTClient) GetRegistryByID ¶
GetRegistryByID returns a registry identified by ID. Returns an error if it cannot find a matching registry or when having difficulties talking to the API.
func (*RESTClient) GetRegistryByName ¶
func (*RESTClient) ListRegistries ¶
func (*RESTClient) NewRegistry ¶
NewRegistry creates a new registry.
func (*RESTClient) UpdateRegistry ¶
func (c *RESTClient) UpdateRegistry(ctx context.Context, u *modelv2.RegistryUpdate, id int64) error
UpdateRegistry updates a registry identified by ID with the provided RegistryUpdate 'r'.
Click to show internal directories.
Click to hide internal directories.