fix: webfinger redirects
This commit is contained in:
@@ -2,7 +2,6 @@ package peerfinder
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/tj/go-semver"
|
||||
|
||||
@@ -12,7 +11,7 @@ import (
|
||||
type Info struct {
|
||||
ScriptVersion string `json:"script_version"`
|
||||
|
||||
event.AggregateRoot
|
||||
event.IsAggregate
|
||||
}
|
||||
|
||||
var _ event.Aggregate = (*Info)(nil)
|
||||
@@ -55,10 +54,3 @@ type VersionChanged struct {
|
||||
}
|
||||
|
||||
var _ event.Event = (*VersionChanged)(nil)
|
||||
|
||||
func (e *VersionChanged) MarshalBinary() (text []byte, err error) {
|
||||
return json.Marshal(e)
|
||||
}
|
||||
func (e *VersionChanged) UnmarshalBinary(b []byte) error {
|
||||
return json.Unmarshal(b, e)
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ func (p *Peer) CanSupport(ip string) bool {
|
||||
|
||||
type PeerResults struct {
|
||||
set.Set[string]
|
||||
event.AggregateRoot
|
||||
event.IsAggregate
|
||||
}
|
||||
|
||||
func (p *PeerResults) ApplyEvent(lis ...event.Event) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
type Request struct {
|
||||
event.AggregateRoot
|
||||
event.IsAggregate
|
||||
|
||||
RequestID string `json:"req_id"`
|
||||
RequestIP string `json:"req_ip"`
|
||||
@@ -213,12 +213,6 @@ func (r *ResultSubmitted) Created() time.Time {
|
||||
|
||||
var _ event.Event = (*ResultSubmitted)(nil)
|
||||
|
||||
func (e *ResultSubmitted) MarshalBinary() (text []byte, err error) {
|
||||
return json.Marshal(e)
|
||||
}
|
||||
func (e *ResultSubmitted) UnmarshalBinary(b []byte) error {
|
||||
return json.Unmarshal(b, e)
|
||||
}
|
||||
func (e *ResultSubmitted) String() string {
|
||||
return fmt.Sprintf("id: %s\npeer: %s\nversion: %s\nlatency: %0.4f", e.RequestID, e.PeerID, e.PeerVersion, e.Latency)
|
||||
}
|
||||
@@ -231,12 +225,6 @@ type RequestTruncated struct {
|
||||
|
||||
var _ event.Event = (*RequestTruncated)(nil)
|
||||
|
||||
func (e *RequestTruncated) MarshalBinary() (text []byte, err error) {
|
||||
return json.Marshal(e)
|
||||
}
|
||||
func (e *RequestTruncated) UnmarshalBinary(b []byte) error {
|
||||
return json.Unmarshal(b, e)
|
||||
}
|
||||
func (e *RequestTruncated) String() string {
|
||||
return fmt.Sprintf("request truncated id: %s\n", e.RequestID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user