functionbuilder again
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-11-21 14:14:28 +11:00
parent d431eadbcc
commit e4392acbe3
5 changed files with 292 additions and 122 deletions

View File

@@ -31,12 +31,14 @@ functions:
action:
function: export-xlsx
input:
files:
- name: input.json
data: |
jq(.input)
worksheet-name: "TestSpreadsheet"
out-filename: example.xlsx
sheets:
- sheet:
worksheet-name: "TestSpreadsheet"
input-file:
- name: input.json
data: |
jq(.input)
```
#### Use jq to add a parent key 'input' containing array of objects
```yaml
@@ -45,12 +47,14 @@ functions:
action:
function: export-xlsx
input:
files:
- name: input.json
data: |
jq(.array | {input: . } | tostring )
worksheet-name: "TestSpreadsheet"
out-filename: example.xlsx
sheets:
- sheet:
worksheet-name: "TestSpreadsheet"
input-file:
- name: input.json
data: |
jq(.array | {input: . } | tostring )
```
### Secrets
@@ -115,9 +119,22 @@ functions:
| Name | Type | Go type | Required | Default | Description | Example |
|------|------|---------|:--------:| ------- |-------------|---------|
| files | [][DirektivFile](#direktiv-file)| `[]apps.DirektivFile` | | | File to create before running commands. | |
| infile | string| `string` | | | Name of the json input file to utilise | |
| out-filename | string| `string` | ✓ | `"output.xlsx"`| the filename of the output spreadsheet | |
| worksheet-name | string| `string` | | `"Sheet1"`| Label for the worksheet created in the spreadsheet | |
| sheets | [][PostParamsBodySheetsItems](#post-params-body-sheets-items)| `[]*PostParamsBodySheetsItems` | | | Array of worksheets to create in spreadsheet | |
#### <span id="post-params-body-sheets-items"></span> postParamsBodySheetsItems
**Properties**
| Name | Type | Go type | Required | Default | Description | Example |
|------|------|---------|:--------:| ------- |-------------|---------|
| infile | string| `string` | | | Name of the json input file to utilise | |
| input-file | [][DirektivFile](#direktiv-file)| `[]apps.DirektivFile` | | | File to create before running commands | |
| worksheet-name | string| `string` | | `"Sheet1"`| Label for the worksheet created in the spreadsheet | |