zhaowenyu
2025-11-12 0f5b969ddd52ca43ef003867b5a6749d74b7d71d
ard-oss/src/main/java/com/ard/oss/service/IOssService.java
@@ -1,6 +1,7 @@
package com.ard.oss.service;
import com.ard.oss.model.CredentialsDTO;
import java.io.InputStream;
import java.net.URL;
@@ -11,40 +12,46 @@
 */
public interface IOssService {
    String getOssType();
    public String getOssType();
    /**
     * Get temporary credentials.
     *
     * @return
     */
    CredentialsDTO getCredentials();
    public CredentialsDTO getCredentials();
    /**
     * Get the address of the object based on the bucket name and the object name.
     *
     * @param bucket    bucket name
     * @param objectKey object name
     * @return download link
     */
    URL getObjectUrl(String bucket, String objectKey);
    public URL getObjectUrl(String bucket, String objectKey);
    /**
     * Deletes the object in the storage bucket.
     *
     * @param bucket
     * @param objectKey
     * @return
     */
    Boolean deleteObject(String bucket, String objectKey);
    public Boolean deleteObject(String bucket, String objectKey);
    /**
     * Get the contents of an object.
     *
     * @param bucket
     * @param objectKey
     * @return
     */
    InputStream getObject(String bucket, String objectKey);
    public InputStream getObject(String bucket, String objectKey);
    void putObject(String bucket, String objectKey, InputStream input);
    public void putObject(String bucket, String objectKey, InputStream input);
    void createClient();
    public void putObject(String bucket, String objectKey, InputStream input, String contentType);
    public void createClient();
}