Documentation ¶
Index ¶
Constants ¶
View Source
const ( BMailModeUnknown = iota BMailModeP2P BMailModeP2S RcpTypeTo = iota RcpTypeCC RcpTypeBcc RcpMonitor )
View Source
const BMailSNSize = 16
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BMailConn ¶
func (*BMailConn) ReadWithHeader ¶
func (bc *BMailConn) ReadWithHeader(v EnvelopeMsg) error
func (*BMailConn) SendWithHeader ¶
func (bc *BMailConn) SendWithHeader(v EnvelopeMsg) error
type BMailEnvelope ¶
type BMailEnvelope struct { Eid string `json:"eid"` FromName string `json:"fromName"` FromAddr bmail.Address `json:"fromAddr"` RCPTs []*Recipient `json:"rcpts"` DateSince1970 uint64 `json:"timeSince1970"` Subject string `json:"subject"` MailBody string `json:"mailBody"` SessionID string `json:"sessionID"` }
func (*BMailEnvelope) Hash ¶
func (re *BMailEnvelope) Hash() []byte
func (*BMailEnvelope) ToString ¶
func (re *BMailEnvelope) ToString() string
type BMailSN ¶
type BMailSN [BMailSNSize]byte
type EnvelopeAck ¶
type EnvelopeAck struct { NextSN BMailSN `json:"nextSN"` Hash []byte `json:"hash"` Sig []byte `json:"sig"` ErrorCode int `json:"errorCode"` }
func (*EnvelopeAck) GetBytes ¶
func (ha *EnvelopeAck) GetBytes() ([]byte, error)
func (*EnvelopeAck) MsgType ¶
func (ea *EnvelopeAck) MsgType() uint16
func (*EnvelopeAck) VerifyHeader ¶
func (ea *EnvelopeAck) VerifyHeader(header *Header) bool
type EnvelopeMsg ¶
type EnvelopeSyn ¶
type EnvelopeSyn struct { SN BMailSN `json:"sn"` Sig []byte `json:"sig"` Hash []byte `json:"hash"` Env *BMailEnvelope `json:"env"` }
func (*EnvelopeSyn) GetBytes ¶
func (ha *EnvelopeSyn) GetBytes() ([]byte, error)
func (*EnvelopeSyn) MsgType ¶
func (es *EnvelopeSyn) MsgType() uint16
func (*EnvelopeSyn) VerifyHeader ¶
func (es *EnvelopeSyn) VerifyHeader(header *Header) bool
type HELOACK ¶
type HELOACK struct { SN BMailSN `json:"sn"` SrvBca bmail.Address `json:"srv"` ErrCode int `json:"errCode"` SupportVersion []uint16 `json:"support_version"` }
func (*HELOACK) VerifyHeader ¶
Click to show internal directories.
Click to hide internal directories.