webhook

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LimitPayload added in v0.3.0

type LimitPayload struct {
	Object     Object `json:"object,omitempty"`
	Concurrent int64  `json:"concurrent,omitempty"`
	Message    string `json:"message,omitempty"`
}

type Message added in v0.3.0

type Message struct {
	ProjectID int64        `json:"projectid"`
	EventType string       `json:"message_type"`
	Data      LimitPayload `json:"data"`
}

func GetLimitPayload added in v0.3.0

func GetLimitPayload(play *ci.Play, limit ci.LimitCi, message string) *Message

GetLimitPayload return a filled limit ci payload

type Object

type Object struct {
	NamespacedName types.NamespacedName `json:"namespaced_name,omitempty"`
	Kind           string               `json:"kind,omitempty"`
}

type PlayPayload

type PlayPayload struct {
	Object     Object    `json:"object,omitempty"`
	ProjectID  int64     `json:"project_id,omitempty"`
	PipelineID int64     `json:"pipeline_id,omitempty"`
	RepoURL    string    `json:"repo_url,omitempty"`
	Commit     ci.Commit `json:"ref,omitempty"`
	Stack      ci.Stack  `json:"stack,omitempty"`
	Status     ci.State  `json:"status,omitempty"`
}

func GetPayLoad

func GetPayLoad(play *ci.Play) *PlayPayload

GetPayLoad returns a filled play payload

type Webhook

type Webhook struct {
	Name   string `json:"name" yaml:"name"`
	URLRaw string `json:"url" yaml:"url"`
	Scope  string `json:"scope" yaml:"scope"`
}

Jump to

Keyboard shortcuts

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