Documentation ¶
Overview ¶
Package protoutil provides utils to deal with protobuf.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeFromShillValMap ¶
func DecodeFromShillValMap(conf ShillValMap) (map[string]interface{}, error)
DecodeFromShillValMap converts a ShillValMap to a (key, value) map.
func FromShillVal ¶
FromShillVal converts a ShillVal to a common golang type.
func ToShillVal ¶
ToShillVal converts a common golang type to a ShillVal .
Types ¶
type ShillPropertyChangedSignalList ¶
type ShillPropertyChangedSignalList []*wifi.ShillPropertyChangedSignal
ShillPropertyChangedSignalList a type alias of []*network.ShillPropertyChangedSignal. It can be sent through protobuf.
func EncodeToShillPropertyChangedSignalList ¶
func EncodeToShillPropertyChangedSignalList(conf []ShillPropertyHolder) (ShillPropertyChangedSignalList, error)
EncodeToShillPropertyChangedSignalList converts a list of network.ShillPropertyChangedSignal that contains supported value type to protocol buffer network.ShillVal.
type ShillPropertyHolder ¶
type ShillPropertyHolder struct { Name string Value interface{} }
ShillPropertyHolder holds the parameters of shill "PropertyChanged" signal.
func DecodeFromShillPropertyChangedSignalList ¶
func DecodeFromShillPropertyChangedSignalList(conf ShillPropertyChangedSignalList) ([]ShillPropertyHolder, error)
DecodeFromShillPropertyChangedSignalList converts a PropertyChangedSignalList to a []ShillPropertyHolder.
type ShillValMap ¶
ShillValMap is a type alias of map[string]*network.ShillVal. It can be sent through protobuf.
func EncodeToShillValMap ¶
func EncodeToShillValMap(conf map[string]interface{}) (ShillValMap, error)
EncodeToShillValMap converts a map that contains supported value type to protocol buffer network.ShillVal.