common

package
v0.0.0-...-0f9c540 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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 (c *Config) GetApiBaseUrl() string

func (*Config) GetDbConnString

func (c *Config) GetDbConnString() string

type Database

type Database struct {
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(config *Config) (*Database, error)

func (*Database) AddFavorite

func (d *Database) AddFavorite(mac string, stationId int64, stationName string)

func (*Database) CreateDevice

func (d *Database) CreateDevice(mac string)

func (*Database) GetFavoriteStations

func (d *Database) GetFavoriteStations(mac string) []radioprovider.Station

func (*Database) IsFavorite

func (d *Database) IsFavorite(mac string, stationId uint64) bool

func (*Database) RemoveFavorite

func (d *Database) RemoveFavorite(mac string, stationId uint64)

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"`
	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 ListOfItems struct {
	XMLName   xml.Name `xml:"ListOfItems"`
	ItemCount int      `xml:"ItemCount"`
	Items     []Item   `xml:"Item"`
}

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL