Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BodyMaxLen int64 = 1024 * 1024
BodyMaxLen limits max size of payload.
Functions ¶
func Handle ¶
func Handle(f HandlerFunc) http.HandlerFunc
Handle generates http.HandlerFunc to handle webhook events.
func HandlePush ¶
func HandlePush(f HandlerFunc) http.HandlerFunc
HandlePush generates http.HandlerFunc to handle webhook push events.
Types ¶
type Commit ¶
type Commit struct {
ID string
Distinct bool
Message string
Timestamp string
URL string
Added []string
Removed []string
Modified []string
}
Commit represents a Github's commit.
type Event ¶
Event represents raw event of Github's webhook.
type PushEvent ¶
type PushEvent struct {
Ref string
Before string
After string
Created bool
Deleted bool
Forced bool
Compare string
Commits []Commit
Repository Repository
}
PushEvent represents a Github's webhook push event.
type Repository ¶
type Repository struct {
Name string
FullName string
Private bool
HTMLURL string `json:"html_url"`
Description string
Fork bool
URL string
CreatedAt int64 `json:"created_at"`
UpdatedAt string `json:"updated_at"`
PushedAt int64 `json:"pushed_at"`
}
Repository represents a Github's repository.
Click to show internal directories.
Click to hide internal directories.