cmsapi

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootURL           = "https://api.winlink.org"
	PathVersionAdd    = "/version/add"
	PathGatewayStatus = "/gateway/status.json"

	// Issued December 2017 by the WDT for use with Pat
	AccessKey = "1880278F11684B358F36845615BD039A"
)

Variables

This section is empty.

Functions

func GetGatewayStatus added in v0.5.1

func GetGatewayStatus(mode string, historyHours int, serviceCodes ...string) (io.ReadCloser, error)

GetGatewayStatus fetches the gateway status list returned by GatewayStatusUrl

mode can be any of [packet, pactor, winmor, robustpacket, allhf or anyall]. Empty is AnyAll. historyHours is the number of hours of history to include (maximum: 48). If < 1, then API default is used. serviceCodes defaults to "PUBLIC".

func GetGatewayStatusCached added in v0.5.1

func GetGatewayStatusCached(cacheFile string, forceDownload bool, serviceCodes ...string) (io.ReadCloser, error)

Types

type Gateway added in v0.5.1

type Gateway struct {
	Callsign      string
	BaseCallsign  string
	RequestedMode string
	Comments      string
	LastStatus    RFC1123Time
	Latitude      float64
	Longitude     float64

	Channels []GatewayChannel `json:"GatewayChannels"`
}

type GatewayChannel added in v0.5.1

type GatewayChannel struct {
	OperatingHours string
	SupportedModes string
	Frequency      float64
	ServiceCode    string
	Baud           string
	RadioRange     string
	Mode           int
	Gridsquare     string
	Antenna        string
}

type GatewayStatus added in v0.5.1

type GatewayStatus struct {
	ServerName string    `json:"ServerName"`
	ErrorCode  int       `json:"ErrorCode"`
	Gateways   []Gateway `json:"Gateways"`
}

type RFC1123Time added in v0.5.1

type RFC1123Time struct{ time.Time }

func (*RFC1123Time) UnmarshalJSON added in v0.5.1

func (t *RFC1123Time) UnmarshalJSON(b []byte) (err error)

type VersionAdd

type VersionAdd struct {
	Callsign string `json:"callsign"`
	Program  string `json:"program"`
	Version  string `json:"version"`
	Comments string `json:"comments,omitempty"`
}

func (VersionAdd) Post

func (v VersionAdd) Post() error

Jump to

Keyboard shortcuts

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