-
Notifications
You must be signed in to change notification settings - Fork 1
/
giraffe_service.giraffe.pb.go
90 lines (77 loc) · 2.66 KB
/
giraffe_service.giraffe.pb.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: giraffe_service.proto
package alert_rule
import (
context "context"
fmt "fmt"
giraffe_micro "github.com/easyops-cn/giraffe-micro"
go_proto_giraffe "github.com/easyops-cn/go-proto-giraffe"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
io "io"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Reference imports to suppress errors if they are not otherwise used.
var _ = io.EOF
var _ context.Context
var _ giraffe_micro.Client
var _ go_proto_giraffe.Contract
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = giraffe_micro.SupportPackageIsVersion4 // please upgrade the giraffe_micro package
// Client is the client API for alert_rule service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type Client interface {
GetAllAlertRuleList(ctx context.Context, in *types.Empty) (*GetAllAlertRuleListResponse, error)
}
type client struct {
c giraffe_micro.Client
}
func NewClient(c giraffe_micro.Client) Client {
return &client{
c: c,
}
}
func (c *client) GetAllAlertRuleList(ctx context.Context, in *types.Empty) (*GetAllAlertRuleListResponse, error) {
out := new(GetAllAlertRuleListResponse)
err := c.c.Invoke(ctx, _GetAllAlertRuleListMethodDesc, in, out)
if err != nil {
return nil, err
}
return out, nil
}
// Service is the server API for alert_rule service.
type Service interface {
GetAllAlertRuleList(context.Context, *types.Empty) (*GetAllAlertRuleListResponse, error)
}
func _GetAllAlertRuleListEndpoint(s Service) giraffe_micro.UnaryEndpoint {
return func(ctx context.Context, req interface{}) (interface{}, error) {
return s.GetAllAlertRuleList(ctx, req.(*types.Empty))
}
}
func RegisterService(s giraffe_micro.Server, srv Service) {
s.RegisterUnaryEndpoint(_GetAllAlertRuleListMethodDesc, _GetAllAlertRuleListEndpoint(srv))
}
// Method Description
var _GetAllAlertRuleListMethodDesc = &giraffe_micro.MethodDesc{
Contract: &go_proto_giraffe.Contract{
Name: "easyops.api.monitor_metadata.alert_rule.GetAllAlertRuleList",
Version: "1.0",
},
ServiceName: "alert_rule.rpc",
MethodName: "GetAllAlertRuleList",
RequestType: (*types.Empty)(nil),
ResponseType: (*GetAllAlertRuleListResponse)(nil),
HttpRule: &go_proto_giraffe.HttpRule{
Pattern: &go_proto_giraffe.HttpRule_Get{
Get: "/api/alert_manager/alert_rule_all",
},
Body: "",
ResponseBody: "",
},
}