package
6.7.2
Repository: https://github.com/b2wdigital/restql-golang.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
GetLogger extracts a logger instance from the given context.Context.
NewMapping constructs a Mapping value from a resource name and a canonical URL with optional identifiers for path and query parameters.
NewResponseBodyFromBytes creates a ResponseBody wrapper from an HTTP response data.
NewResponseBodyFromValue creates a ResponseBody wrapper from a generic value, usually from an error.
RegisterPlugin indexes the provided plugin information for latter usage by restQL in runtime.
WithLogger stores a logger instance in a child context.Context created from the given context.Context.

# Constants

Plugin types.
Plugin types.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
Errors returned by Database plugin.
Errors returned by Database plugin.
ErrMappingsNotFound is the error returned when the resource mappings is not found anywhere.
Errors returned by Database plugin.
ErrNamespaceNotFound is the error returned when the namespace is not found anywhere.
ErrQueryNotFound is the error returned when the query text is not found anywhere.
Errors returned by Database plugin.

# Structs

DoneResource represents a statement result.
HttpRequest represents a HTTP call to be made to an upstream dependency defined by the mappings.
HttpResponse represents a HTTP call result from an upstream dependency defined by the mappings.
Mapping represents the association of a name to a REST resource url.
PluginInfo represents a plugin instance associating a name and type to a constructor function.
QueryContext represents all data related to a query execution like query identification, input values and resource mappings.
QueryInput represents all the data provided by the client when requesting the execution of the query.
QueryOptions represents the identity of the query being executed.
ResourceCacheControl represent cache control directives returned by upstream during statement resolution.
ResourceCacheControlValue represents the values a cache control directive is able to have.
ResponseBody is a wrapper that allows restQL to defer JSON parsing the HTTP body of an upstream response.
SavedQuery represents a query stored in database.
SavedQueryRevision represents a query revision stored in database.
TransactionRequest represents a query execution transaction received through the /run-query/* endpoints.
TransactionResponse represents a query execution result from a transaction received through the /run-query/* endpoints.

# Interfaces

Body represents a HTTP body in a request or response.
DatabasePlugin is the interface that defines the obligatory operations needed from a database.
LifecyclePlugin is the interface that defines all possible hooks during the query execution.
Logger is the interface that wraps all methods for log handling.
Plugin is the root interface that allows general handling of the plugins instance when need.

# Type aliases

DoneResources represents a multiplexed statement result.
Headers represents all HTTP header in a request or response.
PluginType is an enum of possible plugin types supported by restQL, currently supports LifecyclePluginType and DatabasePluginType.
No description provided by the author