netinfo

package
v0.0.0-...-724c8d0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package netinfo is network information

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionType

type ConnectionType int

enum: ConnectionType

const (
	BluetoothConnectionType ConnectionType = iota
	CellularConnectionType
	EthernetConnectionType
	MixedConnectionType
	NoneConnectionType
	OtherConnectionType
	UnknownConnectionType
	WifiConnectionType
	WimaxConnectionType
)

func ConnectionTypeFromJS

func ConnectionTypeFromJS(value js.Value) ConnectionType

ConnectionTypeFromJS is converting a javascript value into a ConnectionType enum value.

func (*ConnectionType) JSValue

func (this *ConnectionType) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (ConnectionType) Value

func (this ConnectionType) Value() string

Value is converting this into javascript defined string value

type EffectiveConnectionType

type EffectiveConnectionType int

enum: EffectiveConnectionType

const (
	Slow2gEffectiveConnectionType EffectiveConnectionType
)

func EffectiveConnectionTypeFromJS

func EffectiveConnectionTypeFromJS(value js.Value) EffectiveConnectionType

EffectiveConnectionTypeFromJS is converting a javascript value into a EffectiveConnectionType enum value.

func (*EffectiveConnectionType) JSValue

func (this *EffectiveConnectionType) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (EffectiveConnectionType) Value

func (this EffectiveConnectionType) Value() string

Value is converting this into javascript defined string value

type NetworkInformation

type NetworkInformation struct {
	domcore.EventTarget
}

class: NetworkInformation

func NetworkInformationFromJS

func NetworkInformationFromJS(value js.Wrapper) *NetworkInformation

NetworkInformationFromJS is casting a js.Wrapper into NetworkInformation.

func (*NetworkInformation) AddEventChange

func (_this *NetworkInformation) AddEventChange(listener func(event *domcore.Event, currentTarget *NetworkInformation)) js.Func

AddChange is adding doing AddEventListener for 'Change' on target. This method is returning allocated javascript function that need to be released.

func (_this *NetworkInformation) Downlink() float64

Downlink returning attribute 'downlink' with type float64 (idl: unrestricted double).

func (*NetworkInformation) DownlinkMax

func (_this *NetworkInformation) DownlinkMax() float64

DownlinkMax returning attribute 'downlinkMax' with type float64 (idl: unrestricted double).

func (*NetworkInformation) EffectiveType

func (_this *NetworkInformation) EffectiveType() EffectiveConnectionType

EffectiveType returning attribute 'effectiveType' with type EffectiveConnectionType (idl: EffectiveConnectionType).

func (*NetworkInformation) OnChange

func (_this *NetworkInformation) OnChange() domcore.EventHandlerFunc

OnChange returning attribute 'onchange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*NetworkInformation) Rtt

func (_this *NetworkInformation) Rtt() int

Rtt returning attribute 'rtt' with type int (idl: unsigned long long).

func (*NetworkInformation) SaveData

func (_this *NetworkInformation) SaveData() bool

SaveData returning attribute 'saveData' with type bool (idl: boolean).

func (*NetworkInformation) SetOnChange

func (_this *NetworkInformation) SetOnChange(listener func(event *domcore.Event, currentTarget *NetworkInformation)) js.Func

SetOnChange is assigning a function to 'onchange'. This This method is returning allocated javascript function that need to be released.

func (*NetworkInformation) Type

func (_this *NetworkInformation) Type() ConnectionType

Type returning attribute 'type' with type ConnectionType (idl: ConnectionType).

type Union

type Union struct {
	Value js.Value
}

func UnionFromJS

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue

func (u *Union) JSValue() js.Value

Jump to

Keyboard shortcuts

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