Commit Graph
2 Commits
Author SHA1 Message Date
QiuSWandClaude Opus 5 a31c4776c4 feat(#48): port SYB ERP client, session store and config (Stage 1)
Port the SYB ERP HTTP client from the upstream cmautobuy project. The
package is stdlib-only (no DB, no gin), so client.go, columns.go, ocr.go
and their httptest suites carry over almost verbatim; only the package
name and doc references changed.

Add on top of the port:
  - models.SYBSession + gorm SessionStore, so a restart does not force a
    fresh captcha. Cookies are credential-equivalent and carry json:"-".
    Expired sessions read as absent because SYB has no rolling renewal.
  - config.Extend.SYB. Non-secret settings live in settings.yml;
    username and password come only from GOAUTO_SYB_* environment
    variables, so no credential lands in a tracked file.
  - docs/12-syb-erp-interface.md, the ported interface contract.

The guard tests were mutation-checked: reverting json:"-" and renaming a
settings.yml key each make their test fail.

No import endpoint yet — that needs real credentials and live network
verification, which is Stage 2 of #48.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 16:30:35 +08:00
QiuSW a4ac398ca0 docs: prepare Wiki-first migration (#43) 2026-08-17 11:27:09 +08:00