event

package
v0.0.0-...-4fe5d51 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package event contains all the needed parsing for several repository provider's hooks

Currently it supports Github and Bitbucket

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoEvent

type RepoEvent struct {
	Author string
	Branch string
	Commit string
}

RepoEvent stores relevant information about a repository when an event is received

func NewBitbucketEvent

func NewBitbucketEvent(request *http.Request) (event *RepoEvent, err error)

NewBitbucketEvent takes an http.Request object and parses it corresponding to Bitbucket webhook syntax into an RepoEvent object. It returns a RepoEvent object and an error in case of error

func NewGithubEvent

func NewGithubEvent(request *http.Request) (event *RepoEvent, err error)

NewGithubEvent takes an http.Request object and parses it corresponding to Github webhook syntax into an RepoEvent object. It returns a RepoEvent object and an error in case of error

func NewGitlabEvent

func NewGitlabEvent(request *http.Request) (event *RepoEvent, err error)

NewGitlabEvent takes an http.Request object and parses it corresponding to Gitlab webhook syntax into an RepoEvent object. It returns a RepoEvent object and an error in case of error

Jump to

Keyboard shortcuts

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