This repository has been archived by the owner on Sep 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
杜興怡
committed
Dec 21, 2018
1 parent
97a1541
commit 33d2fd9
Showing
5 changed files
with
128 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
defmodule Fhirbuffer.Search do | ||
@moduledoc false | ||
use Protobuf, syntax: :proto3 | ||
|
||
@type t :: %__MODULE__{ | ||
id: String.t(), | ||
type: String.t() | ||
} | ||
defstruct [:id, :type] | ||
|
||
field :id, 1, type: :string | ||
field :type, 2, type: :string | ||
end | ||
|
||
defmodule Fhirbuffer.Record do | ||
@moduledoc false | ||
use Protobuf, syntax: :proto3 | ||
|
||
@type t :: %__MODULE__{ | ||
resource: String.t() | ||
} | ||
defstruct [:resource] | ||
|
||
field :resource, 1, type: :bytes | ||
end | ||
|
||
defmodule Fhirbuffer.Fhirbuffer.Service do | ||
@moduledoc false | ||
use GRPC.Service, name: "fhirbuffer.Fhirbuffer" | ||
|
||
rpc :Read, Fhirbuffer.Search, Fhirbuffer.Record | ||
end | ||
|
||
defmodule Fhirbuffer.Fhirbuffer.Stub do | ||
@moduledoc false | ||
use GRPC.Stub, service: Fhirbuffer.Fhirbuffer.Service | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Protocol buffer description for a FHIR persistence tier service | ||
|
||
syntax = "proto3"; | ||
|
||
package fhirbuffer; | ||
|
||
// Interface exported by the server. | ||
service Fhirbuffer { | ||
|
||
// Obtains the healthcare resource that matches the search criteria. | ||
rpc Read(Search) returns (Record) {} | ||
|
||
} | ||
|
||
// A search criteria to request the healthcare resource. | ||
message Search { | ||
// A ID is the UUID of the record | ||
string id = 1; | ||
|
||
// The resource type | ||
string type = 2; | ||
} | ||
|
||
// A healthcare resource returned from the data store. | ||
message Record { | ||
//// string id = 1; | ||
//// string resource_type = 2; | ||
//// string status = 3; | ||
|
||
bytes resource = 1; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
module github.com/patterns/fhircomb | ||
module github.com/patterns/fhirbuffer | ||
|
||
require ( | ||
github.com/golang/protobuf v1.2.0 | ||
github.com/jackc/pgx v3.3.0+incompatible // indirect | ||
github.com/pkg/errors v0.8.0 // indirect | ||
google.golang.org/grpc v1.17.0 // indirect | ||
google.golang.org/grpc v1.17.0 | ||
) |