Skip to content

Commit

Permalink
feat(types): remove deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
tu6ge committed Aug 8, 2023
1 parent f01d4a2 commit 7ce3488
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 99 deletions.
62 changes: 0 additions & 62 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,7 @@ pub struct EndPoint {
pub(crate) is_internal: bool,
}

// TODO
#[allow(non_upper_case_globals)]
impl EndPoint {
/// 杭州
#[deprecated(since = "0.13.0", note = "replace with EndPoint::CN_HANGZHOU")]
pub const CnHangzhou: Self = Self {
kind: EndPointKind::CnHangzhou,
is_internal: false,
};
/// 杭州
pub const CN_HANGZHOU: Self = Self {
kind: EndPointKind::CnHangzhou,
Expand All @@ -213,12 +205,6 @@ impl EndPoint {
/// 杭州
pub const HANGZHOU: Self = Self::CN_HANGZHOU;

/// 上海
#[deprecated(since = "0.13.0", note = "replace with EndPoint::CN_SHANGHAI")]
pub const CnShanghai: Self = Self {
kind: EndPointKind::CnShanghai,
is_internal: false,
};
/// 上海
pub const CN_SHANGHAI: Self = Self {
kind: EndPointKind::CnShanghai,
Expand All @@ -227,12 +213,6 @@ impl EndPoint {
/// 上海
pub const SHANGHAI: Self = Self::CN_SHANGHAI;

/// 青岛
#[deprecated(since = "0.13.0", note = "replace with EndPoint::CN_QINGDAO")]
pub const CnQingdao: Self = Self {
kind: EndPointKind::CnQingdao,
is_internal: false,
};
/// 青岛
pub const CN_QINGDAO: Self = Self {
kind: EndPointKind::CnQingdao,
Expand All @@ -241,12 +221,6 @@ impl EndPoint {
/// 青岛
pub const QINGDAO: Self = Self::CN_QINGDAO;

/// 北京
#[deprecated(since = "0.13.0", note = "replace with EndPoint::CN_BEIJING")]
pub const CnBeijing: Self = Self {
kind: EndPointKind::CnBeijing,
is_internal: false,
};
/// 北京
pub const CN_BEIJING: Self = Self {
kind: EndPointKind::CnBeijing,
Expand All @@ -255,12 +229,6 @@ impl EndPoint {
/// 北京
pub const BEIJING: Self = Self::CN_BEIJING;

/// 张家口
#[deprecated(since = "0.13.0", note = "replace with EndPoint::CN_ZHANGJIAKOU")]
pub const CnZhangjiakou: Self = Self {
kind: EndPointKind::CnZhangjiakou,
is_internal: false,
};
/// 张家口
pub const CN_ZHANGJIAKOU: Self = Self::ZHANGJIAKOU;
/// 张家口
Expand All @@ -269,12 +237,6 @@ impl EndPoint {
is_internal: false,
};

/// 香港
#[deprecated(since = "0.13.0", note = "replace with EndPoint::CN_HONGKONG")]
pub const CnHongkong: Self = Self {
kind: EndPointKind::CnHongkong,
is_internal: false,
};
/// 香港
pub const CN_HONGKONG: Self = Self {
kind: EndPointKind::CnHongkong,
Expand All @@ -283,12 +245,6 @@ impl EndPoint {
/// 香港
pub const HONGKONG: Self = Self::CN_HONGKONG;

/// 深圳
#[deprecated(since = "0.13.0", note = "replace with EndPoint::CN_SHENZHEN")]
pub const CnShenzhen: Self = Self {
kind: EndPointKind::CnShenzhen,
is_internal: false,
};
/// 深圳
pub const CN_SHENZHEN: Self = Self {
kind: EndPointKind::CnShenzhen,
Expand All @@ -297,36 +253,18 @@ impl EndPoint {
/// 深圳
pub const SHENZHEN: Self = Self::CN_SHENZHEN;

/// UsWest1
#[deprecated(since = "0.13.0", note = "replace with EndPoint::US_WEST_1")]
pub const UsWest1: Self = Self {
kind: EndPointKind::UsWest1,
is_internal: false,
};
/// UsWest1
pub const US_WEST_1: Self = Self {
kind: EndPointKind::UsWest1,
is_internal: false,
};

/// UsEast1
#[deprecated(since = "0.13.0", note = "replace with EndPoint::US_EAST_1")]
pub const UsEast1: Self = Self {
kind: EndPointKind::UsEast1,
is_internal: false,
};
/// UsEast1
pub const US_EAST_1: Self = Self {
kind: EndPointKind::UsEast1,
is_internal: false,
};

/// ApSouthEast1
#[deprecated(since = "0.13.0", note = "replace with EndPoint::AP_SOUTH_EAST_1")]
pub const ApSouthEast1: Self = Self {
kind: EndPointKind::ApSouthEast1,
is_internal: false,
};
/// ApSouthEast1
pub const AP_SOUTH_EAST_1: Self = Self {
kind: EndPointKind::ApSouthEast1,
Expand Down
37 changes: 0 additions & 37 deletions src/types/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,53 +381,31 @@ pub struct InnerQueryKey<'a> {
kind: QueryKeyEnum<'a>,
}

// TODO
#[allow(non_upper_case_globals)]
impl InnerQueryKey<'_> {
/// 对Object名字进行分组的字符。所有Object名字包含指定的前缀,第一次出现delimiter字符之间的Object作为一组元素(即CommonPrefixes)
/// 示例值 `/`
pub const DELIMITER: Self = Self {
kind: QueryKeyEnum::Delimiter,
};
/// TODO
#[deprecated(since = "0.13.0", note = "replace with QueryKey::DELIMITER")]
pub const Delimiter: Self = Self {
kind: QueryKeyEnum::Delimiter,
};

/// 设定从start-after之后按字母排序开始返回Object。
/// start-after用来实现分页显示效果,参数的长度必须小于1024字节。
/// 做条件查询时,即使start-after在列表中不存在,也会从符合start-after字母排序的下一个开始打印。
pub const START_AFTER: Self = Self {
kind: QueryKeyEnum::StartAfter,
};
/// TODO
#[deprecated(since = "0.13.0", note = "replace with QueryKey::START_AFTER")]
pub const StartAfter: Self = Self {
kind: QueryKeyEnum::StartAfter,
};

/// 指定List操作需要从此token开始。您可从ListObjectsV2(GetBucketV2)结果中的NextContinuationToken获取此token。
/// 用于分页,返回下一页的数据
pub const CONTINUATION_TOKEN: Self = Self {
kind: QueryKeyEnum::ContinuationToken,
};
/// TODO
#[deprecated(since = "0.13.0", note = "replace with QueryKey::CONTINUATION_TOKEN")]
pub const ContinuationToken: Self = Self {
kind: QueryKeyEnum::ContinuationToken,
};

/// 指定返回Object的最大数。
/// 取值:大于0小于等于1000
pub const MAX_KEYS: Self = Self {
kind: QueryKeyEnum::MaxKeys,
};
/// TODO
#[deprecated(since = "0.13.0", note = "replace with QueryKey::MAX_KEYS")]
pub const MaxKeys: Self = Self {
kind: QueryKeyEnum::MaxKeys,
};

/// # 限定返回文件的Key必须以prefix作为前缀。
/// 如果把prefix设为某个文件夹名,则列举以此prefix开头的文件,即该文件夹下递归的所有文件和子文件夹。
Expand All @@ -444,31 +422,16 @@ impl InnerQueryKey<'_> {
pub const PREFIX: Self = Self {
kind: QueryKeyEnum::Prefix,
};
/// TODO
#[deprecated(since = "0.13.0", note = "replace with QueryKey::PREFIX")]
pub const Prefix: Self = Self {
kind: QueryKeyEnum::Prefix,
};

/// 对返回的内容进行编码并指定编码的类型。
pub const ENCODING_TYPE: Self = Self {
kind: QueryKeyEnum::EncodingType,
};
/// TODO
#[deprecated(since = "0.13.0", note = "replace with EndPoint::ENCODING_TYPE")]
pub const EncodingType: Self = Self {
kind: QueryKeyEnum::EncodingType,
};

/// 指定是否在返回结果中包含owner信息。
pub const FETCH_OWNER: Self = Self {
kind: QueryKeyEnum::FetchOwner,
};
/// TODO
#[deprecated(since = "0.13.0", note = "replace with EndPoint::FETCH_OWNER")]
pub const FetchOwner: Self = Self {
kind: QueryKeyEnum::FetchOwner,
};
}

#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
Expand Down

0 comments on commit 7ce3488

Please sign in to comment.