mapper

package
v0.3.0-20261109205536-... Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 QueuesToProto

func QueuesToProto(queues []entity.QueueConfig) []*pb.Queue

func RequestHistoriesToProto

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

RequestHistoriesToProto maps grouped retained histories to the wire representation.

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