model

package
v0.0.0-...-b018f69 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlertKind       = "alert"
	AlertConfigKind = "alertConfig"
	RecipientKind   = "recipient"

	AlertStateActive     = "active"
	AlertStateSuppressed = "suppressed"
	AlertStateDisabled   = "disabled"
	AlertStateEnabled    = "enabled"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvancedOptionsSpec

type AdvancedOptionsSpec struct {
	InitialWait    string `json:"initialWait, omitempty"`
	RepeatInterval string `json:"repeatInterval, omitempty"`
}

type Alert

type Alert struct {
	client.Resource
	Description string `json:"description"`
	State       string `json:"state"`
	Severity    string `json:"severity"`
	TargetType  string `json:"targetType"`
	TargetID    string `json:"targetId"`

	HostRule    CommonHealthRule `json:"hostRule"`
	ServiceRule CommonHealthRule `json:"serviceRule"`
	StackRule   CommonHealthRule `json:"stackRule"`

	AdvancedOptions AdvancedOptionsSpec `json:"advancedOptions"`
	MetricRule      MetricRuleSpec      `json:"metricRule"`
	Environment     string              `json:"environment"`
	RecipientID     string              `json:"recipientId"`
	StartsAt        time.Time           `json:"startsAt,omitempty"`
	EndsAt          time.Time           `json:"endsAt,omitempty"`
}

type AlertConfig

type AlertConfig struct {
	client.Resource
	ResolveTimeout string          `json:"resolveTimeout"`
	EmailConfig    EmailConfigSpec `json:"emailConfig"`
}

type CommonHealthRule

type CommonHealthRule struct {
	HoldDuration string `json:"holdDuration, omitempty"`
}

type EmailConfigSpec

type EmailConfigSpec struct {
	SMTPSmartHost    string `json:"smtpSmartHost"`
	SMTPAuthUserName string `json:"smtpAuthUsername"`
	SMTPAuthPassword string `json:"smtpAuthPassword"`
}

type EmailRecipientSpec

type EmailRecipientSpec struct {
	Address string `json:"address"`
}

type Error

type Error struct {
	client.Resource
	Status   int    `json:"status"`
	Code     string `json:"code"`
	Msg      string `json:"message"`
	Detail   string `json:"detail"`
	BaseType string `json:"baseType"`
}

type MetricRuleSpec

type MetricRuleSpec struct {
	Expr         string `json:"expr, omitempty"`
	HoldDuration string `json:"holdDuration, omitempty"`
}

type Recipient

type Recipient struct {
	client.Resource
	Environment   string `json:"environment"`
	RecipientType string `json:"recipientType"`

	EmailRecipient   EmailRecipientSpec   `json:"emailRecipient"`
	WebhookRecipient WebhookRecipientSpec `json:"webhookRecipient"`
}

type WebhookRecipientSpec

type WebhookRecipientSpec struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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