Documentation ¶
Index ¶
- type Action
- func (e *Action) ConvertToJSON() (string, error)
- func (e *Action) ExecuteCreateActions(create event.Create) (bool, error)
- func (e *Action) ExecuteDeleteActions(delete event.Delete) (bool, error)
- func (e *Action) ExecuteIssueCommentActions(issueComment event.IssueComment) (bool, error)
- func (e *Action) ExecuteIssuesActions(issue event.Issues) (bool, error)
- func (e *Action) ExecuteLabelActions(label event.Label) (bool, error)
- func (e *Action) ExecuteMilestoneActions(milestone event.Milestone) (bool, error)
- func (e *Action) ExecutePullRequestActions(pullRequest event.PullRequest) (bool, error)
- func (e *Action) ExecutePullRequestReviewActions(pullRequestReview event.PullRequestReview) (bool, error)
- func (e *Action) ExecutePullRequestReviewCommentActions(pullRequestReviewComment event.PullRequestReviewComment) (bool, error)
- func (e *Action) ExecutePushActions(push event.Push) (bool, error)
- func (e *Action) ExecuteRawActions(raw event.Raw) (bool, error)
- func (e *Action) ExecuteStatusActions(status event.Status) (bool, error)
- func (e *Action) ExecuteWatchActions(watch event.Watch) (bool, error)
- func (e *Action) LoadFromJSON(data []byte) (bool, error)
- func (e *Action) RegisterCreateAction(f func(create event.Create) (bool, error))
- func (e *Action) RegisterDeleteAction(f func(delete event.Delete) (bool, error))
- func (e *Action) RegisterIssueCommentAction(f func(issueComment event.IssueComment) (bool, error))
- func (e *Action) RegisterIssuesAction(f func(issue event.Issues) (bool, error))
- func (e *Action) RegisterLabelAction(f func(label event.Label) (bool, error))
- func (e *Action) RegisterMilestoneAction(f func(milestone event.Milestone) (bool, error))
- func (e *Action) RegisterPullRequestAction(f func(pullRequest event.PullRequest) (bool, error))
- func (e *Action) RegisterPullRequestReviewAction(f func(pullRequestReview event.PullRequestReview) (bool, error))
- func (e *Action) RegisterPullRequestReviewCommentAction(f func(pullRequestReviewComment event.PullRequestReviewComment) (bool, error))
- func (e *Action) RegisterPushAction(f func(watch event.Push) (bool, error))
- func (e *Action) RegisterRawAction(f func(raw event.Raw) (bool, error))
- func (e *Action) RegisterStatusAction(f func(status event.Status) (bool, error))
- func (e *Action) RegisterWatchAction(f func(watch event.Watch) (bool, error))
- type Commands
- func (e *Commands) ExecuteIssueCommentActions(issueComment event.IssueComment) (bool, error)
- func (e *Commands) ExecuteIssuesActions(issues event.Issues) (bool, error)
- func (e *Commands) Fetch(body string)
- func (e *Commands) RegisterIssueCommentAction(command string, ...)
- func (e *Commands) RegisterIssuesAction(command string, ...)
- type Parser
- func (e *Parser) ConvertToJSON() (string, error)
- func (e *Parser) GetBody() string
- func (e *Parser) GetGitHubEvent() string
- func (e *Parser) GetGithubDelivery() string
- func (e *Parser) GetHeader(key string) string
- func (e *Parser) GetHubSignature() string
- func (e *Parser) GetUserAgent() string
- func (e *Parser) LoadFromJSON(data []byte) (bool, error)
- func (e *Parser) SetBody(body string)
- func (e *Parser) SetGitHubEvent(githubEvent string)
- func (e *Parser) SetGithubDelivery(githubDelivery string)
- func (e *Parser) SetHeader(key string, value string)
- func (e *Parser) SetHubSignature(hubSignature string)
- func (e *Parser) SetUserAgent(userAgent string)
- func (e *Parser) SignBody(secret, body []byte) []byte
- func (e *Parser) VerifySignature(secret string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Status []func(status event.Status) (bool, error) Issues []func(issue event.Issues) (bool, error) IssueComment []func(issueComment event.IssueComment) (bool, error) Watch []func(watch event.Watch) (bool, error) Push []func(watch event.Push) (bool, error) Create []func(watch event.Create) (bool, error) Label []func(label event.Label) (bool, error) Delete []func(delete event.Delete) (bool, error) Milestone []func(milestone event.Milestone) (bool, error) PullRequest []func(pullRequest event.PullRequest) (bool, error) PullRequestReview []func(pullRequestReview event.PullRequestReview) (bool, error) PullRequestReviewComment []func(pullRequestReviewComment event.PullRequestReviewComment) (bool, error) Raw []func(raw event.Raw) (bool, error) }
Action struct
func (*Action) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*Action) ExecuteCreateActions ¶
ExecuteCreateActions executes actions for create events
func (*Action) ExecuteDeleteActions ¶
ExecuteDeleteActions executes actions for delete events
func (*Action) ExecuteIssueCommentActions ¶
func (e *Action) ExecuteIssueCommentActions(issueComment event.IssueComment) (bool, error)
ExecuteIssueCommentActions executes actions for issue comment events
func (*Action) ExecuteIssuesActions ¶
ExecuteIssuesActions executes actions for issues events
func (*Action) ExecuteLabelActions ¶
ExecuteLabelActions executes actions for label events
func (*Action) ExecuteMilestoneActions ¶
ExecuteMilestoneActions executes actions for milestone events
func (*Action) ExecutePullRequestActions ¶
func (e *Action) ExecutePullRequestActions(pullRequest event.PullRequest) (bool, error)
ExecutePullRequestActions executes actions for pull request events
func (*Action) ExecutePullRequestReviewActions ¶
func (e *Action) ExecutePullRequestReviewActions(pullRequestReview event.PullRequestReview) (bool, error)
ExecutePullRequestReviewActions executes actions for pull requests review events
func (*Action) ExecutePullRequestReviewCommentActions ¶
func (e *Action) ExecutePullRequestReviewCommentActions(pullRequestReviewComment event.PullRequestReviewComment) (bool, error)
ExecutePullRequestReviewCommentActions executes actions for pull requests review comment events
func (*Action) ExecutePushActions ¶
ExecutePushActions executes actions for push events
func (*Action) ExecuteRawActions ¶
ExecuteRawActions executes actions for all events
func (*Action) ExecuteStatusActions ¶
ExecuteStatusActions executes actions for status events
func (*Action) ExecuteWatchActions ¶
ExecuteWatchActions executes actions for watch events
func (*Action) LoadFromJSON ¶
LoadFromJSON update object from json
func (*Action) RegisterCreateAction ¶
RegisterCreateAction adds action for create event
func (*Action) RegisterDeleteAction ¶
RegisterDeleteAction adds action for delete event
func (*Action) RegisterIssueCommentAction ¶
func (e *Action) RegisterIssueCommentAction(f func(issueComment event.IssueComment) (bool, error))
RegisterIssueCommentAction adds action for issue comment event
func (*Action) RegisterIssuesAction ¶
RegisterIssuesAction adds action for issues event
func (*Action) RegisterLabelAction ¶
RegisterLabelAction adds action for label event
func (*Action) RegisterMilestoneAction ¶
RegisterMilestoneAction adds action for milestone event
func (*Action) RegisterPullRequestAction ¶
func (e *Action) RegisterPullRequestAction(f func(pullRequest event.PullRequest) (bool, error))
RegisterPullRequestAction adds action for pull request event
func (*Action) RegisterPullRequestReviewAction ¶
func (e *Action) RegisterPullRequestReviewAction(f func(pullRequestReview event.PullRequestReview) (bool, error))
RegisterPullRequestReviewAction adds action for pull request review event
func (*Action) RegisterPullRequestReviewCommentAction ¶
func (e *Action) RegisterPullRequestReviewCommentAction(f func(pullRequestReviewComment event.PullRequestReviewComment) (bool, error))
RegisterPullRequestReviewCommentAction adds action for pull request review comment event
func (*Action) RegisterPushAction ¶
RegisterPushAction adds action for push event
func (*Action) RegisterRawAction ¶
RegisterRawAction adds action for all events
func (*Action) RegisterStatusAction ¶
RegisterStatusAction adds action for status event
type Commands ¶
type Commands struct { Incoming []event.Command Issues map[string]func(command event.Command, issues event.Issues) (bool, error) IssueComment map[string]func(command event.Command, issueComment event.IssueComment) (bool, error) }
Commands struct
func (*Commands) ExecuteIssueCommentActions ¶
func (e *Commands) ExecuteIssueCommentActions(issueComment event.IssueComment) (bool, error)
ExecuteIssueCommentActions runs issue comment actions
func (*Commands) ExecuteIssuesActions ¶
ExecuteIssuesActions runs issues actions
func (*Commands) Fetch ¶
Fetch will fetch all commands and parameters within the issue or issue comment
func (*Commands) RegisterIssueCommentAction ¶
func (e *Commands) RegisterIssueCommentAction(command string, callback func(command event.Command, issueComment event.IssueComment) (bool, error))
RegisterIssueCommentAction registers issue comment action for a specific command
type Parser ¶
type Parser struct { UserAgent string GithubDelivery string GitHubEvent string HubSignature string Headers map[string]string Body string }
Parser struct
func (*Parser) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*Parser) GetGitHubEvent ¶
GetGitHubEvent gets github event
func (*Parser) GetGithubDelivery ¶
GetGithubDelivery gets github delivery
func (*Parser) GetHubSignature ¶
GetHubSignature gets hub signature
func (*Parser) LoadFromJSON ¶
LoadFromJSON update object from json
func (*Parser) SetGitHubEvent ¶
SetGitHubEvent sets github event
func (*Parser) SetGithubDelivery ¶
SetGithubDelivery sets github delivery
func (*Parser) SetHubSignature ¶
SetHubSignature sets hub signature
func (*Parser) SetUserAgent ¶
SetUserAgent sets user agent
func (*Parser) VerifySignature ¶
VerifySignature verify signature