Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { AddressInfo peer.AddrInfo `json:"-"` OS string `json:"os"` Name string `json:"name"` PublicKey []byte `json:"publicKey"` Status DeviceStatus `json:"status"` Stream network.Stream `json:"-"` Writer *bufio.Writer `json:"-"` Reader *bufio.Reader `json:"-"` PgpEncrypter *crypto.PGPEncrypter `json:"-"` }
Device struct for peer
func (*Device) CreatePGPEncrypter ¶
func (*Device) UpdateFromProtobuf ¶
func (dv *Device) UpdateFromProtobuf(deviceData *protobuf.DeviceData)
UpdateFromProtobuf update device from protobuf device data
type DeviceStatus ¶
type DeviceStatus string
DeviceStatus device status
const ( // StatusPending the device waiting to handshake and trust the device, they send you the public key but you didn't StatusPending DeviceStatus = "pending" // StatusConnected the device is trusted and connected StatusConnected DeviceStatus = "connected" // StatusDisconnected the device is trusted but disconnected or offline StatusDisconnected DeviceStatus = "disconnected" // StatusError found a error in the device should disconnect and reconnect StatusError DeviceStatus = "error" // StatusBlocked the device is blocked by the user StatusBlocked DeviceStatus = "blocked" )
Click to show internal directories.
Click to hide internal directories.