mock

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeServicePubsub

type FakeServicePubsub struct {
	MockNotifyPatientFHIRIDUpdatefn  func(ctx context.Context, data dto.UpdatePatientFHIRID) error
	MockNotifyFacilityFHIRIDUpdatefn func(ctx context.Context, data dto.UpdateFacilityFHIRID) error
	MockNotifyProgramFHIRIDUpdatefn  func(ctx context.Context, data dto.UpdateProgramFHIRID) error
}

FakeServicePubsub ...

func NewPubSubServiceMock

func NewPubSubServiceMock() *FakeServicePubsub

NewPubSubServiceMock mocks the pubsub service implementation

func (*FakeServicePubsub) NotifyFacilityFHIRIDUpdate

func (f *FakeServicePubsub) NotifyFacilityFHIRIDUpdate(ctx context.Context, data dto.UpdateFacilityFHIRID) error

NotifyFacilityFHIRIDUpdate publishes to a topic. The idea is that after a mycarehub facility is created as an organization in FHIR, we should send back the ID to mycarehub and store in the database

func (*FakeServicePubsub) NotifyPatientFHIRIDUpdate

func (f *FakeServicePubsub) NotifyPatientFHIRIDUpdate(ctx context.Context, data dto.UpdatePatientFHIRID) error

NotifyPatientFHIRIDUpdate publishes to patient fhir id update topic. Mycarehub service will subscribe to this topic and update the patient's FHIR ID in it's database

func (*FakeServicePubsub) NotifyProgramFHIRIDUpdate

func (f *FakeServicePubsub) NotifyProgramFHIRIDUpdate(ctx context.Context, data dto.UpdateProgramFHIRID) error

NotifyProgramFHIRIDUpdate publishes to the program fhir id update topic

Jump to

Keyboard shortcuts

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