Documentation
¶
Overview ¶
Package resourcescope holds non-secret, immutable connector scope rules. It does not resolve environments, credentials, or imported server metadata.
Index ¶
Constants ¶
const S3PolicyID = catalog.S3ResourceScopePolicyID
Variables ¶
var ErrInvalid = xerror.New(xerror.KindInvalidInput, "RESOURCE_SCOPE_INVALID", "resource scope or selector is unsupported or outside the permitted scope")
Functions ¶
func ValidRelativeKey ¶
ValidRelativeKey deliberately rejects encoded/ambiguous paths. S3 keys are literal; this policy does not decode input or normalize away traversal.
Types ¶
type Identity ¶
type Identity struct {
PolicyID, DataSource, Operation, Contract, Revision, ObjectID, Representation string
}
Identity omits concrete target and selector settings from historical readback.
type Scope ¶
type Scope struct {
PolicyID string `json:"policy_id"`
DataSource slug.Slug `json:"data_source"`
Operation slug.Slug `json:"operation"`
Contract slug.Slug `json:"contract"`
Revision slug.Slug `json:"revision"`
ObjectID string `json:"object_id"`
Representation model.ContractRepresentation `json:"representation"`
S3 *S3 `json:"s3"`
}
Scope maps one pinned contract object to a logical saved operation. Concrete environment/binding selection remains a deployment responsibility.
func (Scope) ValidateStatement ¶
func (s Scope) ValidateStatement(raw json.RawMessage) error
ValidateStatement checks the supported S3 field roles before compilation. Only key, content and object metadata may contain execution substitutions.