|
|
@@ -98,6 +98,30 @@ func (m *VPNInitRequest) GetDNS() string {
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
+type VPNUpdateRequest struct {
|
|
|
+ IPBlock string `protobuf:"bytes,1,opt,name=IPBlock" json:"IPBlock,omitempty"`
|
|
|
+ DNS string `protobuf:"bytes,2,opt,name=DNS" json:"DNS,omitempty"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *VPNUpdateRequest) Reset() { *m = VPNUpdateRequest{} }
|
|
|
+func (m *VPNUpdateRequest) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*VPNUpdateRequest) ProtoMessage() {}
|
|
|
+func (*VPNUpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
|
|
|
+
|
|
|
+func (m *VPNUpdateRequest) GetIPBlock() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.IPBlock
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
+func (m *VPNUpdateRequest) GetDNS() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.DNS
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
type VPNStatusResponse struct {
|
|
|
Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
|
|
|
SerialNumber string `protobuf:"bytes,2,opt,name=SerialNumber" json:"SerialNumber,omitempty"`
|
|
|
@@ -115,7 +139,7 @@ type VPNStatusResponse struct {
|
|
|
func (m *VPNStatusResponse) Reset() { *m = VPNStatusResponse{} }
|
|
|
func (m *VPNStatusResponse) String() string { return proto.CompactTextString(m) }
|
|
|
func (*VPNStatusResponse) ProtoMessage() {}
|
|
|
-func (*VPNStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
|
|
|
+func (*VPNStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
|
|
|
|
|
|
func (m *VPNStatusResponse) GetName() string {
|
|
|
if m != nil {
|
|
|
@@ -200,13 +224,23 @@ type VPNInitResponse struct {
|
|
|
func (m *VPNInitResponse) Reset() { *m = VPNInitResponse{} }
|
|
|
func (m *VPNInitResponse) String() string { return proto.CompactTextString(m) }
|
|
|
func (*VPNInitResponse) ProtoMessage() {}
|
|
|
-func (*VPNInitResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
|
|
|
+func (*VPNInitResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
|
|
|
+
|
|
|
+type VPNUpdateResponse struct {
|
|
|
+}
|
|
|
+
|
|
|
+func (m *VPNUpdateResponse) Reset() { *m = VPNUpdateResponse{} }
|
|
|
+func (m *VPNUpdateResponse) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*VPNUpdateResponse) ProtoMessage() {}
|
|
|
+func (*VPNUpdateResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} }
|
|
|
|
|
|
func init() {
|
|
|
proto.RegisterType((*VPNStatusRequest)(nil), "pb.VPNStatusRequest")
|
|
|
proto.RegisterType((*VPNInitRequest)(nil), "pb.VPNInitRequest")
|
|
|
+ proto.RegisterType((*VPNUpdateRequest)(nil), "pb.VPNUpdateRequest")
|
|
|
proto.RegisterType((*VPNStatusResponse)(nil), "pb.VPNStatusResponse")
|
|
|
proto.RegisterType((*VPNInitResponse)(nil), "pb.VPNInitResponse")
|
|
|
+ proto.RegisterType((*VPNUpdateResponse)(nil), "pb.VPNUpdateResponse")
|
|
|
proto.RegisterEnum("pb.VPNProto", VPNProto_name, VPNProto_value)
|
|
|
}
|
|
|
|
|
|
@@ -223,6 +257,7 @@ const _ = grpc.SupportPackageIsVersion4
|
|
|
type VPNServiceClient interface {
|
|
|
Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error)
|
|
|
Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error)
|
|
|
+ Update(ctx context.Context, in *VPNUpdateRequest, opts ...grpc.CallOption) (*VPNUpdateResponse, error)
|
|
|
}
|
|
|
|
|
|
type vPNServiceClient struct {
|
|
|
@@ -251,11 +286,21 @@ func (c *vPNServiceClient) Init(ctx context.Context, in *VPNInitRequest, opts ..
|
|
|
return out, nil
|
|
|
}
|
|
|
|
|
|
+func (c *vPNServiceClient) Update(ctx context.Context, in *VPNUpdateRequest, opts ...grpc.CallOption) (*VPNUpdateResponse, error) {
|
|
|
+ out := new(VPNUpdateResponse)
|
|
|
+ err := grpc.Invoke(ctx, "/pb.VPNService/Update", in, out, c.cc, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
// Server API for VPNService service
|
|
|
|
|
|
type VPNServiceServer interface {
|
|
|
Status(context.Context, *VPNStatusRequest) (*VPNStatusResponse, error)
|
|
|
Init(context.Context, *VPNInitRequest) (*VPNInitResponse, error)
|
|
|
+ Update(context.Context, *VPNUpdateRequest) (*VPNUpdateResponse, error)
|
|
|
}
|
|
|
|
|
|
func RegisterVPNServiceServer(s *grpc.Server, srv VPNServiceServer) {
|
|
|
@@ -298,6 +343,24 @@ func _VPNService_Init_Handler(srv interface{}, ctx context.Context, dec func(int
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
}
|
|
|
|
|
|
+func _VPNService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(VPNUpdateRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(VPNServiceServer).Update(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/pb.VPNService/Update",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(VPNServiceServer).Update(ctx, req.(*VPNUpdateRequest))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
var _VPNService_serviceDesc = grpc.ServiceDesc{
|
|
|
ServiceName: "pb.VPNService",
|
|
|
HandlerType: (*VPNServiceServer)(nil),
|
|
|
@@ -310,6 +373,10 @@ var _VPNService_serviceDesc = grpc.ServiceDesc{
|
|
|
MethodName: "Init",
|
|
|
Handler: _VPNService_Init_Handler,
|
|
|
},
|
|
|
+ {
|
|
|
+ MethodName: "Update",
|
|
|
+ Handler: _VPNService_Update_Handler,
|
|
|
+ },
|
|
|
},
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
Metadata: "vpn.proto",
|
|
|
@@ -318,33 +385,35 @@ var _VPNService_serviceDesc = grpc.ServiceDesc{
|
|
|
func init() { proto.RegisterFile("vpn.proto", fileDescriptor1) }
|
|
|
|
|
|
var fileDescriptor1 = []byte{
|
|
|
- // 434 bytes of a gzipped FileDescriptorProto
|
|
|
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xcd, 0x6e, 0xd3, 0x40,
|
|
|
- 0x10, 0xc6, 0x8e, 0xeb, 0xc4, 0x43, 0x14, 0x9c, 0x69, 0x81, 0x25, 0xea, 0xa1, 0xf2, 0x29, 0xca,
|
|
|
- 0x21, 0x16, 0xe5, 0xd6, 0x5b, 0x49, 0x41, 0xed, 0x81, 0x65, 0x95, 0x40, 0xee, 0x4e, 0x59, 0x2a,
|
|
|
- 0xab, 0xe9, 0xee, 0xb2, 0xbb, 0xc9, 0x03, 0xf0, 0x0a, 0xbd, 0xf0, 0x08, 0xbc, 0x0f, 0xaf, 0xc0,
|
|
|
- 0x83, 0x20, 0x8f, 0x9d, 0x3f, 0xa4, 0xde, 0xbe, 0xf9, 0xc6, 0xf3, 0xf9, 0x9b, 0x6f, 0x07, 0x92,
|
|
|
- 0xb5, 0x51, 0x63, 0x63, 0xb5, 0xd7, 0x18, 0x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