bitbucket

package
v0.0.0-...-c208585 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MPL-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitWebhook

func InitWebhook(providername string, secretList *string, envname string) func()

InitWebhook prepares the webhook router. It should be called after arguments are parsed and ENVs are set.InitWebhook

Types

type Actor

type Actor struct {
	DisplayName string `json:"display_name"`
	UUID        string `json:"uuid"`
	Nickname    string `json:"nickname"`
	Type        string `json:"type"`
	AccountID   string `json:"account_id"`
}

Actor represents the user / account taking action

type Push

type Push struct {
	Changes []struct {
		Forced bool `json:"forced"`
		Old    struct {
			Name   string `json:"name"`
			Type   string `json:"type"`
			Target struct {
				Hash   string `json:"hash"`
				Author struct {
					User struct {
						DisplayName string `json:"display_name"`
						UUID        string `json:"uuid"`
						Nickname    string `json:"nickname"`
						AccountID   string `json:"account_id"`
					} `json:"user"`
				} `json:"author"`
				Date    time.Time `json:"date"`
				Message string    `json:"message"`
				Type    string    `json:"type"`
			} `json:"target"`
		} `json:"old"`
		Links struct {
			HTML struct {
				Href string `json:"href"`
			} `json:"html"`
		} `json:"links"`
		Created bool `json:"created"`
		Commits []struct {
			Rendered struct {
			} `json:"rendered"`
			Hash  string `json:"hash"`
			Links struct {
				Self struct {
					Href string `json:"href"`
				} `json:"self"`
				Comments struct {
					Href string `json:"href"`
				} `json:"comments"`
				Patch struct {
					Href string `json:"href"`
				} `json:"patch"`
				HTML struct {
					Href string `json:"href"`
				} `json:"html"`
				Diff struct {
					Href string `json:"href"`
				} `json:"diff"`
				Approve struct {
					Href string `json:"href"`
				} `json:"approve"`
				Statuses struct {
					Href string `json:"href"`
				} `json:"statuses"`
			} `json:"links"`
			Author struct {
				Raw  string `json:"raw"`
				Type string `json:"type"`
				User struct {
					DisplayName string `json:"display_name"`
					UUID        string `json:"uuid"`
					Links       struct {
						Self struct {
							Href string `json:"href"`
						} `json:"self"`
						HTML struct {
							Href string `json:"href"`
						} `json:"html"`
						Avatar struct {
							Href string `json:"href"`
						} `json:"avatar"`
					} `json:"links"`
					Nickname  string `json:"nickname"`
					Type      string `json:"type"`
					AccountID string `json:"account_id"`
				} `json:"user"`
			} `json:"author"`
			Summary struct {
				Raw    string `json:"raw"`
				Markup string `json:"markup"`
				HTML   string `json:"html"`
				Type   string `json:"type"`
			} `json:"summary"`
			Parents []struct {
				Hash  string `json:"hash"`
				Type  string `json:"type"`
				Links struct {
					Self struct {
						Href string `json:"href"`
					} `json:"self"`
					HTML struct {
						Href string `json:"href"`
					} `json:"html"`
				} `json:"links"`
			} `json:"parents"`
			Date       time.Time `json:"date"`
			Message    string    `json:"message"`
			Type       string    `json:"type"`
			Properties struct {
			} `json:"properties"`
		} `json:"commits"`
		Truncated bool `json:"truncated"`
		Closed    bool `json:"closed"`
		New       struct {
			Name  string `json:"name"`
			Links struct {
				Commits struct {
					Href string `json:"href"`
				} `json:"commits"`
				Self struct {
					Href string `json:"href"`
				} `json:"self"`
				HTML struct {
					Href string `json:"href"`
				} `json:"html"`
			} `json:"links"`
			DefaultMergeStrategy string   `json:"default_merge_strategy"`
			MergeStrategies      []string `json:"merge_strategies"`
			Type                 string   `json:"type"`
			Target               struct {
				Rendered struct {
				} `json:"rendered"`
				Hash  string `json:"hash"`
				Links struct {
					Self struct {
						Href string `json:"href"`
					} `json:"self"`
					HTML struct {
						Href string `json:"href"`
					} `json:"html"`
				} `json:"links"`
				Author struct {
					Raw  string `json:"raw"`
					Type string `json:"type"`
					User struct {
						DisplayName string `json:"display_name"`
						UUID        string `json:"uuid"`
						Links       struct {
							Self struct {
								Href string `json:"href"`
							} `json:"self"`
							HTML struct {
								Href string `json:"href"`
							} `json:"html"`
							Avatar struct {
								Href string `json:"href"`
							} `json:"avatar"`
						} `json:"links"`
						Nickname  string `json:"nickname"`
						Type      string `json:"type"`
						AccountID string `json:"account_id"`
					} `json:"user"`
				} `json:"author"`
				Summary struct {
					Raw    string `json:"raw"`
					Markup string `json:"markup"`
					HTML   string `json:"html"`
					Type   string `json:"type"`
				} `json:"summary"`
				Parents []struct {
					Hash  string `json:"hash"`
					Type  string `json:"type"`
					Links struct {
						Self struct {
							Href string `json:"href"`
						} `json:"self"`
						HTML struct {
							Href string `json:"href"`
						} `json:"html"`
					} `json:"links"`
				} `json:"parents"`
				Date       time.Time `json:"date"`
				Message    string    `json:"message"`
				Type       string    `json:"type"`
				Properties struct {
				} `json:"properties"`
			} `json:"target"`
		} `json:"new"`
	} `json:"changes"`
}

Push is the bitbucket webhook

type Repository

type Repository struct {
	Name    string      `json:"name"`
	Scm     string      `json:"scm"`
	Website interface{} `json:"website"`
	UUID    string      `json:"uuid"`
	Links   struct {
		Self struct {
			Href string `json:"href"`
		} `json:"self"`
		HTML struct {
			Href string `json:"href"`
		} `json:"html"`
		Avatar struct {
			Href string `json:"href"`
		} `json:"avatar"`
	} `json:"links"`
	FullName string `json:"full_name"`
	Owner    struct {
		DisplayName string `json:"display_name"`
		UUID        string `json:"uuid"`
		Links       struct {
			Self struct {
				Href string `json:"href"`
			} `json:"self"`
			HTML struct {
				Href string `json:"href"`
			} `json:"html"`
			Avatar struct {
				Href string `json:"href"`
			} `json:"avatar"`
		} `json:"links"`
		Nickname  string `json:"nickname"`
		Type      string `json:"type"`
		AccountID string `json:"account_id"`
	} `json:"owner"`
	Workspace struct {
		Slug string `json:"slug"`
		Type string `json:"type"`
		Name string `json:"name"`
		UUID string `json:"uuid"`
	} `json:"workspace"`
	Type      string `json:"type"`
	IsPrivate bool   `json:"is_private"`
}

Repository represents repo info

type Webhook

type Webhook struct {
	Push       Push       `json:"push"`
	Actor      Actor      `json:"actor"`
	Repository Repository `json:"repository"`
}

Webhook is a smaller version of

Jump to

Keyboard shortcuts

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