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:1890–1902  ·  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

1888// arg (e.g. Go `SendMessageInput{QueueUrl: ...}`, `PublishInput{TopicArn: ...}`).
1889// Case-insensitive so QueueUrl/QueueURL/queue_url all match.
1890static bool is_queue_topic_field(const char *key) {
1891 static const char *fields[] = {"QueueUrl", "QueueURL", "TopicArn", "TopicARN", "QueueName",
1892 "TopicName", "QueueArn", "QueueARN", "Destination", NULL};
1893 if (!key || !key[0]) {
1894 return false;
1895 }
1896 for (int i = 0; fields[i]; i++) {
1897 if (strcasecmp(key, fields[i]) == 0) {
1898 return true;
1899 }
1900 }
1901 return false;
1902}
1903
1904// Extract string value from a node (literal or constant reference).
1905static const char *extract_string_value(CBMExtractCtx *ctx, TSNode val_node) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected