forked from src-d/proteus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.proteus.go
50 lines (47 loc) · 1.66 KB
/
server.proteus.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package example
import (
xcontext "golang.org/x/net/context"
"gopkg.in/src-d/proteus.v1/example/categories"
)
type exampleServiceServer struct {
}
func NewExampleServiceServer() *exampleServiceServer {
return &exampleServiceServer{}
}
func (s *exampleServiceServer) GetAlphaTime(ctx xcontext.Context, in *GetAlphaTimeRequest) (result *MyTime, err error) {
result = new(MyTime)
aux := GetAlphaTime()
result = &aux
return
}
func (s *exampleServiceServer) GetDurationForLength(ctx xcontext.Context, in *GetDurationForLengthRequest) (result *MyDuration, err error) {
result = new(MyDuration)
result = GetDurationForLength(in.Arg1)
return
}
func (s *exampleServiceServer) GetDurationForLengthCtx(ctx xcontext.Context, in *GetDurationForLengthCtxRequest) (result *MyDuration, err error) {
result = new(MyDuration)
result, err = GetDurationForLengthCtx(ctx, in.Arg1)
return
}
func (s *exampleServiceServer) GetOmegaTime(ctx xcontext.Context, in *GetOmegaTimeRequest) (result *MyTime, err error) {
result = new(MyTime)
result, err = GetOmegaTime()
return
}
func (s *exampleServiceServer) GetPhone(ctx xcontext.Context, in *GetPhoneRequest) (result *Product, err error) {
result = new(Product)
result = GetPhone()
return
}
func (s *exampleServiceServer) RandomCategory(ctx xcontext.Context, in *RandomCategoryRequest) (result *categories.CategoryOptions, err error) {
result = new(categories.CategoryOptions)
aux := RandomCategory()
result = &aux
return
}
func (s *exampleServiceServer) RandomNumber(ctx xcontext.Context, in *RandomNumberRequest) (result *RandomNumberResponse, err error) {
result = new(RandomNumberResponse)
result.Result1 = RandomNumber(in.Arg1, in.Arg2)
return
}