Skip to content

doc(toolchain): sync client-go with master - #473

Merged
imbajin merged 1 commit into
apache:masterfrom
bitflicker64:doc-sync/toolchain-client-go
Sep 6, 2026
Merged

doc(toolchain): sync client-go with master#473
imbajin merged 1 commit into
apache:masterfrom
bitflicker64:doc-sync/toolchain-client-go

Conversation

@bitflicker64

Copy link
Copy Markdown
Contributor

Purpose of the PR

Sync the hugegraph-client-go docs (en + cn) with hugegraph-toolchain master (3b385c3d).

Page What was wrong What changed Source on master
content/en/docs/quickstart/client/hugegraph-client-go.md, content/cn/... Intro said the client provides an edges API. The edge package is empty and CommonClient has no Edge field. Intro now lists schema groups (property keys, vertex labels, edge labels) and states that an edge data API is not implemented yet. hugegraph-client-go/hugegraph.go:49, hugegraph-client-go/api/v1/edge/edge.go:18
same Claimed all graph resource paths include the graph space and that an empty GraphSpace only matters for old servers. Only the Vertex API and the default Gremlin aliases use GraphSpace; schema, label and Version calls always hit /graphs/{graph}/... and /versions. Rewrote the GraphSpace paragraph to describe which calls use it and how the empty value is handled. hugegraph-client-go/api/v1/vertex/vertex.go:171, hugegraph-client-go/api/v1/gremlin/gemlin.go:129, hugegraph-client-go/api/v1/schema.go:123, hugegraph-client-go/api/v1/propertykey/propertykey.go:262, hugegraph-client-go/api/v1/version.go:69
same Constructor constraints beyond "Host must be an IP" were missing: port range, HTTP-only scheme, Basic Auth only when both username and password are set. Added these to the initialization section. hugegraph-client-go/hugegraph.go:86, hugegraph-client-go/hugegraph.go:93, hugegraph-client-go/hgtransport/hgtransport.go:176
same Config fields Transport and Logger, the http.DefaultTransport fallback, and the four hgtransport loggers were not documented. Added a "Configuration Options" section with a field table, the logger list, and a ColorLogger example. hugegraph-client-go/hugegraph.go:38, hugegraph-client-go/hgtransport/hgtransport.go:77, hugegraph-client-go/hgtransport/logger.go:46
same NewDefaultCommonClient description omitted that it attaches a ColorLogger with request and response bodies enabled. Mentioned the logger in the helper description. hugegraph-client-go/hugegraph.go:69
same Entry point table used vague labels ("Manage property keys") and did not distinguish EdgeLabel (no GetByName/UpdateUserdata) from the other schema groups. Table now lists the exact operations per group, the UpdateProperties actions, and the With... option pattern. hugegraph-client-go/api/v1/propertykey/propertykey.go:42, hugegraph-client-go/api/v1/vertexlabel/vertexlabel.go:43, hugegraph-client-go/api/v1/edgelabel/edgelabel.go:39, hugegraph-client-go/api/v1/vertex/vertex.go:45, hugegraph-client-go/internal/model/model.go:25
same Gremlin behavior undocumented: Post defaults language to gremlin-groovy and fills graph/g aliases; Get only returns the status code and prints the body. Described both in the table and added a Post example taken from the test. hugegraph-client-go/api/v1/gremlin/gemlin.go:204, hugegraph-client-go/api/v1/gremlin/gemlin.go:139, hugegraph-client-go/api/v1/gremlin/gemlin.go:192, hugegraph-client-go/api/v1/gremlin/gemlin_test.go:35
same No warning that Vertex operations take model.Vertex[any] from an internal package, which external modules cannot import; the vertex test is fully commented out. Added a note under the entry point table. hugegraph-client-go/api/v1/vertex/vertex.go:142, hugegraph-client-go/internal/model/model.go:40, hugegraph-client-go/api/v1/vertex/vertex_test.go:33
same Test links did not include the Gremlin test, the only runnable data-API example. Added gemlin_test.go to the reference links. hugegraph-client-go/api/v1/gremlin/gemlin_test.go:28

Fix the GraphSpace and edge API claims, document Config fields and the
hgtransport loggers, and list the exact operations behind each entry point.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文部分与源码保持一致且表述清晰,评分 9.2/10,按规则可直接合并。

@imbajin
imbajin merged commit b1a5494 into apache:master Sep 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants