Documentation
¶
Overview ¶
Package syncrec provides a recording authz.RelationshipSyncer for tests.
Index ¶
- type Recorder
- func (r *Recorder) AddAppRole(_ context.Context, principalID, orgID uuid.UUID, application, role string) error
- func (r *Recorder) AddOrgMembership(_ context.Context, principalID, orgID uuid.UUID, role string) error
- func (r *Recorder) Calls() []string
- func (r *Recorder) RegisterOrganization(_ context.Context, orgID, ownerID uuid.UUID) error
- func (r *Recorder) RegisterPrincipal(_ context.Context, principalID uuid.UUID) error
- func (r *Recorder) RemoveAppRole(_ context.Context, principalID, orgID uuid.UUID, application, role string) error
- func (r *Recorder) RemoveOrgMembership(_ context.Context, principalID, orgID uuid.UUID, role string) error
- func (r *Recorder) RemoveResourceGrant(_ context.Context, principalID uuid.UUID, ref authz.ResourceRef) error
- func (r *Recorder) SetResourceGrant(_ context.Context, principalID uuid.UUID, ref authz.ResourceRef, role string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recorder ¶
type Recorder struct {
*noop.Syncer
// Err, when set, is returned from the recorded methods.
Err error
// contains filtered or unexported fields
}
Recorder records the registration and application-role calls made to it. All other syncer methods are no-ops from the embedded noop syncer.
func (*Recorder) AddAppRole ¶
func (r *Recorder) AddAppRole(_ context.Context, principalID, orgID uuid.UUID, application, role string) error
AddAppRole records the call.
func (*Recorder) AddOrgMembership ¶
func (r *Recorder) AddOrgMembership(_ context.Context, principalID, orgID uuid.UUID, role string) error
AddOrgMembership records the call.
func (*Recorder) RegisterOrganization ¶
RegisterOrganization records the call.
func (*Recorder) RegisterPrincipal ¶
RegisterPrincipal records the call.
func (*Recorder) RemoveAppRole ¶
func (r *Recorder) RemoveAppRole(_ context.Context, principalID, orgID uuid.UUID, application, role string) error
RemoveAppRole records the call.
func (*Recorder) RemoveOrgMembership ¶
func (r *Recorder) RemoveOrgMembership(_ context.Context, principalID, orgID uuid.UUID, role string) error
RemoveOrgMembership records the call.
func (*Recorder) RemoveResourceGrant ¶
func (r *Recorder) RemoveResourceGrant(_ context.Context, principalID uuid.UUID, ref authz.ResourceRef) error
RemoveResourceGrant records the call.
Click to show internal directories.
Click to hide internal directories.