Documentation
¶
Overview ¶
Package logging provides support for HSDP Logging services
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present.
Types ¶
type Bundle ¶
type Bundle struct { ResourceType string `json:"resourceType"` Type string `json:"type"` Total int `json:"total"` ProductKey string `json:"productKey,omitempty"` Entry []Element `json:"entry"` }
Bundle is a FHIR bundle resource There is just enough there to create the logging payload
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds the client state
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.
type CustomIndexBody ¶ added in v0.6.0
type CustomIndexBody []struct { Fieldname string `json:"fieldname"` Fieldtype string `json:"fieldtype"` }
CustomIndexBody describes the custom index request payload
type Element ¶
type Element struct {
Resource Resource `json:"resource"`
}
Element is a FHIR element resource
type ErrorResponse ¶
ErrorResponse holds an error response from the server
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type LogData ¶
type LogData struct {
Message string `json:"message"`
}
LogData is the payload of a log message
type Resource ¶
type Resource struct { ResourceType string `json:"resourceType"` // LogEvent ID string `json:"id"` // 7f4c85a8-e472-479f-b772-2916353d02a4 ApplicationName string `json:"applicationName"` // OPS EventID string `json:"eventId"` // 110114 Category string `json:"category"` // TRACELOG Component string `json:"component"` // "TEST" TransactionID string `json:"transactionId"` // 2abd7355-cbdd-43e1-b32a-43ec19cd98f0 ServiceName string `json:"serviceName"` // OPS ApplicationInstance string `json:"applicationInstance"` // INST-00002 ApplicationVersion string `json:"applicationVersion"` // 1.0.0 OriginatingUser string `json:"originatingUser"` // SomeUser ServerName string `json:"serverName"` // app.example.com LogTime string `json:"logTime"` // 2017-01-31T08:00:00Z Severity string `json:"severity"` // INFO LogData LogData `json:"logData"` // Log data Custom json.RawMessage `json:"custom,omitempty"` // Custom log fields }
Resource is a logging resource