event

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2018 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Email string `json:"email"`
	Name  string `json:"name"`
}

type Commit

type Commit struct {
	AuthorEmail string `json:"author_email"`
	AuthorName  string `json:"author_name"`
	AuthorURL   string `json:"author_url"`
	Duration    int    `json:"duration"`
	FinishedAt  string `json:"finished_at"`
	ID          int    `json:"id"`
	Message     string `json:"message"`
	Sha         string `json:"sha"`
	StartedAt   string `json:"started_at"`
	Status      string `json:"status"`
}

type HandleEvent

type HandleEvent interface {
	Handle(setting config.Setting)
}

func GetEventHandler

func GetEventHandler(eventHook string) (HandleEvent, error)

type JobHook

type JobHook struct {
	BeforeSha         string     `json:"before_sha"`
	BuildAllowFailure bool       `json:"build_allow_failure"`
	BuildDuration     float64    `json:"build_duration"`
	BuildFinishedAt   string     `json:"build_finished_at"`
	BuildID           int        `json:"build_id"`
	BuildName         string     `json:"build_name"`
	BuildStage        string     `json:"build_stage"`
	BuildStartedAt    string     `json:"build_started_at"`
	BuildStatus       string     `json:"build_status"`
	Commit            Commit     `json:"commit"`
	ObjectKind        string     `json:"object_kind"`
	ProjectID         int        `json:"project_id"`
	ProjectName       string     `json:"project_name"`
	Ref               string     `json:"ref"`
	Repository        Repository `json:"repository"`
	Sha               string     `json:"sha"`
	Tag               bool       `json:"tag"`
	User              User       `json:"user"`
}

func (*JobHook) Handle

func (j *JobHook) Handle(setting config.Setting)

type Repository

type Repository struct {
	Description     string `json:"description"`
	GitHTTPURL      string `json:"git_http_url"`
	GitSSHURL       string `json:"git_ssh_url"`
	Homepage        string `json:"homepage"`
	Name            string `json:"name"`
	VisibilityLevel int    `json:"visibility_level"`
}

type User

type User struct {
	Email string `json:"email"`
	ID    int    `json:"id"`
	Name  string `json:"name"`
}

Jump to

Keyboard shortcuts

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