parsers

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Branch     string
	Deleted    bool
	ModuleName string
	RepoName   string
	RepoUser   string
	Completed  bool
	Succeed    bool
}

func (*Data) ParseData

func (d *Data) ParseData(c *gin.Context) error

ParseData will takes in a *gin.Context c and parses webhook data into a Data struct. This function returns an error if something goes wrong and nil if it completes successfully.

func (*Data) ParseHeaders

func (d *Data) ParseHeaders(headers *http.Header) (string, error)

ParseHeaders parses the headers and returns a string containing the VCS tool that is making the request. If an unsupported VCS tool makes a request, then an error is returned.

type WebhookData

type WebhookData interface {
	ParseData(c *gin.Context) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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