2024-03-02 00:55:46 +08:00
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/tickstep/aliyunpan-api/aliyunpan_open"
|
2024-03-03 14:02:05 +08:00
|
|
|
"github.com/tickstep/aliyunpan-api/aliyunpan_web"
|
2024-03-02 00:55:46 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
// PanClient 云盘客户端
|
|
|
|
PanClient struct {
|
|
|
|
// 网页WEB接口客户端
|
2024-03-03 14:07:35 +08:00
|
|
|
webapiPanClient *aliyunpan_web.WebPanClient
|
2024-03-02 00:55:46 +08:00
|
|
|
// 阿里openapi接口客户端
|
|
|
|
openapiPanClient *aliyunpan_open.OpenPanClient
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-03-03 14:07:35 +08:00
|
|
|
func NewPanClient(webClient *aliyunpan_web.WebPanClient, openClient *aliyunpan_open.OpenPanClient) *PanClient {
|
2024-03-02 00:55:46 +08:00
|
|
|
return &PanClient{
|
|
|
|
webapiPanClient: webClient,
|
|
|
|
openapiPanClient: openClient,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-03 14:07:35 +08:00
|
|
|
func (p *PanClient) WebapiPanClient() *aliyunpan_web.WebPanClient {
|
2024-03-02 00:55:46 +08:00
|
|
|
return p.webapiPanClient
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PanClient) OpenapiPanClient() *aliyunpan_open.OpenPanClient {
|
|
|
|
return p.openapiPanClient
|
|
|
|
}
|