github.com/simpleiot/simpleiot@v0.18.3/network/interface.go (about) 1 package network 2 3 // InterfaceStatus defines the status of an interface 4 type InterfaceStatus struct { 5 Detected bool 6 Connected bool 7 Operator string 8 Signal int 9 Rsrp int 10 Rsrq int 11 IP string 12 } 13 14 // InterfaceConfig contains static information about 15 // an interface 16 type InterfaceConfig struct { 17 Imei string 18 Sim string 19 Apn string 20 Version string 21 } 22 23 // Interface is an interface that network drivers implement 24 type Interface interface { 25 Desc() string 26 Configure() (InterfaceConfig, error) 27 Connect() error 28 GetStatus() (InterfaceStatus, error) 29 Reset() error 30 Enable(bool) error 31 }