Documentation ¶
Index ¶
- Constants
- func CreateCapabilityStatement(reldate time.Time, relversion, baseurl string) *fhirmodels.CapabilityStatement
- func CreateJobsBundle(jobs []*models.Job, host string) *fhirmodels.Bundle
- func CreateJobsBundleEntry(job *models.Job, host string) *fhirmodels.Bundle_Entry
- func CreateOpOutcome(severity fhircodes.IssueSeverityCode_Value, code fhircodes.IssueTypeCode_Value, ...) *fhirmodels.OperationOutcome
- func GetFhirStatusCode(status models.JobStatus) fhircodes.TaskStatusCode_Value
- func WriteBundleResponse(bundle *fhirmodels.Bundle, w http.ResponseWriter)
- func WriteCapabilityStatement(ctx context.Context, statement *fhirmodels.CapabilityStatement, ...)
- func WriteError(ctx context.Context, outcome *fhirmodels.OperationOutcome, ...)
- func WriteOperationOutcome(w io.Writer, outcome *fhirmodels.OperationOutcome) (int, error)
- type ResponseWriter
- func (r ResponseWriter) Exception(ctx context.Context, w http.ResponseWriter, statusCode int, ...)
- func (r ResponseWriter) JobsBundle(ctx context.Context, w http.ResponseWriter, jobs []*models.Job, host string)
- func (r ResponseWriter) NotFound(ctx context.Context, w http.ResponseWriter, statusCode int, ...)
Constants ¶
View Source
const ( TokenErr = "Invalid Token" ExpiredErr = "Expired Token" DbErr = "Database Error" FormatErr = "Formatting Error" BbErr = "Blue Button Error" InternalErr = "Internal Error" RequestErr = "Request Error" NotFoundErr = "Not Found Error" DeletedErr = "Deleted Error" )
Internal codes: These will be modified over time
View Source
const ( JobFailed = "Job Failed" DetailJobFailed = "Service encountered numerous errors. Job failed to complete." )
View Source
const (
UnknownEntityErr = "unknown entity"
)
External messaging: Messages that will be in response body
Variables ¶
This section is empty.
Functions ¶
func CreateCapabilityStatement ¶
func CreateCapabilityStatement(reldate time.Time, relversion, baseurl string) *fhirmodels.CapabilityStatement
func CreateJobsBundle ¶
func CreateJobsBundle(jobs []*models.Job, host string) *fhirmodels.Bundle
func CreateJobsBundleEntry ¶
func CreateJobsBundleEntry(job *models.Job, host string) *fhirmodels.Bundle_Entry
func CreateOpOutcome ¶
func CreateOpOutcome(severity fhircodes.IssueSeverityCode_Value, code fhircodes.IssueTypeCode_Value, errType, diagnostics string) *fhirmodels.OperationOutcome
func GetFhirStatusCode ¶
func GetFhirStatusCode(status models.JobStatus) fhircodes.TaskStatusCode_Value
func WriteBundleResponse ¶
func WriteBundleResponse(bundle *fhirmodels.Bundle, w http.ResponseWriter)
func WriteCapabilityStatement ¶
func WriteCapabilityStatement(ctx context.Context, statement *fhirmodels.CapabilityStatement, w http.ResponseWriter)
func WriteError ¶
func WriteError(ctx context.Context, outcome *fhirmodels.OperationOutcome, w http.ResponseWriter, code int)
func WriteOperationOutcome ¶
func WriteOperationOutcome(w io.Writer, outcome *fhirmodels.OperationOutcome) (int, error)
Types ¶
type ResponseWriter ¶
type ResponseWriter struct{}
func NewResponseWriter ¶
func NewResponseWriter() ResponseWriter
func (ResponseWriter) Exception ¶
func (r ResponseWriter) Exception(ctx context.Context, w http.ResponseWriter, statusCode int, errType, errMsg string)
func (ResponseWriter) JobsBundle ¶
func (r ResponseWriter) JobsBundle(ctx context.Context, w http.ResponseWriter, jobs []*models.Job, host string)
func (ResponseWriter) NotFound ¶
func (r ResponseWriter) NotFound(ctx context.Context, w http.ResponseWriter, statusCode int, errType, errMsg string)
Click to show internal directories.
Click to hide internal directories.