Documentation ¶
Overview ¶
Package service is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyConfirmed = fmt.Errorf("already confirmed")
ErrAlreadyConfirmed is returned when request is already confirmed.
var ErrAlreadyExists = fmt.Errorf("email or address is already taken")
ErrAlreadyExists is returned when request is already created for requested email or address.
var ErrNotFound = fmt.Errorf("not found")
ErrNotFound is returned when request not found for owner/code pair.
var ErrTooManyAttempts = fmt.Errorf("too many attempts")
ErrTooManyAttempts is returned when throttling interval didn't pass.
Functions ¶
This section is empty.
Types ¶
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance
func (*MockService) Confirm ¶
func (m *MockService) Confirm(ctx context.Context, owner, code string) error
Confirm mocks base method
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService
func (*MockServiceMockRecorder) Confirm ¶
func (mr *MockServiceMockRecorder) Confirm(ctx, owner, code interface{}) *gomock.Call
Confirm indicates an expected call of Confirm
func (*MockServiceMockRecorder) Register ¶
func (mr *MockServiceMockRecorder) Register(ctx, email, address interface{}) *gomock.Call
Register indicates an expected call of Register
type Service ¶
type Service interface { Register(ctx context.Context, email, address string) error Confirm(ctx context.Context, owner, code string) error }
Service ...
func New ¶
func New(storage storage.Storage, sender mail.Sender, b blockchain.Blockchain, initialStakes int64) Service
New creates new instance of service.