mapper

package
v0.3.0-20260715205212-... Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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.

Jump to

Keyboard shortcuts

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