network

package
v0.0.0-...-822dead Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2021 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Endpoints endpoints

Functions

func StringsToAddrs

func StringsToAddrs(addrStrings []string) (maddrs []multiaddr.Multiaddr, err error)

Types

type AddrList

type AddrList []multiaddr.Multiaddr

A new type we need for writing a custom flag parser

func (*AddrList) Set

func (al *AddrList) Set(value string) error

func (*AddrList) String

func (al *AddrList) String() string

type RestService

type RestService struct {
	// contains filtered or unexported fields
}

func NewRest

func NewRest(smith *node.BlockSmith) *RestService

func (RestService) DecodeReceivedJSON

func (rest RestService) DecodeReceivedJSON(w http.ResponseWriter, r *http.Request, dataObject interface{}) (ok bool)

func (RestService) FileHandler

func (rest RestService) FileHandler(w http.ResponseWriter, r *http.Request)

func (RestService) GetApprovedClaimRole

func (rest RestService) GetApprovedClaimRole(w http.ResponseWriter, _ *http.Request)

func (RestService) GetAvailables

func (rest RestService) GetAvailables(w http.ResponseWriter, r *http.Request)

func (RestService) GetBlock

func (rest RestService) GetBlock(w http.ResponseWriter, r *http.Request)

func (RestService) GetBlockchain

func (rest RestService) GetBlockchain(w http.ResponseWriter, _ *http.Request)

func (RestService) GetCCY

func (rest RestService) GetCCY(w http.ResponseWriter, _ *http.Request)

func (RestService) GetClaimRole

func (rest RestService) GetClaimRole(w http.ResponseWriter, _ *http.Request)

func (RestService) GetCratos

func (rest RestService) GetCratos(w http.ResponseWriter, _ *http.Request)

func (RestService) GetDemos

func (rest RestService) GetDemos(w http.ResponseWriter, _ *http.Request)

func (RestService) GetHeadCid

func (rest RestService) GetHeadCid(w http.ResponseWriter, _ *http.Request)

func (RestService) GetNetwork

func (rest RestService) GetNetwork(w http.ResponseWriter, _ *http.Request)

func (RestService) GetPools

func (rest RestService) GetPools(w http.ResponseWriter, r *http.Request)

func (RestService) GetRBAC

func (rest RestService) GetRBAC(w http.ResponseWriter, _ *http.Request)

func (RestService) HandleKeyGen

func (rest RestService) HandleKeyGen(w http.ResponseWriter, r *http.Request)

func (RestService) PostAmendment

func (rest RestService) PostAmendment(w http.ResponseWriter, r *http.Request)

func (RestService) PostApprovedClaim

func (rest RestService) PostApprovedClaim(w http.ResponseWriter, r *http.Request)

func (RestService) PostBlock

func (rest RestService) PostBlock(w http.ResponseWriter, r *http.Request)

func (RestService) PostClaimRole

func (rest RestService) PostClaimRole(w http.ResponseWriter, r *http.Request)

func (RestService) PostTX

func (rest RestService) PostTX(w http.ResponseWriter, r *http.Request)

func (RestService) PostVote

func (rest RestService) PostVote(w http.ResponseWriter, r *http.Request)

func (RestService) StartupRest

func (rest RestService) StartupRest(port int, pem string, crt string) (io.Closer, error)

func (RestService) StoreToIPFS

func (rest RestService) StoreToIPFS(w http.ResponseWriter, payload interface{}) (cid string, ok bool)

func (RestService) VerifyRuleDataType

func (rest RestService) VerifyRuleDataType(a model.Amendment) bool

check some of the data type

func (RestService) VerifySignable

func (rest RestService) VerifySignable(w http.ResponseWriter, signable model.Signable) (ok bool)

type ServerP2P

type ServerP2P struct {
	Sleep time.Duration

	BlockStreams map[string]*bufio.ReadWriter

	DocsStreams map[string]*bufio.ReadWriter
	// contains filtered or unexported fields
}

func NewP2P

func NewP2P(ctx context.Context, smith *node.BlockSmith, listenF int, seed int64, secio bool, bootstrap []multiaddr.Multiaddr) *ServerP2P

func (*ServerP2P) GetID

func (p2p *ServerP2P) GetID() string

func (*ServerP2P) RunMDNS

func (p2p *ServerP2P) RunMDNS(ctx context.Context, RendezVousPoint string)

func (*ServerP2P) Update

func (p2p *ServerP2P) Update(s string)

type TCPService

type TCPService struct {
	// contains filtered or unexported fields
}

func NewTCP

func NewTCP(smith *node.BlockSmith, port int) *TCPService

func (TCPService) StartupTCP

func (tcp TCPService) StartupTCP()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL