All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
Add | Post /api/v2/users | |
Delete1 | Delete /api/v2/users/{username} | |
Get1 | Get /api/v2/users/{username} | |
GetAll2 | Get /api/v2/users | |
Update | Put /api/v2/users/{username} |
Add(ctx).ApiUserDTO(apiUserDTO).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
apiUserDTO := *sonatypeiq.NewApiUserDTO() // ApiUserDTO | (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.Add(context.Background()).ApiUserDTO(apiUserDTO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.Add``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiAddRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
apiUserDTO | ApiUserDTO |
(empty response body)
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Delete1(ctx, username).Realm(realm).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
username := "username_example" // string |
realm := "realm_example" // string | (optional) (default to "Internal")
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
r, err := apiClient.UsersAPI.Delete1(context.Background(), username).Realm(realm).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.Delete1``: %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. | |
username | string |
Other parameters are passed through a pointer to a apiDelete1Request struct via the builder pattern
Name | Type | Description | Notes |
---|
realm | string | | [default to "Internal"]
(empty response body)
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiUserDTO Get1(ctx, username).Realm(realm).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
username := "username_example" // string |
realm := "realm_example" // string | (optional) (default to "Internal")
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.Get1(context.Background(), username).Realm(realm).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.Get1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Get1`: ApiUserDTO
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.Get1`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string |
Other parameters are passed through a pointer to a apiGet1Request struct via the builder pattern
Name | Type | Description | Notes |
---|
realm | string | | [default to "Internal"]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiUserListDTO GetAll2(ctx).Realm(realm).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
realm := "realm_example" // string | (optional) (default to "Internal")
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.GetAll2(context.Background()).Realm(realm).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetAll2``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAll2`: ApiUserListDTO
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetAll2`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetAll2Request struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
realm | string | [default to "Internal"] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiUserDTO Update(ctx, username).ApiUserDTO(apiUserDTO).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
username := "username_example" // string |
apiUserDTO := *sonatypeiq.NewApiUserDTO() // ApiUserDTO | (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.UsersAPI.Update(context.Background(), username).ApiUserDTO(apiUserDTO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.Update``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Update`: ApiUserDTO
fmt.Fprintf(os.Stdout, "Response from `UsersAPI.Update`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string |
Other parameters are passed through a pointer to a apiUpdateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
apiUserDTO | ApiUserDTO | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]