Documentation
¶
Overview ¶
Package share revokes a shared provider account. Revoking always succeeds: the policy bindings holding the share let go of it (a binding left with no account goes), relay keys whose lane it was move to their principal's own account and keep working (or stop, when that is a personal account turned off), and pools drawing on it lose it. Each change is reported, so whoever revokes sees the impact without needing to see or edit the rows.
Out of scope: who may revoke (the callers check), and making shares (app/refcheck and the control API).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct {
// Kind is the row's API singular: policy-binding, key or pool.
Kind string
ID string
Name string
Owner meta.Owner
// Field is the field that named the share.
Field string
// Deleted is set on a policy binding the revoke left with no account, which goes.
Deleted bool
}
Change is one row a revoke changes besides the share itself.
type Rows ¶
type Rows struct {
Bindings []*policybinding.PolicyBinding
Keys []*key.Key
Pools []*pool.Pool
}
Rows are what a revoke reads.
type Stores ¶
type Stores struct {
Account *account.Store
PolicyBinding *policybinding.Store
Key *key.Store
Pool *pool.Store
// OwnAccount returns the id of a principal's own account (a user's personal account, a service account's account), making it on first use; "" leaves the key with no lane, which stops it while that account is turned off.
OwnAccount func(ctx context.Context, p key.Principal) (string, error)
}
Stores are what a revoke writes through; the caller runs Revoke inside one transaction.