This commit is contained in:
mr
2026-01-29 13:20:33 +01:00
parent c1519f6b26
commit 186ba3e689
2 changed files with 5 additions and 5 deletions

View File

@@ -64,10 +64,9 @@ type Peer struct {
Verify bool `json:"verify" bson:"verify"` Verify bool `json:"verify" bson:"verify"`
PeerID string `json:"peer_id" bson:"peer_id" validate:"required"` PeerID string `json:"peer_id" bson:"peer_id" validate:"required"`
StreamHost string `json:"stream_host" bson:"stream_host" validate:"required"` // Url is the URL of the peer (base64url) APIUrl string `json:"api_url" bson:"api_url" validate:"required"` // Url is the URL of the peer (base64url)
APIUrl string `json:"api_url" bson:"api_url" validate:"required"` // Url is the URL of the peer (base64url) StreamAddress string `json:"stream_address" bson:"stream_address" validate:"required"` // Url is the URL of the peer (base64url)
NATSAddress string `json:"nats_address" bson:"nats_address" validate:"required"`
NATSUrl string `json:"nats_url" bson:"nats_url" validate:"required"`
WalletAddress string `json:"wallet_address" bson:"wallet_address" validate:"required"` // WalletAddress is the wallet address of the peer WalletAddress string `json:"wallet_address" bson:"wallet_address" validate:"required"` // WalletAddress is the wallet address of the peer
PublicKey string `json:"public_key" bson:"public_key" validate:"required"` // PublicKey is the public key of the peer PublicKey string `json:"public_key" bson:"public_key" validate:"required"` // PublicKey is the public key of the peer
State PeerState `json:"state" bson:"state" default:"0"` State PeerState `json:"state" bson:"state" default:"0"`

View File

@@ -48,7 +48,8 @@ func (m *MockAccessor) Search(filters *dbs.Filters, search string, isDraft bool)
func newTestPeer() *peer.Peer { func newTestPeer() *peer.Peer {
return &peer.Peer{ return &peer.Peer{
StreamHost: "127.0.0.1", NATSAddress: "",
StreamAddress: "127.0.0.1",
APIUrl: "http://localhost", APIUrl: "http://localhost",
WalletAddress: "0x123", WalletAddress: "0x123",
PublicKey: "pubkey", PublicKey: "pubkey",