v1alpha1

package
v1.10.32 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_graphql_v1alpha1_graphql_proto protoreflect.FileDescriptor
View Source
var (
	GraphQLSchemaCrd = crd.NewCrd(
		"graphqlschemas",
		GraphQLSchemaGVK.Group,
		GraphQLSchemaGVK.Version,
		GraphQLSchemaGVK.Kind,
		"gqls",
		false,
		&GraphQLSchema{})
)
View Source
var (
	GraphQLSchemaGVK = schema.GroupVersionKind{
		Version: "v1alpha1",
		Group:   "graphql.gloo.solo.io",
		Kind:    "GraphQLSchema",
	}
)

Functions

This section is empty.

Types

type ExecutableSchema

type ExecutableSchema struct {

	// Schema to use in string format.
	SchemaDefinition string `protobuf:"bytes,1,opt,name=schema_definition,json=schemaDefinition,proto3" json:"schema_definition,omitempty"`
	// how to execute the schema
	Executor *Executor `protobuf:"bytes,2,opt,name=executor,proto3" json:"executor,omitempty"`
	// Schema extensions
	GrpcDescriptorRegistry *GrpcDescriptorRegistry `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ExecutableSchema) Clone

func (m *ExecutableSchema) Clone() proto.Message

Clone function

func (*ExecutableSchema) Descriptor deprecated

func (*ExecutableSchema) Descriptor() ([]byte, []int)

Deprecated: Use ExecutableSchema.ProtoReflect.Descriptor instead.

func (*ExecutableSchema) Equal

func (m *ExecutableSchema) Equal(that interface{}) bool

Equal function

func (*ExecutableSchema) GetExecutor

func (x *ExecutableSchema) GetExecutor() *Executor

func (*ExecutableSchema) GetGrpcDescriptorRegistry

func (x *ExecutableSchema) GetGrpcDescriptorRegistry() *GrpcDescriptorRegistry

func (*ExecutableSchema) GetSchemaDefinition

func (x *ExecutableSchema) GetSchemaDefinition() string

func (*ExecutableSchema) Hash

func (m *ExecutableSchema) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*ExecutableSchema) ProtoMessage

func (*ExecutableSchema) ProtoMessage()

func (*ExecutableSchema) ProtoReflect

func (x *ExecutableSchema) ProtoReflect() protoreflect.Message

func (*ExecutableSchema) Reset

func (x *ExecutableSchema) Reset()

func (*ExecutableSchema) String

func (x *ExecutableSchema) String() string

type Executor

type Executor struct {

	// Types that are assignable to Executor:
	//	*Executor_Local_
	Executor isExecutor_Executor `protobuf_oneof:"executor"`
	// contains filtered or unexported fields
}

func (*Executor) Clone

func (m *Executor) Clone() proto.Message

Clone function

func (*Executor) Descriptor deprecated

func (*Executor) Descriptor() ([]byte, []int)

Deprecated: Use Executor.ProtoReflect.Descriptor instead.

func (*Executor) Equal

func (m *Executor) Equal(that interface{}) bool

Equal function

func (*Executor) GetExecutor

func (m *Executor) GetExecutor() isExecutor_Executor

func (*Executor) GetLocal

func (x *Executor) GetLocal() *Executor_Local

func (*Executor) Hash

func (m *Executor) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Executor) ProtoMessage

func (*Executor) ProtoMessage()

func (*Executor) ProtoReflect

func (x *Executor) ProtoReflect() protoreflect.Message

func (*Executor) Reset

func (x *Executor) Reset()

func (*Executor) String

func (x *Executor) String() string

type Executor_Local

type Executor_Local struct {

	// The resolver map to use to resolve the schema.
	Resolutions []*Resolution `protobuf:"bytes,1,rep,name=resolutions,proto3" json:"resolutions,omitempty"`
	// Do we enable introspection for the schema? general recommendation is to
	// disable this for production and hence it defaults to false.
	EnableIntrospection bool `protobuf:"varint,2,opt,name=enable_introspection,json=enableIntrospection,proto3" json:"enable_introspection,omitempty"`
	// contains filtered or unexported fields
}

Execute schema using resolvers.

func (*Executor_Local) Clone

func (m *Executor_Local) Clone() proto.Message

Clone function

func (*Executor_Local) Descriptor deprecated

func (*Executor_Local) Descriptor() ([]byte, []int)

Deprecated: Use Executor_Local.ProtoReflect.Descriptor instead.

func (*Executor_Local) Equal

func (m *Executor_Local) Equal(that interface{}) bool

Equal function

func (*Executor_Local) GetEnableIntrospection

func (x *Executor_Local) GetEnableIntrospection() bool

func (*Executor_Local) GetResolutions

func (x *Executor_Local) GetResolutions() []*Resolution

func (*Executor_Local) Hash

func (m *Executor_Local) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Executor_Local) ProtoMessage

func (*Executor_Local) ProtoMessage()

func (*Executor_Local) ProtoReflect

func (x *Executor_Local) ProtoReflect() protoreflect.Message

func (*Executor_Local) Reset

func (x *Executor_Local) Reset()

func (*Executor_Local) String

func (x *Executor_Local) String() string

type Executor_Local_

type Executor_Local_ struct {
	Local *Executor_Local `protobuf:"bytes,1,opt,name=local,proto3,oneof"`
}

type GraphQLSchema

type GraphQLSchema struct {

	// NamespacedStatuses indicates the validation status of this resource.
	// NamespacedStatuses is read-only by clients, and set by gloo during validation
	NamespacedStatuses *core.NamespacedStatuses `protobuf:"bytes,1,opt,name=namespaced_statuses,json=namespacedStatuses,proto3" json:"namespaced_statuses,omitempty"`
	// Metadata contains the object metadata for this resource
	Metadata         *core.Metadata    `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	ExecutableSchema *ExecutableSchema `protobuf:"bytes,6,opt,name=executable_schema,json=executableSchema,proto3" json:"executable_schema,omitempty"`
	// contains filtered or unexported fields
}

Enterprise-Only: THIS FEATURE IS IN TECH PREVIEW. APIs are versioned as alpha and subject to change. User-facing CR config for resolving client requests to graphql schemas. Routes that have this config will execute graphql queries, and will not make it to the router filter. i.e. this filter will terminate the request for these routes. Note: while users can provide this configuration manually, the eventual UX will be to generate the Executable Schema CRs from other sources and just have users configure the routes to point to these schema CRs.

func NewGraphQLSchema

func NewGraphQLSchema(namespace, name string) *GraphQLSchema

func (*GraphQLSchema) Clone

func (m *GraphQLSchema) Clone() proto.Message

Clone function

func (*GraphQLSchema) DeepCopyInto

func (o *GraphQLSchema) DeepCopyInto(out *GraphQLSchema)

func (*GraphQLSchema) DeepCopyObject

func (o *GraphQLSchema) DeepCopyObject() runtime.Object

func (*GraphQLSchema) Descriptor deprecated

func (*GraphQLSchema) Descriptor() ([]byte, []int)

Deprecated: Use GraphQLSchema.ProtoReflect.Descriptor instead.

func (*GraphQLSchema) Equal

func (m *GraphQLSchema) Equal(that interface{}) bool

Equal function

func (*GraphQLSchema) GetExecutableSchema

func (x *GraphQLSchema) GetExecutableSchema() *ExecutableSchema

func (*GraphQLSchema) GetMetadata

func (x *GraphQLSchema) GetMetadata() *core.Metadata

func (*GraphQLSchema) GetNamespacedStatuses

func (x *GraphQLSchema) GetNamespacedStatuses() *core.NamespacedStatuses

func (*GraphQLSchema) GetObjectKind

func (o *GraphQLSchema) GetObjectKind() schema.ObjectKind

func (*GraphQLSchema) GetStatus

func (r *GraphQLSchema) GetStatus() *core.Status

Deprecated

func (*GraphQLSchema) GroupVersionKind

func (r *GraphQLSchema) GroupVersionKind() schema.GroupVersionKind

func (*GraphQLSchema) Hash

func (m *GraphQLSchema) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*GraphQLSchema) MustHash

func (r *GraphQLSchema) MustHash() uint64

func (*GraphQLSchema) ProtoMessage

func (*GraphQLSchema) ProtoMessage()

func (*GraphQLSchema) ProtoReflect

func (x *GraphQLSchema) ProtoReflect() protoreflect.Message

func (*GraphQLSchema) Reset

func (x *GraphQLSchema) Reset()

func (*GraphQLSchema) SetMetadata

func (r *GraphQLSchema) SetMetadata(meta *core.Metadata)

func (*GraphQLSchema) SetNamespacedStatuses

func (r *GraphQLSchema) SetNamespacedStatuses(namespacedStatuses *core.NamespacedStatuses)

func (*GraphQLSchema) SetStatus

func (r *GraphQLSchema) SetStatus(status *core.Status)

Deprecated

func (*GraphQLSchema) String

func (x *GraphQLSchema) String() string

type GraphQLSchemaClient

type GraphQLSchemaClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*GraphQLSchema, error)
	Write(resource *GraphQLSchema, opts clients.WriteOpts) (*GraphQLSchema, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (GraphQLSchemaList, error)
	GraphQLSchemaWatcher
}

func NewGraphQLSchemaClient

func NewGraphQLSchemaClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (GraphQLSchemaClient, error)

func NewGraphQLSchemaClientWithBase

func NewGraphQLSchemaClientWithBase(rc clients.ResourceClient) GraphQLSchemaClient

func NewGraphQLSchemaClientWithToken

func NewGraphQLSchemaClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (GraphQLSchemaClient, error)

type GraphQLSchemaList

type GraphQLSchemaList []*GraphQLSchema

func (GraphQLSchemaList) AsInputResources

func (list GraphQLSchemaList) AsInputResources() resources.InputResourceList

func (GraphQLSchemaList) AsInterfaces

func (list GraphQLSchemaList) AsInterfaces() []interface{}

func (GraphQLSchemaList) AsResources

func (list GraphQLSchemaList) AsResources() resources.ResourceList

func (GraphQLSchemaList) Clone

func (list GraphQLSchemaList) Clone() GraphQLSchemaList

func (GraphQLSchemaList) Each

func (list GraphQLSchemaList) Each(f func(element *GraphQLSchema))

func (GraphQLSchemaList) EachResource

func (list GraphQLSchemaList) EachResource(f func(element resources.Resource))

func (GraphQLSchemaList) Find

func (list GraphQLSchemaList) Find(namespace, name string) (*GraphQLSchema, error)

func (GraphQLSchemaList) Names

func (list GraphQLSchemaList) Names() []string

func (GraphQLSchemaList) NamespacesDotNames

func (list GraphQLSchemaList) NamespacesDotNames() []string

func (GraphQLSchemaList) Sort

type GraphQLSchemaReconciler

type GraphQLSchemaReconciler interface {
	Reconcile(namespace string, desiredResources GraphQLSchemaList, transition TransitionGraphQLSchemaFunc, opts clients.ListOpts) error
}

func NewGraphQLSchemaReconciler

func NewGraphQLSchemaReconciler(client GraphQLSchemaClient, statusSetter resources.StatusSetter) GraphQLSchemaReconciler

type GraphQLSchemaWatcher

type GraphQLSchemaWatcher interface {
	// watch namespace-scoped GraphqlSchemas
	Watch(namespace string, opts clients.WatchOpts) (<-chan GraphQLSchemaList, <-chan error, error)
}

type GrpcDescriptorRegistry

type GrpcDescriptorRegistry struct {

	// Types that are assignable to DescriptorSet:
	//	*GrpcDescriptorRegistry_ProtoDescriptor
	//	*GrpcDescriptorRegistry_ProtoDescriptorBin
	DescriptorSet isGrpcDescriptorRegistry_DescriptorSet `protobuf_oneof:"descriptor_set"`
	// contains filtered or unexported fields
}

Defines a configuration for serializing and deserializing requests for a gRPC resolver. Is a Schema Extension

func (*GrpcDescriptorRegistry) Clone

Clone function

func (*GrpcDescriptorRegistry) Descriptor deprecated

func (*GrpcDescriptorRegistry) Descriptor() ([]byte, []int)

Deprecated: Use GrpcDescriptorRegistry.ProtoReflect.Descriptor instead.

func (*GrpcDescriptorRegistry) Equal

func (m *GrpcDescriptorRegistry) Equal(that interface{}) bool

Equal function

func (*GrpcDescriptorRegistry) GetDescriptorSet

func (m *GrpcDescriptorRegistry) GetDescriptorSet() isGrpcDescriptorRegistry_DescriptorSet

func (*GrpcDescriptorRegistry) GetProtoDescriptor

func (x *GrpcDescriptorRegistry) GetProtoDescriptor() string

func (*GrpcDescriptorRegistry) GetProtoDescriptorBin

func (x *GrpcDescriptorRegistry) GetProtoDescriptorBin() []byte

func (*GrpcDescriptorRegistry) Hash

func (m *GrpcDescriptorRegistry) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*GrpcDescriptorRegistry) ProtoMessage

func (*GrpcDescriptorRegistry) ProtoMessage()

func (*GrpcDescriptorRegistry) ProtoReflect

func (x *GrpcDescriptorRegistry) ProtoReflect() protoreflect.Message

func (*GrpcDescriptorRegistry) Reset

func (x *GrpcDescriptorRegistry) Reset()

func (*GrpcDescriptorRegistry) String

func (x *GrpcDescriptorRegistry) String() string

type GrpcDescriptorRegistry_ProtoDescriptor

type GrpcDescriptorRegistry_ProtoDescriptor struct {
	// Supplies the filename of
	// :ref:`the proto descriptor set <config_grpc_json_generate_proto_descriptor_set>` for the gRPC
	// services.
	ProtoDescriptor string `protobuf:"bytes,1,opt,name=proto_descriptor,json=protoDescriptor,proto3,oneof"`
}

type GrpcDescriptorRegistry_ProtoDescriptorBin

type GrpcDescriptorRegistry_ProtoDescriptorBin struct {
	// Supplies the binary content of
	// :ref:`the proto descriptor set <config_grpc_json_generate_proto_descriptor_set>` for the gRPC
	// services.
	// Note: in yaml, this must be provided as a base64 standard encoded string; yaml can't handle binary bytes
	ProtoDescriptorBin []byte `protobuf:"bytes,2,opt,name=proto_descriptor_bin,json=protoDescriptorBin,proto3,oneof"`
}

type GrpcRequestTemplate

type GrpcRequestTemplate struct {

	// json representation of outgoing gRPC message to be sent to gRPC service
	OutgoingMessageJson *_struct.Value `protobuf:"bytes,1,opt,name=outgoing_message_json,json=outgoingMessageJson,proto3" json:"outgoing_message_json,omitempty"`
	// request has shape matching service with name registered in registry
	// is the full_name(), e.g. main.Bookstore
	ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	// make request to method with this name on the grpc service defined above
	// is just the name(), e.g. GetBook
	MethodName string `protobuf:"bytes,3,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"`
	// in the future, we may want to make this a map<string, ValueProvider>
	// once we know better what the use cases are
	RequestMetadata map[string]string `` /* 194-byte string literal not displayed */
	// contains filtered or unexported fields
}

Defines a configuration for generating outgoing requests for a resolver.

func (*GrpcRequestTemplate) Clone

func (m *GrpcRequestTemplate) Clone() proto.Message

Clone function

func (*GrpcRequestTemplate) Descriptor deprecated

func (*GrpcRequestTemplate) Descriptor() ([]byte, []int)

Deprecated: Use GrpcRequestTemplate.ProtoReflect.Descriptor instead.

func (*GrpcRequestTemplate) Equal

func (m *GrpcRequestTemplate) Equal(that interface{}) bool

Equal function

func (*GrpcRequestTemplate) GetMethodName

func (x *GrpcRequestTemplate) GetMethodName() string

func (*GrpcRequestTemplate) GetOutgoingMessageJson

func (x *GrpcRequestTemplate) GetOutgoingMessageJson() *_struct.Value

func (*GrpcRequestTemplate) GetRequestMetadata

func (x *GrpcRequestTemplate) GetRequestMetadata() map[string]string

func (*GrpcRequestTemplate) GetServiceName

func (x *GrpcRequestTemplate) GetServiceName() string

func (*GrpcRequestTemplate) Hash

func (m *GrpcRequestTemplate) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*GrpcRequestTemplate) ProtoMessage

func (*GrpcRequestTemplate) ProtoMessage()

func (*GrpcRequestTemplate) ProtoReflect

func (x *GrpcRequestTemplate) ProtoReflect() protoreflect.Message

func (*GrpcRequestTemplate) Reset

func (x *GrpcRequestTemplate) Reset()

func (*GrpcRequestTemplate) String

func (x *GrpcRequestTemplate) String() string

type GrpcResolver

type GrpcResolver struct {
	UpstreamRef *core.ResourceRef `protobuf:"bytes,1,opt,name=upstream_ref,json=upstreamRef,proto3" json:"upstream_ref,omitempty"`
	// configuration used to compose the outgoing request to a REST API
	RequestTransform *GrpcRequestTemplate `protobuf:"bytes,2,opt,name=request_transform,json=requestTransform,proto3" json:"request_transform,omitempty"`
	SpanName         string               `protobuf:"bytes,4,opt,name=span_name,json=spanName,proto3" json:"span_name,omitempty"`
	// contains filtered or unexported fields
}

control-plane API

func (*GrpcResolver) Clone

func (m *GrpcResolver) Clone() proto.Message

Clone function

func (*GrpcResolver) Descriptor deprecated

func (*GrpcResolver) Descriptor() ([]byte, []int)

Deprecated: Use GrpcResolver.ProtoReflect.Descriptor instead.

func (*GrpcResolver) Equal

func (m *GrpcResolver) Equal(that interface{}) bool

Equal function

func (*GrpcResolver) GetRequestTransform

func (x *GrpcResolver) GetRequestTransform() *GrpcRequestTemplate

func (*GrpcResolver) GetSpanName

func (x *GrpcResolver) GetSpanName() string

func (*GrpcResolver) GetUpstreamRef

func (x *GrpcResolver) GetUpstreamRef() *core.ResourceRef

func (*GrpcResolver) Hash

func (m *GrpcResolver) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*GrpcResolver) ProtoMessage

func (*GrpcResolver) ProtoMessage()

func (*GrpcResolver) ProtoReflect

func (x *GrpcResolver) ProtoReflect() protoreflect.Message

func (*GrpcResolver) Reset

func (x *GrpcResolver) Reset()

func (*GrpcResolver) String

func (x *GrpcResolver) String() string

type QueryMatcher

type QueryMatcher struct {

	// Types that are assignable to Match:
	//	*QueryMatcher_FieldMatcher_
	Match isQueryMatcher_Match `protobuf_oneof:"match"`
	// contains filtered or unexported fields
}

func (*QueryMatcher) Clone

func (m *QueryMatcher) Clone() proto.Message

Clone function

func (*QueryMatcher) Descriptor deprecated

func (*QueryMatcher) Descriptor() ([]byte, []int)

Deprecated: Use QueryMatcher.ProtoReflect.Descriptor instead.

func (*QueryMatcher) Equal

func (m *QueryMatcher) Equal(that interface{}) bool

Equal function

func (*QueryMatcher) GetFieldMatcher

func (x *QueryMatcher) GetFieldMatcher() *QueryMatcher_FieldMatcher

func (*QueryMatcher) GetMatch

func (m *QueryMatcher) GetMatch() isQueryMatcher_Match

func (*QueryMatcher) Hash

func (m *QueryMatcher) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*QueryMatcher) ProtoMessage

func (*QueryMatcher) ProtoMessage()

func (*QueryMatcher) ProtoReflect

func (x *QueryMatcher) ProtoReflect() protoreflect.Message

func (*QueryMatcher) Reset

func (x *QueryMatcher) Reset()

func (*QueryMatcher) String

func (x *QueryMatcher) String() string

type QueryMatcher_FieldMatcher

type QueryMatcher_FieldMatcher struct {

	// Object type. For example, Query.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Field with in the object.
	Field string `protobuf:"bytes,2,opt,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryMatcher_FieldMatcher) Clone

Clone function

func (*QueryMatcher_FieldMatcher) Descriptor deprecated

func (*QueryMatcher_FieldMatcher) Descriptor() ([]byte, []int)

Deprecated: Use QueryMatcher_FieldMatcher.ProtoReflect.Descriptor instead.

func (*QueryMatcher_FieldMatcher) Equal

func (m *QueryMatcher_FieldMatcher) Equal(that interface{}) bool

Equal function

func (*QueryMatcher_FieldMatcher) GetField

func (x *QueryMatcher_FieldMatcher) GetField() string

func (*QueryMatcher_FieldMatcher) GetType

func (x *QueryMatcher_FieldMatcher) GetType() string

func (*QueryMatcher_FieldMatcher) Hash

func (m *QueryMatcher_FieldMatcher) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*QueryMatcher_FieldMatcher) ProtoMessage

func (*QueryMatcher_FieldMatcher) ProtoMessage()

func (*QueryMatcher_FieldMatcher) ProtoReflect

func (*QueryMatcher_FieldMatcher) Reset

func (x *QueryMatcher_FieldMatcher) Reset()

func (*QueryMatcher_FieldMatcher) String

func (x *QueryMatcher_FieldMatcher) String() string

type QueryMatcher_FieldMatcher_

type QueryMatcher_FieldMatcher_ struct {
	FieldMatcher *QueryMatcher_FieldMatcher `protobuf:"bytes,1,opt,name=field_matcher,json=fieldMatcher,proto3,oneof"`
}

type RESTResolver

type RESTResolver struct {
	UpstreamRef *core.ResourceRef `protobuf:"bytes,1,opt,name=upstream_ref,json=upstreamRef,proto3" json:"upstream_ref,omitempty"`
	// configuration used to compose the outgoing request to a REST API
	Request *RequestTemplate `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// configuration used to modify the response from the REST API
	// before being handled by the graphql server.
	Response *ResponseTemplate `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
	SpanName string            `protobuf:"bytes,4,opt,name=span_name,json=spanName,proto3" json:"span_name,omitempty"`
	// contains filtered or unexported fields
}

control-plane API

func (*RESTResolver) Clone

func (m *RESTResolver) Clone() proto.Message

Clone function

func (*RESTResolver) Descriptor deprecated

func (*RESTResolver) Descriptor() ([]byte, []int)

Deprecated: Use RESTResolver.ProtoReflect.Descriptor instead.

func (*RESTResolver) Equal

func (m *RESTResolver) Equal(that interface{}) bool

Equal function

func (*RESTResolver) GetRequest

func (x *RESTResolver) GetRequest() *RequestTemplate

func (*RESTResolver) GetResponse

func (x *RESTResolver) GetResponse() *ResponseTemplate

func (*RESTResolver) GetSpanName

func (x *RESTResolver) GetSpanName() string

func (*RESTResolver) GetUpstreamRef

func (x *RESTResolver) GetUpstreamRef() *core.ResourceRef

func (*RESTResolver) Hash

func (m *RESTResolver) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RESTResolver) ProtoMessage

func (*RESTResolver) ProtoMessage()

func (*RESTResolver) ProtoReflect

func (x *RESTResolver) ProtoReflect() protoreflect.Message

func (*RESTResolver) Reset

func (x *RESTResolver) Reset()

func (*RESTResolver) String

func (x *RESTResolver) String() string

type RequestTemplate

type RequestTemplate struct {

	// Use this attribute to set request headers to your REST service. It consists of a
	// map of strings to templated value strings. The string key determines the name of the
	// resulting header, the value provided will be the value.
	//
	// The least needed here is the ":method" and ":path" headers.
	// for example, if a header is an authorization token, taken from the graphql args,
	// we can use the following configuration:
	// headers:
	//   Authorization: "Bearer {$args.token}"
	Headers map[string]string `` /* 155-byte string literal not displayed */
	// Use this attribute to set query parameters to your REST service. It consists of a
	// map of strings to templated value strings. The string key determines the name of the
	// query param, the provided value will be the value. This value is appended to any
	// value set to the :path header in `headers`.
	//
	// for example, if a query parameter is an id, taken from the graphql parent object,
	// we can use the following configuration:
	// queryParams:
	//   id: "{$parent.id}"
	QueryParams map[string]string `` /* 182-byte string literal not displayed */
	// Used to construct the outgoing body to the upstream from the
	// graphql value providers.
	// All string values can be templated strings.
	Body *_struct.Value `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

Defines a configuration for generating outgoing requests for a resolver.

func (*RequestTemplate) Clone

func (m *RequestTemplate) Clone() proto.Message

Clone function

func (*RequestTemplate) Descriptor deprecated

func (*RequestTemplate) Descriptor() ([]byte, []int)

Deprecated: Use RequestTemplate.ProtoReflect.Descriptor instead.

func (*RequestTemplate) Equal

func (m *RequestTemplate) Equal(that interface{}) bool

Equal function

func (*RequestTemplate) GetBody

func (x *RequestTemplate) GetBody() *_struct.Value

func (*RequestTemplate) GetHeaders

func (x *RequestTemplate) GetHeaders() map[string]string

func (*RequestTemplate) GetQueryParams

func (x *RequestTemplate) GetQueryParams() map[string]string

func (*RequestTemplate) Hash

func (m *RequestTemplate) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RequestTemplate) ProtoMessage

func (*RequestTemplate) ProtoMessage()

func (*RequestTemplate) ProtoReflect

func (x *RequestTemplate) ProtoReflect() protoreflect.Message

func (*RequestTemplate) Reset

func (x *RequestTemplate) Reset()

func (*RequestTemplate) String

func (x *RequestTemplate) String() string

type Resolution

type Resolution struct {

	// Match an object type and field
	Matcher *QueryMatcher `protobuf:"bytes,1,opt,name=matcher,proto3" json:"matcher,omitempty"`
	// The resolver to use.
	//
	// Types that are assignable to Resolver:
	//	*Resolution_RestResolver
	//	*Resolution_GrpcResolver
	Resolver isResolution_Resolver `protobuf_oneof:"resolver"`
	// contains filtered or unexported fields
}

Define a resolution for each (Type).(Field) If a field does not have resolver, the default resolver will be used. the default resolver takes the field with the same name from the parent, and uses that value to resolve the field. If a field with the same name does not exist in the parent, null will be used.

func (*Resolution) Clone

func (m *Resolution) Clone() proto.Message

Clone function

func (*Resolution) Descriptor deprecated

func (*Resolution) Descriptor() ([]byte, []int)

Deprecated: Use Resolution.ProtoReflect.Descriptor instead.

func (*Resolution) Equal

func (m *Resolution) Equal(that interface{}) bool

Equal function

func (*Resolution) GetGrpcResolver

func (x *Resolution) GetGrpcResolver() *GrpcResolver

func (*Resolution) GetMatcher

func (x *Resolution) GetMatcher() *QueryMatcher

func (*Resolution) GetResolver

func (m *Resolution) GetResolver() isResolution_Resolver

func (*Resolution) GetRestResolver

func (x *Resolution) GetRestResolver() *RESTResolver

func (*Resolution) Hash

func (m *Resolution) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Resolution) ProtoMessage

func (*Resolution) ProtoMessage()

func (*Resolution) ProtoReflect

func (x *Resolution) ProtoReflect() protoreflect.Message

func (*Resolution) Reset

func (x *Resolution) Reset()

func (*Resolution) String

func (x *Resolution) String() string

type Resolution_GrpcResolver

type Resolution_GrpcResolver struct {
	GrpcResolver *GrpcResolver `protobuf:"bytes,4,opt,name=grpc_resolver,json=grpcResolver,proto3,oneof"`
}

type Resolution_RestResolver

type Resolution_RestResolver struct {
	RestResolver *RESTResolver `protobuf:"bytes,3,opt,name=rest_resolver,json=restResolver,proto3,oneof"`
}

type ResponseTemplate

type ResponseTemplate struct {

	//
	//Sets the "root" of the upstream response to be turned into a graphql type by the graphql server.
	//For example, if the graphql type is:
	//
	//type Simple {
	//name String
	//}
	//
	//and the upstream response is `{"data": {"simple": {"name": "simple name"}}}`,
	//the graphql server will not be able to marshal the upstream response into the Simple graphql type
	//because it doesn't know where the relevant data is. If we set result_root to "data.simple", we can give the
	//graphql server a hint of where to look in the upstream response for the relevant data that graphql type wants.
	ResultRoot string `protobuf:"bytes,1,opt,name=result_root,json=resultRoot,proto3" json:"result_root,omitempty"`
	//
	//Field-specific mapping for a graphql field to a JSON path in the upstream response.
	//For example, if the graphql type is
	//
	//type Simple {
	//name String
	//number String
	//}
	//
	//and the upstream response is `{"name": "simple name", "details": {"num": "1234567890"}}`,
	//the graphql server will not be able to marshal the upstream response into the Simple graphql type because of the
	//nested `number` field. We can use a simple setter here:
	//
	//setters:
	//number: "details.num"
	//
	//and the graphql server will be able to extract data for a field given the path to the relevant data
	//in the upstream JSON response. We don't need to have a setter for the `name` field because the JSON
	//response has that field in a position the graphql server can understand automatically.
	Setters map[string]string `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ResponseTemplate) Clone

func (m *ResponseTemplate) Clone() proto.Message

Clone function

func (*ResponseTemplate) Descriptor deprecated

func (*ResponseTemplate) Descriptor() ([]byte, []int)

Deprecated: Use ResponseTemplate.ProtoReflect.Descriptor instead.

func (*ResponseTemplate) Equal

func (m *ResponseTemplate) Equal(that interface{}) bool

Equal function

func (*ResponseTemplate) GetResultRoot

func (x *ResponseTemplate) GetResultRoot() string

func (*ResponseTemplate) GetSetters

func (x *ResponseTemplate) GetSetters() map[string]string

func (*ResponseTemplate) Hash

func (m *ResponseTemplate) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*ResponseTemplate) ProtoMessage

func (*ResponseTemplate) ProtoMessage()

func (*ResponseTemplate) ProtoReflect

func (x *ResponseTemplate) ProtoReflect() protoreflect.Message

func (*ResponseTemplate) Reset

func (x *ResponseTemplate) Reset()

func (*ResponseTemplate) String

func (x *ResponseTemplate) String() string

type TransitionGraphQLSchemaFunc

type TransitionGraphQLSchemaFunc func(original, desired *GraphQLSchema) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

Directories

Path Synopsis
kube
apis/enterprise.gloo.solo.io/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
apis/graphql.gloo.solo.io/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.

Jump to

Keyboard shortcuts

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