Documentation
¶
Index ¶
- type CreateTransferRequest
- type FindParams
- type Service
- func (s *Service) Create(ctx context.Context, req CreateTransferRequest) (*models.Transfer, error)
- func (s *Service) ExistsByTxHashAndOwnerID(ctx context.Context, txHash string, ownerID uuid.UUID) (bool, error)
- func (s *Service) Find(ctx context.Context, params FindParams) ([]*models.Transfer, error)
- func (s *Service) FindAllNewTransfers(ctx context.Context) ([]*models.Transfer, error)
- func (s *Service) GetActiveTronTransfersBurn(ctx context.Context) (*repo_transfers.GetActiveTronTransfersBurnRow, error)
- func (s *Service) GetActiveTronTransfersResources(ctx context.Context) (*repo_transfers.GetActiveTronTransfersResourcesRow, error)
- func (s *Service) GetByID(ctx context.Context, transferID uuid.UUID) (*models.Transfer, error)
- func (s *Service) GetByRequestID(ctx context.Context, requestID string) (*models.Transfer, error)
- func (s *Service) GetByTxHashAndOwnerID(ctx context.Context, txHash string, ownerID uuid.UUID) (*models.Transfer, error)
- func (s *Service) GetStateData(ctx context.Context, transferID uuid.UUID) (map[string]any, error)
- func (s *Service) GetSystemTransactionsByTransfer(ctx context.Context, transferID uuid.UUID) ([]*models.TransferTransaction, error)
- func (s *Service) GetWorkflowSnapshot(ctx context.Context, transferID uuid.UUID) (*workflow.Snapshot, error)
- func (s *Service) SetStateData(ctx context.Context, transferID uuid.UUID, stateData map[string]any, ...) error
- func (s *Service) SetStatus(ctx context.Context, transferID uuid.UUID, status constants.TransferStatus, ...) error
- func (s *Service) SetTxHash(ctx context.Context, transferID uuid.UUID, txHash string, opts ...repos.Option) (*models.Transfer, error)
- func (s *Service) SetWorkflowSnapshot(ctx context.Context, transferID uuid.UUID, snapshot workflow.Snapshot, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTransferRequest ¶
type CreateTransferRequest struct {
OwnerID uuid.UUID `json:"owner_id"`
RequestID string `json:"request_id"`
Blockchain wconstants.BlockchainType `json:"blockchain"`
FromAddresses []string `json:"from_addresses"`
ToAddresses []string `json:"to_addresses"`
AssetIdentifier string `json:"asset_identifier"`
Kind *string `json:"kind"`
WholeAmount bool `json:"whole_amount"`
Amount decimal.NullDecimal `json:"amount"`
Fee decimal.NullDecimal `json:"fee"`
FeeMax decimal.NullDecimal `json:"fee_max"`
// contains filtered or unexported fields
}
type FindParams ¶
type FindParams = repo_transfers.FindParams
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ExistsByTxHashAndOwnerID ¶
func (s *Service) ExistsByTxHashAndOwnerID(ctx context.Context, txHash string, ownerID uuid.UUID) (bool, error)
ExistsByTxHashAndOwnerID checks if the transfer with the specified txHash and ownerID exists.
func (*Service) FindAllNewTransfers ¶
FindAllNewTransfers returns all new transfers.
func (*Service) GetActiveTronTransfersBurn ¶
func (s *Service) GetActiveTronTransfersBurn(ctx context.Context) (*repo_transfers.GetActiveTronTransfersBurnRow, error)
GetActiveTronTransfersBurn
func (*Service) GetActiveTronTransfersResources ¶
func (s *Service) GetActiveTronTransfersResources(ctx context.Context) (*repo_transfers.GetActiveTronTransfersResourcesRow, error)
GetActiveTronTransfersResources
func (*Service) GetByRequestID ¶
func (*Service) GetByTxHashAndOwnerID ¶
func (s *Service) GetByTxHashAndOwnerID(ctx context.Context, txHash string, ownerID uuid.UUID) (*models.Transfer, error)
GetByTxHashAndOwnerID returns the transfer by the txHash and ownerID.
func (*Service) GetStateData ¶
GetStateData returns the state data for the transfer.
func (*Service) GetSystemTransactionsByTransfer ¶
func (*Service) GetWorkflowSnapshot ¶
func (s *Service) GetWorkflowSnapshot(ctx context.Context, transferID uuid.UUID) (*workflow.Snapshot, error)
GetWorkflowSnapshot returns the workflow snapshot for the transfer.
func (*Service) SetStateData ¶
func (s *Service) SetStateData(ctx context.Context, transferID uuid.UUID, stateData map[string]any, opts ...repos.Option) error
SetStateData sets the state data for the transfer.
func (*Service) SetStatus ¶
func (s *Service) SetStatus(ctx context.Context, transferID uuid.UUID, status constants.TransferStatus, opts ...repos.Option) error
SetStatus sets the status for the transfer.
Click to show internal directories.
Click to hide internal directories.