Documentation ¶
Index ¶
Constants ¶
View Source
const ( Offline = "offline" Wifi = "wifi" Cellular = "cellular" Unknown = "unknown" None = "none" )
Variables ¶
This section is empty.
Functions ¶
func NewConnectionType ¶
func NewConnectionType(s string) connectionType
NewConnectionType creates new connectionType from string.
Types ¶
type State ¶
type State struct { Offline bool `json:"offline"` Type connectionType `json:"type"` Expensive bool `json:"expensive"` }
State represents device connection state and type, as reported by mobile framework.
Zero value represents default assumption about network (online and unknown type).
func (State) IsExpensive ¶
Click to show internal directories.
Click to hide internal directories.