144 lines
4.3 KiB
Go
144 lines
4.3 KiB
Go
// Code generated by protoc-gen-go.
|
|
// source: grpc/test_proto/interceptors_test.proto
|
|
// DO NOT EDIT!
|
|
|
|
/*
|
|
Package test_proto is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
grpc/test_proto/interceptors_test.proto
|
|
|
|
It has these top-level messages:
|
|
Time
|
|
*/
|
|
package test_proto
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type Time struct {
|
|
Time *int64 `protobuf:"varint,1,opt,name=time" json:"time,omitempty"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
}
|
|
|
|
func (m *Time) Reset() { *m = Time{} }
|
|
func (m *Time) String() string { return proto.CompactTextString(m) }
|
|
func (*Time) ProtoMessage() {}
|
|
func (*Time) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *Time) GetTime() int64 {
|
|
if m != nil && m.Time != nil {
|
|
return *m.Time
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Time)(nil), "Time")
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// Client API for Chiller service
|
|
|
|
type ChillerClient interface {
|
|
// Sleep for the given amount of time, and return the amount of time slept.
|
|
Chill(ctx context.Context, in *Time, opts ...grpc.CallOption) (*Time, error)
|
|
}
|
|
|
|
type chillerClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewChillerClient(cc *grpc.ClientConn) ChillerClient {
|
|
return &chillerClient{cc}
|
|
}
|
|
|
|
func (c *chillerClient) Chill(ctx context.Context, in *Time, opts ...grpc.CallOption) (*Time, error) {
|
|
out := new(Time)
|
|
err := grpc.Invoke(ctx, "/Chiller/Chill", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for Chiller service
|
|
|
|
type ChillerServer interface {
|
|
// Sleep for the given amount of time, and return the amount of time slept.
|
|
Chill(context.Context, *Time) (*Time, error)
|
|
}
|
|
|
|
func RegisterChillerServer(s *grpc.Server, srv ChillerServer) {
|
|
s.RegisterService(&_Chiller_serviceDesc, srv)
|
|
}
|
|
|
|
func _Chiller_Chill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Time)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ChillerServer).Chill(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/Chiller/Chill",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ChillerServer).Chill(ctx, req.(*Time))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Chiller_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "Chiller",
|
|
HandlerType: (*ChillerServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Chill",
|
|
Handler: _Chiller_Chill_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "grpc/test_proto/interceptors_test.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("grpc/test_proto/interceptors_test.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 117 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4f, 0x2f, 0x2a, 0x48,
|
|
0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0xcf, 0xcc, 0x2b, 0x49,
|
|
0x2d, 0x4a, 0x4e, 0x2d, 0x28, 0xc9, 0x2f, 0x2a, 0x8e, 0x07, 0x89, 0xeb, 0x81, 0xc5, 0x95, 0xa4,
|
|
0xb8, 0x58, 0x42, 0x32, 0x73, 0x53, 0x85, 0x84, 0xb8, 0x58, 0x4a, 0x32, 0x73, 0x53, 0x25, 0x18,
|
|
0x15, 0x18, 0x35, 0x98, 0x83, 0xc0, 0x6c, 0x23, 0x25, 0x2e, 0x76, 0xe7, 0x8c, 0xcc, 0x9c, 0x9c,
|
|
0xd4, 0x22, 0x21, 0x71, 0x2e, 0x56, 0x30, 0x53, 0x88, 0x55, 0x0f, 0xa4, 0x5c, 0x0a, 0x42, 0x29,
|
|
0x31, 0x38, 0xf1, 0x44, 0x71, 0x21, 0x6c, 0x01, 0x04, 0x00, 0x00, 0xff, 0xff, 0x56, 0xd9, 0xf5,
|
|
0x39, 0x77, 0x00, 0x00, 0x00,
|
|
}
|