tina-core 0.0.2

Tina platform
Documentation
//! 常量
/// 常量集
pub struct Constants;

impl Constants {
    /// 请求locale, 用于国际化
    pub const REQUEST_HEADER_LOCALE: &str = "access-locale";
    /// 请求ID, 用于支持微服务
    pub const REQUEST_ID_HEADER: &str = "request-id";
    /// 请求ID, 用于支持微服务
    pub const REQUEST_ID_HEADER_VALUE: &str = "request-id-value";
    /// Span ID, 用于链路
    pub const SPAN_ID_HEADER: &str = "span-id";
    /// Span Data, 用于链路
    pub const SPAN_DATA_HEADER: &str = "span-data";
    /// 响应error header
    pub const RESPONSE_ERROR_HEADER: &str = "error";
    /// 默认分页大小
    pub const DEFAULT_PAGE_SIZE: u64 = 10;
    /// 登录用户 redis key
    pub const LOGIN_TOKEN_KEY: &str = "login_tokens:";
    /// 令牌前缀
    pub const LOGIN_USER_KEY: &str = "login_user_key";
    /// 令牌前缀
    pub const TOKEN_PREFIX: &str = "Bearer ";
    /// http请求
    pub const HTTP: &str = "http://";
    /// https请求
    pub const HTTPS: &str = "https://";
}

/// 文件常量
pub struct FileConstants;

impl FileConstants {}