bitbucketv2

package
v0.0.0-...-1e4fe4b Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ProviderID ...
	ProviderID = "bitbucket-v2"
)

Variables

This section is empty.

Functions

func NewDefaultHookProvider

func NewDefaultHookProvider() hookCommon.Provider

NewDefaultHookProvider ...

func NewHookProvider

func NewHookProvider(timeProvider hookCommon.TimeProvider) hookCommon.Provider

NewHookProvider ...

Types

type BranchInfoModel

type BranchInfoModel struct {
	Name string `json:"name"`
}

BranchInfoModel ...

type ChangeInfoModel

type ChangeInfoModel struct {
	ChangeNewItem ChangeItemModel `json:"new"`
	Commits       []CommitModel   `json:"commits"`
}

ChangeInfoModel ...

type ChangeItemModel

type ChangeItemModel struct {
	Type   string                `json:"type"`
	Name   string                `json:"name"`
	Target ChangeItemTargetModel `json:"target"`
}

ChangeItemModel ...

type ChangeItemTargetModel

type ChangeItemTargetModel struct {
	Type          string `json:"type"`
	CommitHash    string `json:"hash"`
	CommitMessage string `json:"message"`
}

ChangeItemTargetModel ...

type CommentContentModel

type CommentContentModel struct {
	Raw string `json:"raw"`
}

CommentContentModel ...

type CommentModel

type CommentModel struct {
	ID      int                 `json:"id"`
	Content CommentContentModel `json:"content"`
}

CommentModel ...

type CommitInfoModel

type CommitInfoModel struct {
	CommitHash string `json:"hash"`
}

CommitInfoModel ...

type CommitModel

type CommitModel struct {
	Hash    string `json:"hash"`
	Message string `json:"message"`
}

CommitModel ...

type HookProvider

type HookProvider struct {
	// contains filtered or unexported fields
}

HookProvider ...

func (HookProvider) GatherMetrics

func (hp HookProvider) GatherMetrics(r *http.Request, appSlug string) ([]common.Metrics, error)

GatherMetrics ...

func (HookProvider) TransformRequest

func (hp HookProvider) TransformRequest(r *http.Request) hookCommon.TransformResultModel

TransformRequest ...

type PullRequestBranchInfoModel

type PullRequestBranchInfoModel struct {
	BranchInfo     BranchInfoModel     `json:"branch"`
	CommitInfo     CommitInfoModel     `json:"commit"`
	RepositoryInfo RepositoryInfoModel `json:"repository"`
}

PullRequestBranchInfoModel ...

type PullRequestEventModel

type PullRequestEventModel struct {
	PullRequestInfo PullRequestInfoModel `json:"pullrequest"`
	RepositoryInfo  RepositoryInfoModel  `json:"repository"`
	CommentInfo     *CommentModel        `json:"comment"`
}

PullRequestEventModel ...

type PullRequestInfoModel

type PullRequestInfoModel struct {
	ID              int                        `json:"id"`
	Type            string                     `json:"type"`
	Title           string                     `json:"title"`
	Description     string                     `json:"description"`
	State           string                     `json:"state"`
	Author          UserInfoModel              `json:"author"`
	SourceInfo      PullRequestBranchInfoModel `json:"source"`
	DestinationInfo PullRequestBranchInfoModel `json:"destination"`
}

PullRequestInfoModel ...

type PushEventModel

type PushEventModel struct {
	ActorInfo      UserInfoModel       `json:"actor"`
	PushInfo       PushInfoModel       `json:"push"`
	RepositoryInfo RepositoryInfoModel `json:"repository"`
}

PushEventModel ...

type PushInfoModel

type PushInfoModel struct {
	Changes []ChangeInfoModel `json:"changes"`
}

PushInfoModel ...

type RepositoryInfoModel

type RepositoryInfoModel struct {
	FullName  string `json:"full_name"`
	IsPrivate bool   `json:"is_private"`
	// Scm - The type repository: Git (git) or Mercurial (hg).
	Scm   string        `json:"scm"`
	Owner UserInfoModel `json:"owner"`
}

RepositoryInfoModel ...

type UserInfoModel

type UserInfoModel struct {
	Username string `json:"username"`
	Nickname string `json:"nickname"`
}

UserInfoModel ...

Jump to

Keyboard shortcuts

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