api

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS      = "success"
	CLIENT_ERROR = "client error"
	SERVER_ERROR = "server error"
	PANIC_ERROR  = "panic recovered"
)

Variables

This section is empty.

Functions

func HandleByMsgType

func HandleByMsgType(db *database.Queries, data []byte) (string, int, error)

func New

func New(db *database.Queries, client HealthcareClient, debugMode bool) http.Handler

func NewLogMsg

func NewLogMsg() *logMsg

func NewPubSubMessage

func NewPubSubMessage(body io.Reader) (*pubSubMessage, error)

func UpsertORM added in v0.6.0

func UpsertORM(ctx context.Context, db *database.Queries, d *hl7.Decoder) (res string, code int, err error)

func UpsertORU added in v0.6.0

func UpsertORU(ctx context.Context, db *database.Queries, d *hl7.Decoder) (res string, code int, err error)

Types

type API

type API struct {
	DB     *database.Queries
	Client HealthcareClient
	// contains filtered or unexported fields
}

type DB

type DB struct {
	*database.Queries
}

func NewDB

func NewDB(db *pgxpool.Pool) DB

type HealthcareClient

type HealthcareClient interface {
	GetHL7V2Message(string) ([]byte, error)
}

type Hl7Client

type Hl7Client healthcare.Service

func NewHl7Client

func NewHl7Client(ctx context.Context, opts ...option.ClientOption) (*Hl7Client, error)

func (*Hl7Client) GetHL7V2Message

func (h *Hl7Client) GetHL7V2Message(messagePath string) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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