Linting #509
@@ -2,6 +2,7 @@ package storage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/tech/sendico/payments/storage/model"
|
||||
quotestorage "github.com/tech/sendico/payments/storage/quote"
|
||||
@@ -9,25 +10,19 @@ import (
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
)
|
||||
|
||||
type storageError string
|
||||
|
||||
func (e storageError) Error() string {
|
||||
return string(e)
|
||||
}
|
||||
|
||||
var (
|
||||
// ErrPaymentNotFound signals that a payment record does not exist.
|
||||
ErrPaymentNotFound = storageError("payments.storage: payment not found")
|
||||
ErrPaymentNotFound = errors.New("payments.storage: payment not found")
|
||||
// ErrDuplicatePayment signals that idempotency constraints were violated.
|
||||
ErrDuplicatePayment = storageError("payments.storage: duplicate payment")
|
||||
ErrDuplicatePayment = errors.New("payments.storage: duplicate payment")
|
||||
// ErrRouteNotFound signals that a payment route record does not exist.
|
||||
ErrRouteNotFound = storageError("payments.storage: route not found")
|
||||
ErrRouteNotFound = errors.New("payments.storage: route not found")
|
||||
// ErrDuplicateRoute signals that a route already exists for the same transition.
|
||||
ErrDuplicateRoute = storageError("payments.storage: duplicate route")
|
||||
ErrDuplicateRoute = errors.New("payments.storage: duplicate route")
|
||||
// ErrPlanTemplateNotFound signals that a plan template record does not exist.
|
||||
ErrPlanTemplateNotFound = storageError("payments.storage: plan template not found")
|
||||
ErrPlanTemplateNotFound = errors.New("payments.storage: plan template not found")
|
||||
// ErrDuplicatePlanTemplate signals that a plan template already exists for the same transition.
|
||||
ErrDuplicatePlanTemplate = storageError("payments.storage: duplicate plan template")
|
||||
ErrDuplicatePlanTemplate = errors.New("payments.storage: duplicate plan template")
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user