Git Product home page Git Product logo

gonexus's Introduction

gonexus

Provides a go client library for connecting to, and interacting with, Sonatype Nexus applications such as Nexus Repository Manager and Nexus IQ Server.

Organization of this library

The library is broken into two packages. One for each application.

nexusrm

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)
}

Supported RM Endpoints

Endpoint Status Min RM Version
Assets ๐ŸŒ•
Blob Store ๐ŸŒ‘ 3.19
Components ๐ŸŒ–
Content Selectors ๐ŸŒ‘ 3.19
Email ๐ŸŒ‘ 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 ๐ŸŒ‘

Supported Provisioning API

API Status
Core ๐ŸŒ‘
Security ๐ŸŒ‘
Blob Store ๐ŸŒ–
Repository ๐ŸŒ–

Legend: ๐ŸŒ• complete ๐ŸŒ‘ untouched ๐ŸŒ˜๐ŸŒ—๐ŸŒ– partial support

nexusiq

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)
}

Supported IQ Endpoints

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

iqwebhooks

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.

The Fine Print

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

gonexus's People

Contributors

bhamail avatar defrankland avatar hokiegeek avatar overag3 avatar scherzhaft avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.