MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / ComputeChannelsForPrincipal

Method ComputeChannelsForPrincipal

auth/auth_test.go:1446–1452  ·  view source on GitHub ↗
(ctx context.Context, principal Principal, scope, collection string)

Source from the content-addressed store, hash-verified

1444}
1445
1446func (m mockComputerV2) ComputeChannelsForPrincipal(ctx context.Context, principal Principal, scope, collection string) (ch.TimedSet, error) {
1447 if user, ok := principal.(User); ok {
1448 return m.channels[user.Name()].Copy(), nil
1449 } else {
1450 return m.roleChannels[principal.Name()].Copy(), nil
1451 }
1452}
1453
1454func (m mockComputerV2) ComputeRolesForUser(ctx context.Context, user User) (ch.TimedSet, error) {
1455 return m.roles[user.Name()].Copy(), nil

Callers

nothing calls this directly

Calls 2

NameMethod · 0.65
CopyMethod · 0.45

Tested by

no test coverage detected