Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: typos in plugin development #8311

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/_src/gateway/plugin-development/custom-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ return {
id = typedefs.uuid,
},
{
-- also interted by the DAO itself
-- also inserted by the DAO itself
created_at = typedefs.auto_timestamp_s,
},
{
Expand Down Expand Up @@ -599,7 +599,7 @@ local entity, err = kong.db.keyauth_credentials:select({
})

if err then
kong.log.err("Error when inserting keyauth credential: " .. err)
kong.log.err("Error when selecting keyauth credential: " .. err)
return nil
end

Expand All @@ -612,7 +612,7 @@ end
### Iterate over all the entities

``` lua
for entity, err on kong.db.<name>:each(entities_per_page) do
for entity, err in kong.db.<name>:each(entities_per_page) do
if err then
...
end
Expand All @@ -631,7 +631,7 @@ and otherwise assume that `entity` is present.
Example of usage:

``` lua
for credential, err on kong.db.keyauth_credentials:each(1000) do
for credential, err in kong.db.keyauth_credentials:each(1000) do
if err then
kong.log.err("Error when iterating over keyauth credentials: " .. err)
return nil
Expand Down
2 changes: 1 addition & 1 deletion app/_src/gateway/plugin-development/entities-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ local cache_key = kong.db.keyauth_credentials:cache_key("abcd")
```

This would produce a `cache_key` for the API key `"abcd"` (retrieved from one
of the query's arguments) that we can the use to retrieve the key from the
of the query's arguments) that we can then use to retrieve the key from the
cache (or fetch from the database if the cache is a miss):

```lua
Expand Down
Loading