Documentation
¶
Index ¶
- type Config
- type Database
- func (d *Database) AddFavorite(mac string, stationId int64, stationName string)
- func (d *Database) CreateDevice(mac string)
- func (d *Database) GetFavoriteStations(mac string) []radioprovider.Station
- func (d *Database) IsFavorite(mac string, stationId uint64) bool
- func (d *Database) RemoveFavorite(mac string, stationId uint64)
- type Item
- type ListOfItems
- type XmlBuilder
- func (x *XmlBuilder) CreateCountryList(countries []radioprovider.Country, start int, end int) ListOfItems
- func (x *XmlBuilder) CreateStationDetail(station radioprovider.Station, favorite bool) ListOfItems
- func (x *XmlBuilder) CreateStationDetailLinkItem(station radioprovider.Station) Item
- func (x *XmlBuilder) CreateStationItem(station radioprovider.Station) Item
- func (x *XmlBuilder) CreateStationsList(stations []radioprovider.Station, start int, end int, direct bool) ListOfItems
- func (x *XmlBuilder) WriteToWire(w http.ResponseWriter, items ListOfItems)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func NewEnvConfig ¶
func NewEnvConfig() *Config
func (*Config) GetApiBaseUrl ¶
func (*Config) GetDbConnString ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Database) AddFavorite ¶
func (*Database) CreateDevice ¶
func (*Database) GetFavoriteStations ¶
func (d *Database) GetFavoriteStations(mac string) []radioprovider.Station
func (*Database) RemoveFavorite ¶
type Item ¶
type Item struct { XMLName xml.Name `xml:"Item"` ItemType string `xml:"ItemType"` Title string `xml:"Title,omitempty"` UrlDir string `xml:"UrlDir,omitempty"` UrlDirBackUp string `xml:"UrlDirBackUp,omitempty"` UrlPrevious string `xml:"UrlPrevious,omitempty"` UrlPreviousBackUp string `xml:"UrlPreviousBackUp,omitempty"` StationId string `xml:"StationId,omitempty"` StationName string `xml:"StationName,omitempty"` StationUrl string `xml:"StationUrl,omitempty"` StationDesc string `xml:"StationDesc,omitempty"` StationFormat string `xml:"StationFormat,omitempty"` StationLocation string `xml:"StationLocation,omitempty"` Logo string `xml:"Logo,omitempty"` StationBandWidth string `xml:"StationBandWidth,omitempty"` StationMime string `xml:"StationMime,omitempty"` Relia string `xml:"Relia,omitempty"` Bookmark string `xml:"Bookmark,omitempty"` SearchURL string `xml:"SearchURL,omitempty"` SearchURLBackUp string `xml:"SearchURLBackUp,omitempty"` SearchCaption string `xml:"SearchCaption,omitempty"` SearchTextbox string `xml:"SearchTextbox,omitempty"` SearchGo string `xml:"SearchGo,omitempty"` SearchCancel string `xml:"SearchCancel,omitempty"` }
type ListOfItems ¶
type XmlBuilder ¶
type XmlBuilder struct {
// contains filtered or unexported fields
}
func NewXmlBuilder ¶
func NewXmlBuilder(config *Config) *XmlBuilder
func (*XmlBuilder) CreateCountryList ¶
func (x *XmlBuilder) CreateCountryList(countries []radioprovider.Country, start int, end int) ListOfItems
func (*XmlBuilder) CreateStationDetail ¶
func (x *XmlBuilder) CreateStationDetail(station radioprovider.Station, favorite bool) ListOfItems
func (*XmlBuilder) CreateStationDetailLinkItem ¶
func (x *XmlBuilder) CreateStationDetailLinkItem(station radioprovider.Station) Item
func (*XmlBuilder) CreateStationItem ¶
func (x *XmlBuilder) CreateStationItem(station radioprovider.Station) Item
func (*XmlBuilder) CreateStationsList ¶
func (x *XmlBuilder) CreateStationsList(stations []radioprovider.Station, start int, end int, direct bool) ListOfItems
func (*XmlBuilder) WriteToWire ¶
func (x *XmlBuilder) WriteToWire(w http.ResponseWriter, items ListOfItems)
Click to show internal directories.
Click to hide internal directories.