Add Go quick start and interface definition documentation (#1043)

* Add Go quick start and interface definition documentation

The website had quick starts and interface definitions for Java, C++,
C, and Python but nothing for the Go binding in go/tsfile. Add a Go
quick start and a Go interface definition, in English and Chinese,
under both UserGuide/latest and UserGuide/develop, following the
structure of the existing pages.

The quick start covers building the native library with
`mvnw -P with-cpp -DskipTests package`, consuming the module through a
replace directive (the module is not published to the module proxy),
writing with a Tablet and with an Arrow record batch, and querying in
row mode and Arrow batch mode. The interface definition documents the
schema types, writer and reader APIs, query options, tag filters, the
one-based result-set columns, the row/batch mode split, and the error
sentinels.

Register both pages in the v2.x sidebars.

* Document Go usage with the published C/C++ packages

Explain that the Go binding needs a C/C++ build of TsFile but not
necessarily a source build: the published SDK, DEB/RPM packages, and
Homebrew formula work when CGO_CFLAGS points at the installed
include/tsfile directory and CGO_LDFLAGS at the library directory with
an rpath. Keep the source build as the route for Windows, and document
the PATH entries that MinGW builds need so that tsfile.dll and the GCC
runtime DLLs are found at run time.

* Document using the Windows ZIP with the Go binding

The Windows package ships bin\tsfile.dll and lib\tsfile.lib, and the
MinGW linker accepts that import library, so Windows does not need a
source build either: point CGO_CFLAGS at include\tsfile, CGO_LDFLAGS at
lib, and keep bin on PATH so the DLL is found at run time.

Restate the source build as the route for changing TsFile or platforms
without a package, and keep the MinGW PATH note for that case.

* Explain why the Windows source build uses MinGW

MinGW-w64 is both the default C++ generator for Windows in this
project and the compiler cgo uses for the Go package, so the explicit
-Dcpp.toolchain=mingw keeps the DLL and import library aligned with the
Go toolchain. State that in the quick start instead of leaving the flag
unexplained.
10 files changed
tree: b42989320bbafe19b680e10f97f5fc6c1c6e68c1
  1. .github/
  2. src/
  3. .asf.yaml
  4. .gitattributes
  5. .gitignore
  6. deploy.cjs
  7. deploy_staging.cjs
  8. doap_tsfile.rdf
  9. LICENSE
  10. NOTICE
  11. package.json
  12. pnpm-lock.yaml
  13. README.md
README.md

Apache TsFile Website

This branch contains the source files used to build the Apache TsFile website.

Website Contributions

For changes to the Apache TsFile website, open a pull request with the docs/dev branch as the base branch.