Documentation ¶
Index ¶
- Constants
- type NymError
- type NymMessage
- func NewNymReceived(message string, senderTag string) NymMessage
- func NewNymReply(senderTag string, message string) NymMessage
- func NewNymSend(message string, recipient string) NymMessage
- func NewNymSendAnonymous(message string, recipient string, nbReplySurbs uint) NymMessage
- func NewSelfAddressReply(address string) NymMessage
- func NewSelfAddressRequest() NymMessage
- type NymMessageCommon
- type NymReceived
- type NymReply
- type NymSelfAddressReply
- type NymSelfAddressRequest
- type NymSend
- type NymSendAnonymous
- type NymSocketManager
- type SocketListener
- type SocketManager
Constants ¶
View Source
const ComponentField = "component"
View Source
const NymErrorType = "error"
View Source
const NymReceivedType = "received"
View Source
const NymReplyType = "reply"
View Source
const NymSelfAddressReplyType = "selfAddress"
View Source
const NymSelfAddressType = "selfAddress"
View Source
const NymSendAnonymousType = "sendAnonymous"
View Source
const NymSendType = "send"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NymError ¶
type NymError struct { NymMessageCommon Message string `json:"message"` }
func (NymError) NewEmpty ¶
func (NymError) NewEmpty() NymMessage
type NymMessage ¶
type NymMessage interface { NewEmpty() NymMessage Name() string // Type of message String() string }
Message defines the type of message that can be exchanged
func NewNymReceived ¶ added in v0.0.2
func NewNymReceived(message string, senderTag string) NymMessage
func NewNymReply ¶
func NewNymReply(senderTag string, message string) NymMessage
func NewNymSend ¶ added in v0.0.2
func NewNymSend(message string, recipient string) NymMessage
func NewNymSendAnonymous ¶ added in v0.0.2
func NewNymSendAnonymous(message string, recipient string, nbReplySurbs uint) NymMessage
func NewSelfAddressReply ¶ added in v0.0.2
func NewSelfAddressReply(address string) NymMessage
func NewSelfAddressRequest ¶
func NewSelfAddressRequest() NymMessage
type NymMessageCommon ¶
type NymMessageCommon struct {
Type string `json:"type"`
}
type NymReceived ¶
type NymReceived struct { NymMessageCommon Message string `json:"message"` SenderTag string `json:"senderTag"` }
func (NymReceived) Name ¶
func (NymReceived) Name() string
func (NymReceived) NewEmpty ¶
func (NymReceived) NewEmpty() NymMessage
func (NymReceived) String ¶
func (n NymReceived) String() string
type NymReply ¶
type NymReply struct { NymMessageCommon Message string `json:"message"` SenderTag string `json:"senderTag"` }
func (NymReply) NewEmpty ¶
func (n NymReply) NewEmpty() NymMessage
type NymSelfAddressReply ¶
type NymSelfAddressReply struct { NymMessageCommon Address string `json:"address"` }
func (NymSelfAddressReply) Name ¶
func (NymSelfAddressReply) Name() string
func (NymSelfAddressReply) NewEmpty ¶
func (s NymSelfAddressReply) NewEmpty() NymMessage
func (NymSelfAddressReply) String ¶
func (n NymSelfAddressReply) String() string
type NymSelfAddressRequest ¶
type NymSelfAddressRequest struct {
NymMessageCommon
}
func (NymSelfAddressRequest) Name ¶
func (NymSelfAddressRequest) Name() string
func (NymSelfAddressRequest) NewEmpty ¶
func (NymSelfAddressRequest) NewEmpty() NymMessage
func (NymSelfAddressRequest) String ¶
func (NymSelfAddressRequest) String() string
type NymSend ¶ added in v0.0.2
type NymSend struct { NymMessageCommon Message string `json:"message"` Recipient string `json:"recipient"` }
func (NymSend) NewEmpty ¶ added in v0.0.2
func (NymSend) NewEmpty() NymMessage
type NymSendAnonymous ¶ added in v0.0.2
type NymSendAnonymous struct { NymMessageCommon Message string `json:"message"` Recipient string `json:"recipient"` ReplySurbs uint `json:"replySurbs"` }
func (NymSendAnonymous) Name ¶ added in v0.0.2
func (NymSendAnonymous) Name() string
func (NymSendAnonymous) NewEmpty ¶ added in v0.0.2
func (NymSendAnonymous) NewEmpty() NymMessage
func (NymSendAnonymous) String ¶ added in v0.0.2
func (n NymSendAnonymous) String() string
type NymSocketManager ¶
func NewNymSocketManager ¶
func NewNymSocketManager(connectionURI string, messageHandler func(NymReceived, func(NymMessage) error), parentLogger *zerolog.Logger) (*NymSocketManager, error)
func (*NymSocketManager) GetConnectedGateway ¶ added in v0.0.2
func (n *NymSocketManager) GetConnectedGateway() string
func (*NymSocketManager) GetNymClientId ¶
func (n *NymSocketManager) GetNymClientId() string
func (*NymSocketManager) IsRunning ¶
func (n *NymSocketManager) IsRunning() bool
func (*NymSocketManager) Send ¶
func (n *NymSocketManager) Send(msg NymMessage) error
Send a message to the underlying connection
func (*NymSocketManager) Start ¶
func (n *NymSocketManager) Start() (chan struct{}, error)
func (*NymSocketManager) Stop ¶
func (n *NymSocketManager) Stop()
type SocketListener ¶
type SocketListener struct {
// contains filtered or unexported fields
}
func NewSocketListener ¶
func (*SocketListener) Listen ¶
func (s *SocketListener) Listen()
type SocketManager ¶
func NewSocketManager ¶
func (*SocketManager) IsRunning ¶
func (s *SocketManager) IsRunning() bool
func (*SocketManager) Send ¶
func (s *SocketManager) Send(message []byte) error
func (*SocketManager) Start ¶
func (s *SocketManager) Start() (chan struct{}, error)
func (*SocketManager) Stop ¶
func (s *SocketManager) Stop()
Click to show internal directories.
Click to hide internal directories.