245 lines
9.4 KiB
Go
245 lines
9.4 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
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.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// PipelineServiceClient is the client API for PipelineService 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 PipelineServiceClient interface {
|
|
CreatePipeline(ctx context.Context, in *Pipeline, opts ...grpc.CallOption) (*PipelineCreationResponse, error)
|
|
UpdatePipeline(ctx context.Context, in *PipelineUpdates, opts ...grpc.CallOption) (*PipelineUpdateResponse, error)
|
|
StartPipeline(ctx context.Context, in *PipelineID, opts ...grpc.CallOption) (*PipelineStartResponse, error)
|
|
StopPipeline(ctx context.Context, in *PipelineID, opts ...grpc.CallOption) (*PipelineStopResponse, error)
|
|
DeletePipeline(ctx context.Context, in *PipelineID, opts ...grpc.CallOption) (*PipelineDeleteResponse, error)
|
|
}
|
|
|
|
type pipelineServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewPipelineServiceClient(cc grpc.ClientConnInterface) PipelineServiceClient {
|
|
return &pipelineServiceClient{cc}
|
|
}
|
|
|
|
func (c *pipelineServiceClient) CreatePipeline(ctx context.Context, in *Pipeline, opts ...grpc.CallOption) (*PipelineCreationResponse, error) {
|
|
out := new(PipelineCreationResponse)
|
|
err := c.cc.Invoke(ctx, "/api.PipelineService/CreatePipeline", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pipelineServiceClient) UpdatePipeline(ctx context.Context, in *PipelineUpdates, opts ...grpc.CallOption) (*PipelineUpdateResponse, error) {
|
|
out := new(PipelineUpdateResponse)
|
|
err := c.cc.Invoke(ctx, "/api.PipelineService/UpdatePipeline", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pipelineServiceClient) StartPipeline(ctx context.Context, in *PipelineID, opts ...grpc.CallOption) (*PipelineStartResponse, error) {
|
|
out := new(PipelineStartResponse)
|
|
err := c.cc.Invoke(ctx, "/api.PipelineService/StartPipeline", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pipelineServiceClient) StopPipeline(ctx context.Context, in *PipelineID, opts ...grpc.CallOption) (*PipelineStopResponse, error) {
|
|
out := new(PipelineStopResponse)
|
|
err := c.cc.Invoke(ctx, "/api.PipelineService/StopPipeline", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pipelineServiceClient) DeletePipeline(ctx context.Context, in *PipelineID, opts ...grpc.CallOption) (*PipelineDeleteResponse, error) {
|
|
out := new(PipelineDeleteResponse)
|
|
err := c.cc.Invoke(ctx, "/api.PipelineService/DeletePipeline", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// PipelineServiceServer is the server API for PipelineService service.
|
|
// All implementations must embed UnimplementedPipelineServiceServer
|
|
// for forward compatibility
|
|
type PipelineServiceServer interface {
|
|
CreatePipeline(context.Context, *Pipeline) (*PipelineCreationResponse, error)
|
|
UpdatePipeline(context.Context, *PipelineUpdates) (*PipelineUpdateResponse, error)
|
|
StartPipeline(context.Context, *PipelineID) (*PipelineStartResponse, error)
|
|
StopPipeline(context.Context, *PipelineID) (*PipelineStopResponse, error)
|
|
DeletePipeline(context.Context, *PipelineID) (*PipelineDeleteResponse, error)
|
|
mustEmbedUnimplementedPipelineServiceServer()
|
|
}
|
|
|
|
// UnimplementedPipelineServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedPipelineServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedPipelineServiceServer) CreatePipeline(context.Context, *Pipeline) (*PipelineCreationResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreatePipeline not implemented")
|
|
}
|
|
func (UnimplementedPipelineServiceServer) UpdatePipeline(context.Context, *PipelineUpdates) (*PipelineUpdateResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdatePipeline not implemented")
|
|
}
|
|
func (UnimplementedPipelineServiceServer) StartPipeline(context.Context, *PipelineID) (*PipelineStartResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method StartPipeline not implemented")
|
|
}
|
|
func (UnimplementedPipelineServiceServer) StopPipeline(context.Context, *PipelineID) (*PipelineStopResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method StopPipeline not implemented")
|
|
}
|
|
func (UnimplementedPipelineServiceServer) DeletePipeline(context.Context, *PipelineID) (*PipelineDeleteResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeletePipeline not implemented")
|
|
}
|
|
func (UnimplementedPipelineServiceServer) mustEmbedUnimplementedPipelineServiceServer() {}
|
|
|
|
// UnsafePipelineServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to PipelineServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafePipelineServiceServer interface {
|
|
mustEmbedUnimplementedPipelineServiceServer()
|
|
}
|
|
|
|
func RegisterPipelineServiceServer(s grpc.ServiceRegistrar, srv PipelineServiceServer) {
|
|
s.RegisterService(&PipelineService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _PipelineService_CreatePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Pipeline)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PipelineServiceServer).CreatePipeline(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.PipelineService/CreatePipeline",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PipelineServiceServer).CreatePipeline(ctx, req.(*Pipeline))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PipelineService_UpdatePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PipelineUpdates)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PipelineServiceServer).UpdatePipeline(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.PipelineService/UpdatePipeline",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PipelineServiceServer).UpdatePipeline(ctx, req.(*PipelineUpdates))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PipelineService_StartPipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PipelineID)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PipelineServiceServer).StartPipeline(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.PipelineService/StartPipeline",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PipelineServiceServer).StartPipeline(ctx, req.(*PipelineID))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PipelineService_StopPipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PipelineID)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PipelineServiceServer).StopPipeline(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.PipelineService/StopPipeline",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PipelineServiceServer).StopPipeline(ctx, req.(*PipelineID))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PipelineService_DeletePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PipelineID)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PipelineServiceServer).DeletePipeline(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.PipelineService/DeletePipeline",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PipelineServiceServer).DeletePipeline(ctx, req.(*PipelineID))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// PipelineService_ServiceDesc is the grpc.ServiceDesc for PipelineService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var PipelineService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "api.PipelineService",
|
|
HandlerType: (*PipelineServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "CreatePipeline",
|
|
Handler: _PipelineService_CreatePipeline_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdatePipeline",
|
|
Handler: _PipelineService_UpdatePipeline_Handler,
|
|
},
|
|
{
|
|
MethodName: "StartPipeline",
|
|
Handler: _PipelineService_StartPipeline_Handler,
|
|
},
|
|
{
|
|
MethodName: "StopPipeline",
|
|
Handler: _PipelineService_StopPipeline_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeletePipeline",
|
|
Handler: _PipelineService_DeletePipeline_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "api/api.proto",
|
|
}
|