Documentation
¶
Overview ¶
Package cdr provides support for HSDP CDR services
Index ¶
- Constants
- Variables
- type Client
- type Config
- type OperationsSTU3Service
- func (o *OperationsSTU3Service) Delete(resourceID string, options ...OptionFunc) (bool, *Response, error)
- func (o *OperationsSTU3Service) Get(resourceID string, options ...OptionFunc) (*stu3pb.ContainedResource, *Response, error)
- func (o *OperationsSTU3Service) Patch(resourceID string, jsonPatch []byte, options ...OptionFunc) (*stu3pb.ContainedResource, *Response, error)
- func (o *OperationsSTU3Service) Post(resourceID string, jsonBody []byte, options ...OptionFunc) (*stu3pb.ContainedResource, *Response, error)
- func (o *OperationsSTU3Service) Put(resourceID string, jsonBody []byte, options ...OptionFunc) (*stu3pb.ContainedResource, *Response, error)
- type OptionFunc
- type Response
- type TenantSTU3Service
Constants ¶
const (
APIVersion = "1"
)
Variables ¶
var ( ErrCDRURLCannotBeEmpty = errors.New("base CDR URL cannot be empty") ErrEmptyResult = errors.New("empty result") ErrCouldNoReadResourceAfterCreate = errors.New("could not read resource after create") ErrNotImplementedYet = errors.New("not implemented yet") ErrNonHttp20xResponse = errors.New("non http 20x CDR response") )
Errors
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // User agent used when communicating with the HSDP IAM API. UserAgent string TenantSTU3 *TenantSTU3Service OperationsSTU3 *OperationsSTU3Service // contains filtered or unexported fields }
A Client manages communication with HSDP CDR API
func NewClient ¶
NewClient returns a new HSDP CDR API client. Configured console and IAM clients must be provided as the underlying API requires tokens from respective services
func (*Client) GetEndpointURL ¶ added in v0.28.0
GetEndpointURL returns the FHIR Store Endpoint URL as configured
func (*Client) GetFHIRStoreURL ¶ added in v0.27.1
GetFHIRStoreURL returns the base FHIR Store base URL as configured
func (*Client) SetEndpointURL ¶ added in v0.28.0
SetEndpointURL sets the FHIR endpoint URL for API requests to a custom endpoint. urlStr should always be specified with a trailing slash.
func (*Client) SetFHIRStoreURL ¶
SetFHIRStoreURL sets the FHIR store URL for API requests to a custom endpoint. urlStr should always be specified with a trailing slash.
type Config ¶
type Config struct { Region string Environment string RootOrgID string CDRURL string FHIRStore string Type string TimeZone string DebugLog string }
Config contains the configuration of a client
type OperationsSTU3Service ¶
type OperationsSTU3Service struct {
// contains filtered or unexported fields
}
func (*OperationsSTU3Service) Delete ¶ added in v0.27.1
func (o *OperationsSTU3Service) Delete(resourceID string, options ...OptionFunc) (bool, *Response, error)
Delete removes a FHIR resource
func (*OperationsSTU3Service) Get ¶ added in v0.27.1
func (o *OperationsSTU3Service) Get(resourceID string, options ...OptionFunc) (*stu3pb.ContainedResource, *Response, error)
Get returns a FHIR resource
func (*OperationsSTU3Service) Patch ¶
func (o *OperationsSTU3Service) Patch(resourceID string, jsonPatch []byte, options ...OptionFunc) (*stu3pb.ContainedResource, *Response, error)
Patch makes changes to a FHIR resources accepting the JSONPatch format set
func (*OperationsSTU3Service) Post ¶
func (o *OperationsSTU3Service) Post(resourceID string, jsonBody []byte, options ...OptionFunc) (*stu3pb.ContainedResource, *Response, error)
Post creates new FHIR resources
func (*OperationsSTU3Service) Put ¶ added in v0.27.1
func (o *OperationsSTU3Service) Put(resourceID string, jsonBody []byte, options ...OptionFunc) (*stu3pb.ContainedResource, *Response, error)
Put creates or updates new FHIR resources
type OptionFunc ¶
OptionFunc is the function signature function for options
type Response ¶
Response is a HSDP IAM API response. This wraps the standard http.Response returned from HSDP IAM and provides convenient access to things like errors
type TenantSTU3Service ¶
type TenantSTU3Service struct {
// contains filtered or unexported fields
}
func (*TenantSTU3Service) GetOrganizationByID ¶
func (t *TenantSTU3Service) GetOrganizationByID(orgID string) (*stu3pb.Organization, *Response, error)
func (*TenantSTU3Service) Onboard ¶
func (t *TenantSTU3Service) Onboard(organization *stu3pb.Organization, options ...OptionFunc) (*stu3pb.Organization, *Response, error)
Onboard onboards the organization on the CDR under the rootOrgID