Git Product home page Git Product logo

Comments (7)

shenqidebaozi avatar shenqidebaozi commented on May 29, 2024 1

@FPNL https://go-kratos.dev/docs/intro/faq/#10%E5%A6%82%E4%BD%95%E6%8E%A7%E5%88%B6-http-%E8%BF%94%E5%9B%9E%E7%9A%84%E5%AD%97%E6%AE%B50%E5%80%BC%E5%BF%BD%E7%95%A5%E5%AD%97%E6%AE%B5%E5%92%8C%E4%BD%BF%E7%94%A8proto%E7%9A%84message%E5%AD%97%E6%AE%B5%E4%BD%9C%E4%B8%BAhttp%E7%9A%84%E8%BF%94%E5%9B%9E%E5%AD%97%E6%AE%B5

from kratos.

dosubot avatar dosubot commented on May 29, 2024

🤖

你好 @FPNL
我是 Dosu,一個可以幫助你解決問題、回答疑問並成為貢獻者的機器人。我在這裡為你提供幫助,直到人工維護者能與你聯繫。現在,讓我先看看你的問題,我將會盡快給你一個完整的答案。

from kratos.

kratos-ci-bot avatar kratos-ci-bot commented on May 29, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


🤖

Hello @FPNL,
I'm Dosu, a bot that helps you solve problems, answer questions, and become a contributor. I'm here to help you until a human maintainer can contact you. Now, let me look at your question first and I will give you a complete answer as soon as possible.

from kratos.

shenqidebaozi avatar shenqidebaozi commented on May 29, 2024

For a structure defined by protobuf, it will be asserted as proto Message, this is as expected. In addition, for protobuf, protojson is more commonly used as a serialization implementation because it implements protobuf JSON mapping
https://protobuf.dev/programming-guides/proto3/#json

from kratos.

FPNL avatar FPNL commented on May 29, 2024

For a structure defined by protobuf, it will be asserted as proto Message, this is as expected. In addition, for protobuf, protojson is more commonly used as a serialization implementation because it implements protobuf JSON mapping https://protobuf.dev/programming-guides/proto3/#json

Hi,

Do you mean to call the http.ResponseEncoder method to encode with protojson?

Because pb.RegisterVersionHTTPServer needs to implement the interface below, I must return a *pb.VersionReply struct.

Version(ctx context.Context, req *pb.VersionRequest) (*pb.VersionReply, error)

It seems there is no way to import a package in a proto file, or alter my syntax in version.proto. Could you please advise?

from kratos.

FPNL avatar FPNL commented on May 29, 2024

了解了,感謝你花時間回應

from kratos.

kratos-ci-bot avatar kratos-ci-bot commented on May 29, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Got it, thank you for taking the time to respond

from kratos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.