tor-dam

tor distributed announce mechanism (not a dht)
git clone https://git.parazyd.org/tor-dam
Log | Files | Refs | README | LICENSE

types.go (1233B)


      1 package main
      2 
      3 /*
      4  * Copyright (c) 2017-2021 Ivan Jelincic <parazyd@dyne.org>
      5  *
      6  * This file is part of tor-dam
      7  *
      8  * This program is free software: you can redistribute it and/or modify
      9  * it under the terms of the GNU Affero General Public License as published by
     10  * the Free Software Foundation, either version 3 of the License, or
     11  * (at your option) any later version.
     12  *
     13  * This program is distributed in the hope that it will be useful,
     14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16  * GNU Affero General Public License for more details.
     17  *
     18  * You should have received a copy of the GNU Affero General Public License
     19  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     20  */
     21 
     22 // Message represents the message struct type
     23 type Message struct {
     24 	Secret string `json:"secret"`
     25 }
     26 
     27 // Node represents the node struct type
     28 type Node struct {
     29 	Address   string `json:"address"`
     30 	Message   string `json:"message"`
     31 	Signature string `json:"signature"`
     32 	Secret    string `json:"secret"`
     33 	Pubkey    string `json:"pubkey"`
     34 	Firstseen int64  `json:"firstseen"`
     35 	Lastseen  int64  `json:"lastseen"`
     36 	Trusted   int    `json:"trusted"`
     37 }