Documentation
¶
Index ¶
- func Validate(secret, headerToken string) error
- type Client
- func (c *Client) DeleteWebhook(integrationConfig *cicdv1.IntegrationConfig, id int, client client.Client) error
- func (c *Client) ListWebhook(integrationConfig *cicdv1.IntegrationConfig, client client.Client) ([]git.WebhookEntry, error)
- func (c *Client) ParseWebhook(integrationConfig *cicdv1.IntegrationConfig, header http.Header, ...) (git.Webhook, error)
- func (c *Client) RegisterWebhook(integrationConfig *cicdv1.IntegrationConfig, Url string, client client.Client) error
- func (c *Client) SetCommitStatus(integrationJob *cicdv1.IntegrationJob, ...) error
- type CommitStatusBody
- type LastCommit
- type MergeRequestWebhook
- type ObjectAttribute
- type Project
- type PushWebhook
- type RegistrationWebhookBody
- type Sender
- type WebhookEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
}
func (*Client) DeleteWebhook ¶
func (*Client) ListWebhook ¶
func (c *Client) ListWebhook(integrationConfig *cicdv1.IntegrationConfig, client client.Client) ([]git.WebhookEntry, error)
func (*Client) ParseWebhook ¶
func (*Client) RegisterWebhook ¶
func (*Client) SetCommitStatus ¶
func (c *Client) SetCommitStatus(integrationJob *cicdv1.IntegrationJob, integrationConfig *cicdv1.IntegrationConfig, context string, state git.CommitStatusState, description, targetUrl string, client client.Client) error
type CommitStatusBody ¶
type LastCommit ¶
type LastCommit struct {
Sha string `json:"id"`
}
type MergeRequestWebhook ¶
type MergeRequestWebhook struct {
Kind string `json:"kind"`
Sender Sender `json:"user"`
ObjectAttribute ObjectAttribute `json:"object_attributes"`
Project Project `json:"project"`
}
Webhook is a gitlab-specific webhook body Should contain json tag for each field, to be unmarshalled properly
type ObjectAttribute ¶
type PushWebhook ¶
type PushWebhook struct {
Kind string `json:"object_kind"`
Ref string `json:"ref"`
Project Project `json:"project"`
User string `json:"user_name"`
Sha string `json:"after"`
}
Structure for push webhook event
type RegistrationWebhookBody ¶
type RegistrationWebhookBody struct {
EnableSSLVerification bool `json:"enable_ssl_verification"`
ConfidentialIssueEvents bool `json:"confidential_issues_events"`
ConfidentialNoteEvents bool `json:"confidential_note_events"`
DeploymentEvents bool `json:"deployment_events"`
ID string `json:"id"`
IssueEvents bool `json:"issues_events"`
JobEvents bool `json:"job_events"`
MergeRequestEvents bool `json:"merge_requests_events"`
NoteEvents bool `json:"note_events"`
PipeLineEvents bool `json:"pipeline_events"`
PushEvents bool `json:"push_events"`
TagPushEvents bool `json:"tag_push_events"`
WikiPageEvents bool `json:"wiki_page_events"`
URL string `json:"url"`
Token string `json:"token"`
}
type WebhookEntry ¶
Click to show internal directories.
Click to hide internal directories.