Skip to content

Commit

Permalink
add quota
Browse files Browse the repository at this point in the history
  • Loading branch information
harshaio committed Feb 29, 2024
1 parent 93553ac commit 0d6b950
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/appmixer/google/drive/CopyFile/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"https://www.googleapis.com/auth/drive.file"
]
},
"quota": {
"manager": "appmixer:google:drive",
"resources": "readandwrite",
"scope": {
"userId": "{{userId}}"
}
},
"inPorts": [
{
"name": "in",
Expand Down
7 changes: 7 additions & 0 deletions src/appmixer/google/drive/CreateFolder/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"https://www.googleapis.com/auth/drive.file"
]
},
"quota": {
"manager": "appmixer:google:drive",
"resources": "readandwrite",
"scope": {
"userId": "{{userId}}"
}
},
"inPorts": [
{
"name": "in",
Expand Down
7 changes: 7 additions & 0 deletions src/appmixer/google/drive/DeleteFileOrFolder/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"https://www.googleapis.com/auth/drive.file"
]
},
"quota": {
"manager": "appmixer:google:drive",
"resources": "readandwrite",
"scope": {
"userId": "{{userId}}"
}
},
"inPorts": [
{
"name": "in",
Expand Down
7 changes: 7 additions & 0 deletions src/appmixer/google/drive/DownloadFile/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
"https://www.googleapis.com/auth/drive.readonly"
]
},
"quota": {
"manager": "appmixer:google:drive",
"resources": "readandwrite",
"scope": {
"userId": "{{userId}}"
}
},
"inPorts": [
{
"name": "in",
Expand Down
7 changes: 7 additions & 0 deletions src/appmixer/google/drive/ExportFile/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
"https://www.googleapis.com/auth/drive.file"
]
},
"quota": {
"manager": "appmixer:google:drive",
"resources": "readandwrite",
"scope": {
"userId": "{{userId}}"
}
},
"inPorts": [
{
"name": "in",
Expand Down
7 changes: 7 additions & 0 deletions src/appmixer/google/drive/FindFileOrFolder/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
"https://www.googleapis.com/auth/drive.file"
]
},
"quota": {
"manager": "appmixer:google:drive",
"resources": "readandwrite",
"scope": {
"userId": "{{userId}}"
}
},
"inPorts": [
{
"name": "in",
Expand Down
7 changes: 7 additions & 0 deletions src/appmixer/google/drive/GetFile/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
"https://www.googleapis.com/auth/drive.file"
]
},
"quota": {
"manager": "appmixer:google:drive",
"resources": "readandwrite",
"scope": {
"userId": "{{userId}}"
}
},
"inPorts": [
{
"name": "in",
Expand Down
7 changes: 7 additions & 0 deletions src/appmixer/google/drive/ListFiles/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
"https://www.googleapis.com/auth/drive.file"
]
},
"quota": {
"manager": "appmixer:google:drive",
"resources": "readandwrite",
"scope": {
"userId": "{{userId}}"
}
},
"inPorts": [
{
"name": "in",
Expand Down
7 changes: 7 additions & 0 deletions src/appmixer/google/drive/NewFile/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
"https://www.googleapis.com/auth/drive.file"
]
},
"quota": {
"manager": "appmixer:google:drive",
"resources": "readandwrite",
"scope": {
"userId": "{{userId}}"
}
},
"properties": {
"schema": {
"properties": {
Expand Down
7 changes: 7 additions & 0 deletions src/appmixer/google/drive/UploadFile/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"https://www.googleapis.com/auth/drive.file"
]
},
"quota": {
"manager": "appmixer:google:drive",
"resources": "readandwrite",
"scope": {
"userId": "{{userId}}"
}
},
"inPorts": [
{
"name": "in",
Expand Down
23 changes: 23 additions & 0 deletions src/appmixer/google/drive/quota.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

module.exports = {

rules: [
{
// user quota limit on google
//https://developers.google.com/drive/api/guides/limits
limit: 12000,
window: 1000 * 60,
scope: 'userId',
queueing: 'fifo',
resource: 'readandwrite'
},
{
// application quota limit
limit: 12000,
window: 1000 * 60,
queueing: 'fifo',
resource: 'readandwrite'
}
]
};

0 comments on commit 0d6b950

Please sign in to comment.