compute/cmd/compute_api/proto/domain_grpc.pb.go

384 lines
15 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v3.14.0
// source: proto/domain.proto
package proto
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 (
Domain_ListAll_FullMethodName = "/domain.Domain/ListAll"
Domain_Create_FullMethodName = "/domain.Domain/Create"
Domain_Update_FullMethodName = "/domain.Domain/Update"
Domain_Delete_FullMethodName = "/domain.Domain/Delete"
Domain_Power_FullMethodName = "/domain.Domain/Power"
)
// DomainClient is the client API for Domain 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.
//
// The greeting service definition.
type DomainClient interface {
ListAll(ctx context.Context, in *DomainListAllRequest, opts ...grpc.CallOption) (*DomainListAllResponse, error)
Create(ctx context.Context, in *DomainCreateRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DomainCreateResponse], error)
Update(ctx context.Context, in *DomainUpdateRequest, opts ...grpc.CallOption) (*DomainUpdateResponse, error)
Delete(ctx context.Context, in *DomainDeleteRequest, opts ...grpc.CallOption) (*DomainDeleteResponse, error)
Power(ctx context.Context, in *DomainPowerRequest, opts ...grpc.CallOption) (*DomainPowerResponse, error)
}
type domainClient struct {
cc grpc.ClientConnInterface
}
func NewDomainClient(cc grpc.ClientConnInterface) DomainClient {
return &domainClient{cc}
}
func (c *domainClient) ListAll(ctx context.Context, in *DomainListAllRequest, opts ...grpc.CallOption) (*DomainListAllResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DomainListAllResponse)
err := c.cc.Invoke(ctx, Domain_ListAll_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *domainClient) Create(ctx context.Context, in *DomainCreateRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DomainCreateResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &Domain_ServiceDesc.Streams[0], Domain_Create_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[DomainCreateRequest, DomainCreateResponse]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Domain_CreateClient = grpc.ServerStreamingClient[DomainCreateResponse]
func (c *domainClient) Update(ctx context.Context, in *DomainUpdateRequest, opts ...grpc.CallOption) (*DomainUpdateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DomainUpdateResponse)
err := c.cc.Invoke(ctx, Domain_Update_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *domainClient) Delete(ctx context.Context, in *DomainDeleteRequest, opts ...grpc.CallOption) (*DomainDeleteResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DomainDeleteResponse)
err := c.cc.Invoke(ctx, Domain_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *domainClient) Power(ctx context.Context, in *DomainPowerRequest, opts ...grpc.CallOption) (*DomainPowerResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DomainPowerResponse)
err := c.cc.Invoke(ctx, Domain_Power_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// DomainServer is the server API for Domain service.
// All implementations must embed UnimplementedDomainServer
// for forward compatibility.
//
// The greeting service definition.
type DomainServer interface {
ListAll(context.Context, *DomainListAllRequest) (*DomainListAllResponse, error)
Create(*DomainCreateRequest, grpc.ServerStreamingServer[DomainCreateResponse]) error
Update(context.Context, *DomainUpdateRequest) (*DomainUpdateResponse, error)
Delete(context.Context, *DomainDeleteRequest) (*DomainDeleteResponse, error)
Power(context.Context, *DomainPowerRequest) (*DomainPowerResponse, error)
mustEmbedUnimplementedDomainServer()
}
// UnimplementedDomainServer 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 UnimplementedDomainServer struct{}
func (UnimplementedDomainServer) ListAll(context.Context, *DomainListAllRequest) (*DomainListAllResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAll not implemented")
}
func (UnimplementedDomainServer) Create(*DomainCreateRequest, grpc.ServerStreamingServer[DomainCreateResponse]) error {
return status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedDomainServer) Update(context.Context, *DomainUpdateRequest) (*DomainUpdateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedDomainServer) Delete(context.Context, *DomainDeleteRequest) (*DomainDeleteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedDomainServer) Power(context.Context, *DomainPowerRequest) (*DomainPowerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Power not implemented")
}
func (UnimplementedDomainServer) mustEmbedUnimplementedDomainServer() {}
func (UnimplementedDomainServer) testEmbeddedByValue() {}
// UnsafeDomainServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DomainServer will
// result in compilation errors.
type UnsafeDomainServer interface {
mustEmbedUnimplementedDomainServer()
}
func RegisterDomainServer(s grpc.ServiceRegistrar, srv DomainServer) {
// If the following call pancis, it indicates UnimplementedDomainServer 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(&Domain_ServiceDesc, srv)
}
func _Domain_ListAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DomainListAllRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainServer).ListAll(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Domain_ListAll_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainServer).ListAll(ctx, req.(*DomainListAllRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Domain_Create_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DomainCreateRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DomainServer).Create(m, &grpc.GenericServerStream[DomainCreateRequest, DomainCreateResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Domain_CreateServer = grpc.ServerStreamingServer[DomainCreateResponse]
func _Domain_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DomainUpdateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Domain_Update_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainServer).Update(ctx, req.(*DomainUpdateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Domain_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DomainDeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Domain_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainServer).Delete(ctx, req.(*DomainDeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Domain_Power_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DomainPowerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainServer).Power(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Domain_Power_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainServer).Power(ctx, req.(*DomainPowerRequest))
}
return interceptor(ctx, in, info, handler)
}
// Domain_ServiceDesc is the grpc.ServiceDesc for Domain service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Domain_ServiceDesc = grpc.ServiceDesc{
ServiceName: "domain.Domain",
HandlerType: (*DomainServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListAll",
Handler: _Domain_ListAll_Handler,
},
{
MethodName: "Update",
Handler: _Domain_Update_Handler,
},
{
MethodName: "Delete",
Handler: _Domain_Delete_Handler,
},
{
MethodName: "Power",
Handler: _Domain_Power_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Create",
Handler: _Domain_Create_Handler,
ServerStreams: true,
},
},
Metadata: "proto/domain.proto",
}
const (
DomainDevicesGraphics_Console_FullMethodName = "/domain.DomainDevicesGraphics/Console"
)
// DomainDevicesGraphicsClient is the client API for DomainDevicesGraphics 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 DomainDevicesGraphicsClient interface {
Console(ctx context.Context, in *DomainDevicesGraphicsConsoleRequest, opts ...grpc.CallOption) (*DomainDevicesGraphicsConsoleResponse, error)
}
type domainDevicesGraphicsClient struct {
cc grpc.ClientConnInterface
}
func NewDomainDevicesGraphicsClient(cc grpc.ClientConnInterface) DomainDevicesGraphicsClient {
return &domainDevicesGraphicsClient{cc}
}
func (c *domainDevicesGraphicsClient) Console(ctx context.Context, in *DomainDevicesGraphicsConsoleRequest, opts ...grpc.CallOption) (*DomainDevicesGraphicsConsoleResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DomainDevicesGraphicsConsoleResponse)
err := c.cc.Invoke(ctx, DomainDevicesGraphics_Console_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// DomainDevicesGraphicsServer is the server API for DomainDevicesGraphics service.
// All implementations must embed UnimplementedDomainDevicesGraphicsServer
// for forward compatibility.
type DomainDevicesGraphicsServer interface {
Console(context.Context, *DomainDevicesGraphicsConsoleRequest) (*DomainDevicesGraphicsConsoleResponse, error)
mustEmbedUnimplementedDomainDevicesGraphicsServer()
}
// UnimplementedDomainDevicesGraphicsServer 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 UnimplementedDomainDevicesGraphicsServer struct{}
func (UnimplementedDomainDevicesGraphicsServer) Console(context.Context, *DomainDevicesGraphicsConsoleRequest) (*DomainDevicesGraphicsConsoleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Console not implemented")
}
func (UnimplementedDomainDevicesGraphicsServer) mustEmbedUnimplementedDomainDevicesGraphicsServer() {}
func (UnimplementedDomainDevicesGraphicsServer) testEmbeddedByValue() {}
// UnsafeDomainDevicesGraphicsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DomainDevicesGraphicsServer will
// result in compilation errors.
type UnsafeDomainDevicesGraphicsServer interface {
mustEmbedUnimplementedDomainDevicesGraphicsServer()
}
func RegisterDomainDevicesGraphicsServer(s grpc.ServiceRegistrar, srv DomainDevicesGraphicsServer) {
// If the following call pancis, it indicates UnimplementedDomainDevicesGraphicsServer 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(&DomainDevicesGraphics_ServiceDesc, srv)
}
func _DomainDevicesGraphics_Console_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DomainDevicesGraphicsConsoleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainDevicesGraphicsServer).Console(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DomainDevicesGraphics_Console_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainDevicesGraphicsServer).Console(ctx, req.(*DomainDevicesGraphicsConsoleRequest))
}
return interceptor(ctx, in, info, handler)
}
// DomainDevicesGraphics_ServiceDesc is the grpc.ServiceDesc for DomainDevicesGraphics service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DomainDevicesGraphics_ServiceDesc = grpc.ServiceDesc{
ServiceName: "domain.DomainDevicesGraphics",
HandlerType: (*DomainDevicesGraphicsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Console",
Handler: _DomainDevicesGraphics_Console_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/domain.proto",
}