Documentation ¶
Index ¶
- type Client
- type RESTClient
- func (c *RESTClient) AddProjectWebhookPolicy(ctx context.Context, projectID int, policy *modelv2.WebhookPolicy) error
- func (c *RESTClient) DeleteProjectWebhookPolicy(ctx context.Context, projectID int, policyID int64) error
- func (c *RESTClient) ListProjectWebhookPolicies(ctx context.Context, projectID int) ([]*modelv2.WebhookPolicy, error)
- func (c *RESTClient) UpdateProjectWebhookPolicy(ctx context.Context, projectID int, policy *modelv2.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) ([]*modelv2.WebhookPolicy, error) AddProjectWebhookPolicy(ctx context.Context, projectID int, policy *modelv2.WebhookPolicy) error UpdateProjectWebhookPolicy(ctx context.Context, projectID int, policy *modelv2.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 *modelv2.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) ([]*modelv2.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 *modelv2.WebhookPolicy) error
UpdateProjectWebhookPolicy updates the WebhookPolicy 'policy' in the project identified by 'projectID'.
Click to show internal directories.
Click to hide internal directories.