Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultMailCount int = 20 DirectionToLeft bool = true DirectionToRight bool = false )
View Source
const ( MailDeleteSuccess int = iota MailNotFound MailDeleteFailed )
Result
View Source
const ( EC_Success int = iota EC_No_Mail )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdDelete ¶
type CmdDeleteAck ¶
type CmdDeleteAck struct {
Result []CmdResult `json:"result"`
}
func (*CmdDeleteAck) GetBytes ¶
func (cda *CmdDeleteAck) GetBytes() ([]byte, error)
func (*CmdDeleteAck) Hash ¶
func (cda *CmdDeleteAck) Hash() []byte
func (*CmdDeleteAck) MsgType ¶
func (cda *CmdDeleteAck) MsgType() uint16
type CmdDownload ¶
type CmdDownload struct { MailAddr string `json:"mail_addr"` Owner bmail.Address `json:"owner"` MailCnt int `json:"mail_cnt"` Direction bool `json:"direction"` //false -> after TimePivot, true -> before TimePivot TimePivot int64 `json:"time_pivot"` }
func (*CmdDownload) Hash ¶
func (cd *CmdDownload) Hash() []byte
func (*CmdDownload) MsgType ¶
func (cd *CmdDownload) MsgType() uint16
type CmdDownloadAck ¶
type CmdDownloadAck struct {
CryptEps []*bmp.BMailEnvelope
}
func (*CmdDownloadAck) GetBytes ¶
func (cda *CmdDownloadAck) GetBytes() ([]byte, error)
func (*CmdDownloadAck) Hash ¶
func (cda *CmdDownloadAck) Hash() []byte
func (*CmdDownloadAck) MsgType ¶
func (cda *CmdDownloadAck) MsgType() uint16
type CmdState ¶
type CmdStateAck ¶
type CmdStateAck struct { SendMail State `json:"send_mail_space"` ReceiptMail State `json:"receipt_mail"` }
func (*CmdStateAck) GetBytes ¶
func (csa *CmdStateAck) GetBytes() ([]byte, error)
func (*CmdStateAck) Hash ¶
func (csa *CmdStateAck) Hash() []byte
func (*CmdStateAck) MsgType ¶
func (csa *CmdStateAck) MsgType() uint16
type CommandAck ¶
type CommandAck struct { NextSN bmp.BMailSN `json:"next_sn"` Hash []byte `json:"hash"` Sig []byte `json:"sig"` ErrorCode int `json:"error_code"` CmdCxt CommandContent `json:"cmd"` }
func (*CommandAck) GetBytes ¶
func (cs *CommandAck) GetBytes() ([]byte, error)
func (*CommandAck) MsgType ¶
func (cs *CommandAck) MsgType() uint16
func (*CommandAck) VerifyHeader ¶
func (cs *CommandAck) VerifyHeader(header *bmp.Header) bool
type CommandContent ¶
type CommandSyn ¶
type CommandSyn struct { SN bmp.BMailSN `json:"sn"` Sig []byte `json:"sig"` Cmd Command `json:"cmd"` }
func (*CommandSyn) GetBytes ¶
func (cs *CommandSyn) GetBytes() ([]byte, error)
func (*CommandSyn) MsgType ¶
func (cs *CommandSyn) MsgType() uint16
func (*CommandSyn) VerifyHeader ¶
func (cs *CommandSyn) VerifyHeader(header *bmp.Header) bool
Click to show internal directories.
Click to hide internal directories.