Documentation
¶
Index ¶
- func JSON(w http.ResponseWriter, p interface{})
- type Any
- type ContentFile
- type Dependencies
- type Dependency
- type File
- type FrameworkAssembly
- type Group
- type Metadata
- type Nuspec
- type Package
- type PackageType
- type Reference
- type ReferenceGroup
- type Repository
- type Resource
- type ResourceType
- type Server
- type ServiceIndex
- type VersionRange
- type Versions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSON ¶
func JSON(w http.ResponseWriter, p interface{})
JSON marchal object to json and set Content-Type
Types ¶
type ContentFile ¶
type Dependencies ¶
type Dependencies struct { Groups []*Group Dependencies []*Dependency }
func (*Dependencies) UnmarshalXML ¶
func (deps *Dependencies) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type Dependency ¶
type FrameworkAssembly ¶
type Group ¶
type Group struct { TargetFramework string Dependencies []*Dependency }
type Metadata ¶
type Metadata struct { ID string `xml:"id"` Version string `xml:"version"` Description string `xml:"description"` Authors string `xml:"authors"` Title string `xml:"title"` Owners string `xml:"owners"` ProjectURL string `xml:"projectUrl"` LicenseURL string `xml:"licenseUrl"` License string `xml:"license"` IconURL string `xml:"iconUrl"` RequireLicenseAcceptance bool `xml:"requireLicenseAcceptance"` DevelopmentDependency bool `xml:"developmentDependency"` Summary string `xml:"summary"` ReleaseNotes string `xml:"releaseNotes"` Copyright string `xml:"copyright"` Language string `xml:"language"` Tags string `xml:"tags"` Serviceable string `xml:"serviceable"` Dependencies *Dependencies `xml:"dependencies"` }
type Package ¶
type Package struct { XMLName xml.Name `xml:"package"` Metadata Metadata `xml:"metadata"` Files []File `xml:"files"` }
func (*Package) PURL ¶
func (pkg *Package) PURL() purl.PackageURL
type PackageType ¶
type ReferenceGroup ¶
type Repository ¶
type Repository interface { Versions(ctx context.Context, id string) Versions Download(ctx context.Context, id, version string) (io.ReadCloser, error) Upload(ctx context.Context, nupkg io.Reader) error Delete(ctx context.Context, id, version string) error Search(ctx context.Context, text string) (io.ReadCloser, error) }
Repository is an interface for a NuGet repository
func NewClient ¶
func NewClient(indexURL string) (Repository, error)
NewClient creates a client repository
func NewLocal ¶
func NewLocal(storage driver.StorageDriver) Repository
NewLocalRepository initialize a new local repository
func NewRemote ¶
func NewRemote(remoteURL string, storage driver.StorageDriver) (Repository, error)
NewRemote initialize a repository that fetch and cache packages from upstream
type Resource ¶
type Resource struct { ID string `json:"@id"` Type ResourceType `json:"@type"` Comment string `json:"comment"` }
type ResourceType ¶
type ResourceType string
const ( PackagePublish ResourceType = "PackagePublish/2.0.0" SearchQueryService ResourceType = "SearchQueryService" RegistrationsBaseUrl ResourceType = "RegistrationsBaseUrl" PackageBaseAddress ResourceType = "PackageBaseAddress/3.0.0" )
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server expose a repository on HTTP
type ServiceIndex ¶
type VersionRange ¶
type VersionRange string
func (VersionRange) Min ¶
func (v VersionRange) Min() string
Click to show internal directories.
Click to hide internal directories.