Skip to content

scagogogo/sonatype-central-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sonatype Central SDK for Go

Build Status Go Report Card GoDoc License

A comprehensive Go SDK for interacting with the Sonatype Central Repository API. This SDK provides a clean, type-safe interface to search and retrieve artifacts from Maven Central.

Features

  • Complete API coverage for all Sonatype Central search endpoints
  • Rich searching capabilities (by GroupId, ArtifactId, SHA1, Class, etc.)
  • Batch operations and concurrent processing
  • Flexible client configuration
  • Caching and retry mechanisms
  • Async API support
  • Security rating and metadata retrieval

Installation

go get github.com/scagogogo/sonatype-central-sdk

Quick Start

package main

import (
	"context"
	"fmt"
	"github.com/scagogogo/sonatype-central-sdk/pkg/api"
)

func main() {
	// Create a new client
	client := api.NewClient()
	
	// Search for artifacts with GroupId "org.apache.commons"
	artifacts, err := client.SearchByGroupId(context.Background(), "org.apache.commons", 10)
	if err != nil {
		panic(err)
	}
	
	// Print results
	for _, artifact := range artifacts {
		fmt.Printf("GroupId: %s, ArtifactId: %s, Latest Version: %s\n",
			artifact.GroupId, artifact.ArtifactId, artifact.LatestVersion)
	}
}

Advanced Usage

See the documentation for detailed API usage examples.

License

MIT License - see LICENSE for details.

Releases

No releases published

Packages

No packages published

Languages