Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterRbacSvcServer(s grpc.ServiceRegistrar, srv RbacSvcServer)
- type AccessSet
- type GrantRequest
- func (*GrantRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GrantRequest) GetPermission() *authr.Permission
- func (x *GrantRequest) GetUserName() string
- func (*GrantRequest) ProtoMessage()
- func (x *GrantRequest) ProtoReflect() protoreflect.Message
- func (x *GrantRequest) Reset()
- func (x *GrantRequest) String() string
- type RbacSvcClient
- type RbacSvcServer
- type Role
- type RoleBinding
- func (*RoleBinding) Descriptor() ([]byte, []int)deprecated
- func (x *RoleBinding) GetName() string
- func (x *RoleBinding) GetRole() string
- func (x *RoleBinding) GetSubjects() []*Subject
- func (*RoleBinding) ProtoMessage()
- func (x *RoleBinding) ProtoReflect() protoreflect.Message
- func (x *RoleBinding) Reset()
- func (x *RoleBinding) String() string
- type RoleBindings
- type Roles
- type Rule
- type Subject
- type UnimplementedRbacSvcServer
- func (UnimplementedRbacSvcServer) CreateRole(context.Context, *Role) (*emptypb.Empty, error)
- func (UnimplementedRbacSvcServer) CreateRolebinding(context.Context, *RoleBinding) (*emptypb.Empty, error)
- func (UnimplementedRbacSvcServer) DeleteRole(context.Context, *general.ResourceId) (*emptypb.Empty, error)
- func (UnimplementedRbacSvcServer) DeleteRolebinding(context.Context, *general.ResourceId) (*emptypb.Empty, error)
- func (UnimplementedRbacSvcServer) GetAccessSet(context.Context, *general.ResourceId) (*AccessSet, error)
- func (UnimplementedRbacSvcServer) GetHobbyfarmRoleBindings(context.Context, *general.ResourceId) (*RoleBindings, error)
- func (UnimplementedRbacSvcServer) GetRole(context.Context, *general.GetRequest) (*Role, error)
- func (UnimplementedRbacSvcServer) GetRolebinding(context.Context, *general.GetRequest) (*RoleBinding, error)
- func (UnimplementedRbacSvcServer) Grants(context.Context, *GrantRequest) (*authr.AuthRResponse, error)
- func (UnimplementedRbacSvcServer) ListRole(context.Context, *general.ListOptions) (*Roles, error)
- func (UnimplementedRbacSvcServer) ListRolebinding(context.Context, *general.ListOptions) (*RoleBindings, error)
- func (UnimplementedRbacSvcServer) UpdateRole(context.Context, *Role) (*emptypb.Empty, error)
- func (UnimplementedRbacSvcServer) UpdateRolebinding(context.Context, *RoleBinding) (*emptypb.Empty, error)
- type UnsafeRbacSvcServer
Constants ¶
const ( RbacSvc_Grants_FullMethodName = "/rbac.RbacSvc/Grants" RbacSvc_GetAccessSet_FullMethodName = "/rbac.RbacSvc/GetAccessSet" RbacSvc_GetHobbyfarmRoleBindings_FullMethodName = "/rbac.RbacSvc/GetHobbyfarmRoleBindings" RbacSvc_CreateRole_FullMethodName = "/rbac.RbacSvc/CreateRole" RbacSvc_GetRole_FullMethodName = "/rbac.RbacSvc/GetRole" RbacSvc_UpdateRole_FullMethodName = "/rbac.RbacSvc/UpdateRole" RbacSvc_DeleteRole_FullMethodName = "/rbac.RbacSvc/DeleteRole" RbacSvc_ListRole_FullMethodName = "/rbac.RbacSvc/ListRole" RbacSvc_CreateRolebinding_FullMethodName = "/rbac.RbacSvc/CreateRolebinding" RbacSvc_GetRolebinding_FullMethodName = "/rbac.RbacSvc/GetRolebinding" RbacSvc_UpdateRolebinding_FullMethodName = "/rbac.RbacSvc/UpdateRolebinding" RbacSvc_DeleteRolebinding_FullMethodName = "/rbac.RbacSvc/DeleteRolebinding" RbacSvc_ListRolebinding_FullMethodName = "/rbac.RbacSvc/ListRolebinding" )
Variables ¶
var File_rbac_rbac_proto protoreflect.FileDescriptor
var RbacSvc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rbac.RbacSvc", HandlerType: (*RbacSvcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Grants", Handler: _RbacSvc_Grants_Handler, }, { MethodName: "GetAccessSet", Handler: _RbacSvc_GetAccessSet_Handler, }, { MethodName: "GetHobbyfarmRoleBindings", Handler: _RbacSvc_GetHobbyfarmRoleBindings_Handler, }, { MethodName: "CreateRole", Handler: _RbacSvc_CreateRole_Handler, }, { MethodName: "GetRole", Handler: _RbacSvc_GetRole_Handler, }, { MethodName: "UpdateRole", Handler: _RbacSvc_UpdateRole_Handler, }, { MethodName: "DeleteRole", Handler: _RbacSvc_DeleteRole_Handler, }, { MethodName: "ListRole", Handler: _RbacSvc_ListRole_Handler, }, { MethodName: "CreateRolebinding", Handler: _RbacSvc_CreateRolebinding_Handler, }, { MethodName: "GetRolebinding", Handler: _RbacSvc_GetRolebinding_Handler, }, { MethodName: "UpdateRolebinding", Handler: _RbacSvc_UpdateRolebinding_Handler, }, { MethodName: "DeleteRolebinding", Handler: _RbacSvc_DeleteRolebinding_Handler, }, { MethodName: "ListRolebinding", Handler: _RbacSvc_ListRolebinding_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "rbac/rbac.proto", }
RbacSvc_ServiceDesc is the grpc.ServiceDesc for RbacSvc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRbacSvcServer ¶
func RegisterRbacSvcServer(s grpc.ServiceRegistrar, srv RbacSvcServer)
Types ¶
type AccessSet ¶
type AccessSet struct { Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` Access map[string]bool `` /* 154-byte string literal not displayed */ // contains filtered or unexported fields }
func (*AccessSet) Descriptor
deprecated
func (*AccessSet) GetSubject ¶
func (*AccessSet) ProtoMessage ¶
func (*AccessSet) ProtoMessage()
func (*AccessSet) ProtoReflect ¶
func (x *AccessSet) ProtoReflect() protoreflect.Message
type GrantRequest ¶
type GrantRequest struct { UserName string `protobuf:"bytes,1,opt,name=userName,proto3" json:"userName,omitempty"` Permission *authr.Permission `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"` // contains filtered or unexported fields }
func (*GrantRequest) Descriptor
deprecated
func (*GrantRequest) Descriptor() ([]byte, []int)
Deprecated: Use GrantRequest.ProtoReflect.Descriptor instead.
func (*GrantRequest) GetPermission ¶
func (x *GrantRequest) GetPermission() *authr.Permission
func (*GrantRequest) GetUserName ¶
func (x *GrantRequest) GetUserName() string
func (*GrantRequest) ProtoMessage ¶
func (*GrantRequest) ProtoMessage()
func (*GrantRequest) ProtoReflect ¶
func (x *GrantRequest) ProtoReflect() protoreflect.Message
func (*GrantRequest) Reset ¶
func (x *GrantRequest) Reset()
func (*GrantRequest) String ¶
func (x *GrantRequest) String() string
type RbacSvcClient ¶
type RbacSvcClient interface { Grants(ctx context.Context, in *GrantRequest, opts ...grpc.CallOption) (*authr.AuthRResponse, error) GetAccessSet(ctx context.Context, in *general.ResourceId, opts ...grpc.CallOption) (*AccessSet, error) GetHobbyfarmRoleBindings(ctx context.Context, in *general.ResourceId, opts ...grpc.CallOption) (*RoleBindings, error) // Resource oriented RPCs for roles: CreateRole(ctx context.Context, in *Role, opts ...grpc.CallOption) (*emptypb.Empty, error) GetRole(ctx context.Context, in *general.GetRequest, opts ...grpc.CallOption) (*Role, error) UpdateRole(ctx context.Context, in *Role, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteRole(ctx context.Context, in *general.ResourceId, opts ...grpc.CallOption) (*emptypb.Empty, error) ListRole(ctx context.Context, in *general.ListOptions, opts ...grpc.CallOption) (*Roles, error) // Resource oriented RPCs for rolebindings: CreateRolebinding(ctx context.Context, in *RoleBinding, opts ...grpc.CallOption) (*emptypb.Empty, error) GetRolebinding(ctx context.Context, in *general.GetRequest, opts ...grpc.CallOption) (*RoleBinding, error) UpdateRolebinding(ctx context.Context, in *RoleBinding, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteRolebinding(ctx context.Context, in *general.ResourceId, opts ...grpc.CallOption) (*emptypb.Empty, error) ListRolebinding(ctx context.Context, in *general.ListOptions, opts ...grpc.CallOption) (*RoleBindings, error) }
RbacSvcClient is the client API for RbacSvc 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.
func NewRbacSvcClient ¶
func NewRbacSvcClient(cc grpc.ClientConnInterface) RbacSvcClient
type RbacSvcServer ¶
type RbacSvcServer interface { Grants(context.Context, *GrantRequest) (*authr.AuthRResponse, error) GetAccessSet(context.Context, *general.ResourceId) (*AccessSet, error) GetHobbyfarmRoleBindings(context.Context, *general.ResourceId) (*RoleBindings, error) // Resource oriented RPCs for roles: CreateRole(context.Context, *Role) (*emptypb.Empty, error) GetRole(context.Context, *general.GetRequest) (*Role, error) UpdateRole(context.Context, *Role) (*emptypb.Empty, error) DeleteRole(context.Context, *general.ResourceId) (*emptypb.Empty, error) ListRole(context.Context, *general.ListOptions) (*Roles, error) // Resource oriented RPCs for rolebindings: CreateRolebinding(context.Context, *RoleBinding) (*emptypb.Empty, error) GetRolebinding(context.Context, *general.GetRequest) (*RoleBinding, error) UpdateRolebinding(context.Context, *RoleBinding) (*emptypb.Empty, error) DeleteRolebinding(context.Context, *general.ResourceId) (*emptypb.Empty, error) ListRolebinding(context.Context, *general.ListOptions) (*RoleBindings, error) // contains filtered or unexported methods }
RbacSvcServer is the server API for RbacSvc service. All implementations must embed UnimplementedRbacSvcServer for forward compatibility
type Role ¶
type Role struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Rules []*Rule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` // contains filtered or unexported fields }
func (*Role) Descriptor
deprecated
func (*Role) ProtoMessage ¶
func (*Role) ProtoMessage()
func (*Role) ProtoReflect ¶
func (x *Role) ProtoReflect() protoreflect.Message
type RoleBinding ¶
type RoleBinding struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` Subjects []*Subject `protobuf:"bytes,3,rep,name=subjects,proto3" json:"subjects,omitempty"` // contains filtered or unexported fields }
func (*RoleBinding) Descriptor
deprecated
func (*RoleBinding) Descriptor() ([]byte, []int)
Deprecated: Use RoleBinding.ProtoReflect.Descriptor instead.
func (*RoleBinding) GetName ¶
func (x *RoleBinding) GetName() string
func (*RoleBinding) GetRole ¶
func (x *RoleBinding) GetRole() string
func (*RoleBinding) GetSubjects ¶
func (x *RoleBinding) GetSubjects() []*Subject
func (*RoleBinding) ProtoMessage ¶
func (*RoleBinding) ProtoMessage()
func (*RoleBinding) ProtoReflect ¶
func (x *RoleBinding) ProtoReflect() protoreflect.Message
func (*RoleBinding) Reset ¶
func (x *RoleBinding) Reset()
func (*RoleBinding) String ¶
func (x *RoleBinding) String() string
type RoleBindings ¶
type RoleBindings struct { Rolebindings []*RoleBinding `protobuf:"bytes,1,rep,name=rolebindings,proto3" json:"rolebindings,omitempty"` // contains filtered or unexported fields }
func (*RoleBindings) Descriptor
deprecated
func (*RoleBindings) Descriptor() ([]byte, []int)
Deprecated: Use RoleBindings.ProtoReflect.Descriptor instead.
func (*RoleBindings) GetRolebindings ¶
func (x *RoleBindings) GetRolebindings() []*RoleBinding
func (*RoleBindings) ProtoMessage ¶
func (*RoleBindings) ProtoMessage()
func (*RoleBindings) ProtoReflect ¶
func (x *RoleBindings) ProtoReflect() protoreflect.Message
func (*RoleBindings) Reset ¶
func (x *RoleBindings) Reset()
func (*RoleBindings) String ¶
func (x *RoleBindings) String() string
type Roles ¶
type Roles struct { Roles []*Role `protobuf:"bytes,1,rep,name=roles,proto3" json:"roles,omitempty"` // contains filtered or unexported fields }
func (*Roles) Descriptor
deprecated
func (*Roles) ProtoMessage ¶
func (*Roles) ProtoMessage()
func (*Roles) ProtoReflect ¶
func (x *Roles) ProtoReflect() protoreflect.Message
type Rule ¶
type Rule struct { Verbs []string `protobuf:"bytes,1,rep,name=verbs,proto3" json:"verbs,omitempty"` ApiGroups []string `protobuf:"bytes,2,rep,name=apiGroups,proto3" json:"apiGroups,omitempty"` Resources []string `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources,omitempty"` // contains filtered or unexported fields }
func (*Rule) Descriptor
deprecated
func (*Rule) GetApiGroups ¶
func (*Rule) GetResources ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) ProtoReflect ¶
func (x *Rule) ProtoReflect() protoreflect.Message
type Subject ¶
type Subject struct { Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Subject) Descriptor
deprecated
func (*Subject) ProtoMessage ¶
func (*Subject) ProtoMessage()
func (*Subject) ProtoReflect ¶
func (x *Subject) ProtoReflect() protoreflect.Message
type UnimplementedRbacSvcServer ¶
type UnimplementedRbacSvcServer struct { }
UnimplementedRbacSvcServer must be embedded to have forward compatible implementations.
func (UnimplementedRbacSvcServer) CreateRole ¶
func (UnimplementedRbacSvcServer) CreateRolebinding ¶
func (UnimplementedRbacSvcServer) CreateRolebinding(context.Context, *RoleBinding) (*emptypb.Empty, error)
func (UnimplementedRbacSvcServer) DeleteRole ¶
func (UnimplementedRbacSvcServer) DeleteRole(context.Context, *general.ResourceId) (*emptypb.Empty, error)
func (UnimplementedRbacSvcServer) DeleteRolebinding ¶
func (UnimplementedRbacSvcServer) DeleteRolebinding(context.Context, *general.ResourceId) (*emptypb.Empty, error)
func (UnimplementedRbacSvcServer) GetAccessSet ¶
func (UnimplementedRbacSvcServer) GetAccessSet(context.Context, *general.ResourceId) (*AccessSet, error)
func (UnimplementedRbacSvcServer) GetHobbyfarmRoleBindings ¶
func (UnimplementedRbacSvcServer) GetHobbyfarmRoleBindings(context.Context, *general.ResourceId) (*RoleBindings, error)
func (UnimplementedRbacSvcServer) GetRole ¶
func (UnimplementedRbacSvcServer) GetRole(context.Context, *general.GetRequest) (*Role, error)
func (UnimplementedRbacSvcServer) GetRolebinding ¶
func (UnimplementedRbacSvcServer) GetRolebinding(context.Context, *general.GetRequest) (*RoleBinding, error)
func (UnimplementedRbacSvcServer) Grants ¶
func (UnimplementedRbacSvcServer) Grants(context.Context, *GrantRequest) (*authr.AuthRResponse, error)
func (UnimplementedRbacSvcServer) ListRole ¶
func (UnimplementedRbacSvcServer) ListRole(context.Context, *general.ListOptions) (*Roles, error)
func (UnimplementedRbacSvcServer) ListRolebinding ¶
func (UnimplementedRbacSvcServer) ListRolebinding(context.Context, *general.ListOptions) (*RoleBindings, error)
func (UnimplementedRbacSvcServer) UpdateRole ¶
func (UnimplementedRbacSvcServer) UpdateRolebinding ¶
func (UnimplementedRbacSvcServer) UpdateRolebinding(context.Context, *RoleBinding) (*emptypb.Empty, error)
type UnsafeRbacSvcServer ¶
type UnsafeRbacSvcServer interface {
// contains filtered or unexported methods
}
UnsafeRbacSvcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RbacSvcServer will result in compilation errors.