Documentation ¶
Overview ¶
Package mailservice is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidMailServerPeer is returned when it fails to parse enode from params. ErrInvalidMailServerPeer = errors.New("invalid mailServerPeer value") // ErrInvalidSymKeyID is returned when it fails to get a symmetric key. ErrInvalidSymKeyID = errors.New("invalid symKeyID value") )
Functions ¶
This section is empty.
Types ¶
type MailService ¶
type MailService struct {
// contains filtered or unexported fields
}
MailService is a service that provides some additional Whisper API.
func (*MailService) Protocols ¶
func (s *MailService) Protocols() []p2p.Protocol
Protocols returns a new protocols list. In this case, there are none.
func (*MailService) Start ¶
func (s *MailService) Start(server *p2p.Server) error
Start is run when a service is started. It does nothing in this case but is required by `node.Service` interface.
func (*MailService) Stop ¶
func (s *MailService) Stop() error
Stop is run when a service is stopped. It does nothing in this case but is required by `node.Service` interface.
type MessagesRequest ¶
type MessagesRequest struct { // MailServerPeer is MailServer's enode address. MailServerPeer string `json:"mailServerPeer"` // From is a lower bound of time range (optional). // Default is 24 hours back from now. From uint32 `json:"from"` // To is a upper bound of time range (optional). // Default is now. To uint32 `json:"to"` // Topic is a regular Whisper topic. Topic whisper.TopicType `json:"topic"` // SymKeyID is an ID of a symmetric key to authenticate to MailServer. // It's derived from MailServer password. SymKeyID string `json:"symKeyID"` }
MessagesRequest is a payload send to a MailServer to get messages.
type MockServiceProvider ¶
type MockServiceProvider struct {
// contains filtered or unexported fields
}
MockServiceProvider is a mock of ServiceProvider interface
func NewMockServiceProvider ¶
func NewMockServiceProvider(ctrl *gomock.Controller) *MockServiceProvider
NewMockServiceProvider creates a new mock instance
func (*MockServiceProvider) EXPECT ¶
func (m *MockServiceProvider) EXPECT() *MockServiceProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockServiceProvider) Node ¶
func (m *MockServiceProvider) Node() (*node.Node, error)
Node mocks base method
func (*MockServiceProvider) WhisperService ¶
func (m *MockServiceProvider) WhisperService() (*whisperv6.Whisper, error)
WhisperService mocks base method
type MockServiceProviderMockRecorder ¶
type MockServiceProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceProviderMockRecorder is the mock recorder for MockServiceProvider
func (*MockServiceProviderMockRecorder) Node ¶
func (mr *MockServiceProviderMockRecorder) Node() *gomock.Call
Node indicates an expected call of Node
func (*MockServiceProviderMockRecorder) WhisperService ¶
func (mr *MockServiceProviderMockRecorder) WhisperService() *gomock.Call
WhisperService indicates an expected call of WhisperService
type PublicAPI ¶
type PublicAPI struct {
// contains filtered or unexported fields
}
PublicAPI defines a MailServer public API.
func NewPublicAPI ¶
func NewPublicAPI(provider ServiceProvider) *PublicAPI
NewPublicAPI returns a new PublicAPI.
func (*PublicAPI) RequestMessages ¶
RequestMessages sends a request for historic messages to a MailServer.