mapper

package
v0.3.0-20260814204056-... Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 7 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, request_summary.go and cancel.go); translation lives here so controllers stay proto-free.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HistoryEventsToProto

func HistoryEventsToProto(logs []entity.RequestLog) []*pb.HistoryEvent

HistoryEventsToProto maps retained request-log events to wire history events.

Status and Event are mutually exclusive, mirroring the entry itself: a client reading the timeline can render a position and an occurrence differently without having to know which values belong to which vocabulary.

func ListResultToProto

func ListResultToProto(result entity.ListResult) *pb.ListResponse

ListResultToProto maps the domain result to the wire response.

func ProtoToCancelRequest

func ProtoToCancelRequest(req *pb.CancelRequest) entity.CancelRequest

ProtoToCancelRequest maps the wire CancelRequest to the entity.CancelRequest the controller operates on.

func ProtoToGetRequestHistoryByChangeURIRequest

func ProtoToGetRequestHistoryByChangeURIRequest(req *pb.GetRequestHistoryByChangeURIRequest) entity.GetRequestHistoryByChangeURIRequest

ProtoToGetRequestHistoryByChangeURIRequest maps the wire request to the entity request the controller operates on.

func ProtoToGetRequestHistoryByIDRequest

func ProtoToGetRequestHistoryByIDRequest(req *pb.GetRequestHistoryByIDRequest) entity.GetRequestHistoryByIDRequest

ProtoToGetRequestHistoryByIDRequest maps the wire request to the entity request the controller operates on.

func ProtoToGetRequestSummaryByChangeURIRequest

func ProtoToGetRequestSummaryByChangeURIRequest(req *pb.GetRequestSummaryByChangeURIRequest) entity.GetRequestSummaryByChangeURIRequest

ProtoToGetRequestSummaryByChangeURIRequest maps the wire request to the entity request the controller operates on.

func ProtoToGetRequestSummaryByIDRequest

func ProtoToGetRequestSummaryByIDRequest(req *pb.GetRequestSummaryByIDRequest) entity.GetRequestSummaryByIDRequest

ProtoToGetRequestSummaryByIDRequest maps the wire request to the entity request 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 ProtoToListRequest

func ProtoToListRequest(req *pb.ListRequest) entity.ListRequest

ProtoToListRequest maps the wire request to the entity request the controller operates on.

func RequestHistoriesToProto

func RequestHistoriesToProto(histories []entity.RequestHistory) []*pb.RequestHistory

RequestHistoriesToProto maps grouped retained histories to the wire representation.

func RequestQueueSummaryToProto

func RequestQueueSummaryToProto(summary entity.RequestQueueSummary) *pb.RequestSummary

RequestQueueSummaryToProto maps a queue projection to the wire request summary.

func RequestSummariesToProto

func RequestSummariesToProto(summaries []entity.RequestSummary) []*pb.RequestSummary

RequestSummariesToProto maps domain request summaries to wire request summaries.

func RequestSummaryToProto

func RequestSummaryToProto(summary entity.RequestSummary) *pb.RequestSummary

RequestSummaryToProto maps a domain request summary to the wire request summary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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