package com.ard.ossdock.service; import com.ard.ossdock.model.CredentialsDockDTO; import java.io.InputStream; import java.net.URL; /** * @author sean * @version 0.3 * @date 2021/12/23 */ public interface IOssDockService { public String getOssType(); /** * Get temporary credentials. * * @return */ public CredentialsDockDTO 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 */ public URL getObjectUrl(String bucket, String objectKey); /** * Deletes the object in the storage bucket. * * @param bucket * @param objectKey * @return */ public Boolean deleteObject(String bucket, String objectKey); /** * Get the contents of an object. * * @param bucket * @param objectKey * @return */ public InputStream getObject(String bucket, String objectKey); public void putObject(String bucket, String objectKey, InputStream input); public void putObject(String bucket, String objectKey, InputStream input, String contentType); public void createClient(); }