Documentation
¶
Index ¶
- Constants
- type Bitbucket
- func (s *Bitbucket) CommitURL(w *repository.Webhook) string
- func (s *Bitbucket) CompareURL(w *repository.Webhook) string
- func (s *Bitbucket) IconURL() string
- func (s *Bitbucket) IsPing(r *http.Request, body []byte) bool
- func (s *Bitbucket) Name() string
- func (s *Bitbucket) PusherURL(w *repository.Webhook) string
- func (s *Bitbucket) RefURL(w *repository.Webhook) string
- func (s *Bitbucket) RepositoryURL(w *repository.Webhook) string
- func (bb *Bitbucket) RequestID(r *http.Request) string
- func (bb *Bitbucket) Unmarshal(r *http.Request, payload []byte) (*repository.Webhook, error)
- func (bb *Bitbucket) Verify(r *http.Request, body []byte) error
- func (s *Bitbucket) WebhookProvider() repository.WebhookProvider
- type BitbucketWebhook
Constants ¶
View Source
const (
KeySlackBitbucketIconURL = "notification.slack.bitbucket_icon_url"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitbucket ¶
type Bitbucket struct {
}
func (*Bitbucket) CompareURL ¶
func (s *Bitbucket) CompareURL(w *repository.Webhook) string
func (*Bitbucket) RepositoryURL ¶
func (s *Bitbucket) RepositoryURL(w *repository.Webhook) string
func (*Bitbucket) WebhookProvider ¶
func (s *Bitbucket) WebhookProvider() repository.WebhookProvider
type BitbucketWebhook ¶
type BitbucketWebhook struct {
Actor struct {
Username string `json:"username"`
} `json:"actor"`
Repository struct {
Name string `json:"name"`
Owner struct {
Type string `json:type`
Username string `json:username`
} `json:"owner"`
} `json:"repository"`
Push map[string][]struct {
New struct {
Name string `json:"name"`
Type string `json:"type"`
Target struct {
Hash string `json:"hash"`
} `json:"target"`
} `json:"new"`
Old struct {
Target struct {
Hash string `json:"hash"`
} `json:"target"`
} `json:"old"`
Created bool `json:"created"`
Truncated bool `json:"truncated"`
} `json:"push"`
}
* This structure is for BitBucket webhook. * https://confluence.atlassian.com/bitbucket/manage-webhooks-735643732.html
func (*BitbucketWebhook) Webhook ¶
func (body *BitbucketWebhook) Webhook() (*repository.Webhook, error)
* Returns a repository.Webhook converting itself.
Click to show internal directories.
Click to hide internal directories.