Skip to main content

请问那些用 protobuf 的后端是怎么优雅处理 domain 和 protobuf, db 层之间的数据转换的如题,鄙人前端,后端技术栈是 Go+Protobuf ,感觉经常类似的数据结构需要在 protobuf ,domain 和 db 层定义三遍,还得写 a 转 b ,b 转 a ,b 转 c ,c 转 b 的函数,如果复杂结构还得多层遍历,大家也是同样的做法吗via V2EX - 技术 (author: zhengfan2016)

  1. 请问那些用 protobuf 的后端是怎么优雅处理 domain 和 protobuf, db 层之间的数据转换的

    如题,鄙人前端,后端技术栈是 Go+Protobuf ,感觉经常类似的数据结构需要在 protobuf ,domain 和 db 层定义三遍,还得写 a 转 b ,b 转 a ,b 转 c ,c 转 b 的函数,如果复杂结构还得多层遍历,大家也是同样的做法吗

    via V2EX - 技术 (author: zhengfan2016)
👀 open eyes to see the world. 丨 site views: -