Documentation
¶
Index ¶
- type PaymailRepo
- type Service
- func (s *Service) Create(ctx context.Context, newPaymail *paymailsmodels.NewPaymail) (*paymailsmodels.Paymail, error)
- func (s *Service) Find(ctx context.Context, alias, domain string) (*paymailsmodels.Paymail, error)
- func (s *Service) GetDefaultPaymailAddress(ctx context.Context, xPubID string) (string, error)
- func (s *Service) HasPaymailAddress(ctx context.Context, userID string, address string) (bool, error)
- type UsersService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaymailRepo ¶
type PaymailRepo interface { Create(ctx context.Context, newPaymail *paymailsmodels.NewPaymail) (*paymailsmodels.Paymail, error) Find(ctx context.Context, alias, domain string) (*paymailsmodels.Paymail, error) // FindForUser returns a paymail by alias and domain for given user. FindForUser(ctx context.Context, alias, domain, userID string) (*paymailsmodels.Paymail, error) // GetDefault returns a default paymail for user. GetDefault(ctx context.Context, userID string) (*paymailsmodels.Paymail, error) }
PaymailRepo is a paymail repository
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service for paymails
func NewService ¶
func NewService(paymails PaymailRepo, users UsersService, cfg *config.AppConfig) *Service
NewService creates a new paymails service
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, newPaymail *paymailsmodels.NewPaymail) (*paymailsmodels.Paymail, error)
Create creates a new paymail attached to a user
func (*Service) GetDefaultPaymailAddress ¶
GetDefaultPaymailAddress returns the default paymail address for the given xPubId.
Click to show internal directories.
Click to hide internal directories.