github

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2017 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitCommentEventJSON

func CommitCommentEventJSON() string

func CreateEventJSON

func CreateEventJSON() string

func DeleteEventJSON

func DeleteEventJSON() string

func DeploymentEventJSON

func DeploymentEventJSON() string

func DeploymentStatusEventJSON

func DeploymentStatusEventJSON() string

func ForkEventJSON

func ForkEventJSON() string

func GollumEventJSON

func GollumEventJSON() string

func IssueCommentEventJSON

func IssueCommentEventJSON() string

func IssuesEventJSON

func IssuesEventJSON() string

func MemberEventJSON

func MemberEventJSON() string

func MembershipEventJSON

func MembershipEventJSON() string

func PageBuildEventJSON

func PageBuildEventJSON() string

func PublicEventJSON

func PublicEventJSON() string

func PullRequestEventJSON

func PullRequestEventJSON() string

func PullRequestReviewCommentEventJSON

func PullRequestReviewCommentEventJSON() string

func PushEventJSON

func PushEventJSON() string

func ReleaseEventJSON

func ReleaseEventJSON() string

func RepositoryEventJSON

func RepositoryEventJSON() string

func StatusEventJSON

func StatusEventJSON() string

func TeamAddEventJSON

func TeamAddEventJSON() string

func WatchEventJSON

func WatchEventJSON() string

Types

type CommitComment

type CommitComment struct {
	Commit string `json:"commit_id"`
	Body   string `json:"body"`
}

type CommitCommentEvent

type CommitCommentEvent struct {
	Comment    CommitComment `json:"comment"`
	Repository Repository    `json:"repository"`
	Sender     Sender        `json:"sender"`
}

func (CommitCommentEvent) NewEvent

func (s CommitCommentEvent) NewEvent() agent.Event

type CreateEvent

type CreateEvent struct {
	Ref        string     `json:"ref"`
	RefType    string     `json:"ref_type"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (CreateEvent) NewEvent

func (s CreateEvent) NewEvent() agent.Event

type DeleteEvent

type DeleteEvent struct {
	Ref        string     `json:"ref"`
	RefType    string     `json:"ref_type"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (DeleteEvent) NewEvent

func (s DeleteEvent) NewEvent() agent.Event

type Deployment

type Deployment struct {
	Commit      string `json:"sha"`
	Task        string `json:"task"`
	Environment string `json:"environment"`
	Description string `json:"description"`
}

type DeploymentEvent

type DeploymentEvent struct {
	Deployment Deployment `json:"deployment"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (DeploymentEvent) NewEvent

func (s DeploymentEvent) NewEvent() agent.Event

type DeploymentStatus

type DeploymentStatus struct {
	State       string `json:"state"`
	Description string `json:"description"`
}

type DeploymentStatusEvent

type DeploymentStatusEvent struct {
	Deployment       Deployment       `json:"deployment"`
	DeploymentStatus DeploymentStatus `json:"deployment_status"`
	Repository       Repository       `json:"repository"`
	Sender           Sender           `json:"sender"`
}

func (DeploymentStatusEvent) NewEvent

func (s DeploymentStatusEvent) NewEvent() agent.Event

type Event

type Event interface {
	NewEvent() agent.Event
}

func NewGithubEvent

func NewGithubEvent(data []byte, name string) (Event, error)

type ForkEvent

type ForkEvent struct {
	Forkee     Repository `json:"forkee"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (ForkEvent) NewEvent

func (s ForkEvent) NewEvent() agent.Event

type GithubWebhook

type GithubWebhook struct {
	Path string
	// contains filtered or unexported fields
}

func (*GithubWebhook) Register

func (gh *GithubWebhook) Register(router *mux.Router, events chan agent.Event)

type GollumEvent

type GollumEvent struct {
	Pages      []Page     `json:"pages"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (GollumEvent) NewEvent

func (s GollumEvent) NewEvent() agent.Event

REVIEW: Going to be lazy and not deal with the pages.

type HeadCommit

type HeadCommit struct {
	Message   string    `json:"message"`
	Timestamp time.Time `json:"timestamp"`
}

type Issue

type Issue struct {
	Number   int    `json:"number"`
	Title    string `json:"title"`
	Comments int    `json:"comments"`
}

type IssueComment

type IssueComment struct {
	Body string `json:"body"`
}

type IssueCommentEvent

type IssueCommentEvent struct {
	Issue      Issue        `json:"issue"`
	Comment    IssueComment `json:"comment"`
	Repository Repository   `json:"repository"`
	Sender     Sender       `json:"sender"`
}

func (IssueCommentEvent) NewEvent

func (s IssueCommentEvent) NewEvent() agent.Event

type IssuesEvent

type IssuesEvent struct {
	Action     string     `json:"action"`
	Issue      Issue      `json:"issue"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (IssuesEvent) NewEvent

func (s IssuesEvent) NewEvent() agent.Event

type MemberEvent

type MemberEvent struct {
	Member     Sender     `json:"member"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (MemberEvent) NewEvent

func (s MemberEvent) NewEvent() agent.Event

type MembershipEvent

type MembershipEvent struct {
	Action string `json:"action"`
	Member Sender `json:"member"`
	Sender Sender `json:"sender"`
	Team   Team   `json:"team"`
}

func (MembershipEvent) NewEvent

func (s MembershipEvent) NewEvent() agent.Event

type Page

type Page struct {
	Name   string `json:"page_name"`
	Title  string `json:"title"`
	Action string `json:"action"`
}

type PageBuildEvent

type PageBuildEvent struct {
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (PageBuildEvent) NewEvent

func (s PageBuildEvent) NewEvent() agent.Event

type PingEvent

type PingEvent struct {
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (PingEvent) NewEvent

func (s PingEvent) NewEvent() agent.Event

type PublicEvent

type PublicEvent struct {
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (PublicEvent) NewEvent

func (s PublicEvent) NewEvent() agent.Event

type PullRequest

type PullRequest struct {
	Number       int    `json:"number"`
	State        string `json:"state"`
	Title        string `json:"title"`
	Comments     int    `json:"comments"`
	Commits      int    `json:"commits"`
	Additions    int    `json:"additions"`
	Deletions    int    `json:"deletions"`
	ChangedFiles int    `json:"changed_files"`
}

type PullRequestEvent

type PullRequestEvent struct {
	Action      string      `json:"action"`
	PullRequest PullRequest `json:"pull_request"`
	Repository  Repository  `json:"repository"`
	Sender      Sender      `json:"sender"`
}

func (PullRequestEvent) NewEvent

func (s PullRequestEvent) NewEvent() agent.Event

type PullRequestReviewComment

type PullRequestReviewComment struct {
	File    string `json:"path"`
	Comment string `json:"body"`
}

type PullRequestReviewCommentEvent

type PullRequestReviewCommentEvent struct {
	Comment     PullRequestReviewComment `json:"comment"`
	PullRequest PullRequest              `json:"pull_request"`
	Repository  Repository               `json:"repository"`
	Sender      Sender                   `json:"sender"`
}

func (PullRequestReviewCommentEvent) NewEvent

type PushEvent

type PushEvent struct {
	Ref        string     `json:"ref"`
	Before     string     `json:"before"`
	After      string     `json:"after"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
	HeadCommit HeadCommit `json:"head_commit"`
}

func (PushEvent) NewEvent

func (s PushEvent) NewEvent() agent.Event

type Release

type Release struct {
	TagName string `json:"tag_name"`
}

type ReleaseEvent

type ReleaseEvent struct {
	Release    Release    `json:"release"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (ReleaseEvent) NewEvent

func (s ReleaseEvent) NewEvent() agent.Event

type Repository

type Repository struct {
	Repository string `json:"full_name"`
	Private    bool   `json:"private"`
	Stars      int    `json:"stargazers_count"`
	Forks      int    `json:"forks_count"`
	Issues     int    `json:"open_issues_count"`
	SshUrl     string `json:"ssh_url"`
	HttpsUrl   string `json:"https_url"`
}

type RepositoryEvent

type RepositoryEvent struct {
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (RepositoryEvent) NewEvent

func (s RepositoryEvent) NewEvent() agent.Event

type Sender

type Sender struct {
	User  string `json:"login"`
	Admin bool   `json:"site_admin"`
}

type StatusEvent

type StatusEvent struct {
	Hash       string     `json:"sha"`
	State      string     `json:"state"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
	Context    string     `json:"context"`
}

func (StatusEvent) NewEvent

func (s StatusEvent) NewEvent() agent.Event

type Team

type Team struct {
	Name string `json:"name"`
}

type TeamAddEvent

type TeamAddEvent struct {
	Team       Team       `json:"team"`
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (TeamAddEvent) NewEvent

func (s TeamAddEvent) NewEvent() agent.Event

type WatchEvent

type WatchEvent struct {
	Repository Repository `json:"repository"`
	Sender     Sender     `json:"sender"`
}

func (WatchEvent) NewEvent

func (s WatchEvent) NewEvent() agent.Event

Jump to

Keyboard shortcuts

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