package com.yd.oss.feign.client;

import com.yd.common.result.Result;
import com.yd.oss.feign.fallback.ApiOssStsFeignFallbackFactory;
import com.yd.oss.feign.response.ApiGetStsTokenResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * OSS服务信息Feign客户端
 */
@FeignClient(name = "yd-oss-api", fallbackFactory = ApiOssStsFeignFallbackFactory.class)
public interface ApiOssStsFeignClient {

    /**
     * 获取STS凭证
     * @return
     */
    @GetMapping("/sts-token")
    Result<ApiGetStsTokenResponse> getStsToken();
}
