MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / is_queue_topic_field

Function is_queue_topic_field

internal/cbm/extract_calls.c:2654–2666  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

2652// arg (e.g. Go `SendMessageInput{QueueUrl: ...}`, `PublishInput{TopicArn: ...}`).
2653// Case-insensitive so QueueUrl/QueueURL/queue_url all match.
2654static 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).
2669static const char *extract_string_value(CBMExtractCtx *ctx, TSNode val_node, bool url_context) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected