Files
Курнат Андрей 2315f25754 Initial QSfera import
2026-06-07 10:20:04 +03:00

923 lines
39 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: qsfera/services/settings/v0/settings.proto
package v0
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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 (
BundleService_SaveBundle_FullMethodName = "/qsfera.services.settings.v0.BundleService/SaveBundle"
BundleService_GetBundle_FullMethodName = "/qsfera.services.settings.v0.BundleService/GetBundle"
BundleService_ListBundles_FullMethodName = "/qsfera.services.settings.v0.BundleService/ListBundles"
BundleService_AddSettingToBundle_FullMethodName = "/qsfera.services.settings.v0.BundleService/AddSettingToBundle"
BundleService_RemoveSettingFromBundle_FullMethodName = "/qsfera.services.settings.v0.BundleService/RemoveSettingFromBundle"
)
// BundleServiceClient is the client API for BundleService 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 BundleServiceClient interface {
SaveBundle(ctx context.Context, in *SaveBundleRequest, opts ...grpc.CallOption) (*SaveBundleResponse, error)
GetBundle(ctx context.Context, in *GetBundleRequest, opts ...grpc.CallOption) (*GetBundleResponse, error)
ListBundles(ctx context.Context, in *ListBundlesRequest, opts ...grpc.CallOption) (*ListBundlesResponse, error)
AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, opts ...grpc.CallOption) (*AddSettingToBundleResponse, error)
RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type bundleServiceClient struct {
cc grpc.ClientConnInterface
}
func NewBundleServiceClient(cc grpc.ClientConnInterface) BundleServiceClient {
return &bundleServiceClient{cc}
}
func (c *bundleServiceClient) SaveBundle(ctx context.Context, in *SaveBundleRequest, opts ...grpc.CallOption) (*SaveBundleResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SaveBundleResponse)
err := c.cc.Invoke(ctx, BundleService_SaveBundle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bundleServiceClient) GetBundle(ctx context.Context, in *GetBundleRequest, opts ...grpc.CallOption) (*GetBundleResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetBundleResponse)
err := c.cc.Invoke(ctx, BundleService_GetBundle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bundleServiceClient) ListBundles(ctx context.Context, in *ListBundlesRequest, opts ...grpc.CallOption) (*ListBundlesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListBundlesResponse)
err := c.cc.Invoke(ctx, BundleService_ListBundles_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bundleServiceClient) AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, opts ...grpc.CallOption) (*AddSettingToBundleResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddSettingToBundleResponse)
err := c.cc.Invoke(ctx, BundleService_AddSettingToBundle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bundleServiceClient) RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, BundleService_RemoveSettingFromBundle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// BundleServiceServer is the server API for BundleService service.
// All implementations must embed UnimplementedBundleServiceServer
// for forward compatibility.
type BundleServiceServer interface {
SaveBundle(context.Context, *SaveBundleRequest) (*SaveBundleResponse, error)
GetBundle(context.Context, *GetBundleRequest) (*GetBundleResponse, error)
ListBundles(context.Context, *ListBundlesRequest) (*ListBundlesResponse, error)
AddSettingToBundle(context.Context, *AddSettingToBundleRequest) (*AddSettingToBundleResponse, error)
RemoveSettingFromBundle(context.Context, *RemoveSettingFromBundleRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedBundleServiceServer()
}
// UnimplementedBundleServiceServer 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 UnimplementedBundleServiceServer struct{}
func (UnimplementedBundleServiceServer) SaveBundle(context.Context, *SaveBundleRequest) (*SaveBundleResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SaveBundle not implemented")
}
func (UnimplementedBundleServiceServer) GetBundle(context.Context, *GetBundleRequest) (*GetBundleResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetBundle not implemented")
}
func (UnimplementedBundleServiceServer) ListBundles(context.Context, *ListBundlesRequest) (*ListBundlesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListBundles not implemented")
}
func (UnimplementedBundleServiceServer) AddSettingToBundle(context.Context, *AddSettingToBundleRequest) (*AddSettingToBundleResponse, error) {
return nil, status.Error(codes.Unimplemented, "method AddSettingToBundle not implemented")
}
func (UnimplementedBundleServiceServer) RemoveSettingFromBundle(context.Context, *RemoveSettingFromBundleRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method RemoveSettingFromBundle not implemented")
}
func (UnimplementedBundleServiceServer) mustEmbedUnimplementedBundleServiceServer() {}
func (UnimplementedBundleServiceServer) testEmbeddedByValue() {}
// UnsafeBundleServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BundleServiceServer will
// result in compilation errors.
type UnsafeBundleServiceServer interface {
mustEmbedUnimplementedBundleServiceServer()
}
func RegisterBundleServiceServer(s grpc.ServiceRegistrar, srv BundleServiceServer) {
// If the following call panics, it indicates UnimplementedBundleServiceServer 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(&BundleService_ServiceDesc, srv)
}
func _BundleService_SaveBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SaveBundleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BundleServiceServer).SaveBundle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BundleService_SaveBundle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BundleServiceServer).SaveBundle(ctx, req.(*SaveBundleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BundleService_GetBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBundleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BundleServiceServer).GetBundle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BundleService_GetBundle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BundleServiceServer).GetBundle(ctx, req.(*GetBundleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BundleService_ListBundles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListBundlesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BundleServiceServer).ListBundles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BundleService_ListBundles_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BundleServiceServer).ListBundles(ctx, req.(*ListBundlesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BundleService_AddSettingToBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddSettingToBundleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BundleServiceServer).AddSettingToBundle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BundleService_AddSettingToBundle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BundleServiceServer).AddSettingToBundle(ctx, req.(*AddSettingToBundleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _BundleService_RemoveSettingFromBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveSettingFromBundleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BundleServiceServer).RemoveSettingFromBundle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: BundleService_RemoveSettingFromBundle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BundleServiceServer).RemoveSettingFromBundle(ctx, req.(*RemoveSettingFromBundleRequest))
}
return interceptor(ctx, in, info, handler)
}
// BundleService_ServiceDesc is the grpc.ServiceDesc for BundleService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BundleService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "qsfera.services.settings.v0.BundleService",
HandlerType: (*BundleServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SaveBundle",
Handler: _BundleService_SaveBundle_Handler,
},
{
MethodName: "GetBundle",
Handler: _BundleService_GetBundle_Handler,
},
{
MethodName: "ListBundles",
Handler: _BundleService_ListBundles_Handler,
},
{
MethodName: "AddSettingToBundle",
Handler: _BundleService_AddSettingToBundle_Handler,
},
{
MethodName: "RemoveSettingFromBundle",
Handler: _BundleService_RemoveSettingFromBundle_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "qsfera/services/settings/v0/settings.proto",
}
const (
ValueService_SaveValue_FullMethodName = "/qsfera.services.settings.v0.ValueService/SaveValue"
ValueService_GetValue_FullMethodName = "/qsfera.services.settings.v0.ValueService/GetValue"
ValueService_ListValues_FullMethodName = "/qsfera.services.settings.v0.ValueService/ListValues"
ValueService_GetValueByUniqueIdentifiers_FullMethodName = "/qsfera.services.settings.v0.ValueService/GetValueByUniqueIdentifiers"
)
// ValueServiceClient is the client API for ValueService 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 ValueServiceClient interface {
SaveValue(ctx context.Context, in *SaveValueRequest, opts ...grpc.CallOption) (*SaveValueResponse, error)
GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error)
ListValues(ctx context.Context, in *ListValuesRequest, opts ...grpc.CallOption) (*ListValuesResponse, error)
GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, opts ...grpc.CallOption) (*GetValueResponse, error)
}
type valueServiceClient struct {
cc grpc.ClientConnInterface
}
func NewValueServiceClient(cc grpc.ClientConnInterface) ValueServiceClient {
return &valueServiceClient{cc}
}
func (c *valueServiceClient) SaveValue(ctx context.Context, in *SaveValueRequest, opts ...grpc.CallOption) (*SaveValueResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SaveValueResponse)
err := c.cc.Invoke(ctx, ValueService_SaveValue_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *valueServiceClient) GetValue(ctx context.Context, in *GetValueRequest, opts ...grpc.CallOption) (*GetValueResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetValueResponse)
err := c.cc.Invoke(ctx, ValueService_GetValue_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *valueServiceClient) ListValues(ctx context.Context, in *ListValuesRequest, opts ...grpc.CallOption) (*ListValuesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListValuesResponse)
err := c.cc.Invoke(ctx, ValueService_ListValues_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *valueServiceClient) GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, opts ...grpc.CallOption) (*GetValueResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetValueResponse)
err := c.cc.Invoke(ctx, ValueService_GetValueByUniqueIdentifiers_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ValueServiceServer is the server API for ValueService service.
// All implementations must embed UnimplementedValueServiceServer
// for forward compatibility.
type ValueServiceServer interface {
SaveValue(context.Context, *SaveValueRequest) (*SaveValueResponse, error)
GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error)
ListValues(context.Context, *ListValuesRequest) (*ListValuesResponse, error)
GetValueByUniqueIdentifiers(context.Context, *GetValueByUniqueIdentifiersRequest) (*GetValueResponse, error)
mustEmbedUnimplementedValueServiceServer()
}
// UnimplementedValueServiceServer 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 UnimplementedValueServiceServer struct{}
func (UnimplementedValueServiceServer) SaveValue(context.Context, *SaveValueRequest) (*SaveValueResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SaveValue not implemented")
}
func (UnimplementedValueServiceServer) GetValue(context.Context, *GetValueRequest) (*GetValueResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetValue not implemented")
}
func (UnimplementedValueServiceServer) ListValues(context.Context, *ListValuesRequest) (*ListValuesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListValues not implemented")
}
func (UnimplementedValueServiceServer) GetValueByUniqueIdentifiers(context.Context, *GetValueByUniqueIdentifiersRequest) (*GetValueResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetValueByUniqueIdentifiers not implemented")
}
func (UnimplementedValueServiceServer) mustEmbedUnimplementedValueServiceServer() {}
func (UnimplementedValueServiceServer) testEmbeddedByValue() {}
// UnsafeValueServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ValueServiceServer will
// result in compilation errors.
type UnsafeValueServiceServer interface {
mustEmbedUnimplementedValueServiceServer()
}
func RegisterValueServiceServer(s grpc.ServiceRegistrar, srv ValueServiceServer) {
// If the following call panics, it indicates UnimplementedValueServiceServer 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(&ValueService_ServiceDesc, srv)
}
func _ValueService_SaveValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SaveValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ValueServiceServer).SaveValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ValueService_SaveValue_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ValueServiceServer).SaveValue(ctx, req.(*SaveValueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ValueService_GetValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ValueServiceServer).GetValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ValueService_GetValue_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ValueServiceServer).GetValue(ctx, req.(*GetValueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ValueService_ListValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListValuesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ValueServiceServer).ListValues(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ValueService_ListValues_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ValueServiceServer).ListValues(ctx, req.(*ListValuesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ValueService_GetValueByUniqueIdentifiers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetValueByUniqueIdentifiersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ValueServiceServer).GetValueByUniqueIdentifiers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ValueService_GetValueByUniqueIdentifiers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ValueServiceServer).GetValueByUniqueIdentifiers(ctx, req.(*GetValueByUniqueIdentifiersRequest))
}
return interceptor(ctx, in, info, handler)
}
// ValueService_ServiceDesc is the grpc.ServiceDesc for ValueService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ValueService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "qsfera.services.settings.v0.ValueService",
HandlerType: (*ValueServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SaveValue",
Handler: _ValueService_SaveValue_Handler,
},
{
MethodName: "GetValue",
Handler: _ValueService_GetValue_Handler,
},
{
MethodName: "ListValues",
Handler: _ValueService_ListValues_Handler,
},
{
MethodName: "GetValueByUniqueIdentifiers",
Handler: _ValueService_GetValueByUniqueIdentifiers_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "qsfera/services/settings/v0/settings.proto",
}
const (
RoleService_ListRoles_FullMethodName = "/qsfera.services.settings.v0.RoleService/ListRoles"
RoleService_ListRoleAssignments_FullMethodName = "/qsfera.services.settings.v0.RoleService/ListRoleAssignments"
RoleService_ListRoleAssignmentsFiltered_FullMethodName = "/qsfera.services.settings.v0.RoleService/ListRoleAssignmentsFiltered"
RoleService_AssignRoleToUser_FullMethodName = "/qsfera.services.settings.v0.RoleService/AssignRoleToUser"
RoleService_RemoveRoleFromUser_FullMethodName = "/qsfera.services.settings.v0.RoleService/RemoveRoleFromUser"
)
// 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 {
ListRoles(ctx context.Context, in *ListBundlesRequest, opts ...grpc.CallOption) (*ListBundlesResponse, error)
ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, opts ...grpc.CallOption) (*ListRoleAssignmentsResponse, error)
ListRoleAssignmentsFiltered(ctx context.Context, in *ListRoleAssignmentsFilteredRequest, opts ...grpc.CallOption) (*ListRoleAssignmentsResponse, error)
AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, opts ...grpc.CallOption) (*AssignRoleToUserResponse, error)
RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type roleServiceClient struct {
cc grpc.ClientConnInterface
}
func NewRoleServiceClient(cc grpc.ClientConnInterface) RoleServiceClient {
return &roleServiceClient{cc}
}
func (c *roleServiceClient) ListRoles(ctx context.Context, in *ListBundlesRequest, opts ...grpc.CallOption) (*ListBundlesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListBundlesResponse)
err := c.cc.Invoke(ctx, RoleService_ListRoles_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roleServiceClient) ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, opts ...grpc.CallOption) (*ListRoleAssignmentsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRoleAssignmentsResponse)
err := c.cc.Invoke(ctx, RoleService_ListRoleAssignments_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roleServiceClient) ListRoleAssignmentsFiltered(ctx context.Context, in *ListRoleAssignmentsFilteredRequest, opts ...grpc.CallOption) (*ListRoleAssignmentsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListRoleAssignmentsResponse)
err := c.cc.Invoke(ctx, RoleService_ListRoleAssignmentsFiltered_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roleServiceClient) AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, opts ...grpc.CallOption) (*AssignRoleToUserResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AssignRoleToUserResponse)
err := c.cc.Invoke(ctx, RoleService_AssignRoleToUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *roleServiceClient) RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, RoleService_RemoveRoleFromUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RoleServiceServer is the server API for RoleService service.
// All implementations must embed UnimplementedRoleServiceServer
// for forward compatibility.
type RoleServiceServer interface {
ListRoles(context.Context, *ListBundlesRequest) (*ListBundlesResponse, error)
ListRoleAssignments(context.Context, *ListRoleAssignmentsRequest) (*ListRoleAssignmentsResponse, error)
ListRoleAssignmentsFiltered(context.Context, *ListRoleAssignmentsFilteredRequest) (*ListRoleAssignmentsResponse, error)
AssignRoleToUser(context.Context, *AssignRoleToUserRequest) (*AssignRoleToUserResponse, error)
RemoveRoleFromUser(context.Context, *RemoveRoleFromUserRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedRoleServiceServer()
}
// 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{}
func (UnimplementedRoleServiceServer) ListRoles(context.Context, *ListBundlesRequest) (*ListBundlesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListRoles not implemented")
}
func (UnimplementedRoleServiceServer) ListRoleAssignments(context.Context, *ListRoleAssignmentsRequest) (*ListRoleAssignmentsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListRoleAssignments not implemented")
}
func (UnimplementedRoleServiceServer) ListRoleAssignmentsFiltered(context.Context, *ListRoleAssignmentsFilteredRequest) (*ListRoleAssignmentsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListRoleAssignmentsFiltered not implemented")
}
func (UnimplementedRoleServiceServer) AssignRoleToUser(context.Context, *AssignRoleToUserRequest) (*AssignRoleToUserResponse, error) {
return nil, status.Error(codes.Unimplemented, "method AssignRoleToUser not implemented")
}
func (UnimplementedRoleServiceServer) RemoveRoleFromUser(context.Context, *RemoveRoleFromUserRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method RemoveRoleFromUser not implemented")
}
func (UnimplementedRoleServiceServer) mustEmbedUnimplementedRoleServiceServer() {}
func (UnimplementedRoleServiceServer) testEmbeddedByValue() {}
// 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) {
// If the following call panics, 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()
}
s.RegisterService(&RoleService_ServiceDesc, srv)
}
func _RoleService_ListRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListBundlesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleServiceServer).ListRoles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RoleService_ListRoles_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleServiceServer).ListRoles(ctx, req.(*ListBundlesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleService_ListRoleAssignments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRoleAssignmentsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleServiceServer).ListRoleAssignments(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RoleService_ListRoleAssignments_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleServiceServer).ListRoleAssignments(ctx, req.(*ListRoleAssignmentsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleService_ListRoleAssignmentsFiltered_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRoleAssignmentsFilteredRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleServiceServer).ListRoleAssignmentsFiltered(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RoleService_ListRoleAssignmentsFiltered_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleServiceServer).ListRoleAssignmentsFiltered(ctx, req.(*ListRoleAssignmentsFilteredRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleService_AssignRoleToUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AssignRoleToUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleServiceServer).AssignRoleToUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RoleService_AssignRoleToUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleServiceServer).AssignRoleToUser(ctx, req.(*AssignRoleToUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _RoleService_RemoveRoleFromUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveRoleFromUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RoleServiceServer).RemoveRoleFromUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: RoleService_RemoveRoleFromUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RoleServiceServer).RemoveRoleFromUser(ctx, req.(*RemoveRoleFromUserRequest))
}
return interceptor(ctx, in, info, handler)
}
// 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{
ServiceName: "qsfera.services.settings.v0.RoleService",
HandlerType: (*RoleServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListRoles",
Handler: _RoleService_ListRoles_Handler,
},
{
MethodName: "ListRoleAssignments",
Handler: _RoleService_ListRoleAssignments_Handler,
},
{
MethodName: "ListRoleAssignmentsFiltered",
Handler: _RoleService_ListRoleAssignmentsFiltered_Handler,
},
{
MethodName: "AssignRoleToUser",
Handler: _RoleService_AssignRoleToUser_Handler,
},
{
MethodName: "RemoveRoleFromUser",
Handler: _RoleService_RemoveRoleFromUser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "qsfera/services/settings/v0/settings.proto",
}
const (
PermissionService_ListPermissions_FullMethodName = "/qsfera.services.settings.v0.PermissionService/ListPermissions"
PermissionService_ListPermissionsByResource_FullMethodName = "/qsfera.services.settings.v0.PermissionService/ListPermissionsByResource"
PermissionService_GetPermissionByID_FullMethodName = "/qsfera.services.settings.v0.PermissionService/GetPermissionByID"
)
// PermissionServiceClient is the client API for PermissionService 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 PermissionServiceClient interface {
ListPermissions(ctx context.Context, in *ListPermissionsRequest, opts ...grpc.CallOption) (*ListPermissionsResponse, error)
ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, opts ...grpc.CallOption) (*ListPermissionsByResourceResponse, error)
GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, opts ...grpc.CallOption) (*GetPermissionByIDResponse, error)
}
type permissionServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPermissionServiceClient(cc grpc.ClientConnInterface) PermissionServiceClient {
return &permissionServiceClient{cc}
}
func (c *permissionServiceClient) ListPermissions(ctx context.Context, in *ListPermissionsRequest, opts ...grpc.CallOption) (*ListPermissionsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPermissionsResponse)
err := c.cc.Invoke(ctx, PermissionService_ListPermissions_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *permissionServiceClient) ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, opts ...grpc.CallOption) (*ListPermissionsByResourceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPermissionsByResourceResponse)
err := c.cc.Invoke(ctx, PermissionService_ListPermissionsByResource_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *permissionServiceClient) GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, opts ...grpc.CallOption) (*GetPermissionByIDResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPermissionByIDResponse)
err := c.cc.Invoke(ctx, PermissionService_GetPermissionByID_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PermissionServiceServer is the server API for PermissionService service.
// All implementations must embed UnimplementedPermissionServiceServer
// for forward compatibility.
type PermissionServiceServer interface {
ListPermissions(context.Context, *ListPermissionsRequest) (*ListPermissionsResponse, error)
ListPermissionsByResource(context.Context, *ListPermissionsByResourceRequest) (*ListPermissionsByResourceResponse, error)
GetPermissionByID(context.Context, *GetPermissionByIDRequest) (*GetPermissionByIDResponse, error)
mustEmbedUnimplementedPermissionServiceServer()
}
// UnimplementedPermissionServiceServer 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 UnimplementedPermissionServiceServer struct{}
func (UnimplementedPermissionServiceServer) ListPermissions(context.Context, *ListPermissionsRequest) (*ListPermissionsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListPermissions not implemented")
}
func (UnimplementedPermissionServiceServer) ListPermissionsByResource(context.Context, *ListPermissionsByResourceRequest) (*ListPermissionsByResourceResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListPermissionsByResource not implemented")
}
func (UnimplementedPermissionServiceServer) GetPermissionByID(context.Context, *GetPermissionByIDRequest) (*GetPermissionByIDResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetPermissionByID not implemented")
}
func (UnimplementedPermissionServiceServer) mustEmbedUnimplementedPermissionServiceServer() {}
func (UnimplementedPermissionServiceServer) testEmbeddedByValue() {}
// UnsafePermissionServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PermissionServiceServer will
// result in compilation errors.
type UnsafePermissionServiceServer interface {
mustEmbedUnimplementedPermissionServiceServer()
}
func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer) {
// If the following call panics, it indicates UnimplementedPermissionServiceServer 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(&PermissionService_ServiceDesc, srv)
}
func _PermissionService_ListPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPermissionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).ListPermissions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_ListPermissions_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).ListPermissions(ctx, req.(*ListPermissionsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PermissionService_ListPermissionsByResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPermissionsByResourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).ListPermissionsByResource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_ListPermissionsByResource_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).ListPermissionsByResource(ctx, req.(*ListPermissionsByResourceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PermissionService_GetPermissionByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPermissionByIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PermissionServiceServer).GetPermissionByID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PermissionService_GetPermissionByID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PermissionServiceServer).GetPermissionByID(ctx, req.(*GetPermissionByIDRequest))
}
return interceptor(ctx, in, info, handler)
}
// PermissionService_ServiceDesc is the grpc.ServiceDesc for PermissionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PermissionService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "qsfera.services.settings.v0.PermissionService",
HandlerType: (*PermissionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListPermissions",
Handler: _PermissionService_ListPermissions_Handler,
},
{
MethodName: "ListPermissionsByResource",
Handler: _PermissionService_ListPermissionsByResource_Handler,
},
{
MethodName: "GetPermissionByID",
Handler: _PermissionService_GetPermissionByID_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "qsfera/services/settings/v0/settings.proto",
}