Database API scaffolding #4

Open
opened 3 years ago by garrettmills · 0 comments
Owner

Now that we have some basic scaffolding out of the way, we need to provide a user-code-facing way to interact with the database API.

We'll have an entirely self-contained helper class for calling API endpoints for now that gets included in the execution context.

Before the user code is executed, this helper is given static credentials to rnu in the API. These credentials expire after execution.

It's very important that this helper has no direct object reference back to the rest of the code.

Once we've done that, link in the database API wrapper classes so plugins can access them. e.g. getDatabase(name) should return the database with name name.

Now that we have some basic scaffolding out of the way, we need to provide a user-code-facing way to interact with the database API. We'll have an entirely self-contained helper class for calling API endpoints for now that gets included in the execution context. Before the user code is executed, this helper is given static credentials to rnu in the API. These credentials expire after execution. It's very important that this helper has no direct object reference back to the rest of the code. Once we've done that, link in the database API wrapper classes so plugins can access them. e.g. `getDatabase(name)` should return the database with name `name`.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: Noded/plugins#4
Loading…
There is no content yet.