tasks

package
v0.0.0-...-7d3b672 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const RAW_INCIDENTS_TABLE = "pagerduty_incidents"

Variables

View Source
var CollectIncidentsMeta = plugin.SubTaskMeta{
	Name:             "collectIncidents",
	EntryPoint:       CollectIncidents,
	EnabledByDefault: true,
	Description:      "Collect PagerDuty incidents",
	DomainTypes:      []string{plugin.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertIncidentsMeta = plugin.SubTaskMeta{
	Name:             "convertIncidents",
	EntryPoint:       ConvertIncidents,
	EnabledByDefault: true,
	Description:      "Convert incidents into domain layer table issues",
	DomainTypes:      []string{plugin.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertServicesMeta = plugin.SubTaskMeta{
	Name:             "convertServices",
	EntryPoint:       ConvertServices,
	EnabledByDefault: true,
	Description:      "Convert PagerDuty services",
	DomainTypes:      []string{plugin.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractIncidentsMeta = plugin.SubTaskMeta{
	Name:             "extractIncidents",
	EntryPoint:       ExtractIncidents,
	EnabledByDefault: true,
	Description:      "Extract PagerDuty incidents",
	DomainTypes:      []string{plugin.DOMAIN_TYPE_TICKET},
}

Functions

func CollectIncidents

func CollectIncidents(taskCtx plugin.SubTaskContext) errors.Error

func ConvertIncidents

func ConvertIncidents(taskCtx plugin.SubTaskContext) errors.Error

func ConvertServices

func ConvertServices(taskCtx plugin.SubTaskContext) errors.Error

func EncodeTaskOptions

func EncodeTaskOptions(op *PagerDutyOptions) (map[string]interface{}, errors.Error)

func ExtractIncidents

func ExtractIncidents(taskCtx plugin.SubTaskContext) errors.Error

func ValidateTaskOptions

func ValidateTaskOptions(op *PagerDutyOptions) errors.Error

Types

type IncidentWithUser

type IncidentWithUser struct {
	common.NoPKModel
	models.Incident
	*models.User
	AssignedAt time.Time
}

IncidentWithUser struct that represents the joined query result

type PagerDutyOptions

type PagerDutyOptions struct {
	ConnectionId uint64   `json:"connectionId"`
	TimeAfter    string   `json:"time_after,omitempty"`
	ServiceId    string   `json:"service_id,omitempty"`
	ServiceName  string   `json:"service_name,omitempty"`
	Tasks        []string `json:"tasks,omitempty"`
	*models.PagerdutyScopeConfig
}

func DecodeAndValidateTaskOptions

func DecodeAndValidateTaskOptions(options map[string]interface{}) (*PagerDutyOptions, errors.Error)

func DecodeTaskOptions

func DecodeTaskOptions(options map[string]interface{}) (*PagerDutyOptions, errors.Error)

func (*PagerDutyOptions) GetParams

func (p *PagerDutyOptions) GetParams() any

type PagerDutyTaskData

type PagerDutyTaskData struct {
	Options   *PagerDutyOptions
	TimeAfter *time.Time
	Client    api.RateLimitedApiClient
}

Jump to

Keyboard shortcuts

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