Commit fa89d4bb authored by Loïck Bonniot's avatar Loïck Bonniot

[grpc] Update to version 2

parent 9afc38a6
Pipeline #710 failed with stage
......@@ -48,7 +48,8 @@ protobuf:
protoc --go_out=plugins=grpc:. dfss/dfssc/api/client.proto && \
protoc --go_out=plugins=grpc:. dfss/dfssd/api/demonstrator.proto && \
protoc --go_out=plugins=grpc:. dfss/dfssp/api/platform.proto && \
protoc --go_out=plugins=grpc:. dfss/dfsst/api/resolution.proto
protoc --go_out=plugins=grpc:. dfss/dfsst/api/resolution.proto && \
protoc --go_out=plugins=grpc:. dfss/net/fixtures/test.proto
# Release internals
# Do not run these commands on your personal computer
......
......@@ -111,6 +111,10 @@ func init() {
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.SupportPackageIsVersion2
// Client API for Client service
type ClientClient interface {
......@@ -166,40 +170,58 @@ func RegisterClientServer(s *grpc.Server, srv ClientServer) {
s.RegisterService(&_Client_serviceDesc, srv)
}
func _Client_TreatPromise_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Client_TreatPromise_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Promise)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(ClientServer).TreatPromise(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(ClientServer).TreatPromise(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Client/TreatPromise",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientServer).TreatPromise(ctx, req.(*Promise))
}
return interceptor(ctx, in, info, handler)
}
func _Client_TreatSignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Client_TreatSignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Signature)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(ClientServer).TreatSignature(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(ClientServer).TreatSignature(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Client/TreatSignature",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientServer).TreatSignature(ctx, req.(*Signature))
}
return interceptor(ctx, in, info, handler)
}
func _Client_Discover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Client_Discover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Hello)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(ClientServer).Discover(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(ClientServer).Discover(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Client/Discover",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientServer).Discover(ctx, req.(*Hello))
}
return interceptor(ctx, in, info, handler)
}
var _Client_serviceDesc = grpc.ServiceDesc{
......
......@@ -64,7 +64,7 @@ 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.SupportPackageIsVersion1
const _ = grpc.SupportPackageIsVersion2
// Client API for Demonstrator service
......@@ -107,16 +107,22 @@ func RegisterDemonstratorServer(s *grpc.Server, srv DemonstratorServer) {
s.RegisterService(&_Demonstrator_serviceDesc, srv)
}
func _Demonstrator_SendLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Demonstrator_SendLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Log)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(DemonstratorServer).SendLog(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(DemonstratorServer).SendLog(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Demonstrator/SendLog",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DemonstratorServer).SendLog(ctx, req.(*Log))
}
return interceptor(ctx, in, info, handler)
}
var _Demonstrator_serviceDesc = grpc.ServiceDesc{
......
......@@ -286,7 +286,7 @@ 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.SupportPackageIsVersion1
const _ = grpc.SupportPackageIsVersion2
// Client API for Platform service
......@@ -410,64 +410,94 @@ func RegisterPlatformServer(s *grpc.Server, srv PlatformServer) {
s.RegisterService(&_Platform_serviceDesc, srv)
}
func _Platform_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Platform_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(PlatformServer).Register(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(PlatformServer).Register(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Platform/Register",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlatformServer).Register(ctx, req.(*RegisterRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Platform_Auth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Platform_Auth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AuthRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(PlatformServer).Auth(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(PlatformServer).Auth(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Platform/Auth",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlatformServer).Auth(ctx, req.(*AuthRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Platform_Unregister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Platform_Unregister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(PlatformServer).Unregister(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(PlatformServer).Unregister(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Platform/Unregister",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlatformServer).Unregister(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Platform_PostContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Platform_PostContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PostContractRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(PlatformServer).PostContract(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(PlatformServer).PostContract(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Platform/PostContract",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlatformServer).PostContract(ctx, req.(*PostContractRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Platform_GetContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Platform_GetContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetContractRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(PlatformServer).GetContract(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(PlatformServer).GetContract(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Platform/GetContract",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlatformServer).GetContract(ctx, req.(*GetContractRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Platform_JoinSignature_Handler(srv interface{}, stream grpc.ServerStream) error {
......@@ -491,16 +521,22 @@ func (x *platformJoinSignatureServer) Send(m *UserConnected) error {
return x.ServerStream.SendMsg(m)
}
func _Platform_ReadySign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Platform_ReadySign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReadySignRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(PlatformServer).ReadySign(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(PlatformServer).ReadySign(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Platform/ReadySign",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlatformServer).ReadySign(ctx, req.(*ReadySignRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Platform_serviceDesc = grpc.ServiceDesc{
......
......@@ -84,6 +84,10 @@ func init() {
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.SupportPackageIsVersion2
// Client API for TTP service
type TTPClient interface {
......@@ -128,28 +132,40 @@ func RegisterTTPServer(s *grpc.Server, srv TTPServer) {
s.RegisterService(&_TTP_serviceDesc, srv)
}
func _TTP_Alert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _TTP_Alert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AlertRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(TTPServer).Alert(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(TTPServer).Alert(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TTP/Alert",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TTPServer).Alert(ctx, req.(*AlertRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TTP_Recover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _TTP_Recover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RecoverRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(TTPServer).Recover(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(TTPServer).Recover(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TTP/Recover",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TTPServer).Recover(ctx, req.(*RecoverRequest))
}
return interceptor(ctx, in, info, handler)
}
var _TTP_serviceDesc = grpc.ServiceDesc{
......
all:
protoc --go_out=plugins=grpc:. test.proto
// Code generated by protoc-gen-go.
// source: test.proto
// source: dfss/net/fixtures/test.proto
// DO NOT EDIT!
/*
Package fixtures is a generated protocol buffer package.
It is generated from these files:
test.proto
dfss/net/fixtures/test.proto
It has these top-level messages:
Hop
......@@ -69,6 +69,10 @@ func init() {
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.SupportPackageIsVersion2
// Client API for Test service
type TestClient interface {
......@@ -113,28 +117,40 @@ func RegisterTestServer(s *grpc.Server, srv TestServer) {
s.RegisterService(&_Test_serviceDesc, srv)
}
func _Test_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Test_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Hop)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(TestServer).Ping(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(TestServer).Ping(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/fixtures.Test/Ping",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestServer).Ping(ctx, req.(*Hop))
}
return interceptor(ctx, in, info, handler)
}
func _Test_Auth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
func _Test_Auth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(TestServer).Auth(ctx, in)
if err != nil {
return nil, err
if interceptor == nil {
return srv.(TestServer).Auth(ctx, in)
}
return out, nil
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/fixtures.Test/Auth",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestServer).Auth(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
var _Test_serviceDesc = grpc.ServiceDesc{
......@@ -154,15 +170,16 @@ var _Test_serviceDesc = grpc.ServiceDesc{
}
var fileDescriptor0 = []byte{
// 152 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x2d, 0x2e,
0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x48, 0xcb, 0xac, 0x28, 0x29, 0x2d, 0x4a, 0x2d,
0x56, 0x12, 0xe5, 0x62, 0xf6, 0xc8, 0x2f, 0x10, 0xe2, 0xe3, 0x62, 0xca, 0x4c, 0x91, 0x60, 0x54,
0x60, 0xd4, 0x60, 0x0d, 0x02, 0xb2, 0x94, 0x64, 0xb8, 0xd8, 0x3c, 0x8b, 0x1d, 0x4b, 0x4b, 0x32,
0x84, 0x84, 0xb8, 0x58, 0x12, 0x81, 0x34, 0x58, 0x8e, 0x23, 0x08, 0xcc, 0x56, 0x62, 0xe7, 0x62,
0x75, 0xcd, 0x2d, 0x28, 0xa9, 0x34, 0x8a, 0xe6, 0x62, 0x09, 0x01, 0x9a, 0x2a, 0xa4, 0xc6, 0xc5,
0x12, 0x90, 0x99, 0x97, 0x2e, 0xc4, 0xab, 0x07, 0x33, 0x58, 0x0f, 0x68, 0xaa, 0x14, 0x2a, 0x57,
0x89, 0x41, 0x48, 0x9b, 0x8b, 0x05, 0x6c, 0x28, 0x3f, 0x42, 0x02, 0x6c, 0x90, 0x94, 0x00, 0x42,
0x00, 0x62, 0xaf, 0x12, 0x43, 0x12, 0x1b, 0xd8, 0xad, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff,
0x03, 0x4e, 0x65, 0x96, 0xb9, 0x00, 0x00, 0x00,
// 164 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x49, 0x49, 0x2b, 0x2e,
0xd6, 0xcf, 0x4b, 0x2d, 0xd1, 0x4f, 0xcb, 0xac, 0x28, 0x29, 0x2d, 0x4a, 0x2d, 0xd6, 0x2f, 0x49,
0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0x09, 0x2a, 0x89, 0x72, 0x31,
0x7b, 0xe4, 0x17, 0x08, 0xf1, 0x71, 0x31, 0x65, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x06,
0x01, 0x59, 0x4a, 0x32, 0x5c, 0x6c, 0x9e, 0xc5, 0x8e, 0xa5, 0x25, 0x19, 0x42, 0x42, 0x5c, 0x2c,
0x89, 0x40, 0x1a, 0x2c, 0xc7, 0x11, 0x04, 0x66, 0x2b, 0xb1, 0x73, 0xb1, 0xba, 0xe6, 0x16, 0x94,
0x54, 0x1a, 0x45, 0x73, 0xb1, 0x84, 0x00, 0x4d, 0x15, 0x52, 0xe3, 0x62, 0x09, 0xc8, 0xcc, 0x4b,
0x17, 0xe2, 0xd5, 0x83, 0x19, 0xac, 0x07, 0x34, 0x55, 0x0a, 0x95, 0xab, 0xc4, 0x20, 0xa4, 0xcd,
0xc5, 0x02, 0x36, 0x94, 0x1f, 0x21, 0x01, 0x36, 0x48, 0x4a, 0x00, 0x21, 0x00, 0xb1, 0x57, 0x89,
0x21, 0x89, 0x0d, 0xec, 0x56, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xf2, 0x1b, 0xf6,
0xcb, 0x00, 0x00, 0x00,
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment