triggers

package
v0.0.1-dev-a10d1fb Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Handlers = []apis.Handler{
		{
			Version: apis.V1,
			Method:  http.MethodGet,
			Path:    "/triggers/materials",
			Func:    listTriggerMaterials,
		},
		{
			Version: apis.V1,
			Method:  http.MethodGet,
			Path:    "/triggers",
			Func:    listTriggers,
		},
		{
			Version: apis.V1,
			Method:  http.MethodGet,
			Path:    "/triggers/:triggerName",
			Func:    getTrigger,
		},
		{
			Version: apis.V1,
			Method:  http.MethodPatch,
			Path:    "/triggers/:triggerName",
			Func:    applyTrigger,
		},
		{
			Version: apis.V1,
			Method:  http.MethodPatch,
			Path:    "/triggers/:triggerName/enable",
			Func:    enableOrDisableTrigger,
		},
		{
			Version: apis.V1,
			Method:  http.MethodPatch,
			Path:    "/triggers/tasks/:triggerName",
			Func:    updateTriggerTask,
		},
	}
)

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	AlertTypes []string `json:"alertTypes"`
	Severities []string `json:"severities"`
	Categories []string `json:"categories"`
	EventIds   []string `json:"eventIds"`
}

type Email

type Email struct {
	Address string `json:"address"`
	Note    string `json:"note"`
}

type Notifications

type Notifications struct {
	Emails []Email `json:"emails"`
	Slacks []Slack `json:"slacks"`
}

type Response

type Response struct {
	Script        `json:"scriptTypes"`
	Notifications `json:"notifications"`
}

type Script

type Script struct {
	Type        string `json:"type"`
	Environment string `json:"environment"`
}

type Slack

type Slack struct {
	Name        string `json:"name"`
	Url         string `json:"url"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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