All URIs are relative to http://localhost/service/rest
Method | HTTP request | Description |
---|---|---|
ForceRelease | Post /v1/read-only/force-release | Forcibly release read-only and allow changes to embedded OrientDB |
Freeze | Post /v1/read-only/freeze | Prevent changes to embedded OrientDB |
Get | Get /v1/read-only | Get read-only state |
Release | Post /v1/read-only/release | Release read-only and allow changes to embedded OrientDB |
ForceRelease(ctx).Execute()
Forcibly release read-only and allow changes to embedded OrientDB
package main
import (
"context"
"fmt"
"os"
sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go"
)
func main() {
configuration := sonatyperepo.NewConfiguration()
apiClient := sonatyperepo.NewAPIClient(configuration)
r, err := apiClient.ReadOnlyAPI.ForceRelease(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReadOnlyAPI.ForceRelease``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiForceReleaseRequest struct via the builder pattern
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Freeze(ctx).Execute()
Prevent changes to embedded OrientDB
package main
import (
"context"
"fmt"
"os"
sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go"
)
func main() {
configuration := sonatyperepo.NewConfiguration()
apiClient := sonatyperepo.NewAPIClient(configuration)
r, err := apiClient.ReadOnlyAPI.Freeze(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReadOnlyAPI.Freeze``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiFreezeRequest struct via the builder pattern
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReadOnlyState Get(ctx).Execute()
Get read-only state
package main
import (
"context"
"fmt"
"os"
sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go"
)
func main() {
configuration := sonatyperepo.NewConfiguration()
apiClient := sonatyperepo.NewAPIClient(configuration)
resp, r, err := apiClient.ReadOnlyAPI.Get(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReadOnlyAPI.Get``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Get`: ReadOnlyState
fmt.Fprintf(os.Stdout, "Response from `ReadOnlyAPI.Get`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetRequest 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]
Release(ctx).Execute()
Release read-only and allow changes to embedded OrientDB
package main
import (
"context"
"fmt"
"os"
sonatyperepo "github.com/sonatype-nexus-community/nexus-repo-api-client-go"
)
func main() {
configuration := sonatyperepo.NewConfiguration()
apiClient := sonatyperepo.NewAPIClient(configuration)
r, err := apiClient.ReadOnlyAPI.Release(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReadOnlyAPI.Release``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiReleaseRequest struct via the builder pattern
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]