package
6.0.0-beta.10+incompatible
Repository: https://github.com/nuts-foundation/nuts-node.git
Documentation: pkg.go.dev
# Functions
BuildInfo returns a formatted version of the current branch/tag/version/os/arch.
ClientConfigFlags returns the flags for configuring the client config.
CreateHTTPClient creates a new HTTP client with the given client configuration.
CreateHTTPErrorHandler returns an Echo HTTPErrorHandler that logs the error with extra fields and returns it as an HTTP response.
Error returns an error that maps to an HTTP status.
FlagSet returns the default server flags.
GetHTTPStatusCode resolves the HTTP Status Code to be returned from the given error, in this order: - errors with a predefined status code (HTTPStatusCodeError, echo.HTTPError) - from handler - if none of the above criteria match, HTTP 500 Internal Server Error is returned.
InvalidInputError returns an error that maps to a HTTP 400 Bad Request.
JoinURLPaths works like path.Join but for URLs; it won't remove double slashes.
LimitedReadAll reads the given reader until the DefaultMaxHttpResponseSize is reached.
LoadTrustStore creates a x509 certificate pool based on a truststore file.
MustCreateHTTPClient is like CreateHTTPClient but panics if it returns an error.
NewCertPool creates a new x509.CertPool and adds all given certificates to it.
NewClientConfigForCommand loads all the values for a given command into the provided configMap.
NewMetricsEngine creates a new Engine for exposing prometheus metrics via http.
NewMockConfigurable creates a new mock instance.
NewMockDiagnosable creates a new mock instance.
NewMockEchoRouter creates a new mock instance.
NewMockEngine creates a new mock instance.
NewMockHealthCheckable creates a new mock instance.
NewMockInjectable creates a new mock instance.
NewMockMigratable creates a new mock instance.
NewMockNamed creates a new mock instance.
NewMockRoutable creates a new mock instance.
NewMockRunnable creates a new mock instance.
NewMockViewableDiagnostics creates a new mock instance.
NewServerConfig creates an initialized empty server config.
NewSystem creates a new, empty System.
NotFoundError returns an error that maps to a HTTP 404 Status Not Found.
OSArch returns the OS and Arch.
ParseCertificates reads PEM encoded X.509 certificates from the given input.
ParsePublicURL parses the input URL using ParsePublicURLWithScheme.
ParsePublicURLWithScheme parses the given input string as URL and asserts that it has a scheme and that it is in the allowedSchemes if provided, it is not an IP address, and it is not (depending on allowReserved) a reserved address or TLD as described in RFC2606 or https://www.ietf.org/archive/id/draft-chapin-rfc2606bis-00.html.
ParseTrustStore creates a x509 certificate pool from the raw data.
PreconditionFailedError returns an error that maps to a HTTP 412 Status Precondition Failed.
ResolveStatusCode looks tries to find the first error in the given map that satisfies errors.Is() for the given error, and returns the associated integer as HTTP status code.
TestResponseCode checks whether the returned HTTP status response code matches the expected code.
TestResponseCodeWithLog acts like TestResponseCode, but logs the response body if the status code is not as expected.
TestServerConfig returns a new ServerConfig with the given template applied.
UserAgent returns a string that can be used as HTTP user agent, containing the version of the node (e.g.
UserAgentRequestEditor can be used as request editor function for generated OpenAPI clients, to set the HTTP User-Agent header to identify the Nuts node.
Version gives the current version according to the git tag or the branch if there's no tag.
# Constants
DefaultMaxHttpResponseSize is a default maximum size of an HTTP response body that will be read.
ErrorWriterContextKey contains the key for the Echo context parameter that specifies a error writer.
HealthStatusDown indicates the health check failed.
HealthStatusUnknown indicates the status of the health check is unknown.
HealthStatusUp indicates the health check succeeded.
HttpResponseBodyLogClipAt is the maximum length of a response body to log.
LogFieldAuditSubject is the log field of the subject (e.g.
LogFieldAuthorizerDID is the log field key for the DID of the authorizer when creating an access token in the auth module.
LogFieldConversationID is the log field key for the conversation ID of messages from the network module.
LogFieldCredentialID is the log field key for the ID of a Verifiable Credential from the VCR module.
LogFieldCredentialIssuer is the log field key for the issuer of a Verifiable Credential from the VCR module.
LogFieldCredentialSubject is the log field key for the subject of a Verifiable Credential from the VCR module.
LogFieldCredentialType is the log field key for the type of a Verifiable Credential from the VCR module.
LogFieldDID is the log field key for the ID of a DID document from the VDR module.
LogFieldDIDSubject is the log field key for the DID subject.
LogFieldEventSubject is the log field key for event subjects from the events module.
LogFieldEventSubscriber is the log field key for event subscribers from the events module.
LogFieldEventType is the log field key for event types from the events module.
LogFieldKeyID is the log field key for the unique ID of a key from the VDR or crypto module.
LogFieldMessageType is the log field key for the type, of a received/sent message from the network module.
LogFieldModule is the log field for the module name.
LogFieldNodeAddress is the log field key for node's (gRPC) address from the network module.
LogFieldPeerAddr is the log field key for peer addresses from the network module.
LogFieldPeerAuthenticated is the log field key for that indicates if the peer's node DID is authenticated.
LogFieldPeerID is the log field key for peer IDs from the network module.
LogFieldPeerNodeDID is the log field key for a peer's node DID from the network module.
LogFieldProtocolVersion is the log field key for the protocol version from the network module.
LogFieldRequesterDID is the log field key for the DID of the requester when creating an access token in the auth module.
LogFieldServiceEndpoint is the log field key of the ID of the endpoint of a DID document service from the VDR module.
LogFieldServiceID is the log field key for the ID of a DID document service from the VDR module.
LogFieldServiceType is the log field key for the type of a DID document service from the VDR module.
LogFieldStore is the log field key for the name of a store managed by the storage module.
LogFieldStoreShelf is the log field key for the name of a shelf, in a store managed by the storage module.
LogFieldTransactionIsPrivate is the log field key for marker whether a transaction is private, from the network module.
LogFieldTransactionPayloadHash is the log field key for the payload (hash) of a transaction from the network module.
LogFieldTransactionPayloadLength is the log field key for the payload (length in bytes) of a transaction from the network module.
LogFieldTransactionRef is the log field key for a transaction reference from the network module.
LogFieldTransactionType is the log field key for the payload type, of a transaction from the network module.
LogFieldWalletDID is the log field of the DID of a wallet.
MinTLSVersion defines the minimal TLS version used by all components that use TLS.
ModuleNameContextKey contains the key for the Echo context parameter that specifies the module that contains the OpenAPI operation being called, for logging/error returning.
NoOffloading specifies that TLS is not offloaded, meaning incoming and outgoing TLS traffic is terminated at the local node, and not by a proxy inbetween.
OffloadIncomingTLS specifies that incoming TLS traffic should be offloaded.
OperationIDContextKey contains the key for the Echo context parameter that specifies the name of the OpenAPI operation being called, for logging/error returning.
StatusCodeResolverContextKey contains the key for the Echo context parameter that specifies a custom HTTP status code resolver.
UserContextKey is the key used to store the user in HTTP contexts.
# Variables
GitBranch holds the branch from where the binary is built.
GitCommit holds the latest git commit hash for this build.
GitVersion holds the tagged version belonging to the git commit.
# Structs
ClientConfig has CLI client settings.
DiagnosticResultMap is a DiagnosticResult that presents the given Items as a map, rather than a list.
GenericDiagnosticResult is a simple implementation of the DiagnosticResult interface.
Health is the result of a health check.
HTTPClientConfig contains settings for HTTP clients.
HttpError describes an error returned when invoking a remote server.
LandingPage is a Routable that exposes a landing page at the node's HTTP root (`/`).
MockConfigurable is a mock of Configurable interface.
MockConfigurableMockRecorder is the mock recorder for MockConfigurable.
MockDiagnosable is a mock of Diagnosable interface.
MockDiagnosableMockRecorder is the mock recorder for MockDiagnosable.
MockEchoRouter is a mock of EchoRouter interface.
MockEchoRouterMockRecorder is the mock recorder for MockEchoRouter.
MockEngine is a mock of Engine interface.
MockEngineMockRecorder is the mock recorder for MockEngine.
MockHealthCheckable is a mock of HealthCheckable interface.
MockHealthCheckableMockRecorder is the mock recorder for MockHealthCheckable.
MockInjectable is a mock of Injectable interface.
MockInjectableMockRecorder is the mock recorder for MockInjectable.
MockMigratable is a mock of Migratable interface.
MockMigratableMockRecorder is the mock recorder for MockMigratable.
MockNamed is a mock of Named interface.
MockNamedMockRecorder is the mock recorder for MockNamed.
MockRoutable is a mock of Routable interface.
MockRoutableMockRecorder is the mock recorder for MockRoutable.
MockRunnable is a mock of Runnable interface.
MockRunnableMockRecorder is the mock recorder for MockRunnable.
MockViewableDiagnostics is a mock of ViewableDiagnostics interface.
MockViewableDiagnosticsMockRecorder is the mock recorder for MockViewableDiagnostics.
Period is a convenience type for a dateTime range.
RFC3339Time is a time that marshals as RFC3339.
ServerConfig has global server settings.
System is the control structure where engines are registered.
No description provided by the author
TestEngineConfig defines the configuration for the test engine.
TestEngineSubConfig defines the `sub` configuration for the test engine.
TLSConfig specifies how TLS should be configured for connections.
TrustStore contains both a CertPool and the actual certificates.
# Interfaces
Configurable is the interface that contains the Configure method.
Diagnosable allows the implementer, mostly engines, to return diagnostics.
DiagnosticResult are the result of different checks giving information on how well the system is doing.
EchoRouter is the interface the generated server API's will require as the Routes func argument.
Engine is the base interface for a modular design.
ErrorStatusCodeResolver defines the API of a type that resolves an HTTP status code from a Go error.
ErrorWriter writes an error as response to the given context.
HealthCheckable is the interface for engines that can perform health checks, which result can be reported to monitoring tooling.
HTTPRequestDoer defines the Do method of the http.Client interface.
HTTPStatusCodeError defines an interface for HTTP errors that includes a HTTP statuscode.
Injectable marks an engine capable of Config injection.
Migratable is the interface that defines if an engine is migratable.
Named is the interface for all engines that have a name.
Routable enables connecting a REST API to the echo server.
Runnable is the interface that groups the Start and Shutdown methods.
ViewableDiagnostics is used for engines that display diagnostics in an interface.
# Type aliases
AuthorizationTokenGenerator is a function type definition for creating authorization tokens.
HealthStatus defines the result status of a health check.
TLSOffloadingMode defines configurable modes for TLS offloading.