go-http-peering/request.go

29 lines
465 B
Go

package peering
import jwt "github.com/dgrijalva/jwt-go"
const (
AdvertisePath = "/advertise"
UpdatePath = "/update"
PingPath = "/ping"
)
type AdvertisingRequest struct {
Attributes PeerAttributes
PublicKey []byte
}
type UpdateRequest struct {
Attributes PeerAttributes
}
type ClientTokenClaims struct {
jwt.StandardClaims
BodySum []byte `json:"bodySum"`
}
type ServerTokenClaims struct {
jwt.StandardClaims
PeerID PeerID `json:"peerID"`
}