All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateOAuthClient | Post /api/v1/add/oauth2-client | Create oAuth Client |
DeleteOAuthClient | Post /api/v1/delete/oauth2-client | Delete oAuth Client |
GetOAuthClients | Get /api/v1/get/oauth2-client/{id} | Get oAuth Clients |
CreateAlias200Response CreateOAuthClient(ctx).CreateOAuthClientRequest(createOAuthClientRequest).Execute()
Create oAuth Client
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
createOAuthClientRequest := *openapiclient.NewCreateOAuthClientRequest() // CreateOAuthClientRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OAuthClientsApi.CreateOAuthClient(context.Background()).CreateOAuthClientRequest(createOAuthClientRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsApi.CreateOAuthClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateOAuthClient`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `OAuthClientsApi.CreateOAuthClient`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateOAuthClientRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createOAuthClientRequest | CreateOAuthClientRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response DeleteOAuthClient(ctx).DeleteOAuthClientRequest(deleteOAuthClientRequest).Execute()
Delete oAuth Client
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
deleteOAuthClientRequest := *openapiclient.NewDeleteOAuthClientRequest() // DeleteOAuthClientRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OAuthClientsApi.DeleteOAuthClient(context.Background()).DeleteOAuthClientRequest(deleteOAuthClientRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsApi.DeleteOAuthClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteOAuthClient`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `OAuthClientsApi.DeleteOAuthClient`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiDeleteOAuthClientRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
deleteOAuthClientRequest | DeleteOAuthClientRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetOAuthClients(ctx, id).XAPIKey(xAPIKey).Execute()
Get oAuth Clients
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
id := "all" // string | id of entry you want to get
xAPIKey := "api-key-string" // string | e.g. api-key-string (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.OAuthClientsApi.GetOAuthClients(context.Background(), id).XAPIKey(xAPIKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsApi.GetOAuthClients``: %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. | |
id | string | id of entry you want to get |
Other parameters are passed through a pointer to a apiGetOAuthClientsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xAPIKey | string | e.g. api-key-string |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]