nuget

package
v0.0.0-...-9878773 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VersionCmd           command = "dotnet --version"
	LocalPackageCacheCmd command = "dotnet nuget locals global-packages --list"
	RestorePackageCmd    command = "dotnet restore"
)

Functions

This section is empty.

Types

type Dependency

type Dependency struct {
	ID      string `xml:"id,attr"`
	Version string `xml:"version,attr"`
}

Dependency ...

type File

type File struct {
	Source string `xml:"src,attr"`
	Target string `xml:"target,attr"`
}

File ...

type Nuget

type Nuget struct {
	// contains filtered or unexported fields
}

func New

func New() *Nuget

New ...

func (*Nuget) GetMetadata

func (m *Nuget) GetMetadata() plugin.Metadata

GetMetadata ...

func (*Nuget) GetProjectManifestPath

func (m *Nuget) GetProjectManifestPath(path string) string

GetProjectManifestPath ...

func (*Nuget) GetRootModule

func (m *Nuget) GetRootModule(path string) (*meta.Package, error)

GetRootModule...

func (*Nuget) GetVersion

func (m *Nuget) GetVersion() (string, error)

GetVersion...

func (*Nuget) HasModulesInstalled

func (m *Nuget) HasModulesInstalled(path string) error

HasModulesInstalled ...

func (*Nuget) IsValid

func (m *Nuget) IsValid(path string) bool

IsValid ...

func (*Nuget) ListModulesWithDeps

func (m *Nuget) ListModulesWithDeps(path string, globalSettingFile string) ([]meta.Package, error)

ListModulesWithDeps ...

func (*Nuget) ListUsedModules

func (m *Nuget) ListUsedModules(path string) ([]meta.Package, error)

ListUsedModules ...

func (*Nuget) SetRootModule

func (m *Nuget) SetRootModule(path string) error

SetRootModule ...

type PackageConfig

type PackageConfig struct {
	XMLName  xml.Name        `xml:"packages"`
	Packages []PackageDetail `xml:"package"`
}

PackageConfig ...

type PackageDetail

type PackageDetail struct {
	XMLName xml.Name `xml:"package"`
	ID      string   `xml:"id,attr"`
	Version string   `xml:"version,attr"`
}

PackageDetail ...

type Spec

type Spec struct {
	Name  xml.Name `xml:"package"`
	Xmlns string   `xml:"xmlns,attr,omitempty"`
	Meta  struct {
		ID               string `xml:"id"`
		Version          string `xml:"version"`
		Title            string `xml:"title,omitempty"`
		Authors          string `xml:"authors"`
		Owners           string `xml:"owners,omitempty"`
		LicenseURL       string `xml:"licenseUrl,omitempty"`
		License          string `xml:"license"`
		ProjectURL       string `xml:"projectUrl,omitempty"`
		IconURL          string `xml:"iconUrl,omitempty"`
		ReqLicenseAccept bool   `xml:"requireLicenseAcceptance"`
		Description      string `xml:"description"`
		ReleaseNotes     string `xml:"releaseNotes,omitempty"`
		Copyright        string `xml:"copyright,omitempty"`
		Summary          string `xml:"summary,omitempty"`
		Language         string `xml:"language,omitempty"`
		Tags             string `xml:"tags,omitempty"`
		Dependencies     struct {
			Dependency []Dependency `xml:"dependency"`
		} `xml:"dependencies,omitempty"`
		Repository struct {
			URL  string `xml:"url,attr"`
			Type string `xml:"type,attr"`
		} `xml:"repository,omitempty"`
	} `xml:"metadata"`
	Files struct {
		File []File `xml:"file"`
	} `xml:"files,omitempty"`
}

Spec ...

func ConvertFromBytes

func ConvertFromBytes(specFile []byte) (*Spec, error)

ConvertedFromBytes ...

func ConvertFromReader

func ConvertFromReader(reader io.ReadCloser) (*Spec, error)

ConvertFromReader ...

Jump to

Keyboard shortcuts

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