2022-05-27 08:29:23 -07:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package services
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
// WorkerServiceClient is the client API for WorkerService 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 WorkerServiceClient interface {
// GetWorker returns a stored Worker if present. The provided request
// must include the Worker ID for the Worker being retrieved. If
// that ID is missing, malformed or reference a non existing
// resource an error is returned.
GetWorker ( ctx context . Context , in * GetWorkerRequest , opts ... grpc . CallOption ) ( * GetWorkerResponse , error )
// ListWorkers returns a list of stored Workers which exist inside the provided
// scope. The request must include the scope ID for the Workers being listed.
// If the scope ID is missing, malformed, or reference a non existing scope,
// an error is returned.
ListWorkers ( ctx context . Context , in * ListWorkersRequest , opts ... grpc . CallOption ) ( * ListWorkersResponse , error )
2022-06-07 11:50:30 -04:00
// CreateWorkerLed creates and stores a Worker in boundary. The provided
2022-05-27 08:29:23 -07:00
// request must include the Scope id in which the Worker will be created.
// If the Scope id is missing, malformed or references a non existing
// resource, an error is returned. If a name is provided that is in
// use in another Worker in the same scope, an error is returned.
2022-06-07 11:50:30 -04:00
CreateWorkerLed ( ctx context . Context , in * CreateWorkerLedRequest , opts ... grpc . CallOption ) ( * CreateWorkerLedResponse , error )
2022-05-27 08:29:23 -07:00
// UpdateWorker updates an existing Worker in boundary. The provided
// Worker must not have any read only fields set. The update mask must be
// included in the request and contain at least 1 mutable field. To unset
// a field's value, include the field in the update mask and don't set it
// in the provided Worker. An error is returned if either the Worker id is
// missing or reference a non existing resource. An error is also returned
// if the request attempts to update the name to one that is already in use
// in this Scope.
UpdateWorker ( ctx context . Context , in * UpdateWorkerRequest , opts ... grpc . CallOption ) ( * UpdateWorkerResponse , error )
// DeleteWorker removes a Worker from Boundary. If the provided Worker ID
// is malformed or not provided an error is returned.
DeleteWorker ( ctx context . Context , in * DeleteWorkerRequest , opts ... grpc . CallOption ) ( * DeleteWorkerResponse , error )
2022-07-14 10:19:03 -07:00
// AddWorkerTags adds api tags to an existing Worker. If missing, malformed,
// or referencing a non-existing resource, an error is returned.
AddWorkerTags ( ctx context . Context , in * AddWorkerTagsRequest , opts ... grpc . CallOption ) ( * AddWorkerTagsResponse , error )
// SetWorkerTags sets api tags for an existing Worker. Any existing tags are overridden
// if they are not included in this request. If missing, malformed, or referencing a
// non-existing resource, an error is returned.
SetWorkerTags ( ctx context . Context , in * SetWorkerTagsRequest , opts ... grpc . CallOption ) ( * SetWorkerTagsResponse , error )
// RemoveWorkerTags removes api tags from an existing Worker. If missing, malformed,
// or referencing a non-existing resource, an error is returned.
RemoveWorkerTags ( ctx context . Context , in * RemoveWorkerTagsRequest , opts ... grpc . CallOption ) ( * RemoveWorkerTagsResponse , error )
2022-05-27 08:29:23 -07:00
}
type workerServiceClient struct {
cc grpc . ClientConnInterface
}
func NewWorkerServiceClient ( cc grpc . ClientConnInterface ) WorkerServiceClient {
return & workerServiceClient { cc }
}
func ( c * workerServiceClient ) GetWorker ( ctx context . Context , in * GetWorkerRequest , opts ... grpc . CallOption ) ( * GetWorkerResponse , error ) {
out := new ( GetWorkerResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.WorkerService/GetWorker" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * workerServiceClient ) ListWorkers ( ctx context . Context , in * ListWorkersRequest , opts ... grpc . CallOption ) ( * ListWorkersResponse , error ) {
out := new ( ListWorkersResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.WorkerService/ListWorkers" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2022-06-07 11:50:30 -04:00
func ( c * workerServiceClient ) CreateWorkerLed ( ctx context . Context , in * CreateWorkerLedRequest , opts ... grpc . CallOption ) ( * CreateWorkerLedResponse , error ) {
out := new ( CreateWorkerLedResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.WorkerService/CreateWorkerLed" , in , out , opts ... )
2022-05-27 08:29:23 -07:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * workerServiceClient ) UpdateWorker ( ctx context . Context , in * UpdateWorkerRequest , opts ... grpc . CallOption ) ( * UpdateWorkerResponse , error ) {
out := new ( UpdateWorkerResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.WorkerService/UpdateWorker" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * workerServiceClient ) DeleteWorker ( ctx context . Context , in * DeleteWorkerRequest , opts ... grpc . CallOption ) ( * DeleteWorkerResponse , error ) {
out := new ( DeleteWorkerResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.WorkerService/DeleteWorker" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2022-07-14 10:19:03 -07:00
func ( c * workerServiceClient ) AddWorkerTags ( ctx context . Context , in * AddWorkerTagsRequest , opts ... grpc . CallOption ) ( * AddWorkerTagsResponse , error ) {
out := new ( AddWorkerTagsResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.WorkerService/AddWorkerTags" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * workerServiceClient ) SetWorkerTags ( ctx context . Context , in * SetWorkerTagsRequest , opts ... grpc . CallOption ) ( * SetWorkerTagsResponse , error ) {
out := new ( SetWorkerTagsResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.WorkerService/SetWorkerTags" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * workerServiceClient ) RemoveWorkerTags ( ctx context . Context , in * RemoveWorkerTagsRequest , opts ... grpc . CallOption ) ( * RemoveWorkerTagsResponse , error ) {
out := new ( RemoveWorkerTagsResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.WorkerService/RemoveWorkerTags" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2022-05-27 08:29:23 -07:00
// WorkerServiceServer is the server API for WorkerService service.
// All implementations must embed UnimplementedWorkerServiceServer
// for forward compatibility
type WorkerServiceServer interface {
// GetWorker returns a stored Worker if present. The provided request
// must include the Worker ID for the Worker being retrieved. If
// that ID is missing, malformed or reference a non existing
// resource an error is returned.
GetWorker ( context . Context , * GetWorkerRequest ) ( * GetWorkerResponse , error )
// ListWorkers returns a list of stored Workers which exist inside the provided
// scope. The request must include the scope ID for the Workers being listed.
// If the scope ID is missing, malformed, or reference a non existing scope,
// an error is returned.
ListWorkers ( context . Context , * ListWorkersRequest ) ( * ListWorkersResponse , error )
2022-06-07 11:50:30 -04:00
// CreateWorkerLed creates and stores a Worker in boundary. The provided
2022-05-27 08:29:23 -07:00
// request must include the Scope id in which the Worker will be created.
// If the Scope id is missing, malformed or references a non existing
// resource, an error is returned. If a name is provided that is in
// use in another Worker in the same scope, an error is returned.
2022-06-07 11:50:30 -04:00
CreateWorkerLed ( context . Context , * CreateWorkerLedRequest ) ( * CreateWorkerLedResponse , error )
2022-05-27 08:29:23 -07:00
// UpdateWorker updates an existing Worker in boundary. The provided
// Worker must not have any read only fields set. The update mask must be
// included in the request and contain at least 1 mutable field. To unset
// a field's value, include the field in the update mask and don't set it
// in the provided Worker. An error is returned if either the Worker id is
// missing or reference a non existing resource. An error is also returned
// if the request attempts to update the name to one that is already in use
// in this Scope.
UpdateWorker ( context . Context , * UpdateWorkerRequest ) ( * UpdateWorkerResponse , error )
// DeleteWorker removes a Worker from Boundary. If the provided Worker ID
// is malformed or not provided an error is returned.
DeleteWorker ( context . Context , * DeleteWorkerRequest ) ( * DeleteWorkerResponse , error )
2022-07-14 10:19:03 -07:00
// AddWorkerTags adds api tags to an existing Worker. If missing, malformed,
// or referencing a non-existing resource, an error is returned.
AddWorkerTags ( context . Context , * AddWorkerTagsRequest ) ( * AddWorkerTagsResponse , error )
// SetWorkerTags sets api tags for an existing Worker. Any existing tags are overridden
// if they are not included in this request. If missing, malformed, or referencing a
// non-existing resource, an error is returned.
SetWorkerTags ( context . Context , * SetWorkerTagsRequest ) ( * SetWorkerTagsResponse , error )
// RemoveWorkerTags removes api tags from an existing Worker. If missing, malformed,
// or referencing a non-existing resource, an error is returned.
RemoveWorkerTags ( context . Context , * RemoveWorkerTagsRequest ) ( * RemoveWorkerTagsResponse , error )
2022-05-27 08:29:23 -07:00
mustEmbedUnimplementedWorkerServiceServer ()
}
// UnimplementedWorkerServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWorkerServiceServer struct {
}
func ( UnimplementedWorkerServiceServer ) GetWorker ( context . Context , * GetWorkerRequest ) ( * GetWorkerResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetWorker not implemented" )
}
func ( UnimplementedWorkerServiceServer ) ListWorkers ( context . Context , * ListWorkersRequest ) ( * ListWorkersResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ListWorkers not implemented" )
}
2022-06-07 11:50:30 -04:00
func ( UnimplementedWorkerServiceServer ) CreateWorkerLed ( context . Context , * CreateWorkerLedRequest ) ( * CreateWorkerLedResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method CreateWorkerLed not implemented" )
2022-05-27 08:29:23 -07:00
}
func ( UnimplementedWorkerServiceServer ) UpdateWorker ( context . Context , * UpdateWorkerRequest ) ( * UpdateWorkerResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method UpdateWorker not implemented" )
}
func ( UnimplementedWorkerServiceServer ) DeleteWorker ( context . Context , * DeleteWorkerRequest ) ( * DeleteWorkerResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method DeleteWorker not implemented" )
}
2022-07-14 10:19:03 -07:00
func ( UnimplementedWorkerServiceServer ) AddWorkerTags ( context . Context , * AddWorkerTagsRequest ) ( * AddWorkerTagsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method AddWorkerTags not implemented" )
}
func ( UnimplementedWorkerServiceServer ) SetWorkerTags ( context . Context , * SetWorkerTagsRequest ) ( * SetWorkerTagsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method SetWorkerTags not implemented" )
}
func ( UnimplementedWorkerServiceServer ) RemoveWorkerTags ( context . Context , * RemoveWorkerTagsRequest ) ( * RemoveWorkerTagsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method RemoveWorkerTags not implemented" )
}
2022-05-27 08:29:23 -07:00
func ( UnimplementedWorkerServiceServer ) mustEmbedUnimplementedWorkerServiceServer () {}
// UnsafeWorkerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WorkerServiceServer will
// result in compilation errors.
type UnsafeWorkerServiceServer interface {
mustEmbedUnimplementedWorkerServiceServer ()
}
func RegisterWorkerServiceServer ( s grpc . ServiceRegistrar , srv WorkerServiceServer ) {
s . RegisterService ( & WorkerService_ServiceDesc , srv )
}
func _WorkerService_GetWorker_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( GetWorkerRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( WorkerServiceServer ). GetWorker ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.WorkerService/GetWorker" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( WorkerServiceServer ). GetWorker ( ctx , req .( * GetWorkerRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _WorkerService_ListWorkers_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( ListWorkersRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( WorkerServiceServer ). ListWorkers ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.WorkerService/ListWorkers" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( WorkerServiceServer ). ListWorkers ( ctx , req .( * ListWorkersRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2022-06-07 11:50:30 -04:00
func _WorkerService_CreateWorkerLed_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( CreateWorkerLedRequest )
2022-05-27 08:29:23 -07:00
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
2022-06-07 11:50:30 -04:00
return srv .( WorkerServiceServer ). CreateWorkerLed ( ctx , in )
2022-05-27 08:29:23 -07:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2022-06-07 11:50:30 -04:00
FullMethod : "/controller.api.services.v1.WorkerService/CreateWorkerLed" ,
2022-05-27 08:29:23 -07:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
2022-06-07 11:50:30 -04:00
return srv .( WorkerServiceServer ). CreateWorkerLed ( ctx , req .( * CreateWorkerLedRequest ))
2022-05-27 08:29:23 -07:00
}
return interceptor ( ctx , in , info , handler )
}
func _WorkerService_UpdateWorker_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( UpdateWorkerRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( WorkerServiceServer ). UpdateWorker ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.WorkerService/UpdateWorker" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( WorkerServiceServer ). UpdateWorker ( ctx , req .( * UpdateWorkerRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _WorkerService_DeleteWorker_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( DeleteWorkerRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( WorkerServiceServer ). DeleteWorker ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.WorkerService/DeleteWorker" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( WorkerServiceServer ). DeleteWorker ( ctx , req .( * DeleteWorkerRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2022-07-14 10:19:03 -07:00
func _WorkerService_AddWorkerTags_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( AddWorkerTagsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( WorkerServiceServer ). AddWorkerTags ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.WorkerService/AddWorkerTags" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( WorkerServiceServer ). AddWorkerTags ( ctx , req .( * AddWorkerTagsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _WorkerService_SetWorkerTags_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( SetWorkerTagsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( WorkerServiceServer ). SetWorkerTags ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.WorkerService/SetWorkerTags" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( WorkerServiceServer ). SetWorkerTags ( ctx , req .( * SetWorkerTagsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _WorkerService_RemoveWorkerTags_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( RemoveWorkerTagsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( WorkerServiceServer ). RemoveWorkerTags ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.WorkerService/RemoveWorkerTags" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( WorkerServiceServer ). RemoveWorkerTags ( ctx , req .( * RemoveWorkerTagsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2022-05-27 08:29:23 -07:00
// WorkerService_ServiceDesc is the grpc.ServiceDesc for WorkerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WorkerService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "controller.api.services.v1.WorkerService" ,
HandlerType : ( * WorkerServiceServer )( nil ),
Methods : [] grpc . MethodDesc {
{
MethodName : "GetWorker" ,
Handler : _WorkerService_GetWorker_Handler ,
},
{
MethodName : "ListWorkers" ,
Handler : _WorkerService_ListWorkers_Handler ,
},
{
2022-06-07 11:50:30 -04:00
MethodName : "CreateWorkerLed" ,
Handler : _WorkerService_CreateWorkerLed_Handler ,
2022-05-27 08:29:23 -07:00
},
{
MethodName : "UpdateWorker" ,
Handler : _WorkerService_UpdateWorker_Handler ,
},
{
MethodName : "DeleteWorker" ,
Handler : _WorkerService_DeleteWorker_Handler ,
},
2022-07-14 10:19:03 -07:00
{
MethodName : "AddWorkerTags" ,
Handler : _WorkerService_AddWorkerTags_Handler ,
},
{
MethodName : "SetWorkerTags" ,
Handler : _WorkerService_SetWorkerTags_Handler ,
},
{
MethodName : "RemoveWorkerTags" ,
Handler : _WorkerService_RemoveWorkerTags_Handler ,
},
2022-05-27 08:29:23 -07:00
},
Streams : [] grpc . StreamDesc {},
Metadata : "controller/api/services/v1/worker_service.proto" ,
}