Documentation ¶
Index ¶
- Variables
- func DefaultHttpClient() *http.Client
- type Argument
- type BasePlanner
- type ContextVariableArgument
- type CorePlanner
- type DataSource
- type GraphQLDataSource
- type GraphQLDataSourceConfig
- type GraphQLDataSourcePlanner
- func (g *GraphQLDataSourcePlanner) EnterArgument(ref int)
- func (g *GraphQLDataSourcePlanner) EnterDocument(operation, definition *ast.Document)
- func (g *GraphQLDataSourcePlanner) EnterField(ref int)
- func (g *GraphQLDataSourcePlanner) EnterInlineFragment(ref int)
- func (g *GraphQLDataSourcePlanner) EnterSelectionSet(ref int)
- func (g *GraphQLDataSourcePlanner) LeaveField(ref int)
- func (g *GraphQLDataSourcePlanner) LeaveInlineFragment(ref int)
- func (g *GraphQLDataSourcePlanner) LeaveSelectionSet(ref int)
- func (g *GraphQLDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
- type GraphQLDataSourcePlannerFactory
- type GraphQLDataSourcePlannerFactoryFactory
- type GraphqlRequest
- type HookContext
- type Hooks
- type HttpJsonDataSource
- type HttpJsonDataSourceConfig
- type HttpJsonDataSourceConfigHeader
- type HttpJsonDataSourcePlanner
- func (h *HttpJsonDataSourcePlanner) EnterArgument(ref int)
- func (h *HttpJsonDataSourcePlanner) EnterDocument(operation, definition *ast.Document)
- func (h *HttpJsonDataSourcePlanner) EnterField(ref int)
- func (h *HttpJsonDataSourcePlanner) EnterInlineFragment(ref int)
- func (h *HttpJsonDataSourcePlanner) EnterSelectionSet(ref int)
- func (h *HttpJsonDataSourcePlanner) LeaveField(ref int)
- func (h *HttpJsonDataSourcePlanner) LeaveInlineFragment(ref int)
- func (h *HttpJsonDataSourcePlanner) LeaveSelectionSet(ref int)
- func (h *HttpJsonDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
- type HttpJsonDataSourcePlannerFactory
- type HttpJsonDataSourcePlannerFactoryFactory
- type HttpPollingStreamDataSource
- type HttpPollingStreamDataSourceConfiguration
- type HttpPollingStreamDataSourcePlanner
- func (h *HttpPollingStreamDataSourcePlanner) EnterArgument(ref int)
- func (h *HttpPollingStreamDataSourcePlanner) EnterDocument(operation, definition *ast.Document)
- func (h *HttpPollingStreamDataSourcePlanner) EnterField(ref int)
- func (h *HttpPollingStreamDataSourcePlanner) EnterInlineFragment(ref int)
- func (h *HttpPollingStreamDataSourcePlanner) EnterSelectionSet(ref int)
- func (h *HttpPollingStreamDataSourcePlanner) LeaveField(ref int)
- func (h *HttpPollingStreamDataSourcePlanner) LeaveInlineFragment(ref int)
- func (h *HttpPollingStreamDataSourcePlanner) LeaveSelectionSet(ref int)
- func (h *HttpPollingStreamDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
- type HttpPollingStreamDataSourcePlannerFactory
- type HttpPollingStreamDataSourcePlannerFactoryFactory
- type ListArgument
- type MQTTDataSource
- type MQTTDataSourceConfig
- type MQTTDataSourcePlanner
- func (n *MQTTDataSourcePlanner) EnterArgument(ref int)
- func (n *MQTTDataSourcePlanner) EnterDocument(operation, definition *ast.Document)
- func (n *MQTTDataSourcePlanner) EnterField(ref int)
- func (n *MQTTDataSourcePlanner) EnterInlineFragment(ref int)
- func (n *MQTTDataSourcePlanner) EnterSelectionSet(ref int)
- func (n *MQTTDataSourcePlanner) LeaveField(ref int)
- func (n *MQTTDataSourcePlanner) LeaveInlineFragment(ref int)
- func (n *MQTTDataSourcePlanner) LeaveSelectionSet(ref int)
- func (n *MQTTDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
- type MQTTDataSourcePlannerFactory
- type MQTTDataSourcePlannerFactoryFactory
- type MappingConfiguration
- type NatsDataSource
- type NatsDataSourceConfig
- type NatsDataSourcePlanner
- type NatsDataSourcePlannerFactory
- type NatsDataSourcePlannerFactoryFactory
- type ObjectVariableArgument
- type PathSelector
- type PipelineDataSource
- type PipelineDataSourceConfig
- type PipelineDataSourcePlanner
- func (h *PipelineDataSourcePlanner) EnterArgument(ref int)
- func (h *PipelineDataSourcePlanner) EnterDocument(operation, definition *ast.Document)
- func (h *PipelineDataSourcePlanner) EnterField(ref int)
- func (h *PipelineDataSourcePlanner) EnterInlineFragment(ref int)
- func (h *PipelineDataSourcePlanner) EnterSelectionSet(ref int)
- func (h *PipelineDataSourcePlanner) LeaveField(ref int)
- func (h *PipelineDataSourcePlanner) LeaveInlineFragment(ref int)
- func (h *PipelineDataSourcePlanner) LeaveSelectionSet(ref int)
- func (h *PipelineDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
- type PipelineDataSourcePlannerFactory
- type PipelineDataSourcePlannerFactoryFactory
- type Planner
- type PlannerConfiguration
- type PlannerFactory
- type PlannerFactoryFactory
- type PlannerVisitors
- type PostReceiveHttpHook
- type PreSendHttpHook
- type ResolverArgs
- type SchemaDataSource
- type SchemaDataSourcePlanner
- type SchemaDataSourcePlannerConfig
- type SchemaDataSourcePlannerFactory
- type SchemaDataSourcePlannerFactoryFactory
- type SourceConfig
- type StaticDataSource
- type StaticDataSourceConfig
- type StaticDataSourcePlanner
- type StaticDataSourcePlannerFactory
- type StaticDataSourcePlannerFactoryFactory
- type StaticVariableArgument
- type StatusCodeTypeNameMapping
- type TypeDataSource
- type TypeDataSourcePlanner
- type TypeDataSourcePlannerConfig
- type TypeDataSourcePlannerFactory
- type TypeDataSourcePlannerFactoryFactory
- type TypeFieldConfiguration
Constants ¶
This section is empty.
Variables ¶
View Source
var RootFieldName = []byte("root_field_name")
View Source
var RootTypeName = []byte("root_type_name")
Functions ¶
func DefaultHttpClient ¶
Types ¶
type BasePlanner ¶
type BasePlanner struct { Log abstractlogger.Logger Walker *astvisitor.Walker // nolint Definition, Operation *ast.Document // nolint Args []Argument // nolint RootField rootField // nolint Config PlannerConfiguration // nolint }
func NewBaseDataSourcePlanner ¶
func NewBaseDataSourcePlanner(schema []byte, config PlannerConfiguration, logger abstractlogger.Logger) (*BasePlanner, error)
func (*BasePlanner) Configure ¶
func (b *BasePlanner) Configure(operation, definition *ast.Document, walker *astvisitor.Walker)
func (*BasePlanner) RegisterDataSourcePlannerFactory ¶
func (b *BasePlanner) RegisterDataSourcePlannerFactory(dataSourceName string, factory PlannerFactoryFactory) (err error)
type ContextVariableArgument ¶
func (*ContextVariableArgument) ArgName ¶
func (c *ContextVariableArgument) ArgName() []byte
type CorePlanner ¶
type CorePlanner interface { // Plan plan returns the pre configured DataSource as well as the Arguments // During runtime the arguments get resolved and passed to the DataSource Plan(args []Argument) (DataSource, []Argument) // Configure is the function to initialize all important values for the Planner to function correctly // You probably need access to the Walker, Operation and ObjectDefinition to use the Planner to its full power // Walker gives you useful information from within all visitor Callbacks, e.g. the Path & Ancestors // Operation is the AST of the GraphQL Operation // ObjectDefinition is the AST of the GraphQL schema ObjectDefinition // Args are the pre-calculated Arguments from the planner // resolverParameters are the parameters from the @directive params field Configure(operation, definition *ast.Document, walker *astvisitor.Walker) }
type DataSource ¶
type GraphQLDataSource ¶
type GraphQLDataSource struct { Log log.Logger Client *http.Client WhitelistedSchemes []string Hooks Hooks }
func (*GraphQLDataSource) Resolve ¶
func (g *GraphQLDataSource) Resolve(ctx context.Context, args ResolverArgs, out io.Writer) (n int, err error)
type GraphQLDataSourceConfig ¶
type GraphQLDataSourceConfig struct { // URL is the url of the upstream URL string `bson:"url" json:"url"` // Method is the http.Method of the upstream, defaults to POST (optional) Method *string `bson:"method" json:"method"` }
GraphQLDataSourceConfig is the configuration for the GraphQL DataSource
type GraphQLDataSourcePlanner ¶
type GraphQLDataSourcePlanner struct { BasePlanner // contains filtered or unexported fields }
func (*GraphQLDataSourcePlanner) EnterArgument ¶
func (g *GraphQLDataSourcePlanner) EnterArgument(ref int)
func (*GraphQLDataSourcePlanner) EnterDocument ¶
func (g *GraphQLDataSourcePlanner) EnterDocument(operation, definition *ast.Document)
func (*GraphQLDataSourcePlanner) EnterField ¶
func (g *GraphQLDataSourcePlanner) EnterField(ref int)
func (*GraphQLDataSourcePlanner) EnterInlineFragment ¶
func (g *GraphQLDataSourcePlanner) EnterInlineFragment(ref int)
func (*GraphQLDataSourcePlanner) EnterSelectionSet ¶
func (g *GraphQLDataSourcePlanner) EnterSelectionSet(ref int)
func (*GraphQLDataSourcePlanner) LeaveField ¶
func (g *GraphQLDataSourcePlanner) LeaveField(ref int)
func (*GraphQLDataSourcePlanner) LeaveInlineFragment ¶
func (g *GraphQLDataSourcePlanner) LeaveInlineFragment(ref int)
func (*GraphQLDataSourcePlanner) LeaveSelectionSet ¶
func (g *GraphQLDataSourcePlanner) LeaveSelectionSet(ref int)
func (*GraphQLDataSourcePlanner) Plan ¶
func (g *GraphQLDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
type GraphQLDataSourcePlannerFactory ¶
type GraphQLDataSourcePlannerFactory struct {
// contains filtered or unexported fields
}
func (*GraphQLDataSourcePlannerFactory) DataSourcePlanner ¶
func (g *GraphQLDataSourcePlannerFactory) DataSourcePlanner() Planner
type GraphQLDataSourcePlannerFactoryFactory ¶
type GraphQLDataSourcePlannerFactoryFactory struct { Client *http.Client WhitelistedSchemes []string Hooks Hooks }
func (GraphQLDataSourcePlannerFactoryFactory) Initialize ¶
func (g GraphQLDataSourcePlannerFactoryFactory) Initialize(base BasePlanner, configReader io.Reader) (PlannerFactory, error)
type GraphqlRequest ¶
type GraphqlRequest struct { OperationName string `json:"operationName"` Variables json.RawMessage `json:"variables"` Query string `json:"query"` }
type HookContext ¶
type Hooks ¶
type Hooks struct { PreSendHttpHook PreSendHttpHook PostReceiveHttpHook PostReceiveHttpHook }
type HttpJsonDataSource ¶
type HttpJsonDataSource struct { Log log.Logger Client *http.Client WhitelistedSchemes []string Hooks Hooks }
func (*HttpJsonDataSource) Resolve ¶
func (r *HttpJsonDataSource) Resolve(ctx context.Context, args ResolverArgs, out io.Writer) (n int, err error)
type HttpJsonDataSourceConfig ¶
type HttpJsonDataSourceConfig struct { // URL is the url of the upstream URL string `bson:"url" json:"url"` // Method is the http.Method, e.g. GET, POST, UPDATE, DELETE // default is GET Method *string `bson:"method" json:"method"` // Body is the http body to send // default is null/nil (no body) Body *string `bson:"body" json:"body"` // Headers defines the header mappings Headers []HttpJsonDataSourceConfigHeader `bson:"headers" json:"headers"` // DefaultTypeName is the optional variable to define a default type name for the response object // This is useful in case the response might be a Union or Interface type which uses StatusCodeTypeNameMappings DefaultTypeName *string `bson:"default_type_name" json:"default_type_name"` // StatusCodeTypeNameMappings is a slice of mappings from http.StatusCode to GraphQL TypeName // This can be used when the TypeName depends on the http.StatusCode StatusCodeTypeNameMappings []StatusCodeTypeNameMapping `bson:"status_code_type_name_mappings" json:"status_code_type_name_mappings"` }
HttpJsonDataSourceConfig is the configuration object for the HttpJsonDataSource
type HttpJsonDataSourcePlanner ¶
type HttpJsonDataSourcePlanner struct { BasePlanner // contains filtered or unexported fields }
func (*HttpJsonDataSourcePlanner) EnterArgument ¶
func (h *HttpJsonDataSourcePlanner) EnterArgument(ref int)
func (*HttpJsonDataSourcePlanner) EnterDocument ¶
func (h *HttpJsonDataSourcePlanner) EnterDocument(operation, definition *ast.Document)
func (*HttpJsonDataSourcePlanner) EnterField ¶
func (h *HttpJsonDataSourcePlanner) EnterField(ref int)
func (*HttpJsonDataSourcePlanner) EnterInlineFragment ¶
func (h *HttpJsonDataSourcePlanner) EnterInlineFragment(ref int)
func (*HttpJsonDataSourcePlanner) EnterSelectionSet ¶
func (h *HttpJsonDataSourcePlanner) EnterSelectionSet(ref int)
func (*HttpJsonDataSourcePlanner) LeaveField ¶
func (h *HttpJsonDataSourcePlanner) LeaveField(ref int)
func (*HttpJsonDataSourcePlanner) LeaveInlineFragment ¶
func (h *HttpJsonDataSourcePlanner) LeaveInlineFragment(ref int)
func (*HttpJsonDataSourcePlanner) LeaveSelectionSet ¶
func (h *HttpJsonDataSourcePlanner) LeaveSelectionSet(ref int)
func (*HttpJsonDataSourcePlanner) Plan ¶
func (h *HttpJsonDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
type HttpJsonDataSourcePlannerFactory ¶
type HttpJsonDataSourcePlannerFactory struct {
// contains filtered or unexported fields
}
func (*HttpJsonDataSourcePlannerFactory) DataSourcePlanner ¶
func (h *HttpJsonDataSourcePlannerFactory) DataSourcePlanner() Planner
type HttpJsonDataSourcePlannerFactoryFactory ¶
type HttpJsonDataSourcePlannerFactoryFactory struct { Client *http.Client WhitelistedSchemes []string Hooks Hooks }
func (*HttpJsonDataSourcePlannerFactoryFactory) Initialize ¶
func (h *HttpJsonDataSourcePlannerFactoryFactory) Initialize(base BasePlanner, configReader io.Reader) (PlannerFactory, error)
type HttpPollingStreamDataSource ¶
type HttpPollingStreamDataSource struct { Log log.Logger Delay time.Duration // contains filtered or unexported fields }
func (*HttpPollingStreamDataSource) Resolve ¶
func (h *HttpPollingStreamDataSource) Resolve(ctx context.Context, args ResolverArgs, out io.Writer) (n int, err error)
type HttpPollingStreamDataSourcePlanner ¶
type HttpPollingStreamDataSourcePlanner struct { BasePlanner // contains filtered or unexported fields }
func (*HttpPollingStreamDataSourcePlanner) EnterArgument ¶
func (h *HttpPollingStreamDataSourcePlanner) EnterArgument(ref int)
func (*HttpPollingStreamDataSourcePlanner) EnterDocument ¶
func (h *HttpPollingStreamDataSourcePlanner) EnterDocument(operation, definition *ast.Document)
func (*HttpPollingStreamDataSourcePlanner) EnterField ¶
func (h *HttpPollingStreamDataSourcePlanner) EnterField(ref int)
func (*HttpPollingStreamDataSourcePlanner) EnterInlineFragment ¶
func (h *HttpPollingStreamDataSourcePlanner) EnterInlineFragment(ref int)
func (*HttpPollingStreamDataSourcePlanner) EnterSelectionSet ¶
func (h *HttpPollingStreamDataSourcePlanner) EnterSelectionSet(ref int)
func (*HttpPollingStreamDataSourcePlanner) LeaveField ¶
func (h *HttpPollingStreamDataSourcePlanner) LeaveField(ref int)
func (*HttpPollingStreamDataSourcePlanner) LeaveInlineFragment ¶
func (h *HttpPollingStreamDataSourcePlanner) LeaveInlineFragment(ref int)
func (*HttpPollingStreamDataSourcePlanner) LeaveSelectionSet ¶
func (h *HttpPollingStreamDataSourcePlanner) LeaveSelectionSet(ref int)
func (*HttpPollingStreamDataSourcePlanner) Plan ¶
func (h *HttpPollingStreamDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
type HttpPollingStreamDataSourcePlannerFactory ¶
type HttpPollingStreamDataSourcePlannerFactory struct {
// contains filtered or unexported fields
}
func (HttpPollingStreamDataSourcePlannerFactory) DataSourcePlanner ¶
func (h HttpPollingStreamDataSourcePlannerFactory) DataSourcePlanner() Planner
type HttpPollingStreamDataSourcePlannerFactoryFactory ¶
type HttpPollingStreamDataSourcePlannerFactoryFactory struct { }
func (HttpPollingStreamDataSourcePlannerFactoryFactory) Initialize ¶
func (h HttpPollingStreamDataSourcePlannerFactoryFactory) Initialize(base BasePlanner, configReader io.Reader) (PlannerFactory, error)
type ListArgument ¶
func (ListArgument) ArgName ¶
func (l ListArgument) ArgName() []byte
type MQTTDataSource ¶
type MQTTDataSource struct {
// contains filtered or unexported fields
}
func (*MQTTDataSource) Resolve ¶
func (m *MQTTDataSource) Resolve(ctx context.Context, args ResolverArgs, out io.Writer) (n int, err error)
type MQTTDataSourceConfig ¶
type MQTTDataSourcePlanner ¶
type MQTTDataSourcePlanner struct { BasePlanner // contains filtered or unexported fields }
func (*MQTTDataSourcePlanner) EnterArgument ¶
func (n *MQTTDataSourcePlanner) EnterArgument(ref int)
func (*MQTTDataSourcePlanner) EnterDocument ¶
func (n *MQTTDataSourcePlanner) EnterDocument(operation, definition *ast.Document)
func (*MQTTDataSourcePlanner) EnterField ¶
func (n *MQTTDataSourcePlanner) EnterField(ref int)
func (*MQTTDataSourcePlanner) EnterInlineFragment ¶
func (n *MQTTDataSourcePlanner) EnterInlineFragment(ref int)
func (*MQTTDataSourcePlanner) EnterSelectionSet ¶
func (n *MQTTDataSourcePlanner) EnterSelectionSet(ref int)
func (*MQTTDataSourcePlanner) LeaveField ¶
func (n *MQTTDataSourcePlanner) LeaveField(ref int)
func (*MQTTDataSourcePlanner) LeaveInlineFragment ¶
func (n *MQTTDataSourcePlanner) LeaveInlineFragment(ref int)
func (*MQTTDataSourcePlanner) LeaveSelectionSet ¶
func (n *MQTTDataSourcePlanner) LeaveSelectionSet(ref int)
func (*MQTTDataSourcePlanner) Plan ¶
func (n *MQTTDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
type MQTTDataSourcePlannerFactory ¶
type MQTTDataSourcePlannerFactory struct {
// contains filtered or unexported fields
}
func (MQTTDataSourcePlannerFactory) DataSourcePlanner ¶
func (m MQTTDataSourcePlannerFactory) DataSourcePlanner() Planner
type MQTTDataSourcePlannerFactoryFactory ¶
type MQTTDataSourcePlannerFactoryFactory struct { }
func (MQTTDataSourcePlannerFactoryFactory) Initialize ¶
func (M MQTTDataSourcePlannerFactoryFactory) Initialize(base BasePlanner, configReader io.Reader) (PlannerFactory, error)
type MappingConfiguration ¶
type NatsDataSource ¶
type NatsDataSource struct {
// contains filtered or unexported fields
}
func (*NatsDataSource) Resolve ¶
func (d *NatsDataSource) Resolve(ctx context.Context, args ResolverArgs, out io.Writer) (n int, err error)
type NatsDataSourceConfig ¶
type NatsDataSourcePlanner ¶
type NatsDataSourcePlanner struct { BasePlanner // contains filtered or unexported fields }
func (*NatsDataSourcePlanner) Plan ¶
func (n *NatsDataSourcePlanner) Plan([]Argument) (DataSource, []Argument)
type NatsDataSourcePlannerFactory ¶
type NatsDataSourcePlannerFactory struct {
// contains filtered or unexported fields
}
func (NatsDataSourcePlannerFactory) DataSourcePlanner ¶
func (n NatsDataSourcePlannerFactory) DataSourcePlanner() Planner
type NatsDataSourcePlannerFactoryFactory ¶
type NatsDataSourcePlannerFactoryFactory struct { }
func (NatsDataSourcePlannerFactoryFactory) Initialize ¶
func (n NatsDataSourcePlannerFactoryFactory) Initialize(base BasePlanner, configReader io.Reader) (PlannerFactory, error)
type ObjectVariableArgument ¶
type ObjectVariableArgument struct { Name []byte PathSelector PathSelector }
func (*ObjectVariableArgument) ArgName ¶
func (o *ObjectVariableArgument) ArgName() []byte
type PathSelector ¶
type PathSelector struct {
Path string
}
type PipelineDataSource ¶
func (*PipelineDataSource) Resolve ¶
func (r *PipelineDataSource) Resolve(ctx context.Context, args ResolverArgs, out io.Writer) (n int, err error)
type PipelineDataSourceConfig ¶
type PipelineDataSourceConfig struct { /* ConfigFilePath is the path where the Pipeline configuration file can be found it needs to be in the json format according to the Pipeline json schema see this url for more info: https://github.com/jensneuse/pipeline */ ConfigFilePath *string /* ConfigString is a string to configure the Pipeline it needs to be in the json format according to the Pipeline json schema see this url for more info: https://github.com/jensneuse/pipeline The PipelinDataSourcePlanner will always choose the configString over the configFilePath in case both are defined. */ ConfigString *string // InputJSON is the template to define a JSON object based on the request, parameters etc. which gets passed to the first Pipeline step InputJSON string }
type PipelineDataSourcePlanner ¶
type PipelineDataSourcePlanner struct { BasePlanner // contains filtered or unexported fields }
func (*PipelineDataSourcePlanner) EnterArgument ¶
func (h *PipelineDataSourcePlanner) EnterArgument(ref int)
func (*PipelineDataSourcePlanner) EnterDocument ¶
func (h *PipelineDataSourcePlanner) EnterDocument(operation, definition *ast.Document)
func (*PipelineDataSourcePlanner) EnterField ¶
func (h *PipelineDataSourcePlanner) EnterField(ref int)
func (*PipelineDataSourcePlanner) EnterInlineFragment ¶
func (h *PipelineDataSourcePlanner) EnterInlineFragment(ref int)
func (*PipelineDataSourcePlanner) EnterSelectionSet ¶
func (h *PipelineDataSourcePlanner) EnterSelectionSet(ref int)
func (*PipelineDataSourcePlanner) LeaveField ¶
func (h *PipelineDataSourcePlanner) LeaveField(ref int)
func (*PipelineDataSourcePlanner) LeaveInlineFragment ¶
func (h *PipelineDataSourcePlanner) LeaveInlineFragment(ref int)
func (*PipelineDataSourcePlanner) LeaveSelectionSet ¶
func (h *PipelineDataSourcePlanner) LeaveSelectionSet(ref int)
func (*PipelineDataSourcePlanner) Plan ¶
func (h *PipelineDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
type PipelineDataSourcePlannerFactory ¶
type PipelineDataSourcePlannerFactory struct {
// contains filtered or unexported fields
}
func (PipelineDataSourcePlannerFactory) DataSourcePlanner ¶
func (p PipelineDataSourcePlannerFactory) DataSourcePlanner() Planner
type PipelineDataSourcePlannerFactoryFactory ¶
type PipelineDataSourcePlannerFactoryFactory struct { }
func (PipelineDataSourcePlannerFactoryFactory) Initialize ¶
func (p PipelineDataSourcePlannerFactoryFactory) Initialize(base BasePlanner, configReader io.Reader) (PlannerFactory, error)
type Planner ¶
type Planner interface { CorePlanner PlannerVisitors }
func SimpleDataSourcePlanner ¶
func SimpleDataSourcePlanner(core CorePlanner) Planner
type PlannerConfiguration ¶
type PlannerConfiguration struct {
TypeFieldConfigurations []TypeFieldConfiguration
}
func (*PlannerConfiguration) DataSourcePlannerFactoryForTypeField ¶
func (p *PlannerConfiguration) DataSourcePlannerFactoryForTypeField(typeName, fieldName string) PlannerFactory
func (*PlannerConfiguration) MappingForTypeField ¶
func (p *PlannerConfiguration) MappingForTypeField(typeName, fieldName string) *MappingConfiguration
type PlannerFactory ¶
type PlannerFactory interface {
DataSourcePlanner() Planner
}
type PlannerFactoryFactory ¶
type PlannerFactoryFactory interface {
Initialize(base BasePlanner, configReader io.Reader) (PlannerFactory, error)
}
type PlannerVisitors ¶
type PlannerVisitors interface { astvisitor.EnterDocumentVisitor astvisitor.EnterInlineFragmentVisitor astvisitor.LeaveInlineFragmentVisitor astvisitor.EnterSelectionSetVisitor astvisitor.LeaveSelectionSetVisitor astvisitor.EnterFieldVisitor astvisitor.EnterArgumentVisitor astvisitor.LeaveFieldVisitor }
type PostReceiveHttpHook ¶
type PostReceiveHttpHook interface {
Execute(ctx HookContext, resp *http.Response, body []byte)
}
type PreSendHttpHook ¶
type PreSendHttpHook interface {
Execute(ctx HookContext, req *http.Request)
}
type ResolverArgs ¶
type SchemaDataSource ¶
type SchemaDataSource struct {
SchemaBytes []byte
}
func (*SchemaDataSource) Resolve ¶
func (s *SchemaDataSource) Resolve(ctx context.Context, args ResolverArgs, out io.Writer) (n int, err error)
type SchemaDataSourcePlanner ¶
type SchemaDataSourcePlanner struct { BasePlanner // contains filtered or unexported fields }
func (*SchemaDataSourcePlanner) Plan ¶
func (s *SchemaDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
type SchemaDataSourcePlannerConfig ¶
type SchemaDataSourcePlannerConfig struct { }
type SchemaDataSourcePlannerFactory ¶
type SchemaDataSourcePlannerFactory struct {
// contains filtered or unexported fields
}
func (SchemaDataSourcePlannerFactory) DataSourcePlanner ¶
func (s SchemaDataSourcePlannerFactory) DataSourcePlanner() Planner
type SchemaDataSourcePlannerFactoryFactory ¶
type SchemaDataSourcePlannerFactoryFactory struct { }
func (SchemaDataSourcePlannerFactoryFactory) Initialize ¶
func (s SchemaDataSourcePlannerFactoryFactory) Initialize(base BasePlanner, configReader io.Reader) (PlannerFactory, error)
type SourceConfig ¶
type SourceConfig struct { // Kind defines the unique identifier of the DataSource // Kind needs to match to the Planner "DataSourceName" name Name string `bson:"kind" json:"kind"` // Config is the DataSource specific configuration object // Each Planner needs to make sure to parse their Config Object correctly Config json.RawMessage `bson:"data_source_config" json:"data_source_config"` }
type StaticDataSource ¶
type StaticDataSource struct {
Data []byte
}
func (StaticDataSource) Resolve ¶
func (s StaticDataSource) Resolve(ctx context.Context, args ResolverArgs, out io.Writer) (n int, err error)
type StaticDataSourceConfig ¶
type StaticDataSourceConfig struct {
Data string
}
type StaticDataSourcePlanner ¶
type StaticDataSourcePlanner struct { BasePlanner // contains filtered or unexported fields }
func (*StaticDataSourcePlanner) Plan ¶
func (s *StaticDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
type StaticDataSourcePlannerFactory ¶
type StaticDataSourcePlannerFactory struct {
// contains filtered or unexported fields
}
func (StaticDataSourcePlannerFactory) DataSourcePlanner ¶
func (s StaticDataSourcePlannerFactory) DataSourcePlanner() Planner
type StaticDataSourcePlannerFactoryFactory ¶
type StaticDataSourcePlannerFactoryFactory struct { }
func (StaticDataSourcePlannerFactoryFactory) Initialize ¶
func (s StaticDataSourcePlannerFactoryFactory) Initialize(base BasePlanner, configReader io.Reader) (PlannerFactory, error)
type StaticVariableArgument ¶
func (*StaticVariableArgument) ArgName ¶
func (s *StaticVariableArgument) ArgName() []byte
type TypeDataSource ¶
type TypeDataSource struct { }
func (*TypeDataSource) Resolve ¶
func (t *TypeDataSource) Resolve(ctx context.Context, args ResolverArgs, out io.Writer) (n int, err error)
type TypeDataSourcePlanner ¶
type TypeDataSourcePlanner struct { BasePlanner // contains filtered or unexported fields }
func (*TypeDataSourcePlanner) Plan ¶
func (t *TypeDataSourcePlanner) Plan(args []Argument) (DataSource, []Argument)
type TypeDataSourcePlannerConfig ¶
type TypeDataSourcePlannerConfig struct { }
type TypeDataSourcePlannerFactory ¶
type TypeDataSourcePlannerFactory struct {
// contains filtered or unexported fields
}
func (TypeDataSourcePlannerFactory) DataSourcePlanner ¶
func (t TypeDataSourcePlannerFactory) DataSourcePlanner() Planner
type TypeDataSourcePlannerFactoryFactory ¶
type TypeDataSourcePlannerFactoryFactory struct { }
func (TypeDataSourcePlannerFactoryFactory) Initialize ¶
func (t TypeDataSourcePlannerFactoryFactory) Initialize(base BasePlanner, configReader io.Reader) (PlannerFactory, error)
type TypeFieldConfiguration ¶
type TypeFieldConfiguration struct { TypeName string `bson:"type_name" json:"type_name"` FieldName string `bson:"field_name" json:"field_name"` Mapping *MappingConfiguration `bson:"mapping" json:"mapping"` DataSource SourceConfig `bson:"data_source" json:"data_source"` DataSourcePlannerFactory PlannerFactory `bson:"-" json:"-"` }
Click to show internal directories.
Click to hide internal directories.