Skip to content

Instantly share code, notes, and snippets.

@leandrodaher
Forked from argentinaluiz/product.proto
Created October 19, 2023 17:14
Show Gist options
  • Save leandrodaher/e477197f232cdfa97dc1210e26cea618 to your computer and use it in GitHub Desktop.
Save leandrodaher/e477197f232cdfa97dc1210e26cea618 to your computer and use it in GitHub Desktop.
Protofile do desafio da Imersão Full Cycle
syntax = "proto3";
package github.com.codeedu.codepix;
option go_package = "protofiles/pb";
service ProductService {
rpc CreateProduct (CreateProductRequest) returns (CreateProductResponse) {};
rpc FindProducts(FindProductsRequest) returns (FindProductsResponse) {};
}
message CreateProductRequest {
string name = 1;
string description = 2;
float price = 3;
}
message Product {
int32 id = 1;
string name = 2;
string description = 3;
float price = 4;
}
message CreateProductResponse {
Product product = 1;
}
message FindProductsRequest{
}
message FindProductsResponse{
repeated Product products = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment