hublist

package
v0.16.5 Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Lists = []string{
	"http://dchublist.com/hublist.xml.bz2",
	"http://dchublist.org/hublist.xml.bz2",
	"http://dchublist.biz/hublist.xml.bz2",
	"http://dchublist.ru/hublist.xml.bz2",
}

Lists well-known hub lists.

View Source
var TELists = []string{
	"http://www.te-home.net/",
}

TELists is a list of well-known TE-compatible hub lists.

Functions

This section is empty.

Types

type Hub

type Hub struct {
	Name        string `xml:"Name,attr"`
	Address     string `xml:"Address,attr"`
	Bots        int    `xml:"Bots,attr,omitempty"`
	Country     string `xml:"Country,attr,omitempty"`
	Description string `xml:"Description,attr,omitempty"`
	Email       string `xml:"Email,attr,omitempty"`
	Encoding    string `xml:"Encoding,attr,omitempty"`
	Failover    string `xml:"Failover,attr,omitempty"`
	Icon        string `xml:"Icon,attr,omitempty"`
	Infected    int    `xml:"Infected,attr,omitempty"`
	Maxhubs     int    `xml:"Maxhubs,attr,omitempty"`
	Maxusers    int    `xml:"Maxusers,attr,omitempty"`
	Minshare    Size   `xml:"Minshare,attr,omitempty"`
	Minslots    int    `xml:"Minslots,attr,omitempty"`
	Network     string `xml:"Network,attr,omitempty"`
	Operators   int    `xml:"Operators,attr,omitempty"`
	Rating      string `xml:"Rating,attr,omitempty"`
	Reliability string `xml:"Reliability,attr,omitempty"`
	Shared      Size   `xml:"Shared,attr,omitempty"`
	Software    string `xml:"Software,attr,omitempty"`
	Status      string `xml:"Status,attr,omitempty"`
	Users       int    `xml:"Users,attr,omitempty"`
	Website     string `xml:"Website,attr,omitempty"`

	ErrCode int `xml:"ErrCode,attr,omitempty"`
}

func DecodeBZip2

func DecodeBZip2(r io.Reader) ([]Hub, error)

DecodeBZip2 decodes a .xml.bz2 files list.

func Get

func Get(ctx context.Context, url string) ([]Hub, error)

Get fetches and decodes a hub list.

func GetAll

func GetAll(ctx context.Context) ([]Hub, error)

GetAll fetches and decodes all hub lists.

func GetTE

func GetTE(ctx context.Context, addr string) ([]Hub, error)

GetTE fetches and decodes a TE-compatible hub list.

type Size

type Size uint64

func (*Size) UnmarshalText

func (s *Size) UnmarshalText(text []byte) error

type XMLListWriter added in v0.8.15

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

func NewXMLWriter added in v0.8.15

func NewXMLWriter(w io.Writer) *XMLListWriter

func (*XMLListWriter) Close added in v0.8.15

func (w *XMLListWriter) Close() error

func (*XMLListWriter) Headers added in v0.16.4

func (w *XMLListWriter) Headers(v bool)

func (*XMLListWriter) SetHublistName added in v0.8.15

func (w *XMLListWriter) SetHublistName(name string)

func (*XMLListWriter) SetHublistURL added in v0.8.15

func (w *XMLListWriter) SetHublistURL(url string)

func (*XMLListWriter) WriteHub added in v0.8.15

func (w *XMLListWriter) WriteHub(h Hub) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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