Documentation
¶
Index ¶
- Variables
- func ApplyConfigValues(cfg config.Config, vals []ConfigValueInput) (config.Config, error)
- func ApplyLimitValues(l limit.Limits, vals []SystemLimitInput) (limit.Limits, error)
- func MarshalClockTime(c timeutil.Clock) graphql.Marshaler
- func MarshalContactMethodType(t contactmethod.Type) graphql.Marshaler
- func MarshalISOTimestamp(t time.Time) graphql.Marshaler
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func UnmarshalClockTime(v interface{}) (timeutil.Clock, error)
- func UnmarshalContactMethodType(v interface{}) (contactmethod.Type, error)
- func UnmarshalISOTimestamp(v interface{}) (time.Time, error)
- type AlertConnection
- type AlertLogEntryConnection
- type AlertLogEntryResolver
- type AlertRecentEventsOptions
- type AlertResolver
- type AlertSearchOptions
- type AlertSearchSort
- type AlertStatus
- type AuthSubjectConnection
- type CalcRotationHandoffTimesInput
- type ClearTemporarySchedulesInput
- type ComplexityRoot
- type Config
- type ConfigHint
- type ConfigType
- type ConfigValue
- type ConfigValueInput
- type CreateAlertInput
- type CreateEscalationPolicyInput
- type CreateEscalationPolicyStepInput
- type CreateHeartbeatMonitorInput
- type CreateIntegrationKeyInput
- type CreateRotationInput
- type CreateScheduleInput
- type CreateServiceInput
- type CreateUserCalendarSubscriptionInput
- type CreateUserContactMethodInput
- type CreateUserNotificationRuleInput
- type CreateUserOverrideInput
- type DebugCarrierInfoInput
- type DebugSendSMSInfo
- type DebugSendSMSInput
- type DirectiveRoot
- type EscalationPolicyConnection
- type EscalationPolicyResolver
- type EscalationPolicySearchOptions
- type EscalationPolicyStepResolver
- type HeartbeatMonitorResolver
- type IntegrationKeyResolver
- type IntegrationKeyType
- type LabelConnection
- type LabelKeySearchOptions
- type LabelSearchOptions
- type LabelValueSearchOptions
- type MutationResolver
- type NotificationState
- type NotificationStatus
- type OnCallShiftResolver
- type PageInfo
- type PhoneNumberInfo
- type QueryResolver
- type ResolverRoot
- type RotationConnection
- type RotationResolver
- type RotationSearchOptions
- type ScheduleConnection
- type ScheduleResolver
- type ScheduleRuleInput
- type ScheduleRuleResolver
- type ScheduleSearchOptions
- type ScheduleTarget
- type ScheduleTargetInput
- type SendContactMethodVerificationInput
- type ServiceConnection
- type ServiceResolver
- type ServiceSearchOptions
- type SetFavoriteInput
- type SetLabelInput
- type SetTemporaryScheduleInput
- type SlackChannelConnection
- type SlackChannelSearchOptions
- type StringConnection
- type SystemLimit
- type SystemLimitInput
- type TargetResolver
- type TemporaryScheduleResolver
- type TimeZone
- type TimeZoneConnection
- type TimeZoneSearchOptions
- type UpdateAlertsByServiceInput
- type UpdateAlertsInput
- type UpdateEscalationPolicyInput
- type UpdateEscalationPolicyStepInput
- type UpdateHeartbeatMonitorInput
- 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 UserSessionResolver
- type VerifyContactMethodInput
Constants ¶
This section is empty.
Variables ¶
View Source
var AllAlertSearchSort = []AlertSearchSort{ AlertSearchSortStatusID, AlertSearchSortDateID, AlertSearchSortDateIDReverse, }
View Source
var AllAlertStatus = []AlertStatus{ AlertStatusStatusAcknowledged, AlertStatusStatusClosed, AlertStatusStatusUnacknowledged, }
View Source
var AllConfigType = []ConfigType{ ConfigTypeString, ConfigTypeStringList, ConfigTypeInteger, ConfigTypeBoolean, }
View Source
var AllIntegrationKeyType = []IntegrationKeyType{ IntegrationKeyTypeGeneric, IntegrationKeyTypeGrafana, IntegrationKeyTypeSite24x7, IntegrationKeyTypePrometheusAlertmanager, IntegrationKeyTypeEmail, }
View Source
var AllNotificationStatus = []NotificationStatus{ NotificationStatusOk, NotificationStatusWarn, NotificationStatusError, }
View Source
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 MarshalContactMethodType ¶
func MarshalContactMethodType(t contactmethod.Type) graphql.Marshaler
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func UnmarshalClockTime ¶
func UnmarshalContactMethodType ¶
func UnmarshalContactMethodType(v interface{}) (contactmethod.Type, error)
func UnmarshalISOTimestamp ¶
Types ¶
type AlertConnection ¶
type AlertLogEntryConnection ¶ added in v0.23.0
type AlertLogEntryResolver ¶ added in v0.23.0
type AlertRecentEventsOptions ¶ added in v0.23.0
type AlertResolver ¶
type AlertResolver interface {
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)
}
type AlertSearchOptions ¶
type AlertSearchOptions struct {
FilterByStatus []AlertStatus `json:"filterByStatus"`
FilterByServiceID []string `json:"filterByServiceID"`
Search *string `json:"search"`
First *int `json:"first"`
After *string `json:"after"`
FavoritesOnly *bool `json:"favoritesOnly"`
IncludeNotified *bool `json:"includeNotified"`
Omit []int `json:"omit"`
Sort *AlertSearchSort `json:"sort"`
CreatedBefore *time.Time `json:"createdBefore"`
NotCreatedBefore *time.Time `json:"notCreatedBefore"`
}
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) String ¶ added in v0.26.0
func (e AlertSearchSort) String() string
func (*AlertSearchSort) UnmarshalGQL ¶ added in v0.26.0
func (e *AlertSearchSort) UnmarshalGQL(v interface{}) error
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) String ¶
func (e AlertStatus) String() string
func (*AlertStatus) UnmarshalGQL ¶
func (e *AlertStatus) UnmarshalGQL(v interface{}) error
type AuthSubjectConnection ¶
type AuthSubjectConnection struct {
Nodes []user.AuthSubject `json:"nodes"`
PageInfo *PageInfo `json:"pageInfo"`
}
type CalcRotationHandoffTimesInput ¶ added in v0.27.0
type ClearTemporarySchedulesInput ¶ added in v0.27.0
type ComplexityRoot ¶
type ComplexityRoot struct {
Alert struct {
AlertID func(childComplexity int) int
CreatedAt func(childComplexity int) int
Details func(childComplexity int) int
ID 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
}
AlertLogEntry struct {
ID func(childComplexity int) int
Message 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
}
AlertState struct {
LastEscalation func(childComplexity int) int
RepeatCount func(childComplexity int) int
StepNumber 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
}
ConfigHint struct {
ID func(childComplexity int) int
Value func(childComplexity int) int
}
ConfigValue struct {
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
}
DebugCarrierInfo struct {
MobileCountryCode func(childComplexity int) int
MobileNetworkCode func(childComplexity int) int
Name func(childComplexity int) int
Type func(childComplexity int) int
}
DebugSendSMSInfo struct {
ID func(childComplexity int) int
ProviderURL func(childComplexity int) int
}
EscalationPolicy struct {
AssignedTo func(childComplexity int) int
Description func(childComplexity int) int
ID 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 {
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
}
HeartbeatMonitor struct {
Href func(childComplexity int) int
ID func(childComplexity int) int
LastHeartbeat func(childComplexity int) int
LastState func(childComplexity int) int
Name func(childComplexity int) int
ServiceID func(childComplexity int) int
TimeoutMinutes func(childComplexity int) int
}
IntegrationKey struct {
Href func(childComplexity int) int
ID func(childComplexity int) int
Name func(childComplexity int) int
ServiceID func(childComplexity int) int
Type 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
}
Mutation struct {
AddAuthSubject func(childComplexity int, input user.AuthSubject) int
ClearTemporarySchedules func(childComplexity int, input ClearTemporarySchedulesInput) int
CreateAlert func(childComplexity int, input CreateAlertInput) int
CreateEscalationPolicy func(childComplexity int, input CreateEscalationPolicyInput) int
CreateEscalationPolicyStep func(childComplexity int, input CreateEscalationPolicyStepInput) 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
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
EndAllAuthSessionsByCurrentUser func(childComplexity int) int
EscalateAlerts func(childComplexity int, input []int) int
SendContactMethodVerification func(childComplexity int, input SendContactMethodVerificationInput) int
SetConfig func(childComplexity int, input []ConfigValueInput) int
SetFavorite func(childComplexity int, input SetFavoriteInput) int
SetLabel func(childComplexity int, input SetLabelInput) int
SetSystemLimits func(childComplexity int, input []SystemLimitInput) int
SetTemporarySchedule func(childComplexity int, input SetTemporaryScheduleInput) int
TestContactMethod func(childComplexity int, id string) int
UpdateAlerts func(childComplexity int, input UpdateAlertsInput) int
UpdateAlertsByService func(childComplexity int, input UpdateAlertsByServiceInput) int
UpdateEscalationPolicy func(childComplexity int, input UpdateEscalationPolicyInput) int
UpdateEscalationPolicyStep func(childComplexity int, input UpdateEscalationPolicyStepInput) int
UpdateHeartbeatMonitor func(childComplexity int, input UpdateHeartbeatMonitorInput) 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
Status 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 {
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
EscalationPolicies func(childComplexity int, input *EscalationPolicySearchOptions) int
EscalationPolicy func(childComplexity int, id string) int
HeartbeatMonitor func(childComplexity int, id string) int
IntegrationKey func(childComplexity int, id string) int
LabelKeys func(childComplexity int, input *LabelKeySearchOptions) int
LabelValues func(childComplexity int, input *LabelValueSearchOptions) int
Labels func(childComplexity int, input *LabelSearchOptions) 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
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
}
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
Shifts func(childComplexity int, start time.Time, end time.Time) 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 {
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
Name 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
}
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
}
TimeZone struct {
ID func(childComplexity int) int
}
TimeZoneConnection struct {
Nodes func(childComplexity int) int
PageInfo func(childComplexity int) int
}
User struct {
AlertStatusCMID 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
Name func(childComplexity int) int
NotificationRules 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
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 {
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
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 Config ¶
type Config struct {
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) String ¶
func (e ConfigType) String() string
func (*ConfigType) UnmarshalGQL ¶
func (e *ConfigType) UnmarshalGQL(v interface{}) 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"`
}
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 CreateAlertInput ¶ added in v0.23.0
type CreateEscalationPolicyInput ¶
type CreateEscalationPolicyInput struct {
Name string `json:"name"`
Description *string `json:"description"`
Repeat *int `json:"repeat"`
Steps []CreateEscalationPolicyStepInput `json:"steps"`
}
type CreateEscalationPolicyStepInput ¶
type CreateEscalationPolicyStepInput struct {
EscalationPolicyID *string `json:"escalationPolicyID"`
DelayMinutes int `json:"delayMinutes"`
Targets []assignment.RawTarget `json:"targets"`
NewRotation *CreateRotationInput `json:"newRotation"`
NewSchedule *CreateScheduleInput `json:"newSchedule"`
}
type CreateHeartbeatMonitorInput ¶ added in v0.24.0
type CreateIntegrationKeyInput ¶
type CreateIntegrationKeyInput struct {
ServiceID *string `json:"serviceID"`
Type IntegrationKeyType `json:"type"`
Name string `json:"name"`
}
type CreateRotationInput ¶
type CreateRotationInput struct {
Name string `json:"name"`
Description *string `json:"description"`
TimeZone string `json:"timeZone"`
Start time.Time `json:"start"`
Favorite *bool `json:"favorite"`
Type rotation.Type `json:"type"`
ShiftLength *int `json:"shiftLength"`
UserIDs []string `json:"userIDs"`
}
type CreateScheduleInput ¶
type CreateScheduleInput struct {
Name string `json:"name"`
Description *string `json:"description"`
TimeZone string `json:"timeZone"`
Favorite *bool `json:"favorite"`
Targets []ScheduleTargetInput `json:"targets"`
NewUserOverrides []CreateUserOverrideInput `json:"newUserOverrides"`
}
type CreateServiceInput ¶
type CreateServiceInput struct {
Name string `json:"name"`
Description *string `json:"description"`
Favorite *bool `json:"favorite"`
EscalationPolicyID *string `json:"escalationPolicyID"`
NewEscalationPolicy *CreateEscalationPolicyInput `json:"newEscalationPolicy"`
NewIntegrationKeys []CreateIntegrationKeyInput `json:"newIntegrationKeys"`
Labels []SetLabelInput `json:"labels"`
NewHeartbeatMonitors []CreateHeartbeatMonitorInput `json:"newHeartbeatMonitors"`
}
type CreateUserCalendarSubscriptionInput ¶ added in v0.25.0
type CreateUserContactMethodInput ¶
type CreateUserContactMethodInput struct {
UserID string `json:"userID"`
Type contactmethod.Type `json:"type"`
Name string `json:"name"`
Value string `json:"value"`
NewUserNotificationRule *CreateUserNotificationRuleInput `json:"newUserNotificationRule"`
}
type CreateUserOverrideInput ¶
type DebugCarrierInfoInput ¶ added in v0.25.0
type DebugCarrierInfoInput struct {
Number string `json:"number"`
}
type DebugSendSMSInfo ¶ added in v0.25.0
type DebugSendSMSInput ¶ added in v0.25.0
type DirectiveRoot ¶
type DirectiveRoot struct {
}
type EscalationPolicyConnection ¶
type EscalationPolicyConnection struct {
Nodes []escalation.Policy `json:"nodes"`
PageInfo *PageInfo `json:"pageInfo"`
}
type EscalationPolicyResolver ¶
type EscalationPolicyResolver interface {
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 EscalationPolicyStepResolver ¶
type EscalationPolicyStepResolver interface {
Targets(ctx context.Context, obj *escalation.Step) ([]assignment.RawTarget, error)
EscalationPolicy(ctx context.Context, obj *escalation.Step) (*escalation.Policy, error)
}
type HeartbeatMonitorResolver ¶ added in v0.24.0
type IntegrationKeyResolver ¶
type IntegrationKeyResolver interface {
Type(ctx context.Context, obj *integrationkey.IntegrationKey) (IntegrationKeyType, error)
Href(ctx context.Context, obj *integrationkey.IntegrationKey) (string, error)
}
type IntegrationKeyType ¶
type IntegrationKeyType string
const ( IntegrationKeyTypeGeneric IntegrationKeyType = "generic" IntegrationKeyTypeGrafana IntegrationKeyType = "grafana" IntegrationKeyTypeSite24x7 IntegrationKeyType = "site24x7" IntegrationKeyTypePrometheusAlertmanager IntegrationKeyType = "prometheusAlertmanager" IntegrationKeyTypeEmail IntegrationKeyType = "email" )
func (IntegrationKeyType) IsValid ¶
func (e IntegrationKeyType) IsValid() bool
func (IntegrationKeyType) MarshalGQL ¶
func (e IntegrationKeyType) MarshalGQL(w io.Writer)
func (IntegrationKeyType) String ¶
func (e IntegrationKeyType) String() string
func (*IntegrationKeyType) UnmarshalGQL ¶
func (e *IntegrationKeyType) UnmarshalGQL(v interface{}) error
type LabelConnection ¶
type LabelKeySearchOptions ¶ added in v0.25.0
type LabelSearchOptions ¶
type LabelValueSearchOptions ¶ added in v0.25.0
type MutationResolver ¶
type MutationResolver interface {
SetTemporarySchedule(ctx context.Context, input SetTemporaryScheduleInput) (bool, error)
ClearTemporarySchedules(ctx context.Context, input ClearTemporarySchedulesInput) (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)
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)
CreateUserCalendarSubscription(ctx context.Context, input CreateUserCalendarSubscriptionInput) (*calendarsubscription.CalendarSubscription, 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)
}
type NotificationState ¶ added in v0.26.0
type NotificationState struct {
Details string `json:"details"`
Status *NotificationStatus `json:"status"`
}
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) String ¶ added in v0.26.0
func (e NotificationStatus) String() string
func (*NotificationStatus) UnmarshalGQL ¶ added in v0.26.0
func (e *NotificationStatus) UnmarshalGQL(v interface{}) error
type OnCallShiftResolver ¶
type PhoneNumberInfo ¶ added in v0.25.0
type QueryResolver ¶
type QueryResolver interface {
PhoneNumberInfo(ctx context.Context, number string) (*PhoneNumberInfo, 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) (*calendarsubscription.CalendarSubscription, 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)
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)
SystemLimits(ctx context.Context) ([]SystemLimit, 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)
}
type ResolverRoot ¶
type ResolverRoot interface {
Alert() AlertResolver
AlertLogEntry() AlertLogEntryResolver
EscalationPolicy() EscalationPolicyResolver
EscalationPolicyStep() EscalationPolicyStepResolver
HeartbeatMonitor() HeartbeatMonitorResolver
IntegrationKey() IntegrationKeyResolver
Mutation() MutationResolver
OnCallShift() OnCallShiftResolver
Query() QueryResolver
Rotation() RotationResolver
Schedule() ScheduleResolver
ScheduleRule() ScheduleRuleResolver
Service() ServiceResolver
Target() TargetResolver
TemporarySchedule() TemporaryScheduleResolver
User() UserResolver
UserCalendarSubscription() UserCalendarSubscriptionResolver
UserContactMethod() UserContactMethodResolver
UserNotificationRule() UserNotificationRuleResolver
UserOverride() UserOverrideResolver
UserSession() UserSessionResolver
}
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 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) ([]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)
}
type ScheduleRuleInput ¶
type ScheduleRuleResolver ¶
type ScheduleSearchOptions ¶
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"`
Target *assignment.RawTarget `json:"target"`
NewRotation *CreateRotationInput `json:"newRotation"`
Rules []ScheduleRuleInput `json:"rules"`
}
type SendContactMethodVerificationInput ¶ added in v0.23.0
type SendContactMethodVerificationInput struct {
ContactMethodID string `json:"contactMethodID"`
}
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)
}
type ServiceSearchOptions ¶
type SetFavoriteInput ¶
type SetFavoriteInput struct {
Target *assignment.RawTarget `json:"target"`
Favorite bool `json:"favorite"`
}
type SetLabelInput ¶
type SetLabelInput struct {
Target *assignment.RawTarget `json:"target"`
Key string `json:"key"`
Value string `json:"value"`
}
type SetTemporaryScheduleInput ¶ added in v0.27.0
type SlackChannelConnection ¶
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 TimeZoneConnection ¶
type TimeZoneSearchOptions ¶
type UpdateAlertsByServiceInput ¶ added in v0.25.0
type UpdateAlertsByServiceInput struct {
ServiceID string `json:"serviceID"`
NewStatus AlertStatus `json:"newStatus"`
}
type UpdateAlertsInput ¶
type UpdateAlertsInput struct {
AlertIDs []int `json:"alertIDs"`
NewStatus AlertStatus `json:"newStatus"`
}
type UpdateEscalationPolicyStepInput ¶
type UpdateEscalationPolicyStepInput struct {
ID string `json:"id"`
DelayMinutes *int `json:"delayMinutes"`
Targets []assignment.RawTarget `json:"targets"`
}
type UpdateHeartbeatMonitorInput ¶ added in v0.24.0
type UpdateRotationInput ¶
type UpdateRotationInput struct {
ID string `json:"id"`
Name *string `json:"name"`
Description *string `json:"description"`
TimeZone *string `json:"timeZone"`
Start *time.Time `json:"start"`
Type *rotation.Type `json:"type"`
ShiftLength *int `json:"shiftLength"`
ActiveUserIndex *int `json:"activeUserIndex"`
UserIDs []string `json:"userIDs"`
}
type UpdateScheduleInput ¶
type UpdateServiceInput ¶
type UpdateUserCalendarSubscriptionInput ¶ added in v0.25.0
type UpdateUserInput ¶
type UpdateUserOverrideInput ¶
type UserCalendarSubscriptionResolver ¶ added in v0.25.0
type UserCalendarSubscriptionResolver interface {
ReminderMinutes(ctx context.Context, obj *calendarsubscription.CalendarSubscription) ([]int, error)
Schedule(ctx context.Context, obj *calendarsubscription.CalendarSubscription) (*schedule.Schedule, error)
URL(ctx context.Context, obj *calendarsubscription.CalendarSubscription) (*string, error)
}
type UserConnection ¶
type UserContactMethodResolver ¶ added in v0.23.0
type UserContactMethodResolver interface {
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)
}
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"`
After *string `json:"after"`
Omit []string `json:"omit"`
ScheduleID *string `json:"scheduleID"`
FilterAddUserID []string `json:"filterAddUserID"`
FilterRemoveUserID []string `json:"filterRemoveUserID"`
FilterAnyUserID []string `json:"filterAnyUserID"`
Start *time.Time `json:"start"`
End *time.Time `json:"end"`
}
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) ([]calendarsubscription.CalendarSubscription, error)
AuthSubjects(ctx context.Context, obj *user.User) ([]user.AuthSubject, error)
Sessions(ctx context.Context, obj *user.User) ([]auth.UserSession, error)
OnCallSteps(ctx context.Context, obj *user.User) ([]escalation.Step, error)
}
type UserSearchOptions ¶
type UserSessionResolver ¶ added in v0.26.0
type VerifyContactMethodInput ¶ added in v0.23.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.