2017-01-18 09:57:18 +00:00
|
|
|
package routerpc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"crypto"
|
|
|
|
"crypto/rsa"
|
|
|
|
"encoding/gob"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
gob.Register(&AddHostRequest{})
|
|
|
|
gob.Register(&AddHostResponse{})
|
|
|
|
gob.Register(&rsa.PrivateKey{})
|
|
|
|
}
|
|
|
|
|
|
|
|
// AddHostRequest is for adding a host to the routing mesh
|
|
|
|
type AddHostRequest struct {
|
|
|
|
APIKey string
|
|
|
|
Hostname string
|
|
|
|
PrivKey crypto.PrivateKey
|
|
|
|
}
|
|
|
|
|
|
|
|
// AddHostResponse ...
|
|
|
|
type AddHostResponse struct {
|
2017-01-18 10:22:52 +00:00
|
|
|
Token string
|
|
|
|
Hostname string
|
|
|
|
OnionHostname string
|
|
|
|
PrivKey crypto.PrivateKey
|
2017-01-18 09:57:18 +00:00
|
|
|
}
|