MCPcopy
hub / github.com/grpc/grpc-go / parsePeer

Function parsePeer

authz/rbac_translator.go:179–188  ·  view source on GitHub ↗
(source peer)

Source from the content-addressed store, hash-verified

177}
178
179func parsePeer(source peer) *v3rbacpb.Principal {
180 if len(source.Principals) == 0 {
181 return &v3rbacpb.Principal{
182 Identifier: &v3rbacpb.Principal_Any{
183 Any: true,
184 },
185 }
186 }
187 return principalOr(parsePrincipalNames(source.Principals))
188}
189
190func parsePaths(paths []string) []*v3rbacpb.Permission {
191 ps := make([]*v3rbacpb.Permission, 0, len(paths))

Callers 1

parseRulesFunction · 0.85

Calls 2

principalOrFunction · 0.85
parsePrincipalNamesFunction · 0.85

Tested by

no test coverage detected