All URIs are relative to http://localhost/api
| Method | HTTP request | Description |
|---|---|---|
| CreateStream | Post /nginx/streams | Create a Stream |
| DeleteStream | Delete /nginx/streams/{streamID} | Delete a Stream |
| DisableStream | Post /nginx/streams/{streamID}/disable | Disable a Stream |
| EnableStream | Post /nginx/streams/{streamID}/enable | Enable a Stream |
| GetStream | Get /nginx/streams/{streamID} | Get a Stream |
| GetStreams | Get /nginx/streams | Get all streams |
| UpdateStream | Put /nginx/streams/{streamID} | Update a Stream |
GetStreams200ResponseInner CreateStream(ctx).CreateStreamRequest(createStreamRequest).Execute()
Create a Stream
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
createStreamRequest := *openapiclient.NewCreateStreamRequest(int64(9090), *openapiclient.NewGetStreams200ResponseInnerForwardingHost(), int64(80)) // CreateStreamRequest | Stream Payload
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StreamsAPI.CreateStream(context.Background()).CreateStreamRequest(createStreamRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StreamsAPI.CreateStream``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateStream`: GetStreams200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `StreamsAPI.CreateStream`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateStreamRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createStreamRequest | CreateStreamRequest | Stream Payload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bool DeleteStream(ctx, streamID).Execute()
Delete a Stream
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
streamID := int64(2) // int64 | The ID of the Stream
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StreamsAPI.DeleteStream(context.Background(), streamID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StreamsAPI.DeleteStream``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteStream`: bool
fmt.Fprintf(os.Stdout, "Response from `StreamsAPI.DeleteStream`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| streamID | int64 | The ID of the Stream |
Other parameters are passed through a pointer to a apiDeleteStreamRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
bool
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bool DisableStream(ctx, streamID).Execute()
Disable a Stream
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
streamID := int64(2) // int64 | The ID of the Stream
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StreamsAPI.DisableStream(context.Background(), streamID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StreamsAPI.DisableStream``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DisableStream`: bool
fmt.Fprintf(os.Stdout, "Response from `StreamsAPI.DisableStream`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| streamID | int64 | The ID of the Stream |
Other parameters are passed through a pointer to a apiDisableStreamRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
bool
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bool EnableStream(ctx, streamID).Execute()
Enable a Stream
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
streamID := int64(2) // int64 | The ID of the Stream
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StreamsAPI.EnableStream(context.Background(), streamID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StreamsAPI.EnableStream``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EnableStream`: bool
fmt.Fprintf(os.Stdout, "Response from `StreamsAPI.EnableStream`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| streamID | int64 | The ID of the Stream |
Other parameters are passed through a pointer to a apiEnableStreamRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
bool
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetStreams200ResponseInner GetStream(ctx, streamID).Execute()
Get a Stream
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
streamID := int64(2) // int64 | The ID of the Stream
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StreamsAPI.GetStream(context.Background(), streamID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StreamsAPI.GetStream``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetStream`: GetStreams200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `StreamsAPI.GetStream`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| streamID | int64 | The ID of the Stream |
Other parameters are passed through a pointer to a apiGetStreamRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]GetStreams200ResponseInner GetStreams(ctx).Expand(expand).Execute()
Get all streams
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
expand := "expand_example" // string | Expansions (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StreamsAPI.GetStreams(context.Background()).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StreamsAPI.GetStreams``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetStreams`: []GetStreams200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `StreamsAPI.GetStreams`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetStreamsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| expand | string | Expansions |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetStreams200ResponseInner UpdateStream(ctx, streamID).UpdateStreamRequest(updateStreamRequest).Execute()
Update a Stream
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/sander0542/nginxproxymanager-go"
)
func main() {
streamID := int64(2) // int64 | The ID of the Stream
updateStreamRequest := *openapiclient.NewUpdateStreamRequest() // UpdateStreamRequest | Stream Payload
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StreamsAPI.UpdateStream(context.Background(), streamID).UpdateStreamRequest(updateStreamRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StreamsAPI.UpdateStream``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateStream`: GetStreams200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `StreamsAPI.UpdateStream`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| streamID | int64 | The ID of the Stream |
Other parameters are passed through a pointer to a apiUpdateStreamRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updateStreamRequest | UpdateStreamRequest | Stream Payload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]