permission

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_permission_pb_request_proto protoreflect.FileDescriptor
View Source
var File_pkg_permission_pb_service_proto protoreflect.FileDescriptor

Functions

func HttpEntry

func HttpEntry() *http.EntrySet

HttpEntry todo

func RegisterPermissionServiceServer

func RegisterPermissionServiceServer(s *grpc.Server, srv PermissionServiceServer)

Types

type CheckPermissionRequest

type CheckPermissionRequest struct {
	Page        *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	NamespaceId string            `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id"`
	EndpointId  string            `protobuf:"bytes,3,opt,name=endpoint_id,json=endpointId,proto3" json:"endpoint_id"`
	// contains filtered or unexported fields
}

CheckPermissionRequest todo

func NewCheckPermissionrequest

func NewCheckPermissionrequest() *CheckPermissionRequest

NewCheckPermissionrequest todo

func (*CheckPermissionRequest) Descriptor deprecated

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

Deprecated: Use CheckPermissionRequest.ProtoReflect.Descriptor instead.

func (*CheckPermissionRequest) GetEndpointId

func (x *CheckPermissionRequest) GetEndpointId() string

func (*CheckPermissionRequest) GetNamespaceId

func (x *CheckPermissionRequest) GetNamespaceId() string

func (*CheckPermissionRequest) GetPage

func (x *CheckPermissionRequest) GetPage() *page.PageRequest

func (*CheckPermissionRequest) ProtoMessage

func (*CheckPermissionRequest) ProtoMessage()

func (*CheckPermissionRequest) ProtoReflect

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

func (*CheckPermissionRequest) Reset

func (x *CheckPermissionRequest) Reset()

func (*CheckPermissionRequest) String

func (x *CheckPermissionRequest) String() string

func (*CheckPermissionRequest) Validate

func (req *CheckPermissionRequest) Validate() error

Validate 校验请求合法

type PermissionServiceClient

type PermissionServiceClient interface {
	QueryPermission(ctx context.Context, in *QueryPermissionRequest, opts ...grpc.CallOption) (*role.PermissionSet, error)
	QueryRoles(ctx context.Context, in *QueryRoleRequest, opts ...grpc.CallOption) (*role.Set, error)
	CheckPermission(ctx context.Context, in *CheckPermissionRequest, opts ...grpc.CallOption) (*role.Permission, error)
}

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 PermissionServiceServer

type PermissionServiceServer interface {
	QueryPermission(context.Context, *QueryPermissionRequest) (*role.PermissionSet, error)
	QueryRoles(context.Context, *QueryRoleRequest) (*role.Set, error)
	CheckPermission(context.Context, *CheckPermissionRequest) (*role.Permission, error)
	// contains filtered or unexported methods
}

PermissionServiceServer is the server API for PermissionService service. All implementations must embed UnimplementedPermissionServiceServer for forward compatibility

type QueryPermissionRequest

type QueryPermissionRequest struct {
	Page        *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	NamespaceId string            `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id"`
	// contains filtered or unexported fields
}

QueryPermissionRequest 查询用户权限

func NewQueryPermissionRequest

func NewQueryPermissionRequest(page *request.PageRequest) *QueryPermissionRequest

NewQueryPermissionRequest todo

func (*QueryPermissionRequest) Descriptor deprecated

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

Deprecated: Use QueryPermissionRequest.ProtoReflect.Descriptor instead.

func (*QueryPermissionRequest) GetNamespaceId

func (x *QueryPermissionRequest) GetNamespaceId() string

func (*QueryPermissionRequest) GetPage

func (x *QueryPermissionRequest) GetPage() *page.PageRequest

func (*QueryPermissionRequest) ProtoMessage

func (*QueryPermissionRequest) ProtoMessage()

func (*QueryPermissionRequest) ProtoReflect

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

func (*QueryPermissionRequest) Reset

func (x *QueryPermissionRequest) Reset()

func (*QueryPermissionRequest) String

func (x *QueryPermissionRequest) String() string

func (*QueryPermissionRequest) Validate

func (req *QueryPermissionRequest) Validate() error

Validate 校验请求合法

type QueryRoleRequest

type QueryRoleRequest struct {
	Page        *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page" bson:"page"`
	NamespaceId string            `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"`
	// contains filtered or unexported fields
}

QueryRoleRequest 查询用户权限

func NewQueryRoleRequest

func NewQueryRoleRequest(namespaceid string) *QueryRoleRequest

NewQueryRoleRequest todo

func (*QueryRoleRequest) Descriptor deprecated

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

Deprecated: Use QueryRoleRequest.ProtoReflect.Descriptor instead.

func (*QueryRoleRequest) GetNamespaceId

func (x *QueryRoleRequest) GetNamespaceId() string

func (*QueryRoleRequest) GetPage

func (x *QueryRoleRequest) GetPage() *page.PageRequest

func (*QueryRoleRequest) ProtoMessage

func (*QueryRoleRequest) ProtoMessage()

func (*QueryRoleRequest) ProtoReflect

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

func (*QueryRoleRequest) Reset

func (x *QueryRoleRequest) Reset()

func (*QueryRoleRequest) String

func (x *QueryRoleRequest) String() string

func (*QueryRoleRequest) Validate

func (req *QueryRoleRequest) Validate() error

Validate 校验请求合法

type UnimplementedPermissionServiceServer

type UnimplementedPermissionServiceServer struct {
}

UnimplementedPermissionServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPermissionServiceServer) CheckPermission

func (UnimplementedPermissionServiceServer) QueryPermission

func (UnimplementedPermissionServiceServer) QueryRoles

type UnsafePermissionServiceServer

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

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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