Skip to content
This repository has been archived by the owner on Sep 20, 2020. It is now read-only.

Commit

Permalink
Change name to fhirbuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
杜興怡 committed Dec 21, 2018
1 parent 97a1541 commit 33d2fd9
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 91 deletions.
37 changes: 37 additions & 0 deletions fhirbuffer.pb.ex
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
115 changes: 57 additions & 58 deletions fhircomb.pb.go → fhirbuffer.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions fhirbuffer.proto
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;
}
31 changes: 0 additions & 31 deletions fhircomb.proto

This file was deleted.

5 changes: 3 additions & 2 deletions go.mod
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
)

0 comments on commit 33d2fd9

Please sign in to comment.