Documentation
¶
Index ¶
- func PackNupkg(ns *nuspec.NuSpec, basePath string, outputPath string) ([]byte, error)
- func PushNupkg(fileContents []byte, apiKey string, host string) (int, int64, error)
- func SampleNuSpec(id string, user string) *nuspec.NuSpec
- type ContentTypeEntry
- type ContentTypes
- type PsmdcpFile
- type Rel
- type RelFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SampleNuSpec ¶
SampleNuSpec returns a populated sample NuSpec struct
Types ¶
type ContentTypeEntry ¶
type ContentTypeEntry struct { Extension string `xml:"Extension,attr"` ContentType string `xml:"ContentType,attr"` }
ContentTypeEntry is used by the ContentTypes struct
type ContentTypes ¶
type ContentTypes struct { XMLName xml.Name `xml:"Types"` Xmlns string `xml:"xmlns,attr"` Entry []*ContentTypeEntry `xml:"Default"` }
ContentTypes is represents a [Content_Types].xml file from a .nupkg file
func NewContentTypes ¶
func NewContentTypes() *ContentTypes
NewContentTypes is a constructor for the ContentTypes struct
func (*ContentTypes) Add ¶
func (ct *ContentTypes) Add(ext string)
Add pushes a new extension into a ContentType struct
func (*ContentTypes) ToBytes ¶
func (ct *ContentTypes) ToBytes() ([]byte, error)
ToBytes produces the nuspec in XML format
type PsmdcpFile ¶
type PsmdcpFile struct { XMLName xml.Name `xml:"coreProperties"` XMLNSdc string `xml:"xmlns:dc,attr"` XMLNSdcterms string `xml:"xmlns:dcterms,attr"` XMLNSxsi string `xml:"xmlns:xsi,attr"` XMLNS string `xml:"xmlns,attr"` Creator string `xml:"dc:creator"` Description string `xml:"dc:description"` Identifier string `xml:"dc:identifier"` Version string `xml:"version"` Keywords string `xml:"keywords"` LastModifiedBy string `xml:"lastModifiedBy"` }
PsmdcpFile is a variation XML generated by nuget
func NewPsmdcpFile ¶
func NewPsmdcpFile() *PsmdcpFile
NewPsmdcpFile returns a populated skeleton for a Nuget Packages Entry
func (*PsmdcpFile) ToBytes ¶
func (pf *PsmdcpFile) ToBytes() ([]byte, error)
ToBytes exports structure as byte array
type Rel ¶
type Rel struct { Type string `xml:"Type,attr"` Target string `xml:"Target,attr"` ID string `xml:"Id,attr"` }
Rel represents a relationship used in RelFile
type RelFile ¶
type RelFile struct { XMLName xml.Name `xml:"Relationships"` XMLns string `xml:"xmlns,attr"` Rels []*Rel `xml:"Relationship"` }
RelFile represents a Relationship File stored in .rels
func NewRelFile ¶
func NewRelFile() *RelFile
NewRelFile returns a populated skeleton for a Nuget Packages Entry