graphql

package
v0.24.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RequestInfoContextKey = requestInfoKey(0)

RequestInfoContextKey is used to store RequestInfo in a context.Context.

Variables

View Source
var HourTime = g.NewScalar(g.ScalarConfig{
	Name:        "HourTime",
	Description: "HourTime is a timestamp containing only the hour and minute.",
	Serialize: func(val interface{}) interface{} {
		return val.(rule.Clock).String()
	},
})

HourTime is a timestamp containing only the hour and minute

View Source
var ISOTimestamp = g.NewScalar(g.ScalarConfig{
	Name:        "ISOTimestamp",
	Description: "ISOTimestamp is a timestamp formatted as a string in the ISO format (RFC3339).",
	Serialize: func(val interface{}) interface{} {
		return val.(time.Time).Format(time.RFC3339Nano)
	},
})

ISOTimestamp is a timestamp formatted as a string in the ISO format

Functions

This section is empty.

Types

type Config

type Config struct {
	DB *sql.DB

	AlertStore    alert.Store
	AlertLogStore alertlog.Store
	UserStore     user.Store
	CMStore       contactmethod.Store
	NRStore       notificationrule.Store
	ServiceStore  service.Store

	ScheduleStore     schedule.Store
	ScheduleRuleStore rule.Store
	RotationStore     rotation.Store
	ShiftCalc         shiftcalc.Calculator

	EscalationStore     escalation.Store
	IntegrationKeyStore integrationkey.Store
	HeartbeatStore      heartbeat.Store

	LimitStore limit.Store

	OverrideStore override.Store

	Resolver          resolver.Resolver
	NotificationStore notification.Store
	UserFavoriteStore favorite.Store
	LabelStore        label.Store
	OnCallStore       oncall.Store
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(ctx context.Context, c Config) (*Handler, error)

func (*Handler) CMFields

func (h *Handler) CMFields() g.Fields

func (*Handler) NRFields

func (h *Handler) NRFields() g.Fields

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type RequestInfo

type RequestInfo struct {
	Mutations []string
	Queries   []string
}

RequestInfo carries useful information about the request.

Jump to

Keyboard shortcuts

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