graphql2

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ApplyConfigValues

func ApplyConfigValues(cfg config.Config, vals []ConfigValueInput) (config.Config, error)

ApplyConfigValues will apply a list of ConfigValues to a Config struct.

func ApplyLimitValues added in v0.25.0

func ApplyLimitValues(l limit.Limits, vals []SystemLimitInput) (limit.Limits, error)

ApplyLimitValues will apply a list of LimitValues to a Limit struct.

func ExprIsID added in v0.33.0

func ExprIsID(n ast.Node) bool

ExprIsID returns true if the node is a valid identifier.

func ExprIsLiteral added in v0.33.0

func ExprIsLiteral(n ast.Node) bool

ExprIsLiteral returns true if the node is a literal value (scalar or array of scalar values).

func MarshalExprBooleanExpression added in v0.33.0

func MarshalExprBooleanExpression(s string) graphql.Marshaler

func MarshalExprExpression added in v0.33.0

func MarshalExprExpression(s string) graphql.Marshaler

func MarshalExprIdentifier added in v0.33.0

func MarshalExprIdentifier(n ast.Node) graphql.Marshaler

func MarshalExprOperator added in v0.33.0

func MarshalExprOperator(op string) graphql.Marshaler

func MarshalExprStringExpression added in v0.33.0

func MarshalExprStringExpression(s string) graphql.Marshaler

func MarshalExprStringMap added in v0.33.0

func MarshalExprStringMap(v map[string]string) graphql.Marshaler

func MarshalExprValue added in v0.33.0

func MarshalExprValue(n ast.Node) graphql.Marshaler

func MarshalISOTimestamp

func MarshalISOTimestamp(t time.Time) graphql.Marshaler

func MarshalStringMap added in v0.33.0

func MarshalStringMap(v map[string]string) graphql.Marshaler

func MarshalUUID added in v0.33.0

func MarshalUUID(t uuid.UUID) graphql.Marshaler

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

func QueryFields added in v0.32.0

func QueryFields(query string) ([]string, error)

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 UnmarshalExprBooleanExpression(v interface{}) (string, error)

func UnmarshalExprExpression added in v0.33.0

func UnmarshalExprExpression(v interface{}) (string, error)

func UnmarshalExprIdentifier added in v0.33.0

func UnmarshalExprIdentifier(v interface{}) (ast.Node, error)

func UnmarshalExprOperator added in v0.33.0

func UnmarshalExprOperator(v interface{}) (string, error)

func UnmarshalExprStringExpression added in v0.33.0

func UnmarshalExprStringExpression(v interface{}) (string, error)

func UnmarshalExprStringMap added in v0.33.0

func UnmarshalExprStringMap(v interface{}) (map[string]string, error)

func UnmarshalExprValue added in v0.33.0

func UnmarshalExprValue(v interface{}) (ast.Node, error)

func UnmarshalISOTimestamp

func UnmarshalISOTimestamp(v interface{}) (time.Time, error)

func UnmarshalStringMap added in v0.33.0

func UnmarshalStringMap(v interface{}) (map[string]string, error)

func UnmarshalUUID added in v0.33.0

func UnmarshalUUID(v interface{}) (uuid.UUID, error)

Types

type AlertConnection

type AlertConnection struct {
	Nodes    []alert.Alert `json:"nodes"`
	PageInfo *PageInfo     `json:"pageInfo"`
}

type AlertDataPoint added in v0.30.0

type AlertDataPoint struct {
	Timestamp  time.Time `json:"timestamp"`
	AlertCount int       `json:"alertCount"`
}

type AlertLogEntryConnection added in v0.23.0

type AlertLogEntryConnection struct {
	Nodes    []alertlog.Entry `json:"nodes"`
	PageInfo *PageInfo        `json:"pageInfo"`
}

type AlertLogEntryResolver added in v0.23.0

type AlertLogEntryResolver interface {
	Message(ctx context.Context, obj *alertlog.Entry) (string, error)
	State(ctx context.Context, obj *alertlog.Entry) (*NotificationState, error)
}

type AlertMetadata added in v0.33.0

type AlertMetadata struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type AlertMetadataInput added in v0.33.0

type AlertMetadataInput struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

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 AlertRecentEventsOptions struct {
	Limit *int    `json:"limit,omitempty"`
	After *string `json:"after,omitempty"`
}

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) 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 CalcRotationHandoffTimesInput struct {
	Handoff          time.Time             `json:"handoff"`
	From             *time.Time            `json:"from,omitempty"`
	TimeZone         string                `json:"timeZone"`
	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 ClearTemporarySchedulesInput struct {
	ScheduleID string    `json:"scheduleID"`
	Start      time.Time `json:"start"`
	End        time.Time `json:"end"`
}

type CloseMatchingAlertInput added in v0.32.0

type CloseMatchingAlertInput struct {
	ServiceID string  `json:"serviceID"`
	Summary   *string `json:"summary,omitempty"`
	Details   *string `json:"details,omitempty"`
	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
		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
	}

	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
		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
	}

	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
		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
		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 {
		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
	}

	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 Condition added in v0.33.0

type Condition struct {
	Clauses []Clause `json:"clauses"`
}

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

type ConfigHint struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

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"`
	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 ConfigValueInput struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

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) String added in v0.33.0

func (e ContactMethodType) String() string

func (*ContactMethodType) UnmarshalGQL added in v0.33.0

func (e *ContactMethodType) UnmarshalGQL(v interface{}) error

type CreateAlertInput added in v0.23.0

type CreateAlertInput struct {
	Summary   string               `json:"summary"`
	Details   *string              `json:"details,omitempty"`
	ServiceID string               `json:"serviceID"`
	Sanitize  *bool                `json:"sanitize,omitempty"`
	Dedup     *string              `json:"dedup,omitempty"`
	Meta      []AlertMetadataInput `json:"meta,omitempty"`
}

type CreateBasicAuthInput added in v0.31.0

type CreateBasicAuthInput struct {
	Username string `json:"username"`
	Password string `json:"password"`
	UserID   string `json:"userID"`
}

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 CreateGQLAPIKeyInput struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	ExpiresAt   time.Time `json:"expiresAt"`
	Role        UserRole  `json:"role"`
	Query       string    `json:"query"`
}

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"`
}

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 CreateUserCalendarSubscriptionInput struct {
	Name            string `json:"name"`
	ReminderMinutes []int  `json:"reminderMinutes,omitempty"`
	ScheduleID      string `json:"scheduleID"`
	Disabled        *bool  `json:"disabled,omitempty"`
	FullSchedule    *bool  `json:"fullSchedule,omitempty"`
}

type CreateUserContactMethodInput

type CreateUserContactMethodInput struct {
	UserID                  string                           `json:"userID"`
	Type                    *ContactMethodType               `json:"type,omitempty"`
	Dest                    *gadb.DestV1                     `json:"dest,omitempty"`
	Name                    string                           `json:"name"`
	Value                   *string                          `json:"value,omitempty"`
	NewUserNotificationRule *CreateUserNotificationRuleInput `json:"newUserNotificationRule,omitempty"`
	EnableStatusUpdates     *bool                            `json:"enableStatusUpdates,omitempty"`
}

type CreateUserInput added in v0.28.0

type CreateUserInput struct {
	Username string    `json:"username"`
	Password string    `json:"password"`
	Name     *string   `json:"name,omitempty"`
	Email    *string   `json:"email,omitempty"`
	Role     *UserRole `json:"role,omitempty"`
	Favorite *bool     `json:"favorite,omitempty"`
}

type CreateUserNotificationRuleInput

type CreateUserNotificationRuleInput struct {
	UserID          *string `json:"userID,omitempty"`
	ContactMethodID *string `json:"contactMethodID,omitempty"`
	DelayMinutes    int     `json:"delayMinutes"`
}

type CreateUserOverrideInput

type CreateUserOverrideInput struct {
	ScheduleID   *string   `json:"scheduleID,omitempty"`
	Start        time.Time `json:"start"`
	End          time.Time `json:"end"`
	AddUserID    *string   `json:"addUserID,omitempty"`
	RemoveUserID *string   `json:"removeUserID,omitempty"`
}

type CreatedGQLAPIKey added in v0.32.0

type CreatedGQLAPIKey struct {
	ID    string `json:"id"`
	Token string `json:"token"`
}

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 DebugMessagesInput struct {
	First         *int       `json:"first,omitempty"`
	CreatedBefore *time.Time `json:"createdBefore,omitempty"`
	CreatedAfter  *time.Time `json:"createdAfter,omitempty"`
}

type DebugSendSMSInfo added in v0.25.0

type DebugSendSMSInfo struct {
	ID          string `json:"id"`
	ProviderURL string `json:"providerURL"`
	FromNumber  string `json:"fromNumber"`
}

type DebugSendSMSInput added in v0.25.0

type DebugSendSMSInput struct {
	From string `json:"from"`
	To   string `json:"to"`
	Body string `json:"body"`
}

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 DestinationFieldValidateInput struct {
	// the type of destination to validate
	DestType string `json:"destType"`
	// the ID of the input field to validate
	FieldID string `json:"fieldID"`
	// the value to validate
	Value string `json:"value"`
}

type DestinationInputResolver added in v0.33.0

type DestinationInputResolver interface {
	Values(ctx context.Context, obj *gadb.DestV1, data []FieldValueInput) error
}

type DestinationResolver added in v0.32.0

type DestinationResolver interface {
	Values(ctx context.Context, obj *gadb.DestV1) ([]FieldValuePair, error)

	DisplayInfo(ctx context.Context, obj *gadb.DestV1) (InlineDisplayInfo, error)
}

type DirectiveRoot

type DirectiveRoot struct {
	Experimental func(ctx context.Context, obj interface{}, next graphql.Resolver, flagName string) (res interface{}, err error)
}

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) IsValid added in v0.33.0

func (e ErrorCode) IsValid() bool

func (ErrorCode) MarshalGQL added in v0.33.0

func (e ErrorCode) MarshalGQL(w io.Writer)

func (ErrorCode) String added in v0.33.0

func (e ErrorCode) String() string

func (*ErrorCode) UnmarshalGQL added in v0.33.0

func (e *ErrorCode) UnmarshalGQL(v interface{}) error

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"`
	FavoritesOnly  *bool    `json:"favoritesOnly,omitempty"`
	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 ExprResolver interface {
	ExprToCondition(ctx context.Context, obj *Expr, input ExprToConditionInput) (*Condition, error)
	ConditionToExpr(ctx context.Context, obj *Expr, input ConditionToExprInput) (string, error)
}

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 FieldValueInput struct {
	// The ID of the input field that this value is for.
	FieldID string `json:"fieldID"`
	Value   string `json:"value"`
}

type FieldValuePair added in v0.32.0

type FieldValuePair 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"`
}

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 GQLAPIKeyResolver interface {
	CreatedBy(ctx context.Context, obj *GQLAPIKey) (*user.User, error)

	UpdatedBy(ctx context.Context, obj *GQLAPIKey) (*user.User, error)
}

type GQLAPIKeyUsage added in v0.32.0

type GQLAPIKeyUsage struct {
	Time time.Time `json:"time"`
	Ua   string    `json:"ua"`
	IP   string    `json:"ip"`
}

type HeartbeatMonitorResolver added in v0.24.0

type HeartbeatMonitorResolver interface {
	TimeoutMinutes(ctx context.Context, obj *heartbeat.Monitor) (int, error)

	Href(ctx context.Context, obj *heartbeat.Monitor) (string, error)
}

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 IntegrationKeySearchOptions added in v0.30.1

type IntegrationKeySearchOptions struct {
	First  *int     `json:"first,omitempty"`
	After  *string  `json:"after,omitempty"`
	Search *string  `json:"search,omitempty"`
	Omit   []string `json:"omit,omitempty"`
}

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) String

func (e IntegrationKeyType) String() string

func (*IntegrationKeyType) UnmarshalGQL

func (e *IntegrationKeyType) UnmarshalGQL(v interface{}) error

type IntegrationKeyTypeInfo added in v0.31.0

type IntegrationKeyTypeInfo struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Label   string `json:"label"`
	Enabled bool   `json:"enabled"`
}

type KeyConfigResolver added in v0.33.0

type KeyConfigResolver interface {
	OneRule(ctx context.Context, obj *gadb.UIKConfigV1, id string) (*gadb.UIKRuleV1, error)
}

type LabelConnection

type LabelConnection struct {
	Nodes    []label.Label `json:"nodes"`
	PageInfo *PageInfo     `json:"pageInfo"`
}

type LabelKeySearchOptions added in v0.25.0

type LabelKeySearchOptions struct {
	First  *int     `json:"first,omitempty"`
	After  *string  `json:"after,omitempty"`
	Search *string  `json:"search,omitempty"`
	Omit   []string `json:"omit,omitempty"`
}

type LabelSearchOptions

type LabelSearchOptions struct {
	First      *int     `json:"first,omitempty"`
	After      *string  `json:"after,omitempty"`
	Search     *string  `json:"search,omitempty"`
	UniqueKeys *bool    `json:"uniqueKeys,omitempty"`
	Omit       []string `json:"omit,omitempty"`
}

type LabelValueSearchOptions added in v0.25.0

type LabelValueSearchOptions struct {
	Key    string   `json:"key"`
	First  *int     `json:"first,omitempty"`
	After  *string  `json:"after,omitempty"`
	Search *string  `json:"search,omitempty"`
	Omit   []string `json:"omit,omitempty"`
}

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

type MapValueError struct {
	Key string
	Err error
}

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 Mutation added in v0.32.0

type Mutation struct {
}

type MutationResolver

type MutationResolver interface {
	SwoAction(ctx context.Context, action SWOAction) (bool, error)
	LinkAccount(ctx context.Context, token string) (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) 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 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 {
	// stepNumber 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 OnCallShiftResolver interface {
	User(ctx context.Context, obj *oncall.Shift) (*user.User, error)
}

type PageInfo

type PageInfo struct {
	EndCursor   *string `json:"endCursor,omitempty"`
	HasNextPage bool    `json:"hasNextPage"`
}

type PhoneNumberInfo added in v0.25.0

type PhoneNumberInfo struct {
	ID          string `json:"id"`
	CountryCode string `json:"countryCode"`
	RegionCode  string `json:"regionCode"`
	Formatted   string `json:"formatted"`
	Valid       bool   `json:"valid"`
	Error       string `json:"error"`
}

type Query added in v0.32.0

type Query struct {
}

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)
	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
	User() UserResolver
	UserCalendarSubscription() UserCalendarSubscriptionResolver
	UserContactMethod() UserContactMethodResolver
	UserNotificationRule() UserNotificationRuleResolver
	UserOverride() UserOverrideResolver
	CreateEscalationPolicyStepInput() CreateEscalationPolicyStepInputResolver
	DestinationInput() DestinationInputResolver
	OnCallNotificationRuleInput() OnCallNotificationRuleInputResolver
	UpdateEscalationPolicyStepInput() UpdateEscalationPolicyStepInputResolver
}

type RotationConnection

type RotationConnection struct {
	Nodes    []rotation.Rotation `json:"nodes"`
	PageInfo *PageInfo           `json:"pageInfo"`
}

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"`
	FavoritesOnly  *bool    `json:"favoritesOnly,omitempty"`
	FavoritesFirst *bool    `json:"favoritesFirst,omitempty"`
}

type SWOAction added in v0.31.0

type SWOAction string
const (
	SWOActionReset   SWOAction = "reset"
	SWOActionExecute SWOAction = "execute"
)

func (SWOAction) IsValid added in v0.31.0

func (e SWOAction) IsValid() bool

func (SWOAction) MarshalGQL added in v0.31.0

func (e SWOAction) MarshalGQL(w io.Writer)

func (SWOAction) String added in v0.31.0

func (e SWOAction) String() string

func (*SWOAction) UnmarshalGQL added in v0.31.0

func (e *SWOAction) UnmarshalGQL(v interface{}) error

type SWOConnection added in v0.31.0

type SWOConnection struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	Type    string `json:"type"`
	IsNext  bool   `json:"isNext"`
	Count   int    `json:"count"`
}

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
const (
	SWOStateUnknown   SWOState = "unknown"
	SWOStateResetting SWOState = "resetting"
	SWOStateIdle      SWOState = "idle"
	SWOStateSyncing   SWOState = "syncing"
	SWOStatePausing   SWOState = "pausing"
	SWOStateExecuting SWOState = "executing"
	SWOStateDone      SWOState = "done"
)

func (SWOState) IsValid added in v0.31.0

func (e SWOState) IsValid() bool

func (SWOState) MarshalGQL added in v0.31.0

func (e SWOState) MarshalGQL(w io.Writer)

func (SWOState) String added in v0.31.0

func (e SWOState) String() string

func (*SWOState) UnmarshalGQL added in v0.31.0

func (e *SWOState) UnmarshalGQL(v interface{}) error

type SWOStatus added in v0.31.0

type SWOStatus struct {
	State         SWOState  `json:"state"`
	LastStatus    string    `json:"lastStatus"`
	LastError     string    `json:"lastError"`
	Nodes         []SWONode `json:"nodes"`
	MainDBVersion string    `json:"mainDBVersion"`
	NextDBVersion string    `json:"nextDBVersion"`
}

type ScheduleConnection

type ScheduleConnection struct {
	Nodes    []schedule.Schedule `json:"nodes"`
	PageInfo *PageInfo           `json:"pageInfo"`
}

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"`
	WeekdayFilter *timeutil.WeekdayFilter `json:"weekdayFilter,omitempty"`
}

type ScheduleRuleResolver

type ScheduleRuleResolver interface {
	Target(ctx context.Context, obj *rule.Rule) (*assignment.RawTarget, error)
}

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"`
	FavoritesOnly  *bool    `json:"favoritesOnly,omitempty"`
	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 ServiceConnection

type ServiceConnection struct {
	Nodes    []service.Service `json:"nodes"`
	PageInfo *PageInfo         `json:"pageInfo"`
}

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)
}

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"`
	FavoritesOnly  *bool    `json:"favoritesOnly,omitempty"`
	FavoritesFirst *bool    `json:"favoritesFirst,omitempty"`
}

type SetAlertNoiseReasonInput added in v0.31.0

type SetAlertNoiseReasonInput struct {
	AlertID     int    `json:"alertID"`
	NoiseReason string `json:"noiseReason"`
}

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"`
	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 SetTemporaryScheduleInput struct {
	ScheduleID string                `json:"scheduleID"`
	ClearStart *time.Time            `json:"clearStart,omitempty"`
	ClearEnd   *time.Time            `json:"clearEnd,omitempty"`
	Start      time.Time             `json:"start"`
	End        time.Time             `json:"end"`
	Shifts     []schedule.FixedShift `json:"shifts"`
}

type SlackChannelConnection

type SlackChannelConnection struct {
	Nodes    []slack.Channel `json:"nodes"`
	PageInfo *PageInfo       `json:"pageInfo"`
}

type SlackChannelSearchOptions

type SlackChannelSearchOptions struct {
	First  *int     `json:"first,omitempty"`
	After  *string  `json:"after,omitempty"`
	Search *string  `json:"search,omitempty"`
	Omit   []string `json:"omit,omitempty"`
}

type SlackUserGroupConnection added in v0.31.0

type SlackUserGroupConnection struct {
	Nodes    []slack.UserGroup `json:"nodes"`
	PageInfo *PageInfo         `json:"pageInfo"`
}

type SlackUserGroupSearchOptions added in v0.31.0

type SlackUserGroupSearchOptions struct {
	First  *int     `json:"first,omitempty"`
	After  *string  `json:"after,omitempty"`
	Search *string  `json:"search,omitempty"`
	Omit   []string `json:"omit,omitempty"`
}

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) String added in v0.31.0

func (e StatusUpdateState) String() string

func (*StatusUpdateState) UnmarshalGQL added in v0.31.0

func (e *StatusUpdateState) UnmarshalGQL(v interface{}) error

type StringConnection added in v0.25.0

type StringConnection struct {
	Nodes    []string  `json:"nodes"`
	PageInfo *PageInfo `json:"pageInfo"`
}

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 SystemLimitInput struct {
	ID    limit.ID `json:"id"`
	Value int      `json:"value"`
}

type TargetResolver

type TargetResolver interface {
	Name(ctx context.Context, obj *assignment.RawTarget) (string, error)
}

type TemporaryScheduleResolver added in v0.27.0

type TemporaryScheduleResolver interface {
	Shifts(ctx context.Context, obj *schedule.TemporarySchedule) ([]oncall.Shift, error)
}

type TimeSeriesBucket added in v0.31.0

type TimeSeriesBucket struct {
	Start time.Time `json:"start"`
	End   time.Time `json:"end"`
	Count int       `json:"count"`
}

type TimeSeriesOptions added in v0.31.0

type TimeSeriesOptions struct {
	BucketDuration timeutil.ISODuration `json:"bucketDuration"`
	BucketOrigin   *time.Time           `json:"bucketOrigin,omitempty"`
}

type TimeZone

type TimeZone struct {
	ID string `json:"id"`
}

type TimeZoneConnection

type TimeZoneConnection struct {
	Nodes    []TimeZone `json:"nodes"`
	PageInfo *PageInfo  `json:"pageInfo"`
}

type TimeZoneSearchOptions

type TimeZoneSearchOptions struct {
	First  *int     `json:"first,omitempty"`
	After  *string  `json:"after,omitempty"`
	Search *string  `json:"search,omitempty"`
	Omit   []string `json:"omit,omitempty"`
}

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 {
	AlertIDs    []int        `json:"alertIDs"`
	NewStatus   *AlertStatus `json:"newStatus,omitempty"`
	NoiseReason *string      `json:"noiseReason,omitempty"`
}

type UpdateBasicAuthInput added in v0.31.0

type UpdateBasicAuthInput struct {
	Password    string  `json:"password"`
	OldPassword *string `json:"oldPassword,omitempty"`
	UserID      string  `json:"userID"`
}

type UpdateEscalationPolicyInput

type UpdateEscalationPolicyInput struct {
	ID          string   `json:"id"`
	Name        *string  `json:"name,omitempty"`
	Description *string  `json:"description,omitempty"`
	Repeat      *int     `json:"repeat,omitempty"`
	StepIDs     []string `json:"stepIDs,omitempty"`
}

type UpdateEscalationPolicyStepInput

type UpdateEscalationPolicyStepInput struct {
	ID           string                 `json:"id"`
	DelayMinutes *int                   `json:"delayMinutes,omitempty"`
	Targets      []assignment.RawTarget `json:"targets,omitempty"`
	Actions      []gadb.DestV1          `json:"actions,omitempty"`
}

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 UpdateGQLAPIKeyInput struct {
	ID          string  `json:"id"`
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
}

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"`
}

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"`
	// 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"`
	ActiveUserIndex *int           `json:"activeUserIndex,omitempty"`
	UserIDs         []string       `json:"userIDs,omitempty"`
}

type UpdateScheduleInput

type UpdateScheduleInput struct {
	ID          string  `json:"id"`
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
	TimeZone    *string `json:"timeZone,omitempty"`
}

type UpdateServiceInput

type UpdateServiceInput struct {
	ID                   string     `json:"id"`
	Name                 *string    `json:"name,omitempty"`
	Description          *string    `json:"description,omitempty"`
	EscalationPolicyID   *string    `json:"escalationPolicyID,omitempty"`
	MaintenanceExpiresAt *time.Time `json:"maintenanceExpiresAt,omitempty"`
}

type UpdateUserCalendarSubscriptionInput added in v0.25.0

type UpdateUserCalendarSubscriptionInput struct {
	ID              string  `json:"id"`
	Name            *string `json:"name,omitempty"`
	ReminderMinutes []int   `json:"reminderMinutes,omitempty"`
	Disabled        *bool   `json:"disabled,omitempty"`
	FullSchedule    *bool   `json:"fullSchedule,omitempty"`
}

type UpdateUserContactMethodInput

type UpdateUserContactMethodInput struct {
	ID                  string  `json:"id"`
	Name                *string `json:"name,omitempty"`
	Value               *string `json:"value,omitempty"`
	EnableStatusUpdates *bool   `json:"enableStatusUpdates,omitempty"`
}

type UpdateUserInput

type UpdateUserInput struct {
	ID                          string    `json:"id"`
	Name                        *string   `json:"name,omitempty"`
	Email                       *string   `json:"email,omitempty"`
	Role                        *UserRole `json:"role,omitempty"`
	StatusUpdateContactMethodID *string   `json:"statusUpdateContactMethodID,omitempty"`
}

type UpdateUserOverrideInput

type UpdateUserOverrideInput struct {
	ID           string     `json:"id"`
	Start        *time.Time `json:"start,omitempty"`
	End          *time.Time `json:"end,omitempty"`
	AddUserID    *string    `json:"addUserID,omitempty"`
	RemoveUserID *string    `json:"removeUserID,omitempty"`
}

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 UserConnection struct {
	Nodes    []user.User `json:"nodes"`
	PageInfo *PageInfo   `json:"pageInfo"`
}

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 UserOverrideResolver interface {
	AddUser(ctx context.Context, obj *override.UserOverride) (*user.User, error)
	RemoveUser(ctx context.Context, obj *override.UserOverride) (*user.User, error)
	Target(ctx context.Context, obj *override.UserOverride) (*assignment.RawTarget, error)
}

type UserOverrideSearchOptions

type UserOverrideSearchOptions struct {
	First              *int       `json:"first,omitempty"`
	After              *string    `json:"after,omitempty"`
	Omit               []string   `json:"omit,omitempty"`
	ScheduleID         *string    `json:"scheduleID,omitempty"`
	FilterAddUserID    []string   `json:"filterAddUserID,omitempty"`
	FilterRemoveUserID []string   `json:"filterRemoveUserID,omitempty"`
	FilterAnyUserID    []string   `json:"filterAnyUserID,omitempty"`
	Start              *time.Time `json:"start,omitempty"`
	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
const (
	UserRoleUnknown UserRole = "unknown"
	UserRoleUser    UserRole = "user"
	UserRoleAdmin   UserRole = "admin"
)

func (UserRole) IsValid

func (e UserRole) IsValid() bool

func (UserRole) MarshalGQL

func (e UserRole) MarshalGQL(w io.Writer)

func (UserRole) String

func (e UserRole) String() string

func (*UserRole) UnmarshalGQL

func (e *UserRole) UnmarshalGQL(v interface{}) error

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"`
	FavoritesOnly  *bool              `json:"favoritesOnly,omitempty"`
	FavoritesFirst *bool              `json:"favoritesFirst,omitempty"`
}

type UserSession added in v0.32.0

type UserSession struct {
	ID           string    `json:"id"`
	Current      bool      `json:"current"`
	UserAgent    string    `json:"userAgent"`
	CreatedAt    time.Time `json:"createdAt"`
	LastAccessAt time.Time `json:"lastAccessAt"`
}

type VerifyContactMethodInput added in v0.23.0

type VerifyContactMethodInput struct {
	ContactMethodID string `json:"contactMethodID"`
	Code            int    `json:"code"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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