github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/tequilapi/contract/errcodes.go (about)

     1  /*
     2   * Copyright (C) 2022 The "MysteriumNetwork/node" Authors.
     3   *
     4   * This program is free software: you can redistribute it and/or modify
     5   * it under the terms of the GNU General Public License as published by
     6   * the Free Software Foundation, either version 3 of the License, or
     7   * (at your option) any later version.
     8   *
     9   * This program is distributed in the hope that it will be useful,
    10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
    11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12   * GNU General Public License for more details.
    13   *
    14   * You should have received a copy of the GNU General Public License
    15   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    16   */
    17  
    18  package contract
    19  
    20  // Err codes returned from TequilAPI.
    21  // Once created, do not change the string value, because consumers may depend on it - it's part of the contract.
    22  const (
    23  
    24  	// Identity
    25  
    26  	ErrCodeIDImport                      = "err_id_import"
    27  	ErrCodeIDSetDefault                  = "err_id_set_default"
    28  	ErrCodeIDUseOrCreate                 = "err_to_id_use_or_create"
    29  	ErrCodeIDUnlock                      = "err_id_unlock"
    30  	ErrCodeIDLocked                      = "err_id_locked"
    31  	ErrCodeIDNotRegistered               = "err_id_not_registered"
    32  	ErrCodeIDStatusUnknown               = "err_id_status_unknown"
    33  	ErrCodeIDCreate                      = "err_id_create"
    34  	ErrCodeIDRegistrationCheck           = "err_id_registration_status_check"
    35  	ErrCodeIDBlockchainRegistrationCheck = "err_id_registration_blockchain_status_check"
    36  	ErrCodeIDRegistrationInProgress      = "err_id_registration_in_progress"
    37  	ErrCodeIDCalculateAddress            = "err_id_calculate_address"
    38  	ErrCodeIDSaveBeneficiaryAddress      = "err_id_save_beneficiary_invalid_address"
    39  	ErrCodeIDGetBeneficiaryAddress       = "err_id_get_beneficiary_address"
    40  	ErrCodeHermesMigration               = "err_id_check_hermes_migration"
    41  	ErrCodeCheckHermesMigrationStatus    = "err_id_check_hermes_migration_status"
    42  
    43  	// Payment
    44  
    45  	ErrCodePaymentCreate         = "err_payment_create"
    46  	ErrCodePaymentGet            = "err_payment_get"
    47  	ErrCodePaymentGetInvoice     = "err_payment_get_invoice"
    48  	ErrCodePaymentList           = "err_payment_list"
    49  	ErrCodePaymentListCurrencies = "err_payment_list_currencies"
    50  	ErrCodePaymentGetOptions     = "err_payment_get_order_options"
    51  	ErrCodePaymentListGateways   = "err_payment_list_gateways"
    52  
    53  	// Referral
    54  
    55  	ErrCodeReferralGetToken = "err_referral_get_token"
    56  	ErrCodeBeneficiaryGet   = "err_beneficiary_get"
    57  
    58  	// Config
    59  
    60  	ErrCodeConfigSave = "err_config_save"
    61  
    62  	// Connection
    63  
    64  	ErrCodeConnectionAlreadyExists = "err_connection_already_exists"
    65  	ErrCodeConnectionCancelled     = "err_connection_cancelled"
    66  	ErrCodeConnect                 = "err_connect"
    67  	ErrCodeNoConnectionExists      = "err_no_connection_exists"
    68  	ErrCodeDisconnect              = "err_disconnect"
    69  
    70  	// Feedback
    71  
    72  	ErrCodeFeedbackSubmit = "err_feedback_submit"
    73  
    74  	// MMN
    75  
    76  	ErrCodeMMNNodeAlreadyClaimed      = "err_mmn_node_already_claimed"
    77  	ErrCodeMMNAPIKey                  = "err_mmn_api_key"
    78  	ErrCodeMMNRegistration            = "err_mmn_registration"
    79  	ErrCodeMMNClaimRedirectURLMissing = "err_mmn_claim_redirect_url_missing"
    80  	ErrCodeMMNClaimLink               = "err_mmn_claim_link"
    81  
    82  	// NAT
    83  
    84  	ErrCodeNATProbe = "err_nat_probe"
    85  
    86  	// Proposals
    87  
    88  	ErrCodeProposalsQuery          = "err_proposals_query"
    89  	ErrCodeProposalsCountryQuery   = "err_proposals_countries_query"
    90  	ErrCodeProposalsDetectLocation = "err_proposals_detect_location"
    91  	ErrCodeProposalsPrices         = "err_proposals_prices"
    92  	ErrCodeProposalsPresets        = "err_proposals_presets"
    93  	ErrCodeProposalsServiceType    = "err_proposals_service_type"
    94  
    95  	// Service
    96  
    97  	ErrCodeServiceList     = "err_service_list"
    98  	ErrCodeServiceGet      = "err_service_get"
    99  	ErrCodeServiceRunning  = "err_service_running"
   100  	ErrCodeServiceLocation = "err_service_location"
   101  	ErrCodeServiceStart    = "err_service_start"
   102  	ErrCodeServiceStop     = "err_service_stop"
   103  
   104  	// Sessions
   105  
   106  	ErrCodeSessionList         = "err_session_list"
   107  	ErrCodeSessionListPaginate = "err_session_list_paginate"
   108  	ErrCodeSessionStats        = "err_session_stats"
   109  	ErrCodeSessionStatsDaily   = "err_session_stats_daily"
   110  
   111  	// Transactor
   112  
   113  	ErrCodeTransactorRegistration          = "err_transactor_registration"
   114  	ErrCodeTransactorFetchFees             = "err_transactor_fetch_fees"
   115  	ErrCodeTransactorDecreaseStake         = "err_transactor_decrease_stake"
   116  	ErrCodeTransactorSettleHistory         = "err_transactor_settle_history"
   117  	ErrCodeTransactorSettleHistoryPaginate = "err_transactor_settle_history_paginate"
   118  	ErrCodeTransactorWithdraw              = "err_transactor_withdraw"
   119  	ErrCodeTransactorSettle                = "err_transactor_settle_into_stake"
   120  	ErrCodeTransactorSettleAsync           = "err_transactor_settle_into_stake_async"
   121  	ErrCodeTransactorNoReward              = "err_transactor_no_reward"
   122  	ErrCodeTransactorBeneficiary           = "err_transactor_beneficiary"
   123  	ErrCodeTransactorBeneficiaryTxStatus   = "err_transactor_beneficiary_tx_status"
   124  
   125  	// Affiliator
   126  
   127  	ErrCodeAffiliatorNoReward = "err_affiliator_no_reward"
   128  	ErrCodeAffiliatorFailed   = "err_affiliator_failed"
   129  
   130  	// Other
   131  
   132  	ErrCodeActiveHermes                    = "err_get_active_hermes"
   133  	ErrCodeHermesFee                       = "err_hermes_fee"
   134  	ErrCodeHermesSettle                    = "err_hermes_settle"
   135  	ErrCodeHermesSettleAsync               = "err_hermes_settle_async"
   136  	ErrCodeUILocalVersions                 = "err_ui_local_versions"
   137  	ErrCodeUISwitchVersion                 = "err_ui_switch_version"
   138  	ErrCodeUIDownload                      = "err_ui_download"
   139  	ErrCodeUIBundledVersion                = "err_ui_bundled_version"
   140  	ErrCodeUIUsedVersion                   = "err_ui_used_version"
   141  	ErrorCodeProviderSessions              = "err_provider_sessions"
   142  	ErrorCodeProviderTransferredData       = "err_provider_transferred_data"
   143  	ErrorCodeProviderSessionsCount         = "err_provider_sessions_count"
   144  	ErrorCodeProviderConsumersCount        = "err_provider_consumers_count"
   145  	ErrorCodeProviderEarningsSeries        = "err_provider_earnings_series"
   146  	ErrorCodeProviderSessionsSeries        = "err_provider_sessions_series"
   147  	ErrorCodeProviderTransferredDataSeries = "err_provider_transferred_data_series"
   148  	ErrorCodeProviderQuality               = "err_provider_quality"
   149  	ErrorCodeProviderActivityStats         = "err_provider_activity_stats"
   150  	ErrorCodeLatestReleaseInformation      = "err_latest_release_information"
   151  	ErrorCodeProviderServiceEarnings       = "err_provider_service_earnings"
   152  )