billingquery v1.0.0
Sources
Destinations
Prerequisites:
- Nodejs version >= 20
- Typescript
Development Guidelines
Folder structure
|__ src/services Folder that contains the api server
|__ src/cli contains your file with the commander instructions - this is the entry to your command line tool
|__ src/plugins contains your implementation and the logic source, destination Note
Before pushing this code , DO NOT miss the run command
make fmtBefore
Install module dependencies
npm installBuild Code
npm run buildMaking the Command Available Globally
make cliIf got errors, please run:
sudo chown -R $USER /usr/local/lib/node_modulesStart Dev
make serverUsage
Start With APIs
Open: http://localhost:3000/
Start With Cli
cloudbilling -config config.yamlCode Style
Check Style Code with Prettier
npm run prettierFix Them
npm run prettier:fixAdd a New Plugin
Please add by template code
source-name/
├── ...
├── tables/
├ ├── AbstractTable.ts
├ ├── XTable.ts
├ ├── YTable.ts
├── client.ts
├── index.ts
└── spec.jsonSource Tables is Supported
Azure
TableName: azure_cost_by_tag
| NAME | TYPE |
|---|---|
| date | DATE |
| tag_key | STRING |
| tag_name | STRING |
| cost | BIGNUMERIC |
| cloud | STRING |
TableName: azure_cost_by_service
| NAME | TYPE |
|---|---|
| date | DATE |
| service | STRING |
| cost | BIGNUMERIC |
| cloud | STRING |
AWS
TableName: aws_cost_by_tag
| NAME | TYPE |
|---|---|
| date | DATE |
| service | STRING |
| tag_name | STRING |
| cost | BIGNUMERIC |
| cloud | STRING |
TableName: aws_cost_by_service
| NAME | TYPE |
|---|---|
| date | DATE |
| service | STRING |
| cost | BIGNUMERIC |
| cloud | STRING |
GCP
TableName: gcp_cost_by_tag
| NAME | TYPE |
|---|---|
| date | DATE |
| tag_key | STRING |
| tag_name | STRING |
| cost | BIGNUMERIC |
| cloud | STRING |
TableName: gcp_cost_by_service
| NAME | TYPE |
|---|---|
| date | DATE |
| service | STRING |
| cost | BIGNUMERIC |
| cloud | STRING |
2 years ago