graphqlapp

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert App

func (*Alert) AlertID

func (a *Alert) AlertID(ctx context.Context, raw *alert.Alert) (int, error)

func (*Alert) ID

func (a *Alert) ID(ctx context.Context, raw *alert.Alert) (string, error)

func (*Alert) RecentEvents added in v0.23.0

func (*Alert) Service

func (a *Alert) Service(ctx context.Context, raw *alert.Alert) (*service.Service, error)

func (*Alert) State

func (a *Alert) State(ctx context.Context, raw *alert.Alert) (*alert.State, error)

func (*Alert) Status

func (a *Alert) Status(ctx context.Context, raw *alert.Alert) (graphql2.AlertStatus, error)

type AlertLogEntry added in v0.23.0

type AlertLogEntry App

func (*AlertLogEntry) ID added in v0.23.0

func (a *AlertLogEntry) ID(ctx context.Context, obj *alertlog.Entry) (int, error)

func (*AlertLogEntry) Message added in v0.23.0

func (a *AlertLogEntry) Message(ctx context.Context, obj *alertlog.Entry) (string, error)

func (*AlertLogEntry) Timestamp added in v0.23.0

func (a *AlertLogEntry) Timestamp(ctx context.Context, obj *alertlog.Entry) (*time.Time, error)

type App

type App struct {
	DB            *sql.DB
	UserStore     user.Store
	CMStore       contactmethod.Store
	NRStore       notificationrule.Store
	NCStore       notificationchannel.Store
	AlertStore    alert.Store
	AlertLogStore alertlog.Store
	ServiceStore  service.Store
	FavoriteStore favorite.Store
	PolicyStore   escalation.Store
	ScheduleStore schedule.Store
	RotationStore rotation.Store
	OnCallStore   oncall.Store
	IntKeyStore   integrationkey.Store
	LabelStore    label.Store
	RuleStore     rule.Store
	OverrideStore override.Store
	ConfigStore   *config.Store
	SlackStore    *slack.ChannelSender

	NotificationStore notification.Store

	TimeZoneStore *timezone.Store
}

func (*App) Alert

func (a *App) Alert() graphql2.AlertResolver

func (*App) AlertLogEntry added in v0.23.0

func (a *App) AlertLogEntry() graphql2.AlertLogEntryResolver

func (*App) EscalationPolicy

func (a *App) EscalationPolicy() graphql2.EscalationPolicyResolver

func (*App) EscalationPolicyStep

func (a *App) EscalationPolicyStep() graphql2.EscalationPolicyStepResolver

func (*App) FindOneAlert

func (app *App) FindOneAlert(ctx context.Context, id int) (*alert.Alert, error)

func (*App) FindOneAlertState

func (app *App) FindOneAlertState(ctx context.Context, alertID int) (*alert.State, error)

func (*App) FindOneCM

func (app *App) FindOneCM(ctx context.Context, id string) (*contactmethod.ContactMethod, error)

FindOneCM will return a single contact method for the given id, using the contexts dataloader if enabled.

func (*App) FindOnePolicy

func (app *App) FindOnePolicy(ctx context.Context, id string) (*escalation.Policy, error)

func (*App) FindOneRotation

func (app *App) FindOneRotation(ctx context.Context, id string) (*rotation.Rotation, error)

func (*App) FindOneSchedule

func (app *App) FindOneSchedule(ctx context.Context, id string) (*schedule.Schedule, error)

func (*App) FindOneService

func (app *App) FindOneService(ctx context.Context, id string) (*service.Service, error)

func (*App) FindOneUser

func (app *App) FindOneUser(ctx context.Context, id string) (*user.User, error)

func (*App) Handler

func (a *App) Handler() http.Handler

func (*App) IntegrationKey

func (a *App) IntegrationKey() graphql2.IntegrationKeyResolver

func (*App) Mutation

func (a *App) Mutation() graphql2.MutationResolver

func (*App) OnCallShift

func (a *App) OnCallShift() graphql2.OnCallShiftResolver

func (*App) PlayHandler

func (a *App) PlayHandler() http.Handler

func (*App) Query

func (a *App) Query() graphql2.QueryResolver

func (*App) Rotation

func (a *App) Rotation() graphql2.RotationResolver

func (*App) Schedule

func (a *App) Schedule() graphql2.ScheduleResolver

func (*App) ScheduleRule

func (a *App) ScheduleRule() graphql2.ScheduleRuleResolver

func (*App) Service

func (a *App) Service() graphql2.ServiceResolver

func (*App) Target

func (a *App) Target() graphql2.TargetResolver

func (*App) User

func (a *App) User() graphql2.UserResolver

func (*App) UserContactMethod added in v0.23.0

func (a *App) UserContactMethod() graphql2.UserContactMethodResolver

func (*App) UserNotificationRule

func (a *App) UserNotificationRule() graphql2.UserNotificationRuleResolver

func (*App) UserOverride

func (a *App) UserOverride() graphql2.UserOverrideResolver

type ContactMethod added in v0.23.0

type ContactMethod App

func (*ContactMethod) FormattedValue added in v0.23.0

func (a *ContactMethod) FormattedValue(ctx context.Context, obj *contactmethod.ContactMethod) (string, error)

type EscalationPolicy

type EscalationPolicy App

func (*EscalationPolicy) AssignedTo

func (ep *EscalationPolicy) AssignedTo(ctx context.Context, raw *escalation.Policy) ([]assignment.RawTarget, error)

func (*EscalationPolicy) Steps

type EscalationPolicyStep

type EscalationPolicyStep App

func (*EscalationPolicyStep) EscalationPolicy

func (step *EscalationPolicyStep) EscalationPolicy(ctx context.Context, raw *escalation.Step) (*escalation.Policy, error)

func (*EscalationPolicyStep) Targets

type IntegrationKey

type IntegrationKey App

func (*IntegrationKey) Href

func (*IntegrationKey) Type

type Mutation

type Mutation App

func (*Mutation) AddAuthSubject

func (a *Mutation) AddAuthSubject(ctx context.Context, input user.AuthSubject) (bool, error)

func (*Mutation) CreateAlert added in v0.23.0

func (m *Mutation) CreateAlert(ctx context.Context, input graphql2.CreateAlertInput) (*alert.Alert, error)

func (*Mutation) CreateEscalationPolicy

func (m *Mutation) CreateEscalationPolicy(ctx context.Context, input graphql2.CreateEscalationPolicyInput) (pol *escalation.Policy, err error)

func (*Mutation) CreateEscalationPolicyStep

func (m *Mutation) CreateEscalationPolicyStep(ctx context.Context, input graphql2.CreateEscalationPolicyStepInput) (step *escalation.Step, err error)

func (*Mutation) CreateIntegrationKey

func (m *Mutation) CreateIntegrationKey(ctx context.Context, input graphql2.CreateIntegrationKeyInput) (key *integrationkey.IntegrationKey, err error)

func (*Mutation) CreateRotation

func (m *Mutation) CreateRotation(ctx context.Context, input graphql2.CreateRotationInput) (result *rotation.Rotation, err error)

func (*Mutation) CreateSchedule

func (m *Mutation) CreateSchedule(ctx context.Context, input graphql2.CreateScheduleInput) (sched *schedule.Schedule, err error)

func (*Mutation) CreateService

func (m *Mutation) CreateService(ctx context.Context, input graphql2.CreateServiceInput) (result *service.Service, err error)

func (*Mutation) CreateUserContactMethod

func (*Mutation) CreateUserOverride

func (m *Mutation) CreateUserOverride(ctx context.Context, input graphql2.CreateUserOverrideInput) (*override.UserOverride, error)

func (*Mutation) DeleteAll

func (a *Mutation) DeleteAll(ctx context.Context, input []assignment.RawTarget) (bool, error)

func (*Mutation) DeleteAuthSubject

func (a *Mutation) DeleteAuthSubject(ctx context.Context, input user.AuthSubject) (bool, error)

func (*Mutation) DeleteUser

func (a *Mutation) DeleteUser(ctx context.Context, id string) (bool, error)

func (*Mutation) EscalateAlerts

func (m *Mutation) EscalateAlerts(ctx context.Context, ids []int) ([]alert.Alert, error)

func (*Mutation) SendContactMethodVerification added in v0.23.0

func (m *Mutation) SendContactMethodVerification(ctx context.Context, input graphql2.SendContactMethodVerificationInput) (bool, error)

func (*Mutation) SetConfig

func (m *Mutation) SetConfig(ctx context.Context, input []graphql2.ConfigValueInput) (bool, error)

func (*Mutation) SetFavorite

func (a *Mutation) SetFavorite(ctx context.Context, input graphql2.SetFavoriteInput) (bool, error)

func (*Mutation) SetLabel

func (m *Mutation) SetLabel(ctx context.Context, input graphql2.SetLabelInput) (bool, error)

func (*Mutation) TestContactMethod

func (a *Mutation) TestContactMethod(ctx context.Context, id string) (bool, error)

func (*Mutation) UpdateAlerts

func (m *Mutation) UpdateAlerts(ctx context.Context, args graphql2.UpdateAlertsInput) ([]alert.Alert, error)

func (*Mutation) UpdateEscalationPolicy

func (m *Mutation) UpdateEscalationPolicy(ctx context.Context, input graphql2.UpdateEscalationPolicyInput) (bool, error)

func (*Mutation) UpdateEscalationPolicyStep

func (m *Mutation) UpdateEscalationPolicyStep(ctx context.Context, input graphql2.UpdateEscalationPolicyStepInput) (bool, error)

func (*Mutation) UpdateRotation

func (m *Mutation) UpdateRotation(ctx context.Context, input graphql2.UpdateRotationInput) (res bool, err error)

func (*Mutation) UpdateSchedule

func (m *Mutation) UpdateSchedule(ctx context.Context, input graphql2.UpdateScheduleInput) (ok bool, err error)

func (*Mutation) UpdateScheduleTarget

func (m *Mutation) UpdateScheduleTarget(ctx context.Context, input graphql2.ScheduleTargetInput) (bool, error)

func (*Mutation) UpdateService

func (a *Mutation) UpdateService(ctx context.Context, input graphql2.UpdateServiceInput) (bool, error)

func (*Mutation) UpdateUser

func (a *Mutation) UpdateUser(ctx context.Context, input graphql2.UpdateUserInput) (bool, error)

func (*Mutation) UpdateUserContactMethod

func (m *Mutation) UpdateUserContactMethod(ctx context.Context, input graphql2.UpdateUserContactMethodInput) (bool, error)

func (*Mutation) UpdateUserOverride

func (m *Mutation) UpdateUserOverride(ctx context.Context, input graphql2.UpdateUserOverrideInput) (bool, error)

func (*Mutation) VerifyContactMethod added in v0.23.0

func (m *Mutation) VerifyContactMethod(ctx context.Context, input graphql2.VerifyContactMethodInput) (bool, error)

type OnCallShift

type OnCallShift App

func (*OnCallShift) User

func (oc *OnCallShift) User(ctx context.Context, raw *oncall.Shift) (*user.User, error)

type Query

type Query App

func (*Query) Alert

func (q *Query) Alert(ctx context.Context, alertID int) (*alert.Alert, error)

func (*Query) Alerts

func (q *Query) Alerts(ctx context.Context, opts *graphql2.AlertSearchOptions) (conn *graphql2.AlertConnection, err error)

func (*Query) AuthSubjectsForProvider

func (a *Query) AuthSubjectsForProvider(ctx context.Context, _first *int, _after *string, providerID string) (conn *graphql2.AuthSubjectConnection, err error)

func (*Query) Config

func (q *Query) Config(ctx context.Context, all *bool) ([]graphql2.ConfigValue, error)

func (*Query) EscalationPolicies

func (*Query) EscalationPolicy

func (q *Query) EscalationPolicy(ctx context.Context, id string) (*escalation.Policy, error)

func (*Query) IntegrationKey

func (q *Query) IntegrationKey(ctx context.Context, id string) (*integrationkey.IntegrationKey, error)

func (*Query) Labels

func (q *Query) Labels(ctx context.Context, input *graphql2.LabelSearchOptions) (conn *graphql2.LabelConnection, err error)

func (*Query) Rotation

func (q *Query) Rotation(ctx context.Context, id string) (*rotation.Rotation, error)

func (*Query) Rotations

func (q *Query) Rotations(ctx context.Context, opts *graphql2.RotationSearchOptions) (conn *graphql2.RotationConnection, err error)

func (*Query) Schedule

func (q *Query) Schedule(ctx context.Context, id string) (*schedule.Schedule, error)

func (*Query) Schedules

func (q *Query) Schedules(ctx context.Context, opts *graphql2.ScheduleSearchOptions) (conn *graphql2.ScheduleConnection, err error)

func (*Query) Service

func (q *Query) Service(ctx context.Context, id string) (*service.Service, error)

func (*Query) Services

func (q *Query) Services(ctx context.Context, opts *graphql2.ServiceSearchOptions) (conn *graphql2.ServiceConnection, err error)

func (*Query) SlackChannel

func (q *Query) SlackChannel(ctx context.Context, id string) (*slack.Channel, error)

func (*Query) SlackChannels

func (q *Query) SlackChannels(ctx context.Context, input *graphql2.SlackChannelSearchOptions) (conn *graphql2.SlackChannelConnection, err error)

func (*Query) TimeZones

func (q *Query) TimeZones(ctx context.Context, input *graphql2.TimeZoneSearchOptions) (conn *graphql2.TimeZoneConnection, err error)

func (*Query) User

func (a *Query) User(ctx context.Context, id *string) (*user.User, error)

func (*Query) UserContactMethod

func (q *Query) UserContactMethod(ctx context.Context, id string) (*contactmethod.ContactMethod, error)

func (*Query) UserOverride

func (q *Query) UserOverride(ctx context.Context, id string) (*override.UserOverride, error)

func (*Query) UserOverrides

func (q *Query) UserOverrides(ctx context.Context, input *graphql2.UserOverrideSearchOptions) (conn *graphql2.UserOverrideConnection, err error)

func (*Query) Users

func (q *Query) Users(ctx context.Context, opts *graphql2.UserSearchOptions, first *int, after, searchStr *string) (conn *graphql2.UserConnection, err error)

type Rotation

type Rotation App

func (*Rotation) ActiveUserIndex

func (r *Rotation) ActiveUserIndex(ctx context.Context, obj *rotation.Rotation) (int, error)

func (*Rotation) IsFavorite added in v0.23.0

func (r *Rotation) IsFavorite(ctx context.Context, rot *rotation.Rotation) (bool, error)

func (*Rotation) NextHandoffTimes

func (r *Rotation) NextHandoffTimes(ctx context.Context, rot *rotation.Rotation, num *int) ([]time.Time, error)

func (*Rotation) TimeZone

func (r *Rotation) TimeZone(ctx context.Context, rot *rotation.Rotation) (string, error)

func (*Rotation) UserIDs

func (r *Rotation) UserIDs(ctx context.Context, rot *rotation.Rotation) ([]string, error)

func (*Rotation) Users

func (r *Rotation) Users(ctx context.Context, rot *rotation.Rotation) ([]user.User, error)

type Schedule

type Schedule App

func (*Schedule) AssignedTo

func (s *Schedule) AssignedTo(ctx context.Context, raw *schedule.Schedule) ([]assignment.RawTarget, error)

func (*Schedule) IsFavorite added in v0.23.0

func (s *Schedule) IsFavorite(ctx context.Context, raw *schedule.Schedule) (bool, error)

func (*Schedule) Shifts

func (s *Schedule) Shifts(ctx context.Context, raw *schedule.Schedule, start, end time.Time) ([]oncall.Shift, error)

func (*Schedule) Target

func (*Schedule) Targets

func (*Schedule) TimeZone

func (r *Schedule) TimeZone(ctx context.Context, data *schedule.Schedule) (string, error)

type ScheduleRule

type ScheduleRule App

func (*ScheduleRule) Target

func (r *ScheduleRule) Target(ctx context.Context, raw *rule.Rule) (*assignment.RawTarget, error)

func (*ScheduleRule) WeekdayFilter

func (r *ScheduleRule) WeekdayFilter(ctx context.Context, raw *rule.Rule) ([]bool, error)

type Service

type Service App

func (*Service) EscalationPolicy

func (s *Service) EscalationPolicy(ctx context.Context, raw *service.Service) (*escalation.Policy, error)

func (*Service) IntegrationKeys

func (s *Service) IntegrationKeys(ctx context.Context, raw *service.Service) ([]integrationkey.IntegrationKey, error)

func (*Service) IsFavorite

func (s *Service) IsFavorite(ctx context.Context, raw *service.Service) (bool, error)

func (*Service) Labels

func (s *Service) Labels(ctx context.Context, raw *service.Service) ([]label.Label, error)

func (*Service) OnCallUsers

func (s *Service) OnCallUsers(ctx context.Context, raw *service.Service) ([]oncall.ServiceOnCallUser, error)

type Target

type Target App

func (*Target) Name

func (t *Target) Name(ctx context.Context, raw *assignment.RawTarget) (*string, error)

type User

type User App

func (*User) AuthSubjects

func (a *User) AuthSubjects(ctx context.Context, obj *user.User) ([]user.AuthSubject, error)

func (*User) ContactMethods

func (a *User) ContactMethods(ctx context.Context, obj *user.User) ([]contactmethod.ContactMethod, error)

func (*User) NotificationRules

func (a *User) NotificationRules(ctx context.Context, obj *user.User) ([]notificationrule.NotificationRule, error)

func (*User) OnCallSteps

func (a *User) OnCallSteps(ctx context.Context, obj *user.User) ([]escalation.Step, error)

func (*User) Role

func (a *User) Role(ctx context.Context, usr *user.User) (graphql2.UserRole, error)

type UserNotificationRule

type UserNotificationRule App

func (*UserNotificationRule) ContactMethod

type UserOverride

type UserOverride App

func (*UserOverride) AddUser

func (u *UserOverride) AddUser(ctx context.Context, raw *override.UserOverride) (*user.User, error)

func (*UserOverride) RemoveUser

func (u *UserOverride) RemoveUser(ctx context.Context, raw *override.UserOverride) (*user.User, error)

func (*UserOverride) Target

Jump to

Keyboard shortcuts

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