Documentation
¶
Overview ¶
Package cdr provides support for HSDP CDR services
Index ¶
- Constants
- Variables
- type Client
- type Config
- type OperationsR4Service
- func (o *OperationsR4Service) Delete(resourceID string, options ...OptionFunc) (bool, *Response, error)
- func (o *OperationsR4Service) Get(resourceID string, options ...OptionFunc) (*r4pb.ContainedResource, *Response, error)
- func (o *OperationsR4Service) Patch(resourceID string, jsonPatch []byte, options ...OptionFunc) (*r4pb.ContainedResource, *Response, error)
- func (o *OperationsR4Service) Post(resourceID string, jsonBody []byte, options ...OptionFunc) (*r4pb.ContainedResource, *Response, error)
- func (o *OperationsR4Service) Put(resourceID string, jsonBody []byte, options ...OptionFunc) (*r4pb.ContainedResource, *Response, error)
- 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 TenantR4Service
- type TenantSTU3Service
Constants ¶
const (
APIVersion = "1"
)
Variables ¶
var ( ErrCDRURLCannotBeEmpty = errors.New("base CDR URL cannot be empty") ErrEmptyResult = errors.New("empty result") ErrMissingAcceptHeader = errors.New("missing accept header") )
Errors
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // User agent used when communicating with the HSDP CDR API UserAgent string TenantSTU3 *TenantSTU3Service OperationsSTU3 *OperationsSTU3Service TenantR4 *TenantR4Service OperationsR4 *OperationsR4Service // 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.
func (*Client) TokenRefresh ¶ added in v0.41.1
TokenRefresh forces a refresh of the IAM access token
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 OperationsR4Service ¶ added in v0.45.0
type OperationsR4Service struct {
// contains filtered or unexported fields
}
func (*OperationsR4Service) Delete ¶ added in v0.45.0
func (o *OperationsR4Service) Delete(resourceID string, options ...OptionFunc) (bool, *Response, error)
Delete removes a FHIR resource
func (*OperationsR4Service) Get ¶ added in v0.45.0
func (o *OperationsR4Service) Get(resourceID string, options ...OptionFunc) (*r4pb.ContainedResource, *Response, error)
Get returns a FHIR resource
func (*OperationsR4Service) Patch ¶ added in v0.45.0
func (o *OperationsR4Service) Patch(resourceID string, jsonPatch []byte, options ...OptionFunc) (*r4pb.ContainedResource, *Response, error)
Patch makes changes to a FHIR resources accepting the JSONPatch format set
func (*OperationsR4Service) Post ¶ added in v0.45.0
func (o *OperationsR4Service) Post(resourceID string, jsonBody []byte, options ...OptionFunc) (*r4pb.ContainedResource, *Response, error)
Post creates new FHIR resources
func (*OperationsR4Service) Put ¶ added in v0.45.0
func (o *OperationsR4Service) Put(resourceID string, jsonBody []byte, options ...OptionFunc) (*r4pb.ContainedResource, *Response, error)
Put creates or updates new FHIR resources
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 TenantR4Service ¶ added in v0.45.0
type TenantR4Service struct {
// contains filtered or unexported fields
}
func (*TenantR4Service) GetOrganizationByID ¶ added in v0.45.0
func (t *TenantR4Service) GetOrganizationByID(orgID string) (*r4pb.Organization, *Response, error)
func (*TenantR4Service) Onboard ¶ added in v0.45.0
func (t *TenantR4Service) Onboard(organization *r4pb.Organization, options ...OptionFunc) (*r4pb.Organization, *Response, error)
Onboard onboards the organization on the CDR under the rootOrgID
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