(format v1pb.ExportFormat)
| 399 | } |
| 400 | |
| 401 | func convertToExportFormat(format v1pb.ExportFormat) storepb.ExportFormat { |
| 402 | switch format { |
| 403 | case v1pb.ExportFormat_CSV: |
| 404 | return storepb.ExportFormat_CSV |
| 405 | case v1pb.ExportFormat_JSON: |
| 406 | return storepb.ExportFormat_JSON |
| 407 | case v1pb.ExportFormat_SQL: |
| 408 | return storepb.ExportFormat_SQL |
| 409 | case v1pb.ExportFormat_XLSX: |
| 410 | return storepb.ExportFormat_XLSX |
| 411 | default: |
| 412 | } |
| 413 | return storepb.ExportFormat_FORMAT_UNSPECIFIED |
| 414 | } |
| 415 | |
| 416 | func GetUserFromContext(ctx context.Context) (*store.UserMessage, bool) { |
| 417 | user, ok := ctx.Value(common.UserContextKey).(*store.UserMessage) |
no outgoing calls
no test coverage detected