github.com/lastbackend/toolkit@v0.0.0-20241020043710-cafa37b95aad/examples/service/apis/ptypes/messages.proto (about) 1 syntax = "proto3"; 2 3 package lastbackend.example; 4 5 option go_package = "github.com/lastbackend/toolkit/examples/service/gen/ptypes;typespb"; 6 7 import "validate/validate.proto"; 8 9 10 // ============================================================================ 11 // Request ==================================================================== 12 // ============================================================================ 13 14 message HelloWorldRequest { 15 string name = 1 [(validate.rules).string.min_len = 1]; 16 string type = 2 [(validate.rules).string.max_len = 1024]; 17 map<string, string> data = 3 [(validate.rules).map.min_pairs = 1]; 18 } 19 20 // ============================================================================ 21 // Response =================================================================== 22 // ============================================================================ 23 24 message HelloWorldResponse { 25 string id = 1; 26 string name = 2; 27 string type = 3; 28 map<string, string> data = 4; 29 int64 created_at = 5; 30 int64 updated_at = 6; 31 }