To import well-known types such as timestamp from google.golang.org/protobuf using Protobuf, you need to add the following line of code at the top of your protobuf file:
import "google/protobuf/timestamp.proto";
After that, you can use the timestamp type in your message definitions like this:
message MyMessage {
google.protobuf.Timestamp created_at = 1;
}
Note that you also need to import any other well-known types that you want to use in your protobuf file. For example, if you want to use the duration type, you need to add the following line of code:
import "google/protobuf/duration.proto";
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-06-18 11:00:00 +0000
Seen: 12 times
Last updated: Nov 05 '22
What is the process of creating a barplot that includes a threshold using matplotlib?
How can the theme settings be established in Vuetify3?
How can an undirected graph be created in Gephi?
The size of the plot returned by df.hist() is not the desired one.
Is there a way to streamline my imports in SvelteKit with Vite bundler, such as utilizing $lib/?
How can I get my existing bot to function with my slash command using Discord.Py?
What does it mean when tsm import encounters an 'Internal error processing applyMigrations' error?
Why does the import of a dependency fail in a Node.js script when running inside a Docker container?
What is the method to discard a missing value in Filehelpers?