Migrate to newer grpc utilities and bump deps (#593)
* Migrate to newer grpc utilities and bump deps * Revert grpc back as it was an accidental tag
This commit is contained in:
1 parent
273cf29ba4
commit
7f00e61ab0
34 files changed
+4511
-4474
No files matched your search
@@ -0,0 +1,546 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// 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)
|
||||
}
|
||||
|
||||
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) {
|
||||
out := new(GetRoleResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/GetRole", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) ListRoles(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error) {
|
||||
out := new(ListRolesResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/ListRoles", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error) {
|
||||
out := new(CreateRoleResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/CreateRole", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*UpdateRoleResponse, error) {
|
||||
out := new(UpdateRoleResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/UpdateRole", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*DeleteRoleResponse, error) {
|
||||
out := new(DeleteRoleResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/DeleteRole", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) AddRolePrincipals(ctx context.Context, in *AddRolePrincipalsRequest, opts ...grpc.CallOption) (*AddRolePrincipalsResponse, error) {
|
||||
out := new(AddRolePrincipalsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/AddRolePrincipals", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) SetRolePrincipals(ctx context.Context, in *SetRolePrincipalsRequest, opts ...grpc.CallOption) (*SetRolePrincipalsResponse, error) {
|
||||
out := new(SetRolePrincipalsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/SetRolePrincipals", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) RemoveRolePrincipals(ctx context.Context, in *RemoveRolePrincipalsRequest, opts ...grpc.CallOption) (*RemoveRolePrincipalsResponse, error) {
|
||||
out := new(RemoveRolePrincipalsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/RemoveRolePrincipals", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) AddRoleGrants(ctx context.Context, in *AddRoleGrantsRequest, opts ...grpc.CallOption) (*AddRoleGrantsResponse, error) {
|
||||
out := new(AddRoleGrantsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/AddRoleGrants", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) SetRoleGrants(ctx context.Context, in *SetRoleGrantsRequest, opts ...grpc.CallOption) (*SetRoleGrantsResponse, error) {
|
||||
out := new(SetRoleGrantsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/SetRoleGrants", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) RemoveRoleGrants(ctx context.Context, in *RemoveRoleGrantsRequest, opts ...grpc.CallOption) (*RemoveRoleGrantsResponse, error) {
|
||||
out := new(RemoveRoleGrantsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/RemoveRoleGrants", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RoleServiceServer is the server API for RoleService service.
|
||||
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)
|
||||
}
|
||||
|
||||
// UnimplementedRoleServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedRoleServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRoleServiceServer) GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListRoles not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) UpdateRole(context.Context, *UpdateRoleRequest) (*UpdateRoleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) DeleteRole(context.Context, *DeleteRoleRequest) (*DeleteRoleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) AddRolePrincipals(context.Context, *AddRolePrincipalsRequest) (*AddRolePrincipalsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddRolePrincipals not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) SetRolePrincipals(context.Context, *SetRolePrincipalsRequest) (*SetRolePrincipalsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetRolePrincipals not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) RemoveRolePrincipals(context.Context, *RemoveRolePrincipalsRequest) (*RemoveRolePrincipalsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveRolePrincipals not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) AddRoleGrants(context.Context, *AddRoleGrantsRequest) (*AddRoleGrantsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddRoleGrants not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) SetRoleGrants(context.Context, *SetRoleGrantsRequest) (*SetRoleGrantsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetRoleGrants not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) RemoveRoleGrants(context.Context, *RemoveRoleGrantsRequest) (*RemoveRoleGrantsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveRoleGrants not implemented")
|
||||
}
|
||||
|
||||
func RegisterRoleServiceServer(s *grpc.Server, srv RoleServiceServer) {
|
||||
s.RegisterService(&_RoleService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/GetRole",
|
||||
}
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/ListRoles",
|
||||
}
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/CreateRole",
|
||||
}
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/UpdateRole",
|
||||
}
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/DeleteRole",
|
||||
}
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/AddRolePrincipals",
|
||||
}
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/SetRolePrincipals",
|
||||
}
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/RemoveRolePrincipals",
|
||||
}
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/AddRoleGrants",
|
||||
}
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/SetRoleGrants",
|
||||
}
|
||||
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,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/RemoveRoleGrants",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).RemoveRoleGrants(ctx, req.(*RemoveRoleGrantsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RoleService_serviceDesc = grpc.ServiceDesc{
|
||||
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,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/role_service.proto",
|
||||
}
|
||||
Reference in new issue
Block a user