pubsubtypes

package
v0.0.0-...-16694d9 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: BSD-3-Clause Imports: 1 Imported by: 0

README

Go Reference

golang.org/x/build/cmd/pubsubhelper/pubsubtypes

Package pubsubtypes contains types published by pubsubhelper.

Documentation

Overview

Package pubsubtypes contains types published by pubsubhelper.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// Time is the time the event was received, or the time of the
	// long poll timeout. This is what clients should send as the
	// "after" URL parameter for the next event.
	Time types.Time3339

	// LongPollTimeout indicates that no event occurred and the
	// client should retry with ?after=<Time>.
	LongPollTimeout bool `json:",omitempty"`

	// Gerrit is non-nil for Gerrit events.
	Gerrit *GerritEvent `json:",omitempty"`

	// Github is non-nil for GitHub events.
	GitHub *GitHubEvent `json:",omitempty"`
}

Event is the type of event that comes out of pubsubhelper.

type GerritEvent

type GerritEvent struct {
	// URL is of the form "https://go-review.googlesource.com/39551".
	URL string

	// Project is the Gerrit project on the server, such as "go",
	// "net", "crypto".
	Project string

	// CommitHash is in the Gerrit email headers, so it's included here.
	// I don't dare specify what it means. It seems to be the commit hash
	// that's new or being commented upon. Notably, it doesn't ever appear
	// to be the meta hash for comments.
	CommitHash string

	// ChangeNumber is the number of the change (e.g. 39551).
	ChangeNumber int `json:",omitempty"`
}

GerritEvent is a type of Event.

type GitHubEvent

type GitHubEvent struct {
	Action            string
	RepoOwner         string // "golang"
	Repo              string // "go"
	IssueNumber       int    `json:",omitempty"`
	PullRequestNumber int    `json:",omitempty"`
}

Jump to

Keyboard shortcuts

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