Documentation ¶
Index ¶
- Constants
- Variables
- type Address
- type BlockchainService
- type CreateMerchantAddressParams
- type Merchant
- type Property
- type Service
- func (s *Service) Create(ctx context.Context, creatorID int64, name, website string, settings Settings) (*Merchant, error)
- func (s *Service) CreateMerchantAddress(ctx context.Context, merchantID int64, params CreateMerchantAddressParams) (*Address, error)
- func (s *Service) DeleteByUUID(ctx context.Context, merchantUUID uuid.UUID) error
- func (s *Service) DeleteMerchantAddress(ctx context.Context, merchantID int64, id uuid.UUID) error
- func (s *Service) GetByID(ctx context.Context, id int64, withTrashed bool) (*Merchant, error)
- func (s *Service) GetByUUIDAndCreatorID(ctx context.Context, merchantUUID uuid.UUID, creatorID int64, withTrashed bool) (*Merchant, error)
- func (s *Service) GetMerchantAddressByID(ctx context.Context, merchantID, id int64) (*Address, error)
- func (s *Service) GetMerchantAddressByUUID(ctx context.Context, merchantID int64, id uuid.UUID) (*Address, error)
- func (s *Service) ListByCreatorID(ctx context.Context, creatorID int64) ([]*Merchant, error)
- func (s *Service) ListMerchantAddresses(ctx context.Context, merchantID int64) ([]*Address, error)
- func (s *Service) ListSupportedCurrencies(_ context.Context, merchant *Merchant) ([]SupportedCurrency, error)
- func (s *Service) Update(ctx context.Context, id int64, name, website string) (*Merchant, error)
- func (s *Service) UpdateMerchantAddress(ctx context.Context, merchantID int64, id uuid.UUID, name string) (*Address, error)
- func (s *Service) UpdateSupportedMethods(ctx context.Context, merchant *Merchant, tickers []string) error
- func (s *Service) UpsertSettings(ctx context.Context, merchant *Merchant, settings Settings) error
- type Settings
- type SupportedCurrency
Constants ¶
View Source
const ( PropertyWebhookURL = "webhook.url" PropertySignatureSecret = "webhook.secret" PropertyPaymentMethods = "payment.methods" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BlockchainService ¶
type BlockchainService interface { blockchain.Resolver blockchain.Convertor }
type CreateMerchantAddressParams ¶
type CreateMerchantAddressParams struct { Name string Blockchain wallet.Blockchain Address string }
type Merchant ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New( repo *repository.Queries, blockchainService BlockchainService, logger *zerolog.Logger, ) *Service
func (*Service) CreateMerchantAddress ¶
func (*Service) DeleteByUUID ¶
func (*Service) DeleteMerchantAddress ¶
func (*Service) GetByUUIDAndCreatorID ¶
func (*Service) GetMerchantAddressByID ¶
func (*Service) GetMerchantAddressByUUID ¶
func (s *Service) GetMerchantAddressByUUID(ctx context.Context, merchantID int64, id uuid.UUID) (*Address, error)
GetMerchantAddressByUUID returns saved merchant address for withdrawals.
func (*Service) ListByCreatorID ¶
func (*Service) ListMerchantAddresses ¶
func (*Service) ListSupportedCurrencies ¶
func (*Service) UpdateMerchantAddress ¶
func (*Service) UpdateSupportedMethods ¶
type Settings ¶
func (Settings) PaymentMethods ¶
func (Settings) WebhookSignatureSecret ¶
func (Settings) WebhookURL ¶
type SupportedCurrency ¶
type SupportedCurrency struct { Currency money.CryptoCurrency Enabled bool }
Click to show internal directories.
Click to hide internal directories.