webhook

package
v0.0.0-...-b7271af Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateGithubWebhook

func AuthenticateGithubWebhook(c *gin.Context)

func AuthenticateGitlabWebhook

func AuthenticateGitlabWebhook(c *gin.Context)

func ProjectFromCtx

func ProjectFromCtx(c *gin.Context) (*account.Project, bool)

Types

type EventHandlers

type EventHandlers struct{}

func (EventHandlers) Github

func (ctrl EventHandlers) Github(c *gin.Context)

func (EventHandlers) Gitlab

func (ctrl EventHandlers) Gitlab(c *gin.Context)

type GithubCommit

type GithubCommit struct {
	Distinct bool   `json:"distinct"`
	Message  string `json:"message"`
	ExtID    string `json:"id"`
}

type GithubEventData

type GithubEventData struct {
	RepositoryExtID string
	Ref             string
	Commits         []GithubCommit
}

func GithubEventDataFromCtx

func GithubEventDataFromCtx(c *gin.Context) (*GithubEventData, bool)

type GitlabCommit

type GitlabCommit struct {
	Message string `json:"message"`
	ExtID   string `json:"id"`
}

type GitlabEventData

type GitlabEventData struct {
	RepositoryExtID string
	Ref             string
	Commits         []GitlabCommit
}

func GitlabEventDataFromCtx

func GitlabEventDataFromCtx(c *gin.Context) (*GitlabEventData, bool)

Jump to

Keyboard shortcuts

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