github

package
v0.0.0-...-20c3865 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2016 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	EvtCommitComment            = "commit_comment"
	EvtCreate                   = "create"
	EvtDelete                   = "delete"
	EvtDeployment               = "deployment"
	EvtDeploymentStatus         = "deployment_status"
	EvtFollow                   = "follow"
	EvtFork                     = "fork"
	EvtForkApply                = "fork_apply"
	EvtGollum                   = "gollum"
	EvtIssueComment             = "issue_comment"
	EvtIssues                   = "issues"
	EvtMember                   = "member"
	EvtMembership               = "membership"
	EvtPageBuild                = "page_build"
	EvtPublic                   = "public"
	EvtPullRequest              = "pull_request"
	EvtPullRequestReviewComment = "pull_request_review_comment"
	EvtPush                     = "push"
	EvtRelease                  = "release"
	EvtRepositories             = "repositories"
	EvtStatus                   = "status"
	EvtTeamAdd                  = "team_add"
	EvtWatch                    = "watch"
)
View Source
const (
	// DefaultFrom is the default starting number for syncing repository items.
	DefaultFrom = 1

	// DefaultNumFetchProcs is the default number of goroutines fetching data
	// from the GitHub API in parallel.
	DefaultNumFetchProcs = 20

	// DefaultNumIndexProcs is the default number of goroutines indexing data
	// into Elastic Search in parallel.
	DefaultNumIndexProcs = 5

	// DefaultPerPage is the default number of items per page in GitHub API
	// requests.
	DefaultPerPage = 100

	// DefaultSleepPerPage is the default number of seconds to sleep between
	// each GitHub page queried.
	DefaultSleepPerPage = 0

	// DefaultStorage is the default destination store for the synchronization
	// job.
	DefaultStorage = storage.StoreSnapshot

	// DefaultFilterMode is the default filtering mode for retrieving issues.
	DefaultFilterMode = GitHubStateFilterOpened
)

Variables

View Source
var DefaultSyncOptions = syncOptions{
	From:          DefaultFrom,
	NumFetchProcs: DefaultNumFetchProcs,
	NumIndexProcs: DefaultNumIndexProcs,
	PerPage:       DefaultPerPage,
	SleepPerPage:  DefaultSleepPerPage,
	State:         GitHubStateFilterOpened,
	Storage:       DefaultStorage,
}

DefaultSyncOptions is the default set of options for a synchronization job.

Functions

func NewClient

func NewClient(token string) *gh.Client

func NewSyncCommand

func NewSyncCommand(client *github.Client, blobStore storage.BlobStore) *syncCmd

NewSyncCommand creates a default configured synchronization job.

func NewSyncCommandWithOptions

func NewSyncCommandWithOptions(client *github.Client, blobStore storage.BlobStore, opt *syncOptions) *syncCmd

NewSyncCommandWithOptions creates a synchronization job with the specific options set. Be careful when using that function to give meaningful values to all options: it is recommand to start from a copy of DefaultSyncOptions and modify what needs to be from there.

Types

type GitHubStateFilter

type GitHubStateFilter string

GitHubStateFilter is an enumeration of possible filtering mode when retrieving GitHub issues.

const (
	// GitHubStateFilterAll takes all issues.
	GitHubStateFilterAll GitHubStateFilter = "all"

	// GitHubStateFilterClosed filters closed issues.
	GitHubStateFilterClosed GitHubStateFilter = "closed"

	// GitHubStateFilterOpened filters opened issues.
	GitHubStateFilterOpened GitHubStateFilter = "open"
)

type PartialMessage

type PartialMessage struct {
	GitHubEvent    string `json:"X-GitHub-Event"`
	GitHubDelivery string `json:"X-GitHub-Delivery"`
	HubSignature   string `json:"X-Hub-Signature"`
}

Jump to

Keyboard shortcuts

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