webhook

package
v0.0.2-0...-8dc706e Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Receiver

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

func NewReceiver

func NewReceiver(listenAddr string, hookSecret []byte, botSecret string, production bool, dbHelper db.DBHelper) *Receiver

func (*Receiver) Shutdown

func (receiver *Receiver) Shutdown()

func (*Receiver) Start

func (receiver *Receiver) Start()

type TravisWebhookPayload

type TravisWebhookPayload struct {
	ID                int    `json:"id"`
	Number            string `json:"number"`
	Type              string `json:"type"`
	State             string `json:"state"`
	Status            int    `json:"status"`
	Result            int    `json:"result"`
	StatusMessage     string `json:"status_message"`
	ResultMessage     string `json:"result_message"`
	Duration          int    `json:"duration"`
	BuildURL          string `json:"build_url"`
	Branch            string `json:"branch"`
	PullRequest       bool   `json:"pull_request"`
	PullRequestNumber int    `json:"pull_request_number"`
	PullRequestTitle  string `json:"pull_request_title"`
	Repository        struct {
		ID        int    `json:"id"`
		Name      string `json:"name"`
		OwnerName string `json:"owner_name"`
	} `json:"repository"`
	Matrix []struct {
		ID       int    `json:"id"`
		ParentID int    `json:"parent_id"`
		Number   string `json:"number"`
		State    string `json:"state"`
		Config   struct {
			Os       string `json:"os"`
			OsxImage string `json:"osx_image"`
		} `json:"config"`
		Status       int  `json:"status"`
		Result       int  `json:"result"`
		AllowFailure bool `json:"allow_failure"`
	} `json:"matrix"`
}

Jump to

Keyboard shortcuts

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