Skip to content

Commit

Permalink
!14 v0.8.0
Browse files Browse the repository at this point in the history
Merge pull request !14 from 码匠君/develop
  • Loading branch information
herodotus-ecosystem authored and gitee-org committed Jun 25, 2023
2 parents 123bec8 + e310421 commit 7513220
Show file tree
Hide file tree
Showing 50 changed files with 1,926 additions and 131 deletions.
78 changes: 46 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<p align="center">
<a href="https://spring.io/projects/spring-boot" target="_blank"><img src="https://shields.io/badge/Spring%20Boot-3.1.0-blue.svg?logo=spring" alt="Spring Boot 3.1.0"></a>
<a href="#" target="_blank"><img src="https://shields.io/badge/Version-0.7.1-red.svg?logo=spring" alt="Version 0.7.1"></a>
<a href="#" target="_blank"><img src="https://shields.io/badge/Version-0.8.0-red.svg?logo=spring" alt="Version 0.8.0"></a>
<a href="https://bell-sw.com/pages/downloads/#downloads" target="_blank"><img src="https://img.shields.io/badge/JDK-17%2B-green.svg?logo=openjdk" alt="Java 17"></a>
<a href="./LICENSE"><img src="https://shields.io/badge/License-Apache--2.0-blue.svg?logo=apache" alt="License Apache 2.0"></a>
<a href="https://www.herodotus.cn"><img src="https://visitor-badge.laobi.icu/badge?page_id=dante-cloud&title=Total%20Visits" alt="Total Visits"></a>
Expand Down Expand Up @@ -125,37 +125,51 @@ dante-oss

- [1] 基础功能

| 功能 | 说明 |
|-----------------|----------------------------------------------------------|
| Bucket 列表 | Bucket 列表查询,包括 Service、REST API 和前端展示 |
| Bucket 名称是否存在 | Bucket 名是否存在,包括 Service、REST API 和前端异步校验处理 |
| Bucket 创建 | 创建 Bucket,包括 Service、REST API 和前端Validation校验处理 |
| Bucket 删除 | 删除 Bucket,包括 Service、REST API 和前端展示处理 |
| Bucket 加密设置获取 | 获取 Bucket Encryption 设置,包括 Service、REST API |
| Bucket 修改加密设置 | 修改 Bucket Encryption 设置,包括 Service、REST API |
| Bucket 删除加密设置 | 删除 Bucket Encryption 设置,包括 Service、REST API |
| Bucket 访问策略设置获取 | 获取 Bucket Policy 设置,包括 Service、REST API |
| Bucket 修改访问策略设置 | 修改 Bucket Policy 设置,包括 Service、REST API |
| Bucket 删除访问策略设置 | 删除 Bucket Policy 设置,包括 Service、REST API |
| Bucket 标签获取 | 获取 Bucket Tags,包括 Service、REST API |
| Bucket 修改标签 | 修改 Bucket Tags,包括 Service、REST API |
| Bucket 删除标签 | 删除 Bucket Tags,包括 Service、REST API |
| Bucket 对象锁定设置获取 | 获取 Bucket ObjectLockConfiguration 设置,包括 Service、REST API |
| Bucket 修改对象锁定设置 | 修改 Bucket ObjectLockConfiguration 设置,包括 Service、REST API |
| Bucket 删除对象锁定设置 | 删除 Bucket ObjectLockConfiguration 设置,包括 Service、REST API |
| Object 列表 | Object 列表查询,包括 Service、REST API 和前端展示 |
| Object 删除 | 删除 Object,包括 Service、REST API 和前端展示处理 |
| Object 批量删除 | 批量删除 Object,包括 Service、REST API 和前端展示处理 |
| Object 元信息获取 | 获取 Object Stat,包括 Service、 |
| Object 下载(服务端) | Object 下载(服务端下载,非流模式),包括 Service、 |
| Object 标签获取 | 获取 Object Tags,包括 Service、REST API |
| Object 修改标签 | 修改 Object Tags,包括 Service、REST API |
| Object 删除标签 | 删除 Object Tags,包括 Service、REST API |
| Object 获取保留设置 | 获取 Object Retention,包括 Service、REST API |
| Object 修改保留设置 | 修改 Object Retention,包括 Service、REST API |
| Object 开启持有设置 | 获取 Object LegalHold,包括 Service、REST API |
| Object 关闭持有设置 | 修改 Object LegalHold,包括 Service、REST API |
| 其它功能 | 正逐步完善,主要涉及前后端交互、以及可用性验证和前端相关功能的开发,敬请期待,欢迎 PR |
| 功能 | 说明 |
|-------------------|----------------------------------------------------------|
| Bucket 列表 | Bucket 列表查询,包括 Service、REST API 和前端展示 |
| Bucket 名称是否存在 | Bucket 名是否存在,包括 Service、REST API 和前端异步校验处理 |
| Bucket 创建 | 创建 Bucket,包括 Service、REST API 和前端Validation校验处理 |
| Bucket 删除 | 删除 Bucket,包括 Service、REST API 和前端展示处理 |
| Bucket 加密设置获取 | 获取 Bucket Encryption 设置,包括 Service、REST API |
| Bucket 修改加密设置 | 修改 Bucket Encryption 设置,包括 Service、REST API |
| Bucket 删除加密设置 | 删除 Bucket Encryption 设置,包括 Service、REST API |
| Bucket 访问策略设置获取 | 获取 Bucket Policy 设置,包括 Service、REST API |
| Bucket 修改访问策略设置 | 修改 Bucket Policy 设置,包括 Service、REST API |
| Bucket 删除访问策略设置 | 删除 Bucket Policy 设置,包括 Service、REST API |
| Bucket 标签获取 | 获取 Bucket Tags,包括 Service、REST API |
| Bucket 修改标签 | 修改 Bucket Tags,包括 Service、REST API |
| Bucket 删除标签 | 删除 Bucket Tags,包括 Service、REST API |
| Bucket 对象锁定设置获取 | 获取 Bucket ObjectLockConfiguration 设置,包括 Service、REST API |
| Bucket 修改对象锁定设置 | 修改 Bucket ObjectLockConfiguration 设置,包括 Service、REST API |
| Bucket 删除对象锁定设置 | 删除 Bucket ObjectLockConfiguration 设置,包括 Service、REST API |
| Object 列表 | Object 列表查询,包括 Service、REST API 和前端展示 |
| Object 删除 | 删除 Object,包括 Service、REST API 和前端展示处理 |
| Object 批量删除 | 批量删除 Object,包括 Service、REST API 和前端展示处理 |
| Object 元信息获取 | 获取 Object Stat,包括 Service、 |
| Object 下载(服务端) | Object 下载(服务端下载,非流模式),包括 Service、 |
| Object 标签获取 | 获取 Object Tags,包括 Service、REST API |
| Object 修改标签 | 修改 Object Tags,包括 Service、REST API |
| Object 删除标签 | 删除 Object Tags,包括 Service、REST API |
| Object 获取保留设置 | 获取 Object Retention,包括 Service、REST API |
| Object 修改保留设置 | 修改 Object Retention,包括 Service、REST API |
| Object 开启持有设置 | 获取 Object LegalHold,包括 Service、REST API |
| Object 关闭持有设置 | 修改 Object LegalHold,包括 Service、REST API |
| Admin User 列表 | User 列表查询,包括 Service、REST API |
| Admin User 信息 | 获取 User 信息,包括 Service、REST API |
| Admin User 创建 | 创建 User,包括 Service、REST API |
| Admin User 删除 | 删除 User,包括 Service、REST API |
| Admin Group 列表 | Group 列表查询,包括 Service、REST API |
| Admin Group 信息 | 获取 Group 信息,包括 Service、REST API |
| Admin Group 创建 | 创建 Group,包括 Service、REST API |
| Admin Group 删除 | 删除 Group,包括 Service、REST API |
| Admin Policy 列表 | Policy 列表查询,包括 Service、REST API |
| Admin Policy 创建 | 创建 Policy,包括 Service、REST API |
| Admin Policy 删除 | 删除 Policy,包括 Service、REST API |
| Admin Bucket 配额设置 | 存储桶配额设置,包括 Service |
| Admin Bucket 配额获取 | 存储桶配额获取,包括 Service |
| Admin Bucket 配额清除 | 存储桶配额清除,包括 Service |
| 其它功能 | 正逐步完善,主要涉及前后端交互、以及可用性验证和前端相关功能的开发,敬请期待,欢迎 PR |


- [2] 扩展功能
Expand Down
4 changes: 2 additions & 2 deletions oss-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<groupId>cn.herodotus.oss</groupId>
<artifactId>oss-bom</artifactId>
<version>0.7.1</version>
<version>0.8.0</version>
<packaging>pom</packaging>

<description>Dante Cloud 生态产品 Dante OSS Bom</description>
Expand Down Expand Up @@ -88,7 +88,7 @@
<lombok.version>1.18.28</lombok.version>
<mapstruct-processor.version>1.5.5.Final</mapstruct-processor.version>

<spring-boot-dependencies.version>3.1.0</spring-boot-dependencies.version>
<spring-boot-dependencies.version>3.1.1</spring-boot-dependencies.version>
<dante-bom.version>3.1.1.0</dante-bom.version>
</properties>

Expand Down
9 changes: 7 additions & 2 deletions oss-minio/minio-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
<parent>
<groupId>cn.herodotus.oss</groupId>
<artifactId>oss-minio</artifactId>
<version>0.7.1</version>
<version>0.8.0</version>
</parent>

<artifactId>minio-core</artifactId>
<version>0.7.1</version>
<version>0.8.0</version>
<packaging>jar</packaging>

<dependencies>
Expand All @@ -50,6 +50,11 @@
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
</dependency>

<dependency>
<groupId>io.minio</groupId>
<artifactId>minio-admin</artifactId>
</dependency>
</dependencies>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public interface MinioErrorCodes extends ErrorCodes {
int MINIO_EXECUTION = MINIO_XML_PARSER + 1;
int MINIO_INTERRUPTED = MINIO_EXECUTION + 1;
int MINIO_BUCKET_POLICY_TOO_LARGE = MINIO_INTERRUPTED + 1;
int MINIO_INVALID_CIPHER_TEXT = MINIO_BUCKET_POLICY_TOO_LARGE + 1;

int MINIO_CONNECTION = OSS_MODULE_503_BEGIN + 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* Copyright (c) 2020-2030 ZHENGGENGWEI(码匠君)<herodotus@aliyun.com>
*
* Dante Cloud licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* <http://www.apache.org/licenses/LICENSE-2.0>
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Dante OSS 采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
*
* 1.请不要删除和修改根目录下的LICENSE文件。
* 2.请不要删除和修改 Dante Cloud 源码头部的版权声明。
* 3.请保留源码和相关描述文件的项目出处,作者声明等。
* 4.分发源码时候,请注明软件出处 <https://gitee.com/herodotus/dante-oss>
* 5.在修改包名,模块名称,项目代码等时,请注明软件出处 <https://gitee.com/herodotus/dante-oss>
* 6.若您的项目无法满足以上几点,可申请商业授权
*/

package cn.herodotus.oss.minio.core.converter;

import cn.herodotus.oss.minio.core.domain.GroupDomain;
import io.minio.admin.GroupInfo;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.core.convert.converter.Converter;

/**
* <p>Description: GroupInfo 转 GroupDomain 转换器 </p>
*
* @author : gengwei.zheng
* @date : 2023/6/25 15:32
*/
public class GroupInfoToDomainConverter implements Converter<GroupInfo, GroupDomain> {
@Override
public GroupDomain convert(GroupInfo groupInfo) {

GroupDomain domain = new GroupDomain();

if (ObjectUtils.isNotEmpty(groupInfo)) {
domain.setName(groupInfo.name());
domain.setStatus(groupInfo.status());
domain.setMembers(groupInfo.members());
domain.setPolicy(groupInfo.policy());
}

return domain;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright (c) 2020-2030 ZHENGGENGWEI(码匠君)<herodotus@aliyun.com>
*
* Dante Cloud licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* <http://www.apache.org/licenses/LICENSE-2.0>
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Dante OSS 采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
*
* 1.请不要删除和修改根目录下的LICENSE文件。
* 2.请不要删除和修改 Dante Cloud 源码头部的版权声明。
* 3.请保留源码和相关描述文件的项目出处,作者声明等。
* 4.分发源码时候,请注明软件出处 <https://gitee.com/herodotus/dante-oss>
* 5.在修改包名,模块名称,项目代码等时,请注明软件出处 <https://gitee.com/herodotus/dante-oss>
* 6.若您的项目无法满足以上几点,可申请商业授权
*/

package cn.herodotus.oss.minio.core.converter;

import cn.herodotus.oss.minio.core.domain.UserDomain;
import io.minio.admin.Status;
import io.minio.admin.UserInfo;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.core.convert.converter.Converter;

/**
* <p>Description: UserInfo 转 UserDomain 转换器 </p>
*
* @author : gengwei.zheng
* @date : 2023/6/25 14:20
*/
public class UserInfoToDomainConverter implements Converter<UserInfo, UserDomain> {
@Override
public UserDomain convert(UserInfo userInfo) {

UserDomain domain = new UserDomain();

if (ObjectUtils.isNotEmpty(userInfo)) {
domain.setSecretKey(userInfo.secretKey());
domain.setPolicyName(userInfo.policyName());
domain.setMemberOf(userInfo.memberOf());
domain.setStatus(Status.fromString(userInfo.status().name()));
}

return domain;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright (c) 2020-2030 ZHENGGENGWEI(码匠君)<herodotus@aliyun.com>
*
* Dante Cloud licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* <http://www.apache.org/licenses/LICENSE-2.0>
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Dante OSS 采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
*
* 1.请不要删除和修改根目录下的LICENSE文件。
* 2.请不要删除和修改 Dante Cloud 源码头部的版权声明。
* 3.请保留源码和相关描述文件的项目出处,作者声明等。
* 4.分发源码时候,请注明软件出处 <https://gitee.com/herodotus/dante-oss>
* 5.在修改包名,模块名称,项目代码等时,请注明软件出处 <https://gitee.com/herodotus/dante-oss>
* 6.若您的项目无法满足以上几点,可申请商业授权
*/

package cn.herodotus.oss.minio.core.converter;

import cn.herodotus.oss.minio.core.domain.UserDomain;
import io.minio.admin.UserInfo;
import org.apache.commons.collections4.MapUtils;
import org.springframework.core.convert.converter.Converter;

import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
* <p>Description: UserInfo Map 转 List<UserDomain> 转换器 </p>
*
* @author : gengwei.zheng
* @date : 2023/6/25 14:51
*/
public class UsersToDomainsConverter implements Converter<Map<String, UserInfo>, List<UserDomain>> {

private final Converter<UserInfo, UserDomain> toDomain = new UserInfoToDomainConverter();

@Override
public List<UserDomain> convert(Map<String, UserInfo> source) {
if (MapUtils.isNotEmpty(source)) {
return source.entrySet().stream().map(entry -> {
UserDomain domain = toDomain.convert(entry.getValue());
domain.setAccessKey(entry.getKey());
return domain;
}).toList();
}

return Collections.emptyList();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Copyright (c) 2020-2030 ZHENGGENGWEI(码匠君)<herodotus@aliyun.com>
*
* Dante Cloud licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* <http://www.apache.org/licenses/LICENSE-2.0>
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Dante OSS 采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
*
* 1.请不要删除和修改根目录下的LICENSE文件。
* 2.请不要删除和修改 Dante Cloud 源码头部的版权声明。
* 3.请保留源码和相关描述文件的项目出处,作者声明等。
* 4.分发源码时候,请注明软件出处 <https://gitee.com/herodotus/dante-oss>
* 5.在修改包名,模块名称,项目代码等时,请注明软件出处 <https://gitee.com/herodotus/dante-oss>
* 6.若您的项目无法满足以上几点,可申请商业授权
*/

package cn.herodotus.oss.minio.core.domain;

import cn.herodotus.engine.assistant.core.definition.domain.Entity;
import io.minio.admin.Status;

import java.util.List;

/**
* <p>Description: Minio Group Domain </p>
*
* @author : gengwei.zheng
* @date : 2023/6/25 15:24
*/
public class GroupDomain implements Entity {

private String name;

private Status status;

private List<String> members;

private String policy;

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public Status getStatus() {
return status;
}

public void setStatus(Status status) {
this.status = status;
}

public List<String> getMembers() {
return members;
}

public void setMembers(List<String> members) {
this.members = members;
}

public String getPolicy() {
return policy;
}

public void setPolicy(String policy) {
this.policy = policy;
}
}
Loading

0 comments on commit 7513220

Please sign in to comment.