Linting #509

Merged
tech merged 46 commits from main into dis-474 2026-02-13 16:14:15 +00:00
Showing only changes of commit 5dd1b5f4d7 - Show all commits

View File

@@ -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 (