Documentation
¶
Index ¶
- Constants
- func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)
- func Normalize(cfg config.Configuration, bytes []byte) (cc.Message, error)
- func NormalizeSemaphoreciBuildOutMessage(cfg config.Configuration, src SemaphoreciBuildOutMessage) cc.Message
- func NormalizeSemaphoreciDeployOutMessage(cfg config.Configuration, src SemaphoreciDeployOutMessage) cc.Message
- type Handler
- type SemaphoreciBaseOutMessage
- type SemaphoreciBuildOutMessage
- type SemaphoreciCommit
- type SemaphoreciDeployOutMessage
Constants ¶
View Source
const ( DisplayName = "Semaphore" HandlerKey = "semaphore" MessageDirection = "out" )
Variables ¶
This section is empty.
Functions ¶
func ExampleMessage ¶
func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)
func NormalizeSemaphoreciBuildOutMessage ¶
func NormalizeSemaphoreciBuildOutMessage(cfg config.Configuration, src SemaphoreciBuildOutMessage) cc.Message
func NormalizeSemaphoreciDeployOutMessage ¶
func NormalizeSemaphoreciDeployOutMessage(cfg config.Configuration, src SemaphoreciDeployOutMessage) cc.Message
Types ¶
type Handler ¶
type Handler struct {
Config config.Configuration
Adapter adapters.Adapter
}
FastHttp request handler for outbound webhook
func NewHandler ¶
func NewHandler(cfg config.Configuration, adapter adapters.Adapter) Handler
FastHttp request handler constructor for Soutbound webhook
func (Handler) HandleFastHTTP ¶
func (h Handler) HandleFastHTTP(ctx *fasthttp.RequestCtx)
HandleFastHTTP is the method to respond to a fasthttp request.
func (Handler) HandlerKey ¶
func (Handler) MessageDirection ¶
type SemaphoreciBaseOutMessage ¶
type SemaphoreciBaseOutMessage struct {
Event string `json:"event,omitempty"`
}
func SemaphoreciBaseOutMessageFromBytes ¶
func SemaphoreciBaseOutMessageFromBytes(bytes []byte) (SemaphoreciBaseOutMessage, error)
type SemaphoreciBuildOutMessage ¶
type SemaphoreciBuildOutMessage struct {
BranchName string `json:"branch_name,omitempty"`
BranchURL string `json:"branch_url,omitempty"`
ProjectName string `json:"project_name,omitempty"`
ProjectHashId string `json:"project_hash_id,omitempty"`
BuildURL string `json:"build_url,omitempty"`
BuildNumber int64 `json:"build_number,omitempty"`
Result string `json:"result,omitempty"`
Event string `json:"event,omitempty"`
StartedAt string `json:"started_at,omitempty"`
FinishedAt string `json:"finished_at,omitempty"`
Commit SemaphoreciCommit `json:"commit,omitempty"`
}
func SemaphoreciBuildOutMessageFromBytes ¶
func SemaphoreciBuildOutMessageFromBytes(bytes []byte) (SemaphoreciBuildOutMessage, error)
type SemaphoreciCommit ¶
type SemaphoreciDeployOutMessage ¶
type SemaphoreciDeployOutMessage struct {
ProjectName string `json:"project_name,omitempty"`
ProjectHashId string `json:"project_hash_id,omitempty"`
Result string `json:"result,omitempty"`
Event string `json:"event,omitempty"`
ServerName string `json:"server_name,omitempty"`
Number int64 `json:"number,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
StartedAt string `json:"started_at,omitempty"`
FinishedAt string `json:"finished_at,omitempty"`
HtmlURL string `json:"html_url,omitempty"`
BuildNumber int64 `json:"build_number,omitempty"`
BranchName string `json:"branch_name,omitempty"`
BranchHtmlURL string `json:"branch_html_url,omitempty"`
BuildHtmlURL string `json:"bulid_html_url,omitempty"`
Commit SemaphoreciCommit `json:"commit,omitempty"`
}
func SemaphoreciDeployOutMessageFromBytes ¶
func SemaphoreciDeployOutMessageFromBytes(bytes []byte) (SemaphoreciDeployOutMessage, error)
Click to show internal directories.
Click to hide internal directories.