Documentation
¶
Overview ¶
Package hookpolicy implements per-hook tenant defaults and repository overrides. Configuration is administrative data; recipes can request but cannot create grants.
Index ¶
- Constants
- func CellKey(repository string) string
- func Decode(raw []byte, out any) error
- func Identity(repository string) (string, error)
- func Intersect(a, b permissions.JobDB) permissions.JobDB
- func Path(s string) (string, error)
- func Reference(s string) (string, error)
- type Document
- type Entry
- type Snapshot
- type SourceTrust
- type Trust
Constants ¶
View Source
const CellPrefix = "_c2j_hook_policy_cell_"
View Source
const TenantKey = "_c2j_hook_policy_tenant"
Variables ¶
This section is empty.
Functions ¶
func Intersect ¶
func Intersect(a, b permissions.JobDB) permissions.JobDB
Types ¶
type Document ¶
type Document struct {
Version int `json:"version"`
Repository string `json:"repository,omitempty"`
Hooks map[string]Entry `json:"hooks"`
}
type Entry ¶
type Entry struct {
Perms permissions.Spec `json:"perms"`
Trust SourceTrust `json:"source_trust,omitempty"`
}
func (Entry) Authority ¶
func (e Entry) Authority(commit string, parent permissions.State, call *permissions.Spec) (permissions.State, error)
Authority bounds both driver input materialization and delegated operation access.
type Snapshot ¶
type Snapshot struct {
Revision string `json:"revision"`
Repository string `json:"repository"`
Tenant *Document `json:"tenant,omitempty"`
Cell *Document `json:"cell,omitempty"`
}
Snapshot records absence as well as values; it is safe to persist in history.
type SourceTrust ¶
Click to show internal directories.
Click to hide internal directories.