github.com/yoogoc/kratos-scaffold@v0.0.0-20240402032722-a538b3c18955/project_generator/resources/conf.proto.example (about) 1 syntax = "proto3"; 2 package kratos.api; 3 4 option go_package = "internal/conf;conf"; 5 6 import "google/protobuf/duration.proto"; 7 8 message Bootstrap { 9 Trace trace = 1; 10 Server server = 2; 11 Data data = 3; 12 Log log = 4; 13 } 14 15 message Trace { 16 string endpoint = 1; 17 } 18 19 message Server { 20 message HTTP { 21 string network = 1; 22 string addr = 2; 23 google.protobuf.Duration timeout = 3; 24 } 25 message GRPC { 26 string network = 1; 27 string addr = 2; 28 google.protobuf.Duration timeout = 3; 29 } 30 HTTP http = 1; 31 GRPC grpc = 2; 32 } 33 34 message Data { 35 message Database { 36 string driver = 1; 37 string source = 2; 38 bool ent_debug = 3; 39 } 40 message Redis { 41 string network = 1; 42 string addr = 2; 43 google.protobuf.Duration read_timeout = 3; 44 google.protobuf.Duration write_timeout = 4; 45 } 46 Database database = 1; 47 } 48 49 message Log { 50 string type = 1; 51 string level = 2; 52 }