graphql

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPageSize               = 100
	DefaultConsistencyLevel       = gocql.LocalQuorum
	DefaultSerialConsistencyLevel = gocql.Serial
)

Variables

This section is empty.

Functions

func GetPlaygroundHandle

func GetPlaygroundHandle(defaultEndpointUrl string) httprouter.Handle

Types

type Config

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

type KeyspaceGraphQLSchema

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

func (*KeyspaceGraphQLSchema) BuildTypes

func (s *KeyspaceGraphQLSchema) BuildTypes(keyspace *gocql.KeyspaceMetadata) error

type RequestBody

type RequestBody struct {
	Query string `json:"query"`
}

type Route

type Route struct {
	Method  string
	Pattern string
	Handler http.Handler
}

type RouteGenerator

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

func NewRouteGenerator

func NewRouteGenerator(dbClient *db.Db, cfg config.Config) *RouteGenerator

func (*RouteGenerator) Keyspaces

func (rg *RouteGenerator) Keyspaces() ([]string, error)

Keyspaces gets a slice of keyspace names that are considered by the route generator.

func (*RouteGenerator) Routes

func (rg *RouteGenerator) Routes(pattern string, singleKeyspace string) ([]Route, error)

func (*RouteGenerator) RoutesSchemaManagement

func (rg *RouteGenerator) RoutesSchemaManagement(pattern string, singleKeyspace string, ops config.SchemaOperations) ([]Route, error)

type SchemaGenerator

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

func NewSchemaGenerator

func NewSchemaGenerator(dbClient *db.Db, cfg config.Config) *SchemaGenerator

func (*SchemaGenerator) BuildKeyspaceSchema

func (sg *SchemaGenerator) BuildKeyspaceSchema(singleKeyspace string, ops config.SchemaOperations) (graphql.Schema, error)

func (*SchemaGenerator) BuildSchemas

func (sg *SchemaGenerator) BuildSchemas(singleKeyspace string) (map[string]*graphql.Schema, error)

type SchemaUpdater

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

func NewUpdater

func NewUpdater(
	schemaGen *SchemaGenerator,
	singleKeyspace string,
	updateInterval time.Duration,
	logger log.Logger,
) (*SchemaUpdater, error)

func (*SchemaUpdater) Schema

func (su *SchemaUpdater) Schema(keyspace string) *graphql.Schema

func (*SchemaUpdater) Start

func (su *SchemaUpdater) Start()

func (*SchemaUpdater) Stop

func (su *SchemaUpdater) Stop()

Jump to

Keyboard shortcuts

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