statping: github.com/hunterlong/statping/handlers/graphql Index | Files

package graphql

import "github.com/hunterlong/statping/handlers/graphql"

go:generate go run github.com/99designs/gqlgen

Index

Package Files

generated.go resolver.go

func NewExecutableSchema Uses

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

type CheckinResolver Uses

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 Uses

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 Uses

type Config struct {
    Resolvers  ResolverRoot
    Directives DirectiveRoot
    Complexity ComplexityRoot
}

type CoreResolver Uses

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 Uses

type DirectiveRoot struct {
}

type GroupResolver Uses

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

type MessageResolver Uses

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 Uses

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 Uses

type Resolver struct{}

func (*Resolver) Checkin Uses

func (r *Resolver) Checkin() CheckinResolver

func (*Resolver) Core Uses

func (r *Resolver) Core() CoreResolver

func (*Resolver) Group Uses

func (r *Resolver) Group() GroupResolver

func (*Resolver) Message Uses

func (r *Resolver) Message() MessageResolver

func (*Resolver) Query Uses

func (r *Resolver) Query() QueryResolver

func (*Resolver) Service Uses

func (r *Resolver) Service() ServiceResolver

func (*Resolver) User Uses

func (r *Resolver) User() UserResolver

type ResolverRoot Uses

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

type ServiceResolver Uses

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 Uses

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

Package graphql imports 12 packages (graph) and is imported by 2 packages. Updated 2019-06-14. Refresh now. Tools for package owners.