bitbucketserver

package
v0.0.0-...-3d437fe Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ProviderID ...
	ProviderID = "bitbucket-server"
)
View Source
const TimestampFormat = "2006-01-02T15:04:05-0700"

TimestampFormat RFC3339 but timezone without colon

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 AuthorModel

type AuthorModel struct {
	User UserInfoModel `json:"user"`
}

AuthorModel ...

type ChangeItemModel

type ChangeItemModel struct {
	RefID    string   `json:"refId"`
	FromHash string   `json:"fromHash"`
	ToHash   string   `json:"toHash"`
	Type     string   `json:"type"`
	Ref      RefModel `json:"ref"`
}

ChangeItemModel ...

type CommentModel

type CommentModel struct {
	ID   int    `json:"id"`
	Text string `json:"text"`
}

CommentModel ...

type CommitModel

type CommitModel struct {
	ID      string `json:"id"`
	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 ProjectInfoModel

type ProjectInfoModel struct {
	Key    string `json:"key"`
	ID     int    `json:"id"`
	Name   string `json:"name"`
	Public bool   `json:"public"`
	Type   string `json:"type"`
}

ProjectInfoModel ...

type PullRequestEventModel

type PullRequestEventModel struct {
	EventKey    string               `json:"eventKey"`
	Date        string               `json:"date"`
	Actor       UserInfoModel        `json:"actor"`
	PullRequest PullRequestInfoModel `json:"pullRequest"`
	CommentInfo *CommentModel        `json:"comment"`
}

PullRequestEventModel ...

type PullRequestInfoModel

type PullRequestInfoModel struct {
	ID          int                 `json:"id"`
	Version     int                 `json:"version"`
	Title       string              `json:"title"`
	State       string              `json:"state"`
	Open        bool                `json:"open"`
	Closed      bool                `json:"closed"`
	CreatedDate int64               `json:"createdDate"`
	UpdatedDate int64               `json:"updatedDate"`
	Author      AuthorModel         `json:"author"`
	FromRef     PullRequestRefModel `json:"fromRef"`
	ToRef       PullRequestRefModel `json:"toRef"`
}

PullRequestInfoModel ...

type PullRequestRefModel

type PullRequestRefModel struct {
	ID           string              `json:"id"`
	DisplayID    string              `json:"displayId"`
	LatestCommit string              `json:"latestCommit"`
	Repository   RepositoryInfoModel `json:"repository"`
}

PullRequestRefModel ...

type PushEventModel

type PushEventModel struct {
	EventKey       string              `json:"eventKey"`
	Date           string              `json:"date"`
	Actor          UserInfoModel       `json:"actor"`
	RepositoryInfo RepositoryInfoModel `json:"repository"`
	Changes        []ChangeItemModel   `json:"changes"`
	Commits        []CommitModel       `json:"commits"`
}

PushEventModel ...

type RefModel

type RefModel struct {
	ID        string `json:"id"`
	DisplayID string `json:"displayId"`
	Type      string `json:"type"`
}

RefModel ...

type RepositoryInfoModel

type RepositoryInfoModel struct {
	Slug    string           `json:"slug"`
	ID      int              `json:"id"`
	Name    string           `json:"name"`
	Public  bool             `json:"public"`
	Scm     string           `json:"scmId"`
	Project ProjectInfoModel `json:"project"`
}

RepositoryInfoModel ...

type UserInfoModel

type UserInfoModel struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
}

UserInfoModel ...

Jump to

Keyboard shortcuts

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