Discover Packages
github.com/hobeone/gonab
nzb
package
Version:
v0.0.0-...-fc716ca
Opens a new window with list of versions in this module.
Published: Mar 11, 2016
License: GPL-3.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
WriteNZB takes a Binary and returns a NZB document as a string.
type File struct {
Groups []string `xml:"groups>group"`
Segments []Segment `xml:"segments>segment"`
Poster string `xml:"poster,attr"`
Date int64 `xml:"date,attr"`
Subject string `xml:"subject,attr"`
Part int `xml:"-"`
}
File wraps the file structure in the nzb xml
type Meta struct {
Type string `xml:"type,attr"`
Value string `xml:",innerxml"`
}
Meta information for the header
type NZB struct {
XMLName xml .Name `xml:"nzb"`
Xmlns string `xml:"xmlns,attr,omitempty"`
Metadata []Meta `xml:"head>meta"`
Files []File `xml:"file"`
}
NZB is the top level structure
type Segment struct {
XMLName xml .Name `xml:"segment"`
Bytes int64 `xml:"bytes,attr"`
Number int `xml:"number,attr"`
ID string `xml:",innerxml"`
}
Segment represents each segment of a file
Source Files
¶
Click to show internal directories.
Click to hide internal directories.