github.com/machinebox/remoto@v0.1.2-0.20191024144331-eff21a7d321f/generator/testdata/rpc/example/greeter.remoto.go (about) 1 // Package greeter is a sweet API that greets people. 2 package greeter 3 4 // Greeter provides greeting services. 5 type Greeter interface { 6 // Greet generates a greeting. 7 Greet(GreetRequest) GreetResponse 8 } 9 10 // GreetFormatter provides formattable greeting services. 11 type GreetFormatter interface { 12 // Greet generates a greeting. 13 Greet(GreetFormatRequest) GreetResponse 14 } 15 16 // GreetRequest is the request for Greeter.GreetRequest. 17 type GreetRequest struct { 18 // Name is the name of the person to greet. 19 Name string 20 } 21 22 // GreetResponse is the response for Greeter.GreetRequest. 23 type GreetResponse struct { 24 // Greeting is the personalized greeting. 25 Greeting string 26 } 27 28 // GreetFormatRequest is the request for Greeter.GreetRequest. 29 type GreetFormatRequest struct { 30 // Format is the GreetingFormat describing the format 31 // of the greetings. 32 Format GreetingFormat 33 // Names is one or more names of people to greet. 34 Names []string 35 } 36 37 // GreetingFormat describes the format of a greeting. 38 type GreetingFormat struct { 39 // Format is a Go-style format string describing the greeting. 40 // %s will be replaced with the name of the person. 41 Format string 42 // AllCaps is whether to convert the greeting to all caps. 43 AllCaps bool 44 }