refactor: remove SearXNG references and rename binary to kafka

- Rename cmd/searxng-go to cmd/kafka
- Remove all SearXNG references from source comments while keeping
  "SearXNG-compatible API" in user-facing docs
- Update binary paths in README, CLAUDE.md, and Dockerfile
- Update log message to "kafka starting"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ashisgreat22 2026-03-22 01:47:03 +01:00
parent 4482cb4dde
commit fcd9be16df
18 changed files with 47 additions and 48 deletions

View file

@ -5,15 +5,15 @@ import (
"encoding/json"
)
// MainResult represents one element of SearXNG's `results` array.
// MainResult represents one element of the `results` array.
//
// SearXNG returns many additional keys beyond what templates use. To keep the
// The API returns many additional keys beyond what templates use. To keep the
// contract stable for proxying/merging, we preserve all unknown keys in
// `raw` and re-emit them via MarshalJSON.
type MainResult struct {
raw map[string]any
// Common fields used by SearXNG templates (RSS uses: title, url, content, pubdate).
// Common fields used by templates (RSS uses: title, url, content, pubdate).
Template string `json:"template"`
Title string `json:"title"`
Content string `json:"content"`
@ -28,12 +28,12 @@ type MainResult struct {
Positions []int `json:"positions"`
Engines []string `json:"engines"`
// These fields exist in SearXNG's MainResult base; keep them so downstream
// These fields exist in the MainResult base; keep them so downstream
// callers can generate richer output later.
OpenGroup bool `json:"open_group"`
CloseGroup bool `json:"close_group"`
// parsed_url in SearXNG is emitted as a tuple; we preserve it as-is.
// parsed_url is emitted as a tuple; we preserve it as-is.
ParsedURL any `json:"parsed_url"`
}

View file

@ -1,6 +1,6 @@
package contracts
// OutputFormat matches SearXNG's `/search?format=...` values.
// OutputFormat matches the `/search?format=...` values.
type OutputFormat string
const (
@ -28,7 +28,7 @@ type SearchRequest struct {
Engines []string
Categories []string
// EngineData matches SearXNG's `engine_data-<engine>-<key>=<value>` parameters.
// EngineData matches the `engine_data-<engine>-<key>=<value>` parameters.
EngineData map[string]map[string]string
// AccessToken is an optional request token used to gate paid/limited engines.
@ -36,7 +36,7 @@ type SearchRequest struct {
AccessToken string
}
// SearchResponse matches the JSON schema returned by SearXNG's `webutils.get_json_response()`.
// SearchResponse matches the JSON schema used by `webutils.get_json_response()`.
type SearchResponse struct {
Query string `json:"query"`
NumberOfResults int `json:"number_of_results"`