nuget

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: 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 {
	Description              string                  `json:"description,omitempty"`
	ReleaseNotes             string                  `json:"release_notes,omitempty"`
	Authors                  string                  `json:"authors,omitempty"`
	ProjectURL               string                  `json:"project_url,omitempty"`
	RepositoryURL            string                  `json:"repository_url,omitempty"`
	RequireLicenseAcceptance bool                    `json:"require_license_acceptance"`
	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
}

Package represents a Nuget package

func ParseNuspecMetaData

func ParseNuspecMetaData(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()

Jump to

Keyboard shortcuts

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