204 lines
8.3 KiB
Go
204 lines
8.3 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc (unknown)
|
|
// source: gateway/v1/task_tools.proto
|
|
|
|
package gatewayv1
|
|
|
|
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 (
|
|
TaskToolsService_ListTaskTools_FullMethodName = "/gateway.v1.TaskToolsService/ListTaskTools"
|
|
TaskToolsService_CallTaskTool_FullMethodName = "/gateway.v1.TaskToolsService/CallTaskTool"
|
|
TaskToolsService_CloseTaskTools_FullMethodName = "/gateway.v1.TaskToolsService/CloseTaskTools"
|
|
)
|
|
|
|
// TaskToolsServiceClient is the client API for TaskToolsService 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.
|
|
//
|
|
// TaskToolsService executes central tools for a live task grant. Only the
|
|
// daemon calls it; identities, orgs and permissions are resolved by the server.
|
|
type TaskToolsServiceClient interface {
|
|
ListTaskTools(ctx context.Context, in *ListTaskToolsRequest, opts ...grpc.CallOption) (*ListTaskToolsResponse, error)
|
|
CallTaskTool(ctx context.Context, in *CallTaskToolRequest, opts ...grpc.CallOption) (*CallTaskToolResponse, error)
|
|
CloseTaskTools(ctx context.Context, in *CloseTaskToolsRequest, opts ...grpc.CallOption) (*CloseTaskToolsResponse, error)
|
|
}
|
|
|
|
type taskToolsServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewTaskToolsServiceClient(cc grpc.ClientConnInterface) TaskToolsServiceClient {
|
|
return &taskToolsServiceClient{cc}
|
|
}
|
|
|
|
func (c *taskToolsServiceClient) ListTaskTools(ctx context.Context, in *ListTaskToolsRequest, opts ...grpc.CallOption) (*ListTaskToolsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListTaskToolsResponse)
|
|
err := c.cc.Invoke(ctx, TaskToolsService_ListTaskTools_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *taskToolsServiceClient) CallTaskTool(ctx context.Context, in *CallTaskToolRequest, opts ...grpc.CallOption) (*CallTaskToolResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CallTaskToolResponse)
|
|
err := c.cc.Invoke(ctx, TaskToolsService_CallTaskTool_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *taskToolsServiceClient) CloseTaskTools(ctx context.Context, in *CloseTaskToolsRequest, opts ...grpc.CallOption) (*CloseTaskToolsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CloseTaskToolsResponse)
|
|
err := c.cc.Invoke(ctx, TaskToolsService_CloseTaskTools_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// TaskToolsServiceServer is the server API for TaskToolsService service.
|
|
// All implementations must embed UnimplementedTaskToolsServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// TaskToolsService executes central tools for a live task grant. Only the
|
|
// daemon calls it; identities, orgs and permissions are resolved by the server.
|
|
type TaskToolsServiceServer interface {
|
|
ListTaskTools(context.Context, *ListTaskToolsRequest) (*ListTaskToolsResponse, error)
|
|
CallTaskTool(context.Context, *CallTaskToolRequest) (*CallTaskToolResponse, error)
|
|
CloseTaskTools(context.Context, *CloseTaskToolsRequest) (*CloseTaskToolsResponse, error)
|
|
mustEmbedUnimplementedTaskToolsServiceServer()
|
|
}
|
|
|
|
// UnimplementedTaskToolsServiceServer 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 UnimplementedTaskToolsServiceServer struct{}
|
|
|
|
func (UnimplementedTaskToolsServiceServer) ListTaskTools(context.Context, *ListTaskToolsRequest) (*ListTaskToolsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListTaskTools not implemented")
|
|
}
|
|
func (UnimplementedTaskToolsServiceServer) CallTaskTool(context.Context, *CallTaskToolRequest) (*CallTaskToolResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CallTaskTool not implemented")
|
|
}
|
|
func (UnimplementedTaskToolsServiceServer) CloseTaskTools(context.Context, *CloseTaskToolsRequest) (*CloseTaskToolsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CloseTaskTools not implemented")
|
|
}
|
|
func (UnimplementedTaskToolsServiceServer) mustEmbedUnimplementedTaskToolsServiceServer() {}
|
|
func (UnimplementedTaskToolsServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeTaskToolsServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to TaskToolsServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeTaskToolsServiceServer interface {
|
|
mustEmbedUnimplementedTaskToolsServiceServer()
|
|
}
|
|
|
|
func RegisterTaskToolsServiceServer(s grpc.ServiceRegistrar, srv TaskToolsServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedTaskToolsServiceServer 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(&TaskToolsService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _TaskToolsService_ListTaskTools_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListTaskToolsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(TaskToolsServiceServer).ListTaskTools(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: TaskToolsService_ListTaskTools_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(TaskToolsServiceServer).ListTaskTools(ctx, req.(*ListTaskToolsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _TaskToolsService_CallTaskTool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CallTaskToolRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(TaskToolsServiceServer).CallTaskTool(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: TaskToolsService_CallTaskTool_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(TaskToolsServiceServer).CallTaskTool(ctx, req.(*CallTaskToolRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _TaskToolsService_CloseTaskTools_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CloseTaskToolsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(TaskToolsServiceServer).CloseTaskTools(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: TaskToolsService_CloseTaskTools_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(TaskToolsServiceServer).CloseTaskTools(ctx, req.(*CloseTaskToolsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// TaskToolsService_ServiceDesc is the grpc.ServiceDesc for TaskToolsService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var TaskToolsService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "gateway.v1.TaskToolsService",
|
|
HandlerType: (*TaskToolsServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ListTaskTools",
|
|
Handler: _TaskToolsService_ListTaskTools_Handler,
|
|
},
|
|
{
|
|
MethodName: "CallTaskTool",
|
|
Handler: _TaskToolsService_CallTaskTool_Handler,
|
|
},
|
|
{
|
|
MethodName: "CloseTaskTools",
|
|
Handler: _TaskToolsService_CloseTaskTools_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "gateway/v1/task_tools.proto",
|
|
}
|