package
0.0.0-20230705210123-6fe496104d33
Repository: https://github.com/dagosu/bookingapp.git
Documentation: pkg.go.dev
# Functions
ExportedPath will return correctly mapped paths for exported files eg: vias[0]airport.iata => vias.airport.iata eg: calculated_fields[AEGS]datetime => calculated_fields.AEGS.datetime.
some of the field descriptors have the same path and the query will return error because there are duplicate paths in the $project section so we send the distinct paths to the GetFlights function.
GetPaths will return all unique field descriptor paths (mongo compatible).
MapPathToPolicyResource will match the fieldDescriptor path to the policy resource eg: delay_codes[0]code => delay_codes.code eg: codeshares[0] => codeshares.
NormalizePath will replace all parenthesis with dots eg: delay_codes[0]code => delay_codes.0.code eg: codeshares[0] => codeshares.0.
SliceToMap will convert a slice of field descriptors to a map (index being the field descriptor path).
UnsetValueByPath will unset a field (fieldDescriptor.path) from a proto currently works only for slices of objects.