Provides a go client library for connecting to, and interacting with, Sonatype Nexus applications such as Nexus Repository Manager and Nexus IQ Server.
The library is broken into two packages. One for each application.
Create a connection to an instance of Nexus Repository Manager
// import "github.com/sonatype-nexus-community/gonexus/rm"
rm, err := nexusrm.New("http://localhost:8081", "username", "password")
if err != nil {
panic(err)
}
Endpoint | Status | Min RM Version |
---|---|---|
Assets | π | |
Blob Store | π | 3.19 |
Components | π | |
Content Selectors | π | 3.19 |
π | 3.19 | |
IQ Server | π | 3.19 |
Licensing | π | 3.19 |
Lifecycle | π | |
Maintenance pro | π | |
Nodes pro | π | |
Read-Only | π | |
Repositories | π | |
Routing Rules | π | 3.17 |
Search | π | |
Script | π | |
Security Management | π | 3.19 |
Staging pro | π | |
Status | π | |
Support | π | |
Tagging pro | π | |
Tasks | π |
API | Status |
---|---|
Core | π |
Security | π |
Blob Store | π |
Repository | π |
Legend: π complete π untouched πππ partial support
Create a connection to an instance of Nexus IQ Server
// import "github.com/sonatype-nexus-community/gonexus/iq"
iq, err := nexusiq.New("http://localhost:8070", "username", "password")
if err != nil {
panic(err)
}
Endpoint | Status | Min IQ Version |
---|---|---|
Application | π | |
Authorization Configuration | π | r70 |
Component Details | π | |
Component Evaluation | π | |
Component Labels | π | |
Component Remediation | π | r64 |
Component Search | π | |
Component Versions | π | |
Component Waivers | π | r76 |
Configuration | π | r65 |
Data Retention Policy | π | |
Organization | π | |
Policy Violation | π | |
Policy Waiver | π | r71 |
Promote Scan | π | |
Report-related | π | |
Role | π | r70 |
SAML | π | r74 |
Source Control | π | |
Success Metrics Data | π | |
Users | π | r70 |
User Token | π | r76 |
Vulnerability Details | π | r75 |
Webhooks | π |
Legend: π complete π untouched πππ partial support
The iq/iqwebhooks
subpackage provides structs for all of the event types along with helper functions.
Most notably it provides a function called Listen
which is an http.HandlerFunc
that can be used as an endpoint handler for a server functioning as a webhook listener.
The handler will place any webhook event it finds in a channel to be consumed at will.
An example of using the handler to listen for Application Evaluation events:
// import "github.com/sonatype-nexus-community/gonexus/iq/webhooks"
appEvals, _ := iqwebhooks.ApplicationEvaluationEvents()
go func() {
for _ = range appEvals:
log.Println("Received Application Evaluation event")
}
}()
http.HandleFunc("/ingest", iqwebhooks.Listen)
See the documentation for a full example showing other event types.
It is worth noting that this is NOT SUPPORTED by Sonatype, and is a contribution of @HokieGeek plus us to the open source community (read: you!)
Remember:
- Use this contribution at the risk tolerance that you have
- Do NOT file Sonatype support tickets related to this
- DO file issues here on GitHub, so that the community can pitch in