Documentation ¶
Index ¶
- Constants
- Variables
- func HandleACComMsg(msg []byte) (msgReply []byte, err error)
- func HandleCLMsg(msg []byte) (msgReply []byte, err error)
- func HandleCTMsg(msg []byte) (msgReply []byte, err error)
- func HandleKXMsg(msg []byte) (msgReply []byte, err error)
- func HandlePKMsg(msg []byte) (msgReply []byte, err error)
- func HandleQuitMsg(msg []byte) (msgReply []byte, err error)
- func HandleStdin() (err error)
- type ACClMessage
- type ACClReply
- type ACComHandler
- type ACComMessage
- type ACCtMessage
- type ACCtReply
- type ACKxMessage
- type ACKxReply
- type ACPkMessage
- type ACPkReply
Constants ¶
View Source
const ( IRCMSG_MAXSIZE = 512 IRCMSG_PREFIX = "PRIVMSG :" // that's what it should containt IRCMSG_CTPREFIX = "<ic>" IRCMSG_SUFFIX = "\r\n" IRCMSG_OVERHEAD = len(IRCMSG_PREFIX) + len(IRCMSG_CTPREFIX) + len(IRCMSG_SUFFIX) )
Variables ¶
View Source
var ( // Map of handler depending on the type of message ACComMessageHandlerMap = map[int]ACComHandler{ // contains filtered or unexported fields } )
Functions ¶
func HandleACComMsg ¶
func HandleCLMsg ¶
Handle Control MESSAGES..
func HandleCTMsg ¶
Handle Crypto MESSAGES..
func HandleKXMsg ¶
Handle KEY Exchange MESSAGES..
func HandlePKMsg ¶
Handle PUBLIC KEY MESSAGES..
func HandleQuitMsg ¶
HandleQuitMsg handles QUIT messages
func HandleStdin ¶
func HandleStdin() (err error)
Types ¶
type ACClMessage ¶
type ACClMessage struct { Type int `json:"type"` Channel string `json:"channel"` Server string `json:"server"` Blob string `json:"blob"` }
func (*ACClMessage) HandlerCLIAC ¶
func (cl *ACClMessage) HandlerCLIAC() (msgReply []byte, err error)
func (*ACClMessage) HandlerCLLOAD ¶
func (cl *ACClMessage) HandlerCLLOAD() (msgReply []byte, err error)
func (*ACClMessage) HandlerCLSAVE ¶
func (cl *ACClMessage) HandlerCLSAVE() (msgReply []byte, err error)
type ACComHandler ¶
ACComHandler defining a communication handler function prototype that are used for handling message types.
type ACComMessage ¶
ACComMessage is the struct type defining the enveloppe of a JSON message.. Type define the type of message. Payload the content of that message.
func (*ACComMessage) Validate ¶
func (ac *ACComMessage) Validate() (ACComHandler, error)
type ACCtMessage ¶
type ACCtMessage struct { Type int `json:"type"` Nick string `json:"nick"` Server string `json:"server"` Channel string `json:"channel"` Blob string `json:"blob"` Opt string `json:"opt"` }
func (*ACCtMessage) HandlerCTADD ¶
func (ct *ACCtMessage) HandlerCTADD() (msgReply []byte, err error)
func (*ACCtMessage) HandlerCTOPEN ¶
func (ct *ACCtMessage) HandlerCTOPEN() (msgReply []byte, err error)
func (*ACCtMessage) HandlerCTSEAL ¶
func (ct *ACCtMessage) HandlerCTSEAL() (msgReply []byte, err error)
type ACKxMessage ¶
type ACKxMessage struct { Type int `json:"type"` MyNick string `json:"me"` PeerNick string `json:"peer"` Server string `json:"server"` Channel string `json:"channel"` Blob string `json:"blob"` }
func (*ACKxMessage) HandlerKXPACK ¶
func (kx *ACKxMessage) HandlerKXPACK() (msgReply []byte, err error)
func (*ACKxMessage) HandlerKXUNPACK ¶
func (kx *ACKxMessage) HandlerKXUNPACK() (msgReply []byte, err error)
type ACPkMessage ¶
type ACPkMessage struct { Type int `json:"type"` Nick string `json:"nick"` Host string `json:"host"` Server string `json:"server"` Blob string `json:"blob"` // do we really need to []byte that... it's base64 string anyway.. }
func (*ACPkMessage) HandlerPKADD ¶
func (pk *ACPkMessage) HandlerPKADD() (msgReply []byte, err error)
HandlerPKADD is the final handler for PKADD control messages
func (*ACPkMessage) HandlerPKDEL ¶
func (pk *ACPkMessage) HandlerPKDEL() (msgReply []byte, err error)
func (*ACPkMessage) HandlerPKGEN ¶
func (pk *ACPkMessage) HandlerPKGEN() (msgReply []byte, err error)
func (*ACPkMessage) HandlerPKLIST ¶
func (pk *ACPkMessage) HandlerPKLIST() (msgReply []byte, err error)
Click to show internal directories.
Click to hide internal directories.