Documentation ¶
Index ¶
- type Client
- type RESTClient
- func (c *RESTClient) GetQuotaByProjectID(ctx context.Context, projectID int64) (*modelv2.Quota, error)
- func (c *RESTClient) ListQuotas(ctx context.Context, referenceType, referenceID *string) ([]*modelv2.Quota, error)
- func (c *RESTClient) UpdateStorageQuotaByProjectID(ctx context.Context, projectID int64, storageLimit int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 project related actions.
func NewClient ¶
func NewClient(v2Client *v2client.Harbor, opts *config.Options, authInfo runtime.ClientAuthInfoWriter) *RESTClient
func (*RESTClient) GetQuotaByProjectID ¶
func (c *RESTClient) GetQuotaByProjectID(ctx context.Context, projectID int64) (*modelv2.Quota, error)
GetQuotaByProjectID returns a quota object containing all configured quotas for a project.
func (*RESTClient) ListQuotas ¶
func (*RESTClient) UpdateStorageQuotaByProjectID ¶
func (c *RESTClient) UpdateStorageQuotaByProjectID(ctx context.Context, projectID int64, storageLimit int64) error
UpdateStorageQuotaByProjectID updates the storageLimit quota of a project. A storageLimit value smaller than '0' will implicitly be set to '-1', equalling the 'unlimited' setting.
Click to show internal directories.
Click to hide internal directories.