Documentation
¶
Index ¶
Constants ¶
View Source
const OwnerScopeMigrationRequiredCode = "owner_scope_migration_required"
Variables ¶
View Source
var ErrInvalidResourceScope = errors.New("resource owner scope is invalid")
View Source
var ErrOwnerScopeMigrationRequired = errors.New(OwnerScopeMigrationRequiredCode)
ErrOwnerScopeMigrationRequired rejects persisted resources whose owner scope cannot be reconstructed without guessing.
View Source
var ErrSessionRequired = errors.New("authenticated session is required")
Functions ¶
Types ¶
type Context ¶
type Context struct {
OwnerSessionHash string `json:"owner_session_hash"`
OwnerUserHash string `json:"owner_user_hash"`
OwnerEnvHash string `json:"owner_env_hash"`
SessionChannelIDHash string `json:"session_channel_id_hash"`
}
func (Context) ResourceScope ¶ added in v0.5.0
func (s Context) ResourceScope(kind ScopeKind) (ResourceScope, error)
type ResourceScope ¶ added in v0.5.0
type ResourceScope struct {
Kind ScopeKind `json:"kind"`
OwnerEnvHash string `json:"owner_env_hash"`
OwnerUserHash string `json:"owner_user_hash,omitempty"`
}
ResourceScope is the stable ownership boundary for persistent plugin data. Session and channel hashes are intentionally excluded: those values belong only to short-lived surfaces, operations, streams, and token audiences.
func (ResourceScope) Matches ¶ added in v0.5.0
func (s ResourceScope) Matches(other ResourceScope) bool
func (ResourceScope) Valid ¶ added in v0.5.0
func (s ResourceScope) Valid() bool
func (ResourceScope) Validate ¶ added in v0.5.0
func (s ResourceScope) Validate() error
Click to show internal directories.
Click to hide internal directories.