rbacpb

package
v3.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var File_rbac_rbac_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use AccessSet.ProtoReflect.Descriptor instead.

func (*AccessSet) GetAccess

func (x *AccessSet) GetAccess() map[string]bool

func (*AccessSet) GetSubject

func (x *AccessSet) GetSubject() string

func (*AccessSet) ProtoMessage

func (*AccessSet) ProtoMessage()

func (*AccessSet) ProtoReflect

func (x *AccessSet) ProtoReflect() protoreflect.Message

func (*AccessSet) Reset

func (x *AccessSet) Reset()

func (*AccessSet) String

func (x *AccessSet) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetName

func (x *Role) GetName() string

func (*Role) GetRules

func (x *Role) GetRules() []*Rule

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) ProtoReflect

func (x *Role) ProtoReflect() protoreflect.Message

func (*Role) Reset

func (x *Role) Reset()

func (*Role) String

func (x *Role) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Roles.ProtoReflect.Descriptor instead.

func (*Roles) GetRoles

func (x *Roles) GetRoles() []*Role

func (*Roles) ProtoMessage

func (*Roles) ProtoMessage()

func (*Roles) ProtoReflect

func (x *Roles) ProtoReflect() protoreflect.Message

func (*Roles) Reset

func (x *Roles) Reset()

func (*Roles) String

func (x *Roles) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) GetApiGroups

func (x *Rule) GetApiGroups() []string

func (*Rule) GetResources

func (x *Rule) GetResources() []string

func (*Rule) GetVerbs

func (x *Rule) GetVerbs() []string

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect

func (x *Rule) ProtoReflect() protoreflect.Message

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) String

func (x *Rule) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Subject.ProtoReflect.Descriptor instead.

func (*Subject) GetKind

func (x *Subject) GetKind() string

func (*Subject) GetName

func (x *Subject) GetName() string

func (*Subject) ProtoMessage

func (*Subject) ProtoMessage()

func (*Subject) ProtoReflect

func (x *Subject) ProtoReflect() protoreflect.Message

func (*Subject) Reset

func (x *Subject) Reset()

func (*Subject) String

func (x *Subject) String() string

type UnimplementedRbacSvcServer

type UnimplementedRbacSvcServer struct {
}

UnimplementedRbacSvcServer must be embedded to have forward compatible implementations.

func (UnimplementedRbacSvcServer) CreateRole

func (UnimplementedRbacSvcServer) CreateRolebinding

func (UnimplementedRbacSvcServer) DeleteRole

func (UnimplementedRbacSvcServer) DeleteRolebinding

func (UnimplementedRbacSvcServer) GetAccessSet

func (UnimplementedRbacSvcServer) GetHobbyfarmRoleBindings

func (UnimplementedRbacSvcServer) GetRole

func (UnimplementedRbacSvcServer) GetRolebinding

func (UnimplementedRbacSvcServer) Grants

func (UnimplementedRbacSvcServer) ListRole

func (UnimplementedRbacSvcServer) ListRolebinding

func (UnimplementedRbacSvcServer) UpdateRole

func (UnimplementedRbacSvcServer) UpdateRolebinding

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL