Documentation ¶
Index ¶
- Variables
- func MarshalCSV(data OutlineServers) ([]byte, error)
- func MarshalJSON(data OutlineServers) ([]byte, error)
- func MarshalTable(data OutlineServers) ([]byte, error)
- func MarshalText(data OutlineServers) ([]byte, error)
- func MarshalYAML(data OutlineServers) ([]byte, error)
- type OutlineServer
- type OutlineServers
- type ServerInfo
- type ServerStatus
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func MarshalCSV ¶ added in v0.9.0
func MarshalCSV(data OutlineServers) ([]byte, error)
func MarshalJSON ¶ added in v0.9.0
func MarshalJSON(data OutlineServers) ([]byte, error)
func MarshalTable ¶ added in v0.9.0
func MarshalTable(data OutlineServers) ([]byte, error)
func MarshalText ¶ added in v0.9.0
func MarshalText(data OutlineServers) ([]byte, error)
func MarshalYAML ¶ added in v0.9.0
func MarshalYAML(data OutlineServers) ([]byte, error)
Types ¶
type OutlineServer ¶
type OutlineServer struct { AccessKey int `json:"access_key" yaml:"access_key" csv:"access_key"` Location string `json:"location" yaml:"location" csv:"location"` Hosting string `json:"hosting" yaml:"hosting" csv:"hosting"` Quality int `json:"quality" yaml:"quality" csv:"quality"` Published time.Time `json:"published" yaml:"published" csv:"published"` KeyType string `json:"key_type" yaml:"key_type" csv:"key_type"` PageURL string `json:"page_url" yaml:"page_url" csv:"page_url"` Link string `json:"ss_link" yaml:"ss_link" csv:"ss_link"` ServerInfo `json:"server_info" yaml:"server_info"` }
OutlineServer is Outline server description.
func (*OutlineServer) Address ¶
func (s *OutlineServer) Address() string
Address returns network address.
func (*OutlineServer) GetStatus ¶
func (s *OutlineServer) GetStatus()
GetStatus checks server online status.
type OutlineServers ¶
type OutlineServers []*OutlineServer
OutlineServers is Outline servers list.
func FetchData ¶
func FetchData() (OutlineServers, error)
Run fetches Outline Community servers information.
func (OutlineServers) GetStatuses ¶
func (ss OutlineServers) GetStatuses()
GetStatuses checks servers online status.
type ServerInfo ¶
type ServerInfo struct { Host string `json:"host" yaml:"host" csv:"host"` Port int `json:"port" yaml:"port" csv:"port"` Cipher string `json:"cipher" yaml:"cipher" csv:"cipher"` Password string `json:"password" yaml:"password" csv:"password"` Status ServerStatus `json:"-" yaml:"-" csv:"-"` }
ServerInfo a shadowsocks server information.
type ServerStatus ¶
type ServerStatus string
ServerStatus status Outline server.
const ( Unknown ServerStatus = "Unknown" Up ServerStatus = "Up" Down ServerStatus = "Down" )
Click to show internal directories.
Click to hide internal directories.