Documentation ¶
Index ¶
Constants ¶
View Source
const ( TagContributor = "dc:contributor" TagCreator = "dc:creator" TagDate = "dc:date" TagDescription = "dc:description" TagLanguage = "dc:language" TagPublisher = "dc:publisher" TagRelation = "dc:relation" TagRights = "dc:rights" TagArtist = "upnp:artist" TagActor = "upnp:actor" TagAuthor = "upnp:author" TagProducer = "upnp:producer" TagDirector = "upnp:director" TagGenre = "upnp:genre" TagAlbum = "upnp:album" TagAlbumArtURI = "upnp:albumArtURI" TagArtistDiscographyURI = "upnp:artistDiscographyURI" TagLyricsURI = "upnp:lyricsURI" TagLongDescription = "upnp:longDescription" TagIcon = "upnp:icon" TagRegion = "upnp:region" TagOriginalTrackNumber = "upnp:originalTrackNumber" TagTOC = "upnp:toc" TagContainerUpdateID = "upnp:containerUpdateID" TagObjectUpdateID = "upnp:objectUpdateID" )
View Source
const ( ResDuration = "duration" ResSize = "size" ResBitrate = "bitrate" ResSampleFrequency = "sampleFrequency" ResBitsPerSample = "bitsPerSample" ResNrAudioChannels = "nrAudioChannels" ResResolution = "resolution" ResColorDepth = "colorDepth" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Common ¶
type Common struct { ID string `xml:"id,attr"` ParentID string `xml:"parentID,attr"` Restricted bool `xml:"restricted,attr"` // Mandatory elements Title string `xml:"dc:title" json:"dc:title"` Class string `xml:"upnp:class" json:"upnp:class"` // Optional elements Tags tagElements // Related resources Resources []Resource `xml:"res" json:",omitempty"` }
Common holds the properties shared by Items and Containers
func (*Common) AddResources ¶
type Container ¶
type Container struct { XMLName xml.Name `xml:"container" json:"-"` ChildCount uint `xml:"childCount,attr,omitempty" ` ChildContainerCount uint `xml:"childContainerCount,attr,omitempty" json:",omitempty"` Searchable bool `xml:"searchable,attr,omitempty" json:",omitempty"` Common Children []Object `json:",omitempty"` }
Container contains other Objects
func (*Container) AddChildren ¶
func (Container) IsContainer ¶
type DIDLLite ¶
type DIDLLite struct { XMLName xml.Name `xml:"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/ DIDL-Lite"` Objects []Object `xml:"xmlns:,omitempty"` }
DIDLLite is the root element
func (*DIDLLite) AddObjects ¶
func (*DIDLLite) MarshalXML ¶
type Duration ¶
func (Duration) MarshalText ¶
type Object ¶
type Object interface {
// contains filtered or unexported methods
}
Object is either an Item or a Container
type Resolution ¶
func (*Resolution) MarshalText ¶
func (r *Resolution) MarshalText() (text []byte, err error)
func (*Resolution) String ¶
func (r *Resolution) String() string
type Resource ¶
type Resource struct { ID string `xml:"id,attr,omitempty"` ProtocolInfo string `xml:"protocolInfo",attr"` URI string `xml:",chardata"` // contains filtered or unexported fields }
Resource is a content to stream or download
func (*Resource) MarshalJSON ¶
func (*Resource) MarshalXML ¶
Click to show internal directories.
Click to hide internal directories.