Documentation
¶
Overview ¶
Package webhandlers can be used in a web-based application for issuing SMART Health Card QR codes for COVID-19 immunizations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶ added in v2.0.1
type Handlers struct {
// contains filtered or unexported fields
}
Handlers should not be instantiated directly; use the New function in this package instead.
func New ¶
func New(key *ecdsa.PrivateKey, issuer string) Handlers
New returns an object with methods that can be used in a web-based application for issuing SMART Health Card QR codes for COVID-19 immunizations.
func (Handlers) JWKSJSON ¶ added in v2.0.1
JWKSJSON writes the JSON representation of the JSON Web Key Set representation of the public information of the associated private key.
If there is an error, this methods returns the HTTP response code, an additional error message if available, and false. If there is no error, it returns 0, the empty string, and true.
func (Handlers) ProcessForm ¶ added in v2.0.1
ProcessForm expects the request to provide form data representing a patient and his or her COVID-19 immunizations. This method extracts the form values from the request, constructs an FHIR bundle from the form data, creates and signs a JSON Web Signature encapsulating that data, and either writes a PNG image of a single QR code representing a SMART Health Card with the immunziation data, or a ZIP archive consisting of multiple PNGs of QR codes which can be combined into a single SMART Health Card with the immunization data.
If there is an error, this methods returns the HTTP response code, an additional error message if available, and false. If there is no error, it returns 0, the empty string, and true.