libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

Constants.kt (1366B)


      1 /*
      2  * This file is part of LibEuFin.
      3  * Copyright (C) 2024-2025 Taler Systems S.A.
      4 
      5  * LibEuFin is free software; you can redistribute it and/or modify
      6  * it under the terms of the GNU Affero General Public License as
      7  * published by the Free Software Foundation; either version 3, or
      8  * (at your option) any later version.
      9 
     10  * LibEuFin is distributed in the hope that it will be useful, but
     11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General
     13  * Public License for more details.
     14 
     15  * You should have received a copy of the GNU Affero General Public
     16  * License along with LibEuFin; see the file COPYING.  If not, see
     17  * <http://www.gnu.org/licenses/>
     18  */
     19 package tech.libeufin.common
     20 
     21 // DB
     22 const val MIN_VERSION: Int = 14
     23 const val SERIALIZATION_RETRY: Int = 30
     24 
     25 // Security
     26 const val MAX_BODY_LENGTH: Int = 4 * 1024 // 4kB
     27 
     28 // API version
     29 const val WIRE_GATEWAY_API_VERSION: String = "4:0:3"
     30 const val REVENUE_API_VERSION: String = "1:1:1"
     31 const val OBSERVABILITY_API_VERSION: String = "0:0:0"
     32 
     33 // HTTP headers
     34 const val TALER_CHALLENGE_IDS: String = "Taler-Challenge-Ids"
     35 const val X_FORWARD_PREFIX: String = "X-Forward-Prefix"
     36 
     37 // Params
     38 const val MAX_PAGE_SIZE: Int = 1024
     39 const val MAX_TIMEOUT_MS: Long = 60 * 60 * 1000  // 1h
     40 // TODO make MAX_TIMEOUT_MS configurable