# Functions
AsError returns an Error type from an error, if it is one.
IsInternalError returns true if the error is internal.
IsNotFoundError returns true if something was not found.
IsValidationError returns true if the error is related to data validation.
New instantiates a new gateway client service using the provided configuration options.
ParseConfig attempts to load the file an populate the configuration object provided.
TaskError is used to create a more friendly version of an error that can be sent back to the client.
TaskKO is used to create a more friendly version of an error that cannot be recovered from without sending a new document.
TaskOK provides a simple task result indicating that everything went fine.
TaskQueued provides a queued task result with the provided message and retryIn value.
TaskSkip provides skip response with the provided message.
WithConfig allows the gateway connection to be configured with a specific configuration object.
WithName is used to set the name of the provider.
WithNATS configures the gateway to use the provided NATS connection.
WithSiloPublicBaseURL sets the public base URL for the silo which is used for uploading files.
WithTaskHandler configures where incoming tasks will be sent.
WithTaskTimeout sets the amount of time to wait before cancelling a task.
WithWorkerCount sets the number of workers to use for processing.
# Constants
No description provided by the author
No description provided by the author
The requested resource was not found.
Complete Envelope.
RFC6902.
RFC7396.
Subject and Queue names.
Subject and Queue names.
Subject and Queue names.
Subject and Queue names.
for specific task messages.
Subject and Queue names.
Cancel requested.
Something went wrong.
Imposible to complete.
invalid.
OKAY.
Needs a poke to wake up.
Try again later.
Not processed, see message.
# Variables
Enum value maps for ErrorCode.
Enum value maps for ErrorCode.
No description provided by the author
No description provided by the author
No description provided by the author
Enum value maps for TaskStatus.
Enum value maps for TaskStatus.
# Structs
Client wraps around the functionality provided by the the gateway service, accessed via NATS.
Config holds the configuration for the gateway service.
No description provided by the author
Error is a generic error response for the API.
A Fault provides basic information about a previous step that KO'd.
No description provided by the author
FileResponse makes it easier to provide an error message if something goes wrong, or the actual result.
Meta represents a simplified Silo Meta row.
Silo is used for uploading assets.
Task keeps together the request and base data to be used by a processor to provide a result.
TaskPoke is used to wake up a task that is currently QUEUED.
TaskPokeResponse is the response to a TaskPoke request.
TaskResult says what we expect from a provider after attempting to complete a task.
# Interfaces
Configuration defines what we expect from the config so that it can be overwritten if needed.
# Type aliases
ErrorCode defines a basic list of recognised error codes.
Option provides a way to configure the gateway client using a set of functions.
TaskHandler defines what type of method we need to call when an incoming task message is received.
No description provided by the author