2023-11-01 16:21:17 -04:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
2020-10-09 13:18:53 -04:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2023-11-01 16:21:17 -04:00
// versions:
2025-05-23 09:42:26 -07:00
// - protoc-gen-go-grpc v1.5.1
2023-11-01 16:21:17 -04:00
// - protoc (unknown)
// source: controller/api/services/v1/role_service.proto
2020-10-09 13:18:53 -04:00
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.
2025-05-23 09:42:26 -07:00
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
2020-10-09 13:18:53 -04:00
2023-11-01 16:21:17 -04:00
const (
2024-01-23 14:33:09 -05:00
RoleService_GetRole_FullMethodName = "/controller.api.services.v1.RoleService/GetRole"
RoleService_ListRoles_FullMethodName = "/controller.api.services.v1.RoleService/ListRoles"
RoleService_CreateRole_FullMethodName = "/controller.api.services.v1.RoleService/CreateRole"
RoleService_UpdateRole_FullMethodName = "/controller.api.services.v1.RoleService/UpdateRole"
RoleService_DeleteRole_FullMethodName = "/controller.api.services.v1.RoleService/DeleteRole"
RoleService_AddRolePrincipals_FullMethodName = "/controller.api.services.v1.RoleService/AddRolePrincipals"
RoleService_SetRolePrincipals_FullMethodName = "/controller.api.services.v1.RoleService/SetRolePrincipals"
RoleService_RemoveRolePrincipals_FullMethodName = "/controller.api.services.v1.RoleService/RemoveRolePrincipals"
RoleService_AddRoleGrants_FullMethodName = "/controller.api.services.v1.RoleService/AddRoleGrants"
RoleService_SetRoleGrants_FullMethodName = "/controller.api.services.v1.RoleService/SetRoleGrants"
RoleService_RemoveRoleGrants_FullMethodName = "/controller.api.services.v1.RoleService/RemoveRoleGrants"
RoleService_AddRoleGrantScopes_FullMethodName = "/controller.api.services.v1.RoleService/AddRoleGrantScopes"
RoleService_SetRoleGrantScopes_FullMethodName = "/controller.api.services.v1.RoleService/SetRoleGrantScopes"
RoleService_RemoveRoleGrantScopes_FullMethodName = "/controller.api.services.v1.RoleService/RemoveRoleGrantScopes"
2023-11-01 16:21:17 -04:00
)
2020-10-09 13:18:53 -04:00
// RoleServiceClient is the client API for RoleService 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 RoleServiceClient interface {
// GetRole returns a stored Role if present. The provided request must include
// the Role ID for the Role being retrieved. If the ID is missing, malformed
// or reference a non-existing resource an error is returned.
GetRole ( ctx context . Context , in * GetRoleRequest , opts ... grpc . CallOption ) ( * GetRoleResponse , error )
// ListRoles returns a list of stored Roles which exist inside the scope
// referenced inside the request. The request must include the scope ID for
// the Roles being retrieved. If the scope ID is missing, malformed, or
// reference a non-existing scope, an error is returned.
ListRoles ( ctx context . Context , in * ListRolesRequest , opts ... grpc . CallOption ) ( * ListRolesResponse , error )
// CreateRole creates and stores a Role. The provided request must include the
// scope ID in which the Role will be created. If the scope ID is missing,
// malformed, or references a non-existing scope, an error is returned. If a
// name is provided that is in use in another Role in the same scope, an error
// is returned.
CreateRole ( ctx context . Context , in * CreateRoleRequest , opts ... grpc . CallOption ) ( * CreateRoleResponse , error )
// UpdateRole updates an existing Role in boundary. The provided
// Role 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 Role. An error is returned if either the scope
// or Role IDs are 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 the same scope.
UpdateRole ( ctx context . Context , in * UpdateRoleRequest , opts ... grpc . CallOption ) ( * UpdateRoleResponse , error )
// DeleteRole removes a Role from Boundary. If the provided scope or Role IDs
// are malformed, or not provided an error is returned.
DeleteRole ( ctx context . Context , in * DeleteRoleRequest , opts ... grpc . CallOption ) ( * DeleteRoleResponse , error )
// AddRolePrincipals adds users and/or groups to a Role. The provided request
// must include the Role ID to which the users and/or groups will be added.
// If the Role ID is missing, malformed, or reference non-existing resources,
// an error is returned. An error is also returned if the request attempts to
// add a principal that is already part of the role.
AddRolePrincipals ( ctx context . Context , in * AddRolePrincipalsRequest , opts ... grpc . CallOption ) ( * AddRolePrincipalsResponse , error )
// SetRolePrincipals sets the Role's users and/or groups. Any existing
// principals on the Role are deleted if they are not included in this
// request. The provided request must include the Role ID on
// which the users and/or groups will be set. If the Role ID is
// missing, malformed, or referencing a non-existing resource, an error is
// returned.
SetRolePrincipals ( ctx context . Context , in * SetRolePrincipalsRequest , opts ... grpc . CallOption ) ( * SetRolePrincipalsResponse , error )
// RemoveRolePrincipals removes the users and/or groups from the specified
// Role. The provided request must include the Role ID from
// which the users and/or groups will be removed. If that ID is missing,
// malformed, or reference a non-existing resource, an error is returned.
// An error is returned if a remove is called for a principal that is not
// part of the role.
RemoveRolePrincipals ( ctx context . Context , in * RemoveRolePrincipalsRequest , opts ... grpc . CallOption ) ( * RemoveRolePrincipalsResponse , error )
// AddRoleGrants adds grants to a Role. The provided request must include
// the Role id which the grants will be added to. An error is returned
// if the provided id is malformed or references a non-existing resource.
AddRoleGrants ( ctx context . Context , in * AddRoleGrantsRequest , opts ... grpc . CallOption ) ( * AddRoleGrantsResponse , error )
// SetRoleGrants sets the Role's grants. Any existing grants on the Role are
// deleted if they are not included in this request. The provided request must
// include the Role ID on which the grants will be set. If missing, malformed,
// or referencing a non-existing resource, an error is returned.
SetRoleGrants ( ctx context . Context , in * SetRoleGrantsRequest , opts ... grpc . CallOption ) ( * SetRoleGrantsResponse , error )
// RemoveRoleGrants removes the grants from the specified Role.
// The provided request must include the Role IDs from which the
// grants will be removed. If missing, malformed, or references a non-existing
// resource, an error is returned.
RemoveRoleGrants ( ctx context . Context , in * RemoveRoleGrantsRequest , opts ... grpc . CallOption ) ( * RemoveRoleGrantsResponse , error )
2024-01-23 14:33:09 -05:00
// AddRoleGrantScopes adds grants scopes to a Role. The provided request must
// include the Role id which the grant scopes will be added to. An error is
// returned if the provided id is malformed or references a non-existing
// resource.
AddRoleGrantScopes ( ctx context . Context , in * AddRoleGrantScopesRequest , opts ... grpc . CallOption ) ( * AddRoleGrantScopesResponse , error )
// SetRoleGrants sets the Role's grant scopes. Any existing grant scopes on
// the Role are deleted if they are not included in this request. The provided
// request must include the Role ID on which the grants will be set. If
// missing, malformed, or referencing a non-existing resource, an error is
// returned.
SetRoleGrantScopes ( ctx context . Context , in * SetRoleGrantScopesRequest , opts ... grpc . CallOption ) ( * SetRoleGrantScopesResponse , error )
// RemoveRoleGrantScopes removes the grant scopes from the specified Role. The
// provided request must include the Role IDs from which the grants will be
// removed. If missing, malformed, or references a non-existing resource, an
// error is returned.
RemoveRoleGrantScopes ( ctx context . Context , in * RemoveRoleGrantScopesRequest , opts ... grpc . CallOption ) ( * RemoveRoleGrantScopesResponse , error )
2020-10-09 13:18:53 -04:00
}
type roleServiceClient struct {
cc grpc . ClientConnInterface
}
func NewRoleServiceClient ( cc grpc . ClientConnInterface ) RoleServiceClient {
return & roleServiceClient { cc }
}
func ( c * roleServiceClient ) GetRole ( ctx context . Context , in * GetRoleRequest , opts ... grpc . CallOption ) ( * GetRoleResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( GetRoleResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_GetRole_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) ListRoles ( ctx context . Context , in * ListRolesRequest , opts ... grpc . CallOption ) ( * ListRolesResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( ListRolesResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_ListRoles_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) CreateRole ( ctx context . Context , in * CreateRoleRequest , opts ... grpc . CallOption ) ( * CreateRoleResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( CreateRoleResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_CreateRole_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) UpdateRole ( ctx context . Context , in * UpdateRoleRequest , opts ... grpc . CallOption ) ( * UpdateRoleResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( UpdateRoleResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_UpdateRole_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) DeleteRole ( ctx context . Context , in * DeleteRoleRequest , opts ... grpc . CallOption ) ( * DeleteRoleResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( DeleteRoleResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_DeleteRole_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) AddRolePrincipals ( ctx context . Context , in * AddRolePrincipalsRequest , opts ... grpc . CallOption ) ( * AddRolePrincipalsResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( AddRolePrincipalsResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_AddRolePrincipals_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) SetRolePrincipals ( ctx context . Context , in * SetRolePrincipalsRequest , opts ... grpc . CallOption ) ( * SetRolePrincipalsResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( SetRolePrincipalsResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_SetRolePrincipals_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) RemoveRolePrincipals ( ctx context . Context , in * RemoveRolePrincipalsRequest , opts ... grpc . CallOption ) ( * RemoveRolePrincipalsResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( RemoveRolePrincipalsResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_RemoveRolePrincipals_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) AddRoleGrants ( ctx context . Context , in * AddRoleGrantsRequest , opts ... grpc . CallOption ) ( * AddRoleGrantsResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( AddRoleGrantsResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_AddRoleGrants_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) SetRoleGrants ( ctx context . Context , in * SetRoleGrantsRequest , opts ... grpc . CallOption ) ( * SetRoleGrantsResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( SetRoleGrantsResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_SetRoleGrants_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) RemoveRoleGrants ( ctx context . Context , in * RemoveRoleGrantsRequest , opts ... grpc . CallOption ) ( * RemoveRoleGrantsResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( RemoveRoleGrantsResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_RemoveRoleGrants_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
2024-01-23 14:33:09 -05:00
func ( c * roleServiceClient ) AddRoleGrantScopes ( ctx context . Context , in * AddRoleGrantScopesRequest , opts ... grpc . CallOption ) ( * AddRoleGrantScopesResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2024-01-23 14:33:09 -05:00
out := new ( AddRoleGrantScopesResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_AddRoleGrantScopes_FullMethodName , in , out , cOpts ... )
2024-01-23 14:33:09 -05:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) SetRoleGrantScopes ( ctx context . Context , in * SetRoleGrantScopesRequest , opts ... grpc . CallOption ) ( * SetRoleGrantScopesResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2024-01-23 14:33:09 -05:00
out := new ( SetRoleGrantScopesResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_SetRoleGrantScopes_FullMethodName , in , out , cOpts ... )
2024-01-23 14:33:09 -05:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * roleServiceClient ) RemoveRoleGrantScopes ( ctx context . Context , in * RemoveRoleGrantScopesRequest , opts ... grpc . CallOption ) ( * RemoveRoleGrantScopesResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2024-01-23 14:33:09 -05:00
out := new ( RemoveRoleGrantScopesResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , RoleService_RemoveRoleGrantScopes_FullMethodName , in , out , cOpts ... )
2024-01-23 14:33:09 -05:00
if err != nil {
return nil , err
}
return out , nil
}
2020-10-09 13:18:53 -04:00
// RoleServiceServer is the server API for RoleService service.
2020-11-11 14:41:05 -05:00
// All implementations must embed UnimplementedRoleServiceServer
2025-05-23 09:42:26 -07:00
// for forward compatibility.
2020-10-09 13:18:53 -04:00
type RoleServiceServer interface {
// GetRole returns a stored Role if present. The provided request must include
// the Role ID for the Role being retrieved. If the ID is missing, malformed
// or reference a non-existing resource an error is returned.
GetRole ( context . Context , * GetRoleRequest ) ( * GetRoleResponse , error )
// ListRoles returns a list of stored Roles which exist inside the scope
// referenced inside the request. The request must include the scope ID for
// the Roles being retrieved. If the scope ID is missing, malformed, or
// reference a non-existing scope, an error is returned.
ListRoles ( context . Context , * ListRolesRequest ) ( * ListRolesResponse , error )
// CreateRole creates and stores a Role. The provided request must include the
// scope ID in which the Role will be created. If the scope ID is missing,
// malformed, or references a non-existing scope, an error is returned. If a
// name is provided that is in use in another Role in the same scope, an error
// is returned.
CreateRole ( context . Context , * CreateRoleRequest ) ( * CreateRoleResponse , error )
// UpdateRole updates an existing Role in boundary. The provided
// Role 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 Role. An error is returned if either the scope
// or Role IDs are 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 the same scope.
UpdateRole ( context . Context , * UpdateRoleRequest ) ( * UpdateRoleResponse , error )
// DeleteRole removes a Role from Boundary. If the provided scope or Role IDs
// are malformed, or not provided an error is returned.
DeleteRole ( context . Context , * DeleteRoleRequest ) ( * DeleteRoleResponse , error )
// AddRolePrincipals adds users and/or groups to a Role. The provided request
// must include the Role ID to which the users and/or groups will be added.
// If the Role ID is missing, malformed, or reference non-existing resources,
// an error is returned. An error is also returned if the request attempts to
// add a principal that is already part of the role.
AddRolePrincipals ( context . Context , * AddRolePrincipalsRequest ) ( * AddRolePrincipalsResponse , error )
// SetRolePrincipals sets the Role's users and/or groups. Any existing
// principals on the Role are deleted if they are not included in this
// request. The provided request must include the Role ID on
// which the users and/or groups will be set. If the Role ID is
// missing, malformed, or referencing a non-existing resource, an error is
// returned.
SetRolePrincipals ( context . Context , * SetRolePrincipalsRequest ) ( * SetRolePrincipalsResponse , error )
// RemoveRolePrincipals removes the users and/or groups from the specified
// Role. The provided request must include the Role ID from
// which the users and/or groups will be removed. If that ID is missing,
// malformed, or reference a non-existing resource, an error is returned.
// An error is returned if a remove is called for a principal that is not
// part of the role.
RemoveRolePrincipals ( context . Context , * RemoveRolePrincipalsRequest ) ( * RemoveRolePrincipalsResponse , error )
// AddRoleGrants adds grants to a Role. The provided request must include
// the Role id which the grants will be added to. An error is returned
// if the provided id is malformed or references a non-existing resource.
AddRoleGrants ( context . Context , * AddRoleGrantsRequest ) ( * AddRoleGrantsResponse , error )
// SetRoleGrants sets the Role's grants. Any existing grants on the Role are
// deleted if they are not included in this request. The provided request must
// include the Role ID on which the grants will be set. If missing, malformed,
// or referencing a non-existing resource, an error is returned.
SetRoleGrants ( context . Context , * SetRoleGrantsRequest ) ( * SetRoleGrantsResponse , error )
// RemoveRoleGrants removes the grants from the specified Role.
// The provided request must include the Role IDs from which the
// grants will be removed. If missing, malformed, or references a non-existing
// resource, an error is returned.
RemoveRoleGrants ( context . Context , * RemoveRoleGrantsRequest ) ( * RemoveRoleGrantsResponse , error )
2024-01-23 14:33:09 -05:00
// AddRoleGrantScopes adds grants scopes to a Role. The provided request must
// include the Role id which the grant scopes will be added to. An error is
// returned if the provided id is malformed or references a non-existing
// resource.
AddRoleGrantScopes ( context . Context , * AddRoleGrantScopesRequest ) ( * AddRoleGrantScopesResponse , error )
// SetRoleGrants sets the Role's grant scopes. Any existing grant scopes on
// the Role are deleted if they are not included in this request. The provided
// request must include the Role ID on which the grants will be set. If
// missing, malformed, or referencing a non-existing resource, an error is
// returned.
SetRoleGrantScopes ( context . Context , * SetRoleGrantScopesRequest ) ( * SetRoleGrantScopesResponse , error )
// RemoveRoleGrantScopes removes the grant scopes from the specified Role. The
// provided request must include the Role IDs from which the grants will be
// removed. If missing, malformed, or references a non-existing resource, an
// error is returned.
RemoveRoleGrantScopes ( context . Context , * RemoveRoleGrantScopesRequest ) ( * RemoveRoleGrantScopesResponse , error )
2020-11-11 14:41:05 -05:00
mustEmbedUnimplementedRoleServiceServer ()
2020-10-09 13:18:53 -04:00
}
2025-05-23 09:42:26 -07:00
// UnimplementedRoleServiceServer 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 UnimplementedRoleServiceServer struct {}
2020-10-09 13:18:53 -04:00
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) GetRole ( context . Context , * GetRoleRequest ) ( * GetRoleResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method GetRole not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) ListRoles ( context . Context , * ListRolesRequest ) ( * ListRolesResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method ListRoles not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) CreateRole ( context . Context , * CreateRoleRequest ) ( * CreateRoleResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method CreateRole not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) UpdateRole ( context . Context , * UpdateRoleRequest ) ( * UpdateRoleResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method UpdateRole not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) DeleteRole ( context . Context , * DeleteRoleRequest ) ( * DeleteRoleResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method DeleteRole not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) AddRolePrincipals ( context . Context , * AddRolePrincipalsRequest ) ( * AddRolePrincipalsResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method AddRolePrincipals not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) SetRolePrincipals ( context . Context , * SetRolePrincipalsRequest ) ( * SetRolePrincipalsResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method SetRolePrincipals not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) RemoveRolePrincipals ( context . Context , * RemoveRolePrincipalsRequest ) ( * RemoveRolePrincipalsResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method RemoveRolePrincipals not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) AddRoleGrants ( context . Context , * AddRoleGrantsRequest ) ( * AddRoleGrantsResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method AddRoleGrants not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) SetRoleGrants ( context . Context , * SetRoleGrantsRequest ) ( * SetRoleGrantsResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method SetRoleGrants not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) RemoveRoleGrants ( context . Context , * RemoveRoleGrantsRequest ) ( * RemoveRoleGrantsResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method RemoveRoleGrants not implemented" )
}
2024-01-23 14:33:09 -05:00
func ( UnimplementedRoleServiceServer ) AddRoleGrantScopes ( context . Context , * AddRoleGrantScopesRequest ) ( * AddRoleGrantScopesResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method AddRoleGrantScopes not implemented" )
}
func ( UnimplementedRoleServiceServer ) SetRoleGrantScopes ( context . Context , * SetRoleGrantScopesRequest ) ( * SetRoleGrantScopesResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method SetRoleGrantScopes not implemented" )
}
func ( UnimplementedRoleServiceServer ) RemoveRoleGrantScopes ( context . Context , * RemoveRoleGrantScopesRequest ) ( * RemoveRoleGrantScopesResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method RemoveRoleGrantScopes not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedRoleServiceServer ) mustEmbedUnimplementedRoleServiceServer () {}
2025-05-23 09:42:26 -07:00
func ( UnimplementedRoleServiceServer ) testEmbeddedByValue () {}
2020-10-09 13:18:53 -04:00
2020-11-11 14:41:05 -05:00
// UnsafeRoleServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RoleServiceServer will
// result in compilation errors.
type UnsafeRoleServiceServer interface {
mustEmbedUnimplementedRoleServiceServer ()
}
func RegisterRoleServiceServer ( s grpc . ServiceRegistrar , srv RoleServiceServer ) {
2025-05-23 09:42:26 -07:00
// If the following call pancis, it indicates UnimplementedRoleServiceServer 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 ()
}
2021-02-22 12:46:00 -05:00
s . RegisterService ( & RoleService_ServiceDesc , srv )
2020-10-09 13:18:53 -04:00
}
func _RoleService_GetRole_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( GetRoleRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). GetRole ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_GetRole_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). GetRole ( ctx , req .( * GetRoleRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_ListRoles_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( ListRolesRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). ListRoles ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_ListRoles_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). ListRoles ( ctx , req .( * ListRolesRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_CreateRole_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( CreateRoleRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). CreateRole ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_CreateRole_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). CreateRole ( ctx , req .( * CreateRoleRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_UpdateRole_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( UpdateRoleRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). UpdateRole ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_UpdateRole_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). UpdateRole ( ctx , req .( * UpdateRoleRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_DeleteRole_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( DeleteRoleRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). DeleteRole ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_DeleteRole_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). DeleteRole ( ctx , req .( * DeleteRoleRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_AddRolePrincipals_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( AddRolePrincipalsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). AddRolePrincipals ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_AddRolePrincipals_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). AddRolePrincipals ( ctx , req .( * AddRolePrincipalsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_SetRolePrincipals_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( SetRolePrincipalsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). SetRolePrincipals ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_SetRolePrincipals_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). SetRolePrincipals ( ctx , req .( * SetRolePrincipalsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_RemoveRolePrincipals_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( RemoveRolePrincipalsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). RemoveRolePrincipals ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_RemoveRolePrincipals_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). RemoveRolePrincipals ( ctx , req .( * RemoveRolePrincipalsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_AddRoleGrants_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( AddRoleGrantsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). AddRoleGrants ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_AddRoleGrants_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). AddRoleGrants ( ctx , req .( * AddRoleGrantsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_SetRoleGrants_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( SetRoleGrantsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). SetRoleGrants ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_SetRoleGrants_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). SetRoleGrants ( ctx , req .( * SetRoleGrantsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_RemoveRoleGrants_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( RemoveRoleGrantsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). RemoveRoleGrants ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : RoleService_RemoveRoleGrants_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). RemoveRoleGrants ( ctx , req .( * RemoveRoleGrantsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2024-01-23 14:33:09 -05:00
func _RoleService_AddRoleGrantScopes_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( AddRoleGrantScopesRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). AddRoleGrantScopes ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : RoleService_AddRoleGrantScopes_FullMethodName ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). AddRoleGrantScopes ( ctx , req .( * AddRoleGrantScopesRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_SetRoleGrantScopes_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( SetRoleGrantScopesRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). SetRoleGrantScopes ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : RoleService_SetRoleGrantScopes_FullMethodName ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). SetRoleGrantScopes ( ctx , req .( * SetRoleGrantScopesRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _RoleService_RemoveRoleGrantScopes_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( RemoveRoleGrantScopesRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( RoleServiceServer ). RemoveRoleGrantScopes ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : RoleService_RemoveRoleGrantScopes_FullMethodName ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( RoleServiceServer ). RemoveRoleGrantScopes ( ctx , req .( * RemoveRoleGrantScopesRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2021-02-22 12:46:00 -05:00
// RoleService_ServiceDesc is the grpc.ServiceDesc for RoleService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RoleService_ServiceDesc = grpc . ServiceDesc {
2020-10-09 13:18:53 -04:00
ServiceName : "controller.api.services.v1.RoleService" ,
HandlerType : ( * RoleServiceServer )( nil ),
Methods : [] grpc . MethodDesc {
{
MethodName : "GetRole" ,
Handler : _RoleService_GetRole_Handler ,
},
{
MethodName : "ListRoles" ,
Handler : _RoleService_ListRoles_Handler ,
},
{
MethodName : "CreateRole" ,
Handler : _RoleService_CreateRole_Handler ,
},
{
MethodName : "UpdateRole" ,
Handler : _RoleService_UpdateRole_Handler ,
},
{
MethodName : "DeleteRole" ,
Handler : _RoleService_DeleteRole_Handler ,
},
{
MethodName : "AddRolePrincipals" ,
Handler : _RoleService_AddRolePrincipals_Handler ,
},
{
MethodName : "SetRolePrincipals" ,
Handler : _RoleService_SetRolePrincipals_Handler ,
},
{
MethodName : "RemoveRolePrincipals" ,
Handler : _RoleService_RemoveRolePrincipals_Handler ,
},
{
MethodName : "AddRoleGrants" ,
Handler : _RoleService_AddRoleGrants_Handler ,
},
{
MethodName : "SetRoleGrants" ,
Handler : _RoleService_SetRoleGrants_Handler ,
},
{
MethodName : "RemoveRoleGrants" ,
Handler : _RoleService_RemoveRoleGrants_Handler ,
},
2024-01-23 14:33:09 -05:00
{
MethodName : "AddRoleGrantScopes" ,
Handler : _RoleService_AddRoleGrantScopes_Handler ,
},
{
MethodName : "SetRoleGrantScopes" ,
Handler : _RoleService_SetRoleGrantScopes_Handler ,
},
{
MethodName : "RemoveRoleGrantScopes" ,
Handler : _RoleService_RemoveRoleGrantScopes_Handler ,
},
2020-10-09 13:18:53 -04:00
},
Streams : [] grpc . StreamDesc {},
Metadata : "controller/api/services/v1/role_service.proto" ,
}