28 lines
457 B
Go
28 lines
457 B
Go
|
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 {
|
||
|
Token string
|
||
|
Hostname string
|
||
|
PrivKey crypto.PrivateKey
|
||
|
}
|