Documentation
¶
Index ¶
- Variables
- func ApplyConfigValues(cfg config.Config, vals []ConfigValueInput) (config.Config, error)
- func ApplyLimitValues(l limit.Limits, vals []SystemLimitInput) (limit.Limits, error)
- func ExprIsID(n ast.Node) bool
- func ExprIsLiteral(n ast.Node) bool
- func MarshalExprBooleanExpression(s string) graphql.Marshaler
- func MarshalExprExpression(s string) graphql.Marshaler
- func MarshalExprIdentifier(n ast.Node) graphql.Marshaler
- func MarshalExprOperator(op string) graphql.Marshaler
- func MarshalExprStringExpression(s string) graphql.Marshaler
- func MarshalExprStringMap(v map[string]string) graphql.Marshaler
- func MarshalExprValue(n ast.Node) graphql.Marshaler
- func MarshalISOTimestamp(t time.Time) graphql.Marshaler
- func MarshalStringMap(v map[string]string) graphql.Marshaler
- func MarshalUUID(t uuid.UUID) graphql.Marshaler
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func QueryFields(query string) ([]string, error)
- func SchemaFields() []string
- func UnmarshalExprBooleanExpression(v interface{}) (string, error)
- func UnmarshalExprExpression(v interface{}) (string, error)
- func UnmarshalExprIdentifier(v interface{}) (ast.Node, error)
- func UnmarshalExprOperator(v interface{}) (string, error)
- func UnmarshalExprStringExpression(v interface{}) (string, error)
- func UnmarshalExprStringMap(v interface{}) (map[string]string, error)
- func UnmarshalExprValue(v interface{}) (ast.Node, error)
- func UnmarshalISOTimestamp(v interface{}) (time.Time, error)
- func UnmarshalStringMap(v interface{}) (map[string]string, error)
- func UnmarshalUUID(v interface{}) (uuid.UUID, error)
- type AlertConnection
- type AlertDataPoint
- type AlertLogEntryConnection
- type AlertLogEntryResolver
- type AlertMetadata
- type AlertMetadataInput
- type AlertMetricResolver
- type AlertMetricsOptions
- type AlertPendingNotification
- type AlertRecentEventsOptions
- type AlertResolver
- type AlertSearchOptions
- type AlertSearchSort
- type AlertStats
- type AlertStatus
- type AlertsByStatus
- type AuthSubjectConnection
- type CalcRotationHandoffTimesInput
- type Clause
- type ClauseInput
- type ClearTemporarySchedulesInput
- type CloseMatchingAlertInput
- type ComplexityRoot
- type Condition
- type ConditionInput
- type ConditionToExprInput
- type Config
- type ConfigHint
- type ConfigType
- type ConfigValue
- type ConfigValueInput
- type ContactMethodType
- func (e ContactMethodType) IsValid() bool
- func (e ContactMethodType) MarshalGQL(w io.Writer)
- func (e ContactMethodType) MarshalJSON() ([]byte, error)
- func (e ContactMethodType) String() string
- func (e *ContactMethodType) UnmarshalGQL(v any) error
- func (e *ContactMethodType) UnmarshalJSON(b []byte) error
- type CreateAlertInput
- type CreateBasicAuthInput
- type CreateEscalationPolicyInput
- type CreateEscalationPolicyStepInput
- type CreateEscalationPolicyStepInputResolver
- type CreateGQLAPIKeyInput
- type CreateHeartbeatMonitorInput
- type CreateIntegrationKeyInput
- type CreateRotationInput
- type CreateScheduleInput
- type CreateServiceInput
- type CreateUserCalendarSubscriptionInput
- type CreateUserContactMethodInput
- type CreateUserInput
- type CreateUserNotificationRuleInput
- type CreateUserOverrideInput
- type CreatedGQLAPIKey
- type DebugCarrierInfoInput
- type DebugMessage
- type DebugMessageStatusInfo
- type DebugMessageStatusInput
- type DebugMessagesInput
- type DebugSendSMSInfo
- type DebugSendSMSInput
- type DestinationDisplayInfoError
- type DestinationFieldSearchInput
- type DestinationFieldValidateInput
- type DestinationInputResolver
- type DestinationResolver
- type DirectiveRoot
- type ErrorCode
- type EscalationPolicyConnection
- type EscalationPolicyResolver
- type EscalationPolicySearchOptions
- type EscalationPolicyStepResolver
- type Expr
- type ExprResolver
- type ExprToConditionInput
- type FieldSearchConnection
- type FieldSearchResult
- type FieldValueInput
- type FieldValuePair
- type GQLAPIKey
- type GQLAPIKeyResolver
- type GQLAPIKeyUsage
- type HeartbeatMonitorResolver
- type InlineDisplayInfo
- type IntegrationKeyConnection
- type IntegrationKeyResolver
- type IntegrationKeySearchOptions
- type IntegrationKeyType
- func (e IntegrationKeyType) IsValid() bool
- func (e IntegrationKeyType) MarshalGQL(w io.Writer)
- func (e IntegrationKeyType) MarshalJSON() ([]byte, error)
- func (e IntegrationKeyType) String() string
- func (e *IntegrationKeyType) UnmarshalGQL(v any) error
- func (e *IntegrationKeyType) UnmarshalJSON(b []byte) error
- type IntegrationKeyTypeInfo
- type KeyConfigResolver
- type LabelConnection
- type LabelKeySearchOptions
- type LabelSearchOptions
- type LabelValueSearchOptions
- type LinkAccountInfo
- type MapValueError
- type MessageLogConnection
- type MessageLogConnectionStatsResolver
- type MessageLogSearchOptions
- type MessageStatusHistory
- type Mutation
- type MutationResolver
- type NotificationState
- type NotificationStatus
- func (e NotificationStatus) IsValid() bool
- func (e NotificationStatus) MarshalGQL(w io.Writer)
- func (e NotificationStatus) MarshalJSON() ([]byte, error)
- func (e NotificationStatus) String() string
- func (e *NotificationStatus) UnmarshalGQL(v any) error
- func (e *NotificationStatus) UnmarshalJSON(b []byte) error
- type OnCallNotificationRuleInput
- type OnCallNotificationRuleInputResolver
- type OnCallNotificationRuleResolver
- type OnCallOverview
- type OnCallServiceAssignment
- type OnCallShiftResolver
- type PageInfo
- type PhoneNumberInfo
- type Query
- type QueryResolver
- type ResolverRoot
- type RotationConnection
- type RotationResolver
- type RotationSearchOptions
- type SWOAction
- type SWOConnection
- type SWONode
- type SWOState
- type SWOStatus
- type ScheduleConnection
- type ScheduleResolver
- type ScheduleRuleInput
- type ScheduleRuleResolver
- type ScheduleSearchOptions
- type ScheduleTarget
- type ScheduleTargetInput
- type SendContactMethodVerificationInput
- type ServiceAlertStatsOptions
- type ServiceConnection
- type ServiceResolver
- type ServiceSearchOptions
- type SetAlertNoiseReasonInput
- type SetFavoriteInput
- type SetLabelInput
- type SetScheduleOnCallNotificationRulesInput
- type SetTemporaryScheduleInput
- type SlackChannelConnection
- type SlackChannelSearchOptions
- type SlackUserGroupConnection
- type SlackUserGroupSearchOptions
- type StatusUpdateState
- func (e StatusUpdateState) IsValid() bool
- func (e StatusUpdateState) MarshalGQL(w io.Writer)
- func (e StatusUpdateState) MarshalJSON() ([]byte, error)
- func (e StatusUpdateState) String() string
- func (e *StatusUpdateState) UnmarshalGQL(v any) error
- func (e *StatusUpdateState) UnmarshalJSON(b []byte) error
- type StringConnection
- type SystemLimit
- type SystemLimitInput
- type TargetResolver
- type TemporaryScheduleResolver
- type TimeSeriesBucket
- type TimeSeriesBucketResolver
- type TimeSeriesOptions
- type TimeZone
- type TimeZoneConnection
- type TimeZoneSearchOptions
- type TokenInfo
- type UpdateAlertsByServiceInput
- type UpdateAlertsInput
- type UpdateBasicAuthInput
- type UpdateEscalationPolicyInput
- type UpdateEscalationPolicyStepInput
- type UpdateEscalationPolicyStepInputResolver
- type UpdateGQLAPIKeyInput
- type UpdateHeartbeatMonitorInput
- type UpdateKeyConfigInput
- type UpdateRotationInput
- type UpdateScheduleInput
- type UpdateServiceInput
- type UpdateUserCalendarSubscriptionInput
- type UpdateUserContactMethodInput
- type UpdateUserInput
- type UpdateUserOverrideInput
- type UserCalendarSubscriptionResolver
- type UserConnection
- type UserContactMethodResolver
- type UserNotificationRuleResolver
- type UserOverrideConnection
- type UserOverrideResolver
- type UserOverrideSearchOptions
- type UserResolver
- type UserRole
- type UserSearchOptions
- type UserSession
- type VerifyContactMethodInput
Constants ¶
This section is empty.
Variables ¶
var AllAlertSearchSort = []AlertSearchSort{ AlertSearchSortStatusID, AlertSearchSortDateID, AlertSearchSortDateIDReverse, }
var AllAlertStatus = []AlertStatus{ AlertStatusStatusAcknowledged, AlertStatusStatusClosed, AlertStatusStatusUnacknowledged, }
var AllConfigType = []ConfigType{ ConfigTypeString, ConfigTypeStringList, ConfigTypeInteger, ConfigTypeBoolean, }
var AllContactMethodType = []ContactMethodType{ ContactMethodTypeSms, ContactMethodTypeVoice, ContactMethodTypeEmail, ContactMethodTypeWebhook, ContactMethodTypeSLACkDm, }
var AllErrorCode = []ErrorCode{ ErrorCodeInvalidInputValue, ErrorCodeInvalidDestFieldValue, ErrorCodeInvalidMapFieldValue, ErrorCodeExprTooComplex, }
var AllIntegrationKeyType = []IntegrationKeyType{ IntegrationKeyTypeGeneric, IntegrationKeyTypeGrafana, IntegrationKeyTypeSite24x7, IntegrationKeyTypePrometheusAlertmanager, IntegrationKeyTypeEmail, IntegrationKeyTypeUniversal, }
var AllNotificationStatus = []NotificationStatus{ NotificationStatusOk, NotificationStatusWarn, NotificationStatusError, }
var AllSWOAction = []SWOAction{ SWOActionReset, SWOActionExecute, }
var AllSWOState = []SWOState{ SWOStateUnknown, SWOStateResetting, SWOStateIdle, SWOStateSyncing, SWOStatePausing, SWOStateExecuting, SWOStateDone, }
var AllStatusUpdateState = []StatusUpdateState{ StatusUpdateStateDisabled, StatusUpdateStateEnabled, StatusUpdateStateEnabledForced, StatusUpdateStateDisabledForced, }
var AllUserRole = []UserRole{ UserRoleUnknown, UserRoleUser, UserRoleAdmin, }
Functions ¶
func ApplyConfigValues ¶
ApplyConfigValues will apply a list of ConfigValues to a Config struct.
func ApplyLimitValues ¶ added in v0.25.0
ApplyLimitValues will apply a list of LimitValues to a Limit struct.
func ExprIsLiteral ¶ added in v0.33.0
ExprIsLiteral returns true if the node is a literal value (scalar or array of scalar values).
func MarshalExprBooleanExpression ¶ added in v0.33.0
func MarshalExprExpression ¶ added in v0.33.0
func MarshalExprIdentifier ¶ added in v0.33.0
func MarshalExprOperator ¶ added in v0.33.0
func MarshalExprStringExpression ¶ added in v0.33.0
func MarshalExprStringMap ¶ added in v0.33.0
func MarshalStringMap ¶ added in v0.33.0
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func QueryFields ¶ added in v0.32.0
QueryFields will return a list of all fields that the given query references.
func SchemaFields ¶ added in v0.32.0
func SchemaFields() []string
SchemaFields will return a list of all fields in the schema.
func UnmarshalExprBooleanExpression ¶ added in v0.33.0
func UnmarshalExprExpression ¶ added in v0.33.0
func UnmarshalExprIdentifier ¶ added in v0.33.0
func UnmarshalExprOperator ¶ added in v0.33.0
func UnmarshalExprStringExpression ¶ added in v0.33.0
func UnmarshalExprStringMap ¶ added in v0.33.0
func UnmarshalExprValue ¶ added in v0.33.0
func UnmarshalISOTimestamp ¶
func UnmarshalStringMap ¶ added in v0.33.0
func UnmarshalUUID ¶ added in v0.33.0
Types ¶
type AlertConnection ¶
type AlertDataPoint ¶ added in v0.30.0
type AlertLogEntryConnection ¶ added in v0.23.0
type AlertLogEntryResolver ¶ added in v0.23.0
type AlertMetadata ¶ added in v0.33.0
type AlertMetadataInput ¶ added in v0.33.0
type AlertMetricResolver ¶ added in v0.30.0
type AlertMetricResolver interface {
TimeToAck(ctx context.Context, obj *alertmetrics.Metric) (*timeutil.ISODuration, error)
TimeToClose(ctx context.Context, obj *alertmetrics.Metric) (*timeutil.ISODuration, error)
}
type AlertMetricsOptions ¶ added in v0.30.0
type AlertMetricsOptions struct {
RInterval timeutil.ISORInterval `json:"rInterval"`
FilterByServiceID []string `json:"filterByServiceID,omitempty"`
}
type AlertPendingNotification ¶ added in v0.29.0
type AlertPendingNotification struct {
Destination string `json:"destination"`
}
type AlertRecentEventsOptions ¶ added in v0.23.0
type AlertResolver ¶
type AlertResolver interface {
ID(ctx context.Context, obj *alert.Alert) (string, error)
AlertID(ctx context.Context, obj *alert.Alert) (int, error)
Status(ctx context.Context, obj *alert.Alert) (AlertStatus, error)
Service(ctx context.Context, obj *alert.Alert) (*service.Service, error)
State(ctx context.Context, obj *alert.Alert) (*alert.State, error)
RecentEvents(ctx context.Context, obj *alert.Alert, input *AlertRecentEventsOptions) (*AlertLogEntryConnection, error)
PendingNotifications(ctx context.Context, obj *alert.Alert) ([]AlertPendingNotification, error)
Metrics(ctx context.Context, obj *alert.Alert) (*alertmetrics.Metric, error)
NoiseReason(ctx context.Context, obj *alert.Alert) (*string, error)
Meta(ctx context.Context, obj *alert.Alert) ([]AlertMetadata, error)
MetaValue(ctx context.Context, obj *alert.Alert, key string) (string, error)
}
type AlertSearchOptions ¶
type AlertSearchOptions struct {
FilterByStatus []AlertStatus `json:"filterByStatus,omitempty"`
FilterByServiceID []string `json:"filterByServiceID,omitempty"`
Search *string `json:"search,omitempty"`
First *int `json:"first,omitempty"`
After *string `json:"after,omitempty"`
FavoritesOnly *bool `json:"favoritesOnly,omitempty"`
IncludeNotified *bool `json:"includeNotified,omitempty"`
Omit []int `json:"omit,omitempty"`
Sort *AlertSearchSort `json:"sort,omitempty"`
CreatedBefore *time.Time `json:"createdBefore,omitempty"`
NotCreatedBefore *time.Time `json:"notCreatedBefore,omitempty"`
ClosedBefore *time.Time `json:"closedBefore,omitempty"`
NotClosedBefore *time.Time `json:"notClosedBefore,omitempty"`
}
type AlertSearchSort ¶ added in v0.26.0
type AlertSearchSort string
const ( AlertSearchSortStatusID AlertSearchSort = "statusID" AlertSearchSortDateID AlertSearchSort = "dateID" AlertSearchSortDateIDReverse AlertSearchSort = "dateIDReverse" )
func (AlertSearchSort) IsValid ¶ added in v0.26.0
func (e AlertSearchSort) IsValid() bool
func (AlertSearchSort) MarshalGQL ¶ added in v0.26.0
func (e AlertSearchSort) MarshalGQL(w io.Writer)
func (AlertSearchSort) MarshalJSON ¶ added in v0.34.0
func (e AlertSearchSort) MarshalJSON() ([]byte, error)
func (AlertSearchSort) String ¶ added in v0.26.0
func (e AlertSearchSort) String() string
func (*AlertSearchSort) UnmarshalGQL ¶ added in v0.26.0
func (e *AlertSearchSort) UnmarshalGQL(v any) error
func (*AlertSearchSort) UnmarshalJSON ¶ added in v0.34.0
func (e *AlertSearchSort) UnmarshalJSON(b []byte) error
type AlertStats ¶ added in v0.34.0
type AlertStats struct {
AvgAckSec []TimeSeriesBucket `json:"avgAckSec"`
AvgCloseSec []TimeSeriesBucket `json:"avgCloseSec"`
AlertCount []TimeSeriesBucket `json:"alertCount"`
EscalatedCount []TimeSeriesBucket `json:"escalatedCount"`
}
AlertStats returns aggregated statistics about alerts.
type AlertStatus ¶
type AlertStatus string
const ( AlertStatusStatusAcknowledged AlertStatus = "StatusAcknowledged" AlertStatusStatusClosed AlertStatus = "StatusClosed" AlertStatusStatusUnacknowledged AlertStatus = "StatusUnacknowledged" )
func (AlertStatus) IsValid ¶
func (e AlertStatus) IsValid() bool
func (AlertStatus) MarshalGQL ¶
func (e AlertStatus) MarshalGQL(w io.Writer)
func (AlertStatus) MarshalJSON ¶ added in v0.34.0
func (e AlertStatus) MarshalJSON() ([]byte, error)
func (AlertStatus) String ¶
func (e AlertStatus) String() string
func (*AlertStatus) UnmarshalGQL ¶
func (e *AlertStatus) UnmarshalGQL(v any) error
func (*AlertStatus) UnmarshalJSON ¶ added in v0.34.0
func (e *AlertStatus) UnmarshalJSON(b []byte) error
type AlertsByStatus ¶ added in v0.34.0
type AuthSubjectConnection ¶
type AuthSubjectConnection struct {
Nodes []user.AuthSubject `json:"nodes"`
PageInfo *PageInfo `json:"pageInfo"`
}
type CalcRotationHandoffTimesInput ¶ added in v0.27.0
type CalcRotationHandoffTimesInput struct {
Handoff time.Time `json:"handoff"`
From *time.Time `json:"from,omitempty"`
TimeZone string `json:"timeZone"`
// Only accurate for hourly-type rotations. Use shiftLength instead.
ShiftLengthHours *int `json:"shiftLengthHours,omitempty"`
ShiftLength *timeutil.ISODuration `json:"shiftLength,omitempty"`
Count int `json:"count"`
}
type Clause ¶ added in v0.33.0
type Clause struct {
Field ast1.Node `json:"field"`
Operator string `json:"operator"`
// Value is a constant value that the field should be compared against.
Value ast1.Node `json:"value"`
// Negate indicates whether the clause should be negated (e.g., not contains vs. contains).
Negate bool `json:"negate"`
}
type ClauseInput ¶ added in v0.33.0
type ClauseInput struct {
Field ast1.Node `json:"field"`
Operator string `json:"operator"`
// Value is a constant value that the field should be compared against.
Value ast1.Node `json:"value"`
// Negate indicates whether the clause should be negated (e.g., not contains vs. contains).
Negate bool `json:"negate"`
}
type ClearTemporarySchedulesInput ¶ added in v0.27.0
type CloseMatchingAlertInput ¶ added in v0.32.0
type CloseMatchingAlertInput struct {
ServiceID string `json:"serviceID"`
// Summary (and details) will match an alert with the same values.
//
// They can be omitted if the dedup field is provided.
Summary *string `json:"summary,omitempty"`
Details *string `json:"details,omitempty"`
// Preferred over providing the summary & details.
Dedup *string `json:"dedup,omitempty"`
}
type ComplexityRoot ¶
type ComplexityRoot struct {
Action struct {
Dest func(childComplexity int) int
Params func(childComplexity int) int
}
Alert struct {
AlertID func(childComplexity int) int
CreatedAt func(childComplexity int) int
Details func(childComplexity int) int
ID func(childComplexity int) int
Meta func(childComplexity int) int
MetaValue func(childComplexity int, key string) int
Metrics func(childComplexity int) int
NoiseReason func(childComplexity int) int
PendingNotifications func(childComplexity int) int
RecentEvents func(childComplexity int, input *AlertRecentEventsOptions) int
Service func(childComplexity int) int
ServiceID func(childComplexity int) int
State func(childComplexity int) int
Status func(childComplexity int) int
Summary func(childComplexity int) int
}
AlertConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
AlertDataPoint struct {
AlertCount func(childComplexity int) int
Timestamp func(childComplexity int) int
}
AlertLogEntry struct {
ID func(childComplexity int) int
Message func(childComplexity int) int
MessageID func(childComplexity int) int
State func(childComplexity int) int
Timestamp func(childComplexity int) int
}
AlertLogEntryConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
AlertMetadata struct {
Key func(childComplexity int) int
Value func(childComplexity int) int
}
AlertMetric struct {
ClosedAt func(childComplexity int) int
Escalated func(childComplexity int) int
TimeToAck func(childComplexity int) int
TimeToClose func(childComplexity int) int
}
AlertPendingNotification struct {
Destination func(childComplexity int) int
}
AlertState struct {
LastEscalation func(childComplexity int) int
RepeatCount func(childComplexity int) int
StepNumber func(childComplexity int) int
}
AlertStats struct {
AlertCount func(childComplexity int) int
AvgAckSec func(childComplexity int) int
AvgCloseSec func(childComplexity int) int
EscalatedCount func(childComplexity int) int
}
AlertsByStatus struct {
Acked func(childComplexity int) int
Closed func(childComplexity int) int
Unacked func(childComplexity int) int
}
AuthSubject struct {
ProviderID func(childComplexity int) int
SubjectID func(childComplexity int) int
UserID func(childComplexity int) int
}
AuthSubjectConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
Clause struct {
Field func(childComplexity int) int
Negate func(childComplexity int) int
Operator func(childComplexity int) int
Value func(childComplexity int) int
}
Condition struct {
Clauses func(childComplexity int) int
}
ConfigHint struct {
ID func(childComplexity int) int
Value func(childComplexity int) int
}
ConfigValue struct {
Deprecated func(childComplexity int) int
Description func(childComplexity int) int
ID func(childComplexity int) int
Password func(childComplexity int) int
Type func(childComplexity int) int
Value func(childComplexity int) int
}
CreatedGQLAPIKey struct {
ID func(childComplexity int) int
Token func(childComplexity int) int
}
DebugCarrierInfo struct {
MobileCountryCode func(childComplexity int) int
MobileNetworkCode func(childComplexity int) int
Name func(childComplexity int) int
Type func(childComplexity int) int
}
DebugMessage struct {
AlertID func(childComplexity int) int
CreatedAt func(childComplexity int) int
Destination func(childComplexity int) int
ID func(childComplexity int) int
ProviderID func(childComplexity int) int
RetryCount func(childComplexity int) int
SentAt func(childComplexity int) int
ServiceID func(childComplexity int) int
ServiceName func(childComplexity int) int
Source func(childComplexity int) int
Status func(childComplexity int) int
Type func(childComplexity int) int
UpdatedAt func(childComplexity int) int
UserID func(childComplexity int) int
UserName func(childComplexity int) int
}
DebugMessageStatusInfo struct {
State func(childComplexity int) int
}
DebugSendSMSInfo struct {
FromNumber func(childComplexity int) int
ID func(childComplexity int) int
ProviderURL func(childComplexity int) int
}
Destination struct {
Args func(childComplexity int) int
DisplayInfo func(childComplexity int) int
Type func(childComplexity int) int
Values func(childComplexity int) int
}
DestinationDisplayInfo struct {
IconAltText func(childComplexity int) int
IconURL func(childComplexity int) int
LinkURL func(childComplexity int) int
Text func(childComplexity int) int
}
DestinationDisplayInfoError struct {
Error func(childComplexity int) int
}
DestinationFieldConfig struct {
FieldID func(childComplexity int) int
Hint func(childComplexity int) int
HintURL func(childComplexity int) int
InputType func(childComplexity int) int
Label func(childComplexity int) int
PlaceholderText func(childComplexity int) int
Prefix func(childComplexity int) int
SupportsSearch func(childComplexity int) int
SupportsValidation func(childComplexity int) int
}
DestinationTypeInfo struct {
DynamicParams func(childComplexity int) int
Enabled func(childComplexity int) int
IconAltText func(childComplexity int) int
IconURL func(childComplexity int) int
IsContactMethod func(childComplexity int) int
IsDynamicAction func(childComplexity int) int
IsEPTarget func(childComplexity int) int
IsSchedOnCallNotify func(childComplexity int) int
Name func(childComplexity int) int
RequiredFields func(childComplexity int) int
StatusUpdatesRequired func(childComplexity int) int
SupportsStatusUpdates func(childComplexity int) int
Type func(childComplexity int) int
UserDisclaimer func(childComplexity int) int
}
DynamicParamConfig struct {
DefaultValue func(childComplexity int) int
Hint func(childComplexity int) int
HintURL func(childComplexity int) int
Label func(childComplexity int) int
ParamID func(childComplexity int) int
}
EscalationPolicy struct {
AssignedTo func(childComplexity int) int
Description func(childComplexity int) int
ID func(childComplexity int) int
IsFavorite func(childComplexity int) int
Name func(childComplexity int) int
Notices func(childComplexity int) int
Repeat func(childComplexity int) int
Steps func(childComplexity int) int
}
EscalationPolicyConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
EscalationPolicyStep struct {
Actions func(childComplexity int) int
DelayMinutes func(childComplexity int) int
EscalationPolicy func(childComplexity int) int
ID func(childComplexity int) int
StepNumber func(childComplexity int) int
Targets func(childComplexity int) int
}
Expr struct {
ConditionToExpr func(childComplexity int, input ConditionToExprInput) int
ExprToCondition func(childComplexity int, input ExprToConditionInput) int
}
FieldSearchConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
FieldSearchResult struct {
FieldID func(childComplexity int) int
IsFavorite func(childComplexity int) int
Label func(childComplexity int) int
Value func(childComplexity int) int
}
FieldValuePair struct {
FieldID func(childComplexity int) int
Value func(childComplexity int) int
}
GQLAPIKey struct {
CreatedAt func(childComplexity int) int
CreatedBy func(childComplexity int) int
Description func(childComplexity int) int
ExpiresAt func(childComplexity int) int
ID func(childComplexity int) int
LastUsed func(childComplexity int) int
Name func(childComplexity int) int
Query func(childComplexity int) int
Role func(childComplexity int) int
UpdatedAt func(childComplexity int) int
UpdatedBy func(childComplexity int) int
}
GQLAPIKeyUsage struct {
IP func(childComplexity int) int
Time func(childComplexity int) int
Ua func(childComplexity int) int
}
HeartbeatMonitor struct {
AdditionalDetails func(childComplexity int) int
Href func(childComplexity int) int
ID func(childComplexity int) int
LastHeartbeat func(childComplexity int) int
LastState func(childComplexity int) int
Muted func(childComplexity int) int
Name func(childComplexity int) int
ServiceID func(childComplexity int) int
TimeoutMinutes func(childComplexity int) int
}
IntegrationKey struct {
Config func(childComplexity int) int
ExternalSystemName func(childComplexity int) int
Href func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
ServiceID func(childComplexity int) int
TokenInfo func(childComplexity int) int
Type func(childComplexity int) int
}
IntegrationKeyConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
IntegrationKeyTypeInfo struct {
Enabled func(childComplexity int) int
ID func(childComplexity int) int
Label func(childComplexity int) int
Name func(childComplexity int) int
}
KeyConfig struct {
DefaultActions func(childComplexity int) int
OneRule func(childComplexity int, id string) int
Rules func(childComplexity int) int
}
KeyRule struct {
Actions func(childComplexity int) int
ConditionExpr func(childComplexity int) int
ContinueAfterMatch func(childComplexity int) int
Description func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
}
Label struct {
Key func(childComplexity int) int
Value func(childComplexity int) int
}
LabelConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
LinkAccountInfo struct {
AlertID func(childComplexity int) int
AlertNewStatus func(childComplexity int) int
UserDetails func(childComplexity int) int
}
MessageLogConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
Stats func(childComplexity int) int
}
MessageLogConnectionStats struct {
TimeSeries func(childComplexity int, input TimeSeriesOptions) int
}
MessageStatusHistory struct {
Details func(childComplexity int) int
Status func(childComplexity int) int
Timestamp func(childComplexity int) int
}
Mutation struct {
AddAuthSubject func(childComplexity int, input user.AuthSubject) int
ClearTemporarySchedules func(childComplexity int, input ClearTemporarySchedulesInput) int
CloseMatchingAlert func(childComplexity int, input CloseMatchingAlertInput) int
CreateAlert func(childComplexity int, input CreateAlertInput) int
CreateBasicAuth func(childComplexity int, input CreateBasicAuthInput) int
CreateEscalationPolicy func(childComplexity int, input CreateEscalationPolicyInput) int
CreateEscalationPolicyStep func(childComplexity int, input CreateEscalationPolicyStepInput) int
CreateGQLAPIKey func(childComplexity int, input CreateGQLAPIKeyInput) int
CreateHeartbeatMonitor func(childComplexity int, input CreateHeartbeatMonitorInput) int
CreateIntegrationKey func(childComplexity int, input CreateIntegrationKeyInput) int
CreateRotation func(childComplexity int, input CreateRotationInput) int
CreateSchedule func(childComplexity int, input CreateScheduleInput) int
CreateService func(childComplexity int, input CreateServiceInput) int
CreateUser func(childComplexity int, input CreateUserInput) int
CreateUserCalendarSubscription func(childComplexity int, input CreateUserCalendarSubscriptionInput) int
CreateUserContactMethod func(childComplexity int, input CreateUserContactMethodInput) int
CreateUserNotificationRule func(childComplexity int, input CreateUserNotificationRuleInput) int
CreateUserOverride func(childComplexity int, input CreateUserOverrideInput) int
DebugCarrierInfo func(childComplexity int, input DebugCarrierInfoInput) int
DebugSendSms func(childComplexity int, input DebugSendSMSInput) int
DeleteAll func(childComplexity int, input []assignment.RawTarget) int
DeleteAuthSubject func(childComplexity int, input user.AuthSubject) int
DeleteGQLAPIKey func(childComplexity int, id string) int
DeleteSecondaryToken func(childComplexity int, id string) int
EndAllAuthSessionsByCurrentUser func(childComplexity int) int
EscalateAlerts func(childComplexity int, input []int) int
GenerateKeyToken func(childComplexity int, id string) int
LinkAccount func(childComplexity int, token string) int
PromoteSecondaryToken func(childComplexity int, id string) int
ReEncryptKeyringsAndConfig func(childComplexity int) int
SendContactMethodVerification func(childComplexity int, input SendContactMethodVerificationInput) int
SetAlertNoiseReason func(childComplexity int, input SetAlertNoiseReasonInput) int
SetConfig func(childComplexity int, input []ConfigValueInput) int
SetFavorite func(childComplexity int, input SetFavoriteInput) int
SetLabel func(childComplexity int, input SetLabelInput) int
SetScheduleOnCallNotificationRules func(childComplexity int, input SetScheduleOnCallNotificationRulesInput) int
SetSystemLimits func(childComplexity int, input []SystemLimitInput) int
SetTemporarySchedule func(childComplexity int, input SetTemporaryScheduleInput) int
SwoAction func(childComplexity int, action SWOAction) int
TestContactMethod func(childComplexity int, id string) int
UpdateAlerts func(childComplexity int, input UpdateAlertsInput) int
UpdateAlertsByService func(childComplexity int, input UpdateAlertsByServiceInput) int
UpdateBasicAuth func(childComplexity int, input UpdateBasicAuthInput) int
UpdateEscalationPolicy func(childComplexity int, input UpdateEscalationPolicyInput) int
UpdateEscalationPolicyStep func(childComplexity int, input UpdateEscalationPolicyStepInput) int
UpdateGQLAPIKey func(childComplexity int, input UpdateGQLAPIKeyInput) int
UpdateHeartbeatMonitor func(childComplexity int, input UpdateHeartbeatMonitorInput) int
UpdateKeyConfig func(childComplexity int, input UpdateKeyConfigInput) int
UpdateRotation func(childComplexity int, input UpdateRotationInput) int
UpdateSchedule func(childComplexity int, input UpdateScheduleInput) int
UpdateScheduleTarget func(childComplexity int, input ScheduleTargetInput) int
UpdateService func(childComplexity int, input UpdateServiceInput) int
UpdateUser func(childComplexity int, input UpdateUserInput) int
UpdateUserCalendarSubscription func(childComplexity int, input UpdateUserCalendarSubscriptionInput) int
UpdateUserContactMethod func(childComplexity int, input UpdateUserContactMethodInput) int
UpdateUserOverride func(childComplexity int, input UpdateUserOverrideInput) int
VerifyContactMethod func(childComplexity int, input VerifyContactMethodInput) int
}
Notice struct {
Details func(childComplexity int) int
Message func(childComplexity int) int
Type func(childComplexity int) int
}
NotificationState struct {
Details func(childComplexity int) int
FormattedSrcValue func(childComplexity int) int
Status func(childComplexity int) int
}
OnCallNotificationRule struct {
Dest func(childComplexity int) int
ID func(childComplexity int) int
Target func(childComplexity int) int
Time func(childComplexity int) int
WeekdayFilter func(childComplexity int) int
}
OnCallOverview struct {
ServiceAssignments func(childComplexity int) int
ServiceCount func(childComplexity int) int
}
OnCallServiceAssignment struct {
EscalationPolicyID func(childComplexity int) int
EscalationPolicyName func(childComplexity int) int
ServiceID func(childComplexity int) int
ServiceName func(childComplexity int) int
StepNumber func(childComplexity int) int
}
OnCallShift struct {
End func(childComplexity int) int
Start func(childComplexity int) int
Truncated func(childComplexity int) int
User func(childComplexity int) int
UserID func(childComplexity int) int
}
PageInfo struct {
EndCursor func(childComplexity int) int
HasNextPage func(childComplexity int) int
}
PhoneNumberInfo struct {
CountryCode func(childComplexity int) int
Error func(childComplexity int) int
Formatted func(childComplexity int) int
ID func(childComplexity int) int
RegionCode func(childComplexity int) int
Valid func(childComplexity int) int
}
Query struct {
ActionInputValidate func(childComplexity int, input gadb.UIKActionV1) int
Alert func(childComplexity int, id int) int
Alerts func(childComplexity int, input *AlertSearchOptions) int
AuthSubjectsForProvider func(childComplexity int, first *int, after *string, providerID string) int
CalcRotationHandoffTimes func(childComplexity int, input *CalcRotationHandoffTimesInput) int
Config func(childComplexity int, all *bool) int
ConfigHints func(childComplexity int) int
DebugMessageStatus func(childComplexity int, input DebugMessageStatusInput) int
DebugMessages func(childComplexity int, input *DebugMessagesInput) int
DestinationDisplayInfo func(childComplexity int, input gadb.DestV1) int
DestinationFieldSearch func(childComplexity int, input DestinationFieldSearchInput) int
DestinationFieldValidate func(childComplexity int, input DestinationFieldValidateInput) int
DestinationFieldValueName func(childComplexity int, input DestinationFieldValidateInput) int
DestinationTypes func(childComplexity int, isDynamicAction *bool) int
EscalationPolicies func(childComplexity int, input *EscalationPolicySearchOptions) int
EscalationPolicy func(childComplexity int, id string) int
ExperimentalFlags func(childComplexity int) int
Expr func(childComplexity int) int
GenerateSlackAppManifest func(childComplexity int) int
GqlAPIKeys func(childComplexity int) int
HeartbeatMonitor func(childComplexity int, id string) int
IntegrationKey func(childComplexity int, id string) int
IntegrationKeyTypes func(childComplexity int) int
IntegrationKeys func(childComplexity int, input *IntegrationKeySearchOptions) int
LabelKeys func(childComplexity int, input *LabelKeySearchOptions) int
LabelValues func(childComplexity int, input *LabelValueSearchOptions) int
Labels func(childComplexity int, input *LabelSearchOptions) int
LinkAccountInfo func(childComplexity int, token string) int
MessageLogs func(childComplexity int, input *MessageLogSearchOptions) int
MessageStatusHistory func(childComplexity int, id string) int
PhoneNumberInfo func(childComplexity int, number string) int
Rotation func(childComplexity int, id string) int
Rotations func(childComplexity int, input *RotationSearchOptions) int
Schedule func(childComplexity int, id string) int
Schedules func(childComplexity int, input *ScheduleSearchOptions) int
Service func(childComplexity int, id string) int
Services func(childComplexity int, input *ServiceSearchOptions) int
SlackChannel func(childComplexity int, id string) int
SlackChannels func(childComplexity int, input *SlackChannelSearchOptions) int
SlackUserGroup func(childComplexity int, id string) int
SlackUserGroups func(childComplexity int, input *SlackUserGroupSearchOptions) int
SwoStatus func(childComplexity int) int
SystemLimits func(childComplexity int) int
TimeZones func(childComplexity int, input *TimeZoneSearchOptions) int
User func(childComplexity int, id *string) int
UserCalendarSubscription func(childComplexity int, id string) int
UserContactMethod func(childComplexity int, id string) int
UserOverride func(childComplexity int, id string) int
UserOverrides func(childComplexity int, input *UserOverrideSearchOptions) int
Users func(childComplexity int, input *UserSearchOptions, first *int, after *string, search *string) int
}
Rotation struct {
ActiveUserIndex func(childComplexity int) int
Description func(childComplexity int) int
ID func(childComplexity int) int
IsFavorite func(childComplexity int) int
Name func(childComplexity int) int
NextHandoffTimes func(childComplexity int, num *int) int
ShiftLength func(childComplexity int) int
Start func(childComplexity int) int
TimeZone func(childComplexity int) int
Type func(childComplexity int) int
UserIDs func(childComplexity int) int
Users func(childComplexity int) int
}
RotationConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
SWOConnection struct {
Count func(childComplexity int) int
IsNext func(childComplexity int) int
Name func(childComplexity int) int
Type func(childComplexity int) int
Version func(childComplexity int) int
}
SWONode struct {
CanExec func(childComplexity int) int
ConfigError func(childComplexity int) int
Connections func(childComplexity int) int
ID func(childComplexity int) int
IsLeader func(childComplexity int) int
Uptime func(childComplexity int) int
}
SWOStatus struct {
LastError func(childComplexity int) int
LastStatus func(childComplexity int) int
MainDBVersion func(childComplexity int) int
NextDBVersion func(childComplexity int) int
Nodes func(childComplexity int) int
State func(childComplexity int) int
}
Schedule struct {
AssignedTo func(childComplexity int) int
Description func(childComplexity int) int
ID func(childComplexity int) int
IsFavorite func(childComplexity int) int
Name func(childComplexity int) int
OnCallNotificationRules func(childComplexity int) int
Shifts func(childComplexity int, start time.Time, end time.Time, userIDs []string) int
Target func(childComplexity int, input assignment.RawTarget) int
Targets func(childComplexity int) int
TemporarySchedules func(childComplexity int) int
TimeZone func(childComplexity int) int
}
ScheduleConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
ScheduleRule struct {
End func(childComplexity int) int
ID func(childComplexity int) int
ScheduleID func(childComplexity int) int
Start func(childComplexity int) int
Target func(childComplexity int) int
WeekdayFilter func(childComplexity int) int
}
ScheduleTarget struct {
Rules func(childComplexity int) int
ScheduleID func(childComplexity int) int
Target func(childComplexity int) int
}
Service struct {
AlertStats func(childComplexity int, input *ServiceAlertStatsOptions) int
AlertsByStatus func(childComplexity int) int
Description func(childComplexity int) int
EscalationPolicy func(childComplexity int) int
EscalationPolicyID func(childComplexity int) int
HeartbeatMonitors func(childComplexity int) int
ID func(childComplexity int) int
IntegrationKeys func(childComplexity int) int
IsFavorite func(childComplexity int) int
Labels func(childComplexity int) int
MaintenanceExpiresAt func(childComplexity int) int
Name func(childComplexity int) int
Notices func(childComplexity int) int
OnCallUsers func(childComplexity int) int
}
ServiceConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
ServiceOnCallUser struct {
StepNumber func(childComplexity int) int
UserID func(childComplexity int) int
UserName func(childComplexity int) int
}
SlackChannel struct {
ID func(childComplexity int) int
Name func(childComplexity int) int
TeamID func(childComplexity int) int
}
SlackChannelConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
SlackUserGroup struct {
Handle func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
}
SlackUserGroupConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
StringConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
SystemLimit struct {
Description func(childComplexity int) int
ID func(childComplexity int) int
Value func(childComplexity int) int
}
Target struct {
ID func(childComplexity int) int
Name func(childComplexity int) int
Type func(childComplexity int) int
}
TemporarySchedule struct {
End func(childComplexity int) int
Shifts func(childComplexity int) int
Start func(childComplexity int) int
}
TimeSeriesBucket struct {
Count func(childComplexity int) int
End func(childComplexity int) int
Start func(childComplexity int) int
Value func(childComplexity int) int
}
TimeZone struct {
ID func(childComplexity int) int
}
TimeZoneConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
TokenInfo struct {
PrimaryHint func(childComplexity int) int
SecondaryHint func(childComplexity int) int
}
User struct {
AlertStatusCMID func(childComplexity int) int
AssignedSchedules func(childComplexity int) int
AuthSubjects func(childComplexity int) int
CalendarSubscriptions func(childComplexity int) int
ContactMethods func(childComplexity int) int
Email func(childComplexity int) int
ID func(childComplexity int) int
IsFavorite func(childComplexity int) int
Name func(childComplexity int) int
NotificationRules func(childComplexity int) int
OnCallOverview func(childComplexity int) int
OnCallSteps func(childComplexity int) int
Role func(childComplexity int) int
Sessions func(childComplexity int) int
}
UserCalendarSubscription struct {
Disabled func(childComplexity int) int
FullSchedule func(childComplexity int) int
ID func(childComplexity int) int
LastAccess func(childComplexity int) int
Name func(childComplexity int) int
ReminderMinutes func(childComplexity int) int
Schedule func(childComplexity int) int
ScheduleID func(childComplexity int) int
URL func(childComplexity int) int
}
UserConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
UserContactMethod struct {
Dest func(childComplexity int) int
Disabled func(childComplexity int) int
FormattedValue func(childComplexity int) int
ID func(childComplexity int) int
LastTestMessageState func(childComplexity int) int
LastTestVerifyAt func(childComplexity int) int
LastVerifyMessageState func(childComplexity int) int
Name func(childComplexity int) int
Pending func(childComplexity int) int
StatusUpdates func(childComplexity int) int
Type func(childComplexity int) int
Value func(childComplexity int) int
}
UserNotificationRule struct {
ContactMethod func(childComplexity int) int
ContactMethodID func(childComplexity int) int
DelayMinutes func(childComplexity int) int
ID func(childComplexity int) int
}
UserOverride struct {
AddUser func(childComplexity int) int
AddUserID func(childComplexity int) int
End func(childComplexity int) int
ID func(childComplexity int) int
RemoveUser func(childComplexity int) int
RemoveUserID func(childComplexity int) int
Start func(childComplexity int) int
Target func(childComplexity int) int
}
UserOverrideConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
UserSession struct {
CreatedAt func(childComplexity int) int
Current func(childComplexity int) int
ID func(childComplexity int) int
LastAccessAt func(childComplexity int) int
UserAgent func(childComplexity int) int
}
}
type ConditionInput ¶ added in v0.33.0
type ConditionInput struct {
Clauses []ClauseInput `json:"clauses"`
}
type ConditionToExprInput ¶ added in v0.33.0
type ConditionToExprInput struct {
Condition *ConditionInput `json:"condition"`
}
type Config ¶
type Config struct {
Schema *ast.Schema
Resolvers ResolverRoot
Directives DirectiveRoot
Complexity ComplexityRoot
}
type ConfigHint ¶ added in v0.25.0
func MapConfigHints ¶ added in v0.25.0
func MapConfigHints(cfg config.Hints) []ConfigHint
type ConfigType ¶
type ConfigType string
const ( ConfigTypeString ConfigType = "string" ConfigTypeStringList ConfigType = "stringList" ConfigTypeInteger ConfigType = "integer" ConfigTypeBoolean ConfigType = "boolean" )
func (ConfigType) IsValid ¶
func (e ConfigType) IsValid() bool
func (ConfigType) MarshalGQL ¶
func (e ConfigType) MarshalGQL(w io.Writer)
func (ConfigType) MarshalJSON ¶ added in v0.34.0
func (e ConfigType) MarshalJSON() ([]byte, error)
func (ConfigType) String ¶
func (e ConfigType) String() string
func (*ConfigType) UnmarshalGQL ¶
func (e *ConfigType) UnmarshalGQL(v any) error
func (*ConfigType) UnmarshalJSON ¶ added in v0.34.0
func (e *ConfigType) UnmarshalJSON(b []byte) error
type ConfigValue ¶
type ConfigValue struct {
ID string `json:"id"`
Description string `json:"description"`
Value string `json:"value"`
Type ConfigType `json:"type"`
Password bool `json:"password"`
Deprecated string `json:"deprecated"`
}
func MapConfigValues ¶
func MapConfigValues(cfg config.Config) []ConfigValue
MapConfigValues will map a Config struct into a flat list of ConfigValue structs.
func MapPublicConfigValues ¶
func MapPublicConfigValues(cfg config.Config) []ConfigValue
MapPublicConfigValues will map a Config struct into a flat list of ConfigValue structs.
type ConfigValueInput ¶
type ContactMethodType ¶ added in v0.33.0
type ContactMethodType string
const ( ContactMethodTypeSms ContactMethodType = "SMS" ContactMethodTypeVoice ContactMethodType = "VOICE" ContactMethodTypeEmail ContactMethodType = "EMAIL" ContactMethodTypeWebhook ContactMethodType = "WEBHOOK" ContactMethodTypeSLACkDm ContactMethodType = "SLACK_DM" )
func (ContactMethodType) IsValid ¶ added in v0.33.0
func (e ContactMethodType) IsValid() bool
func (ContactMethodType) MarshalGQL ¶ added in v0.33.0
func (e ContactMethodType) MarshalGQL(w io.Writer)
func (ContactMethodType) MarshalJSON ¶ added in v0.34.0
func (e ContactMethodType) MarshalJSON() ([]byte, error)
func (ContactMethodType) String ¶ added in v0.33.0
func (e ContactMethodType) String() string
func (*ContactMethodType) UnmarshalGQL ¶ added in v0.33.0
func (e *ContactMethodType) UnmarshalGQL(v any) error
func (*ContactMethodType) UnmarshalJSON ¶ added in v0.34.0
func (e *ContactMethodType) UnmarshalJSON(b []byte) error
type CreateAlertInput ¶ added in v0.23.0
type CreateAlertInput struct {
Summary string `json:"summary"`
Details *string `json:"details,omitempty"`
ServiceID string `json:"serviceID"`
// If true, summary and details will be automatically sanitized and truncated (if necessary).
Sanitize *bool `json:"sanitize,omitempty"`
// Dedup allows setting a unique value to de-duplicate multiple alerts.
//
// It can also be used to close an alert using closeMatchingAlert mutation.
Dedup *string `json:"dedup,omitempty"`
Meta []AlertMetadataInput `json:"meta,omitempty"`
}
type CreateBasicAuthInput ¶ added in v0.31.0
type CreateEscalationPolicyInput ¶
type CreateEscalationPolicyInput struct {
Name string `json:"name"`
Description *string `json:"description,omitempty"`
Repeat *int `json:"repeat,omitempty"`
Favorite *bool `json:"favorite,omitempty"`
Steps []CreateEscalationPolicyStepInput `json:"steps,omitempty"`
}
type CreateEscalationPolicyStepInput ¶
type CreateEscalationPolicyStepInput struct {
EscalationPolicyID *string `json:"escalationPolicyID,omitempty"`
DelayMinutes int `json:"delayMinutes"`
Targets []assignment.RawTarget `json:"targets,omitempty"`
NewRotation *CreateRotationInput `json:"newRotation,omitempty"`
NewSchedule *CreateScheduleInput `json:"newSchedule,omitempty"`
Actions []gadb.DestV1 `json:"actions,omitempty"`
}
type CreateEscalationPolicyStepInputResolver ¶ added in v0.33.0
type CreateEscalationPolicyStepInputResolver interface {
Targets(ctx context.Context, obj *CreateEscalationPolicyStepInput, data []assignment.RawTarget) error
}
type CreateGQLAPIKeyInput ¶ added in v0.32.0
type CreateHeartbeatMonitorInput ¶ added in v0.24.0
type CreateHeartbeatMonitorInput struct {
ServiceID *string `json:"serviceID,omitempty"`
Name string `json:"name"`
TimeoutMinutes int `json:"timeoutMinutes"`
AdditionalDetails *string `json:"additionalDetails,omitempty"`
// If non-empty, the monitor will be muted with this reason.
//
// Muting a monitor will prevent it from triggering new alerts, but existing
// alerts will remain active until closed or the monitor is healthy again.
Muted *string `json:"muted,omitempty"`
}
type CreateIntegrationKeyInput ¶
type CreateIntegrationKeyInput struct {
ServiceID *string `json:"serviceID,omitempty"`
Type IntegrationKeyType `json:"type"`
Name string `json:"name"`
// Name of the external system this key is managed by.
ExternalSystemName *string `json:"externalSystemName,omitempty"`
}
type CreateRotationInput ¶
type CreateRotationInput struct {
Name string `json:"name"`
Description *string `json:"description,omitempty"`
TimeZone string `json:"timeZone"`
Start time.Time `json:"start"`
Favorite *bool `json:"favorite,omitempty"`
Type rotation.Type `json:"type"`
ShiftLength *int `json:"shiftLength,omitempty"`
UserIDs []string `json:"userIDs,omitempty"`
}
type CreateScheduleInput ¶
type CreateScheduleInput struct {
Name string `json:"name"`
Description *string `json:"description,omitempty"`
TimeZone string `json:"timeZone"`
Favorite *bool `json:"favorite,omitempty"`
Targets []ScheduleTargetInput `json:"targets,omitempty"`
NewUserOverrides []CreateUserOverrideInput `json:"newUserOverrides,omitempty"`
}
type CreateServiceInput ¶
type CreateServiceInput struct {
Name string `json:"name"`
Description *string `json:"description,omitempty"`
Favorite *bool `json:"favorite,omitempty"`
EscalationPolicyID *string `json:"escalationPolicyID,omitempty"`
NewEscalationPolicy *CreateEscalationPolicyInput `json:"newEscalationPolicy,omitempty"`
NewIntegrationKeys []CreateIntegrationKeyInput `json:"newIntegrationKeys,omitempty"`
Labels []SetLabelInput `json:"labels,omitempty"`
NewHeartbeatMonitors []CreateHeartbeatMonitorInput `json:"newHeartbeatMonitors,omitempty"`
}
type CreateUserCalendarSubscriptionInput ¶ added in v0.25.0
type CreateUserContactMethodInput ¶
type CreateUserContactMethodInput struct {
UserID string `json:"userID"`
Type *ContactMethodType `json:"type,omitempty"`
Dest *gadb.DestV1 `json:"dest,omitempty"`
Name string `json:"name"`
// Only value or dest should be used at a time, never both.
Value *string `json:"value,omitempty"`
NewUserNotificationRule *CreateUserNotificationRuleInput `json:"newUserNotificationRule,omitempty"`
// If true, this contact method will receive status updates.
//
// Note: Some contact method types, like Slack, will always receive status updates and this value is ignored.
EnableStatusUpdates *bool `json:"enableStatusUpdates,omitempty"`
}
type CreateUserInput ¶ added in v0.28.0
type CreateUserOverrideInput ¶
type CreatedGQLAPIKey ¶ added in v0.32.0
type DebugCarrierInfoInput ¶ added in v0.25.0
type DebugCarrierInfoInput struct {
Number string `json:"number"`
}
type DebugMessage ¶ added in v0.30.0
type DebugMessage struct {
ID string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Type string `json:"type"`
Status string `json:"status"`
UserID *string `json:"userID,omitempty"`
UserName *string `json:"userName,omitempty"`
Source *string `json:"source,omitempty"`
Destination string `json:"destination"`
ServiceID *string `json:"serviceID,omitempty"`
ServiceName *string `json:"serviceName,omitempty"`
AlertID *int `json:"alertID,omitempty"`
ProviderID *string `json:"providerID,omitempty"`
SentAt *time.Time `json:"sentAt,omitempty"`
RetryCount int `json:"retryCount"`
}
type DebugMessageStatusInfo ¶ added in v0.29.0
type DebugMessageStatusInfo struct {
State *NotificationState `json:"state"`
}
type DebugMessageStatusInput ¶ added in v0.29.0
type DebugMessageStatusInput struct {
ProviderMessageID string `json:"providerMessageID"`
}
type DebugMessagesInput ¶ added in v0.30.0
type DebugSendSMSInfo ¶ added in v0.25.0
type DebugSendSMSInput ¶ added in v0.25.0
type DestinationDisplayInfoError ¶ added in v0.33.0
type DestinationDisplayInfoError struct {
// error message to display when the display info cannot be retrieved
Error string `json:"error"`
}
func (DestinationDisplayInfoError) IsInlineDisplayInfo ¶ added in v0.33.0
func (DestinationDisplayInfoError) IsInlineDisplayInfo()
type DestinationFieldSearchInput ¶ added in v0.32.0
type DestinationFieldSearchInput struct {
// the type of destination to search for
DestType string `json:"destType"`
// the ID of the input field to search for
FieldID string `json:"fieldID"`
// search string to match against
Search *string `json:"search,omitempty"`
// values/ids to omit from results
Omit []string `json:"omit,omitempty"`
// cursor to start search from
After *string `json:"after,omitempty"`
// number of results to return
First *int `json:"first,omitempty"`
}
type DestinationFieldValidateInput ¶ added in v0.32.0
type DestinationInputResolver ¶ added in v0.33.0
type DestinationResolver ¶ added in v0.32.0
type DirectiveRoot ¶
type ErrorCode ¶ added in v0.33.0
type ErrorCode string
Known error codes that the server can return.
These values will be returned in the `extensions.code` field of the error response.
const ( // The input value is invalid, the `path` field will contain the exact path to the invalid input. // // A separate error will be returned for each invalid field. ErrorCodeInvalidInputValue ErrorCode = "INVALID_INPUT_VALUE" // The `path` field contains the exact path to the DestinationInput that is invalid. // // The `extensions.fieldID` field contains the ID of the input field that is invalid. // // A separate error will be returned for each invalid field. ErrorCodeInvalidDestFieldValue ErrorCode = "INVALID_DEST_FIELD_VALUE" // The `path` field contains the exact path to the map that is invalid. // // The `extensions.key` field contains the key of the value that is invalid. // // A separate error will be returned for each invalid value. ErrorCodeInvalidMapFieldValue ErrorCode = "INVALID_MAP_FIELD_VALUE" // The expr expression is too complex to be converted to a Condition. ErrorCodeExprTooComplex ErrorCode = "EXPR_TOO_COMPLEX" )
func (ErrorCode) MarshalGQL ¶ added in v0.33.0
func (ErrorCode) MarshalJSON ¶ added in v0.34.0
func (*ErrorCode) UnmarshalGQL ¶ added in v0.33.0
func (*ErrorCode) UnmarshalJSON ¶ added in v0.34.0
type EscalationPolicyConnection ¶
type EscalationPolicyConnection struct {
Nodes []escalation.Policy `json:"nodes"`
PageInfo *PageInfo `json:"pageInfo"`
}
type EscalationPolicyResolver ¶
type EscalationPolicyResolver interface {
IsFavorite(ctx context.Context, obj *escalation.Policy) (bool, error)
AssignedTo(ctx context.Context, obj *escalation.Policy) ([]assignment.RawTarget, error)
Steps(ctx context.Context, obj *escalation.Policy) ([]escalation.Step, error)
Notices(ctx context.Context, obj *escalation.Policy) ([]notice.Notice, error)
}
type EscalationPolicySearchOptions ¶
type EscalationPolicySearchOptions struct {
First *int `json:"first,omitempty"`
After *string `json:"after,omitempty"`
Search *string `json:"search,omitempty"`
Omit []string `json:"omit,omitempty"`
// Include only favorited escalation policies in the results.
FavoritesOnly *bool `json:"favoritesOnly,omitempty"`
// Sort favorite escalation policies first.
FavoritesFirst *bool `json:"favoritesFirst,omitempty"`
}
type EscalationPolicyStepResolver ¶
type EscalationPolicyStepResolver interface {
Targets(ctx context.Context, obj *escalation.Step) ([]assignment.RawTarget, error)
EscalationPolicy(ctx context.Context, obj *escalation.Step) (*escalation.Policy, error)
Actions(ctx context.Context, obj *escalation.Step) ([]gadb.DestV1, error)
}
type Expr ¶ added in v0.33.0
type Expr struct {
// exprToCondition converts an Expr expression to a Condition.
ExprToCondition *Condition `json:"exprToCondition"`
// conditionToExpr converts a Condition to an Expr expression.
ConditionToExpr string `json:"conditionToExpr"`
}
Expr contains helpers for working with Expr expressions.
type ExprResolver ¶ added in v0.33.0
type ExprToConditionInput ¶ added in v0.33.0
type ExprToConditionInput struct {
Expr string `json:"expr"`
}
type FieldSearchConnection ¶ added in v0.33.0
type FieldSearchConnection struct {
Nodes []FieldSearchResult `json:"nodes"`
PageInfo *PageInfo `json:"pageInfo"`
}
FieldSearchConnection is a connection to a list of FieldSearchResult.
type FieldSearchResult ¶ added in v0.33.0
type FieldSearchResult struct {
// The ID of the input field that this value is for.
FieldID string `json:"fieldID"`
// The value of the input field.
Value string `json:"value"`
// The user-friendly text for this value of the input field (e.g., if the value is a user ID, label would be the user's name).
Label string `json:"label"`
// if true, this value is a favorite for the user, only set for search results
IsFavorite bool `json:"isFavorite"`
}
type FieldValueInput ¶ added in v0.32.0
type FieldValuePair ¶ added in v0.32.0
type GQLAPIKey ¶ added in v0.32.0
type GQLAPIKey struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
CreatedAt time.Time `json:"createdAt"`
CreatedBy *user.User `json:"createdBy,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
UpdatedBy *user.User `json:"updatedBy,omitempty"`
LastUsed *GQLAPIKeyUsage `json:"lastUsed,omitempty"`
ExpiresAt time.Time `json:"expiresAt"`
Query string `json:"query"`
Role UserRole `json:"role"`
}
type GQLAPIKeyResolver ¶ added in v0.32.0
type GQLAPIKeyUsage ¶ added in v0.32.0
type HeartbeatMonitorResolver ¶ added in v0.24.0
type InlineDisplayInfo ¶ added in v0.33.0
type InlineDisplayInfo interface {
IsInlineDisplayInfo()
}
type IntegrationKeyConnection ¶ added in v0.30.1
type IntegrationKeyConnection struct {
Nodes []integrationkey.IntegrationKey `json:"nodes"`
PageInfo *PageInfo `json:"pageInfo"`
}
type IntegrationKeyResolver ¶
type IntegrationKeyResolver interface {
Type(ctx context.Context, obj *integrationkey.IntegrationKey) (IntegrationKeyType, error)
Href(ctx context.Context, obj *integrationkey.IntegrationKey) (string, error)
Config(ctx context.Context, obj *integrationkey.IntegrationKey) (*gadb.UIKConfigV1, error)
TokenInfo(ctx context.Context, obj *integrationkey.IntegrationKey) (*TokenInfo, error)
}
type IntegrationKeySearchOptions ¶ added in v0.30.1
type IntegrationKeyType ¶
type IntegrationKeyType string
const ( IntegrationKeyTypeGeneric IntegrationKeyType = "generic" IntegrationKeyTypeGrafana IntegrationKeyType = "grafana" IntegrationKeyTypeSite24x7 IntegrationKeyType = "site24x7" IntegrationKeyTypePrometheusAlertmanager IntegrationKeyType = "prometheusAlertmanager" IntegrationKeyTypeEmail IntegrationKeyType = "email" IntegrationKeyTypeUniversal IntegrationKeyType = "universal" )
func (IntegrationKeyType) IsValid ¶
func (e IntegrationKeyType) IsValid() bool
func (IntegrationKeyType) MarshalGQL ¶
func (e IntegrationKeyType) MarshalGQL(w io.Writer)
func (IntegrationKeyType) MarshalJSON ¶ added in v0.34.0
func (e IntegrationKeyType) MarshalJSON() ([]byte, error)
func (IntegrationKeyType) String ¶
func (e IntegrationKeyType) String() string
func (*IntegrationKeyType) UnmarshalGQL ¶
func (e *IntegrationKeyType) UnmarshalGQL(v any) error
func (*IntegrationKeyType) UnmarshalJSON ¶ added in v0.34.0
func (e *IntegrationKeyType) UnmarshalJSON(b []byte) error
type IntegrationKeyTypeInfo ¶ added in v0.31.0
type IntegrationKeyTypeInfo struct {
ID string `json:"id"`
// User-displayable name of the integration key type.
Name string `json:"name"`
// User-displayable description of the integration key value (i.e., copy/paste instructions).
Label string `json:"label"`
// Indicates if the type is currently enabled.
Enabled bool `json:"enabled"`
}
type KeyConfigResolver ¶ added in v0.33.0
type LabelConnection ¶
type LabelKeySearchOptions ¶ added in v0.25.0
type LabelSearchOptions ¶
type LabelValueSearchOptions ¶ added in v0.25.0
type LinkAccountInfo ¶ added in v0.30.0
type LinkAccountInfo struct {
UserDetails string `json:"userDetails"`
AlertID *int `json:"alertID,omitempty"`
AlertNewStatus *AlertStatus `json:"alertNewStatus,omitempty"`
}
type MapValueError ¶ added in v0.33.0
MapValueError is an error type for map values.
func (MapValueError) ClientError ¶ added in v0.33.0
func (MapValueError) ClientError() bool
func (MapValueError) Error ¶ added in v0.33.0
func (m MapValueError) Error() string
type MessageLogConnection ¶ added in v0.30.1
type MessageLogConnection struct {
Nodes []DebugMessage `json:"nodes"`
PageInfo *PageInfo `json:"pageInfo"`
Stats *notification.SearchOptions `json:"stats"`
}
type MessageLogConnectionStatsResolver ¶ added in v0.31.0
type MessageLogConnectionStatsResolver interface {
TimeSeries(ctx context.Context, obj *notification.SearchOptions, input TimeSeriesOptions) ([]TimeSeriesBucket, error)
}
type MessageLogSearchOptions ¶ added in v0.30.1
type MessageLogSearchOptions struct {
First *int `json:"first,omitempty"`
After *string `json:"after,omitempty"`
CreatedBefore *time.Time `json:"createdBefore,omitempty"`
CreatedAfter *time.Time `json:"createdAfter,omitempty"`
Search *string `json:"search,omitempty"`
Omit []string `json:"omit,omitempty"`
}
type MessageStatusHistory ¶ added in v0.34.0
type MutationResolver ¶
type MutationResolver interface {
SwoAction(ctx context.Context, action SWOAction) (bool, error)
LinkAccount(ctx context.Context, token string) (bool, error)
ReEncryptKeyringsAndConfig(ctx context.Context) (bool, error)
SetTemporarySchedule(ctx context.Context, input SetTemporaryScheduleInput) (bool, error)
ClearTemporarySchedules(ctx context.Context, input ClearTemporarySchedulesInput) (bool, error)
SetScheduleOnCallNotificationRules(ctx context.Context, input SetScheduleOnCallNotificationRulesInput) (bool, error)
DebugCarrierInfo(ctx context.Context, input DebugCarrierInfoInput) (*twilio.CarrierInfo, error)
DebugSendSms(ctx context.Context, input DebugSendSMSInput) (*DebugSendSMSInfo, error)
AddAuthSubject(ctx context.Context, input user.AuthSubject) (bool, error)
DeleteAuthSubject(ctx context.Context, input user.AuthSubject) (bool, error)
EndAllAuthSessionsByCurrentUser(ctx context.Context) (bool, error)
UpdateUser(ctx context.Context, input UpdateUserInput) (bool, error)
TestContactMethod(ctx context.Context, id string) (bool, error)
UpdateAlerts(ctx context.Context, input UpdateAlertsInput) ([]alert.Alert, error)
UpdateRotation(ctx context.Context, input UpdateRotationInput) (bool, error)
EscalateAlerts(ctx context.Context, input []int) ([]alert.Alert, error)
SetFavorite(ctx context.Context, input SetFavoriteInput) (bool, error)
UpdateService(ctx context.Context, input UpdateServiceInput) (bool, error)
UpdateEscalationPolicy(ctx context.Context, input UpdateEscalationPolicyInput) (bool, error)
UpdateEscalationPolicyStep(ctx context.Context, input UpdateEscalationPolicyStepInput) (bool, error)
DeleteAll(ctx context.Context, input []assignment.RawTarget) (bool, error)
CreateAlert(ctx context.Context, input CreateAlertInput) (*alert.Alert, error)
CloseMatchingAlert(ctx context.Context, input CloseMatchingAlertInput) (bool, error)
SetAlertNoiseReason(ctx context.Context, input SetAlertNoiseReasonInput) (bool, error)
CreateService(ctx context.Context, input CreateServiceInput) (*service.Service, error)
CreateEscalationPolicy(ctx context.Context, input CreateEscalationPolicyInput) (*escalation.Policy, error)
CreateEscalationPolicyStep(ctx context.Context, input CreateEscalationPolicyStepInput) (*escalation.Step, error)
CreateRotation(ctx context.Context, input CreateRotationInput) (*rotation.Rotation, error)
CreateIntegrationKey(ctx context.Context, input CreateIntegrationKeyInput) (*integrationkey.IntegrationKey, error)
CreateHeartbeatMonitor(ctx context.Context, input CreateHeartbeatMonitorInput) (*heartbeat.Monitor, error)
SetLabel(ctx context.Context, input SetLabelInput) (bool, error)
CreateSchedule(ctx context.Context, input CreateScheduleInput) (*schedule.Schedule, error)
CreateUser(ctx context.Context, input CreateUserInput) (*user.User, error)
CreateUserCalendarSubscription(ctx context.Context, input CreateUserCalendarSubscriptionInput) (*calsub.Subscription, error)
UpdateUserCalendarSubscription(ctx context.Context, input UpdateUserCalendarSubscriptionInput) (bool, error)
UpdateScheduleTarget(ctx context.Context, input ScheduleTargetInput) (bool, error)
CreateUserOverride(ctx context.Context, input CreateUserOverrideInput) (*override.UserOverride, error)
CreateUserContactMethod(ctx context.Context, input CreateUserContactMethodInput) (*contactmethod.ContactMethod, error)
CreateUserNotificationRule(ctx context.Context, input CreateUserNotificationRuleInput) (*notificationrule.NotificationRule, error)
UpdateUserContactMethod(ctx context.Context, input UpdateUserContactMethodInput) (bool, error)
SendContactMethodVerification(ctx context.Context, input SendContactMethodVerificationInput) (bool, error)
VerifyContactMethod(ctx context.Context, input VerifyContactMethodInput) (bool, error)
UpdateSchedule(ctx context.Context, input UpdateScheduleInput) (bool, error)
UpdateUserOverride(ctx context.Context, input UpdateUserOverrideInput) (bool, error)
UpdateHeartbeatMonitor(ctx context.Context, input UpdateHeartbeatMonitorInput) (bool, error)
UpdateAlertsByService(ctx context.Context, input UpdateAlertsByServiceInput) (bool, error)
SetConfig(ctx context.Context, input []ConfigValueInput) (bool, error)
SetSystemLimits(ctx context.Context, input []SystemLimitInput) (bool, error)
CreateBasicAuth(ctx context.Context, input CreateBasicAuthInput) (bool, error)
UpdateBasicAuth(ctx context.Context, input UpdateBasicAuthInput) (bool, error)
CreateGQLAPIKey(ctx context.Context, input CreateGQLAPIKeyInput) (*CreatedGQLAPIKey, error)
UpdateGQLAPIKey(ctx context.Context, input UpdateGQLAPIKeyInput) (bool, error)
DeleteGQLAPIKey(ctx context.Context, id string) (bool, error)
UpdateKeyConfig(ctx context.Context, input UpdateKeyConfigInput) (bool, error)
PromoteSecondaryToken(ctx context.Context, id string) (bool, error)
DeleteSecondaryToken(ctx context.Context, id string) (bool, error)
GenerateKeyToken(ctx context.Context, id string) (string, error)
}
type NotificationState ¶ added in v0.26.0
type NotificationState struct {
Details string `json:"details"`
Status *NotificationStatus `json:"status,omitempty"`
FormattedSrcValue string `json:"formattedSrcValue"`
}
type NotificationStatus ¶ added in v0.26.0
type NotificationStatus string
const ( NotificationStatusOk NotificationStatus = "OK" NotificationStatusWarn NotificationStatus = "WARN" NotificationStatusError NotificationStatus = "ERROR" )
func (NotificationStatus) IsValid ¶ added in v0.26.0
func (e NotificationStatus) IsValid() bool
func (NotificationStatus) MarshalGQL ¶ added in v0.26.0
func (e NotificationStatus) MarshalGQL(w io.Writer)
func (NotificationStatus) MarshalJSON ¶ added in v0.34.0
func (e NotificationStatus) MarshalJSON() ([]byte, error)
func (NotificationStatus) String ¶ added in v0.26.0
func (e NotificationStatus) String() string
func (*NotificationStatus) UnmarshalGQL ¶ added in v0.26.0
func (e *NotificationStatus) UnmarshalGQL(v any) error
func (*NotificationStatus) UnmarshalJSON ¶ added in v0.34.0
func (e *NotificationStatus) UnmarshalJSON(b []byte) error
type OnCallNotificationRuleInput ¶ added in v0.28.0
type OnCallNotificationRuleInput struct {
schedule.OnCallNotificationRule
Dest gadb.DestV1
}
type OnCallNotificationRuleInputResolver ¶ added in v0.33.0
type OnCallNotificationRuleInputResolver interface {
Target(ctx context.Context, obj *OnCallNotificationRuleInput, data *assignment.RawTarget) error
}
type OnCallNotificationRuleResolver ¶ added in v0.28.0
type OnCallNotificationRuleResolver interface {
Target(ctx context.Context, obj *schedule.OnCallNotificationRule) (*assignment.RawTarget, error)
Dest(ctx context.Context, obj *schedule.OnCallNotificationRule) (*gadb.DestV1, error)
}
type OnCallOverview ¶ added in v0.33.0
type OnCallOverview struct {
ServiceCount int `json:"serviceCount"`
ServiceAssignments []OnCallServiceAssignment `json:"serviceAssignments"`
}
type OnCallServiceAssignment ¶ added in v0.33.0
type OnCallServiceAssignment struct {
// Step number is the escalation step this assignment is from (beginning with 0).
StepNumber int `json:"stepNumber"`
EscalationPolicyID string `json:"escalationPolicyID"`
EscalationPolicyName string `json:"escalationPolicyName"`
ServiceID string `json:"serviceID"`
ServiceName string `json:"serviceName"`
}
type OnCallShiftResolver ¶
type PhoneNumberInfo ¶ added in v0.25.0
type QueryResolver ¶
type QueryResolver interface {
PhoneNumberInfo(ctx context.Context, number string) (*PhoneNumberInfo, error)
ExperimentalFlags(ctx context.Context) ([]string, error)
MessageLogs(ctx context.Context, input *MessageLogSearchOptions) (*MessageLogConnection, error)
DebugMessages(ctx context.Context, input *DebugMessagesInput) ([]DebugMessage, error)
User(ctx context.Context, id *string) (*user.User, error)
Users(ctx context.Context, input *UserSearchOptions, first *int, after *string, search *string) (*UserConnection, error)
Alert(ctx context.Context, id int) (*alert.Alert, error)
Alerts(ctx context.Context, input *AlertSearchOptions) (*AlertConnection, error)
Service(ctx context.Context, id string) (*service.Service, error)
IntegrationKey(ctx context.Context, id string) (*integrationkey.IntegrationKey, error)
HeartbeatMonitor(ctx context.Context, id string) (*heartbeat.Monitor, error)
Services(ctx context.Context, input *ServiceSearchOptions) (*ServiceConnection, error)
Rotation(ctx context.Context, id string) (*rotation.Rotation, error)
Rotations(ctx context.Context, input *RotationSearchOptions) (*RotationConnection, error)
CalcRotationHandoffTimes(ctx context.Context, input *CalcRotationHandoffTimesInput) ([]time.Time, error)
Schedule(ctx context.Context, id string) (*schedule.Schedule, error)
UserCalendarSubscription(ctx context.Context, id string) (*calsub.Subscription, error)
Schedules(ctx context.Context, input *ScheduleSearchOptions) (*ScheduleConnection, error)
EscalationPolicy(ctx context.Context, id string) (*escalation.Policy, error)
EscalationPolicies(ctx context.Context, input *EscalationPolicySearchOptions) (*EscalationPolicyConnection, error)
AuthSubjectsForProvider(ctx context.Context, first *int, after *string, providerID string) (*AuthSubjectConnection, error)
TimeZones(ctx context.Context, input *TimeZoneSearchOptions) (*TimeZoneConnection, error)
Labels(ctx context.Context, input *LabelSearchOptions) (*LabelConnection, error)
LabelKeys(ctx context.Context, input *LabelKeySearchOptions) (*StringConnection, error)
LabelValues(ctx context.Context, input *LabelValueSearchOptions) (*StringConnection, error)
IntegrationKeys(ctx context.Context, input *IntegrationKeySearchOptions) (*IntegrationKeyConnection, error)
UserOverrides(ctx context.Context, input *UserOverrideSearchOptions) (*UserOverrideConnection, error)
UserOverride(ctx context.Context, id string) (*override.UserOverride, error)
Config(ctx context.Context, all *bool) ([]ConfigValue, error)
ConfigHints(ctx context.Context) ([]ConfigHint, error)
IntegrationKeyTypes(ctx context.Context) ([]IntegrationKeyTypeInfo, error)
SystemLimits(ctx context.Context) ([]SystemLimit, error)
DebugMessageStatus(ctx context.Context, input DebugMessageStatusInput) (*DebugMessageStatusInfo, error)
UserContactMethod(ctx context.Context, id string) (*contactmethod.ContactMethod, error)
SlackChannels(ctx context.Context, input *SlackChannelSearchOptions) (*SlackChannelConnection, error)
SlackChannel(ctx context.Context, id string) (*slack.Channel, error)
SlackUserGroups(ctx context.Context, input *SlackUserGroupSearchOptions) (*SlackUserGroupConnection, error)
SlackUserGroup(ctx context.Context, id string) (*slack.UserGroup, error)
GenerateSlackAppManifest(ctx context.Context) (string, error)
LinkAccountInfo(ctx context.Context, token string) (*LinkAccountInfo, error)
SwoStatus(ctx context.Context) (*SWOStatus, error)
MessageStatusHistory(ctx context.Context, id string) ([]MessageStatusHistory, error)
DestinationTypes(ctx context.Context, isDynamicAction *bool) ([]nfydest.TypeInfo, error)
DestinationFieldValidate(ctx context.Context, input DestinationFieldValidateInput) (bool, error)
DestinationFieldSearch(ctx context.Context, input DestinationFieldSearchInput) (*FieldSearchConnection, error)
DestinationFieldValueName(ctx context.Context, input DestinationFieldValidateInput) (string, error)
DestinationDisplayInfo(ctx context.Context, input gadb.DestV1) (*nfydest.DisplayInfo, error)
Expr(ctx context.Context) (*Expr, error)
GqlAPIKeys(ctx context.Context) ([]GQLAPIKey, error)
ActionInputValidate(ctx context.Context, input gadb.UIKActionV1) (bool, error)
}
type ResolverRoot ¶
type ResolverRoot interface {
Alert() AlertResolver
AlertLogEntry() AlertLogEntryResolver
AlertMetric() AlertMetricResolver
Destination() DestinationResolver
EscalationPolicy() EscalationPolicyResolver
EscalationPolicyStep() EscalationPolicyStepResolver
Expr() ExprResolver
GQLAPIKey() GQLAPIKeyResolver
HeartbeatMonitor() HeartbeatMonitorResolver
IntegrationKey() IntegrationKeyResolver
KeyConfig() KeyConfigResolver
MessageLogConnectionStats() MessageLogConnectionStatsResolver
Mutation() MutationResolver
OnCallNotificationRule() OnCallNotificationRuleResolver
OnCallShift() OnCallShiftResolver
Query() QueryResolver
Rotation() RotationResolver
Schedule() ScheduleResolver
ScheduleRule() ScheduleRuleResolver
Service() ServiceResolver
Target() TargetResolver
TemporarySchedule() TemporaryScheduleResolver
TimeSeriesBucket() TimeSeriesBucketResolver
User() UserResolver
UserCalendarSubscription() UserCalendarSubscriptionResolver
UserContactMethod() UserContactMethodResolver
UserNotificationRule() UserNotificationRuleResolver
UserOverride() UserOverrideResolver
CreateEscalationPolicyStepInput() CreateEscalationPolicyStepInputResolver
DestinationInput() DestinationInputResolver
OnCallNotificationRuleInput() OnCallNotificationRuleInputResolver
UpdateEscalationPolicyStepInput() UpdateEscalationPolicyStepInputResolver
}
type RotationConnection ¶
type RotationResolver ¶
type RotationResolver interface {
IsFavorite(ctx context.Context, obj *rotation.Rotation) (bool, error)
TimeZone(ctx context.Context, obj *rotation.Rotation) (string, error)
ActiveUserIndex(ctx context.Context, obj *rotation.Rotation) (int, error)
UserIDs(ctx context.Context, obj *rotation.Rotation) ([]string, error)
Users(ctx context.Context, obj *rotation.Rotation) ([]user.User, error)
NextHandoffTimes(ctx context.Context, obj *rotation.Rotation, num *int) ([]time.Time, error)
}
type RotationSearchOptions ¶
type RotationSearchOptions struct {
First *int `json:"first,omitempty"`
After *string `json:"after,omitempty"`
Search *string `json:"search,omitempty"`
Omit []string `json:"omit,omitempty"`
// Include only favorited rotations in the results.
FavoritesOnly *bool `json:"favoritesOnly,omitempty"`
// Sort favorite rotations first.
FavoritesFirst *bool `json:"favoritesFirst,omitempty"`
}
type SWOAction ¶ added in v0.31.0
type SWOAction string
func (SWOAction) MarshalGQL ¶ added in v0.31.0
func (SWOAction) MarshalJSON ¶ added in v0.34.0
func (*SWOAction) UnmarshalGQL ¶ added in v0.31.0
func (*SWOAction) UnmarshalJSON ¶ added in v0.34.0
type SWOConnection ¶ added in v0.31.0
type SWONode ¶ added in v0.31.0
type SWONode struct {
ID string `json:"id"`
CanExec bool `json:"canExec"`
IsLeader bool `json:"isLeader"`
// The uptime of the node in seconds. Empty if the node/connection is *not* a GoAlert instance in SWO mode.
Uptime string `json:"uptime"`
ConfigError string `json:"configError"`
Connections []SWOConnection `json:"connections,omitempty"`
}
type SWOState ¶ added in v0.31.0
type SWOState string
func (SWOState) MarshalGQL ¶ added in v0.31.0
func (SWOState) MarshalJSON ¶ added in v0.34.0
func (*SWOState) UnmarshalGQL ¶ added in v0.31.0
func (*SWOState) UnmarshalJSON ¶ added in v0.34.0
type ScheduleConnection ¶
type ScheduleResolver ¶
type ScheduleResolver interface {
TimeZone(ctx context.Context, obj *schedule.Schedule) (string, error)
AssignedTo(ctx context.Context, obj *schedule.Schedule) ([]assignment.RawTarget, error)
Shifts(ctx context.Context, obj *schedule.Schedule, start time.Time, end time.Time, userIDs []string) ([]oncall.Shift, error)
Targets(ctx context.Context, obj *schedule.Schedule) ([]ScheduleTarget, error)
Target(ctx context.Context, obj *schedule.Schedule, input assignment.RawTarget) (*ScheduleTarget, error)
IsFavorite(ctx context.Context, obj *schedule.Schedule) (bool, error)
TemporarySchedules(ctx context.Context, obj *schedule.Schedule) ([]schedule.TemporarySchedule, error)
OnCallNotificationRules(ctx context.Context, obj *schedule.Schedule) ([]schedule.OnCallNotificationRule, error)
}
type ScheduleRuleInput ¶
type ScheduleRuleInput struct {
ID *string `json:"id,omitempty"`
Start *timeutil.Clock `json:"start,omitempty"`
End *timeutil.Clock `json:"end,omitempty"`
// Weekday filter is a 7-item array that indicates if the rule is active on each weekday, starting with Sunday.
WeekdayFilter *timeutil.WeekdayFilter `json:"weekdayFilter,omitempty"`
}
type ScheduleRuleResolver ¶
type ScheduleSearchOptions ¶
type ScheduleSearchOptions struct {
First *int `json:"first,omitempty"`
After *string `json:"after,omitempty"`
Search *string `json:"search,omitempty"`
Omit []string `json:"omit,omitempty"`
// Include only favorited services in the results.
FavoritesOnly *bool `json:"favoritesOnly,omitempty"`
// Sort favorite services first.
FavoritesFirst *bool `json:"favoritesFirst,omitempty"`
}
type ScheduleTarget ¶
type ScheduleTarget struct {
ScheduleID string `json:"scheduleID"`
Target *assignment.RawTarget `json:"target"`
Rules []rule.Rule `json:"rules"`
}
type ScheduleTargetInput ¶
type ScheduleTargetInput struct {
ScheduleID *string `json:"scheduleID,omitempty"`
Target *assignment.RawTarget `json:"target,omitempty"`
NewRotation *CreateRotationInput `json:"newRotation,omitempty"`
Rules []ScheduleRuleInput `json:"rules"`
}
type SendContactMethodVerificationInput ¶ added in v0.23.0
type SendContactMethodVerificationInput struct {
ContactMethodID string `json:"contactMethodID"`
}
type ServiceAlertStatsOptions ¶ added in v0.34.0
type ServiceAlertStatsOptions struct {
Start *time.Time `json:"start,omitempty"`
End *time.Time `json:"end,omitempty"`
TsOptions *TimeSeriesOptions `json:"tsOptions,omitempty"`
}
type ServiceConnection ¶
type ServiceResolver ¶
type ServiceResolver interface {
EscalationPolicy(ctx context.Context, obj *service.Service) (*escalation.Policy, error)
IsFavorite(ctx context.Context, obj *service.Service) (bool, error)
OnCallUsers(ctx context.Context, obj *service.Service) ([]oncall.ServiceOnCallUser, error)
IntegrationKeys(ctx context.Context, obj *service.Service) ([]integrationkey.IntegrationKey, error)
Labels(ctx context.Context, obj *service.Service) ([]label.Label, error)
HeartbeatMonitors(ctx context.Context, obj *service.Service) ([]heartbeat.Monitor, error)
Notices(ctx context.Context, obj *service.Service) ([]notice.Notice, error)
AlertStats(ctx context.Context, obj *service.Service, input *ServiceAlertStatsOptions) (*AlertStats, error)
AlertsByStatus(ctx context.Context, obj *service.Service) (*AlertsByStatus, error)
}
type ServiceSearchOptions ¶
type ServiceSearchOptions struct {
First *int `json:"first,omitempty"`
After *string `json:"after,omitempty"`
Search *string `json:"search,omitempty"`
Omit []string `json:"omit,omitempty"`
Only []string `json:"only,omitempty"`
// Include only favorited services in the results.
FavoritesOnly *bool `json:"favoritesOnly,omitempty"`
// Sort favorite services first.
FavoritesFirst *bool `json:"favoritesFirst,omitempty"`
}
type SetAlertNoiseReasonInput ¶ added in v0.31.0
type SetFavoriteInput ¶
type SetFavoriteInput struct {
Target *assignment.RawTarget `json:"target"`
Favorite bool `json:"favorite"`
}
type SetLabelInput ¶
type SetLabelInput struct {
Target *assignment.RawTarget `json:"target,omitempty"`
Key string `json:"key"`
// If value is empty, the label is removed.
Value string `json:"value"`
}
type SetScheduleOnCallNotificationRulesInput ¶ added in v0.28.0
type SetScheduleOnCallNotificationRulesInput struct {
ScheduleID string `json:"scheduleID"`
Rules []OnCallNotificationRuleInput `json:"rules"`
}
type SetTemporaryScheduleInput ¶ added in v0.27.0
type SlackChannelConnection ¶
type SlackUserGroupConnection ¶ added in v0.31.0
type SlackUserGroupSearchOptions ¶ added in v0.31.0
type StatusUpdateState ¶ added in v0.31.0
type StatusUpdateState string
const ( StatusUpdateStateDisabled StatusUpdateState = "DISABLED" StatusUpdateStateEnabled StatusUpdateState = "ENABLED" StatusUpdateStateEnabledForced StatusUpdateState = "ENABLED_FORCED" StatusUpdateStateDisabledForced StatusUpdateState = "DISABLED_FORCED" )
func (StatusUpdateState) IsValid ¶ added in v0.31.0
func (e StatusUpdateState) IsValid() bool
func (StatusUpdateState) MarshalGQL ¶ added in v0.31.0
func (e StatusUpdateState) MarshalGQL(w io.Writer)
func (StatusUpdateState) MarshalJSON ¶ added in v0.34.0
func (e StatusUpdateState) MarshalJSON() ([]byte, error)
func (StatusUpdateState) String ¶ added in v0.31.0
func (e StatusUpdateState) String() string
func (*StatusUpdateState) UnmarshalGQL ¶ added in v0.31.0
func (e *StatusUpdateState) UnmarshalGQL(v any) error
func (*StatusUpdateState) UnmarshalJSON ¶ added in v0.34.0
func (e *StatusUpdateState) UnmarshalJSON(b []byte) error
type StringConnection ¶ added in v0.25.0
type SystemLimit ¶ added in v0.25.0
type SystemLimit struct {
ID limit.ID `json:"id"`
Description string `json:"description"`
Value int `json:"value"`
}
func MapLimitValues ¶ added in v0.25.0
func MapLimitValues(l limit.Limits) []SystemLimit
MapLimitValues will map a Limit struct into a flat list of SystemLimit structs.
type SystemLimitInput ¶ added in v0.25.0
type TargetResolver ¶
type TemporaryScheduleResolver ¶ added in v0.27.0
type TimeSeriesBucket ¶ added in v0.31.0
type TimeSeriesBucketResolver ¶ added in v0.34.0
type TimeSeriesBucketResolver interface {
Count(ctx context.Context, obj *TimeSeriesBucket) (int, error)
}
type TimeSeriesOptions ¶ added in v0.31.0
type TimeSeriesOptions struct {
BucketDuration timeutil.ISODuration `json:"bucketDuration"`
BucketOrigin *time.Time `json:"bucketOrigin,omitempty"`
}
type TimeZoneConnection ¶
type TimeZoneSearchOptions ¶
type TokenInfo ¶ added in v0.33.0
type TokenInfo struct {
// primaryHint is a hint for the primary token. It is empty if the primary token is not set.
PrimaryHint string `json:"primaryHint"`
// secondaryHint is a hint for the secondary token. It is empty if the secondary token is not set.
SecondaryHint string `json:"secondaryHint"`
}
type UpdateAlertsByServiceInput ¶ added in v0.25.0
type UpdateAlertsByServiceInput struct {
ServiceID string `json:"serviceID"`
NewStatus AlertStatus `json:"newStatus"`
}
type UpdateAlertsInput ¶
type UpdateAlertsInput struct {
// List of alert IDs.
AlertIDs []int `json:"alertIDs"`
NewStatus *AlertStatus `json:"newStatus,omitempty"`
NoiseReason *string `json:"noiseReason,omitempty"`
}
type UpdateBasicAuthInput ¶ added in v0.31.0
type UpdateEscalationPolicyStepInputResolver ¶ added in v0.33.0
type UpdateEscalationPolicyStepInputResolver interface {
Targets(ctx context.Context, obj *UpdateEscalationPolicyStepInput, data []assignment.RawTarget) error
}
type UpdateGQLAPIKeyInput ¶ added in v0.32.0
type UpdateHeartbeatMonitorInput ¶ added in v0.24.0
type UpdateHeartbeatMonitorInput struct {
ID string `json:"id"`
Name *string `json:"name,omitempty"`
TimeoutMinutes *int `json:"timeoutMinutes,omitempty"`
AdditionalDetails *string `json:"additionalDetails,omitempty"`
// If non-empty, the monitor will be muted with this reason.
//
// Muting a monitor will prevent it from triggering new alerts, but existing
// alerts will remain active until closed or the monitor is healthy again.
Muted *string `json:"muted,omitempty"`
}
type UpdateKeyConfigInput ¶ added in v0.33.0
type UpdateKeyConfigInput struct {
KeyID string `json:"keyID"`
Rules []gadb.UIKRuleV1 `json:"rules,omitempty"`
// setRule allows you to set a single rule. If ID is provided, the rule with that ID will be updated. If ID is not provided, a new rule will be created and appended to the list of rules.
SetRule *gadb.UIKRuleV1 `json:"setRule,omitempty"`
// setRuleActions allows you to set the actions for a single rule by ID.
SetRuleActions *gadb.UIKRuleV1 `json:"setRuleActions,omitempty"`
// setRuleOrder allows you to reorder rules by ID.
SetRuleOrder []string `json:"setRuleOrder,omitempty"`
// deleteRule allows you to delete a single rule by ID.
DeleteRule *string `json:"deleteRule,omitempty"`
// defaultAction is the action to take if no rules match the request.
DefaultActions []gadb.UIKActionV1 `json:"defaultActions,omitempty"`
}
type UpdateRotationInput ¶
type UpdateRotationInput struct {
ID string `json:"id"`
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
TimeZone *string `json:"timeZone,omitempty"`
Start *time.Time `json:"start,omitempty"`
Type *rotation.Type `json:"type,omitempty"`
ShiftLength *int `json:"shiftLength,omitempty"`
UserIDs []string `json:"userIDs,omitempty"`
// The index of the user in `userIDs` to set as the active user. If not provided, the existing active user index will be used.
ActiveUserIndex *int `json:"activeUserIndex,omitempty"`
}
type UpdateScheduleInput ¶
type UpdateServiceInput ¶
type UpdateUserCalendarSubscriptionInput ¶ added in v0.25.0
type UpdateUserContactMethodInput ¶
type UpdateUserContactMethodInput struct {
ID string `json:"id"`
Name *string `json:"name,omitempty"`
Value *string `json:"value,omitempty"`
// If true, this contact method will receive status updates.
//
// Note: Some contact method types, like Slack, will always receive status updates and this value is ignored.
EnableStatusUpdates *bool `json:"enableStatusUpdates,omitempty"`
}
type UpdateUserInput ¶
type UpdateUserOverrideInput ¶
type UserCalendarSubscriptionResolver ¶ added in v0.25.0
type UserCalendarSubscriptionResolver interface {
ReminderMinutes(ctx context.Context, obj *calsub.Subscription) ([]int, error)
FullSchedule(ctx context.Context, obj *calsub.Subscription) (bool, error)
Schedule(ctx context.Context, obj *calsub.Subscription) (*schedule.Schedule, error)
URL(ctx context.Context, obj *calsub.Subscription) (*string, error)
}
type UserConnection ¶
type UserContactMethodResolver ¶ added in v0.23.0
type UserContactMethodResolver interface {
Type(ctx context.Context, obj *contactmethod.ContactMethod) (*ContactMethodType, error)
Value(ctx context.Context, obj *contactmethod.ContactMethod) (string, error)
FormattedValue(ctx context.Context, obj *contactmethod.ContactMethod) (string, error)
LastTestMessageState(ctx context.Context, obj *contactmethod.ContactMethod) (*NotificationState, error)
LastVerifyMessageState(ctx context.Context, obj *contactmethod.ContactMethod) (*NotificationState, error)
StatusUpdates(ctx context.Context, obj *contactmethod.ContactMethod) (StatusUpdateState, error)
}
type UserNotificationRuleResolver ¶
type UserNotificationRuleResolver interface {
ContactMethod(ctx context.Context, obj *notificationrule.NotificationRule) (*contactmethod.ContactMethod, error)
}
type UserOverrideConnection ¶
type UserOverrideConnection struct {
Nodes []override.UserOverride `json:"nodes"`
PageInfo *PageInfo `json:"pageInfo"`
}
type UserOverrideResolver ¶
type UserOverrideSearchOptions ¶
type UserOverrideSearchOptions struct {
First *int `json:"first,omitempty"`
After *string `json:"after,omitempty"`
Omit []string `json:"omit,omitempty"`
// Limit search to a single schedule
ScheduleID *string `json:"scheduleID,omitempty"`
// Only return overrides where the provided users have been added to a schedule (add or replace types).
FilterAddUserID []string `json:"filterAddUserID,omitempty"`
// Only return overrides where the provided users have been removed from a schedule (remove or replace types).
FilterRemoveUserID []string `json:"filterRemoveUserID,omitempty"`
// Only return overrides that add/remove/replace at least one of the provided user IDs.
FilterAnyUserID []string `json:"filterAnyUserID,omitempty"`
// Start of the window to search for.
Start *time.Time `json:"start,omitempty"`
// End of the window to search for.
End *time.Time `json:"end,omitempty"`
}
type UserResolver ¶
type UserResolver interface {
Role(ctx context.Context, obj *user.User) (UserRole, error)
ContactMethods(ctx context.Context, obj *user.User) ([]contactmethod.ContactMethod, error)
NotificationRules(ctx context.Context, obj *user.User) ([]notificationrule.NotificationRule, error)
CalendarSubscriptions(ctx context.Context, obj *user.User) ([]calsub.Subscription, error)
AuthSubjects(ctx context.Context, obj *user.User) ([]user.AuthSubject, error)
Sessions(ctx context.Context, obj *user.User) ([]UserSession, error)
OnCallSteps(ctx context.Context, obj *user.User) ([]escalation.Step, error)
OnCallOverview(ctx context.Context, obj *user.User) (*OnCallOverview, error)
IsFavorite(ctx context.Context, obj *user.User) (bool, error)
AssignedSchedules(ctx context.Context, obj *user.User) ([]schedule.Schedule, error)
}
type UserRole ¶
type UserRole string
func (UserRole) MarshalGQL ¶
func (UserRole) MarshalJSON ¶ added in v0.34.0
func (*UserRole) UnmarshalGQL ¶
func (*UserRole) UnmarshalJSON ¶ added in v0.34.0
type UserSearchOptions ¶
type UserSearchOptions struct {
First *int `json:"first,omitempty"`
After *string `json:"after,omitempty"`
Search *string `json:"search,omitempty"`
Omit []string `json:"omit,omitempty"`
CMValue *string `json:"CMValue,omitempty"`
CMType *ContactMethodType `json:"CMType,omitempty"`
Dest *gadb.DestV1 `json:"dest,omitempty"`
// Include only favorited services in the results.
FavoritesOnly *bool `json:"favoritesOnly,omitempty"`
// Sort favorite services first.
FavoritesFirst *bool `json:"favoritesFirst,omitempty"`
}