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)
| 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. |
| 113 | func 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 |
no test coverage detected