Skip to content

Commit 1104fc9

Browse files
author
funlessdev
committed
1 parent 4b7a577 commit 1104fc9

File tree

11 files changed

+163
-22
lines changed

11 files changed

+163
-22
lines changed

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.0.0-SNAPSHOT
1+
7.2.0-SNAPSHOT

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ Default configuration comes with `Servers` field that contains server objects as
3636

3737
### Select Server Configuration
3838

39-
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
39+
For using other server than the one defined on index 0 set context value `openapi.ContextServerIndex` of type `int`.
4040

4141
```golang
4242
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)
4343
```
4444

4545
### Templated Server URL
4646

47-
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
47+
Templated server URL is formatted using default variables from configuration or from context value `openapi.ContextServerVariables` of type `map[string]string`.
4848

4949
```golang
5050
ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
@@ -58,7 +58,7 @@ Note, enum values are always validated and all unused variables are silently ign
5858

5959
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
6060
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
61-
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
61+
Similar rules for overriding default operation server index and variables applies by using `openapi.ContextOperationServerIndices` and `openapi.ContextOperationServerVariables` context maps.
6262

6363
```golang
6464
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{

api/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,12 @@ components:
598598
description: File with the code of the function
599599
format: binary
600600
type: string
601+
wait_for_workers:
602+
default: true
603+
description: "Whether to wait for all workers to receive the code of the\
604+
\ function. If false, the request returns as soon as the creation request\
605+
\ terminates."
606+
type: boolean
601607
events:
602608
description: Events that can trigger the function
603609
items:

api_app.go

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api_functions.go

Lines changed: 20 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/AppAPI.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Method | HTTP request | Description
1313

1414
## CreateApp
1515

16-
> CreateApp(ctx).Name(name).Code(code).Events(events).Sinks(sinks).Execute()
16+
> CreateApp(ctx).Name(name).Code(code).WaitForWorkers(waitForWorkers).Events(events).Sinks(sinks).Execute()
1717
1818
Create new APP script
1919

@@ -34,12 +34,13 @@ import (
3434
func main() {
3535
name := "name_example" // string | Name of the function (optional)
3636
code := os.NewFile(1234, "some_file") // *os.File | File with the code of the function (optional)
37+
waitForWorkers := true // bool | Whether to wait for all workers to receive the code of the function. If false, the request returns as soon as the creation request terminates. (optional) (default to true)
3738
events := []openapiclient.FunctionCreateUpdateEventsInner{*openapiclient.NewFunctionCreateUpdateEventsInner()} // []FunctionCreateUpdateEventsInner | Events that can trigger the function (optional)
3839
sinks := []openapiclient.FunctionCreateUpdateSinksInner{*openapiclient.NewFunctionCreateUpdateSinksInner()} // []FunctionCreateUpdateSinksInner | Data sinks that receive invocation's results (optional)
3940

4041
configuration := openapiclient.NewConfiguration()
4142
apiClient := openapiclient.NewAPIClient(configuration)
42-
r, err := apiClient.AppAPI.CreateApp(context.Background()).Name(name).Code(code).Events(events).Sinks(sinks).Execute()
43+
r, err := apiClient.AppAPI.CreateApp(context.Background()).Name(name).Code(code).WaitForWorkers(waitForWorkers).Events(events).Sinks(sinks).Execute()
4344
if err != nil {
4445
fmt.Fprintf(os.Stderr, "Error when calling `AppAPI.CreateApp``: %v\n", err)
4546
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -60,6 +61,7 @@ Name | Type | Description | Notes
6061
------------- | ------------- | ------------- | -------------
6162
**name** | **string** | Name of the function |
6263
**code** | ***os.File** | File with the code of the function |
64+
**waitForWorkers** | **bool** | Whether to wait for all workers to receive the code of the function. If false, the request returns as soon as the creation request terminates. | [default to true]
6365
**events** | [**[]FunctionCreateUpdateEventsInner**](FunctionCreateUpdateEventsInner.md) | Events that can trigger the function |
6466
**sinks** | [**[]FunctionCreateUpdateSinksInner**](FunctionCreateUpdateSinksInner.md) | Data sinks that receive invocation's results |
6567

docs/FunctionCreateUpdate.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**Name** | Pointer to **string** | Name of the function | [optional]
88
**Code** | Pointer to ***os.File** | File with the code of the function | [optional]
9+
**WaitForWorkers** | Pointer to **bool** | Whether to wait for all workers to receive the code of the function. If false, the request returns as soon as the creation request terminates. | [optional] [default to true]
910
**Events** | Pointer to [**[]FunctionCreateUpdateEventsInner**](FunctionCreateUpdateEventsInner.md) | Events that can trigger the function | [optional]
1011
**Sinks** | Pointer to [**[]FunctionCreateUpdateSinksInner**](FunctionCreateUpdateSinksInner.md) | Data sinks that receive invocation's results | [optional]
1112

@@ -78,6 +79,31 @@ SetCode sets Code field to given value.
7879

7980
HasCode returns a boolean if a field has been set.
8081

82+
### GetWaitForWorkers
83+
84+
`func (o *FunctionCreateUpdate) GetWaitForWorkers() bool`
85+
86+
GetWaitForWorkers returns the WaitForWorkers field if non-nil, zero value otherwise.
87+
88+
### GetWaitForWorkersOk
89+
90+
`func (o *FunctionCreateUpdate) GetWaitForWorkersOk() (*bool, bool)`
91+
92+
GetWaitForWorkersOk returns a tuple with the WaitForWorkers field if it's non-nil, zero value otherwise
93+
and a boolean to check if the value has been set.
94+
95+
### SetWaitForWorkers
96+
97+
`func (o *FunctionCreateUpdate) SetWaitForWorkers(v bool)`
98+
99+
SetWaitForWorkers sets WaitForWorkers field to given value.
100+
101+
### HasWaitForWorkers
102+
103+
`func (o *FunctionCreateUpdate) HasWaitForWorkers() bool`
104+
105+
HasWaitForWorkers returns a boolean if a field has been set.
106+
81107
### GetEvents
82108

83109
`func (o *FunctionCreateUpdate) GetEvents() []FunctionCreateUpdateEventsInner`

docs/FunctionsAPI.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Method | HTTP request | Description
1414

1515
## CreateFunction
1616

17-
> CreateFunction(ctx, moduleName).Name(name).Code(code).Events(events).Sinks(sinks).Execute()
17+
> CreateFunction(ctx, moduleName).Name(name).Code(code).WaitForWorkers(waitForWorkers).Events(events).Sinks(sinks).Execute()
1818
1919
Create new function
2020

@@ -36,12 +36,13 @@ func main() {
3636
moduleName := "moduleName_example" // string | The name of the module to retrieve
3737
name := "name_example" // string | Name of the function (optional)
3838
code := os.NewFile(1234, "some_file") // *os.File | File with the code of the function (optional)
39+
waitForWorkers := true // bool | Whether to wait for all workers to receive the code of the function. If false, the request returns as soon as the creation request terminates. (optional) (default to true)
3940
events := []openapiclient.FunctionCreateUpdateEventsInner{*openapiclient.NewFunctionCreateUpdateEventsInner()} // []FunctionCreateUpdateEventsInner | Events that can trigger the function (optional)
4041
sinks := []openapiclient.FunctionCreateUpdateSinksInner{*openapiclient.NewFunctionCreateUpdateSinksInner()} // []FunctionCreateUpdateSinksInner | Data sinks that receive invocation's results (optional)
4142

4243
configuration := openapiclient.NewConfiguration()
4344
apiClient := openapiclient.NewAPIClient(configuration)
44-
r, err := apiClient.FunctionsAPI.CreateFunction(context.Background(), moduleName).Name(name).Code(code).Events(events).Sinks(sinks).Execute()
45+
r, err := apiClient.FunctionsAPI.CreateFunction(context.Background(), moduleName).Name(name).Code(code).WaitForWorkers(waitForWorkers).Events(events).Sinks(sinks).Execute()
4546
if err != nil {
4647
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.CreateFunction``: %v\n", err)
4748
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -67,6 +68,7 @@ Name | Type | Description | Notes
6768

6869
**name** | **string** | Name of the function |
6970
**code** | ***os.File** | File with the code of the function |
71+
**waitForWorkers** | **bool** | Whether to wait for all workers to receive the code of the function. If false, the request returns as soon as the creation request terminates. | [default to true]
7072
**events** | [**[]FunctionCreateUpdateEventsInner**](FunctionCreateUpdateEventsInner.md) | Events that can trigger the function |
7173
**sinks** | [**[]FunctionCreateUpdateSinksInner**](FunctionCreateUpdateSinksInner.md) | Data sinks that receive invocation's results |
7274

@@ -309,7 +311,7 @@ No authorization required
309311

310312
## UpdateFunction
311313

312-
> UpdateFunction(ctx, moduleName, functionName).Name(name).Code(code).Events(events).Sinks(sinks).Execute()
314+
> UpdateFunction(ctx, moduleName, functionName).Name(name).Code(code).WaitForWorkers(waitForWorkers).Events(events).Sinks(sinks).Execute()
313315
314316
Update function
315317

@@ -332,12 +334,13 @@ func main() {
332334
functionName := "functionName_example" // string | The name of the function
333335
name := "name_example" // string | Name of the function (optional)
334336
code := os.NewFile(1234, "some_file") // *os.File | File with the code of the function (optional)
337+
waitForWorkers := true // bool | Whether to wait for all workers to receive the code of the function. If false, the request returns as soon as the creation request terminates. (optional) (default to true)
335338
events := []openapiclient.FunctionCreateUpdateEventsInner{*openapiclient.NewFunctionCreateUpdateEventsInner()} // []FunctionCreateUpdateEventsInner | Events that can trigger the function (optional)
336339
sinks := []openapiclient.FunctionCreateUpdateSinksInner{*openapiclient.NewFunctionCreateUpdateSinksInner()} // []FunctionCreateUpdateSinksInner | Data sinks that receive invocation's results (optional)
337340

338341
configuration := openapiclient.NewConfiguration()
339342
apiClient := openapiclient.NewAPIClient(configuration)
340-
r, err := apiClient.FunctionsAPI.UpdateFunction(context.Background(), moduleName, functionName).Name(name).Code(code).Events(events).Sinks(sinks).Execute()
343+
r, err := apiClient.FunctionsAPI.UpdateFunction(context.Background(), moduleName, functionName).Name(name).Code(code).WaitForWorkers(waitForWorkers).Events(events).Sinks(sinks).Execute()
341344
if err != nil {
342345
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.UpdateFunction``: %v\n", err)
343346
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -365,6 +368,7 @@ Name | Type | Description | Notes
365368

366369
**name** | **string** | Name of the function |
367370
**code** | ***os.File** | File with the code of the function |
371+
**waitForWorkers** | **bool** | Whether to wait for all workers to receive the code of the function. If false, the request returns as soon as the creation request terminates. | [default to true]
368372
**events** | [**[]FunctionCreateUpdateEventsInner**](FunctionCreateUpdateEventsInner.md) | Events that can trigger the function |
369373
**sinks** | [**[]FunctionCreateUpdateSinksInner**](FunctionCreateUpdateSinksInner.md) | Data sinks that receive invocation's results |
370374

model_error.go

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)