All URIs are relative to http://localhost:4000
Method | HTTP request | Description |
---|---|---|
CreateModule | Post /v1/fn | Create |
DeleteModule | Delete /v1/fn/{module_name} | Delete module |
ListModules | Get /v1/fn | List modules |
ShowModuleByName | Get /v1/fn/{module_name} | Show module info |
UpdateModule | Put /v1/fn/{module_name} | Update module name |
CreateModule(ctx).ModuleName(moduleName).Execute()
Create
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/funlessdev/fl-client-sdk-go"
)
func main() {
moduleName := *openapiclient.NewModuleName() // ModuleName | Module to create
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.ModulesAPI.CreateModule(context.Background()).ModuleName(moduleName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ModulesAPI.CreateModule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiCreateModuleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
moduleName | ModuleName | Module to create |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteModule(ctx, moduleName).Execute()
Delete module
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/funlessdev/fl-client-sdk-go"
)
func main() {
moduleName := "moduleName_example" // string | The name of the module to retrieve
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.ModulesAPI.DeleteModule(context.Background(), moduleName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ModulesAPI.DeleteModule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
moduleName | string | The name of the module to retrieve |
Other parameters are passed through a pointer to a apiDeleteModuleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModuleNamesResult ListModules(ctx).Execute()
List modules
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/funlessdev/fl-client-sdk-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ModulesAPI.ListModules(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ModulesAPI.ListModules``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListModules`: ModuleNamesResult
fmt.Fprintf(os.Stdout, "Response from `ModulesAPI.ListModules`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListModulesRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SingleModuleResult ShowModuleByName(ctx, moduleName).Execute()
Show module info
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/funlessdev/fl-client-sdk-go"
)
func main() {
moduleName := "moduleName_example" // string | The name of the module to retrieve
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ModulesAPI.ShowModuleByName(context.Background(), moduleName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ModulesAPI.ShowModuleByName``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ShowModuleByName`: SingleModuleResult
fmt.Fprintf(os.Stdout, "Response from `ModulesAPI.ShowModuleByName`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
moduleName | string | The name of the module to retrieve |
Other parameters are passed through a pointer to a apiShowModuleByNameRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateModule(ctx, moduleName).ModuleName2(moduleName2).Execute()
Update module name
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/funlessdev/fl-client-sdk-go"
)
func main() {
moduleName := "moduleName_example" // string | The name of the module to retrieve
moduleName2 := *openapiclient.NewModuleName() // ModuleName | New module name to use
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.ModulesAPI.UpdateModule(context.Background(), moduleName).ModuleName2(moduleName2).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ModulesAPI.UpdateModule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
moduleName | string | The name of the module to retrieve |
Other parameters are passed through a pointer to a apiUpdateModuleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
moduleName2 | ModuleName | New module name to use |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]