bitbucket

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) CommitURL

func (s *Bitbucket) CommitURL(w *repository.Webhook) string

func (*Bitbucket) CompareURL

func (s *Bitbucket) CompareURL(w *repository.Webhook) string

func (*Bitbucket) IconURL

func (s *Bitbucket) IconURL() string

func (*Bitbucket) IsPing

func (s *Bitbucket) IsPing(r *http.Request, body []byte) bool

func (*Bitbucket) Name

func (s *Bitbucket) Name() string

func (*Bitbucket) PusherURL

func (s *Bitbucket) PusherURL(w *repository.Webhook) string

func (*Bitbucket) RefURL

func (s *Bitbucket) RefURL(w *repository.Webhook) string

func (*Bitbucket) RepositoryURL

func (s *Bitbucket) RepositoryURL(w *repository.Webhook) string

func (*Bitbucket) RequestID

func (bb *Bitbucket) RequestID(r *http.Request) string

func (*Bitbucket) Unmarshal

func (bb *Bitbucket) Unmarshal(r *http.Request, payload []byte) (*repository.Webhook, error)

func (*Bitbucket) Verify

func (bb *Bitbucket) Verify(r *http.Request, body []byte) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL