graphql

package
v0.80.59 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type CheckinResolver

type CheckinResolver interface {
	Service(ctx context.Context, obj *types.Checkin) (*types.Service, error)

	Failures(ctx context.Context, obj *types.Checkin) ([]*types.Failure, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	Checkin struct {
		ApiKey      func(childComplexity int) int
		CreatedAt   func(childComplexity int) int
		Failing     func(childComplexity int) int
		Failures    func(childComplexity int) int
		GracePeriod func(childComplexity int) int
		Hits        func(childComplexity int) int
		Id          func(childComplexity int) int
		Interval    func(childComplexity int) int
		LastHit     func(childComplexity int) int
		Name        func(childComplexity int) int
		Service     func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
	}

	CheckinHit struct {
		CreatedAt func(childComplexity int) int
		From      func(childComplexity int) int
		Id        func(childComplexity int) int
	}

	Core struct {
		CreatedAt   func(childComplexity int) int
		Description func(childComplexity int) int
		Domain      func(childComplexity int) int
		Footer      func(childComplexity int) int
		Name        func(childComplexity int) int
		Started     func(childComplexity int) int
		Timezone    func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		UsingCdn    func(childComplexity int) int
		Version     func(childComplexity int) int
	}

	Failure struct {
		CreatedAt func(childComplexity int) int
		ErrorCode func(childComplexity int) int
		Id        func(childComplexity int) int
		Issue     func(childComplexity int) int
		Method    func(childComplexity int) int
		MethodId  func(childComplexity int) int
		PingTime  func(childComplexity int) int
	}

	Group struct {
		CreatedAt func(childComplexity int) int
		Id        func(childComplexity int) int
		Name      func(childComplexity int) int
		Order     func(childComplexity int) int
		Public    func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
	}

	Message struct {
		CreatedAt         func(childComplexity int) int
		Description       func(childComplexity int) int
		EndOn             func(childComplexity int) int
		Id                func(childComplexity int) int
		NotifyBefore      func(childComplexity int) int
		NotifyBeforeScale func(childComplexity int) int
		NotifyMethod      func(childComplexity int) int
		NotifyUsers       func(childComplexity int) int
		StartOn           func(childComplexity int) int
		Title             func(childComplexity int) int
		UpdatedAt         func(childComplexity int) int
	}

	Query struct {
		Checkin  func(childComplexity int, id int64) int
		Checkins func(childComplexity int) int
		Core     func(childComplexity int) int
		Group    func(childComplexity int, id int64) int
		Groups   func(childComplexity int) int
		Message  func(childComplexity int, id int64) int
		Messages func(childComplexity int) int
		Service  func(childComplexity int, id int64) int
		Services func(childComplexity int) int
		User     func(childComplexity int, id int64) int
		Users    func(childComplexity int) int
	}

	Service struct {
		AllowNotifications func(childComplexity int) int
		AvgResponse        func(childComplexity int) int
		CreatedAt          func(childComplexity int) int
		Domain             func(childComplexity int) int
		Expected           func(childComplexity int) int
		ExpectedStatus     func(childComplexity int) int
		Failures           func(childComplexity int) int
		Group              func(childComplexity int) int
		Headers            func(childComplexity int) int
		Id                 func(childComplexity int) int
		Interval           func(childComplexity int) int
		LastOnline         func(childComplexity int) int
		LastStatusCode     func(childComplexity int) int
		Latency            func(childComplexity int) int
		Method             func(childComplexity int) int
		Name               func(childComplexity int) int
		Online             func(childComplexity int) int
		Online24Hours      func(childComplexity int) int
		Order              func(childComplexity int) int
		Permalink          func(childComplexity int) int
		PingTime           func(childComplexity int) int
		Port               func(childComplexity int) int
		PostData           func(childComplexity int) int
		Public             func(childComplexity int) int
		Timeout            func(childComplexity int) int
		Type               func(childComplexity int) int
		UpdatedAt          func(childComplexity int) int
	}

	User struct {
		Admin     func(childComplexity int) int
		ApiKey    func(childComplexity int) int
		ApiSecret func(childComplexity int) int
		CreatedAt func(childComplexity int) int
		Email     func(childComplexity int) int
		Id        func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
		Username  func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type CoreResolver

type CoreResolver interface {
	Footer(ctx context.Context, obj *types.Core) (string, error)

	Timezone(ctx context.Context, obj *types.Core) (string, error)
	UsingCdn(ctx context.Context, obj *types.Core) (bool, error)
}

type DirectiveRoot

type DirectiveRoot struct {
}

type GroupResolver

type GroupResolver interface {
	Public(ctx context.Context, obj *types.Group) (bool, error)
}

type MessageResolver

type MessageResolver interface {
	NotifyUsers(ctx context.Context, obj *types.Message) (bool, error)
	NotifyMethod(ctx context.Context, obj *types.Message) (bool, error)
	NotifyBefore(ctx context.Context, obj *types.Message) (int, error)
}

type QueryResolver

type QueryResolver interface {
	Core(ctx context.Context) (*types.Core, error)
	Service(ctx context.Context, id int64) (*types.Service, error)
	Services(ctx context.Context) ([]*types.Service, error)
	Group(ctx context.Context, id int64) (*types.Group, error)
	Groups(ctx context.Context) ([]*types.Group, error)
	User(ctx context.Context, id int64) (*types.User, error)
	Users(ctx context.Context) ([]*types.User, error)
	Checkin(ctx context.Context, id int64) (*types.Checkin, error)
	Checkins(ctx context.Context) ([]*types.Checkin, error)
	Message(ctx context.Context, id int64) (*types.Message, error)
	Messages(ctx context.Context) ([]*types.Message, error)
}

type Resolver

type Resolver struct{}

func (*Resolver) Checkin

func (r *Resolver) Checkin() CheckinResolver

func (*Resolver) Core

func (r *Resolver) Core() CoreResolver

func (*Resolver) Group

func (r *Resolver) Group() GroupResolver

func (*Resolver) Message

func (r *Resolver) Message() MessageResolver

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

func (*Resolver) Service

func (r *Resolver) Service() ServiceResolver

func (*Resolver) User

func (r *Resolver) User() UserResolver

type ResolverRoot

type ResolverRoot interface {
	Checkin() CheckinResolver
	Core() CoreResolver
	Group() GroupResolver
	Message() MessageResolver
	Query() QueryResolver
	Service() ServiceResolver
	User() UserResolver
}

type ServiceResolver

type ServiceResolver interface {
	Expected(ctx context.Context, obj *types.Service) (string, error)

	PostData(ctx context.Context, obj *types.Service) (string, error)

	AllowNotifications(ctx context.Context, obj *types.Service) (bool, error)
	Public(ctx context.Context, obj *types.Service) (bool, error)
	Group(ctx context.Context, obj *types.Service) (*types.Group, error)
	Headers(ctx context.Context, obj *types.Service) (string, error)
	Permalink(ctx context.Context, obj *types.Service) (string, error)

	Online24Hours(ctx context.Context, obj *types.Service) (float64, error)

	Failures(ctx context.Context, obj *types.Service) ([]*types.Failure, error)
}

type UserResolver

type UserResolver interface {
	Admin(ctx context.Context, obj *types.User) (bool, error)
}

Jump to

Keyboard shortcuts

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