all: fix error naming

errs.Class should not contain "error" in the name, since that causes a
lot of stutter in the error logs. As an example a log line could end up
looking like:

    ERROR node stats service error: satellitedbs error: node stats database error: no rows

Whereas something like:

    ERROR nodestats service: satellitedbs: nodestatsdb: no rows

Would contain all the necessary information without the stutter.

Change-Id: I7b7cb7e592ebab4bcfadc1eef11122584d2b20e0
This commit is contained in:
Egon Elbre 2021-04-28 11:06:17 +03:00
parent 30d2a2ea7b
commit 961e841bd7
89 changed files with 112 additions and 112 deletions

View File

@ -38,9 +38,9 @@ const (
var (
mon = monkit.Package()
// Error is used when an error occurs involving an authorization.
Error = errs.Class("authorization error")
Error = errs.Class("authorization")
// ErrInvalidToken is used when a token is invalid.
ErrInvalidToken = errs.Class("authorization token error")
ErrInvalidToken = errs.Class("authorization token")
)
// Group is a slice of authorizations for convenient de/serialization.

View File

@ -20,19 +20,19 @@ import (
var (
// ErrDB is used when an error occurs involving the authorization database.
ErrDB = errs.Class("authorization db error")
ErrDB = errs.Class("authorizationdb")
// ErrEmptyUserID is used when a user ID is required but not provided.
ErrEmptyUserID = ErrDB.New("userID cannot be empty")
// ErrCount is used when attempting to create an invalid number of authorizations.
ErrCount = ErrDB.New("cannot add less than one authorization")
// ErrInvalidClaim is used when a claim is invalid due to some user input.
ErrInvalidClaim = errs.Class("authorization claim error")
ErrInvalidClaim = errs.Class("invalid authorization claim")
// ErrAlreadyClaimed is used when a valid claim is attempted with a token that's been used already.
ErrAlreadyClaimed = errs.Class("authorization already claimed")
// ErrNotFound is used when there is no matching authorization in the DB for a given userID and token.
ErrNotFound = errs.Class("authorization not found")
// ErrDBInternal is used when an internal error occurs involving the authorization database.
ErrDBInternal = errs.Class("internal authorization db error")
ErrDBInternal = errs.Class("internal authorization db")
)
// DB stores authorizations which may be claimed in exchange for a

View File

@ -19,7 +19,7 @@ import (
)
// ErrEndpoint is the default error class for the authorization endpoint.
var ErrEndpoint = errs.Class("authorization endpoint error")
var ErrEndpoint = errs.Class("authorization endpoint")
// Endpoint provides a http endpoint for interacting with an authorization service.
type Endpoint struct {

View File

@ -12,7 +12,7 @@ import (
)
// ErrService is the default error class for the authorization service.
var ErrService = errs.Class("authorization service error")
var ErrService = errs.Class("authorization service")
// Service is the authorization service.
type Service struct {

View File

@ -25,7 +25,7 @@ var (
mon = monkit.Package()
// Error is the default error class for the certificates peer.
Error = errs.Class("certificates peer error")
Error = errs.Class("certificate")
)
// Config is the global certificates config.

View File

@ -21,7 +21,7 @@ type verifyConfig struct {
}
var (
errVerify = errs.Class("Verify error")
errVerify = errs.Class("verify")
verifyCmd = &cobra.Command{
Use: "verify",
Short: "Verify identity and CA certificate chains are valid",

View File

@ -16,7 +16,7 @@ import (
var (
// ErrSetup is used when an error occurs while setting up.
ErrSetup = errs.Class("setup error")
ErrSetup = errs.Class("setup")
idCmd = &cobra.Command{
Use: "id",

View File

@ -38,16 +38,16 @@ var (
CSVPath string
// ErrInspectorDial throws when there are errors dialing the inspector server.
ErrInspectorDial = errs.Class("error dialing inspector server:")
ErrInspectorDial = errs.Class("dialing inspector server")
// ErrRequest is for request errors after dialing.
ErrRequest = errs.Class("error processing request:")
ErrRequest = errs.Class("processing request")
// ErrIdentity is for errors during identity creation for this CLI.
ErrIdentity = errs.Class("error creating identity:")
ErrIdentity = errs.Class("creating identity")
// ErrArgs throws when there are errors with CLI args.
ErrArgs = errs.Class("error with CLI args:")
ErrArgs = errs.Class("invalid CLI args")
irreparableLimit int32

View File

@ -18,7 +18,7 @@ import (
var (
// ErrNodes is an internal error type for nodes web api controller.
ErrNodes = errs.Class("nodes web api controller error")
ErrNodes = errs.Class("nodes web api controller")
)
// Nodes is a web api controller.

View File

@ -15,7 +15,7 @@ import (
var (
// ErrPayouts is an internal error type for payouts web api controller.
ErrPayouts = errs.Class("payouts web api controller error")
ErrPayouts = errs.Class("payouts web api controller")
)
// Payouts is a web api controller.

View File

@ -22,7 +22,7 @@ import (
var (
// Error is an error class for internal Multinode Dashboard http server error.
Error = errs.Class("multinode console server error")
Error = errs.Class("multinode console server")
)
// Config contains configuration for Multinode Dashboard http server.

View File

@ -26,7 +26,7 @@ var (
mon = monkit.Package()
// Error is the default multinodedb errs class.
Error = errs.Class("multinodedb internal error")
Error = errs.Class("multinodedb")
)
// multinodeDB combines access to different database tables with a record

View File

@ -14,7 +14,7 @@ var mon = monkit.Package()
func init() {
// catch dbx errors
class := errs.Class("multinodedb dbx error")
class := errs.Class("multinodedb dbx")
WrapErr = func(e *Error) error {
if e.Code == ErrorCode_NoRows {
return e.Err

View File

@ -16,7 +16,7 @@ import (
)
// MembersDBError indicates about internal MembersDB error.
var MembersDBError = errs.Class("MembersDB error")
var MembersDBError = errs.Class("MembersDB")
// ensures that members implements console.Members.
var _ console.Members = (*members)(nil)

View File

@ -16,7 +16,7 @@ import (
)
// ErrNodesDB indicates about internal NodesDB error.
var ErrNodesDB = errs.Class("NodesDB error")
var ErrNodesDB = errs.Class("NodesDB")
// ensures that nodesdb implements console.Nodes.
var _ nodes.DB = (*nodesdb)(nil)

View File

@ -20,7 +20,7 @@ var (
mon = monkit.Package()
// Error is an error class for nodes service error.
Error = errs.Class("nodes service error")
Error = errs.Class("nodes")
)
// Service exposes all nodes related logic.

View File

@ -19,7 +19,7 @@ import (
var (
mon = monkit.Package()
// Error is an error class for payouts service error.
Error = errs.Class("payouts service error")
Error = errs.Class("payouts")
)
// Service exposes all payouts related logic.

View File

@ -21,11 +21,11 @@ import (
var (
// ErrValidateVersionQuery is when there is an error querying version table.
ErrValidateVersionQuery = errs.Class("validate db version query error")
ErrValidateVersionQuery = errs.Class("validate db version query")
// ErrValidateVersionMismatch is when the migration version does not match the current database version.
ErrValidateVersionMismatch = errs.Class("validate db version mismatch error")
ErrValidateVersionMismatch = errs.Class("validate db version mismatch")
// ErrValidateMinVersion is when the migration version does not match the current database version.
ErrValidateMinVersion = errs.Class("validate minimum version error")
ErrValidateMinVersion = errs.Class("validate minimum version")
)
/*

View File

@ -17,7 +17,7 @@ var DefaultWalletFeaturesValidation = WalletFeaturesValidation{
}
// WalletFeatureValidationError wallet feature validation errors class.
var WalletFeatureValidationError = errs.Class("wallet feature validation error")
var WalletFeatureValidationError = errs.Class("wallet feature validation")
// WalletFeaturesValidation contains config for wallet feature validation.
type WalletFeaturesValidation struct {

View File

@ -38,7 +38,7 @@ type Part struct {
}
// Error is the default message errs class.
var Error = errs.Class("Email message error")
var Error = errs.Class("Email message")
// Bytes builds message and returns result as bytes.
func (msg *Message) Bytes() (data []byte, err error) {

View File

@ -12,5 +12,5 @@ var (
mon = monkit.Package()
// Error is a pkg/quic error.
Error = errs.Class("quic error")
Error = errs.Class("quic")
)

View File

@ -20,8 +20,8 @@ import (
var (
mon = monkit.Package()
// Error is a pkg/revocation error.
Error = errs.Class("revocation error")
// Error is a revocation error.
Error = errs.Class("revocation")
)
// DB stores the most recently seen revocation for each nodeID

View File

@ -12,5 +12,5 @@ var (
mon = monkit.Package()
// Error is a pkg/server error.
Error = errs.Class("server error")
Error = errs.Class("server")
)

View File

@ -22,8 +22,8 @@ import (
var (
mon = monkit.Package()
// Error is the error class for version control client errors.
Error = errs.Class("version control client error")
// Error is the error class for version checker client errors.
Error = errs.Class("version checker client")
)
// ClientConfig is the config struct for the version control client.

View File

@ -27,7 +27,7 @@ var (
ErrInvalidArgument = errs.Class("invalid argument")
// ErrSystemOrNetError is returned when the used storage backend returns an
// internal system or network error.
ErrSystemOrNetError = errs.Class("backend system error")
ErrSystemOrNetError = errs.Class("accounting backend")
// ErrKeyNotFound is returned when the key is not found in the cache.
ErrKeyNotFound = errs.Class("key not found")
// ErrUnexpectedValue is returned when an unexpected value according the

View File

@ -16,11 +16,11 @@ import (
var (
// ErrProjectLimitType error for project limit type.
ErrProjectLimitType = errs.Class("project limit type error")
ErrProjectLimitType = errs.Class("project limit type")
// ErrGetProjectLimit error for getting project limits from database.
ErrGetProjectLimit = errs.Class("get project limits error")
ErrGetProjectLimit = errs.Class("get project limits")
// ErrGetProjectLimitCache error for getting project limits from cache.
ErrGetProjectLimitCache = errs.Class("get project limits from cache error")
ErrGetProjectLimitCache = errs.Class("get project limits from cache")
)
// ProjectLimitDB stores information about projects limits for storage and bandwidth limits.

View File

@ -19,7 +19,7 @@ var mon = monkit.Package()
var (
// ErrProjectUsage general error for project usage.
ErrProjectUsage = errs.Class("project usage error")
ErrProjectUsage = errs.Class("project usage")
)
// Service is handling project usage related logic.

View File

@ -10,6 +10,6 @@ import (
// Error is a standard error class for this package.
var (
Error = errs.Class("rollup error")
Error = errs.Class("rollup")
mon = monkit.Package()
)

View File

@ -17,7 +17,7 @@ import (
// Error is a standard error class for this package.
var (
Error = errs.Class("rolluparchive error")
Error = errs.Class("rolluparchive")
mon = monkit.Package()
)

View File

@ -21,7 +21,7 @@ import (
// Error is a standard error class for this package.
var (
Error = errs.Class("tally error")
Error = errs.Class("tally")
mon = monkit.Package()
)

View File

@ -15,7 +15,7 @@ import (
var (
// ContainError is the containment errs class.
ContainError = errs.Class("containment error")
ContainError = errs.Class("containment")
// ErrContainedNotFound is the errs class for when a pending audit isn't found.
ErrContainedNotFound = errs.Class("pending audit not found")

View File

@ -16,7 +16,7 @@ import (
)
// Error is the default audit errs class.
var Error = errs.Class("audit error")
var Error = errs.Class("audit")
// Config contains configurable values for audit chore and workers.
type Config struct {

View File

@ -42,7 +42,7 @@ const authKey key = 0
const requestKey key = 1
// ErrUnauthorized is error class for authorization related errors.
var ErrUnauthorized = errs.Class("unauthorized error")
var ErrUnauthorized = errs.Class("unauthorized")
// Authorization contains auth info of authorized User.
type Authorization struct {

View File

@ -17,7 +17,7 @@ import (
var (
// ErrAnalyticsAPI - console analytics api error type.
ErrAnalyticsAPI = errs.Class("console analytics api error")
ErrAnalyticsAPI = errs.Class("consoleapi analytics")
)
// Analytics is an api controller that exposes analytics related functionality.

View File

@ -16,7 +16,7 @@ import (
var (
// ErrAPIKeysAPI - console api keys api error type.
ErrAPIKeysAPI = errs.Class("console api keys api error")
ErrAPIKeysAPI = errs.Class("consoleapi keys")
)
// APIKeys is an api controller that exposes all api keys related functionality.

View File

@ -24,7 +24,7 @@ import (
var (
// ErrAuthAPI - console auth api error type.
ErrAuthAPI = errs.Class("console auth api error")
ErrAuthAPI = errs.Class("consoleapi auth")
// errNotImplemented is the error value used by handlers of this package to
// response with status Not Implemented.

View File

@ -16,7 +16,7 @@ import (
var (
// ErrBucketsAPI - console buckets api error type.
ErrBucketsAPI = errs.Class("console buckets api error")
ErrBucketsAPI = errs.Class("consoleapi buckets")
)
// Buckets is an api controller that exposes all buckets related functionality.

View File

@ -21,7 +21,7 @@ import (
var (
// ErrPaymentsAPI - console payments api error type.
ErrPaymentsAPI = errs.Class("console payments api error")
ErrPaymentsAPI = errs.Class("consoleapi payments")
mon = monkit.Package()
)

View File

@ -54,7 +54,7 @@ const (
var (
// Error is satellite console error type.
Error = errs.Class("satellite console error")
Error = errs.Class("consoleweb")
mon = monkit.Package()
)

View File

@ -59,19 +59,19 @@ const (
var (
// Error describes internal console error.
Error = errs.Class("service error")
Error = errs.Class("console service")
// ErrNoMembership is error type of not belonging to a specific project.
ErrNoMembership = errs.Class("no membership error")
ErrNoMembership = errs.Class("no membership")
// ErrTokenExpiration is error type of token reached expiration time.
ErrTokenExpiration = errs.Class("token expiration error")
ErrTokenExpiration = errs.Class("token expiration")
// ErrProjLimit is error type of project limit.
ErrProjLimit = errs.Class("project limit error")
ErrProjLimit = errs.Class("project limit")
// ErrUsage is error type of project usage.
ErrUsage = errs.Class("project usage error")
ErrUsage = errs.Class("project usage")
// ErrEmailUsed is error type that occurs on repeating auth attempts with email.
ErrEmailUsed = errs.Class("email used")

View File

@ -131,7 +131,7 @@ func TestService(t *testing.T) {
// deleting a project with a bucket should fail
err = service.DeleteProject(authCtx2, up2Pro1.ID)
require.Error(t, err)
require.Equal(t, "service error: project usage error: some buckets still exist", err.Error())
require.Equal(t, "console service: project usage: some buckets still exist", err.Error())
})
t.Run("TestChangeEmail", func(t *testing.T) {

View File

@ -12,7 +12,7 @@ const (
)
// ErrValidation validation related error class.
var ErrValidation = errs.Class("validation error")
var ErrValidation = errs.Class("validation")
// validationError is slice of ErrValidation class errors.
type validationErrors []error

View File

@ -19,9 +19,9 @@ import (
)
var (
errPingBackDial = errs.Class("pingback dialing error")
errCheckInIdentity = errs.Class("check-in identity error")
errCheckInNetwork = errs.Class("check-in network error")
errPingBackDial = errs.Class("pingback dialing")
errCheckInIdentity = errs.Class("check-in identity")
errCheckInNetwork = errs.Class("check-in network")
)
// Endpoint implements the contact service Endpoints.

View File

@ -23,7 +23,7 @@ import (
var (
// Error defines the gc service errors class.
Error = errs.Class("gc service error")
Error = errs.Class("gc")
mon = monkit.Package()
)

View File

@ -23,7 +23,7 @@ import (
var (
mon = monkit.Package()
// Error wraps errors returned from Server struct methods.
Error = errs.Class("Endpoint error")
Error = errs.Class("inspector")
)
// Endpoint for checking object and segment health.

View File

@ -23,7 +23,7 @@ var (
mon = monkit.Package()
// Error is a standard error class for this component.
Error = errs.Class("metainfo loop error")
Error = errs.Class("metainfo loop")
// ErrClosed is a loop closed error.
ErrClosed = Error.New("loop closed")
)

View File

@ -18,7 +18,7 @@ import (
var (
// Error defines the expireddeletion chore errors class.
Error = errs.Class("expireddeletion chore error")
Error = errs.Class("expired deletion")
mon = monkit.Package()
)

View File

@ -46,9 +46,9 @@ const (
var (
mon = monkit.Package()
// Error general metainfo error.
Error = errs.Class("metainfo error")
Error = errs.Class("metainfo")
// ErrNodeAlreadyExists pointer already has a piece for a node err.
ErrNodeAlreadyExists = errs.Class("metainfo error: node already exists")
ErrNodeAlreadyExists = errs.Class("metainfo: node already exists")
)
// APIKeys is api keys store methods used by endpoint.

View File

@ -17,7 +17,7 @@ import (
var (
// Error defines the metrics chore errors class.
Error = errs.Class("metrics chore error")
Error = errs.Class("metrics")
mon = monkit.Package()
)

View File

@ -75,7 +75,7 @@ type PendingSerial struct {
var (
// Error the default orders errs class.
Error = errs.Class("orders error")
Error = errs.Class("orders")
// ErrUsingSerialNumber error class for serial number.
ErrUsingSerialNumber = errs.Class("serial number")

View File

@ -15,7 +15,7 @@ import (
var (
mon = monkit.Package()
// Error represents an overlay error.
Error = errs.Class("overlay error")
Error = errs.Class("overlay")
)
// Config is a configuration for overlay service.

View File

@ -17,7 +17,7 @@ import (
)
// Error is error class API errors.
var Error = errs.Class("coinpayments client error")
var Error = errs.Class("coinpayments client")
// ErrMissingPublicKey is returned when Coinpayments client is missing public key.
var ErrMissingPublicKey = errs.Class("missing public key")

View File

@ -15,7 +15,7 @@ import (
)
// ErrChore is stripecoinpayments clearing loop chore error class.
var ErrChore = errs.Class("stripecoinpayments chore error")
var ErrChore = errs.Class("stripecoinpayments chore")
// Chore runs clearing process of reconciling transactions deposits,
// customer balance, invoices and usages.

View File

@ -29,7 +29,7 @@ import (
var (
// Error defines stripecoinpayments service error.
Error = errs.Class("stripecoinpayments service error")
Error = errs.Class("stripecoinpayments service")
// ErrNoCouponUsages indicates that there are no coupon usages.
ErrNoCouponUsages = errs.Class("stripecoinpayments no coupon usages")

View File

@ -14,7 +14,7 @@ import (
)
// ErrVersion defines version service error.
var ErrVersion = errs.Class("version service error")
var ErrVersion = errs.Class("version service")
// VersionService updates conversion rates in a loop.
//

View File

@ -28,7 +28,7 @@ import (
// Error is a standard error class for this package.
var (
Error = errs.Class("checker error")
Error = errs.Class("repair checker")
mon = monkit.Package()
)

View File

@ -8,4 +8,4 @@ import (
)
// Error is a standard error class for this package.
var Error = errs.Class("queue error")
var Error = errs.Class("repair queue")

View File

@ -22,7 +22,7 @@ import (
// Error is a standard error class for this package.
var (
Error = errs.Class("repairer error")
Error = errs.Class("repairer")
mon = monkit.Package()
)

View File

@ -26,8 +26,8 @@ import (
)
var (
metainfoGetError = errs.Class("metainfo db get error")
metainfoPutError = errs.Class("metainfo db put error")
metainfoGetError = errs.Class("metainfo db get")
metainfoPutError = errs.Class("metainfo db put")
invalidRepairError = errs.Class("invalid repair")
overlayQueryError = errs.Class("overlay query failure")
orderLimitFailureError = errs.Class("order limits failure")

View File

@ -1743,7 +1743,7 @@ func (cache *overlaycache) UpdateCheckIn(ctx context.Context, node overlay.NodeC
var (
// ErrVetting is the error class for the following test methods.
ErrVetting = errs.Class("vetting error")
ErrVetting = errs.Class("vetting")
)
// TestVetNode directly sets a node's vetted_at timestamp to make testing easier.

View File

@ -34,10 +34,10 @@ type DB interface {
}
// ErrNoDataForPeriod represents errors from the payouts database.
var ErrNoDataForPeriod = errs.Class("no payStub/payments for period error")
var ErrNoDataForPeriod = errs.Class("no payStub/payments for period")
// Error is the default error class for payouts package.
var Error = errs.Class("payouts db error")
var Error = errs.Class("payoutsdb")
// Paystub is an entity that holds held amount of cash that will be paid to storagenode operator after some period.
type Paystub struct {

View File

@ -19,7 +19,7 @@ import (
var mon = monkit.Package()
// Error is the default boltdb errs class.
var Error = errs.Class("boltdb error")
var Error = errs.Class("boltdb")
// Client is the entrypoint into a bolt data store.
type Client struct {

View File

@ -21,7 +21,7 @@ import (
var (
// Error is a redis error.
Error = errs.Class("redis error")
Error = errs.Class("redis")
mon = monkit.Package()
)

View File

@ -13,7 +13,7 @@ import (
)
// ErrNoAPIKey represents no api key error.
var ErrNoAPIKey = errs.Class("no api key error")
var ErrNoAPIKey = errs.Class("no api key")
// DB is interface for working with api keys.
//

View File

@ -15,7 +15,7 @@ import (
var (
// ErrService defines secret service error.
ErrService = errs.Class("secret service error")
ErrService = errs.Class("secret service")
mon = monkit.Package()
)

View File

@ -17,7 +17,7 @@ import (
)
// ErrNotificationsAPI - console notifications api error type.
var ErrNotificationsAPI = errs.Class("notifications console web error")
var ErrNotificationsAPI = errs.Class("consoleapi notifications")
// Notifications is an api controller that exposes all notifications related api.
type Notifications struct {

View File

@ -16,7 +16,7 @@ import (
)
// ErrPayoutAPI - console payouts api error type.
var ErrPayoutAPI = errs.Class("payouts console web error")
var ErrPayoutAPI = errs.Class("consoleapi payouts")
// Payout is an api controller that exposes all payouts related api.
type Payout struct {

View File

@ -294,7 +294,7 @@ func TestHeldAmountApi(t *testing.T) {
body5, err := ioutil.ReadAll(res5.Body)
require.NoError(t, err)
require.Equal(t, "{\"error\":\"payouts console web error: wrong period format: period has wrong format\"}\n", string(body5))
require.Equal(t, "{\"error\":\"consoleapi payouts: wrong period format: period has wrong format\"}\n", string(body5))
})
t.Run("test AllPayStubsPeriod", func(t *testing.T) {
@ -350,7 +350,7 @@ func TestHeldAmountApi(t *testing.T) {
body5, err := ioutil.ReadAll(res5.Body)
require.NoError(t, err)
require.Equal(t, "{\"error\":\"payouts console web error: wrong period format: period has wrong format\"}\n", string(body5))
require.Equal(t, "{\"error\":\"consoleapi payouts: wrong period format: period has wrong format\"}\n", string(body5))
})
t.Run("test HeldbackHistory", func(t *testing.T) {

View File

@ -16,8 +16,8 @@ import (
"storj.io/storj/storagenode/console"
)
// ErrStorageNodeAPI - console storageNode api error type.
var ErrStorageNodeAPI = errs.Class("storageNode console web error")
// ErrStorageNodeAPI - console storagenode api error type.
var ErrStorageNodeAPI = errs.Class("consoleapi storagenode")
// StorageNode is an api controller that exposes all dashboard related api.
type StorageNode struct {

View File

@ -26,7 +26,7 @@ import (
var (
mon = monkit.Package()
// Error is storagenode console web error type.
Error = errs.Class("storagenode console web error")
Error = errs.Class("consoleserver")
)
// Config contains configuration for storagenode console web server.

View File

@ -31,7 +31,7 @@ import (
var (
// SNOServiceErr defines sno service error.
SNOServiceErr = errs.Class("storage node dashboard service error")
SNOServiceErr = errs.Class("console")
mon = monkit.Package()
)

View File

@ -26,7 +26,7 @@ var (
// Error is the default error class for contact package.
Error = errs.Class("contact")
errPingSatellite = errs.Class("ping satellite error")
errPingSatellite = errs.Class("ping satellite")
)
const initialBackOff = time.Second

View File

@ -22,7 +22,7 @@ import (
var (
// NodeStatsServiceErr defines node stats service error.
NodeStatsServiceErr = errs.Class("node stats service error")
NodeStatsServiceErr = errs.Class("nodestats")
mon = monkit.Package()
)

View File

@ -23,7 +23,7 @@ import (
var (
// EstimationServiceErr defines sno service error.
EstimationServiceErr = errs.Class("storage node estimation payouts service error")
EstimationServiceErr = errs.Class("estimationservice")
mon = monkit.Package()
)

View File

@ -43,7 +43,7 @@ type DB interface {
}
// ErrNoPayStubForPeriod represents errors from the payouts database.
var ErrNoPayStubForPeriod = errs.Class("no payStub for period error")
var ErrNoPayStubForPeriod = errs.Class("no payStub for period")
// PayStub is node payouts data for satellite by specific period.
type PayStub struct {

View File

@ -25,7 +25,7 @@ import (
var (
// ErrPayoutService defines payout service error.
ErrPayoutService = errs.Class("payouts service error")
ErrPayoutService = errs.Class("payouts service")
// ErrBadPeriod defines that period has wrong format.
ErrBadPeriod = errs.Class("wrong period format")

View File

@ -19,7 +19,7 @@ import (
var (
// ErrSerials defines the usedserials store error class.
ErrSerials = errs.Class("used serials store error")
ErrSerials = errs.Class("usedserials")
// ErrSerialAlreadyExists defines an error class for duplicate usedserials.
ErrSerialAlreadyExists = errs.Class("used serial already exists in store")

View File

@ -18,7 +18,7 @@ import (
var _ apikeys.DB = (*apiKeysDB)(nil)
// ErrAPIKeysDB represents errors from the api keys database.
var ErrAPIKeysDB = errs.Class("apikeys db error")
var ErrAPIKeysDB = errs.Class("apikeysdb")
// APIKeysDBName represents the database name.
const APIKeysDBName = "secret"

View File

@ -20,7 +20,7 @@ import (
)
// ErrBandwidth represents errors from the bandwidthdb database.
var ErrBandwidth = errs.Class("bandwidthdb error")
var ErrBandwidth = errs.Class("bandwidthdb")
// BandwidthDBName represents the database name.
const BandwidthDBName = "bandwidth"

View File

@ -20,7 +20,7 @@ var _ notifications.DB = (*notificationDB)(nil)
const NotificationsDBName = "notifications"
// ErrNotificationsDB represents errors from the notifications database.
var ErrNotificationsDB = errs.Class("notificationsDB error")
var ErrNotificationsDB = errs.Class("notificationsdb")
// notificationDB is an implementation of notifications.Notifications.
//

View File

@ -19,7 +19,7 @@ import (
)
// ErrOrders represents errors from the ordersdb database.
var ErrOrders = errs.Class("ordersdb error")
var ErrOrders = errs.Class("ordersdb")
// OrdersDBName represents the database name.
const OrdersDBName = "orders"

View File

@ -18,7 +18,7 @@ import (
var _ payouts.DB = (*payoutDB)(nil)
// ErrPayout represents errors from the payouts database.
var ErrPayout = errs.Class("payouts error")
var ErrPayout = errs.Class("payouts")
// HeldAmountDBName represents the database name.
const HeldAmountDBName = "heldamount"

View File

@ -14,7 +14,7 @@ import (
)
// ErrPieceExpiration represents errors from the piece expiration database.
var ErrPieceExpiration = errs.Class("piece expiration error")
var ErrPieceExpiration = errs.Class("pieceexpirationdb")
// PieceExpirationDBName represents the database filename.
const PieceExpirationDBName = "piece_expiration"

View File

@ -18,7 +18,7 @@ import (
)
// ErrPieceInfo represents errors from the piece info database.
var ErrPieceInfo = errs.Class("v0pieceinfodb error")
var ErrPieceInfo = errs.Class("v0pieceinfodb")
// PieceInfoDBName represents the database name.
const PieceInfoDBName = "pieceinfo"

View File

@ -15,7 +15,7 @@ import (
)
// ErrPieceSpaceUsed represents errors from the piece spaced used database.
var ErrPieceSpaceUsed = errs.Class("piece space used error")
var ErrPieceSpaceUsed = errs.Class("piece space used")
// PieceSpaceUsedDBName represents the database name.
const PieceSpaceUsedDBName = "piece_spaced_used"

View File

@ -18,7 +18,7 @@ import (
var _ pricing.DB = (*pricingDB)(nil)
// ErrPricing represents errors from the pricing database.
var ErrPricing = errs.Class("pricing error")
var ErrPricing = errs.Class("pricing")
// PricingDBName represents the database name.
const PricingDBName = "pricing"

View File

@ -16,7 +16,7 @@ import (
)
// ErrReputation represents errors from the reputation database.
var ErrReputation = errs.Class("reputation error")
var ErrReputation = errs.Class("reputation")
// ReputationDBName represents the database name.
const ReputationDBName = "reputation"

View File

@ -15,7 +15,7 @@ import (
)
// ErrSatellitesDB represents errors from the satellites database.
var ErrSatellitesDB = errs.Class("satellitesdb error")
var ErrSatellitesDB = errs.Class("satellitesdb")
// SatellitesDBName represents the database name.
const SatellitesDBName = "satellites"

View File

@ -28,7 +28,7 @@ const seedLength = 32
var (
// RolloutErr defines the rollout config error class.
RolloutErr = errs.Class("rollout config error")
RolloutErr = errs.Class("rollout config")
// EmptySeedErr is used when the rollout contains an empty seed value.
EmptySeedErr = RolloutErr.New("empty seed")
)