Documentation ¶
Index ¶
- type Client
- type RESTClient
- func (c *RESTClient) AddProjectWebhookPolicy(ctx context.Context, projectID int, policy *model.WebhookPolicy) error
- func (c *RESTClient) DeleteProjectWebhookPolicy(ctx context.Context, projectID int, policyID int64) error
- func (c *RESTClient) ListProjectWebhookPolicies(ctx context.Context, projectID int) ([]*model.WebhookPolicy, error)
- func (c *RESTClient) UpdateProjectWebhookPolicy(ctx context.Context, projectID int, policy *model.WebhookPolicy) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { ListProjectWebhookPolicies(ctx context.Context, projectID int) ([]*model.WebhookPolicy, error) AddProjectWebhookPolicy(ctx context.Context, projectID int, policy *model.WebhookPolicy) error UpdateProjectWebhookPolicy(ctx context.Context, projectID int, policy *model.WebhookPolicy) error DeleteProjectWebhookPolicy(ctx context.Context, projectID int, policyID 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 webhook related actions.
func NewClient ¶
func NewClient(v2Client *v2client.Harbor, opts *config.Options, authInfo runtime.ClientAuthInfoWriter) *RESTClient
func (*RESTClient) AddProjectWebhookPolicy ¶
func (c *RESTClient) AddProjectWebhookPolicy(ctx context.Context, projectID int, policy *model.WebhookPolicy) error
AddProjectWebhookPolicy adds a webhook policy to project p.
func (*RESTClient) DeleteProjectWebhookPolicy ¶
func (c *RESTClient) DeleteProjectWebhookPolicy(ctx context.Context, projectID int, policyID int64) error
DeleteProjectWebhookPolicy deletes the webhook policy identified by 'policyID' from the project identified by 'projectID'.
func (*RESTClient) ListProjectWebhookPolicies ¶
func (c *RESTClient) ListProjectWebhookPolicies(ctx context.Context, projectID int) ([]*model.WebhookPolicy, error)
ListProjectWebhookPolicies returns a list of all webhook policies in project p.
func (*RESTClient) UpdateProjectWebhookPolicy ¶
func (c *RESTClient) UpdateProjectWebhookPolicy(ctx context.Context, projectID int, policy *model.WebhookPolicy) error
UpdateProjectWebhookPolicy updates the WebhookPolicy 'policy' in the project identified by 'projectID'.
Click to show internal directories.
Click to hide internal directories.