package com.red.circle.external.inner.service.oss.impl;

import com.red.circle.component.oss.OssService;
import com.red.circle.component.oss.aliyun.service.AliYunStsService;
import com.red.circle.external.inner.service.oss.OssServiceClientService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * oss 服务api.
 *
 * @author pengliang on 2023/10/15
 */
@Service
@RequiredArgsConstructor
public class OssServiceClientServiceImpl implements OssServiceClientService {

  private final OssService ossService;
  private final AliYunStsService aliYunStsService;

  @Override
  public Object sts() {
    return aliYunStsService.getAcsResponse();
  }

  @Override
  public void remove(String url) {
    ossService.remove(url);
  }

  @Override
  public String getAccessUrl(String key) {
    return ossService.getAccessUrl(key);
  }

  @Override
  public String getVideoCover(String key) {
    return ossService.getVideoCover(key);
  }

  @Override
  public void processFileSaveAs(String source, String target, String styleType) {
    ossService.processFileSaveAs(source, target, styleType);
  }

  @Override
  public String processImgSaveAsCompressZoom(String source, String target, int height) {
    return ossService.processImgSaveAsCompressZoom(source, target, height);
  }

  @Override
  public String processImgSaveAsCompressZoom(String source, int height) {
    return ossService.processImgSaveAsCompressZoom(source, height);
  }

}
