webhook

package
v0.9.2 Latest Latest
Warning

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

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

Documentation

Overview

Copyright 2020 WILDCARD SA.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 04/03/2021

Copyright 2020 WILDCARD SA.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 20/01/2021

Copyright 2020 WILDCARD SA.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 20/01/2021

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