code wiki / _hdl_build / nx_cms_api.nx

nx_cms_api.nx

buildroot/runtime/_hdl_build/nx_cms_api.nx

2514 B58 linesdepth 3pulls 4 transitivereach 2 importersview sourcekind librarytopic cms
docsdependenciesstructsconstsfunctions

about

nx_cms_api.nx -- CMS REST + GraphQL-style content API (the rest-graphql-api class). Serves the real nx_cms_store content as RFC 8259 JSON via nx_json_emit, with FIELD SELECTION (the GraphQL essence: the caller asks for exactly the fields it wants; REST = ask for all, GraphQL = ask for a subset) and correct string escaping (the security axis -- a value containing a quote or newline can never break out of the JSON, unlike naive string concatenation). Read side; composes cst_get + json_emit. module: nishi-core.cms.api depends: nishi-core.cms.store + nishi-core.data.json_emit + nishi-core.io.syscalls capability: CMS license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_cms_store.nx nx_json_emit.nx nx_syscalls.nx nx_cms_api.nx nx_cms_api_exceed_gate.nx nx_cms_api_gate.nx

imports: nx_cms_store.nxnx_json_emit.nxnx_syscalls.nx

imported by: nx_cms_api_exceed_gate.nxnx_cms_api_gate.nx

structs

none

consts

none

functions

14func capi_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: cms_api_emit_obj
19func cms_api_emit_obj(w: *JsonWriter, store: *u8, n: i64, names: *i64, nf: i64) -> i64
38func cms_api_render_obj(store: *u8, n: i64, names: *i64, nf: i64, out: *u8, cap: i64) -> i64
47func cms_api_render_list(stores: *i64, counts: *i64, ns: i64, names: *i64, nf: i64, out: *u8, cap: i64) -> i64