Check if a struct-field name identifies a queue/topic target. Cloud SDKs pass the destination via a composite-literal input struct rather than a bare string arg (e.g. Go `SendMessageInput{QueueUrl: ...}`, `PublishInput{TopicArn: ...}`). Case-insensitive so QueueUrl/QueueURL/queue_url all match.
| 2652 | // arg (e.g. Go `SendMessageInput{QueueUrl: ...}`, `PublishInput{TopicArn: ...}`). |
| 2653 | // Case-insensitive so QueueUrl/QueueURL/queue_url all match. |
| 2654 | static bool is_queue_topic_field(const char *key) { |
| 2655 | static const char *fields[] = {"QueueUrl", "QueueURL", "TopicArn", "TopicARN", "QueueName", |
| 2656 | "TopicName", "QueueArn", "QueueARN", "Destination", NULL}; |
| 2657 | if (!key || !key[0]) { |
| 2658 | return false; |
| 2659 | } |
| 2660 | for (int i = 0; fields[i]; i++) { |
| 2661 | if (strcasecmp(key, fields[i]) == 0) { |
| 2662 | return true; |
| 2663 | } |
| 2664 | } |
| 2665 | return false; |
| 2666 | } |
| 2667 | |
| 2668 | // Extract string value from a node (literal or constant reference). |
| 2669 | static const char *extract_string_value(CBMExtractCtx *ctx, TSNode val_node, bool url_context) { |
no outgoing calls
no test coverage detected