protocol

package
v0.0.0-...-64eff32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2020 License: GPL-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RecoverFromFile

func RecoverFromFile(eid uuid.UUID) (cep *bmp.BMailEnvelope, err error)

Types

type CommandDeleteMsg

type CommandDeleteMsg struct {
	Sn        []byte
	CmdSyn    *bpop.CommandSyn
	CmdDelete *bpop.CmdDelete

	CmdDelAck *bpop.CmdDeleteAck
	CmdAck    *bpop.CommandAck
}

func (*CommandDeleteMsg) Dispatch

func (cdm *CommandDeleteMsg) Dispatch() error

func (*CommandDeleteMsg) Response

func (cdm *CommandDeleteMsg) Response() (WBody, error)

func (*CommandDeleteMsg) SetCurrentSn

func (cdm *CommandDeleteMsg) SetCurrentSn(sn []byte)

func (*CommandDeleteMsg) UnPack

func (cdm *CommandDeleteMsg) UnPack(data []byte) error

func (*CommandDeleteMsg) Verify

func (cdm *CommandDeleteMsg) Verify() bool

type CommandDownloadMsg

type CommandDownloadMsg struct {
	Sn          []byte
	CmdSyn      *bpop.CommandSyn
	CmdDownload *bpop.CmdDownload

	CmdDownAck *bpop.CmdDownloadAck
	CmdAck     *bpop.CommandAck
}

func (*CommandDownloadMsg) Dispatch

func (cdm *CommandDownloadMsg) Dispatch() error

func (*CommandDownloadMsg) Response

func (cdm *CommandDownloadMsg) Response() (WBody, error)

func (*CommandDownloadMsg) SetCurrentSn

func (cdm *CommandDownloadMsg) SetCurrentSn(sn []byte)

func (*CommandDownloadMsg) UnPack

func (cdm *CommandDownloadMsg) UnPack(data []byte) error

func (*CommandDownloadMsg) Verify

func (cdm *CommandDownloadMsg) Verify() bool

type CryptEnvelopeMsg

type CryptEnvelopeMsg struct {
	Sn      []byte
	EpSyn   *bmp.EnvelopeSyn
	CryptEp *bmp.BMailEnvelope
	//RawEp *bmp.RawEnvelope
	EpAck *bmp.EnvelopeAck
}

func (*CryptEnvelopeMsg) Dispatch

func (cem *CryptEnvelopeMsg) Dispatch() error

func (*CryptEnvelopeMsg) Response

func (cem *CryptEnvelopeMsg) Response() (WBody, error)

func (*CryptEnvelopeMsg) SetCurrentSn

func (cem *CryptEnvelopeMsg) SetCurrentSn(sn []byte)

func (*CryptEnvelopeMsg) UnPack

func (cem *CryptEnvelopeMsg) UnPack(data []byte) error

func (*CryptEnvelopeMsg) Verify

func (cem *CryptEnvelopeMsg) Verify() bool

type RBody

type RBody interface {
	UnPack(data []byte) error
	Verify() bool
	SetCurrentSn(sn []byte)
	Dispatch() error
	Response() (WBody, error)
}

type WBody

type WBody interface {
	MsgType() uint16
	GetBytes() ([]byte, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL