permission

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Permissions_GetAllPermissions_FullMethodName               = "/iam.permission.Permissions/GetAllPermissions"
	Permissions_CheckGlobalPermissions_FullMethodName          = "/iam.permission.Permissions/CheckGlobalPermissions"
	Permissions_AssignGlobalPermissionToGroup_FullMethodName   = "/iam.permission.Permissions/AssignGlobalPermissionToGroup"
	Permissions_RemoveGlobalPermissionFromGroup_FullMethodName = "/iam.permission.Permissions/RemoveGlobalPermissionFromGroup"
)

Variables

View Source
var File_iam_v1_permission_permission_proto protoreflect.FileDescriptor
View Source
var Permissions_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "iam.permission.Permissions",
	HandlerType: (*PermissionsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAllPermissions",
			Handler:    _Permissions_GetAllPermissions_Handler,
		},
		{
			MethodName: "CheckGlobalPermissions",
			Handler:    _Permissions_CheckGlobalPermissions_Handler,
		},
		{
			MethodName: "AssignGlobalPermissionToGroup",
			Handler:    _Permissions_AssignGlobalPermissionToGroup_Handler,
		},
		{
			MethodName: "RemoveGlobalPermissionFromGroup",
			Handler:    _Permissions_RemoveGlobalPermissionFromGroup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "iam/v1/permission/permission.proto",
}

Permissions_ServiceDesc is the grpc.ServiceDesc for Permissions service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPermissionsServer

func RegisterPermissionsServer(s grpc.ServiceRegistrar, srv PermissionsServer)

Types

type GlobalPermissionBriefResponse added in v1.2.8

type GlobalPermissionBriefResponse struct {
	Key    string        `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Label  string        `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
	Groups []*GroupBrief `protobuf:"bytes,3,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*GlobalPermissionBriefResponse) Descriptor deprecated added in v1.2.8

func (*GlobalPermissionBriefResponse) Descriptor() ([]byte, []int)

Deprecated: Use GlobalPermissionBriefResponse.ProtoReflect.Descriptor instead.

func (*GlobalPermissionBriefResponse) GetGroups added in v1.2.9

func (x *GlobalPermissionBriefResponse) GetGroups() []*GroupBrief

func (*GlobalPermissionBriefResponse) GetKey added in v1.2.8

func (*GlobalPermissionBriefResponse) GetLabel added in v1.2.8

func (x *GlobalPermissionBriefResponse) GetLabel() string

func (*GlobalPermissionBriefResponse) ProtoMessage added in v1.2.8

func (*GlobalPermissionBriefResponse) ProtoMessage()

func (*GlobalPermissionBriefResponse) ProtoReflect added in v1.2.8

func (*GlobalPermissionBriefResponse) Reset added in v1.2.8

func (x *GlobalPermissionBriefResponse) Reset()

func (*GlobalPermissionBriefResponse) String added in v1.2.8

type GlobalPermissionForGroup added in v1.2.8

type GlobalPermissionForGroup struct {
	GlobalPermissionKey string `protobuf:"bytes,1,opt,name=global_permission_key,json=globalPermissionKey,proto3" json:"global_permission_key,omitempty"`
	UserGroupKey        string `protobuf:"bytes,2,opt,name=user_group_key,json=userGroupKey,proto3" json:"user_group_key,omitempty"`
	// contains filtered or unexported fields
}

func (*GlobalPermissionForGroup) Descriptor deprecated added in v1.2.8

func (*GlobalPermissionForGroup) Descriptor() ([]byte, []int)

Deprecated: Use GlobalPermissionForGroup.ProtoReflect.Descriptor instead.

func (*GlobalPermissionForGroup) GetGlobalPermissionKey added in v1.2.8

func (x *GlobalPermissionForGroup) GetGlobalPermissionKey() string

func (*GlobalPermissionForGroup) GetUserGroupKey added in v1.2.8

func (x *GlobalPermissionForGroup) GetUserGroupKey() string

func (*GlobalPermissionForGroup) ProtoMessage added in v1.2.8

func (*GlobalPermissionForGroup) ProtoMessage()

func (*GlobalPermissionForGroup) ProtoReflect added in v1.2.8

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

func (*GlobalPermissionForGroup) Reset added in v1.2.8

func (x *GlobalPermissionForGroup) Reset()

func (*GlobalPermissionForGroup) String added in v1.2.8

func (x *GlobalPermissionForGroup) String() string

type GlobalPermissionRequest

type GlobalPermissionRequest struct {
	UserId         string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Action         string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	TargetResource string `protobuf:"bytes,3,opt,name=target_resource,json=targetResource,proto3" json:"target_resource,omitempty"`
	// contains filtered or unexported fields
}

func (*GlobalPermissionRequest) Descriptor deprecated

func (*GlobalPermissionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GlobalPermissionRequest.ProtoReflect.Descriptor instead.

func (*GlobalPermissionRequest) GetAction

func (x *GlobalPermissionRequest) GetAction() string

func (*GlobalPermissionRequest) GetTargetResource

func (x *GlobalPermissionRequest) GetTargetResource() string

func (*GlobalPermissionRequest) GetUserId

func (x *GlobalPermissionRequest) GetUserId() string

func (*GlobalPermissionRequest) ProtoMessage

func (*GlobalPermissionRequest) ProtoMessage()

func (*GlobalPermissionRequest) ProtoReflect

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

func (*GlobalPermissionRequest) Reset

func (x *GlobalPermissionRequest) Reset()

func (*GlobalPermissionRequest) String

func (x *GlobalPermissionRequest) String() string

type GlobalPermissionResponse

type GlobalPermissionResponse struct {
	IsAllowed bool `protobuf:"varint,1,opt,name=is_allowed,json=isAllowed,proto3" json:"is_allowed,omitempty"`
	// contains filtered or unexported fields
}

func (*GlobalPermissionResponse) Descriptor deprecated

func (*GlobalPermissionResponse) Descriptor() ([]byte, []int)

Deprecated: Use GlobalPermissionResponse.ProtoReflect.Descriptor instead.

func (*GlobalPermissionResponse) GetIsAllowed

func (x *GlobalPermissionResponse) GetIsAllowed() bool

func (*GlobalPermissionResponse) ProtoMessage

func (*GlobalPermissionResponse) ProtoMessage()

func (*GlobalPermissionResponse) ProtoReflect

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

func (*GlobalPermissionResponse) Reset

func (x *GlobalPermissionResponse) Reset()

func (*GlobalPermissionResponse) String

func (x *GlobalPermissionResponse) String() string

type GlobalPermissionsResponse added in v1.2.8

type GlobalPermissionsResponse struct {
	GlobalPermissions []*GlobalPermissionBriefResponse `protobuf:"bytes,1,rep,name=global_permissions,json=globalPermissions,proto3" json:"global_permissions,omitempty"`
	// contains filtered or unexported fields
}

func (*GlobalPermissionsResponse) Descriptor deprecated added in v1.2.8

func (*GlobalPermissionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use GlobalPermissionsResponse.ProtoReflect.Descriptor instead.

func (*GlobalPermissionsResponse) GetGlobalPermissions added in v1.2.8

func (x *GlobalPermissionsResponse) GetGlobalPermissions() []*GlobalPermissionBriefResponse

func (*GlobalPermissionsResponse) ProtoMessage added in v1.2.8

func (*GlobalPermissionsResponse) ProtoMessage()

func (*GlobalPermissionsResponse) ProtoReflect added in v1.2.8

func (*GlobalPermissionsResponse) Reset added in v1.2.8

func (x *GlobalPermissionsResponse) Reset()

func (*GlobalPermissionsResponse) String added in v1.2.8

func (x *GlobalPermissionsResponse) String() string

type GroupBrief added in v1.2.9

type GroupBrief struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
	// contains filtered or unexported fields
}

func (*GroupBrief) Descriptor deprecated added in v1.2.9

func (*GroupBrief) Descriptor() ([]byte, []int)

Deprecated: Use GroupBrief.ProtoReflect.Descriptor instead.

func (*GroupBrief) GetKey added in v1.2.9

func (x *GroupBrief) GetKey() string

func (*GroupBrief) GetLabel added in v1.2.9

func (x *GroupBrief) GetLabel() string

func (*GroupBrief) ProtoMessage added in v1.2.9

func (*GroupBrief) ProtoMessage()

func (*GroupBrief) ProtoReflect added in v1.2.9

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

func (*GroupBrief) Reset added in v1.2.9

func (x *GroupBrief) Reset()

func (*GroupBrief) String added in v1.2.9

func (x *GroupBrief) String() string

type PermissionsClient

type PermissionsClient interface {
	GetAllPermissions(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GlobalPermissionsResponse, error)
	CheckGlobalPermissions(ctx context.Context, in *GlobalPermissionRequest, opts ...grpc.CallOption) (*GlobalPermissionResponse, error)
	AssignGlobalPermissionToGroup(ctx context.Context, in *GlobalPermissionForGroup, opts ...grpc.CallOption) (*emptypb.Empty, error)
	RemoveGlobalPermissionFromGroup(ctx context.Context, in *GlobalPermissionForGroup, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

PermissionsClient is the client API for Permissions 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 PermissionsServer

type PermissionsServer interface {
	GetAllPermissions(context.Context, *emptypb.Empty) (*GlobalPermissionsResponse, error)
	CheckGlobalPermissions(context.Context, *GlobalPermissionRequest) (*GlobalPermissionResponse, error)
	AssignGlobalPermissionToGroup(context.Context, *GlobalPermissionForGroup) (*emptypb.Empty, error)
	RemoveGlobalPermissionFromGroup(context.Context, *GlobalPermissionForGroup) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

PermissionsServer is the server API for Permissions service. All implementations must embed UnimplementedPermissionsServer for forward compatibility.

type UnimplementedPermissionsServer

type UnimplementedPermissionsServer struct{}

UnimplementedPermissionsServer 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.

func (UnimplementedPermissionsServer) AssignGlobalPermissionToGroup added in v1.2.12

func (UnimplementedPermissionsServer) CheckGlobalPermissions added in v1.2.10

func (UnimplementedPermissionsServer) GetAllPermissions added in v1.2.8

func (UnimplementedPermissionsServer) RemoveGlobalPermissionFromGroup added in v1.2.8

type UnsafePermissionsServer

type UnsafePermissionsServer interface {
	// contains filtered or unexported methods
}

UnsafePermissionsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PermissionsServer will result in compilation errors.

Jump to

Keyboard shortcuts

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