All URIs are relative to http://localhost:3000
Method | HTTP request | Description |
---|---|---|
GenerateNetworkKey | Post /server/network-key | Generate a new authentication key |
GetConfig | Get /server/config | Get the server configuration |
SetConfig | Post /server/config | Set the server configuration |
NetworkKey GenerateNetworkKey(ctx).Execute()
Generate a new authentication key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/serverapiclient"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ServerAPI.GenerateNetworkKey(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.GenerateNetworkKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GenerateNetworkKey`: NetworkKey
fmt.Fprintf(os.Stdout, "Response from `ServerAPI.GenerateNetworkKey`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGenerateNetworkKeyRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerConfig GetConfig(ctx).Execute()
Get the server configuration
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/serverapiclient"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ServerAPI.GetConfig(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.GetConfig``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetConfig`: ServerConfig
fmt.Fprintf(os.Stdout, "Response from `ServerAPI.GetConfig`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetConfigRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ServerConfig SetConfig(ctx).Config(config).Execute()
Set the server configuration
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/serverapiclient"
)
func main() {
config := *openapiclient.NewServerConfig() // ServerConfig | Server configuration
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ServerAPI.SetConfig(context.Background()).Config(config).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.SetConfig``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetConfig`: ServerConfig
fmt.Fprintf(os.Stdout, "Response from `ServerAPI.SetConfig`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiSetConfigRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
config | ServerConfig | Server configuration |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]