Documentation
¶
Index ¶
- Variables
- type Account
- type BasicEvent
- type Build
- type BuildCompleteEvent
- type BuildDefinition
- type Commit
- type Date
- type Drop
- type Event
- type GitPullRequestEvent
- type GitPushEvent
- type Log
- type Message
- type Option
- type Project
- type PullRequest
- type PushedBy
- type Queue
- type RefUpdate
- type Repository
- type Request
- type Resource
- type ResourceContainers
- type Reviewer
- type User
- type Webhook
- type WebhookOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHTTPMethod = errors.New("invalid HTTP Method") ErrParsingPayload = errors.New("error parsing payload") ErrBasicAuthVerificationFailed = errors.New("basic auth verification failed") )
parse errors
View Source
var Options = WebhookOptions{}
Options is a namespace var for configuration options
Functions ¶
This section is empty.
Types ¶
type BasicEvent ¶
type Build ¶
type Build struct {
URI string `json:"uri"`
ID int `json:"id"`
BuildNumber string `json:"buildNumber"`
URL string `json:"url"`
StartTime Date `json:"startTime"`
FinishTime Date `json:"finishTime"`
Reason string `json:"reason"`
Status string `json:"status"`
DropLocation string `json:"dropLocation"`
Drop Drop `json:"drop"`
Log Log `json:"log"`
SourceGetVersion string `json:"sourceGetVersion"`
LastChangedBy User `json:"lastChangedBy"`
RetainIndefinitely bool `json:"retainIndefinitely"`
HasDiagnostics bool `json:"hasDiagnostics"`
Definition BuildDefinition `json:"definition"`
Queue Queue `json:"queue"`
Requests []Request `json:"requests"`
}
type BuildCompleteEvent ¶
type BuildCompleteEvent struct {
ID string `json:"id"`
EventType Event `json:"eventType"`
PublisherID string `json:"publisherId"`
Scope string `json:"scope"`
Message Message `json:"message"`
DetailedMessage Message `json:"detailedMessage"`
Resource Build `json:"resource"`
ResourceVersion string `json:"resourceVersion"`
ResourceContainers interface{} `json:"resourceContainers"`
CreatedDate Date `json:"createdDate"`
}
type BuildDefinition ¶
type Event ¶
type Event string
Event defines an Azure DevOps server hook event type
const ( BuildCompleteEventType Event = "build.complete" GitPullRequestCreatedEventType Event = "git.pullrequest.created" GitPullRequestUpdatedEventType Event = "git.pullrequest.updated" GitPullRequestMergedEventType Event = "git.pullrequest.merged" GitPushEventType Event = "git.push" )
Azure DevOps Server hook types
type GitPullRequestEvent ¶
type GitPullRequestEvent struct {
ID string `json:"id"`
EventType Event `json:"eventType"`
PublisherID string `json:"publisherId"`
Scope string `json:"scope"`
Message Message `json:"message"`
DetailedMessage Message `json:"detailedMessage"`
Resource PullRequest `json:"resource"`
ResourceVersion string `json:"resourceVersion"`
ResourceContainers interface{} `json:"resourceContainers"`
CreatedDate Date `json:"createdDate"`
}
type GitPushEvent ¶
type GitPushEvent struct {
CreatedDate string `json:"createdDate"`
DetailedMessage Message `json:"detailedMessage"`
EventType string `json:"eventType"`
ID string `json:"id"`
Message Message `json:"message"`
PublisherID string `json:"publisherId"`
Resource Resource `json:"resource"`
ResourceContainers ResourceContainers `json:"resourceContainers"`
ResourceVersion string `json:"resourceVersion"`
Scope string `json:"scope"`
}
type PullRequest ¶
type PullRequest struct {
Repository Repository `json:"repository"`
PullRequestID int `json:"pullRequestId"`
Status string `json:"status"`
CreatedBy User `json:"createdBy"`
CreationDate Date `json:"creationDate"`
ClosedDate Date `json:"closedDate"`
Title string `json:"title"`
Description string `json:"description"`
SourceRefName string `json:"sourceRefName"`
TargetRefName string `json:"targetRefName"`
MergeStatus string `json:"mergeStatus"`
MergeID string `json:"mergeId"`
LastMergeSourceCommit Commit `json:"lastMergeSourceCommit"`
LastMergeTargetCommit Commit `json:"lastMergeTargetCommit"`
LastMergeCommit Commit `json:"lastMergeCommit"`
Reviewers []Reviewer `json:"reviewers"`
Commits []Commit `json:"commits"`
URL string `json:"url"`
}
type Repository ¶
type ResourceContainers ¶
type Webhook ¶
type Webhook struct {
// contains filtered or unexported fields
}
Webhook instance contains all methods needed to process events
type WebhookOptions ¶
type WebhookOptions struct{}
WebhookOptions is a namespace for configuration option methods
func (WebhookOptions) BasicAuth ¶
func (WebhookOptions) BasicAuth(username, password string) Option
BasicAuth verifies payload using basic auth
Click to show internal directories.
Click to hide internal directories.