Expand description
Make all of lexe_api_core available under [lexe_api].
NOTE: Any crates which can depend on lexe_api_core directly (without
lexe-api) should do so to avoid [lexe_api] dependencies.
Traits defining Lexe’s various APIs.
§API Definitions
This module, as closely as possible, defines the various APIs exposed by different services to different clients. Although we do not have compile-time guarantees that the services exposed exactly match the definitions below, it is straightforward to compare the Axum routers and handlers with the definitions below to ensure consistency.
§Guidelines
All API requests and responses should return structs for upgradeability,
e.g. UserPkStruct instead of UserPk.
If an API method takes or returns nothing, make the type Empty and NOT
() (unit type). Using () makes it impossible to add optional fields in a
backwards-compatible way.
Each endpoint should be documented with:
-
- HTTP method e.g.
GET
- HTTP method e.g.
-
- Endpoint e.g.
/v1/file
- Endpoint e.g.
-
- Data used to make the request e.g.
VfsFileId
- Data used to make the request e.g.
-
- The return type e.g.
MaybeVfsFile
- The return type e.g.
The methods below should resemble the data actually sent across the wire.
Traits§
- AppBackend
Api - Defines the api that the backend exposes to the app (via the gateway).
- AppGateway
Api - Defines the api that the gateway directly exposes to the app.
- AppNode
Provision Api - Defines the api that the node exposes to the app during provisioning.
- AppNode
RunApi - Defines the api that the node exposes to the app during normal operation.
- Bearer
Auth Backend Api - The bearer auth API exposed by the backend (sometimes via the gateway) to
various consumers. This trait is defined separately from the
usual
ConsumerServiceApitraits becauseBearerAuthenticatorneeds to abstract over a generic implementor ofBearerAuthBackendApi. - Lexe
Mega Api - Defines the API the mega node exposes to the Lexe operators.
- Lexe
Node RunApi - Defines the API the node exposes to the Lexe operators at run time.
- Mega
Runner Api - Defines the API the runner exposes to mega nodes.
- Node
Backend Api - Defines the api that the backend exposes to the node.
- Node
LspApi - Defines the api that the LSP exposes to user nodes.
- Node
Runner Api - Defines the api that the runner exposes to the user node.
- Public
Gateway Api - Defines the api that the gateway exposes to the internet.