Documentation
¶
Overview ¶
Package resourcesharewire assembles resource shares (#2258) from the platform: the share store, the persona each caller resolves to, the people of a persona, and the share email.
It is a package of its own rather than a function in the composition root because that root is at its size budget.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallerOf ¶
func CallerOf(reg *persona.Registry) func(roles []string) resourceshare.Caller
CallerOf resolves a caller's persona for the share routes.
func TablePermission ¶
func TablePermission(p *platform.Platform) tablesource.SharePermission
TablePermission is the permission a share gives a table registration's caller on a resource, which lets an editor share register a table over it (#2258); nil without a database.
Types ¶
type Shares ¶
type Shares struct {
// contains filtered or unexported fields
}
Shares is the assembled service, nil on a deployment without a database, where nothing is shared and every method does nothing.
func New ¶
func New(p *platform.Platform, notify *notifydelivery.Handle) *Shares
New assembles the service for p, telling recipients through notify.
func (*Shares) Bind ¶
func (s *Shares) Bind(base resource.ClaimsExtractor) resource.ClaimsExtractor
Bind wraps the resources API's claims so each request's carry the caller's share lookup, and makes them the claims the share routes authenticate with.