nuget

package
v1.22.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Metadata = &EdmxMetadata{
	XmlnsEdmx: "http://schemas.microsoft.com/ado/2007/06/edmx",
	Version:   "1.0",
	DataServices: EdmxDataServices{
		XmlnsM:                "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata",
		DataServiceVersion:    "2.0",
		MaxDataServiceVersion: "2.0",
		Schema: []EdmxSchema{
			{
				Xmlns:     "http://schemas.microsoft.com/ado/2006/04/edm",
				Namespace: "NuGetGallery.OData",
				EntityType: &EdmxEntityType{
					Name:      "V2FeedPackage",
					HasStream: true,
					Keys: []EdmxPropertyRef{
						{Name: "Id"},
						{Name: "Version"},
					},
					Properties: []EdmxProperty{
						{
							Name: "Id",
							Type: "Edm.String",
						},
						{
							Name: "Version",
							Type: "Edm.String",
						},
						{
							Name:     "NormalizedVersion",
							Type:     "Edm.String",
							Nullable: true,
						},
						{
							Name:     "Authors",
							Type:     "Edm.String",
							Nullable: true,
						},
						{
							Name: "Created",
							Type: "Edm.DateTime",
						},
						{
							Name: "Dependencies",
							Type: "Edm.String",
						},
						{
							Name: "Description",
							Type: "Edm.String",
						},
						{
							Name: "DownloadCount",
							Type: "Edm.Int64",
						},
						{
							Name: "LastUpdated",
							Type: "Edm.DateTime",
						},
						{
							Name: "Published",
							Type: "Edm.DateTime",
						},
						{
							Name: "PackageSize",
							Type: "Edm.Int64",
						},
						{
							Name:     "ProjectUrl",
							Type:     "Edm.String",
							Nullable: true,
						},
						{
							Name:     "ReleaseNotes",
							Type:     "Edm.String",
							Nullable: true,
						},
						{
							Name:     "RequireLicenseAcceptance",
							Type:     "Edm.Boolean",
							Nullable: false,
						},
						{
							Name:     "Title",
							Type:     "Edm.String",
							Nullable: true,
						},
						{
							Name:     "VersionDownloadCount",
							Type:     "Edm.Int64",
							Nullable: false,
						},
					},
				},
			},
			{
				Xmlns:     "http://schemas.microsoft.com/ado/2006/04/edm",
				Namespace: "NuGetGallery",
				EntityContainer: &EdmxEntityContainer{
					Name:                     "V2FeedContext",
					IsDefaultEntityContainer: true,
					EntitySet: EdmxEntitySet{
						Name:       "Packages",
						EntityType: "NuGetGallery.OData.V2FeedPackage",
					},
					FunctionImports: []EdmxFunctionImport{
						{
							Name:       "Search",
							ReturnType: "Collection(NuGetGallery.OData.V2FeedPackage)",
							EntitySet:  "Packages",
							Parameter: []EdmxFunctionParameter{
								{
									Name: "searchTerm",
									Type: "Edm.String",
								},
							},
						},
						{
							Name:       "FindPackagesById",
							ReturnType: "Collection(NuGetGallery.OData.V2FeedPackage)",
							EntitySet:  "Packages",
							Parameter: []EdmxFunctionParameter{
								{
									Name: "id",
									Type: "Edm.String",
								},
							},
						},
					},
				},
			},
		},
	},
}

Functions

func UploadPackage

func UploadPackage(ctx *context.Context)

UploadPackage creates a new package with the metadata contained in the uploaded nupgk file https://docs.microsoft.com/en-us/nuget/api/package-publish-resource#push-a-package

func UploadSymbolPackage

func UploadSymbolPackage(ctx *context.Context)

UploadSymbolPackage adds a symbol package to an existing package https://docs.microsoft.com/en-us/nuget/api/symbol-package-publish-resource

Types

type AtomTitle added in v1.17.4

type AtomTitle struct {
	Type string `xml:"type,attr"`
	Text string `xml:",chardata"`
}

type Auth added in v1.17.1

type Auth struct{}

func (*Auth) Name added in v1.17.1

func (a *Auth) Name() string

type CatalogEntry

type CatalogEntry struct {
	CatalogLeafURL           string                    `json:"@id"`
	PackageContentURL        string                    `json:"packageContent"`
	ID                       string                    `json:"id"`
	Version                  string                    `json:"version"`
	Description              string                    `json:"description"`
	ReleaseNotes             string                    `json:"releaseNotes"`
	Authors                  string                    `json:"authors"`
	RequireLicenseAcceptance bool                      `json:"requireLicenseAcceptance"`
	ProjectURL               string                    `json:"projectURL"`
	DependencyGroups         []*PackageDependencyGroup `json:"dependencyGroups"`
}

https://docs.microsoft.com/en-us/nuget/api/registration-base-url-resource#catalog-entry

type EdmxDataServices added in v1.17.4

type EdmxDataServices struct {
	XmlnsM                string       `xml:"xmlns:m,attr"`
	DataServiceVersion    string       `xml:"m:DataServiceVersion,attr"`
	MaxDataServiceVersion string       `xml:"m:MaxDataServiceVersion,attr"`
	Schema                []EdmxSchema `xml:"Schema"`
}

type EdmxEntityContainer added in v1.17.4

type EdmxEntityContainer struct {
	Name                     string               `xml:"Name,attr"`
	IsDefaultEntityContainer bool                 `xml:"m:IsDefaultEntityContainer,attr"`
	EntitySet                EdmxEntitySet        `xml:"EntitySet"`
	FunctionImports          []EdmxFunctionImport `xml:"FunctionImport"`
}

type EdmxEntitySet added in v1.17.4

type EdmxEntitySet struct {
	Name       string `xml:"Name,attr"`
	EntityType string `xml:"EntityType,attr"`
}

type EdmxEntityType added in v1.17.4

type EdmxEntityType struct {
	Name       string            `xml:"Name,attr"`
	HasStream  bool              `xml:"m:HasStream,attr"`
	Keys       []EdmxPropertyRef `xml:"Key>PropertyRef"`
	Properties []EdmxProperty    `xml:"Property"`
}

type EdmxFunctionImport added in v1.17.4

type EdmxFunctionImport struct {
	Name       string                  `xml:"Name,attr"`
	ReturnType string                  `xml:"ReturnType,attr"`
	EntitySet  string                  `xml:"EntitySet,attr"`
	Parameter  []EdmxFunctionParameter `xml:"Parameter"`
}

type EdmxFunctionParameter added in v1.17.4

type EdmxFunctionParameter struct {
	Name string `xml:"Name,attr"`
	Type string `xml:"Type,attr"`
}

type EdmxMetadata added in v1.17.4

type EdmxMetadata struct {
	XMLName      xml.Name         `xml:"edmx:Edmx"`
	XmlnsEdmx    string           `xml:"xmlns:edmx,attr"`
	Version      string           `xml:"Version,attr"`
	DataServices EdmxDataServices `xml:"edmx:DataServices"`
}

type EdmxProperty added in v1.17.4

type EdmxProperty struct {
	Name     string `xml:"Name,attr"`
	Type     string `xml:"Type,attr"`
	Nullable bool   `xml:"Nullable,attr"`
}

type EdmxPropertyRef added in v1.17.4

type EdmxPropertyRef struct {
	Name string `xml:"Name,attr"`
}

type EdmxSchema added in v1.17.4

type EdmxSchema struct {
	Xmlns           string               `xml:"xmlns,attr"`
	Namespace       string               `xml:"Namespace,attr"`
	EntityType      *EdmxEntityType      `xml:"EntityType,omitempty"`
	EntityContainer *EdmxEntityContainer `xml:"EntityContainer,omitempty"`
}

type FeedEntry added in v1.17.4

type FeedEntry struct {
	XMLName    xml.Name             `xml:"entry"`
	Xmlns      string               `xml:"xmlns,attr,omitempty"`
	XmlnsD     string               `xml:"xmlns:d,attr,omitempty"`
	XmlnsM     string               `xml:"xmlns:m,attr,omitempty"`
	Base       string               `xml:"xml:base,attr,omitempty"`
	ID         string               `xml:"id"`
	Category   FeedEntryCategory    `xml:"category"`
	Links      []FeedEntryLink      `xml:"link"`
	Title      TypedValue[string]   `xml:"title"`
	Updated    time.Time            `xml:"updated"`
	Author     string               `xml:"author>name"`
	Summary    string               `xml:"summary"`
	Properties *FeedEntryProperties `xml:"m:properties"`
	Content    string               `xml:",innerxml"`
}

type FeedEntryCategory added in v1.17.4

type FeedEntryCategory struct {
	Term   string `xml:"term,attr"`
	Scheme string `xml:"scheme,attr"`
}
type FeedEntryLink struct {
	Rel  string `xml:"rel,attr"`
	Href string `xml:"href,attr"`
}

type FeedEntryProperties added in v1.17.4

type FeedEntryProperties struct {
	Version                  string                `xml:"d:Version"`
	NormalizedVersion        string                `xml:"d:NormalizedVersion"`
	Authors                  string                `xml:"d:Authors"`
	Dependencies             string                `xml:"d:Dependencies"`
	Description              string                `xml:"d:Description"`
	VersionDownloadCount     TypedValue[int64]     `xml:"d:VersionDownloadCount"`
	DownloadCount            TypedValue[int64]     `xml:"d:DownloadCount"`
	PackageSize              TypedValue[int64]     `xml:"d:PackageSize"`
	Created                  TypedValue[time.Time] `xml:"d:Created"`
	LastUpdated              TypedValue[time.Time] `xml:"d:LastUpdated"`
	Published                TypedValue[time.Time] `xml:"d:Published"`
	ProjectURL               string                `xml:"d:ProjectUrl,omitempty"`
	ReleaseNotes             string                `xml:"d:ReleaseNotes,omitempty"`
	RequireLicenseAcceptance TypedValue[bool]      `xml:"d:RequireLicenseAcceptance"`
	Title                    string                `xml:"d:Title"`
}

type FeedResponse added in v1.17.4

type FeedResponse struct {
	XMLName xml.Name           `xml:"feed"`
	Xmlns   string             `xml:"xmlns,attr,omitempty"`
	XmlnsD  string             `xml:"xmlns:d,attr,omitempty"`
	XmlnsM  string             `xml:"xmlns:m,attr,omitempty"`
	Base    string             `xml:"xml:base,attr,omitempty"`
	ID      string             `xml:"id"`
	Title   TypedValue[string] `xml:"title"`
	Updated time.Time          `xml:"updated"`
	Links   []FeedEntryLink    `xml:"link"`
	Entries []*FeedEntry       `xml:"entry"`
	Count   int64              `xml:"m:count"`
}

type PackageDependencyGroup

type PackageDependencyGroup struct {
	TargetFramework string               `json:"targetFramework"`
	Dependencies    []*PackageDependency `json:"dependencies"`
}

https://docs.microsoft.com/en-us/nuget/api/registration-base-url-resource#package-dependency-group

type PackageVersionsResponse

type PackageVersionsResponse struct {
	Versions []string `json:"versions"`
}

https://docs.microsoft.com/en-us/nuget/api/package-base-address-resource#response

type RegistrationIndexPage

type RegistrationIndexPage struct {
	RegistrationPageURL string                       `json:"@id"`
	Lower               string                       `json:"lower"`
	Upper               string                       `json:"upper"`
	Count               int                          `json:"count"`
	Items               []*RegistrationIndexPageItem `json:"items"`
}

https://docs.microsoft.com/en-us/nuget/api/registration-base-url-resource#registration-page-object

type RegistrationIndexPageItem

type RegistrationIndexPageItem struct {
	RegistrationLeafURL string        `json:"@id"`
	PackageContentURL   string        `json:"packageContent"`
	CatalogEntry        *CatalogEntry `json:"catalogEntry"`
}

https://docs.microsoft.com/en-us/nuget/api/registration-base-url-resource#registration-leaf-object-in-a-page

type RegistrationIndexResponse

type RegistrationIndexResponse struct {
	RegistrationIndexURL string                   `json:"@id"`
	Type                 []string                 `json:"@type"`
	Count                int                      `json:"count"`
	Pages                []*RegistrationIndexPage `json:"items"`
}

https://docs.microsoft.com/en-us/nuget/api/registration-base-url-resource#response

type RegistrationLeafResponse

type RegistrationLeafResponse struct {
	RegistrationLeafURL  string    `json:"@id"`
	Type                 []string  `json:"@type"`
	Listed               bool      `json:"listed"`
	PackageContentURL    string    `json:"packageContent"`
	Published            time.Time `json:"published"`
	RegistrationIndexURL string    `json:"registration"`
}

https://docs.microsoft.com/en-us/nuget/api/registration-base-url-resource#registration-leaf

type SearchResult

type SearchResult struct {
	ID                   string                 `json:"id"`
	Version              string                 `json:"version"`
	Versions             []*SearchResultVersion `json:"versions"`
	Description          string                 `json:"description"`
	Authors              string                 `json:"authors"`
	ProjectURL           string                 `json:"projectURL"`
	RegistrationIndexURL string                 `json:"registration"`
}

https://docs.microsoft.com/en-us/nuget/api/search-query-service-resource#search-result

type SearchResultResponse

type SearchResultResponse struct {
	TotalHits int64           `json:"totalHits"`
	Data      []*SearchResult `json:"data"`
}

https://docs.microsoft.com/en-us/nuget/api/search-query-service-resource#response

type SearchResultVersion

type SearchResultVersion struct {
	RegistrationLeafURL string `json:"@id"`
	Version             string `json:"version"`
	Downloads           int64  `json:"downloads"`
}

https://docs.microsoft.com/en-us/nuget/api/search-query-service-resource#search-result

type ServiceCollection added in v1.17.4

type ServiceCollection struct {
	Href  string    `xml:"href,attr"`
	Title AtomTitle `xml:"atom:title"`
}

type ServiceIndexResponseV2 added in v1.17.4

type ServiceIndexResponseV2 struct {
	XMLName   xml.Name         `xml:"service"`
	Base      string           `xml:"base,attr"`
	Xmlns     string           `xml:"xmlns,attr"`
	XmlnsAtom string           `xml:"xmlns:atom,attr"`
	Workspace ServiceWorkspace `xml:"workspace"`
}

type ServiceIndexResponseV3 added in v1.17.4

type ServiceIndexResponseV3 struct {
	Version   string            `json:"version"`
	Resources []ServiceResource `json:"resources"`
}

https://docs.microsoft.com/en-us/nuget/api/service-index#resources

type ServiceResource

type ServiceResource struct {
	ID   string `json:"@id"`
	Type string `json:"@type"`
}

https://docs.microsoft.com/en-us/nuget/api/service-index#resource

type ServiceWorkspace added in v1.17.4

type ServiceWorkspace struct {
	Title      AtomTitle         `xml:"atom:title"`
	Collection ServiceCollection `xml:"collection"`
}

type TypedValue added in v1.17.4

type TypedValue[T any] struct {
	Type  string `xml:"type,attr,omitempty"`
	Value T      `xml:",chardata"`
}

Jump to

Keyboard shortcuts

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