v1alpha1

package
v1.11.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 37 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 File_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_graphql_v1alpha1_stitching_info_proto protoreflect.FileDescriptor
View Source
var (
	GraphQLApiCrd = crd.NewCrd(
		"graphqlapis",
		GraphQLApiGVK.Group,
		GraphQLApiGVK.Version,
		GraphQLApiGVK.Kind,
		"gql",
		false,
		&GraphQLApi{})
)
View Source
var (
	GraphQLApiGVK = schema.GroupVersionKind{
		Version: "v1alpha1",
		Group:   "graphql.gloo.solo.io",
		Kind:    "GraphQLApi",
	}
)

Functions

This section is empty.

Types

type ExecutableSchema

type ExecutableSchema struct {

	// The following directives are supported:
	//- @resolve(name: string)
	//- @cacheControl(maxAge: uint32, inheritMaxAge: bool, scope: unset/public/private)
	//
	//Define named resolvers on the `Executor.Local.resolutions` message, and reference them here using @resolve:
	//“`gql
	//type Query {
	//author: String @resolve(name: "authorResolver")
	//}
	//
	//Further, fields/types can be annotated with the @cacheControl directive, e.g.
	//“`gql
	//type Query @cacheControl(maxAge: 60) {
	//author: String @resolve(name: "authorResolver") @cacheControl(maxAge: 90, scope: private)
	//}
	//“`
	//Any type-level cache control defaults are overridden by field settings, if provided.
	//The most restrictive cache control setting (smallest maxAge and scope) across all fields in
	//an entire query will be returned to the client in the `Cache-Control` header with appropriate
	//`max-age` and  scope (unset, `public`, or `private`) directives.
	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 {

	// Mapping of resolver name to resolver definition.
	//The names are used to reference the resolver in the graphql schema.
	//For example, a resolver with name "authorResolver" can be defined as
	//“`yaml
	//authorResolver:
	//restResolver:
	//upstreamRef: ...
	//request:
	//...
	//response:
	//...
	//“`
	//and referenced in the graphql schema as
	//“`gql
	//type Query {
	//author: String @resolve(name: "authorResolver")
	//}
	//“`
	Resolutions map[string]*Resolution `` /* 163-byte string literal not displayed */
	// 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() map[string]*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 GraphQLApi

type GraphQLApi 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"`
	// Types that are assignable to Schema:
	//	*GraphQLApi_ExecutableSchema
	//	*GraphQLApi_StitchedSchema
	Schema isGraphQLApi_Schema `protobuf_oneof:"schema"`
	// The stats prefix which will be used for this route config.
	// If empty, will generate a stats prefix ${GRAPHQLAPI_REF}
	StatPrefix *wrappers.StringValue `protobuf:"bytes,3,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"`
	// Configuration settings for persisted query cache
	PersistedQueryCacheConfig *PersistedQueryCacheConfig `` /* 140-byte string literal not displayed */
	// Safelist: only allow queries to be executed that match these sha256 hashes.
	// The hash can be computed from the query string or provided (i.e. persisted queries).
	AllowedQueryHashes []string `protobuf:"bytes,5,rep,name=allowed_query_hashes,json=allowedQueryHashes,proto3" json:"allowed_query_hashes,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 NewGraphQLApi

func NewGraphQLApi(namespace, name string) *GraphQLApi

func (*GraphQLApi) Clone

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

Clone function

func (*GraphQLApi) DeepCopyInto

func (o *GraphQLApi) DeepCopyInto(out *GraphQLApi)

func (*GraphQLApi) DeepCopyObject

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

func (*GraphQLApi) Descriptor deprecated

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

Deprecated: Use GraphQLApi.ProtoReflect.Descriptor instead.

func (*GraphQLApi) Equal

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

Equal function

func (*GraphQLApi) GetAllowedQueryHashes

func (x *GraphQLApi) GetAllowedQueryHashes() []string

func (*GraphQLApi) GetExecutableSchema

func (x *GraphQLApi) GetExecutableSchema() *ExecutableSchema

func (*GraphQLApi) GetMetadata

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

func (*GraphQLApi) GetNamespacedStatuses

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

func (*GraphQLApi) GetObjectKind

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

func (*GraphQLApi) GetPersistedQueryCacheConfig

func (x *GraphQLApi) GetPersistedQueryCacheConfig() *PersistedQueryCacheConfig

func (*GraphQLApi) GetSchema

func (m *GraphQLApi) GetSchema() isGraphQLApi_Schema

func (*GraphQLApi) GetStatPrefix

func (x *GraphQLApi) GetStatPrefix() *wrappers.StringValue

func (*GraphQLApi) GetStatus

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

Deprecated

func (*GraphQLApi) GetStitchedSchema

func (x *GraphQLApi) GetStitchedSchema() *StitchedSchema

func (*GraphQLApi) GroupVersionKind

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

func (*GraphQLApi) Hash

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

Hash function

func (*GraphQLApi) MustHash

func (r *GraphQLApi) MustHash() uint64

func (*GraphQLApi) ProtoMessage

func (*GraphQLApi) ProtoMessage()

func (*GraphQLApi) ProtoReflect

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

func (*GraphQLApi) Reset

func (x *GraphQLApi) Reset()

func (*GraphQLApi) SetMetadata

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

func (*GraphQLApi) SetNamespacedStatuses

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

func (*GraphQLApi) SetStatus

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

Deprecated

func (*GraphQLApi) String

func (x *GraphQLApi) String() string

type GraphQLApiClient

type GraphQLApiClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*GraphQLApi, error)
	Write(resource *GraphQLApi, opts clients.WriteOpts) (*GraphQLApi, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (GraphQLApiList, error)
	GraphQLApiWatcher
}

func NewGraphQLApiClient

func NewGraphQLApiClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (GraphQLApiClient, error)

func NewGraphQLApiClientWithBase

func NewGraphQLApiClientWithBase(rc clients.ResourceClient) GraphQLApiClient

func NewGraphQLApiClientWithToken

func NewGraphQLApiClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (GraphQLApiClient, error)

type GraphQLApiList

type GraphQLApiList []*GraphQLApi

func (GraphQLApiList) AsInputResources

func (list GraphQLApiList) AsInputResources() resources.InputResourceList

func (GraphQLApiList) AsInterfaces

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

func (GraphQLApiList) AsResources

func (list GraphQLApiList) AsResources() resources.ResourceList

func (GraphQLApiList) Clone

func (list GraphQLApiList) Clone() GraphQLApiList

func (GraphQLApiList) Each

func (list GraphQLApiList) Each(f func(element *GraphQLApi))

func (GraphQLApiList) EachResource

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

func (GraphQLApiList) Find

func (list GraphQLApiList) Find(namespace, name string) (*GraphQLApi, error)

func (GraphQLApiList) Names

func (list GraphQLApiList) Names() []string

func (GraphQLApiList) NamespacesDotNames

func (list GraphQLApiList) NamespacesDotNames() []string

func (GraphQLApiList) Sort

func (list GraphQLApiList) Sort() GraphQLApiList

type GraphQLApiReconciler

type GraphQLApiReconciler interface {
	Reconcile(namespace string, desiredResources GraphQLApiList, transition TransitionGraphQLApiFunc, opts clients.ListOpts) error
}

func NewGraphQLApiReconciler

func NewGraphQLApiReconciler(client GraphQLApiClient, statusSetter resources.StatusSetter) GraphQLApiReconciler

type GraphQLApiWatcher

type GraphQLApiWatcher interface {
	// watch namespace-scoped GraphqlApis
	Watch(namespace string, opts clients.WatchOpts) (<-chan GraphQLApiList, <-chan error, error)
}

type GraphQLApi_ExecutableSchema

type GraphQLApi_ExecutableSchema struct {
	// An Executable Schema represents a single upstream, which could be a locally resolved
	// schema, or a remotely resolved schema.
	ExecutableSchema *ExecutableSchema `protobuf:"bytes,6,opt,name=executable_schema,json=executableSchema,proto3,oneof"`
}

type GraphQLApi_StitchedSchema

type GraphQLApi_StitchedSchema struct {
	// A stitched schema represents the product of stitching multiple graphql subschemas together.
	StitchedSchema *StitchedSchema `protobuf:"bytes,7,opt,name=stitched_schema,json=stitchedSchema,proto3,oneof"`
}

type GraphQLToolsStitchingInput

type GraphQLToolsStitchingInput struct {
	Subschemas []*GraphQLToolsStitchingInput_Schema `protobuf:"bytes,1,rep,name=subschemas,proto3" json:"subschemas,omitempty"`
	// contains filtered or unexported fields
}

------------- Graphql Tools JS Input ------------- This is not user-facing and is only used to pass to the graphql-tools js script This is the message which the graphql-tools js script will consume

func (*GraphQLToolsStitchingInput) Descriptor deprecated

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

Deprecated: Use GraphQLToolsStitchingInput.ProtoReflect.Descriptor instead.

func (*GraphQLToolsStitchingInput) GetSubschemas

func (*GraphQLToolsStitchingInput) ProtoMessage

func (*GraphQLToolsStitchingInput) ProtoMessage()

func (*GraphQLToolsStitchingInput) ProtoReflect

func (*GraphQLToolsStitchingInput) Reset

func (x *GraphQLToolsStitchingInput) Reset()

func (*GraphQLToolsStitchingInput) String

func (x *GraphQLToolsStitchingInput) String() string

type GraphQLToolsStitchingInput_Schema

type GraphQLToolsStitchingInput_Schema struct {

	// name of the subschema, arbitrary name but must be unique in a gateway schema.
	// generally generated from the graphql schema ref
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// GraphQL schema SDL for the subschema
	Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
	// Type merge config that the graphql-tools stitching script
	// needs to generate stitching info for the data plane
	TypeMergeConfig map[string]*GraphQLToolsStitchingInput_Schema_TypeMergeConfig `` /* 196-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GraphQLToolsStitchingInput_Schema) Descriptor deprecated

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

Deprecated: Use GraphQLToolsStitchingInput_Schema.ProtoReflect.Descriptor instead.

func (*GraphQLToolsStitchingInput_Schema) GetName

func (*GraphQLToolsStitchingInput_Schema) GetSchema

func (*GraphQLToolsStitchingInput_Schema) GetTypeMergeConfig

func (*GraphQLToolsStitchingInput_Schema) ProtoMessage

func (*GraphQLToolsStitchingInput_Schema) ProtoMessage()

func (*GraphQLToolsStitchingInput_Schema) ProtoReflect

func (*GraphQLToolsStitchingInput_Schema) Reset

func (*GraphQLToolsStitchingInput_Schema) String

type GraphQLToolsStitchingInput_Schema_TypeMergeConfig

type GraphQLToolsStitchingInput_Schema_TypeMergeConfig struct {
	SelectionSet string            `protobuf:"bytes,1,opt,name=selection_set,json=selectionSet,proto3" json:"selection_set,omitempty"`
	FieldName    string            `protobuf:"bytes,2,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
	Args         map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GraphQLToolsStitchingInput_Schema_TypeMergeConfig) Descriptor deprecated

Deprecated: Use GraphQLToolsStitchingInput_Schema_TypeMergeConfig.ProtoReflect.Descriptor instead.

func (*GraphQLToolsStitchingInput_Schema_TypeMergeConfig) GetArgs

func (*GraphQLToolsStitchingInput_Schema_TypeMergeConfig) GetFieldName

func (*GraphQLToolsStitchingInput_Schema_TypeMergeConfig) GetSelectionSet

func (*GraphQLToolsStitchingInput_Schema_TypeMergeConfig) ProtoMessage

func (*GraphQLToolsStitchingInput_Schema_TypeMergeConfig) ProtoReflect

func (*GraphQLToolsStitchingInput_Schema_TypeMergeConfig) Reset

func (*GraphQLToolsStitchingInput_Schema_TypeMergeConfig) String

type GraphQlToolsStitchingOutput

type GraphQlToolsStitchingOutput struct {
	FieldNodesByType  map[string]*v2.FieldNodes       `` /* 201-byte string literal not displayed */
	FieldNodesByField map[string]*v2.FieldNodeMap     `` /* 204-byte string literal not displayed */
	MergedTypes       map[string]*v2.MergedTypeConfig `` /* 182-byte string literal not displayed */
	StitchedSchema    string                          `protobuf:"bytes,4,opt,name=stitched_schema,json=stitchedSchema,proto3" json:"stitched_schema,omitempty"`
	// contains filtered or unexported fields
}

------------- Graphql Tools JS Out ------------------ This is not user-facing and is only used to pass data back from the graphql-tools js script The message that is the output of the graphql tools stitching info script

func (*GraphQlToolsStitchingOutput) Descriptor deprecated

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

Deprecated: Use GraphQlToolsStitchingOutput.ProtoReflect.Descriptor instead.

func (*GraphQlToolsStitchingOutput) GetFieldNodesByField

func (x *GraphQlToolsStitchingOutput) GetFieldNodesByField() map[string]*v2.FieldNodeMap

func (*GraphQlToolsStitchingOutput) GetFieldNodesByType

func (x *GraphQlToolsStitchingOutput) GetFieldNodesByType() map[string]*v2.FieldNodes

func (*GraphQlToolsStitchingOutput) GetMergedTypes

func (x *GraphQlToolsStitchingOutput) GetMergedTypes() map[string]*v2.MergedTypeConfig

func (*GraphQlToolsStitchingOutput) GetStitchedSchema

func (x *GraphQlToolsStitchingOutput) GetStitchedSchema() string

func (*GraphQlToolsStitchingOutput) ProtoMessage

func (*GraphQlToolsStitchingOutput) ProtoMessage()

func (*GraphQlToolsStitchingOutput) ProtoReflect

func (*GraphQlToolsStitchingOutput) Reset

func (x *GraphQlToolsStitchingOutput) Reset()

func (*GraphQlToolsStitchingOutput) String

func (x *GraphQlToolsStitchingOutput) String() string

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 PersistedQueryCacheConfig

type PersistedQueryCacheConfig struct {

	// The unit is number of queries to store, default to 1000.
	CacheSize uint32 `protobuf:"varint,1,opt,name=cache_size,json=cacheSize,proto3" json:"cache_size,omitempty"`
	// contains filtered or unexported fields
}

This message specifies Persisted Query Cache configuration.

func (*PersistedQueryCacheConfig) Clone

Clone function

func (*PersistedQueryCacheConfig) Descriptor deprecated

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

Deprecated: Use PersistedQueryCacheConfig.ProtoReflect.Descriptor instead.

func (*PersistedQueryCacheConfig) Equal

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

Equal function

func (*PersistedQueryCacheConfig) GetCacheSize

func (x *PersistedQueryCacheConfig) GetCacheSize() uint32

func (*PersistedQueryCacheConfig) Hash

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

Hash function

func (*PersistedQueryCacheConfig) ProtoMessage

func (*PersistedQueryCacheConfig) ProtoMessage()

func (*PersistedQueryCacheConfig) ProtoReflect

func (*PersistedQueryCacheConfig) Reset

func (x *PersistedQueryCacheConfig) Reset()

func (*PersistedQueryCacheConfig) String

func (x *PersistedQueryCacheConfig) String() string

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 {

	// The resolver to use.
	//
	// Types that are assignable to Resolver:
	//	*Resolution_RestResolver
	//	*Resolution_GrpcResolver
	Resolver isResolution_Resolver `protobuf_oneof:"resolver"`
	// The stats prefix which will be used for this resolver.
	// If empty, will generate a stats prefix ${RESOLVER_NAME}
	StatPrefix *wrappers.StringValue `protobuf:"bytes,3,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"`
	// contains filtered or unexported fields
}

Define a named resolver which can be then matched to a field using the `resolve` directive. 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) GetResolver

func (m *Resolution) GetResolver() isResolution_Resolver

func (*Resolution) GetRestResolver

func (x *Resolution) GetRestResolver() *RESTResolver

func (*Resolution) GetStatPrefix

func (x *Resolution) GetStatPrefix() *wrappers.StringValue

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,2,opt,name=grpc_resolver,json=grpcResolver,proto3,oneof"`
}

type Resolution_RestResolver

type Resolution_RestResolver struct {
	RestResolver *RESTResolver `protobuf:"bytes,1,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 Person {
	//firstname String
	//lastname String
	//fullname String
	//}
	//
	//and the upstream response is `{"firstname": "Joe", "details": {"lastname": "Smith"}}`,
	//the graphql server will not be able to marshal the upstream response into the Person graphql type because of the
	//nested `lastname` field. We can use a simple setter here:
	//
	//setters:
	//lastname: '{$body.details.lastname}'
	//fullname: '{$body.details.firstname} {$body.details.lastname}'
	//
	//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 `firstname` field because the
	//JSON response has that field in a position the graphql server can understand automatically.
	//
	//So far only the $body keyword is supported, but in the future we may add support for others such as $headers.
	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 StitchedSchema

type StitchedSchema struct {

	// List of GraphQLApis that compose this stitched GraphQL schema.
	Subschemas []*StitchedSchema_SubschemaConfig `protobuf:"bytes,1,rep,name=subschemas,proto3" json:"subschemas,omitempty"`
	// contains filtered or unexported fields
}

func (*StitchedSchema) Clone

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

Clone function

func (*StitchedSchema) Descriptor deprecated

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

Deprecated: Use StitchedSchema.ProtoReflect.Descriptor instead.

func (*StitchedSchema) Equal

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

Equal function

func (*StitchedSchema) GetSubschemas

func (x *StitchedSchema) GetSubschemas() []*StitchedSchema_SubschemaConfig

func (*StitchedSchema) Hash

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

Hash function

func (*StitchedSchema) ProtoMessage

func (*StitchedSchema) ProtoMessage()

func (*StitchedSchema) ProtoReflect

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

func (*StitchedSchema) Reset

func (x *StitchedSchema) Reset()

func (*StitchedSchema) String

func (x *StitchedSchema) String() string

type StitchedSchema_SubschemaConfig

type StitchedSchema_SubschemaConfig struct {

	// name of the GraphQLApi subschema
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// namespace of the GraphQLApi subschema
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	//
	//Type merge configuration for this subschema. Let's say this subschema is a Users service schema
	//and provides the User type (with a query to fetch a user given the username)
	//
	//“`gql
	//type Query {
	//GetUser(username: String): User
	//}
	//type User {
	//username: String
	//firstName: String
	//lastName: String
	//}
	//“`
	//
	//and another subschema, e.g. Reviews schema, may have a partial User type:
	//“`gql
	//type Review {
	//author: User
	//}
	//
	//type User {
	//username: String
	//}
	//“`
	//We want to provide the relevant information from this Users service schema,
	//so that another API that can give us a partial User type (with the username) will then
	//be able to have access to the full user type. With the correct type merging config under the Users subschema, e.g.:
	//
	//“`yaml
	//type_merge:
	//User:
	//selection_set: '{ username }'
	//query_name: 'GetUser'
	//args:
	//username: username
	//“`
	//the stitched schema will now be able to provide the full user type to all types that require it. In this case,
	//we can now get the first name of an author from the Review.author field even though the Reviews schema doesn't
	//provide the full User type.
	TypeMerge map[string]*StitchedSchema_SubschemaConfig_TypeMergeConfig `` /* 176-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*StitchedSchema_SubschemaConfig) Clone

Clone function

func (*StitchedSchema_SubschemaConfig) Descriptor deprecated

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

Deprecated: Use StitchedSchema_SubschemaConfig.ProtoReflect.Descriptor instead.

func (*StitchedSchema_SubschemaConfig) Equal

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

Equal function

func (*StitchedSchema_SubschemaConfig) GetName

func (*StitchedSchema_SubschemaConfig) GetNamespace

func (x *StitchedSchema_SubschemaConfig) GetNamespace() string

func (*StitchedSchema_SubschemaConfig) GetTypeMerge

func (*StitchedSchema_SubschemaConfig) Hash

Hash function

func (*StitchedSchema_SubschemaConfig) ProtoMessage

func (*StitchedSchema_SubschemaConfig) ProtoMessage()

func (*StitchedSchema_SubschemaConfig) ProtoReflect

func (*StitchedSchema_SubschemaConfig) Reset

func (x *StitchedSchema_SubschemaConfig) Reset()

func (*StitchedSchema_SubschemaConfig) String

type StitchedSchema_SubschemaConfig_TypeMergeConfig

type StitchedSchema_SubschemaConfig_TypeMergeConfig struct {

	// This specifies one or more key fields required from other services to perform this query.
	// Query planning will automatically resolve these fields from other subschemas in dependency order.
	// This is a graphql selection set specified as a string
	// e.g. '{ username }'
	SelectionSet string `protobuf:"bytes,1,opt,name=selection_set,json=selectionSet,proto3" json:"selection_set,omitempty"`
	// specifies the root field from this subschema used to request the local type
	QueryName string            `protobuf:"bytes,2,opt,name=query_name,json=queryName,proto3" json:"query_name,omitempty"`
	Args      map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) Clone

Clone function

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) Descriptor deprecated

Deprecated: Use StitchedSchema_SubschemaConfig_TypeMergeConfig.ProtoReflect.Descriptor instead.

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) Equal

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

Equal function

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) GetArgs

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) GetQueryName

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) GetSelectionSet

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) Hash

Hash function

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) ProtoMessage

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) ProtoReflect

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) Reset

func (*StitchedSchema_SubschemaConfig_TypeMergeConfig) String

type TransitionGraphQLApiFunc

type TransitionGraphQLApiFunc func(original, desired *GraphQLApi) (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