Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entity ¶
func NewEntityHandler ¶
NewWebHandler creates a new Entity instance.
func (*Entity) ServeHTTP ¶
func (data *Entity) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface for Entity. This allows Entity to be directly used as an HTTP handler.
func (*Entity) WebHandler ¶
func (data *Entity) WebHandler(w http.ResponseWriter, r *http.Request)
type EntityDocument ¶
type EntityDocument struct { Title string H1 string H2 string Addrs []multiaddr.Multiaddr PeersWithSameRendez p2peer.IDSlice AllConnectedPeers p2peer.IDSlice }
func (*EntityDocument) String ¶
func (d *EntityDocument) String() string
type Node ¶
func NewNodeHandler ¶
NewWebHandler creates a new Node instance.
func (*Node) ServeHTTP ¶
func (data *Node) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface for Node. This allows Node to be directly used as an HTTP handler.
func (*Node) WebHandler ¶
func (data *Node) WebHandler(w http.ResponseWriter, r *http.Request)
type NodeDocument ¶
type NodeDocument struct { Title string H1 string H2 string Addrs []multiaddr.Multiaddr PeersWithSameRendez peer.IDSlice AllConnectedPeers peer.IDSlice Topics []string }
func (*NodeDocument) String ¶
func (d *NodeDocument) String() string
type Relay ¶
func NewRelayHandler ¶
NewWebHandler creates a new Relay instance.
func (*Relay) ServeHTTP ¶
func (data *Relay) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface for Relay. This allows Relay to be directly used as an HTTP handler.
func (*Relay) WebHandler ¶
func (data *Relay) WebHandler(w http.ResponseWriter, r *http.Request)
type RelayDocument ¶
type RelayDocument struct { Title string H1 string Addrs []multiaddr.Multiaddr ProtectedPeers p2peer.IDSlice UnprotectedPeers p2peer.IDSlice }
func (*RelayDocument) String ¶
func (d *RelayDocument) String() string
type WebHandler ¶
type WebHandler interface {
ServeHTTP(w http.ResponseWriter, r *http.Request)
}
WebHandler is an interface for handling web requests.
Click to show internal directories.
Click to hide internal directories.