/
giraffe_service.giraffe.pb.go
89 lines (76 loc) · 2.71 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
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: giraffe_service.proto
package instance_archive
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"
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 instance_archive 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 {
ListArchiveInstance(ctx context.Context, in *ListArchiveInstanceRequest) (*ListArchiveInstanceResponse, error)
}
type client struct {
c giraffe_micro.Client
}
func NewClient(c giraffe_micro.Client) Client {
return &client{
c: c,
}
}
func (c *client) ListArchiveInstance(ctx context.Context, in *ListArchiveInstanceRequest) (*ListArchiveInstanceResponse, error) {
out := new(ListArchiveInstanceResponse)
err := c.c.Invoke(ctx, _ListArchiveInstanceMethodDesc, in, out)
if err != nil {
return nil, err
}
return out, nil
}
// Service is the server API for instance_archive service.
type Service interface {
ListArchiveInstance(context.Context, *ListArchiveInstanceRequest) (*ListArchiveInstanceResponse, error)
}
func _ListArchiveInstanceEndpoint(s Service) giraffe_micro.UnaryEndpoint {
return func(ctx context.Context, req interface{}) (interface{}, error) {
return s.ListArchiveInstance(ctx, req.(*ListArchiveInstanceRequest))
}
}
func RegisterService(s giraffe_micro.Server, srv Service) {
s.RegisterUnaryEndpoint(_ListArchiveInstanceMethodDesc, _ListArchiveInstanceEndpoint(srv))
}
// Method Description
var _ListArchiveInstanceMethodDesc = &giraffe_micro.MethodDesc{
Contract: &go_proto_giraffe.Contract{
Name: "easyops.api.cmdb.instance_archive.ListArchiveInstance",
Version: "1.0",
},
ServiceName: "instance_archive.rpc",
MethodName: "ListArchiveInstance",
RequestType: (*ListArchiveInstanceRequest)(nil),
ResponseType: (*ListArchiveInstanceResponse)(nil),
HttpRule: &go_proto_giraffe.HttpRule{
Pattern: &go_proto_giraffe.HttpRule_Get{
Get: "/object/:object_id/instance_archive",
},
Body: "",
ResponseBody: "data",
},
}