permission

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package permission 读取原始包的标准权限声明,并按文档体范围执行预检。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPackage

func CheckPackage(pkg *container.Package, policy permission.Policy, action permission.Action, scopes []int) error

CheckPackage 按表8检查原始包的目标文档体,不解析页面或资源。 scopes为nil时检查全部;任意条目编辑无法证明资源归属时应使用全部范围。 显式忽略声明允许诊断程序处理权限入口本身损坏或加密的物理包。

Types

type ScopedDeclaration

type ScopedDeclaration struct {
	Scope int
	Value *spec.Permissions
}

ScopedDeclaration 保留声明的原始文档体索引,不能将选中范围重新编号。

func ReadPackage

func ReadPackage(pkg *container.Package, scopes []int, limit int64) ([]ScopedDeclaration, error)

ReadPackage 在预算内读取原始声明,供长任务保留声明并重新评估时钟。 limit为零沿用容器默认XML预算;不缓存授权结果。

Jump to

Keyboard shortcuts

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