MCPcopy Create free account
hub / github.com/authorizerdev/authorizer / appDataToMap

Function appDataToMap

internal/grpcsrv/handlers/project.go:113–118  ·  view source on GitHub ↗

appDataToMap is the inverse of mapToAppData: it unwraps the proto AppData (google.protobuf.Struct) back into a free-form map for the model layer. Returns nil for an absent/empty AppData so optional semantics are preserved.

(in *authorizerv1.AppData)

Source from the content-addressed store, hash-verified

111// (google.protobuf.Struct) back into a free-form map for the model layer.
112// Returns nil for an absent/empty AppData so optional semantics are preserved.
113func appDataToMap(in *authorizerv1.AppData) map[string]any {
114 if in == nil || in.GetValue() == nil {
115 return nil
116 }
117 return in.GetValue().AsMap()
118}
119
120// optionalString maps a proto3 scalar string onto the model layer's nullable
121// *string: an empty wire value means "unset" and collapses to nil, matching

Callers 6

UpdateUserMethod · 0.85
AddWebhookMethod · 0.85
UpdateWebhookMethod · 0.85
TestEndpointMethod · 0.85
SignupMethod · 0.85
UpdateProfileMethod · 0.85

Calls 1

GetValueMethod · 0.45

Tested by

no test coverage detected