{"modulePath":"github.com/generaltso/gogs","version":"v0.4.2","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package hooks\n\n## Constants\n\n```go\nconst (\n\tHTT_WEBHOOK = iota + 1\n\tHTT_SERVICE\n)\n```\nHook task types.\n\n## Functions\n\n```go\nfunc AddHookTask(t *HookTask)\n```\nAddHookTask adds new hook task to task queue.\n\n## Types\n\n```go\ntype HookTask struct {\n\tType int\n\tUrl  string\n\t*Payload\n\tContentType int\n\tIsSsl       bool\n}\n```\nHookTask represents hook task.\n\n```go\ntype Payload struct {\n\tSecret  string           `json:\"secret\"`\n\tRef     string           `json:\"ref\"`\n\tCommits []*PayloadCommit `json:\"commits\"`\n\tRepo    *PayloadRepo     `json:\"repository\"`\n\tPusher  *PayloadAuthor   `json:\"pusher\"`\n}\n```\nPayload represents payload information of hook.\n\n```go\ntype PayloadAuthor struct {\n\tName  string `json:\"name\"`\n\tEmail string `json:\"email\"`\n}\n```\n\n```go\ntype PayloadCommit struct {\n\tId      string         `json:\"id\"`\n\tMessage string         `json:\"message\"`\n\tUrl     string         `json:\"url\"`\n\tAuthor  *PayloadAuthor `json:\"author\"`\n}\n```\n\n```go\ntype PayloadRepo struct {\n\tId          int64          `json:\"id\"`\n\tName        string         `json:\"name\"`\n\tUrl         string         `json:\"url\"`\n\tDescription string         `json:\"description\"`\n\tWebsite     string         `json:\"website\"`\n\tWatchers    int            `json:\"watchers\"`\n\tOwner       *PayloadAuthor `json:\"author\"`\n\tPrivate     bool           `json:\"private\"`\n}\n```\n\n","path":"github.com/generaltso/gogs/modules/hooks","name":"hooks","synopsis":"","isRedistributable":true}
