mirror of
https://github.com/foomo/gotsrpc.git
synced 2026-04-28 08:34:31 +00:00
33 lines
522 B
Go
33 lines
522 B
Go
package server
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Handler struct{}
|
|
|
|
func (h *Handler) GetFirstName(_ context.Context) string {
|
|
return "John"
|
|
}
|
|
|
|
func (h *Handler) GetMiddleName(_ context.Context) string {
|
|
return "Michael"
|
|
}
|
|
|
|
func (h *Handler) GetAge(_ context.Context) int {
|
|
return 30
|
|
}
|
|
|
|
func (h *Handler) GetLastName(_ context.Context) string {
|
|
return "Doe"
|
|
}
|
|
|
|
func (h *Handler) GetPerson(_ context.Context) Person {
|
|
return Person{
|
|
FirstName: "John",
|
|
MiddleName: "Michael",
|
|
LastName: "Doe",
|
|
Age: 30,
|
|
}
|
|
}
|