api

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package api provides primitives to interact the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

Types

type ConsentRecord

type ConsentRecord struct {
	ConsentProof DocumentReference    `json:"consentProof"`
	DataClass    []DataClassification `json:"dataClass"`
	Period       Period               `json:"period"`

	// Optional parameter. If provided, the previous consentRecord will be replaced by this new ConsentRecord. This is the computed hash of the fhir record.
	PreviousRecordHash *string `json:"previousRecordHash,omitempty"`
}

ConsentRecord defines model for ConsentRecord.

type CreateConsentRequest

type CreateConsentRequest struct {

	// URI identitying an entity (organization or person). Can either be a: - Performer: The person who administers the consent (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000007) - Actor: Usually a practitioner (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000007) - Custodian: Usually the custodian or actor (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000000) - Subject: Usually the patient (e.g.: urn:oid:2.16.840.1.113883.2.4.6.3:999999990)
	Actor IdentifierURI `json:"actor"`

	// URI identitying an entity (organization or person). Can either be a: - Performer: The person who administers the consent (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000007) - Actor: Usually a practitioner (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000007) - Custodian: Usually the custodian or actor (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000000) - Subject: Usually the patient (e.g.: urn:oid:2.16.840.1.113883.2.4.6.3:999999990)
	Custodian IdentifierURI `json:"custodian"`

	// URI identitying an entity (organization or person). Can either be a: - Performer: The person who administers the consent (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000007) - Actor: Usually a practitioner (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000007) - Custodian: Usually the custodian or actor (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000000) - Subject: Usually the patient (e.g.: urn:oid:2.16.840.1.113883.2.4.6.3:999999990)
	Performer *IdentifierURI  `json:"performer,omitempty"`
	Records   []ConsentRecord `json:"records"`

	// URI identitying an entity (organization or person). Can either be a: - Performer: The person who administers the consent (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000007) - Actor: Usually a practitioner (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000007) - Custodian: Usually the custodian or actor (e.g.: urn:oid:2.16.840.1.113883.2.4.6.1:00000000) - Subject: Usually the patient (e.g.: urn:oid:2.16.840.1.113883.2.4.6.3:999999990)
	Subject IdentifierURI `json:"subject"`
}

CreateConsentRequest defines model for CreateConsentRequest.

type CreateOrUpdateConsentJSONBody added in v0.14.0

type CreateOrUpdateConsentJSONBody CreateConsentRequest

CreateOrUpdateConsentJSONBody defines parameters for CreateOrUpdateConsent.

type CreateOrUpdateConsentJSONRequestBody

type CreateOrUpdateConsentJSONRequestBody CreateOrUpdateConsentJSONBody

CreateOrUpdateConsentRequestBody defines body for CreateOrUpdateConsent for application/json ContentType.

type DataClassification

type DataClassification string

DataClassification defines model for DataClassification.

type DocumentReference

type DocumentReference struct {

	// unique identifier useable for retrieving the proof when contacting the care provider (technical or on paper)
	ID string `json:"ID"`

	// location where the proof document can be found, should accept Nuts based authentication
	URL         *string `json:"URL,omitempty"`
	ContentType *string `json:"contentType,omitempty"`

	// base64 encoded sha256 of the document
	Hash *string `json:"hash,omitempty"`

	// human readable identifier for consent proof, eg: document name
	Title string `json:"title"`
}

DocumentReference defines model for DocumentReference.

type EchoRouter added in v0.15.0

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type IdentifierURI

type IdentifierURI string

IdentifierURI defines model for IdentifierURI.

func (IdentifierURI) PartyID added in v0.15.0

func (i IdentifierURI) PartyID() core.PartyID

func (*IdentifierURI) UnmarshalJSON added in v0.15.0

func (i *IdentifierURI) UnmarshalJSON(bytes []byte) error

type JobCreatedResponse

type JobCreatedResponse struct {
	JobId      *string `json:"jobId,omitempty"`
	ResultCode string  `json:"resultCode"`
}

JobCreatedResponse defines model for JobCreatedResponse.

type Period

type Period struct {
	End   *time.Time `json:"end,omitempty"`
	Start time.Time  `json:"start"`
}

Period defines model for Period.

type ServerInterface

type ServerInterface interface {
	// Create or update a new consent.
	// (POST /api/consent)
	CreateOrUpdateConsent(ctx echo.Context) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateOrUpdateConsent

func (w *ServerInterfaceWrapper) CreateOrUpdateConsent(ctx echo.Context) error

CreateOrUpdateConsent converts echo context to params.

type Wrapper

type Wrapper struct {
	Cl *pkg.ConsentLogic
}

Wrapper provides the implementation of the generated ServerInterface

func (Wrapper) CreateOrUpdateConsent

func (wrapper Wrapper) CreateOrUpdateConsent(ctx echo.Context) error

NutsConsentLogicCreateConsent Creates the consent FHIR resource, validate it and sends it to the consent-bridge.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL