Documentation
¶
Overview ¶
Package mapper translates gateway wire (proto) types to and from the domain entities the controllers operate on. Each RPC gets its own file (land.go, status.go, cancel.go, …); translation lives here so controllers stay proto-free.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentStateToProto ¶
func CurrentStateToProto(state request.CurrentState) *pb.StatusResponse
CurrentStateToProto maps the domain read model to the wire StatusResponse.
func ProtoToCancelRequest ¶
func ProtoToCancelRequest(req *pb.CancelRequest) entity.CancelRequest
ProtoToCancelRequest maps the wire CancelRequest to the entity.CancelRequest the controller operates on.
func ProtoToLandRequest ¶
func ProtoToLandRequest(req *pb.LandRequest) (entity.LandRequest, error)
ProtoToLandRequest maps the wire LandRequest to the entity.LandRequest the controller operates on. The ID is left empty; the controller assigns it.
func ProtoToStatusRequest ¶
func ProtoToStatusRequest(req *pb.StatusRequest) entity.StatusRequest
ProtoToStatusRequest maps the wire StatusRequest to the entity.StatusRequest the controller operates on.
Types ¶
This section is empty.