Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package service contains business logic of application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  var ErrAlreadyConfirmed = fmt.Errorf("already confirmed")
    ErrAlreadyConfirmed is returned when request is already confirmed.
      View Source
      
  var ErrAlreadyExists = fmt.Errorf("email or address is already taken")
    ErrAlreadyExists is returned when request is already created for requested email or address.
      View Source
      
  var ErrNotFound = fmt.Errorf("not found")
    ErrNotFound is returned when request not found for owner/code pair.
      View Source
      
  var ErrTooManyAttempts = fmt.Errorf("too many attempts")
    ErrTooManyAttempts is returned when throttling interval didn't pass.
Functions ¶
This section is empty.
Types ¶
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, bt, bm blockchain.Blockchain, initialTestNetStakes, initialMainNetStakes int64, ) Service
New creates new instance of service.
 Click to show internal directories. 
   Click to hide internal directories.