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 ErrRecaptcha = fmt.Errorf("recaptcha error")
ErrRecaptcha is returned when captcha isn't passed.
View Source
var ErrReferralCodeNotFound = fmt.Errorf("referral code not found")
ErrReferralCodeNotFound ...
View Source
var ErrReferralTrackingInvalidStatus = fmt.Errorf("referral tracking has invalid status")
ErrReferralTrackingInvalidStatus ...
View Source
var ErrReferralTrackingNotFound = fmt.Errorf("referral tracking not found")
ErrReferralTrackingNotFound ...
View Source
var ErrRequestNotFound = fmt.Errorf("request not found")
ErrRequestNotFound 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, referralCode *string) error Confirm(ctx context.Context, owner, code string) error GetRegisterStats(ctx context.Context) ([]*storage.RegisterStats, int, error) GetOwnReferralCode(ctx context.Context, address string) (string, error) GetReferralConfig() referral.Config GetRegistrationReferralCode(ctx context.Context, address string) (string, error) TrackReferralBrowserInstallation(ctx context.Context, address string) error GetReferralTrackingStats(ctx context.Context, address string) ([]*storage.ReferralTrackingStats, error) RegisterTestnetAccount(ctx context.Context, address string) error CheckRecaptcha(ctx context.Context, action, recaptchaResponse string) error }
Service ...
Click to show internal directories.
Click to hide internal directories.