fixed error definition
This commit is contained in:
@@ -2,22 +2,17 @@ package storage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/tech/sendico/fx/storage/model"
|
||||
)
|
||||
|
||||
type storageError string
|
||||
|
||||
func (e storageError) Error() string {
|
||||
return string(e)
|
||||
}
|
||||
|
||||
var (
|
||||
ErrQuoteExpired = storageError("fx.storage: quote expired")
|
||||
ErrQuoteConsumed = storageError("fx.storage: quote consumed")
|
||||
ErrQuoteNotFirm = storageError("fx.storage: quote is not firm")
|
||||
ErrQuoteConsumptionRace = storageError("fx.storage: quote consumption collision")
|
||||
ErrQuoteExpired = errors.New("fx.storage: quote expired")
|
||||
ErrQuoteConsumed = errors.New("fx.storage: quote consumed")
|
||||
ErrQuoteNotFirm = errors.New("fx.storage: quote is not firm")
|
||||
ErrQuoteConsumptionRace = errors.New("fx.storage: quote consumption collision")
|
||||
)
|
||||
|
||||
type Repository interface {
|
||||
|
||||
Reference in New Issue
Block a user