Documentation
¶
Index ¶
- Constants
- func AccountAdd(ctx context.Context, callsign, password, recoveryEmail string) error
- func AccountExists(ctx context.Context, callsign string) (bool, error)
- func GetGatewayStatus(ctx context.Context, mode string, historyHours int, serviceCodes ...string) (io.ReadCloser, error)
- func GetGatewayStatusCached(ctx context.Context, cacheFile string, forceDownload bool, ...) (io.ReadCloser, error)
- func MPSAdd(ctx context.Context, requester, callsign, password, mpsCallsign string) error
- func MPSDelete(ctx context.Context, requester, callsign, password string) error
- func PasswordRecoveryEmailGet(ctx context.Context, callsign, password string) (string, error)
- func PasswordRecoveryEmailSet(ctx context.Context, callsign, password, email string) error
- func ValidatePassword(ctx context.Context, callsign, password string) (bool, error)
- type AccountAddRequest
- type AccountAddResponse
- type DotNetTime
- type Gateway
- type GatewayChannel
- type GatewayStatus
- type HybridStation
- type MessagePickupStationRecord
- type PasswordValidateRequest
- type PasswordValidateResponse
- type RFC1123Time
- type VersionAdd
Constants ¶
const ( RootURL = "https://api.winlink.org" PathVersionAdd = "/version/add" PathGatewayStatus = "/gateway/status.json" PathAccountExists = "/account/exists" PathPasswordValidate = "/account/password/validate" PathAccountAdd = "/account/add" // AccessKey issued December 2017 by the WDT for use with Pat AccessKey = "1880278F11684B358F36845615BD039A" )
const ( PathMPSAdd = "/mps/add" PathMPSDelete = "/mps/delete" PathMPSGet = "/mps/get" PathMPSList = "/mps/list" )
const ( PathAccountPasswordRecoveryEmailGet = "/account/password/recovery/email/get" PathAccountPasswordRecoveryEmailSet = "/account/password/recovery/email/set" )
const PathHybridStationList = "/hybridStation/list"
Variables ¶
This section is empty.
Functions ¶
func AccountAdd ¶ added in v0.18.0
func AccountExists ¶ added in v0.11.0
func GetGatewayStatus ¶ added in v0.5.1
func GetGatewayStatus(ctx context.Context, 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, 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(ctx context.Context, cacheFile string, forceDownload bool, serviceCodes ...string) (io.ReadCloser, error)
GetGatewayStatusCached fetches the gateway status list, either from a cache file or by downloading it.
If error occurs while downloading, it will fall back to the embedded gateway status information.
func PasswordRecoveryEmailGet ¶ added in v0.16.0
func PasswordRecoveryEmailSet ¶ added in v0.16.0
Types ¶
type AccountAddRequest ¶ added in v0.18.0
type AccountAddResponse ¶ added in v0.18.0
type AccountAddResponse struct {
ResponseStatus responseStatus `json:"ResponseStatus"`
}
type DotNetTime ¶ added in v0.18.0
DotNetTime handles .NET-style JSON date serialization
func (*DotNetTime) UnmarshalJSON ¶ added in v0.18.0
func (t *DotNetTime) UnmarshalJSON(b []byte) error
UnmarshalJSON implements custom JSON unmarshaling for .NET date format
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 GatewayStatus ¶ added in v0.5.1
type HybridStation ¶ added in v0.18.0
func HybridStationList ¶ added in v0.18.0
func HybridStationList(ctx context.Context) ([]HybridStation, error)
type MessagePickupStationRecord ¶ added in v0.18.0
type MessagePickupStationRecord struct {
Callsign string `json:"callsign"`
MpsCallsign string `json:"mpsCallsign"`
Timestamp DotNetTime `json:"timestamp"`
}
MessagePickupStationRecord represents an MPS record
type PasswordValidateRequest ¶ added in v0.18.0
type PasswordValidateResponse ¶ added in v0.18.0
type PasswordValidateResponse struct {
IsValid bool `json:"IsValid"`
ResponseStatus responseStatus `json:"ResponseStatus"`
}
type RFC1123Time ¶ added in v0.5.1
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