Documentation ¶
Index ¶
- type Repository
- func (r *Repository) Create(ct *payload.Transfer) (*entity.Transfer, error)
- func (r *Repository) GetByTransactionId(txId string) (*entity.Transfer, error)
- func (r *Repository) GetWithFee(txId string) (*entity.Transfer, error)
- func (r *Repository) GetWithPreloads(txId string) (*entity.Transfer, error)
- func (r *Repository) Paged(req *transfer.PagedRequest) ([]*entity.Transfer, int64, error)
- func (r *Repository) Save(tx *entity.Transfer) error
- func (r *Repository) UpdateFee(txId string, fee string) error
- func (r *Repository) UpdateStatusCompleted(txId string) error
- func (r *Repository) UpdateStatusFailed(txId string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(dbClient *gorm.DB) *Repository
func (*Repository) GetByTransactionId ¶
func (r *Repository) GetByTransactionId(txId string) (*entity.Transfer, error)
Returns Transfer. Returns nil if not found
func (*Repository) GetWithFee ¶ added in v1.4.0
func (r *Repository) GetWithFee(txId string) (*entity.Transfer, error)
Returns Transfer with preloaded Fee table. Returns nil if not found
func (*Repository) GetWithPreloads ¶ added in v1.4.0
func (r *Repository) GetWithPreloads(txId string) (*entity.Transfer, error)
func (*Repository) Paged ¶ added in v1.4.0
func (r *Repository) Paged(req *transfer.PagedRequest) ([]*entity.Transfer, int64, error)
func (*Repository) Save ¶
func (r *Repository) Save(tx *entity.Transfer) error
Save updates the provided Transfer instance
func (*Repository) UpdateFee ¶ added in v1.4.0
func (r *Repository) UpdateFee(txId string, fee string) error
func (*Repository) UpdateStatusCompleted ¶
func (r *Repository) UpdateStatusCompleted(txId string) error
func (*Repository) UpdateStatusFailed ¶ added in v1.4.0
func (r *Repository) UpdateStatusFailed(txId string) error
Click to show internal directories.
Click to hide internal directories.