evcc-io/api/proto/pb/victron_grpc.pb.go
2025-12-28 10:08:39 +00:00

121 lines
4.2 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v6.33.2
// source: proto/victron.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Victron_IsValidDevice_FullMethodName = "/Victron/IsValidDevice"
)
// VictronClient is the client API for Victron service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type VictronClient interface {
IsValidDevice(ctx context.Context, in *VictronRequest, opts ...grpc.CallOption) (*VictronReply, error)
}
type victronClient struct {
cc grpc.ClientConnInterface
}
func NewVictronClient(cc grpc.ClientConnInterface) VictronClient {
return &victronClient{cc}
}
func (c *victronClient) IsValidDevice(ctx context.Context, in *VictronRequest, opts ...grpc.CallOption) (*VictronReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(VictronReply)
err := c.cc.Invoke(ctx, Victron_IsValidDevice_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// VictronServer is the server API for Victron service.
// All implementations must embed UnimplementedVictronServer
// for forward compatibility.
type VictronServer interface {
IsValidDevice(context.Context, *VictronRequest) (*VictronReply, error)
mustEmbedUnimplementedVictronServer()
}
// UnimplementedVictronServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedVictronServer struct{}
func (UnimplementedVictronServer) IsValidDevice(context.Context, *VictronRequest) (*VictronReply, error) {
return nil, status.Error(codes.Unimplemented, "method IsValidDevice not implemented")
}
func (UnimplementedVictronServer) mustEmbedUnimplementedVictronServer() {}
func (UnimplementedVictronServer) testEmbeddedByValue() {}
// UnsafeVictronServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to VictronServer will
// result in compilation errors.
type UnsafeVictronServer interface {
mustEmbedUnimplementedVictronServer()
}
func RegisterVictronServer(s grpc.ServiceRegistrar, srv VictronServer) {
// If the following call panics, it indicates UnimplementedVictronServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Victron_ServiceDesc, srv)
}
func _Victron_IsValidDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(VictronRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VictronServer).IsValidDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Victron_IsValidDevice_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VictronServer).IsValidDevice(ctx, req.(*VictronRequest))
}
return interceptor(ctx, in, info, handler)
}
// Victron_ServiceDesc is the grpc.ServiceDesc for Victron service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Victron_ServiceDesc = grpc.ServiceDesc{
ServiceName: "Victron",
HandlerType: (*VictronServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "IsValidDevice",
Handler: _Victron_IsValidDevice_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/victron.proto",
}