Versions in this module Expand all Collapse all v1 v1.41.0 Jun 27, 2022 Changes in this version + type ArgsResolver interface + ResolveArgs func(args []datasource.Argument, data []byte) ResolvedArgs + type BooleanCondition interface + Evaluate func(ctx Context, data []byte) bool + type Context struct + ExtraArguments []datasource.Argument + Variables Variables + type DataResolvingConfig struct + PathSelector datasource.PathSelector + Transformation Transformation + type DataSourceDefinition struct + DataSourcePlannerFactory func() datasource.Planner + FieldName []byte + TypeName []byte + type DataSourceInvocation struct + Args []datasource.Argument + DataSource datasource.DataSource + type ErrJSONValueTypeValueIncompatible struct + func (e ErrJSONValueTypeValueIncompatible) Error() string + type Executor struct + func NewExecutor(templateDirectives []byte_template.DirectiveDefinition) *Executor + func (e *Executor) Execute(ctx Context, node RootNode, w io.Writer) error + func (e *Executor) ResolveArgs(args []datasource.Argument, data []byte) ResolvedArgs + type Fetch interface + Fetch func(ctx Context, data []byte, argsResolver ArgsResolver, suffix string, ...) (n int, err error) + type Field struct + HasResolvedData bool + Name []byte + Skip BooleanCondition + Value Node + func (*Field) Kind() NodeKind + func (f *Field) HasResolversRecursively() bool + type GraphQLDataSourceConfig struct + Host string + Method HTTP_METHOD + Params *[]*Parameter + Url string + func (g *GraphQLDataSourceConfig) Unmarshal(doc *ast.Document, ref int) + type GraphqlRequest struct + OperationName string + Query string + Variables json.RawMessage + type HTTP_METHOD int + const HTTP_METHOD_DELETE + const HTTP_METHOD_GET + const HTTP_METHOD_POST + const HTTP_METHOD_UPDATE + const UNDEFINED_HTTP_METHOD + func (h *HTTP_METHOD) Unmarshal(doc *ast.Document, ref int) + type Handler struct + func NewHandler(base *datasource.BasePlanner, ...) *Handler + func (h *Handler) Handle(requestData, extraVariables []byte) (executor *Executor, node RootNode, ctx Context, err error) + type Header struct + Key string + Value string + func (h *Header) Unmarshal(doc *ast.Document, ref int) + type HttpJsonDataSourceConfig struct + Body *string + DefaultTypeName *string + Headers *[]*Header + Host string + Method HTTP_METHOD + Params *[]*Parameter + StatusCodeTypeNameMappings *[]*StatusCodeTypeNameMapping + Url string + func (h *HttpJsonDataSourceConfig) Unmarshal(doc *ast.Document, ref int) + type HttpPollingStreamDataSourceConfig struct + DelaySeconds int64 + Host string + Method HTTP_METHOD + Params *[]*Parameter + Url string + func (h *HttpPollingStreamDataSourceConfig) Unmarshal(doc *ast.Document, ref int) + type IfEqual struct + Left datasource.Argument + Right datasource.Argument + func (i *IfEqual) Evaluate(ctx Context, data []byte) bool + type IfNotEqual struct + Left datasource.Argument + Right datasource.Argument + func (i *IfNotEqual) Evaluate(ctx Context, data []byte) bool + type JSONValueType int + const BooleanValueType + const FloatValueType + const IntegerValueType + const StringValueType + const UnknownValueType + func (i JSONValueType) String() string + type List struct + DataResolvingConfig DataResolvingConfig + Filter ListFilter + Value Node + func (*List) Kind() NodeKind + func (l *List) HasResolversRecursively() bool + type ListFilter interface + Kind func() ListFilterKind + type ListFilterFirstN struct + FirstN int + func (_ ListFilterFirstN) Kind() ListFilterKind + type ListFilterKind int + const ListFilterKindFirstN + type LockableBufferMap struct + Buffers map[uint64]*bytes.Buffer + type MAPPING_MODE int + const MAPPING_MODE_NONE + const MAPPING_MODE_PATH_SELECTOR + const UNDEFINED_MAPPING_MODE + func (m *MAPPING_MODE) Unmarshal(doc *ast.Document, ref int) + type MQTTDataSourceConfig struct + BrokerAddr string + ClientID string + Topic string + func (m *MQTTDataSourceConfig) Unmarshal(doc *ast.Document, ref int) + type MappingConfig struct + Mode MAPPING_MODE + PathSelector *string + func (m *MappingConfig) Unmarshal(doc *ast.Document, ref int) + type NatsDataSourceConfig struct + Addr string + Topic string + func (n *NatsDataSourceConfig) Unmarshal(doc *ast.Document, ref int) + type Node interface + HasResolversRecursively func() bool + Kind func() NodeKind + type NodeKind int + const FieldKind + const ListKind + const ObjectKind + const ValueKind + type Object struct + DataResolvingConfig DataResolvingConfig + Fetch Fetch + Fields []Field + func (*Object) Kind() NodeKind + func (o *Object) HasResolversRecursively() bool + func (o *Object) OperationType() ast.OperationType + type PARAMETER_SOURCE int + const PARAMETER_SOURCE_CONTEXT_VARIABLE + const PARAMETER_SOURCE_FIELD_ARGUMENTS + const PARAMETER_SOURCE_OBJECT_VARIABLE_ARGUMENT + const UNDEFINED_PARAMETER_SOURCE + func (p *PARAMETER_SOURCE) Unmarshal(doc *ast.Document, ref int) + type ParallelFetch struct + Fetches []Fetch + func (p *ParallelFetch) Fetch(ctx Context, data []byte, argsResolver ArgsResolver, suffix string, ...) (n int, err error) + type Parameter struct + Name string + SourceKind PARAMETER_SOURCE + SourceName string + VariableType string + func (p *Parameter) Unmarshal(doc *ast.Document, ref int) + type PipelineDataSourceConfig struct + ConfigFilePath *string + ConfigString *string + InputJSON string + func (p *PipelineDataSourceConfig) Unmarshal(doc *ast.Document, ref int) + type PipelineTransformation struct + func (p *PipelineTransformation) Transform(input []byte) ([]byte, error) + type Planner struct + func NewPlanner(base *datasource.BasePlanner) *Planner + func (p *Planner) Plan(operation, definition *ast.Document, operationName string, ...) RootNode + type ResolvedArgs []ResolvedArgument + func (r *ResolvedArgs) Filter(condition func(i int) (keep bool)) + func (r ResolvedArgs) ByKey(key []byte) []byte + func (r ResolvedArgs) Dump() []string + func (r ResolvedArgs) Keys() [][]byte + type ResolvedArgument struct + Key []byte + Value []byte + type RootNode interface + OperationType func() ast.OperationType + type SerialFetch struct + Fetches []Fetch + func (s *SerialFetch) Fetch(ctx Context, data []byte, argsResolver ArgsResolver, suffix string, ...) (n int, err error) + type SingleFetch struct + BufferName string + Source *DataSourceInvocation + func (s *SingleFetch) Fetch(ctx Context, data []byte, argsResolver ArgsResolver, path string, ...) (int, error) + type StaticDataSourceConfig struct + Data *string + func (s *StaticDataSourceConfig) Unmarshal(doc *ast.Document, ref int) + type StatusCodeTypeNameMapping struct + StatusCode int64 + TypeName string + func (s *StatusCodeTypeNameMapping) Unmarshal(doc *ast.Document, ref int) + type TRANSFORMATION_MODE int + const TRANSFORMATION_MODE_PIPELINE + const UNDEFINED_TRANSFORMATION_MODE + func (t *TRANSFORMATION_MODE) Unmarshal(doc *ast.Document, ref int) + type Transformation interface + Transform func(input []byte) ([]byte, error) + type TransformationConfig struct + Mode TRANSFORMATION_MODE + PipelineConfigFile *string + PipelineConfigString *string + func (t *TransformationConfig) Unmarshal(doc *ast.Document, ref int) + type Value struct + DataResolvingConfig DataResolvingConfig + ValueType JSONValueType + func (*Value) Kind() NodeKind + func (value *Value) HasResolversRecursively() bool + type Variables map[uint64][]byte + func VariablesFromJson(requestVariables, extraVariables []byte) (variables Variables, extraArguments []datasource.Argument) + type WasmDataSourceConfig struct + Input string + WasmFile string + func (w *WasmDataSourceConfig) Unmarshal(doc *ast.Document, ref int)