permission

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "permission"
)

Variables

View Source
var File_app_permission_pb_request_proto protoreflect.FileDescriptor
View Source
var File_app_permission_pb_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "infraboard.keyauth.permission.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "QueryPermission",
			Handler:    _Service_QueryPermission_Handler,
		},
		{
			MethodName: "QueryRole",
			Handler:    _Service_QueryRole_Handler,
		},
		{
			MethodName: "CheckPermission",
			Handler:    _Service_CheckPermission_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "app/permission/pb/service.proto",
}

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

Functions

func HttpEntry

func HttpEntry() *http.EntrySet

HttpEntry todo

func RegisterServiceServer added in v0.6.4

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type CheckPermissionRequest

type CheckPermissionRequest struct {

	// @gotags: json:"page"
	Page *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	// @gotags: json:"namespace_id"
	NamespaceId string `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id"`
	// @gotags: json:"endpoint_id"
	EndpointId string `protobuf:"bytes,3,opt,name=endpoint_id,json=endpointId,proto3" json:"endpoint_id"`
	// @gotags: json:"service_id"
	ServiceId string `protobuf:"bytes,4,opt,name=service_id,json=serviceId,proto3" json:"service_id"`
	// @gotags: json:"path"
	Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path"`
	// @gotags: json:"account"
	Account string `protobuf:"bytes,6,opt,name=account,proto3" json:"account"`
	// 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) GetAccount added in v0.6.5

func (x *CheckPermissionRequest) GetAccount() string

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) GetPath

func (x *CheckPermissionRequest) GetPath() string

func (*CheckPermissionRequest) GetServiceId

func (x *CheckPermissionRequest) GetServiceId() string

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 QueryPermissionRequest

type QueryPermissionRequest struct {

	// @gotags: json:"page"
	Page *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	// @gotags: json:"namespace_id"
	NamespaceId string `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id"`
	// @gotags: json:"account"
	Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account"`
	// 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) GetAccount

func (x *QueryPermissionRequest) GetAccount() string

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 {

	// @gotags: json:"page"
	Page *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	// @gotags: json:"namespace_id"
	NamespaceId string `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id"`
	// @gotags: json:"with_permission"
	WithPermission bool `protobuf:"varint,3,opt,name=with_permission,json=withPermission,proto3" json:"with_permission"`
	// @gotags: json:"account"
	Account string `protobuf:"bytes,4,opt,name=account,proto3" json:"account"`
	// 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) GetAccount

func (x *QueryRoleRequest) GetAccount() string

func (*QueryRoleRequest) GetNamespaceId

func (x *QueryRoleRequest) GetNamespaceId() string

func (*QueryRoleRequest) GetPage

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

func (*QueryRoleRequest) GetWithPermission

func (x *QueryRoleRequest) GetWithPermission() bool

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 ServiceClient added in v0.6.4

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

ServiceClient is the client API for Service 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 NewServiceClient added in v0.6.4

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer added in v0.6.4

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

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer added in v0.6.4

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) CheckPermission added in v0.6.4

func (UnimplementedServiceServer) QueryPermission added in v0.6.4

func (UnimplementedServiceServer) QueryRole added in v0.6.4

type UnsafeServiceServer added in v0.6.4

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

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer 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