Help us shape the future of Go! Take the 2026 Go Developer Survey

nuget

package
v3.1.61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2026 License: MIT, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingNuspecFile indicates a missing Nuspec file
	ErrMissingNuspecFile = util.NewInvalidArgumentErrorf("Nuspec file is missing")
	// ErrNuspecFileTooLarge indicates a Nuspec file which is too large
	ErrNuspecFileTooLarge = util.NewInvalidArgumentErrorf("Nuspec file is too large")
	// ErrNuspecInvalidID indicates an invalid id in the Nuspec file
	ErrNuspecInvalidID = util.NewInvalidArgumentErrorf("Nuspec file contains an invalid id")
	// ErrNuspecInvalidVersion indicates an invalid version in the Nuspec file
	ErrNuspecInvalidVersion = util.NewInvalidArgumentErrorf("Nuspec file contains an invalid version")
)
View Source
var (
	ErrMissingPdbFiles       = util.NewInvalidArgumentErrorf("package does not contain PDB files")
	ErrInvalidFiles          = util.NewInvalidArgumentErrorf("package contains invalid files")
	ErrInvalidPdbMagicNumber = util.NewInvalidArgumentErrorf("invalid Portable PDB magic number")
	ErrMissingPdbStream      = util.NewInvalidArgumentErrorf("missing PDB stream")
)

Functions

func ParseDebugHeaderID

func ParseDebugHeaderID(r io.ReadSeeker) (string, error)

ParseDebugHeaderID TODO

Types

type Dependency

type Dependency struct {
	ID      string `json:"id"`
	Version string `json:"version"`
}

Dependency represents a dependency of a Nuget package

type Metadata

type Metadata struct {
	Authors                  string `json:"authors,omitempty"`
	Copyright                string `json:"copyright,omitempty"`
	Description              string `json:"description,omitempty"`
	DevelopmentDependency    bool   `json:"development_dependency,omitempty"`
	IconURL                  string `json:"icon_url,omitempty"`
	Language                 string `json:"language,omitempty"`
	LicenseURL               string `json:"license_url,omitempty"`
	MinClientVersion         string `json:"min_client_version,omitempty"`
	Owners                   string `json:"owners,omitempty"`
	ProjectURL               string `json:"project_url,omitempty"`
	Readme                   string `json:"readme,omitempty"`
	ReleaseNotes             string `json:"release_notes,omitempty"`
	RepositoryURL            string `json:"repository_url,omitempty"`
	RequireLicenseAcceptance bool   `json:"require_license_acceptance"`
	Summary                  string `json:"summary,omitempty"`
	Tags                     string `json:"tags,omitempty"`
	Title                    string `json:"title,omitempty"`

	Dependencies map[string][]Dependency `json:"dependencies,omitempty"`
}

Metadata represents the metadata of a Nuget package

type Package

type Package struct {
	PackageType   PackageType
	ID            string
	Version       string
	Metadata      *Metadata
	NuspecContent *bytes.Buffer
}

Package represents a Nuget package

func ParseNuspecMetaData

func ParseNuspecMetaData(archive *zip.Reader, r io.Reader) (*Package, error)

ParseNuspecMetaData parses a Nuspec file to retrieve the metadata of a Nuget package

func ParsePackageMetaData

func ParsePackageMetaData(r io.ReaderAt, size int64) (*Package, error)

ParsePackageMetaData parses the metadata of a Nuget package file

type PackageType

type PackageType int

PackageType specifies the package type the metadata describes

const (
	// DependencyPackage represents a package (*.nupkg)
	DependencyPackage PackageType = iota + 1
	// SymbolsPackage represents a symbol package (*.snupkg)
	SymbolsPackage

	PropertySymbolID = "nuget.symbol.id"
)

type PortablePdb

type PortablePdb struct {
	Name    string
	ID      string
	Content *packages.HashedBuffer
}

type PortablePdbList

type PortablePdbList []*PortablePdb

func ExtractPortablePdb

func ExtractPortablePdb(r io.ReaderAt, size int64) (PortablePdbList, error)

ExtractPortablePdb extracts PDB files from a .snupkg file

func (PortablePdbList) Close

func (l PortablePdbList) Close()

Source Files

  • metadata.go
  • symbol_extractor.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL