Documentation
¶
Index ¶
- type Client
- type RESTClient
- func (c *RESTClient) CreateLabel(ctx context.Context, l *model.Label) error
- func (c *RESTClient) DeleteLabel(ctx context.Context, id int64) error
- func (c *RESTClient) GetLabelByID(ctx context.Context, id int64) (*model.Label, error)
- func (c *RESTClient) ListLabels(ctx context.Context, name string, projectID *int64) ([]*model.Label, error)
- func (c *RESTClient) UpdateLabel(ctx context.Context, id int64, l *model.Label) error
- type Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
CreateLabel(ctx context.Context, l *model.Label) error
GetLabelByID(ctx context.Context, id int64) (*model.Label, error)
ListLabels(ctx context.Context, name string, projectID *int64, scope Scope) ([]*model.Label, error)
DeleteLabel(ctx context.Context, id int64) error
UpdateLabel(ctx context.Context, id int64, l *model.Label) 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 label related actions.
func NewClient ¶
func NewClient(v2Client *v2client.Harbor, opts *config.Options, authInfo runtime.ClientAuthInfoWriter) *RESTClient
func (*RESTClient) CreateLabel ¶
func (*RESTClient) DeleteLabel ¶
func (c *RESTClient) DeleteLabel(ctx context.Context, id int64) error
func (*RESTClient) GetLabelByID ¶
func (*RESTClient) ListLabels ¶
func (*RESTClient) UpdateLabel ¶
Click to show internal directories.
Click to hide internal directories.