我能够使用 API2 和 UAPI 从 cPanel 创建、恢复、列出完整备份,但我无法在 GO 中使用 API2 和 UAPI 从 cPanel 导出创建的备份 tar.gz 文件。
func (c CpanelApi) GetFileActions(dir, file string, newedit bool) (GetFileActionsApiResponse, error) {
var out GetFileActionsApiResponse
err := c.Gateway.API2("Fileman", "download", cpanelgo.Args{
"dir": dir,
"file": file,
}, &out)
return out, err
}