Documentation ¶
Index ¶
- Constants
- func GetCTXNetwork(ctx *gin.Context) *network
- func Network() networkModel
- func NewNetwork(id string) (*network, error)
- func NewPeer(id string) *peer
- func Peer() peerModel
- func SetCTXNetwork(ctx *gin.Context, net *network)
- type NegotiationMessage
- type NetworkT
- type PeerT
- type Peers
- type Protocol
Constants ¶
View Source
const (
ProtocolUDP = Protocol("udp")
)
Variables ¶
This section is empty.
Functions ¶
func GetCTXNetwork ¶
func NewNetwork ¶
func SetCTXNetwork ¶
Types ¶
type NegotiationMessage ¶
type NegotiationMessage struct { NetworkID string `json:"network_id,omitempty"` PeerIDFrom string `json:"peer_id_from,omitempty"` PeerIDTo string `json:"peer_id_to,omitempty"` Protocol Protocol `json:"protocol"` SourcePort uint16 `json:"source_port"` LocalAddress net.IP `json:"local_address"` RequireReverseDirection bool `json:"require_reverse_direction"` CreatedAt time.Time `json:"created_at,omitempty"` }
func NewNegotiationMessage ¶
func NewNegotiationMessage() *NegotiationMessage
func (*NegotiationMessage) GetID ¶
func (msg *NegotiationMessage) GetID() string
func (*NegotiationMessage) IGetID ¶
func (msg *NegotiationMessage) IGetID() interface{}
Click to show internal directories.
Click to hide internal directories.