Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

vendor: update github.com/dropbox/dropbox-sdk-go-unofficial to fix #1804

Nick Craig-Woodfc352c1ff6b4
diff --git a/Gopkg.lock b/Gopkg.lock
index 3ea13eaf2..2588010c1 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -83,7 +83,7 @@
branch = "master"
name = "github.com/dropbox/dropbox-sdk-go-unofficial"
packages = ["dropbox","dropbox/async","dropbox/file_properties","dropbox/files"]
- revision = "98997935f6b3ff4f4fa46275abaa23b02537178d"
+ revision = "9a536e3b58ed271dc9d1f21681db990ca601a551"
[[projects]]
name = "github.com/go-ini/ini"
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/README.md b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/README.md
index ee87fc119..1f01d345a 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/README.md
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/README.md
@@ -43,7 +43,10 @@ import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users"
func main() {
- config := dropbox.Config{Token: token, Verbose: true} // second arg enables verbose logging in the SDK
+ config := dropbox.Config{
+ Token: token,
+ LogLevel: dropbox.LogInfo, // if needed, set the desired logging level. Default is off
+ }
dbx := users.New(config)
// start making API calls
}
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async/types.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async/types.go
index 68f5260da..bfb21c818 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async/types.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async/types.go
@@ -72,13 +72,40 @@ func (u *LaunchResultBase) UnmarshalJSON(body []byte) error {
// the job, no additional information is returned.
type LaunchEmptyResult struct {
dropbox.Tagged
+ // AsyncJobId : This response indicates that the processing is asynchronous.
+ // The string is an id that can be used to obtain the status of the
+ // asynchronous job.
+ AsyncJobId string `json:"async_job_id,omitempty"`
}
// Valid tag values for LaunchEmptyResult
const (
- LaunchEmptyResultComplete = "complete"
+ LaunchEmptyResultAsyncJobId = "async_job_id"
+ LaunchEmptyResultComplete = "complete"
)
+// UnmarshalJSON deserializes into a LaunchEmptyResult instance
+func (u *LaunchEmptyResult) UnmarshalJSON(body []byte) error {
+ type wrap struct {
+ dropbox.Tagged
+ }
+ var w wrap
+ var err error
+ if err = json.Unmarshal(body, &w); err != nil {
+ return err
+ }
+ u.Tag = w.Tag
+ switch u.Tag {
+ case "async_job_id":
+ err = json.Unmarshal(body, &u.AsyncJobId)
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
// PollArg : Arguments for methods that poll the status of an asynchronous job.
type PollArg struct {
// AsyncJobId : Id of the asynchronous job. This is the value of a response
@@ -115,7 +142,8 @@ type PollEmptyResult struct {
// Valid tag values for PollEmptyResult
const (
- PollEmptyResultComplete = "complete"
+ PollEmptyResultInProgress = "in_progress"
+ PollEmptyResultComplete = "complete"
)
// PollError : Error returned by methods for polling the status of asynchronous
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth/client.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth/client.go
index a42038ef3..7247fc3b2 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth/client.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth/client.go
@@ -49,7 +49,7 @@ type TokenFromOauth1APIError struct {
func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -66,21 +66,21 @@ func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAut
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -130,21 +130,21 @@ func (dbx *apiImpl) TokenRevoke() (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/client.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/client.go
index d1d92bcec..c6e08f526 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/client.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/client.go
@@ -42,8 +42,8 @@ type Client interface {
// explicitly marked for deletion.
PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error)
// PropertiesRemove : Remove the specified property group from the file. To
- // remove specific property field key value pairs, see route
- // `propertiesUpdate`. To update a template, see `templatesUpdateForUser` or
+ // remove specific property field key value pairs, see `propertiesUpdate`.
+ // To update a template, see `templatesUpdateForUser` or
// `templatesUpdateForTeam`. Templates can't be removed once created.
PropertiesRemove(arg *RemovePropertiesArg) (err error)
// PropertiesSearch : Search across property templates for particular
@@ -57,21 +57,24 @@ type Client interface {
// `propertiesOverwrite` will delete any fields that are omitted from a
// property group.
PropertiesUpdate(arg *UpdatePropertiesArg) (err error)
- // TemplatesAddForTeam : Add a template associated with a team. See route
+ // TemplatesAddForTeam : Add a template associated with a team. See
// `propertiesAdd` to add properties to a file or folder.
TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error)
- // TemplatesAddForUser : Add a template associated with a user. See route
- // `propertiesAdd` to add properties to a file.
+ // TemplatesAddForUser : Add a template associated with a user. See
+ // `propertiesAdd` to add properties to a file. This endpoint can't be
+ // called on a team member or admin's behalf.
TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error)
// TemplatesGetForTeam : Get the schema for a specified template.
TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error)
- // TemplatesGetForUser : Get the schema for a specified template.
+ // TemplatesGetForUser : Get the schema for a specified template. This
+ // endpoint can't be called on a team member or admin's behalf.
TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error)
// TemplatesListForTeam : Get the template identifiers for a team. To get
// the schema of each template use `templatesGetForTeam`.
TemplatesListForTeam() (res *ListTemplateResult, err error)
// TemplatesListForUser : Get the template identifiers for a team. To get
- // the schema of each template use `templatesGetForUser`.
+ // the schema of each template use `templatesGetForUser`. This endpoint
+ // can't be called on a team member or admin's behalf.
TemplatesListForUser() (res *ListTemplateResult, err error)
// TemplatesUpdateForTeam : Update a template associated with a team. This
// route can update the template name, the template description and add
@@ -79,7 +82,8 @@ type Client interface {
TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
// TemplatesUpdateForUser : Update a template associated with a user. This
// route can update the template name, the template description and add
- // optional properties to templates.
+ // optional properties to templates. This endpoint can't be called on a team
+ // member or admin's behalf.
TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
}
@@ -94,7 +98,7 @@ type PropertiesAddAPIError struct {
func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -111,21 +115,21 @@ func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -161,7 +165,7 @@ type PropertiesOverwriteAPIError struct {
func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -178,21 +182,21 @@ func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err err
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -228,7 +232,7 @@ type PropertiesRemoveAPIError struct {
func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -245,21 +249,21 @@ func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -295,7 +299,7 @@ type PropertiesSearchAPIError struct {
func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -312,21 +316,21 @@ func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesS
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -367,7 +371,7 @@ type PropertiesUpdateAPIError struct {
func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -384,21 +388,21 @@ func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -434,7 +438,7 @@ type TemplatesAddForTeamAPIError struct {
func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -448,21 +452,21 @@ func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateRe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -503,7 +507,7 @@ type TemplatesAddForUserAPIError struct {
func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -520,21 +524,21 @@ func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateRe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -575,7 +579,7 @@ type TemplatesGetForTeamAPIError struct {
func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -589,21 +593,21 @@ func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateRe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -644,7 +648,7 @@ type TemplatesGetForUserAPIError struct {
func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -661,21 +665,21 @@ func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateRe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -722,21 +726,21 @@ func (dbx *apiImpl) TemplatesListForTeam() (res *ListTemplateResult, err error)
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -786,21 +790,21 @@ func (dbx *apiImpl) TemplatesListForUser() (res *ListTemplateResult, err error)
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -841,7 +845,7 @@ type TemplatesUpdateForTeamAPIError struct {
func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -855,21 +859,21 @@ func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateT
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -910,7 +914,7 @@ type TemplatesUpdateForUserAPIError struct {
func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -927,21 +931,21 @@ func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateT
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/types.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/types.go
index 8a7cab368..cb6780d76 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/types.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/types.go
@@ -95,12 +95,17 @@ func (u *TemplateError) UnmarshalJSON(body []byte) error {
// PropertiesError : has no documentation (yet)
type PropertiesError struct {
dropbox.Tagged
+ // TemplateNotFound : Template does not exist for the given identifier.
+ TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
}
// Valid tag values for PropertiesError
const (
+ PropertiesErrorTemplateNotFound = "template_not_found"
+ PropertiesErrorRestrictedContent = "restricted_content"
+ PropertiesErrorOther = "other"
PropertiesErrorPath = "path"
PropertiesErrorUnsupportedFolder = "unsupported_folder"
)
@@ -119,6 +124,12 @@ func (u *PropertiesError) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "template_not_found":
+ err = json.Unmarshal(body, &u.TemplateNotFound)
+
+ if err != nil {
+ return err
+ }
case "path":
err = json.Unmarshal(w.Path, &u.Path)
@@ -132,24 +143,104 @@ func (u *PropertiesError) UnmarshalJSON(body []byte) error {
// InvalidPropertyGroupError : has no documentation (yet)
type InvalidPropertyGroupError struct {
dropbox.Tagged
+ // TemplateNotFound : Template does not exist for the given identifier.
+ TemplateNotFound string `json:"template_not_found,omitempty"`
+ // Path : has no documentation (yet)
+ Path *LookupError `json:"path,omitempty"`
}
// Valid tag values for InvalidPropertyGroupError
const (
+ InvalidPropertyGroupErrorTemplateNotFound = "template_not_found"
+ InvalidPropertyGroupErrorRestrictedContent = "restricted_content"
+ InvalidPropertyGroupErrorOther = "other"
+ InvalidPropertyGroupErrorPath = "path"
+ InvalidPropertyGroupErrorUnsupportedFolder = "unsupported_folder"
InvalidPropertyGroupErrorPropertyFieldTooLarge = "property_field_too_large"
InvalidPropertyGroupErrorDoesNotFitTemplate = "does_not_fit_template"
)
+// UnmarshalJSON deserializes into a InvalidPropertyGroupError instance
+func (u *InvalidPropertyGroupError) UnmarshalJSON(body []byte) error {
+ type wrap struct {
+ dropbox.Tagged
+ // Path : has no documentation (yet)
+ Path json.RawMessage `json:"path,omitempty"`
+ }
+ var w wrap
+ var err error
+ if err = json.Unmarshal(body, &w); err != nil {
+ return err
+ }
+ u.Tag = w.Tag
+ switch u.Tag {
+ case "template_not_found":
+ err = json.Unmarshal(body, &u.TemplateNotFound)
+
+ if err != nil {
+ return err
+ }
+ case "path":
+ err = json.Unmarshal(w.Path, &u.Path)
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
// AddPropertiesError : has no documentation (yet)
type AddPropertiesError struct {
dropbox.Tagged
+ // TemplateNotFound : Template does not exist for the given identifier.
+ TemplateNotFound string `json:"template_not_found,omitempty"`
+ // Path : has no documentation (yet)
+ Path *LookupError `json:"path,omitempty"`
}
// Valid tag values for AddPropertiesError
const (
+ AddPropertiesErrorTemplateNotFound = "template_not_found"
+ AddPropertiesErrorRestrictedContent = "restricted_content"
+ AddPropertiesErrorOther = "other"
+ AddPropertiesErrorPath = "path"
+ AddPropertiesErrorUnsupportedFolder = "unsupported_folder"
+ AddPropertiesErrorPropertyFieldTooLarge = "property_field_too_large"
+ AddPropertiesErrorDoesNotFitTemplate = "does_not_fit_template"
AddPropertiesErrorPropertyGroupAlreadyExists = "property_group_already_exists"
)
+// UnmarshalJSON deserializes into a AddPropertiesError instance
+func (u *AddPropertiesError) UnmarshalJSON(body []byte) error {
+ type wrap struct {
+ dropbox.Tagged
+ // Path : has no documentation (yet)
+ Path json.RawMessage `json:"path,omitempty"`
+ }
+ var w wrap
+ var err error
+ if err = json.Unmarshal(body, &w); err != nil {
+ return err
+ }
+ u.Tag = w.Tag
+ switch u.Tag {
+ case "template_not_found":
+ err = json.Unmarshal(body, &u.TemplateNotFound)
+
+ if err != nil {
+ return err
+ }
+ case "path":
+ err = json.Unmarshal(w.Path, &u.Path)
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
// PropertyGroupTemplate : Defines how a property group may be structured.
type PropertyGroupTemplate struct {
// Name : Display name for the template. Template names can be up to 256
@@ -306,16 +397,43 @@ func (u *LookupError) UnmarshalJSON(body []byte) error {
// ModifyTemplateError : has no documentation (yet)
type ModifyTemplateError struct {
dropbox.Tagged
+ // TemplateNotFound : Template does not exist for the given identifier.
+ TemplateNotFound string `json:"template_not_found,omitempty"`
}
// Valid tag values for ModifyTemplateError
const (
+ ModifyTemplateErrorTemplateNotFound = "template_not_found"
+ ModifyTemplateErrorRestrictedContent = "restricted_content"
+ ModifyTemplateErrorOther = "other"
ModifyTemplateErrorConflictingPropertyNames = "conflicting_property_names"
ModifyTemplateErrorTooManyProperties = "too_many_properties"
ModifyTemplateErrorTooManyTemplates = "too_many_templates"
ModifyTemplateErrorTemplateAttributeTooLarge = "template_attribute_too_large"
)
+// UnmarshalJSON deserializes into a ModifyTemplateError instance
+func (u *ModifyTemplateError) UnmarshalJSON(body []byte) error {
+ type wrap struct {
+ dropbox.Tagged
+ }
+ var w wrap
+ var err error
+ if err = json.Unmarshal(body, &w); err != nil {
+ return err
+ }
+ u.Tag = w.Tag
+ switch u.Tag {
+ case "template_not_found":
+ err = json.Unmarshal(body, &u.TemplateNotFound)
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
// OverwritePropertyGroupArg : has no documentation (yet)
type OverwritePropertyGroupArg struct {
// Path : A unique identifier for the file or folder.
@@ -584,12 +702,21 @@ func NewRemovePropertiesArg(Path string, PropertyTemplateIds []string) *RemovePr
// RemovePropertiesError : has no documentation (yet)
type RemovePropertiesError struct {
dropbox.Tagged
+ // TemplateNotFound : Template does not exist for the given identifier.
+ TemplateNotFound string `json:"template_not_found,omitempty"`
+ // Path : has no documentation (yet)
+ Path *LookupError `json:"path,omitempty"`
// PropertyGroupLookup : has no documentation (yet)
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
}
// Valid tag values for RemovePropertiesError
const (
+ RemovePropertiesErrorTemplateNotFound = "template_not_found"
+ RemovePropertiesErrorRestrictedContent = "restricted_content"
+ RemovePropertiesErrorOther = "other"
+ RemovePropertiesErrorPath = "path"
+ RemovePropertiesErrorUnsupportedFolder = "unsupported_folder"
RemovePropertiesErrorPropertyGroupLookup = "property_group_lookup"
)
@@ -597,6 +724,8 @@ const (
func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
+ // Path : has no documentation (yet)
+ Path json.RawMessage `json:"path,omitempty"`
// PropertyGroupLookup : has no documentation (yet)
PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"`
}
@@ -607,6 +736,18 @@ func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "template_not_found":
+ err = json.Unmarshal(body, &u.TemplateNotFound)
+
+ if err != nil {
+ return err
+ }
+ case "path":
+ err = json.Unmarshal(w.Path, &u.Path)
+
+ if err != nil {
+ return err
+ }
case "property_group_lookup":
err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup)
@@ -688,19 +829,32 @@ func NewUpdatePropertiesArg(Path string, UpdatePropertyGroups []*PropertyGroupUp
// UpdatePropertiesError : has no documentation (yet)
type UpdatePropertiesError struct {
dropbox.Tagged
+ // TemplateNotFound : Template does not exist for the given identifier.
+ TemplateNotFound string `json:"template_not_found,omitempty"`
+ // Path : has no documentation (yet)
+ Path *LookupError `json:"path,omitempty"`
// PropertyGroupLookup : has no documentation (yet)
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
}
// Valid tag values for UpdatePropertiesError
const (
- UpdatePropertiesErrorPropertyGroupLookup = "property_group_lookup"
+ UpdatePropertiesErrorTemplateNotFound = "template_not_found"
+ UpdatePropertiesErrorRestrictedContent = "restricted_content"
+ UpdatePropertiesErrorOther = "other"
+ UpdatePropertiesErrorPath = "path"
+ UpdatePropertiesErrorUnsupportedFolder = "unsupported_folder"
+ UpdatePropertiesErrorPropertyFieldTooLarge = "property_field_too_large"
+ UpdatePropertiesErrorDoesNotFitTemplate = "does_not_fit_template"
+ UpdatePropertiesErrorPropertyGroupLookup = "property_group_lookup"
)
// UnmarshalJSON deserializes into a UpdatePropertiesError instance
func (u *UpdatePropertiesError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
+ // Path : has no documentation (yet)
+ Path json.RawMessage `json:"path,omitempty"`
// PropertyGroupLookup : has no documentation (yet)
PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"`
}
@@ -711,6 +865,18 @@ func (u *UpdatePropertiesError) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "template_not_found":
+ err = json.Unmarshal(body, &u.TemplateNotFound)
+
+ if err != nil {
+ return err
+ }
+ case "path":
+ err = json.Unmarshal(w.Path, &u.Path)
+
+ if err != nil {
+ return err
+ }
case "property_group_lookup":
err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup)
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/client.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/client.go
index ccb7a39b7..260636050 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/client.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/client.go
@@ -54,7 +54,7 @@ type CreateAPIError struct {
func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileRequest, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -71,21 +71,21 @@ func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileRequest, err er
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -126,7 +126,7 @@ type GetAPIError struct {
func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -143,21 +143,21 @@ func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -207,21 +207,21 @@ func (dbx *apiImpl) List() (res *ListFileRequestsResult, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -262,7 +262,7 @@ type UpdateAPIError struct {
func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -279,21 +279,21 @@ func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err er
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/types.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/types.go
index 8d7c945f9..206d7a06f 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/types.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/types.go
@@ -19,8 +19,7 @@
// THE SOFTWARE.
// Package file_requests : This namespace contains endpoints and data types for
-// file request operations. Warning: This namespace is in beta and is subject to
-// backwards-incompatible changes.
+// file request operations.
package file_requests
import (
@@ -75,6 +74,8 @@ type FileRequestError struct {
// Valid tag values for FileRequestError
const (
+ FileRequestErrorDisabledForTeam = "disabled_for_team"
+ FileRequestErrorOther = "other"
FileRequestErrorNotFound = "not_found"
FileRequestErrorNotAFolder = "not_a_folder"
FileRequestErrorAppLacksAccess = "app_lacks_access"
@@ -90,6 +91,14 @@ type CreateFileRequestError struct {
// Valid tag values for CreateFileRequestError
const (
+ CreateFileRequestErrorDisabledForTeam = "disabled_for_team"
+ CreateFileRequestErrorOther = "other"
+ CreateFileRequestErrorNotFound = "not_found"
+ CreateFileRequestErrorNotAFolder = "not_a_folder"
+ CreateFileRequestErrorAppLacksAccess = "app_lacks_access"
+ CreateFileRequestErrorNoPermission = "no_permission"
+ CreateFileRequestErrorEmailUnverified = "email_unverified"
+ CreateFileRequestErrorValidationError = "validation_error"
CreateFileRequestErrorInvalidLocation = "invalid_location"
CreateFileRequestErrorRateLimit = "rate_limit"
)
@@ -167,7 +176,16 @@ type GetFileRequestError struct {
}
// Valid tag values for GetFileRequestError
-const ()
+const (
+ GetFileRequestErrorDisabledForTeam = "disabled_for_team"
+ GetFileRequestErrorOther = "other"
+ GetFileRequestErrorNotFound = "not_found"
+ GetFileRequestErrorNotAFolder = "not_a_folder"
+ GetFileRequestErrorAppLacksAccess = "app_lacks_access"
+ GetFileRequestErrorNoPermission = "no_permission"
+ GetFileRequestErrorEmailUnverified = "email_unverified"
+ GetFileRequestErrorValidationError = "validation_error"
+)
// GracePeriod : has no documentation (yet)
type GracePeriod struct {
@@ -190,7 +208,10 @@ type ListFileRequestsError struct {
}
// Valid tag values for ListFileRequestsError
-const ()
+const (
+ ListFileRequestsErrorDisabledForTeam = "disabled_for_team"
+ ListFileRequestsErrorOther = "other"
+)
// ListFileRequestsResult : Result for `list`.
type ListFileRequestsResult struct {
@@ -274,4 +295,13 @@ type UpdateFileRequestError struct {
}
// Valid tag values for UpdateFileRequestError
-const ()
+const (
+ UpdateFileRequestErrorDisabledForTeam = "disabled_for_team"
+ UpdateFileRequestErrorOther = "other"
+ UpdateFileRequestErrorNotFound = "not_found"
+ UpdateFileRequestErrorNotAFolder = "not_a_folder"
+ UpdateFileRequestErrorAppLacksAccess = "app_lacks_access"
+ UpdateFileRequestErrorNoPermission = "no_permission"
+ UpdateFileRequestErrorEmailUnverified = "email_unverified"
+ UpdateFileRequestErrorValidationError = "validation_error"
+)
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/client.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/client.go
index 3ac69599f..cd9dbbda7 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/client.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/client.go
@@ -164,7 +164,15 @@ type Client interface {
// server-side notifications, check out our `webhooks documentation`
// <https://www.dropbox.com/developers/reference/webhooks>.
ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFolderLongpollResult, err error)
- // ListRevisions : Return revisions of a file.
+ // ListRevisions : Returns revisions for files based on a file path or a
+ // file id. The file path or file id is identified from the latest file
+ // entry at the given file path or id. This end point allows your app to
+ // query either by file path or file id by setting the mode parameter
+ // appropriately. In the `ListRevisionsMode.path` (default) mode, all
+ // revisions at the same file path as the latest file entry are returned. If
+ // revisions with the same file id are desired, then mode must be set to
+ // `ListRevisionsMode.id`. The `ListRevisionsMode.id` mode is useful to
+ // retrieve revisions for a given file across moves or renames.
ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResult, err error)
// Move : Move a file or folder to a different location in the user's
// Dropbox. If the source path is a folder all its contents will be moved.
@@ -274,7 +282,7 @@ type AlphaGetMetadataAPIError struct {
func (dbx *apiImpl) AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -291,21 +299,21 @@ func (dbx *apiImpl) AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata,
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
var tmp metadataUnion
err = json.Unmarshal(body, &tmp)
@@ -357,7 +365,7 @@ type AlphaUploadAPIError struct {
func (dbx *apiImpl) AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -375,21 +383,21 @@ func (dbx *apiImpl) AlphaUpload(arg *CommitInfoWithProperties, content io.Reader
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -433,7 +441,7 @@ func (dbx *apiImpl) Copy(arg *RelocationArg) (res IsMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -450,21 +458,21 @@ func (dbx *apiImpl) Copy(arg *RelocationArg) (res IsMetadata, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
var tmp metadataUnion
err = json.Unmarshal(body, &tmp)
@@ -516,7 +524,7 @@ type CopyBatchAPIError struct {
func (dbx *apiImpl) CopyBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -533,21 +541,21 @@ func (dbx *apiImpl) CopyBatch(arg *RelocationBatchArg) (res *RelocationBatchLaun
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -588,7 +596,7 @@ type CopyBatchCheckAPIError struct {
func (dbx *apiImpl) CopyBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -605,21 +613,21 @@ func (dbx *apiImpl) CopyBatchCheck(arg *async.PollArg) (res *RelocationBatchJobS
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -660,7 +668,7 @@ type CopyReferenceGetAPIError struct {
func (dbx *apiImpl) CopyReferenceGet(arg *GetCopyReferenceArg) (res *GetCopyReferenceResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -677,21 +685,21 @@ func (dbx *apiImpl) CopyReferenceGet(arg *GetCopyReferenceArg) (res *GetCopyRefe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -732,7 +740,7 @@ type CopyReferenceSaveAPIError struct {
func (dbx *apiImpl) CopyReferenceSave(arg *SaveCopyReferenceArg) (res *SaveCopyReferenceResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -749,21 +757,21 @@ func (dbx *apiImpl) CopyReferenceSave(arg *SaveCopyReferenceArg) (res *SaveCopyR
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -804,7 +812,7 @@ type CopyV2APIError struct {
func (dbx *apiImpl) CopyV2(arg *RelocationArg) (res *RelocationResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -821,21 +829,21 @@ func (dbx *apiImpl) CopyV2(arg *RelocationArg) (res *RelocationResult, err error
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -879,7 +887,7 @@ func (dbx *apiImpl) CreateFolder(arg *CreateFolderArg) (res *FolderMetadata, err
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -896,21 +904,21 @@ func (dbx *apiImpl) CreateFolder(arg *CreateFolderArg) (res *FolderMetadata, err
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -951,7 +959,7 @@ type CreateFolderV2APIError struct {
func (dbx *apiImpl) CreateFolderV2(arg *CreateFolderArg) (res *CreateFolderResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -968,21 +976,21 @@ func (dbx *apiImpl) CreateFolderV2(arg *CreateFolderArg) (res *CreateFolderResul
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1026,7 +1034,7 @@ func (dbx *apiImpl) Delete(arg *DeleteArg) (res IsMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1043,21 +1051,21 @@ func (dbx *apiImpl) Delete(arg *DeleteArg) (res IsMetadata, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
var tmp metadataUnion
err = json.Unmarshal(body, &tmp)
@@ -1109,7 +1117,7 @@ type DeleteBatchAPIError struct {
func (dbx *apiImpl) DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatchLaunch, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1126,21 +1134,21 @@ func (dbx *apiImpl) DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatchLaunch, er
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1181,7 +1189,7 @@ type DeleteBatchCheckAPIError struct {
func (dbx *apiImpl) DeleteBatchCheck(arg *async.PollArg) (res *DeleteBatchJobStatus, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1198,21 +1206,21 @@ func (dbx *apiImpl) DeleteBatchCheck(arg *async.PollArg) (res *DeleteBatchJobSta
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1253,7 +1261,7 @@ type DeleteV2APIError struct {
func (dbx *apiImpl) DeleteV2(arg *DeleteArg) (res *DeleteResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1270,21 +1278,21 @@ func (dbx *apiImpl) DeleteV2(arg *DeleteArg) (res *DeleteResult, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1325,7 +1333,7 @@ type DownloadAPIError struct {
func (dbx *apiImpl) Download(arg *DownloadArg) (res *FileMetadata, content io.ReadCloser, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1345,17 +1353,17 @@ func (dbx *apiImpl) Download(arg *DownloadArg) (res *FileMetadata, content io.Re
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
body := []byte(resp.Header.Get("Dropbox-API-Result"))
content = resp.Body
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusPartialContent {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1365,6 +1373,11 @@ func (dbx *apiImpl) Download(arg *DownloadArg) (res *FileMetadata, content io.Re
return
}
if resp.StatusCode == http.StatusConflict {
+ defer resp.Body.Close()
+ body, err = ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return
+ }
var apiError DownloadAPIError
err = json.Unmarshal(body, &apiError)
if err != nil {
@@ -1396,7 +1409,7 @@ type GetMetadataAPIError struct {
func (dbx *apiImpl) GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1413,21 +1426,21 @@ func (dbx *apiImpl) GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error)
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
var tmp metadataUnion
err = json.Unmarshal(body, &tmp)
@@ -1479,7 +1492,7 @@ type GetPreviewAPIError struct {
func (dbx *apiImpl) GetPreview(arg *PreviewArg) (res *FileMetadata, content io.ReadCloser, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1496,17 +1509,17 @@ func (dbx *apiImpl) GetPreview(arg *PreviewArg) (res *FileMetadata, content io.R
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
body := []byte(resp.Header.Get("Dropbox-API-Result"))
content = resp.Body
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1516,6 +1529,11 @@ func (dbx *apiImpl) GetPreview(arg *PreviewArg) (res *FileMetadata, content io.R
return
}
if resp.StatusCode == http.StatusConflict {
+ defer resp.Body.Close()
+ body, err = ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return
+ }
var apiError GetPreviewAPIError
err = json.Unmarshal(body, &apiError)
if err != nil {
@@ -1547,7 +1565,7 @@ type GetTemporaryLinkAPIError struct {
func (dbx *apiImpl) GetTemporaryLink(arg *GetTemporaryLinkArg) (res *GetTemporaryLinkResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1564,21 +1582,21 @@ func (dbx *apiImpl) GetTemporaryLink(arg *GetTemporaryLinkArg) (res *GetTemporar
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1619,7 +1637,7 @@ type GetThumbnailAPIError struct {
func (dbx *apiImpl) GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content io.ReadCloser, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1636,17 +1654,17 @@ func (dbx *apiImpl) GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
body := []byte(resp.Header.Get("Dropbox-API-Result"))
content = resp.Body
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1656,6 +1674,11 @@ func (dbx *apiImpl) GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content
return
}
if resp.StatusCode == http.StatusConflict {
+ defer resp.Body.Close()
+ body, err = ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return
+ }
var apiError GetThumbnailAPIError
err = json.Unmarshal(body, &apiError)
if err != nil {
@@ -1687,7 +1710,7 @@ type GetThumbnailBatchAPIError struct {
func (dbx *apiImpl) GetThumbnailBatch(arg *GetThumbnailBatchArg) (res *GetThumbnailBatchResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1704,21 +1727,21 @@ func (dbx *apiImpl) GetThumbnailBatch(arg *GetThumbnailBatchArg) (res *GetThumbn
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1759,7 +1782,7 @@ type ListFolderAPIError struct {
func (dbx *apiImpl) ListFolder(arg *ListFolderArg) (res *ListFolderResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1776,21 +1799,21 @@ func (dbx *apiImpl) ListFolder(arg *ListFolderArg) (res *ListFolderResult, err e
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1831,7 +1854,7 @@ type ListFolderContinueAPIError struct {
func (dbx *apiImpl) ListFolderContinue(arg *ListFolderContinueArg) (res *ListFolderResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1848,21 +1871,21 @@ func (dbx *apiImpl) ListFolderContinue(arg *ListFolderContinueArg) (res *ListFol
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1903,7 +1926,7 @@ type ListFolderGetLatestCursorAPIError struct {
func (dbx *apiImpl) ListFolderGetLatestCursor(arg *ListFolderArg) (res *ListFolderGetLatestCursorResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1920,21 +1943,21 @@ func (dbx *apiImpl) ListFolderGetLatestCursor(arg *ListFolderArg) (res *ListFold
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1975,7 +1998,7 @@ type ListFolderLongpollAPIError struct {
func (dbx *apiImpl) ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFolderLongpollResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1989,21 +2012,21 @@ func (dbx *apiImpl) ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFol
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2044,7 +2067,7 @@ type ListRevisionsAPIError struct {
func (dbx *apiImpl) ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2061,21 +2084,21 @@ func (dbx *apiImpl) ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResu
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2119,7 +2142,7 @@ func (dbx *apiImpl) Move(arg *RelocationArg) (res IsMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2136,21 +2159,21 @@ func (dbx *apiImpl) Move(arg *RelocationArg) (res IsMetadata, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
var tmp metadataUnion
err = json.Unmarshal(body, &tmp)
@@ -2202,7 +2225,7 @@ type MoveBatchAPIError struct {
func (dbx *apiImpl) MoveBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2219,21 +2242,21 @@ func (dbx *apiImpl) MoveBatch(arg *RelocationBatchArg) (res *RelocationBatchLaun
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2274,7 +2297,7 @@ type MoveBatchCheckAPIError struct {
func (dbx *apiImpl) MoveBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2291,21 +2314,21 @@ func (dbx *apiImpl) MoveBatchCheck(arg *async.PollArg) (res *RelocationBatchJobS
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2346,7 +2369,7 @@ type MoveV2APIError struct {
func (dbx *apiImpl) MoveV2(arg *RelocationArg) (res *RelocationResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2363,21 +2386,21 @@ func (dbx *apiImpl) MoveV2(arg *RelocationArg) (res *RelocationResult, err error
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2418,7 +2441,7 @@ type PermanentlyDeleteAPIError struct {
func (dbx *apiImpl) PermanentlyDelete(arg *DeleteArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2435,21 +2458,21 @@ func (dbx *apiImpl) PermanentlyDelete(arg *DeleteArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2487,7 +2510,7 @@ func (dbx *apiImpl) PropertiesAdd(arg *file_properties.AddPropertiesArg) (err er
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2504,21 +2527,21 @@ func (dbx *apiImpl) PropertiesAdd(arg *file_properties.AddPropertiesArg) (err er
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2556,7 +2579,7 @@ func (dbx *apiImpl) PropertiesOverwrite(arg *file_properties.OverwritePropertyGr
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2573,21 +2596,21 @@ func (dbx *apiImpl) PropertiesOverwrite(arg *file_properties.OverwritePropertyGr
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2625,7 +2648,7 @@ func (dbx *apiImpl) PropertiesRemove(arg *file_properties.RemovePropertiesArg) (
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2642,21 +2665,21 @@ func (dbx *apiImpl) PropertiesRemove(arg *file_properties.RemovePropertiesArg) (
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2694,7 +2717,7 @@ func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2711,21 +2734,21 @@ func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2777,21 +2800,21 @@ func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.ListTemplateR
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2834,7 +2857,7 @@ func (dbx *apiImpl) PropertiesUpdate(arg *file_properties.UpdatePropertiesArg) (
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2851,21 +2874,21 @@ func (dbx *apiImpl) PropertiesUpdate(arg *file_properties.UpdatePropertiesArg) (
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2901,7 +2924,7 @@ type RestoreAPIError struct {
func (dbx *apiImpl) Restore(arg *RestoreArg) (res *FileMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2918,21 +2941,21 @@ func (dbx *apiImpl) Restore(arg *RestoreArg) (res *FileMetadata, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2973,7 +2996,7 @@ type SaveUrlAPIError struct {
func (dbx *apiImpl) SaveUrl(arg *SaveUrlArg) (res *SaveUrlResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2990,21 +3013,21 @@ func (dbx *apiImpl) SaveUrl(arg *SaveUrlArg) (res *SaveUrlResult, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3045,7 +3068,7 @@ type SaveUrlCheckJobStatusAPIError struct {
func (dbx *apiImpl) SaveUrlCheckJobStatus(arg *async.PollArg) (res *SaveUrlJobStatus, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3062,21 +3085,21 @@ func (dbx *apiImpl) SaveUrlCheckJobStatus(arg *async.PollArg) (res *SaveUrlJobSt
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3117,7 +3140,7 @@ type SearchAPIError struct {
func (dbx *apiImpl) Search(arg *SearchArg) (res *SearchResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3134,21 +3157,21 @@ func (dbx *apiImpl) Search(arg *SearchArg) (res *SearchResult, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3189,7 +3212,7 @@ type UploadAPIError struct {
func (dbx *apiImpl) Upload(arg *CommitInfo, content io.Reader) (res *FileMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3207,21 +3230,21 @@ func (dbx *apiImpl) Upload(arg *CommitInfo, content io.Reader) (res *FileMetadat
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3265,7 +3288,7 @@ func (dbx *apiImpl) UploadSessionAppend(arg *UploadSessionCursor, content io.Rea
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3283,21 +3306,21 @@ func (dbx *apiImpl) UploadSessionAppend(arg *UploadSessionCursor, content io.Rea
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -3333,7 +3356,7 @@ type UploadSessionAppendV2APIError struct {
func (dbx *apiImpl) UploadSessionAppendV2(arg *UploadSessionAppendArg, content io.Reader) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3351,21 +3374,21 @@ func (dbx *apiImpl) UploadSessionAppendV2(arg *UploadSessionAppendArg, content i
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -3401,7 +3424,7 @@ type UploadSessionFinishAPIError struct {
func (dbx *apiImpl) UploadSessionFinish(arg *UploadSessionFinishArg, content io.Reader) (res *FileMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3419,21 +3442,21 @@ func (dbx *apiImpl) UploadSessionFinish(arg *UploadSessionFinishArg, content io.
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3474,7 +3497,7 @@ type UploadSessionFinishBatchAPIError struct {
func (dbx *apiImpl) UploadSessionFinishBatch(arg *UploadSessionFinishBatchArg) (res *UploadSessionFinishBatchLaunch, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3491,21 +3514,21 @@ func (dbx *apiImpl) UploadSessionFinishBatch(arg *UploadSessionFinishBatchArg) (
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3546,7 +3569,7 @@ type UploadSessionFinishBatchCheckAPIError struct {
func (dbx *apiImpl) UploadSessionFinishBatchCheck(arg *async.PollArg) (res *UploadSessionFinishBatchJobStatus, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3563,21 +3586,21 @@ func (dbx *apiImpl) UploadSessionFinishBatchCheck(arg *async.PollArg) (res *Uplo
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3618,7 +3641,7 @@ type UploadSessionStartAPIError struct {
func (dbx *apiImpl) UploadSessionStart(arg *UploadSessionStartArg, content io.Reader) (res *UploadSessionStartResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3636,21 +3659,21 @@ func (dbx *apiImpl) UploadSessionStart(arg *UploadSessionStartArg, content io.Re
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/types.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/types.go
index 6af41bd97..0ad0f8324 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/types.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/types.go
@@ -113,12 +113,15 @@ func (u *GetMetadataError) UnmarshalJSON(body []byte) error {
// AlphaGetMetadataError : has no documentation (yet)
type AlphaGetMetadataError struct {
dropbox.Tagged
+ // Path : has no documentation (yet)
+ Path *LookupError `json:"path,omitempty"`
// PropertiesError : has no documentation (yet)
PropertiesError *file_properties.LookUpPropertiesError `json:"properties_error,omitempty"`
}
// Valid tag values for AlphaGetMetadataError
const (
+ AlphaGetMetadataErrorPath = "path"
AlphaGetMetadataErrorPropertiesError = "properties_error"
)
@@ -126,6 +129,8 @@ const (
func (u *AlphaGetMetadataError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
+ // Path : has no documentation (yet)
+ Path json.RawMessage `json:"path,omitempty"`
// PropertiesError : has no documentation (yet)
PropertiesError json.RawMessage `json:"properties_error,omitempty"`
}
@@ -136,6 +141,12 @@ func (u *AlphaGetMetadataError) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "path":
+ err = json.Unmarshal(w.Path, &u.Path)
+
+ if err != nil {
+ return err
+ }
case "properties_error":
err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
@@ -320,9 +331,10 @@ type DeleteBatchJobStatus struct {
// Valid tag values for DeleteBatchJobStatus
const (
- DeleteBatchJobStatusComplete = "complete"
- DeleteBatchJobStatusFailed = "failed"
- DeleteBatchJobStatusOther = "other"
+ DeleteBatchJobStatusInProgress = "in_progress"
+ DeleteBatchJobStatusComplete = "complete"
+ DeleteBatchJobStatusFailed = "failed"
+ DeleteBatchJobStatusOther = "other"
)
// UnmarshalJSON deserializes into a DeleteBatchJobStatus instance
@@ -361,14 +373,19 @@ func (u *DeleteBatchJobStatus) UnmarshalJSON(body []byte) error {
// an asynchronous job or complete synchronously.
type DeleteBatchLaunch struct {
dropbox.Tagged
+ // AsyncJobId : This response indicates that the processing is asynchronous.
+ // The string is an id that can be used to obtain the status of the
+ // asynchronous job.
+ AsyncJobId string `json:"async_job_id,omitempty"`
// Complete : has no documentation (yet)
Complete *DeleteBatchResult `json:"complete,omitempty"`
}
// Valid tag values for DeleteBatchLaunch
const (
- DeleteBatchLaunchComplete = "complete"
- DeleteBatchLaunchOther = "other"
+ DeleteBatchLaunchAsyncJobId = "async_job_id"
+ DeleteBatchLaunchComplete = "complete"
+ DeleteBatchLaunchOther = "other"
)
// UnmarshalJSON deserializes into a DeleteBatchLaunch instance
@@ -385,6 +402,12 @@ func (u *DeleteBatchLaunch) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "async_job_id":
+ err = json.Unmarshal(body, &u.AsyncJobId)
+
+ if err != nil {
+ return err
+ }
case "complete":
err = json.Unmarshal(body, &u.Complete)
@@ -1144,6 +1167,11 @@ type ListFolderArg struct {
// is an approximate number and there can be slightly more entries returned
// in some cases.
Limit uint32 `json:"limit,omitempty"`
+ // SharedLink : A shared link to list the contents of. If the link is
+ // password-protected, the password must be provided. If this field is
+ // present, `ListFolderArg.path` will be relative to root of the shared
+ // link. Only non-recursive mode is supported for shared link.
+ SharedLink *SharedLink `json:"shared_link,omitempty"`
}
// NewListFolderArg returns a new ListFolderArg instance
@@ -1335,6 +1363,9 @@ func NewListFolderResult(Entries []IsMetadata, Cursor string, HasMore bool) *Lis
type ListRevisionsArg struct {
// Path : The path to the file you want to see the revisions of.
Path string `json:"path"`
+ // Mode : Determines the behavior of the API in listing the revisions for a
+ // given file path or id.
+ Mode *ListRevisionsMode `json:"mode"`
// Limit : The maximum number of revision entries returned.
Limit uint64 `json:"limit"`
}
@@ -1343,6 +1374,7 @@ type ListRevisionsArg struct {
func NewListRevisionsArg(Path string) *ListRevisionsArg {
s := new(ListRevisionsArg)
s.Path = Path
+ s.Mode = &ListRevisionsMode{Tagged: dropbox.Tagged{"path"}}
s.Limit = 10
return s
}
@@ -1384,9 +1416,22 @@ func (u *ListRevisionsError) UnmarshalJSON(body []byte) error {
return nil
}
+// ListRevisionsMode : has no documentation (yet)
+type ListRevisionsMode struct {
+ dropbox.Tagged
+}
+
+// Valid tag values for ListRevisionsMode
+const (
+ ListRevisionsModePath = "path"
+ ListRevisionsModeId = "id"
+ ListRevisionsModeOther = "other"
+)
+
// ListRevisionsResult : has no documentation (yet)
type ListRevisionsResult struct {
- // IsDeleted : If the file is deleted.
+ // IsDeleted : If the file identified by the latest revision in the response
+ // is either deleted or moved.
IsDeleted bool `json:"is_deleted"`
// ServerDeleted : The time of deletion if the file was deleted.
ServerDeleted time.Time `json:"server_deleted,omitempty"`
@@ -1773,13 +1818,69 @@ func (u *RelocationError) UnmarshalJSON(body []byte) error {
// RelocationBatchError : has no documentation (yet)
type RelocationBatchError struct {
dropbox.Tagged
+ // FromLookup : has no documentation (yet)
+ FromLookup *LookupError `json:"from_lookup,omitempty"`
+ // FromWrite : has no documentation (yet)
+ FromWrite *WriteError `json:"from_write,omitempty"`
+ // To : has no documentation (yet)
+ To *WriteError `json:"to,omitempty"`
}
// Valid tag values for RelocationBatchError
const (
- RelocationBatchErrorTooManyWriteOperations = "too_many_write_operations"
+ RelocationBatchErrorFromLookup = "from_lookup"
+ RelocationBatchErrorFromWrite = "from_write"
+ RelocationBatchErrorTo = "to"
+ RelocationBatchErrorCantCopySharedFolder = "cant_copy_shared_folder"
+ RelocationBatchErrorCantNestSharedFolder = "cant_nest_shared_folder"
+ RelocationBatchErrorCantMoveFolderIntoItself = "cant_move_folder_into_itself"
+ RelocationBatchErrorTooManyFiles = "too_many_files"
+ RelocationBatchErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
+ RelocationBatchErrorCantTransferOwnership = "cant_transfer_ownership"
+ RelocationBatchErrorOther = "other"
+ RelocationBatchErrorTooManyWriteOperations = "too_many_write_operations"
)
+// UnmarshalJSON deserializes into a RelocationBatchError instance
+func (u *RelocationBatchError) UnmarshalJSON(body []byte) error {
+ type wrap struct {
+ dropbox.Tagged
+ // FromLookup : has no documentation (yet)
+ FromLookup json.RawMessage `json:"from_lookup,omitempty"`
+ // FromWrite : has no documentation (yet)
+ FromWrite json.RawMessage `json:"from_write,omitempty"`
+ // To : has no documentation (yet)
+ To json.RawMessage `json:"to,omitempty"`
+ }
+ var w wrap
+ var err error
+ if err = json.Unmarshal(body, &w); err != nil {
+ return err
+ }
+ u.Tag = w.Tag
+ switch u.Tag {
+ case "from_lookup":
+ err = json.Unmarshal(w.FromLookup, &u.FromLookup)
+
+ if err != nil {
+ return err
+ }
+ case "from_write":
+ err = json.Unmarshal(w.FromWrite, &u.FromWrite)
+
+ if err != nil {
+ return err
+ }
+ case "to":
+ err = json.Unmarshal(w.To, &u.To)
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
// RelocationBatchJobStatus : has no documentation (yet)
type RelocationBatchJobStatus struct {
dropbox.Tagged
@@ -1791,8 +1892,9 @@ type RelocationBatchJobStatus struct {
// Valid tag values for RelocationBatchJobStatus
const (
- RelocationBatchJobStatusComplete = "complete"
- RelocationBatchJobStatusFailed = "failed"
+ RelocationBatchJobStatusInProgress = "in_progress"
+ RelocationBatchJobStatusComplete = "complete"
+ RelocationBatchJobStatusFailed = "failed"
)
// UnmarshalJSON deserializes into a RelocationBatchJobStatus instance
@@ -1831,14 +1933,19 @@ func (u *RelocationBatchJobStatus) UnmarshalJSON(body []byte) error {
// may either launch an asynchronous job or complete synchronously.
type RelocationBatchLaunch struct {
dropbox.Tagged
+ // AsyncJobId : This response indicates that the processing is asynchronous.
+ // The string is an id that can be used to obtain the status of the
+ // asynchronous job.
+ AsyncJobId string `json:"async_job_id,omitempty"`
// Complete : has no documentation (yet)
Complete *RelocationBatchResult `json:"complete,omitempty"`
}
// Valid tag values for RelocationBatchLaunch
const (
- RelocationBatchLaunchComplete = "complete"
- RelocationBatchLaunchOther = "other"
+ RelocationBatchLaunchAsyncJobId = "async_job_id"
+ RelocationBatchLaunchComplete = "complete"
+ RelocationBatchLaunchOther = "other"
)
// UnmarshalJSON deserializes into a RelocationBatchLaunch instance
@@ -1855,6 +1962,12 @@ func (u *RelocationBatchLaunch) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "async_job_id":
+ err = json.Unmarshal(body, &u.AsyncJobId)
+
+ if err != nil {
+ return err
+ }
case "complete":
err = json.Unmarshal(body, &u.Complete)
@@ -2110,8 +2223,9 @@ type SaveUrlJobStatus struct {
// Valid tag values for SaveUrlJobStatus
const (
- SaveUrlJobStatusComplete = "complete"
- SaveUrlJobStatusFailed = "failed"
+ SaveUrlJobStatusInProgress = "in_progress"
+ SaveUrlJobStatusComplete = "complete"
+ SaveUrlJobStatusFailed = "failed"
)
// UnmarshalJSON deserializes into a SaveUrlJobStatus instance
@@ -2149,13 +2263,18 @@ func (u *SaveUrlJobStatus) UnmarshalJSON(body []byte) error {
// SaveUrlResult : has no documentation (yet)
type SaveUrlResult struct {
dropbox.Tagged
+ // AsyncJobId : This response indicates that the processing is asynchronous.
+ // The string is an id that can be used to obtain the status of the
+ // asynchronous job.
+ AsyncJobId string `json:"async_job_id,omitempty"`
// Complete : Metadata of the file where the URL is saved to.
Complete *FileMetadata `json:"complete,omitempty"`
}
// Valid tag values for SaveUrlResult
const (
- SaveUrlResultComplete = "complete"
+ SaveUrlResultAsyncJobId = "async_job_id"
+ SaveUrlResultComplete = "complete"
)
// UnmarshalJSON deserializes into a SaveUrlResult instance
@@ -2172,6 +2291,12 @@ func (u *SaveUrlResult) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "async_job_id":
+ err = json.Unmarshal(body, &u.AsyncJobId)
+
+ if err != nil {
+ return err
+ }
case "complete":
err = json.Unmarshal(body, &u.Complete)
@@ -2310,6 +2435,21 @@ func NewSearchResult(Matches []*SearchMatch, More bool, Start uint64) *SearchRes
return s
}
+// SharedLink : has no documentation (yet)
+type SharedLink struct {
+ // Url : Shared link url.
+ Url string `json:"url"`
+ // Password : Password for the shared link.
+ Password string `json:"password,omitempty"`
+}
+
+// NewSharedLink returns a new SharedLink instance
+func NewSharedLink(Url string) *SharedLink {
+ s := new(SharedLink)
+ s.Url = Url
+ return s
+}
+
// ThumbnailArg : has no documentation (yet)
type ThumbnailArg struct {
// Path : The path to the image file you want to thumbnail.
@@ -2435,12 +2575,16 @@ func (u *UploadError) UnmarshalJSON(body []byte) error {
// UploadErrorWithProperties : has no documentation (yet)
type UploadErrorWithProperties struct {
dropbox.Tagged
+ // Path : Unable to save the uploaded contents to a file.
+ Path *UploadWriteFailed `json:"path,omitempty"`
// PropertiesError : has no documentation (yet)
PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
}
// Valid tag values for UploadErrorWithProperties
const (
+ UploadErrorWithPropertiesPath = "path"
+ UploadErrorWithPropertiesOther = "other"
UploadErrorWithPropertiesPropertiesError = "properties_error"
)
@@ -2448,6 +2592,8 @@ const (
func (u *UploadErrorWithProperties) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
+ // Path : Unable to save the uploaded contents to a file.
+ Path json.RawMessage `json:"path,omitempty"`
// PropertiesError : has no documentation (yet)
PropertiesError json.RawMessage `json:"properties_error,omitempty"`
}
@@ -2458,6 +2604,12 @@ func (u *UploadErrorWithProperties) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "path":
+ err = json.Unmarshal(body, &u.Path)
+
+ if err != nil {
+ return err
+ }
case "properties_error":
err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
@@ -2542,7 +2694,8 @@ type UploadSessionFinishBatchJobStatus struct {
// Valid tag values for UploadSessionFinishBatchJobStatus
const (
- UploadSessionFinishBatchJobStatusComplete = "complete"
+ UploadSessionFinishBatchJobStatusInProgress = "in_progress"
+ UploadSessionFinishBatchJobStatusComplete = "complete"
)
// UnmarshalJSON deserializes into a UploadSessionFinishBatchJobStatus instance
@@ -2574,14 +2727,19 @@ func (u *UploadSessionFinishBatchJobStatus) UnmarshalJSON(body []byte) error {
// complete synchronously.
type UploadSessionFinishBatchLaunch struct {
dropbox.Tagged
+ // AsyncJobId : This response indicates that the processing is asynchronous.
+ // The string is an id that can be used to obtain the status of the
+ // asynchronous job.
+ AsyncJobId string `json:"async_job_id,omitempty"`
// Complete : has no documentation (yet)
Complete *UploadSessionFinishBatchResult `json:"complete,omitempty"`
}
// Valid tag values for UploadSessionFinishBatchLaunch
const (
- UploadSessionFinishBatchLaunchComplete = "complete"
- UploadSessionFinishBatchLaunchOther = "other"
+ UploadSessionFinishBatchLaunchAsyncJobId = "async_job_id"
+ UploadSessionFinishBatchLaunchComplete = "complete"
+ UploadSessionFinishBatchLaunchOther = "other"
)
// UnmarshalJSON deserializes into a UploadSessionFinishBatchLaunch instance
@@ -2598,6 +2756,12 @@ func (u *UploadSessionFinishBatchLaunch) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "async_job_id":
+ err = json.Unmarshal(body, &u.AsyncJobId)
+
+ if err != nil {
+ return err
+ }
case "complete":
err = json.Unmarshal(body, &u.Complete)
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/client.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/client.go
index 3c2fde32e..a601d58ee 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/client.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/client.go
@@ -108,7 +108,7 @@ type DocsArchiveAPIError struct {
func (dbx *apiImpl) DocsArchive(arg *RefPaperDoc) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -125,21 +125,21 @@ func (dbx *apiImpl) DocsArchive(arg *RefPaperDoc) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -175,7 +175,7 @@ type DocsCreateAPIError struct {
func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -193,21 +193,21 @@ func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -248,7 +248,7 @@ type DocsDownloadAPIError struct {
func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult, content io.ReadCloser, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -265,17 +265,17 @@ func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
body := []byte(resp.Header.Get("Dropbox-API-Result"))
content = resp.Body
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -285,6 +285,11 @@ func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult
return
}
if resp.StatusCode == http.StatusConflict {
+ defer resp.Body.Close()
+ body, err = ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return
+ }
var apiError DocsDownloadAPIError
err = json.Unmarshal(body, &apiError)
if err != nil {
@@ -316,7 +321,7 @@ type DocsFolderUsersListAPIError struct {
func (dbx *apiImpl) DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUsersOnFolderResponse, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -333,21 +338,21 @@ func (dbx *apiImpl) DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUs
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -388,7 +393,7 @@ type DocsFolderUsersListContinueAPIError struct {
func (dbx *apiImpl) DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueArgs) (res *ListUsersOnFolderResponse, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -405,21 +410,21 @@ func (dbx *apiImpl) DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueAr
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -460,7 +465,7 @@ type DocsGetFolderInfoAPIError struct {
func (dbx *apiImpl) DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingPaperDoc, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -477,21 +482,21 @@ func (dbx *apiImpl) DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingP
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -532,7 +537,7 @@ type DocsListAPIError struct {
func (dbx *apiImpl) DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -549,21 +554,21 @@ func (dbx *apiImpl) DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -604,7 +609,7 @@ type DocsListContinueAPIError struct {
func (dbx *apiImpl) DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListPaperDocsResponse, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -621,21 +626,21 @@ func (dbx *apiImpl) DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListP
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -676,7 +681,7 @@ type DocsPermanentlyDeleteAPIError struct {
func (dbx *apiImpl) DocsPermanentlyDelete(arg *RefPaperDoc) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -693,21 +698,21 @@ func (dbx *apiImpl) DocsPermanentlyDelete(arg *RefPaperDoc) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -743,7 +748,7 @@ type DocsSharingPolicyGetAPIError struct {
func (dbx *apiImpl) DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -760,21 +765,21 @@ func (dbx *apiImpl) DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy,
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -815,7 +820,7 @@ type DocsSharingPolicySetAPIError struct {
func (dbx *apiImpl) DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -832,21 +837,21 @@ func (dbx *apiImpl) DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error)
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -882,7 +887,7 @@ type DocsUpdateAPIError struct {
func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -900,21 +905,21 @@ func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -955,7 +960,7 @@ type DocsUsersAddAPIError struct {
func (dbx *apiImpl) DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMemberResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -972,21 +977,21 @@ func (dbx *apiImpl) DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1027,7 +1032,7 @@ type DocsUsersListAPIError struct {
func (dbx *apiImpl) DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersOnPaperDocResponse, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1044,21 +1049,21 @@ func (dbx *apiImpl) DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersO
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1099,7 +1104,7 @@ type DocsUsersListContinueAPIError struct {
func (dbx *apiImpl) DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs) (res *ListUsersOnPaperDocResponse, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1116,21 +1121,21 @@ func (dbx *apiImpl) DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs)
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1171,7 +1176,7 @@ type DocsUsersRemoveAPIError struct {
func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1188,21 +1193,21 @@ func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/types.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/types.go
index 37d1a7e6a..9c54564f9 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/types.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/types.go
@@ -161,7 +161,9 @@ type DocLookupError struct {
// Valid tag values for DocLookupError
const (
- DocLookupErrorDocNotFound = "doc_not_found"
+ DocLookupErrorInsufficientPermissions = "insufficient_permissions"
+ DocLookupErrorOther = "other"
+ DocLookupErrorDocNotFound = "doc_not_found"
)
// DocSubscriptionLevel : The subscription level of a Paper doc.
@@ -423,8 +425,10 @@ type ListUsersCursorError struct {
// Valid tag values for ListUsersCursorError
const (
- ListUsersCursorErrorDocNotFound = "doc_not_found"
- ListUsersCursorErrorCursorError = "cursor_error"
+ ListUsersCursorErrorInsufficientPermissions = "insufficient_permissions"
+ ListUsersCursorErrorOther = "other"
+ ListUsersCursorErrorDocNotFound = "doc_not_found"
+ ListUsersCursorErrorCursorError = "cursor_error"
)
// UnmarshalJSON deserializes into a ListUsersCursorError instance
@@ -619,10 +623,12 @@ type PaperDocCreateError struct {
// Valid tag values for PaperDocCreateError
const (
- PaperDocCreateErrorContentMalformed = "content_malformed"
- PaperDocCreateErrorFolderNotFound = "folder_not_found"
- PaperDocCreateErrorDocLengthExceeded = "doc_length_exceeded"
- PaperDocCreateErrorImageSizeExceeded = "image_size_exceeded"
+ PaperDocCreateErrorInsufficientPermissions = "insufficient_permissions"
+ PaperDocCreateErrorOther = "other"
+ PaperDocCreateErrorContentMalformed = "content_malformed"
+ PaperDocCreateErrorFolderNotFound = "folder_not_found"
+ PaperDocCreateErrorDocLengthExceeded = "doc_length_exceeded"
+ PaperDocCreateErrorImageSizeExceeded = "image_size_exceeded"
)
// PaperDocCreateUpdateResult : has no documentation (yet)
@@ -739,12 +745,15 @@ type PaperDocUpdateError struct {
// Valid tag values for PaperDocUpdateError
const (
- PaperDocUpdateErrorContentMalformed = "content_malformed"
- PaperDocUpdateErrorRevisionMismatch = "revision_mismatch"
- PaperDocUpdateErrorDocLengthExceeded = "doc_length_exceeded"
- PaperDocUpdateErrorImageSizeExceeded = "image_size_exceeded"
- PaperDocUpdateErrorDocArchived = "doc_archived"
- PaperDocUpdateErrorDocDeleted = "doc_deleted"
+ PaperDocUpdateErrorInsufficientPermissions = "insufficient_permissions"
+ PaperDocUpdateErrorOther = "other"
+ PaperDocUpdateErrorDocNotFound = "doc_not_found"
+ PaperDocUpdateErrorContentMalformed = "content_malformed"
+ PaperDocUpdateErrorRevisionMismatch = "revision_mismatch"
+ PaperDocUpdateErrorDocLengthExceeded = "doc_length_exceeded"
+ PaperDocUpdateErrorImageSizeExceeded = "image_size_exceeded"
+ PaperDocUpdateErrorDocArchived = "doc_archived"
+ PaperDocUpdateErrorDocDeleted = "doc_deleted"
)
// PaperDocUpdatePolicy : has no documentation (yet)
@@ -810,7 +819,10 @@ type SharingPublicPolicyType struct {
// Valid tag values for SharingPublicPolicyType
const (
- SharingPublicPolicyTypeDisabled = "disabled"
+ SharingPublicPolicyTypePeopleWithLinkCanEdit = "people_with_link_can_edit"
+ SharingPublicPolicyTypePeopleWithLinkCanViewAndComment = "people_with_link_can_view_and_comment"
+ SharingPublicPolicyTypeInviteOnly = "invite_only"
+ SharingPublicPolicyTypeDisabled = "disabled"
)
// UserInfoWithPermissionLevel : has no documentation (yet)
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sdk.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sdk.go
index 3cdb88112..86cb998f7 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sdk.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sdk.go
@@ -35,8 +35,8 @@ const (
hostAPI = "api"
hostContent = "content"
hostNotify = "notify"
- sdkVersion = "1.0.0-beta"
- specVersion = "52ee619"
+ sdkVersion = "3.3.0"
+ specVersion = "318810d"
)
// Version returns the current SDK version and API Spec version
@@ -48,8 +48,8 @@ func Version() (string, string) {
type Config struct {
// OAuth2 access token
Token string
- // Enable verbose logging in SDK
- Verbose bool
+ // Logging level for SDK generated logs
+ LogLevel LogLevel
// Logging target for verbose SDK logging
Logger *log.Logger
// Used with APIs that support operations as another user
@@ -64,12 +64,28 @@ type Config struct {
URLGenerator func(hostType string, style string, namespace string, route string) string
}
-// TryLog will, if Verbose is set, log to the config's logger
-// or the default log (stderr) if Config.Logger is nil.
-func (c *Config) TryLog(format string, v ...interface{}) {
- if !c.Verbose {
+// LogLevel defines a type that can set the desired level of logging the SDK will generate.
+type LogLevel uint
+
+const (
+ // LogOff will disable all SDK logging. This is the default log level
+ LogOff LogLevel = iota * (1 << 8)
+ // LogDebug will enable detailed SDK debug logs. It will log requests (including arguments),
+ // response and body contents.
+ LogDebug
+ // LogInfo will log SDK request (not including arguments) and responses.
+ LogInfo
+)
+
+func (l LogLevel) ShouldLog(v LogLevel) bool {
+ return l > v || l&v == v
+}
+
+func (c *Config) doLog(l LogLevel, format string, v ...interface{}) {
+ if !c.LogLevel.ShouldLog(l) {
return
}
+
if c.Logger != nil {
c.Logger.Printf(format, v...)
} else {
@@ -77,6 +93,16 @@ func (c *Config) TryLog(format string, v ...interface{}) {
}
}
+// LogDebug emits a debug level SDK log if config's log level is at least LogDebug
+func (c *Config) LogDebug(format string, v ...interface{}) {
+ c.doLog(LogDebug, format, v...)
+}
+
+// LogInfo emits an info level SDK log if config's log level is at least LogInfo
+func (c *Config) LogInfo(format string, v ...interface{}) {
+ c.doLog(LogInfo, format, v...)
+}
+
// Context is the base client context used to implement per-namespace clients.
type Context struct {
Config Config
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/client.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/client.go
index e1c7a4aed..6203b1202 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/client.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/client.go
@@ -235,7 +235,7 @@ type AddFileMemberAPIError struct {
func (dbx *apiImpl) AddFileMember(arg *AddFileMemberArgs) (res []*FileMemberActionResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -252,21 +252,21 @@ func (dbx *apiImpl) AddFileMember(arg *AddFileMemberArgs) (res []*FileMemberActi
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -307,7 +307,7 @@ type AddFolderMemberAPIError struct {
func (dbx *apiImpl) AddFolderMember(arg *AddFolderMemberArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -324,21 +324,21 @@ func (dbx *apiImpl) AddFolderMember(arg *AddFolderMemberArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -377,7 +377,7 @@ func (dbx *apiImpl) ChangeFileMemberAccess(arg *ChangeFileMemberAccessArgs) (res
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -394,21 +394,21 @@ func (dbx *apiImpl) ChangeFileMemberAccess(arg *ChangeFileMemberAccessArgs) (res
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -449,7 +449,7 @@ type CheckJobStatusAPIError struct {
func (dbx *apiImpl) CheckJobStatus(arg *async.PollArg) (res *JobStatus, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -466,21 +466,21 @@ func (dbx *apiImpl) CheckJobStatus(arg *async.PollArg) (res *JobStatus, err erro
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -521,7 +521,7 @@ type CheckRemoveMemberJobStatusAPIError struct {
func (dbx *apiImpl) CheckRemoveMemberJobStatus(arg *async.PollArg) (res *RemoveMemberJobStatus, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -538,21 +538,21 @@ func (dbx *apiImpl) CheckRemoveMemberJobStatus(arg *async.PollArg) (res *RemoveM
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -593,7 +593,7 @@ type CheckShareJobStatusAPIError struct {
func (dbx *apiImpl) CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJobStatus, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -610,21 +610,21 @@ func (dbx *apiImpl) CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJob
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -668,7 +668,7 @@ func (dbx *apiImpl) CreateSharedLink(arg *CreateSharedLinkArg) (res *PathLinkMet
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -685,21 +685,21 @@ func (dbx *apiImpl) CreateSharedLink(arg *CreateSharedLinkArg) (res *PathLinkMet
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -740,7 +740,7 @@ type CreateSharedLinkWithSettingsAPIError struct {
func (dbx *apiImpl) CreateSharedLinkWithSettings(arg *CreateSharedLinkWithSettingsArg) (res IsSharedLinkMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -757,21 +757,21 @@ func (dbx *apiImpl) CreateSharedLinkWithSettings(arg *CreateSharedLinkWithSettin
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
var tmp sharedLinkMetadataUnion
err = json.Unmarshal(body, &tmp)
@@ -820,7 +820,7 @@ type GetFileMetadataAPIError struct {
func (dbx *apiImpl) GetFileMetadata(arg *GetFileMetadataArg) (res *SharedFileMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -837,21 +837,21 @@ func (dbx *apiImpl) GetFileMetadata(arg *GetFileMetadataArg) (res *SharedFileMet
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -892,7 +892,7 @@ type GetFileMetadataBatchAPIError struct {
func (dbx *apiImpl) GetFileMetadataBatch(arg *GetFileMetadataBatchArg) (res []*GetFileMetadataBatchResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -909,21 +909,21 @@ func (dbx *apiImpl) GetFileMetadataBatch(arg *GetFileMetadataBatchArg) (res []*G
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -964,7 +964,7 @@ type GetFolderMetadataAPIError struct {
func (dbx *apiImpl) GetFolderMetadata(arg *GetMetadataArgs) (res *SharedFolderMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -981,21 +981,21 @@ func (dbx *apiImpl) GetFolderMetadata(arg *GetMetadataArgs) (res *SharedFolderMe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1036,7 +1036,7 @@ type GetSharedLinkFileAPIError struct {
func (dbx *apiImpl) GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, content io.ReadCloser, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1053,17 +1053,17 @@ func (dbx *apiImpl) GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res IsShar
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
body := []byte(resp.Header.Get("Dropbox-API-Result"))
content = resp.Body
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
var tmp sharedLinkMetadataUnion
err = json.Unmarshal(body, &tmp)
@@ -1081,6 +1081,11 @@ func (dbx *apiImpl) GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res IsShar
return
}
if resp.StatusCode == http.StatusConflict {
+ defer resp.Body.Close()
+ body, err = ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return
+ }
var apiError GetSharedLinkFileAPIError
err = json.Unmarshal(body, &apiError)
if err != nil {
@@ -1112,7 +1117,7 @@ type GetSharedLinkMetadataAPIError struct {
func (dbx *apiImpl) GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1129,21 +1134,21 @@ func (dbx *apiImpl) GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res Is
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
var tmp sharedLinkMetadataUnion
err = json.Unmarshal(body, &tmp)
@@ -1195,7 +1200,7 @@ func (dbx *apiImpl) GetSharedLinks(arg *GetSharedLinksArg) (res *GetSharedLinksR
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1212,21 +1217,21 @@ func (dbx *apiImpl) GetSharedLinks(arg *GetSharedLinksArg) (res *GetSharedLinksR
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1267,7 +1272,7 @@ type ListFileMembersAPIError struct {
func (dbx *apiImpl) ListFileMembers(arg *ListFileMembersArg) (res *SharedFileMembers, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1284,21 +1289,21 @@ func (dbx *apiImpl) ListFileMembers(arg *ListFileMembersArg) (res *SharedFileMem
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1339,7 +1344,7 @@ type ListFileMembersBatchAPIError struct {
func (dbx *apiImpl) ListFileMembersBatch(arg *ListFileMembersBatchArg) (res []*ListFileMembersBatchResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1356,21 +1361,21 @@ func (dbx *apiImpl) ListFileMembersBatch(arg *ListFileMembersBatchArg) (res []*L
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1411,7 +1416,7 @@ type ListFileMembersContinueAPIError struct {
func (dbx *apiImpl) ListFileMembersContinue(arg *ListFileMembersContinueArg) (res *SharedFileMembers, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1428,21 +1433,21 @@ func (dbx *apiImpl) ListFileMembersContinue(arg *ListFileMembersContinueArg) (re
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1483,7 +1488,7 @@ type ListFolderMembersAPIError struct {
func (dbx *apiImpl) ListFolderMembers(arg *ListFolderMembersArgs) (res *SharedFolderMembers, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1500,21 +1505,21 @@ func (dbx *apiImpl) ListFolderMembers(arg *ListFolderMembersArgs) (res *SharedFo
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1555,7 +1560,7 @@ type ListFolderMembersContinueAPIError struct {
func (dbx *apiImpl) ListFolderMembersContinue(arg *ListFolderMembersContinueArg) (res *SharedFolderMembers, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1572,21 +1577,21 @@ func (dbx *apiImpl) ListFolderMembersContinue(arg *ListFolderMembersContinueArg)
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1627,7 +1632,7 @@ type ListFoldersAPIError struct {
func (dbx *apiImpl) ListFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1644,21 +1649,21 @@ func (dbx *apiImpl) ListFolders(arg *ListFoldersArgs) (res *ListFoldersResult, e
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1699,7 +1704,7 @@ type ListFoldersContinueAPIError struct {
func (dbx *apiImpl) ListFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1716,21 +1721,21 @@ func (dbx *apiImpl) ListFoldersContinue(arg *ListFoldersContinueArg) (res *ListF
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1771,7 +1776,7 @@ type ListMountableFoldersAPIError struct {
func (dbx *apiImpl) ListMountableFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1788,21 +1793,21 @@ func (dbx *apiImpl) ListMountableFolders(arg *ListFoldersArgs) (res *ListFolders
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1843,7 +1848,7 @@ type ListMountableFoldersContinueAPIError struct {
func (dbx *apiImpl) ListMountableFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1860,21 +1865,21 @@ func (dbx *apiImpl) ListMountableFoldersContinue(arg *ListFoldersContinueArg) (r
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1915,7 +1920,7 @@ type ListReceivedFilesAPIError struct {
func (dbx *apiImpl) ListReceivedFiles(arg *ListFilesArg) (res *ListFilesResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1932,21 +1937,21 @@ func (dbx *apiImpl) ListReceivedFiles(arg *ListFilesArg) (res *ListFilesResult,
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1987,7 +1992,7 @@ type ListReceivedFilesContinueAPIError struct {
func (dbx *apiImpl) ListReceivedFilesContinue(arg *ListFilesContinueArg) (res *ListFilesResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2004,21 +2009,21 @@ func (dbx *apiImpl) ListReceivedFilesContinue(arg *ListFilesContinueArg) (res *L
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2059,7 +2064,7 @@ type ListSharedLinksAPIError struct {
func (dbx *apiImpl) ListSharedLinks(arg *ListSharedLinksArg) (res *ListSharedLinksResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2076,21 +2081,21 @@ func (dbx *apiImpl) ListSharedLinks(arg *ListSharedLinksArg) (res *ListSharedLin
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2131,7 +2136,7 @@ type ModifySharedLinkSettingsAPIError struct {
func (dbx *apiImpl) ModifySharedLinkSettings(arg *ModifySharedLinkSettingsArgs) (res IsSharedLinkMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2148,21 +2153,21 @@ func (dbx *apiImpl) ModifySharedLinkSettings(arg *ModifySharedLinkSettingsArgs)
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
var tmp sharedLinkMetadataUnion
err = json.Unmarshal(body, &tmp)
@@ -2211,7 +2216,7 @@ type MountFolderAPIError struct {
func (dbx *apiImpl) MountFolder(arg *MountFolderArg) (res *SharedFolderMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2228,21 +2233,21 @@ func (dbx *apiImpl) MountFolder(arg *MountFolderArg) (res *SharedFolderMetadata,
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2283,7 +2288,7 @@ type RelinquishFileMembershipAPIError struct {
func (dbx *apiImpl) RelinquishFileMembership(arg *RelinquishFileMembershipArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2300,21 +2305,21 @@ func (dbx *apiImpl) RelinquishFileMembership(arg *RelinquishFileMembershipArg) (
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2350,7 +2355,7 @@ type RelinquishFolderMembershipAPIError struct {
func (dbx *apiImpl) RelinquishFolderMembership(arg *RelinquishFolderMembershipArg) (res *async.LaunchEmptyResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2367,21 +2372,21 @@ func (dbx *apiImpl) RelinquishFolderMembership(arg *RelinquishFolderMembershipAr
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2425,7 +2430,7 @@ func (dbx *apiImpl) RemoveFileMember(arg *RemoveFileMemberArg) (res *FileMemberA
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2442,21 +2447,21 @@ func (dbx *apiImpl) RemoveFileMember(arg *RemoveFileMemberArg) (res *FileMemberA
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2497,7 +2502,7 @@ type RemoveFileMember2APIError struct {
func (dbx *apiImpl) RemoveFileMember2(arg *RemoveFileMemberArg) (res *FileMemberRemoveActionResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2514,21 +2519,21 @@ func (dbx *apiImpl) RemoveFileMember2(arg *RemoveFileMemberArg) (res *FileMember
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2569,7 +2574,7 @@ type RemoveFolderMemberAPIError struct {
func (dbx *apiImpl) RemoveFolderMember(arg *RemoveFolderMemberArg) (res *async.LaunchResultBase, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2586,21 +2591,21 @@ func (dbx *apiImpl) RemoveFolderMember(arg *RemoveFolderMemberArg) (res *async.L
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2641,7 +2646,7 @@ type RevokeSharedLinkAPIError struct {
func (dbx *apiImpl) RevokeSharedLink(arg *RevokeSharedLinkArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2658,21 +2663,21 @@ func (dbx *apiImpl) RevokeSharedLink(arg *RevokeSharedLinkArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2708,7 +2713,7 @@ type ShareFolderAPIError struct {
func (dbx *apiImpl) ShareFolder(arg *ShareFolderArg) (res *ShareFolderLaunch, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2725,21 +2730,21 @@ func (dbx *apiImpl) ShareFolder(arg *ShareFolderArg) (res *ShareFolderLaunch, er
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2780,7 +2785,7 @@ type TransferFolderAPIError struct {
func (dbx *apiImpl) TransferFolder(arg *TransferFolderArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2797,21 +2802,21 @@ func (dbx *apiImpl) TransferFolder(arg *TransferFolderArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2847,7 +2852,7 @@ type UnmountFolderAPIError struct {
func (dbx *apiImpl) UnmountFolder(arg *UnmountFolderArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2864,21 +2869,21 @@ func (dbx *apiImpl) UnmountFolder(arg *UnmountFolderArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2914,7 +2919,7 @@ type UnshareFileAPIError struct {
func (dbx *apiImpl) UnshareFile(arg *UnshareFileArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2931,21 +2936,21 @@ func (dbx *apiImpl) UnshareFile(arg *UnshareFileArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2981,7 +2986,7 @@ type UnshareFolderAPIError struct {
func (dbx *apiImpl) UnshareFolder(arg *UnshareFolderArg) (res *async.LaunchEmptyResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2998,21 +3003,21 @@ func (dbx *apiImpl) UnshareFolder(arg *UnshareFolderArg) (res *async.LaunchEmpty
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3053,7 +3058,7 @@ type UpdateFileMemberAPIError struct {
func (dbx *apiImpl) UpdateFileMember(arg *UpdateFileMemberArgs) (res *MemberAccessLevelResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3070,21 +3075,21 @@ func (dbx *apiImpl) UpdateFileMember(arg *UpdateFileMemberArgs) (res *MemberAcce
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3125,7 +3130,7 @@ type UpdateFolderMemberAPIError struct {
func (dbx *apiImpl) UpdateFolderMember(arg *UpdateFolderMemberArg) (res *MemberAccessLevelResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3142,21 +3147,21 @@ func (dbx *apiImpl) UpdateFolderMember(arg *UpdateFolderMemberArg) (res *MemberA
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3197,7 +3202,7 @@ type UpdateFolderPolicyAPIError struct {
func (dbx *apiImpl) UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedFolderMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3214,21 +3219,21 @@ func (dbx *apiImpl) UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedF
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/types.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/types.go
index 328e65273..c8f0bf228 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/types.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/types.go
@@ -1342,7 +1342,11 @@ type GetSharedLinkFileError struct {
// Valid tag values for GetSharedLinkFileError
const (
- GetSharedLinkFileErrorSharedLinkIsDirectory = "shared_link_is_directory"
+ GetSharedLinkFileErrorSharedLinkNotFound = "shared_link_not_found"
+ GetSharedLinkFileErrorSharedLinkAccessDenied = "shared_link_access_denied"
+ GetSharedLinkFileErrorUnsupportedLinkType = "unsupported_link_type"
+ GetSharedLinkFileErrorOther = "other"
+ GetSharedLinkFileErrorSharedLinkIsDirectory = "shared_link_is_directory"
)
// GetSharedLinkMetadataArg : has no documentation (yet)
@@ -1660,8 +1664,9 @@ type JobStatus struct {
// Valid tag values for JobStatus
const (
- JobStatusComplete = "complete"
- JobStatusFailed = "failed"
+ JobStatusInProgress = "in_progress"
+ JobStatusComplete = "complete"
+ JobStatusFailed = "failed"
)
// UnmarshalJSON deserializes into a JobStatus instance
@@ -2537,8 +2542,12 @@ type ModifySharedLinkSettingsError struct {
// Valid tag values for ModifySharedLinkSettingsError
const (
- ModifySharedLinkSettingsErrorSettingsError = "settings_error"
- ModifySharedLinkSettingsErrorEmailNotVerified = "email_not_verified"
+ ModifySharedLinkSettingsErrorSharedLinkNotFound = "shared_link_not_found"
+ ModifySharedLinkSettingsErrorSharedLinkAccessDenied = "shared_link_access_denied"
+ ModifySharedLinkSettingsErrorUnsupportedLinkType = "unsupported_link_type"
+ ModifySharedLinkSettingsErrorOther = "other"
+ ModifySharedLinkSettingsErrorSettingsError = "settings_error"
+ ModifySharedLinkSettingsErrorEmailNotVerified = "email_not_verified"
)
// UnmarshalJSON deserializes into a ModifySharedLinkSettingsError instance
@@ -3014,8 +3023,9 @@ type RemoveMemberJobStatus struct {
// Valid tag values for RemoveMemberJobStatus
const (
- RemoveMemberJobStatusComplete = "complete"
- RemoveMemberJobStatusFailed = "failed"
+ RemoveMemberJobStatusInProgress = "in_progress"
+ RemoveMemberJobStatusComplete = "complete"
+ RemoveMemberJobStatusFailed = "failed"
)
// UnmarshalJSON deserializes into a RemoveMemberJobStatus instance
@@ -3077,6 +3087,9 @@ type ResolvedVisibility struct {
// Valid tag values for ResolvedVisibility
const (
+ ResolvedVisibilityPublic = "public"
+ ResolvedVisibilityTeamOnly = "team_only"
+ ResolvedVisibilityPassword = "password"
ResolvedVisibilityTeamAndPassword = "team_and_password"
ResolvedVisibilitySharedFolderOnly = "shared_folder_only"
ResolvedVisibilityOther = "other"
@@ -3102,7 +3115,11 @@ type RevokeSharedLinkError struct {
// Valid tag values for RevokeSharedLinkError
const (
- RevokeSharedLinkErrorSharedLinkMalformed = "shared_link_malformed"
+ RevokeSharedLinkErrorSharedLinkNotFound = "shared_link_not_found"
+ RevokeSharedLinkErrorSharedLinkAccessDenied = "shared_link_access_denied"
+ RevokeSharedLinkErrorUnsupportedLinkType = "unsupported_link_type"
+ RevokeSharedLinkErrorOther = "other"
+ RevokeSharedLinkErrorSharedLinkMalformed = "shared_link_malformed"
)
// ShareFolderArgBase : has no documentation (yet)
@@ -3197,13 +3214,44 @@ func (u *ShareFolderErrorBase) UnmarshalJSON(body []byte) error {
// ShareFolderError : has no documentation (yet)
type ShareFolderError struct {
dropbox.Tagged
+ // BadPath : `ShareFolderArg.path` is invalid.
+ BadPath *SharePathError `json:"bad_path,omitempty"`
}
// Valid tag values for ShareFolderError
const (
- ShareFolderErrorNoPermission = "no_permission"
+ ShareFolderErrorEmailUnverified = "email_unverified"
+ ShareFolderErrorBadPath = "bad_path"
+ ShareFolderErrorTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy"
+ ShareFolderErrorDisallowedSharedLinkPolicy = "disallowed_shared_link_policy"
+ ShareFolderErrorOther = "other"
+ ShareFolderErrorNoPermission = "no_permission"
)
+// UnmarshalJSON deserializes into a ShareFolderError instance
+func (u *ShareFolderError) UnmarshalJSON(body []byte) error {
+ type wrap struct {
+ dropbox.Tagged
+ // BadPath : `ShareFolderArg.path` is invalid.
+ BadPath json.RawMessage `json:"bad_path,omitempty"`
+ }
+ var w wrap
+ var err error
+ if err = json.Unmarshal(body, &w); err != nil {
+ return err
+ }
+ u.Tag = w.Tag
+ switch u.Tag {
+ case "bad_path":
+ err = json.Unmarshal(w.BadPath, &u.BadPath)
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
// ShareFolderJobStatus : has no documentation (yet)
type ShareFolderJobStatus struct {
dropbox.Tagged
@@ -3216,8 +3264,9 @@ type ShareFolderJobStatus struct {
// Valid tag values for ShareFolderJobStatus
const (
- ShareFolderJobStatusComplete = "complete"
- ShareFolderJobStatusFailed = "failed"
+ ShareFolderJobStatusInProgress = "in_progress"
+ ShareFolderJobStatusComplete = "complete"
+ ShareFolderJobStatusFailed = "failed"
)
// UnmarshalJSON deserializes into a ShareFolderJobStatus instance
@@ -3256,13 +3305,18 @@ func (u *ShareFolderJobStatus) UnmarshalJSON(body []byte) error {
// ShareFolderLaunch : has no documentation (yet)
type ShareFolderLaunch struct {
dropbox.Tagged
+ // AsyncJobId : This response indicates that the processing is asynchronous.
+ // The string is an id that can be used to obtain the status of the
+ // asynchronous job.
+ AsyncJobId string `json:"async_job_id,omitempty"`
// Complete : has no documentation (yet)
Complete *SharedFolderMetadata `json:"complete,omitempty"`
}
// Valid tag values for ShareFolderLaunch
const (
- ShareFolderLaunchComplete = "complete"
+ ShareFolderLaunchAsyncJobId = "async_job_id"
+ ShareFolderLaunchComplete = "complete"
)
// UnmarshalJSON deserializes into a ShareFolderLaunch instance
@@ -3279,6 +3333,12 @@ func (u *ShareFolderLaunch) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "async_job_id":
+ err = json.Unmarshal(body, &u.AsyncJobId)
+
+ if err != nil {
+ return err
+ }
case "complete":
err = json.Unmarshal(body, &u.Complete)
@@ -3368,7 +3428,7 @@ func NewSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudien
// part of the results for `listFileMembersBatch`.
type SharedFileMembers struct {
// Users : The list of user members of the shared file.
- Users []*UserMembershipInfo `json:"users"`
+ Users []*UserFileMembershipInfo `json:"users"`
// Groups : The list of group members of the shared file.
Groups []*GroupMembershipInfo `json:"groups"`
// Invitees : The list of invited members of a file, but have not logged in
@@ -3381,7 +3441,7 @@ type SharedFileMembers struct {
}
// NewSharedFileMembers returns a new SharedFileMembers instance
-func NewSharedFileMembers(Users []*UserMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFileMembers {
+func NewSharedFileMembers(Users []*UserFileMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFileMembers {
s := new(SharedFileMembers)
s.Users = Users
s.Groups = Groups
@@ -4106,6 +4166,41 @@ func (u *UpdateFolderPolicyError) UnmarshalJSON(body []byte) error {
return nil
}
+// UserMembershipInfo : The information about a user member of the shared
+// content.
+type UserMembershipInfo struct {
+ MembershipInfo
+ // User : The account information for the membership user.
+ User *UserInfo `json:"user"`
+}
+
+// NewUserMembershipInfo returns a new UserMembershipInfo instance
+func NewUserMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserMembershipInfo {
+ s := new(UserMembershipInfo)
+ s.AccessType = AccessType
+ s.User = User
+ s.IsInherited = false
+ return s
+}
+
+// UserFileMembershipInfo : The information about a user member of the shared
+// content with an appended last seen timestamp.
+type UserFileMembershipInfo struct {
+ UserMembershipInfo
+ // TimeLastSeen : The UTC timestamp of when the user has last seen the
+ // content, if they have.
+ TimeLastSeen time.Time `json:"time_last_seen,omitempty"`
+}
+
+// NewUserFileMembershipInfo returns a new UserFileMembershipInfo instance
+func NewUserFileMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserFileMembershipInfo {
+ s := new(UserFileMembershipInfo)
+ s.AccessType = AccessType
+ s.User = User
+ s.IsInherited = false
+ return s
+}
+
// UserInfo : Basic information about a user. Use `usersAccount` and
// `usersAccountBatch` to obtain more detailed information.
type UserInfo struct {
@@ -4126,23 +4221,6 @@ func NewUserInfo(AccountId string, SameTeam bool) *UserInfo {
return s
}
-// UserMembershipInfo : The information about a user member of the shared
-// content.
-type UserMembershipInfo struct {
- MembershipInfo
- // User : The account information for the membership user.
- User *UserInfo `json:"user"`
-}
-
-// NewUserMembershipInfo returns a new UserMembershipInfo instance
-func NewUserMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserMembershipInfo {
- s := new(UserMembershipInfo)
- s.AccessType = AccessType
- s.User = User
- s.IsInherited = false
- return s
-}
-
// ViewerInfoPolicy : has no documentation (yet)
type ViewerInfoPolicy struct {
dropbox.Tagged
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/client.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/client.go
index 8a47bcbb2..8d71ac825 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/client.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/client.go
@@ -241,8 +241,8 @@ type Client interface {
// TeamFolderArchiveCheck : Returns the status of an asynchronous job for
// archiving a team folder. Permission : Team member file access.
TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderArchiveJobStatus, err error)
- // TeamFolderCreate : Creates a new, active, team folder. Permission : Team
- // member file access.
+ // TeamFolderCreate : Creates a new, active, team folder with no members.
+ // Permission : Team member file access.
TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderMetadata, err error)
// TeamFolderGetInfo : Retrieves metadata for team folders. Permission :
// Team member file access.
@@ -276,7 +276,7 @@ type DevicesListMemberDevicesAPIError struct {
func (dbx *apiImpl) DevicesListMemberDevices(arg *ListMemberDevicesArg) (res *ListMemberDevicesResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -290,21 +290,21 @@ func (dbx *apiImpl) DevicesListMemberDevices(arg *ListMemberDevicesArg) (res *Li
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -345,7 +345,7 @@ type DevicesListMembersDevicesAPIError struct {
func (dbx *apiImpl) DevicesListMembersDevices(arg *ListMembersDevicesArg) (res *ListMembersDevicesResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -359,21 +359,21 @@ func (dbx *apiImpl) DevicesListMembersDevices(arg *ListMembersDevicesArg) (res *
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -417,7 +417,7 @@ func (dbx *apiImpl) DevicesListTeamDevices(arg *ListTeamDevicesArg) (res *ListTe
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -431,21 +431,21 @@ func (dbx *apiImpl) DevicesListTeamDevices(arg *ListTeamDevicesArg) (res *ListTe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -486,7 +486,7 @@ type DevicesRevokeDeviceSessionAPIError struct {
func (dbx *apiImpl) DevicesRevokeDeviceSession(arg *RevokeDeviceSessionArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -500,21 +500,21 @@ func (dbx *apiImpl) DevicesRevokeDeviceSession(arg *RevokeDeviceSessionArg) (err
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -550,7 +550,7 @@ type DevicesRevokeDeviceSessionBatchAPIError struct {
func (dbx *apiImpl) DevicesRevokeDeviceSessionBatch(arg *RevokeDeviceSessionBatchArg) (res *RevokeDeviceSessionBatchResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -564,21 +564,21 @@ func (dbx *apiImpl) DevicesRevokeDeviceSessionBatch(arg *RevokeDeviceSessionBatc
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -619,7 +619,7 @@ type FeaturesGetValuesAPIError struct {
func (dbx *apiImpl) FeaturesGetValues(arg *FeaturesGetValuesBatchArg) (res *FeaturesGetValuesBatchResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -633,21 +633,21 @@ func (dbx *apiImpl) FeaturesGetValues(arg *FeaturesGetValuesBatchArg) (res *Feat
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -694,21 +694,21 @@ func (dbx *apiImpl) GetInfo() (res *TeamGetInfoResult, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -749,7 +749,7 @@ type GroupsCreateAPIError struct {
func (dbx *apiImpl) GroupsCreate(arg *GroupCreateArg) (res *GroupFullInfo, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -763,21 +763,21 @@ func (dbx *apiImpl) GroupsCreate(arg *GroupCreateArg) (res *GroupFullInfo, err e
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -818,7 +818,7 @@ type GroupsDeleteAPIError struct {
func (dbx *apiImpl) GroupsDelete(arg *GroupSelector) (res *async.LaunchEmptyResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -832,21 +832,21 @@ func (dbx *apiImpl) GroupsDelete(arg *GroupSelector) (res *async.LaunchEmptyResu
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -887,7 +887,7 @@ type GroupsGetInfoAPIError struct {
func (dbx *apiImpl) GroupsGetInfo(arg *GroupsSelector) (res []*GroupsGetInfoItem, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -901,21 +901,21 @@ func (dbx *apiImpl) GroupsGetInfo(arg *GroupsSelector) (res []*GroupsGetInfoItem
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -956,7 +956,7 @@ type GroupsJobStatusGetAPIError struct {
func (dbx *apiImpl) GroupsJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -970,21 +970,21 @@ func (dbx *apiImpl) GroupsJobStatusGet(arg *async.PollArg) (res *async.PollEmpty
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1025,7 +1025,7 @@ type GroupsListAPIError struct {
func (dbx *apiImpl) GroupsList(arg *GroupsListArg) (res *GroupsListResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1039,21 +1039,21 @@ func (dbx *apiImpl) GroupsList(arg *GroupsListArg) (res *GroupsListResult, err e
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1094,7 +1094,7 @@ type GroupsListContinueAPIError struct {
func (dbx *apiImpl) GroupsListContinue(arg *GroupsListContinueArg) (res *GroupsListResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1108,21 +1108,21 @@ func (dbx *apiImpl) GroupsListContinue(arg *GroupsListContinueArg) (res *GroupsL
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1163,7 +1163,7 @@ type GroupsMembersAddAPIError struct {
func (dbx *apiImpl) GroupsMembersAdd(arg *GroupMembersAddArg) (res *GroupMembersChangeResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1177,21 +1177,21 @@ func (dbx *apiImpl) GroupsMembersAdd(arg *GroupMembersAddArg) (res *GroupMembers
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1232,7 +1232,7 @@ type GroupsMembersListAPIError struct {
func (dbx *apiImpl) GroupsMembersList(arg *GroupsMembersListArg) (res *GroupsMembersListResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1246,21 +1246,21 @@ func (dbx *apiImpl) GroupsMembersList(arg *GroupsMembersListArg) (res *GroupsMem
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1301,7 +1301,7 @@ type GroupsMembersListContinueAPIError struct {
func (dbx *apiImpl) GroupsMembersListContinue(arg *GroupsMembersListContinueArg) (res *GroupsMembersListResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1315,21 +1315,21 @@ func (dbx *apiImpl) GroupsMembersListContinue(arg *GroupsMembersListContinueArg)
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1370,7 +1370,7 @@ type GroupsMembersRemoveAPIError struct {
func (dbx *apiImpl) GroupsMembersRemove(arg *GroupMembersRemoveArg) (res *GroupMembersChangeResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1384,21 +1384,21 @@ func (dbx *apiImpl) GroupsMembersRemove(arg *GroupMembersRemoveArg) (res *GroupM
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1439,7 +1439,7 @@ type GroupsMembersSetAccessTypeAPIError struct {
func (dbx *apiImpl) GroupsMembersSetAccessType(arg *GroupMembersSetAccessTypeArg) (res []*GroupsGetInfoItem, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1453,21 +1453,21 @@ func (dbx *apiImpl) GroupsMembersSetAccessType(arg *GroupMembersSetAccessTypeArg
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1508,7 +1508,7 @@ type GroupsUpdateAPIError struct {
func (dbx *apiImpl) GroupsUpdate(arg *GroupUpdateArgs) (res *GroupFullInfo, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1522,21 +1522,21 @@ func (dbx *apiImpl) GroupsUpdate(arg *GroupUpdateArgs) (res *GroupFullInfo, err
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1577,7 +1577,7 @@ type LinkedAppsListMemberLinkedAppsAPIError struct {
func (dbx *apiImpl) LinkedAppsListMemberLinkedApps(arg *ListMemberAppsArg) (res *ListMemberAppsResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1591,21 +1591,21 @@ func (dbx *apiImpl) LinkedAppsListMemberLinkedApps(arg *ListMemberAppsArg) (res
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1646,7 +1646,7 @@ type LinkedAppsListMembersLinkedAppsAPIError struct {
func (dbx *apiImpl) LinkedAppsListMembersLinkedApps(arg *ListMembersAppsArg) (res *ListMembersAppsResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1660,21 +1660,21 @@ func (dbx *apiImpl) LinkedAppsListMembersLinkedApps(arg *ListMembersAppsArg) (re
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1718,7 +1718,7 @@ func (dbx *apiImpl) LinkedAppsListTeamLinkedApps(arg *ListTeamAppsArg) (res *Lis
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1732,21 +1732,21 @@ func (dbx *apiImpl) LinkedAppsListTeamLinkedApps(arg *ListTeamAppsArg) (res *Lis
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1787,7 +1787,7 @@ type LinkedAppsRevokeLinkedAppAPIError struct {
func (dbx *apiImpl) LinkedAppsRevokeLinkedApp(arg *RevokeLinkedApiAppArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1801,21 +1801,21 @@ func (dbx *apiImpl) LinkedAppsRevokeLinkedApp(arg *RevokeLinkedApiAppArg) (err e
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -1851,7 +1851,7 @@ type LinkedAppsRevokeLinkedAppBatchAPIError struct {
func (dbx *apiImpl) LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchArg) (res *RevokeLinkedAppBatchResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1865,21 +1865,21 @@ func (dbx *apiImpl) LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchA
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1920,7 +1920,7 @@ type MemberSpaceLimitsGetCustomQuotaAPIError struct {
func (dbx *apiImpl) MemberSpaceLimitsGetCustomQuota(arg *CustomQuotaUsersArg) (res []*CustomQuotaResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -1934,21 +1934,21 @@ func (dbx *apiImpl) MemberSpaceLimitsGetCustomQuota(arg *CustomQuotaUsersArg) (r
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -1989,7 +1989,7 @@ type MemberSpaceLimitsRemoveCustomQuotaAPIError struct {
func (dbx *apiImpl) MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg) (res []*RemoveCustomQuotaResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2003,21 +2003,21 @@ func (dbx *apiImpl) MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg)
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2058,7 +2058,7 @@ type MemberSpaceLimitsSetCustomQuotaAPIError struct {
func (dbx *apiImpl) MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2072,21 +2072,21 @@ func (dbx *apiImpl) MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2127,7 +2127,7 @@ type MembersAddAPIError struct {
func (dbx *apiImpl) MembersAdd(arg *MembersAddArg) (res *MembersAddLaunch, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2141,21 +2141,21 @@ func (dbx *apiImpl) MembersAdd(arg *MembersAddArg) (res *MembersAddLaunch, err e
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2196,7 +2196,7 @@ type MembersAddJobStatusGetAPIError struct {
func (dbx *apiImpl) MembersAddJobStatusGet(arg *async.PollArg) (res *MembersAddJobStatus, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2210,21 +2210,21 @@ func (dbx *apiImpl) MembersAddJobStatusGet(arg *async.PollArg) (res *MembersAddJ
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2265,7 +2265,7 @@ type MembersGetInfoAPIError struct {
func (dbx *apiImpl) MembersGetInfo(arg *MembersGetInfoArgs) (res []*MembersGetInfoItem, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2279,21 +2279,21 @@ func (dbx *apiImpl) MembersGetInfo(arg *MembersGetInfoArgs) (res []*MembersGetIn
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2334,7 +2334,7 @@ type MembersListAPIError struct {
func (dbx *apiImpl) MembersList(arg *MembersListArg) (res *MembersListResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2348,21 +2348,21 @@ func (dbx *apiImpl) MembersList(arg *MembersListArg) (res *MembersListResult, er
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2403,7 +2403,7 @@ type MembersListContinueAPIError struct {
func (dbx *apiImpl) MembersListContinue(arg *MembersListContinueArg) (res *MembersListResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2417,21 +2417,21 @@ func (dbx *apiImpl) MembersListContinue(arg *MembersListContinueArg) (res *Membe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2472,7 +2472,7 @@ type MembersRecoverAPIError struct {
func (dbx *apiImpl) MembersRecover(arg *MembersRecoverArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2486,21 +2486,21 @@ func (dbx *apiImpl) MembersRecover(arg *MembersRecoverArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2536,7 +2536,7 @@ type MembersRemoveAPIError struct {
func (dbx *apiImpl) MembersRemove(arg *MembersRemoveArg) (res *async.LaunchEmptyResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2550,21 +2550,21 @@ func (dbx *apiImpl) MembersRemove(arg *MembersRemoveArg) (res *async.LaunchEmpty
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2605,7 +2605,7 @@ type MembersRemoveJobStatusGetAPIError struct {
func (dbx *apiImpl) MembersRemoveJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2619,21 +2619,21 @@ func (dbx *apiImpl) MembersRemoveJobStatusGet(arg *async.PollArg) (res *async.Po
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2674,7 +2674,7 @@ type MembersSendWelcomeEmailAPIError struct {
func (dbx *apiImpl) MembersSendWelcomeEmail(arg *UserSelectorArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2688,21 +2688,21 @@ func (dbx *apiImpl) MembersSendWelcomeEmail(arg *UserSelectorArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2738,7 +2738,7 @@ type MembersSetAdminPermissionsAPIError struct {
func (dbx *apiImpl) MembersSetAdminPermissions(arg *MembersSetPermissionsArg) (res *MembersSetPermissionsResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2752,21 +2752,21 @@ func (dbx *apiImpl) MembersSetAdminPermissions(arg *MembersSetPermissionsArg) (r
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2807,7 +2807,7 @@ type MembersSetProfileAPIError struct {
func (dbx *apiImpl) MembersSetProfile(arg *MembersSetProfileArg) (res *TeamMemberInfo, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2821,21 +2821,21 @@ func (dbx *apiImpl) MembersSetProfile(arg *MembersSetProfileArg) (res *TeamMembe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -2876,7 +2876,7 @@ type MembersSuspendAPIError struct {
func (dbx *apiImpl) MembersSuspend(arg *MembersDeactivateArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2890,21 +2890,21 @@ func (dbx *apiImpl) MembersSuspend(arg *MembersDeactivateArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -2940,7 +2940,7 @@ type MembersUnsuspendAPIError struct {
func (dbx *apiImpl) MembersUnsuspend(arg *MembersUnsuspendArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -2954,21 +2954,21 @@ func (dbx *apiImpl) MembersUnsuspend(arg *MembersUnsuspendArg) (err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -3004,7 +3004,7 @@ type NamespacesListAPIError struct {
func (dbx *apiImpl) NamespacesList(arg *TeamNamespacesListArg) (res *TeamNamespacesListResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3018,21 +3018,21 @@ func (dbx *apiImpl) NamespacesList(arg *TeamNamespacesListArg) (res *TeamNamespa
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3073,7 +3073,7 @@ type NamespacesListContinueAPIError struct {
func (dbx *apiImpl) NamespacesListContinue(arg *TeamNamespacesListContinueArg) (res *TeamNamespacesListResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3087,21 +3087,21 @@ func (dbx *apiImpl) NamespacesListContinue(arg *TeamNamespacesListContinueArg) (
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3144,7 +3144,7 @@ func (dbx *apiImpl) PropertiesTemplateAdd(arg *file_properties.AddTemplateArg) (
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3158,21 +3158,21 @@ func (dbx *apiImpl) PropertiesTemplateAdd(arg *file_properties.AddTemplateArg) (
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3215,7 +3215,7 @@ func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3229,21 +3229,21 @@ func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3292,21 +3292,21 @@ func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.ListTemplateR
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3349,7 +3349,7 @@ func (dbx *apiImpl) PropertiesTemplateUpdate(arg *file_properties.UpdateTemplate
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3363,21 +3363,21 @@ func (dbx *apiImpl) PropertiesTemplateUpdate(arg *file_properties.UpdateTemplate
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3418,7 +3418,7 @@ type ReportsGetActivityAPIError struct {
func (dbx *apiImpl) ReportsGetActivity(arg *DateRange) (res *GetActivityReport, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3432,21 +3432,21 @@ func (dbx *apiImpl) ReportsGetActivity(arg *DateRange) (res *GetActivityReport,
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3487,7 +3487,7 @@ type ReportsGetDevicesAPIError struct {
func (dbx *apiImpl) ReportsGetDevices(arg *DateRange) (res *GetDevicesReport, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3501,21 +3501,21 @@ func (dbx *apiImpl) ReportsGetDevices(arg *DateRange) (res *GetDevicesReport, er
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3556,7 +3556,7 @@ type ReportsGetMembershipAPIError struct {
func (dbx *apiImpl) ReportsGetMembership(arg *DateRange) (res *GetMembershipReport, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3570,21 +3570,21 @@ func (dbx *apiImpl) ReportsGetMembership(arg *DateRange) (res *GetMembershipRepo
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3625,7 +3625,7 @@ type ReportsGetStorageAPIError struct {
func (dbx *apiImpl) ReportsGetStorage(arg *DateRange) (res *GetStorageReport, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3639,21 +3639,21 @@ func (dbx *apiImpl) ReportsGetStorage(arg *DateRange) (res *GetStorageReport, er
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3694,7 +3694,7 @@ type TeamFolderActivateAPIError struct {
func (dbx *apiImpl) TeamFolderActivate(arg *TeamFolderIdArg) (res *TeamFolderMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3708,21 +3708,21 @@ func (dbx *apiImpl) TeamFolderActivate(arg *TeamFolderIdArg) (res *TeamFolderMet
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3763,7 +3763,7 @@ type TeamFolderArchiveAPIError struct {
func (dbx *apiImpl) TeamFolderArchive(arg *TeamFolderArchiveArg) (res *TeamFolderArchiveLaunch, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3777,21 +3777,21 @@ func (dbx *apiImpl) TeamFolderArchive(arg *TeamFolderArchiveArg) (res *TeamFolde
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3832,7 +3832,7 @@ type TeamFolderArchiveCheckAPIError struct {
func (dbx *apiImpl) TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderArchiveJobStatus, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3846,21 +3846,21 @@ func (dbx *apiImpl) TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderA
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3901,7 +3901,7 @@ type TeamFolderCreateAPIError struct {
func (dbx *apiImpl) TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3915,21 +3915,21 @@ func (dbx *apiImpl) TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderM
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -3970,7 +3970,7 @@ type TeamFolderGetInfoAPIError struct {
func (dbx *apiImpl) TeamFolderGetInfo(arg *TeamFolderIdListArg) (res []*TeamFolderGetInfoItem, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -3984,21 +3984,21 @@ func (dbx *apiImpl) TeamFolderGetInfo(arg *TeamFolderIdListArg) (res []*TeamFold
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -4039,7 +4039,7 @@ type TeamFolderListAPIError struct {
func (dbx *apiImpl) TeamFolderList(arg *TeamFolderListArg) (res *TeamFolderListResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -4053,21 +4053,21 @@ func (dbx *apiImpl) TeamFolderList(arg *TeamFolderListArg) (res *TeamFolderListR
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -4108,7 +4108,7 @@ type TeamFolderListContinueAPIError struct {
func (dbx *apiImpl) TeamFolderListContinue(arg *TeamFolderListContinueArg) (res *TeamFolderListResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -4122,21 +4122,21 @@ func (dbx *apiImpl) TeamFolderListContinue(arg *TeamFolderListContinueArg) (res
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -4177,7 +4177,7 @@ type TeamFolderPermanentlyDeleteAPIError struct {
func (dbx *apiImpl) TeamFolderPermanentlyDelete(arg *TeamFolderIdArg) (err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -4191,21 +4191,21 @@ func (dbx *apiImpl) TeamFolderPermanentlyDelete(arg *TeamFolderIdArg) (err error
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
return
}
@@ -4241,7 +4241,7 @@ type TeamFolderRenameAPIError struct {
func (dbx *apiImpl) TeamFolderRename(arg *TeamFolderRenameArg) (res *TeamFolderMetadata, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -4255,21 +4255,21 @@ func (dbx *apiImpl) TeamFolderRename(arg *TeamFolderRenameArg) (res *TeamFolderM
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -4316,21 +4316,21 @@ func (dbx *apiImpl) TokenGetAuthenticatedAdmin() (res *TokenGetAuthenticatedAdmi
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/types.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/types.go
index 972d97900..4aff9248e 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/types.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/types.go
@@ -697,6 +697,8 @@ type GroupSelectorWithTeamGroupError struct {
// Valid tag values for GroupSelectorWithTeamGroupError
const (
+ GroupSelectorWithTeamGroupErrorGroupNotFound = "group_not_found"
+ GroupSelectorWithTeamGroupErrorOther = "other"
GroupSelectorWithTeamGroupErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
)
@@ -707,7 +709,10 @@ type GroupDeleteError struct {
// Valid tag values for GroupDeleteError
const (
- GroupDeleteErrorGroupAlreadyDeleted = "group_already_deleted"
+ GroupDeleteErrorGroupNotFound = "group_not_found"
+ GroupDeleteErrorOther = "other"
+ GroupDeleteErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
+ GroupDeleteErrorGroupAlreadyDeleted = "group_already_deleted"
)
// GroupFullInfo : Full description of a group.
@@ -771,7 +776,10 @@ type GroupMemberSelectorError struct {
// Valid tag values for GroupMemberSelectorError
const (
- GroupMemberSelectorErrorMemberNotInGroup = "member_not_in_group"
+ GroupMemberSelectorErrorGroupNotFound = "group_not_found"
+ GroupMemberSelectorErrorOther = "other"
+ GroupMemberSelectorErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
+ GroupMemberSelectorErrorMemberNotInGroup = "member_not_in_group"
)
// GroupMemberSetAccessTypeError : has no documentation (yet)
@@ -781,6 +789,10 @@ type GroupMemberSetAccessTypeError struct {
// Valid tag values for GroupMemberSetAccessTypeError
const (
+ GroupMemberSetAccessTypeErrorGroupNotFound = "group_not_found"
+ GroupMemberSetAccessTypeErrorOther = "other"
+ GroupMemberSetAccessTypeErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
+ GroupMemberSetAccessTypeErrorMemberNotInGroup = "member_not_in_group"
GroupMemberSetAccessTypeErrorUserCannotBeManagerOfCompanyManagedGroup = "user_cannot_be_manager_of_company_managed_group"
)
@@ -834,6 +846,9 @@ type GroupMembersAddError struct {
// Valid tag values for GroupMembersAddError
const (
+ GroupMembersAddErrorGroupNotFound = "group_not_found"
+ GroupMembersAddErrorOther = "other"
+ GroupMembersAddErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
GroupMembersAddErrorDuplicateUser = "duplicate_user"
GroupMembersAddErrorGroupNotInTeam = "group_not_in_team"
GroupMembersAddErrorMembersNotInTeam = "members_not_in_team"
@@ -932,7 +947,10 @@ type GroupMembersSelectorError struct {
// Valid tag values for GroupMembersSelectorError
const (
- GroupMembersSelectorErrorMemberNotInGroup = "member_not_in_group"
+ GroupMembersSelectorErrorGroupNotFound = "group_not_found"
+ GroupMembersSelectorErrorOther = "other"
+ GroupMembersSelectorErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
+ GroupMembersSelectorErrorMemberNotInGroup = "member_not_in_group"
)
// GroupMembersRemoveError : has no documentation (yet)
@@ -946,9 +964,13 @@ type GroupMembersRemoveError struct {
// Valid tag values for GroupMembersRemoveError
const (
- GroupMembersRemoveErrorGroupNotInTeam = "group_not_in_team"
- GroupMembersRemoveErrorMembersNotInTeam = "members_not_in_team"
- GroupMembersRemoveErrorUsersNotFound = "users_not_found"
+ GroupMembersRemoveErrorGroupNotFound = "group_not_found"
+ GroupMembersRemoveErrorOther = "other"
+ GroupMembersRemoveErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
+ GroupMembersRemoveErrorMemberNotInGroup = "member_not_in_group"
+ GroupMembersRemoveErrorGroupNotInTeam = "group_not_in_team"
+ GroupMembersRemoveErrorMembersNotInTeam = "members_not_in_team"
+ GroupMembersRemoveErrorUsersNotFound = "users_not_found"
)
// UnmarshalJSON deserializes into a GroupMembersRemoveError instance
@@ -1094,9 +1116,12 @@ type GroupUpdateError struct {
// Valid tag values for GroupUpdateError
const (
- GroupUpdateErrorGroupNameAlreadyUsed = "group_name_already_used"
- GroupUpdateErrorGroupNameInvalid = "group_name_invalid"
- GroupUpdateErrorExternalIdAlreadyInUse = "external_id_already_in_use"
+ GroupUpdateErrorGroupNotFound = "group_not_found"
+ GroupUpdateErrorOther = "other"
+ GroupUpdateErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
+ GroupUpdateErrorGroupNameAlreadyUsed = "group_name_already_used"
+ GroupUpdateErrorGroupNameInvalid = "group_name_invalid"
+ GroupUpdateErrorExternalIdAlreadyInUse = "external_id_already_in_use"
)
// GroupsGetInfoError : has no documentation (yet)
@@ -1285,7 +1310,10 @@ type GroupsPollError struct {
// Valid tag values for GroupsPollError
const (
- GroupsPollErrorAccessDenied = "access_denied"
+ GroupsPollErrorInvalidAsyncJobId = "invalid_async_job_id"
+ GroupsPollErrorInternalError = "internal_error"
+ GroupsPollErrorOther = "other"
+ GroupsPollErrorAccessDenied = "access_denied"
)
// GroupsSelector : Argument for selecting a list of groups, either by
@@ -1950,6 +1978,7 @@ type MemberSelectorError struct {
// Valid tag values for MemberSelectorError
const (
+ MemberSelectorErrorUserNotFound = "user_not_found"
MemberSelectorErrorUserNotInTeam = "user_not_in_team"
)
@@ -1983,8 +2012,9 @@ type MembersAddJobStatus struct {
// Valid tag values for MembersAddJobStatus
const (
- MembersAddJobStatusComplete = "complete"
- MembersAddJobStatusFailed = "failed"
+ MembersAddJobStatusInProgress = "in_progress"
+ MembersAddJobStatusComplete = "complete"
+ MembersAddJobStatusFailed = "failed"
)
// UnmarshalJSON deserializes into a MembersAddJobStatus instance
@@ -2022,13 +2052,18 @@ func (u *MembersAddJobStatus) UnmarshalJSON(body []byte) error {
// MembersAddLaunch : has no documentation (yet)
type MembersAddLaunch struct {
dropbox.Tagged
+ // AsyncJobId : This response indicates that the processing is asynchronous.
+ // The string is an id that can be used to obtain the status of the
+ // asynchronous job.
+ AsyncJobId string `json:"async_job_id,omitempty"`
// Complete : has no documentation (yet)
Complete []*MemberAddResult `json:"complete,omitempty"`
}
// Valid tag values for MembersAddLaunch
const (
- MembersAddLaunchComplete = "complete"
+ MembersAddLaunchAsyncJobId = "async_job_id"
+ MembersAddLaunchComplete = "complete"
)
// UnmarshalJSON deserializes into a MembersAddLaunch instance
@@ -2045,6 +2080,12 @@ func (u *MembersAddLaunch) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "async_job_id":
+ err = json.Unmarshal(body, &u.AsyncJobId)
+
+ if err != nil {
+ return err
+ }
case "complete":
err = json.Unmarshal(body, &u.Complete)
@@ -2080,6 +2121,7 @@ type MembersDeactivateError struct {
// Valid tag values for MembersDeactivateError
const (
+ MembersDeactivateErrorUserNotFound = "user_not_found"
MembersDeactivateErrorUserNotInTeam = "user_not_in_team"
MembersDeactivateErrorOther = "other"
)
@@ -2248,6 +2290,7 @@ type MembersRecoverError struct {
// Valid tag values for MembersRecoverError
const (
+ MembersRecoverErrorUserNotFound = "user_not_found"
MembersRecoverErrorUserUnrecoverable = "user_unrecoverable"
MembersRecoverErrorUserNotInTeam = "user_not_in_team"
MembersRecoverErrorTeamLicenseLimit = "team_license_limit"
@@ -2287,6 +2330,9 @@ type MembersRemoveError struct {
// Valid tag values for MembersRemoveError
const (
+ MembersRemoveErrorUserNotFound = "user_not_found"
+ MembersRemoveErrorUserNotInTeam = "user_not_in_team"
+ MembersRemoveErrorOther = "other"
MembersRemoveErrorRemoveLastAdmin = "remove_last_admin"
MembersRemoveErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ"
MembersRemoveErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ"
@@ -2308,7 +2354,9 @@ type MembersSendWelcomeError struct {
// Valid tag values for MembersSendWelcomeError
const (
- MembersSendWelcomeErrorOther = "other"
+ MembersSendWelcomeErrorUserNotFound = "user_not_found"
+ MembersSendWelcomeErrorUserNotInTeam = "user_not_in_team"
+ MembersSendWelcomeErrorOther = "other"
)
// MembersSetPermissionsArg : Exactly one of team_member_id, email, or
@@ -2335,6 +2383,7 @@ type MembersSetPermissionsError struct {
// Valid tag values for MembersSetPermissionsError
const (
+ MembersSetPermissionsErrorUserNotFound = "user_not_found"
MembersSetPermissionsErrorLastAdmin = "last_admin"
MembersSetPermissionsErrorUserNotInTeam = "user_not_in_team"
MembersSetPermissionsErrorCannotSetPermissions = "cannot_set_permissions"
@@ -2391,6 +2440,8 @@ type MembersSetProfileError struct {
// Valid tag values for MembersSetProfileError
const (
+ MembersSetProfileErrorUserNotFound = "user_not_found"
+ MembersSetProfileErrorUserNotInTeam = "user_not_in_team"
MembersSetProfileErrorExternalIdAndNewExternalIdUnsafe = "external_id_and_new_external_id_unsafe"
MembersSetProfileErrorNoNewDataSpecified = "no_new_data_specified"
MembersSetProfileErrorEmailReservedForOtherUser = "email_reserved_for_other_user"
@@ -2409,6 +2460,9 @@ type MembersSuspendError struct {
// Valid tag values for MembersSuspendError
const (
+ MembersSuspendErrorUserNotFound = "user_not_found"
+ MembersSuspendErrorUserNotInTeam = "user_not_in_team"
+ MembersSuspendErrorOther = "other"
MembersSuspendErrorSuspendInactiveUser = "suspend_inactive_user"
MembersSuspendErrorSuspendLastAdmin = "suspend_last_admin"
MembersSuspendErrorTeamLicenseLimit = "team_license_limit"
@@ -2435,6 +2489,9 @@ type MembersUnsuspendError struct {
// Valid tag values for MembersUnsuspendError
const (
+ MembersUnsuspendErrorUserNotFound = "user_not_found"
+ MembersUnsuspendErrorUserNotInTeam = "user_not_in_team"
+ MembersUnsuspendErrorOther = "other"
MembersUnsuspendErrorUnsuspendNonSuspendedMember = "unsuspend_non_suspended_member"
MembersUnsuspendErrorTeamLicenseLimit = "team_license_limit"
)
@@ -2845,10 +2902,61 @@ const (
// TeamFolderActivateError :
type TeamFolderActivateError struct {
dropbox.Tagged
+ // AccessError : has no documentation (yet)
+ AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
+ // StatusError : has no documentation (yet)
+ StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
+ // TeamSharedDropboxError : has no documentation (yet)
+ TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
}
// Valid tag values for TeamFolderActivateError
-const ()
+const (
+ TeamFolderActivateErrorAccessError = "access_error"
+ TeamFolderActivateErrorStatusError = "status_error"
+ TeamFolderActivateErrorTeamSharedDropboxError = "team_shared_dropbox_error"
+ TeamFolderActivateErrorOther = "other"
+)
+
+// UnmarshalJSON deserializes into a TeamFolderActivateError instance
+func (u *TeamFolderActivateError) UnmarshalJSON(body []byte) error {
+ type wrap struct {
+ dropbox.Tagged
+ // AccessError : has no documentation (yet)
+ AccessError json.RawMessage `json:"access_error,omitempty"`
+ // StatusError : has no documentation (yet)
+ StatusError json.RawMessage `json:"status_error,omitempty"`
+ // TeamSharedDropboxError : has no documentation (yet)
+ TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"`
+ }
+ var w wrap
+ var err error
+ if err = json.Unmarshal(body, &w); err != nil {
+ return err
+ }
+ u.Tag = w.Tag
+ switch u.Tag {
+ case "access_error":
+ err = json.Unmarshal(w.AccessError, &u.AccessError)
+
+ if err != nil {
+ return err
+ }
+ case "status_error":
+ err = json.Unmarshal(w.StatusError, &u.StatusError)
+
+ if err != nil {
+ return err
+ }
+ case "team_shared_dropbox_error":
+ err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError)
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
// TeamFolderIdArg : has no documentation (yet)
type TeamFolderIdArg struct {
@@ -2881,10 +2989,61 @@ func NewTeamFolderArchiveArg(TeamFolderId string) *TeamFolderArchiveArg {
// TeamFolderArchiveError :
type TeamFolderArchiveError struct {
dropbox.Tagged
+ // AccessError : has no documentation (yet)
+ AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
+ // StatusError : has no documentation (yet)
+ StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
+ // TeamSharedDropboxError : has no documentation (yet)
+ TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
}
// Valid tag values for TeamFolderArchiveError
-const ()
+const (
+ TeamFolderArchiveErrorAccessError = "access_error"
+ TeamFolderArchiveErrorStatusError = "status_error"
+ TeamFolderArchiveErrorTeamSharedDropboxError = "team_shared_dropbox_error"
+ TeamFolderArchiveErrorOther = "other"
+)
+
+// UnmarshalJSON deserializes into a TeamFolderArchiveError instance
+func (u *TeamFolderArchiveError) UnmarshalJSON(body []byte) error {
+ type wrap struct {
+ dropbox.Tagged
+ // AccessError : has no documentation (yet)
+ AccessError json.RawMessage `json:"access_error,omitempty"`
+ // StatusError : has no documentation (yet)
+ StatusError json.RawMessage `json:"status_error,omitempty"`
+ // TeamSharedDropboxError : has no documentation (yet)
+ TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"`
+ }
+ var w wrap
+ var err error
+ if err = json.Unmarshal(body, &w); err != nil {
+ return err
+ }
+ u.Tag = w.Tag
+ switch u.Tag {
+ case "access_error":
+ err = json.Unmarshal(w.AccessError, &u.AccessError)
+
+ if err != nil {
+ return err
+ }
+ case "status_error":
+ err = json.Unmarshal(w.StatusError, &u.StatusError)
+
+ if err != nil {
+ return err
+ }
+ case "team_shared_dropbox_error":
+ err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError)
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
// TeamFolderArchiveJobStatus : has no documentation (yet)
type TeamFolderArchiveJobStatus struct {
@@ -2899,8 +3058,9 @@ type TeamFolderArchiveJobStatus struct {
// Valid tag values for TeamFolderArchiveJobStatus
const (
- TeamFolderArchiveJobStatusComplete = "complete"
- TeamFolderArchiveJobStatusFailed = "failed"
+ TeamFolderArchiveJobStatusInProgress = "in_progress"
+ TeamFolderArchiveJobStatusComplete = "complete"
+ TeamFolderArchiveJobStatusFailed = "failed"
)
// UnmarshalJSON deserializes into a TeamFolderArchiveJobStatus instance
@@ -2940,13 +3100,18 @@ func (u *TeamFolderArchiveJobStatus) UnmarshalJSON(body []byte) error {
// TeamFolderArchiveLaunch : has no documentation (yet)
type TeamFolderArchiveLaunch struct {
dropbox.Tagged
+ // AsyncJobId : This response indicates that the processing is asynchronous.
+ // The string is an id that can be used to obtain the status of the
+ // asynchronous job.
+ AsyncJobId string `json:"async_job_id,omitempty"`
// Complete : has no documentation (yet)
Complete *TeamFolderMetadata `json:"complete,omitempty"`
}
// Valid tag values for TeamFolderArchiveLaunch
const (
- TeamFolderArchiveLaunchComplete = "complete"
+ TeamFolderArchiveLaunchAsyncJobId = "async_job_id"
+ TeamFolderArchiveLaunchComplete = "complete"
)
// UnmarshalJSON deserializes into a TeamFolderArchiveLaunch instance
@@ -2963,6 +3128,12 @@ func (u *TeamFolderArchiveLaunch) UnmarshalJSON(body []byte) error {
}
u.Tag = w.Tag
switch u.Tag {
+ case "async_job_id":
+ err = json.Unmarshal(body, &u.AsyncJobId)
+
+ if err != nil {
+ return err
+ }
case "complete":
err = json.Unmarshal(body, &u.Complete)
@@ -3170,10 +3341,61 @@ func NewTeamFolderMetadata(TeamFolderId string, Name string, Status *TeamFolderS
// TeamFolderPermanentlyDeleteError :
type TeamFolderPermanentlyDeleteError struct {
dropbox.Tagged
+ // AccessError : has no documentation (yet)
+ AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
+ // StatusError : has no documentation (yet)
+ StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
+ // TeamSharedDropboxError : has no documentation (yet)
+ TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
}
// Valid tag values for TeamFolderPermanentlyDeleteError
-const ()
+const (
+ TeamFolderPermanentlyDeleteErrorAccessError = "access_error"
+ TeamFolderPermanentlyDeleteErrorStatusError = "status_error"
+ TeamFolderPermanentlyDeleteErrorTeamSharedDropboxError = "team_shared_dropbox_error"
+ TeamFolderPermanentlyDeleteErrorOther = "other"
+)
+
+// UnmarshalJSON deserializes into a TeamFolderPermanentlyDeleteError instance
+func (u *TeamFolderPermanentlyDeleteError) UnmarshalJSON(body []byte) error {
+ type wrap struct {
+ dropbox.Tagged
+ // AccessError : has no documentation (yet)
+ AccessError json.RawMessage `json:"access_error,omitempty"`
+ // StatusError : has no documentation (yet)
+ StatusError json.RawMessage `json:"status_error,omitempty"`
+ // TeamSharedDropboxError : has no documentation (yet)
+ TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"`
+ }
+ var w wrap
+ var err error
+ if err = json.Unmarshal(body, &w); err != nil {
+ return err
+ }
+ u.Tag = w.Tag
+ switch u.Tag {
+ case "access_error":
+ err = json.Unmarshal(w.AccessError, &u.AccessError)
+
+ if err != nil {
+ return err
+ }
+ case "status_error":
+ err = json.Unmarshal(w.StatusError, &u.StatusError)
+
+ if err != nil {
+ return err
+ }
+ case "team_shared_dropbox_error":
+ err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError)
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
// TeamFolderRenameArg : has no documentation (yet)
type TeamFolderRenameArg struct {
@@ -3193,15 +3415,65 @@ func NewTeamFolderRenameArg(TeamFolderId string, Name string) *TeamFolderRenameA
// TeamFolderRenameError : has no documentation (yet)
type TeamFolderRenameError struct {
dropbox.Tagged
+ // AccessError : has no documentation (yet)
+ AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
+ // StatusError : has no documentation (yet)
+ StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
+ // TeamSharedDropboxError : has no documentation (yet)
+ TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
}
// Valid tag values for TeamFolderRenameError
const (
- TeamFolderRenameErrorInvalidFolderName = "invalid_folder_name"
- TeamFolderRenameErrorFolderNameAlreadyUsed = "folder_name_already_used"
- TeamFolderRenameErrorFolderNameReserved = "folder_name_reserved"
+ TeamFolderRenameErrorAccessError = "access_error"
+ TeamFolderRenameErrorStatusError = "status_error"
+ TeamFolderRenameErrorTeamSharedDropboxError = "team_shared_dropbox_error"
+ TeamFolderRenameErrorOther = "other"
+ TeamFolderRenameErrorInvalidFolderName = "invalid_folder_name"
+ TeamFolderRenameErrorFolderNameAlreadyUsed = "folder_name_already_used"
+ TeamFolderRenameErrorFolderNameReserved = "folder_name_reserved"
)
+// UnmarshalJSON deserializes into a TeamFolderRenameError instance
+func (u *TeamFolderRenameError) UnmarshalJSON(body []byte) error {
+ type wrap struct {
+ dropbox.Tagged
+ // AccessError : has no documentation (yet)
+ AccessError json.RawMessage `json:"access_error,omitempty"`
+ // StatusError : has no documentation (yet)
+ StatusError json.RawMessage `json:"status_error,omitempty"`
+ // TeamSharedDropboxError : has no documentation (yet)
+ TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"`
+ }
+ var w wrap
+ var err error
+ if err = json.Unmarshal(body, &w); err != nil {
+ return err
+ }
+ u.Tag = w.Tag
+ switch u.Tag {
+ case "access_error":
+ err = json.Unmarshal(w.AccessError, &u.AccessError)
+
+ if err != nil {
+ return err
+ }
+ case "status_error":
+ err = json.Unmarshal(w.StatusError, &u.StatusError)
+
+ if err != nil {
+ return err
+ }
+ case "team_shared_dropbox_error":
+ err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError)
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
// TeamFolderStatus : has no documentation (yet)
type TeamFolderStatus struct {
dropbox.Tagged
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/client.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/client.go
index b80a11095..6bc17db9a 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/client.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/client.go
@@ -49,7 +49,7 @@ type GetEventsAPIError struct {
func (dbx *apiImpl) GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -63,21 +63,21 @@ func (dbx *apiImpl) GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult,
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -118,7 +118,7 @@ type GetEventsContinueAPIError struct {
func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTeamEventsResult, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -132,21 +132,21 @@ func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTe
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/types.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/types.go
index 7b05d9eae..d55a1477a 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/types.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/types.go
@@ -1213,9 +1213,6 @@ func NewDomainVerificationAddDomainSuccessDetails(DomainNames []string) *DomainV
type DomainVerificationRemoveDomainDetails struct {
// DomainNames : Domain names.
DomainNames []string `json:"domain_names"`
- // VerificationMethod : Domain name verification method. Might be missing
- // due to historical data gap.
- VerificationMethod string `json:"verification_method,omitempty"`
}
// NewDomainVerificationRemoveDomainDetails returns a new DomainVerificationRemoveDomainDetails instance
@@ -1856,6 +1853,8 @@ type EventDetails struct {
// ShmodelVisibilityTeamOnlyDetails : Made a file/folder visible only to
// team members with the link.
ShmodelVisibilityTeamOnlyDetails *ShmodelVisibilityTeamOnlyDetails `json:"shmodel_visibility_team_only_details,omitempty"`
+ // SsoAddCertDetails : Added the X.509 certificate for SSO.
+ SsoAddCertDetails *SsoAddCertDetails `json:"sso_add_cert_details,omitempty"`
// SsoAddLoginUrlDetails : Added sign-in URL for SSO.
SsoAddLoginUrlDetails *SsoAddLoginUrlDetails `json:"sso_add_login_url_details,omitempty"`
// SsoAddLogoutUrlDetails : Added sign-out URL for SSO.
@@ -1869,6 +1868,8 @@ type EventDetails struct {
// SsoChangeSamlIdentityModeDetails : Changed the SAML identity mode for
// SSO.
SsoChangeSamlIdentityModeDetails *SsoChangeSamlIdentityModeDetails `json:"sso_change_saml_identity_mode_details,omitempty"`
+ // SsoRemoveCertDetails : Removed the X.509 certificate for SSO.
+ SsoRemoveCertDetails *SsoRemoveCertDetails `json:"sso_remove_cert_details,omitempty"`
// SsoRemoveLoginUrlDetails : Removed the sign-in URL for SSO.
SsoRemoveLoginUrlDetails *SsoRemoveLoginUrlDetails `json:"sso_remove_login_url_details,omitempty"`
// SsoRemoveLogoutUrlDetails : Removed single sign-on logout URL.
@@ -1968,6 +1969,9 @@ type EventDetails struct {
// PaperChangeDeploymentPolicyDetails : Changed whether Dropbox Paper, when
// enabled, is deployed to all teams or to specific members of the team.
PaperChangeDeploymentPolicyDetails *PaperChangeDeploymentPolicyDetails `json:"paper_change_deployment_policy_details,omitempty"`
+ // PaperChangeMemberLinkPolicyDetails : Changed whether non team members can
+ // view Paper documents using a link.
+ PaperChangeMemberLinkPolicyDetails *PaperChangeMemberLinkPolicyDetails `json:"paper_change_member_link_policy_details,omitempty"`
// PaperChangeMemberPolicyDetails : Changed whether team members can share
// Paper documents externally (i.e. outside the team), and if so, whether
// they should be accessible only by team members or anyone by default.
@@ -2013,6 +2017,9 @@ type EventDetails struct {
// TeamProfileAddLogoDetails : Added a team logo to be displayed on shared
// link headers.
TeamProfileAddLogoDetails *TeamProfileAddLogoDetails `json:"team_profile_add_logo_details,omitempty"`
+ // TeamProfileChangeDefaultLanguageDetails : Changed the default language
+ // for the team.
+ TeamProfileChangeDefaultLanguageDetails *TeamProfileChangeDefaultLanguageDetails `json:"team_profile_change_default_language_details,omitempty"`
// TeamProfileChangeLogoDetails : Changed the team logo to be displayed on
// shared link headers.
TeamProfileChangeLogoDetails *TeamProfileChangeLogoDetails `json:"team_profile_change_logo_details,omitempty"`
@@ -2249,12 +2256,14 @@ const (
EventDetailsShmodelVisibilityPasswordDetails = "shmodel_visibility_password_details"
EventDetailsShmodelVisibilityPublicDetails = "shmodel_visibility_public_details"
EventDetailsShmodelVisibilityTeamOnlyDetails = "shmodel_visibility_team_only_details"
+ EventDetailsSsoAddCertDetails = "sso_add_cert_details"
EventDetailsSsoAddLoginUrlDetails = "sso_add_login_url_details"
EventDetailsSsoAddLogoutUrlDetails = "sso_add_logout_url_details"
EventDetailsSsoChangeCertDetails = "sso_change_cert_details"
EventDetailsSsoChangeLoginUrlDetails = "sso_change_login_url_details"
EventDetailsSsoChangeLogoutUrlDetails = "sso_change_logout_url_details"
EventDetailsSsoChangeSamlIdentityModeDetails = "sso_change_saml_identity_mode_details"
+ EventDetailsSsoRemoveCertDetails = "sso_remove_cert_details"
EventDetailsSsoRemoveLoginUrlDetails = "sso_remove_login_url_details"
EventDetailsSsoRemoveLogoutUrlDetails = "sso_remove_logout_url_details"
EventDetailsTeamFolderChangeStatusDetails = "team_folder_change_status_details"
@@ -2289,6 +2298,7 @@ const (
EventDetailsMicrosoftOfficeAddinChangePolicyDetails = "microsoft_office_addin_change_policy_details"
EventDetailsNetworkControlChangePolicyDetails = "network_control_change_policy_details"
EventDetailsPaperChangeDeploymentPolicyDetails = "paper_change_deployment_policy_details"
+ EventDetailsPaperChangeMemberLinkPolicyDetails = "paper_change_member_link_policy_details"
EventDetailsPaperChangeMemberPolicyDetails = "paper_change_member_policy_details"
EventDetailsPaperChangePolicyDetails = "paper_change_policy_details"
EventDetailsPermanentDeleteChangePolicyDetails = "permanent_delete_change_policy_details"
@@ -2304,6 +2314,7 @@ const (
EventDetailsWebSessionsChangeFixedLengthPolicyDetails = "web_sessions_change_fixed_length_policy_details"
EventDetailsWebSessionsChangeIdleLengthPolicyDetails = "web_sessions_change_idle_length_policy_details"
EventDetailsTeamProfileAddLogoDetails = "team_profile_add_logo_details"
+ EventDetailsTeamProfileChangeDefaultLanguageDetails = "team_profile_change_default_language_details"
EventDetailsTeamProfileChangeLogoDetails = "team_profile_change_logo_details"
EventDetailsTeamProfileChangeNameDetails = "team_profile_change_name_details"
EventDetailsTeamProfileRemoveLogoDetails = "team_profile_remove_logo_details"
@@ -2813,6 +2824,8 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
// ShmodelVisibilityTeamOnlyDetails : Made a file/folder visible only to
// team members with the link.
ShmodelVisibilityTeamOnlyDetails json.RawMessage `json:"shmodel_visibility_team_only_details,omitempty"`
+ // SsoAddCertDetails : Added the X.509 certificate for SSO.
+ SsoAddCertDetails json.RawMessage `json:"sso_add_cert_details,omitempty"`
// SsoAddLoginUrlDetails : Added sign-in URL for SSO.
SsoAddLoginUrlDetails json.RawMessage `json:"sso_add_login_url_details,omitempty"`
// SsoAddLogoutUrlDetails : Added sign-out URL for SSO.
@@ -2826,6 +2839,8 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
// SsoChangeSamlIdentityModeDetails : Changed the SAML identity mode for
// SSO.
SsoChangeSamlIdentityModeDetails json.RawMessage `json:"sso_change_saml_identity_mode_details,omitempty"`
+ // SsoRemoveCertDetails : Removed the X.509 certificate for SSO.
+ SsoRemoveCertDetails json.RawMessage `json:"sso_remove_cert_details,omitempty"`
// SsoRemoveLoginUrlDetails : Removed the sign-in URL for SSO.
SsoRemoveLoginUrlDetails json.RawMessage `json:"sso_remove_login_url_details,omitempty"`
// SsoRemoveLogoutUrlDetails : Removed single sign-on logout URL.
@@ -2932,6 +2947,9 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
// when enabled, is deployed to all teams or to specific members of the
// team.
PaperChangeDeploymentPolicyDetails json.RawMessage `json:"paper_change_deployment_policy_details,omitempty"`
+ // PaperChangeMemberLinkPolicyDetails : Changed whether non team members
+ // can view Paper documents using a link.
+ PaperChangeMemberLinkPolicyDetails json.RawMessage `json:"paper_change_member_link_policy_details,omitempty"`
// PaperChangeMemberPolicyDetails : Changed whether team members can
// share Paper documents externally (i.e. outside the team), and if so,
// whether they should be accessible only by team members or anyone by
@@ -2979,6 +2997,9 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
// TeamProfileAddLogoDetails : Added a team logo to be displayed on
// shared link headers.
TeamProfileAddLogoDetails json.RawMessage `json:"team_profile_add_logo_details,omitempty"`
+ // TeamProfileChangeDefaultLanguageDetails : Changed the default
+ // language for the team.
+ TeamProfileChangeDefaultLanguageDetails json.RawMessage `json:"team_profile_change_default_language_details,omitempty"`
// TeamProfileChangeLogoDetails : Changed the team logo to be displayed
// on shared link headers.
TeamProfileChangeLogoDetails json.RawMessage `json:"team_profile_change_logo_details,omitempty"`
@@ -4221,6 +4242,12 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
case "shmodel_visibility_team_only_details":
err = json.Unmarshal(body, &u.ShmodelVisibilityTeamOnlyDetails)
+ if err != nil {
+ return err
+ }
+ case "sso_add_cert_details":
+ err = json.Unmarshal(body, &u.SsoAddCertDetails)
+
if err != nil {
return err
}
@@ -4257,6 +4284,12 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
case "sso_change_saml_identity_mode_details":
err = json.Unmarshal(body, &u.SsoChangeSamlIdentityModeDetails)
+ if err != nil {
+ return err
+ }
+ case "sso_remove_cert_details":
+ err = json.Unmarshal(body, &u.SsoRemoveCertDetails)
+
if err != nil {
return err
}
@@ -4461,6 +4494,12 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
case "paper_change_deployment_policy_details":
err = json.Unmarshal(body, &u.PaperChangeDeploymentPolicyDetails)
+ if err != nil {
+ return err
+ }
+ case "paper_change_member_link_policy_details":
+ err = json.Unmarshal(body, &u.PaperChangeMemberLinkPolicyDetails)
+
if err != nil {
return err
}
@@ -4551,6 +4590,12 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
case "team_profile_add_logo_details":
err = json.Unmarshal(body, &u.TeamProfileAddLogoDetails)
+ if err != nil {
+ return err
+ }
+ case "team_profile_change_default_language_details":
+ err = json.Unmarshal(body, &u.TeamProfileChangeDefaultLanguageDetails)
+
if err != nil {
return err
}
@@ -4832,12 +4877,14 @@ const (
EventTypeShmodelVisibilityPassword = "shmodel_visibility_password"
EventTypeShmodelVisibilityPublic = "shmodel_visibility_public"
EventTypeShmodelVisibilityTeamOnly = "shmodel_visibility_team_only"
+ EventTypeSsoAddCert = "sso_add_cert"
EventTypeSsoAddLoginUrl = "sso_add_login_url"
EventTypeSsoAddLogoutUrl = "sso_add_logout_url"
EventTypeSsoChangeCert = "sso_change_cert"
EventTypeSsoChangeLoginUrl = "sso_change_login_url"
EventTypeSsoChangeLogoutUrl = "sso_change_logout_url"
EventTypeSsoChangeSamlIdentityMode = "sso_change_saml_identity_mode"
+ EventTypeSsoRemoveCert = "sso_remove_cert"
EventTypeSsoRemoveLoginUrl = "sso_remove_login_url"
EventTypeSsoRemoveLogoutUrl = "sso_remove_logout_url"
EventTypeTeamFolderChangeStatus = "team_folder_change_status"
@@ -4872,6 +4919,7 @@ const (
EventTypeMicrosoftOfficeAddinChangePolicy = "microsoft_office_addin_change_policy"
EventTypeNetworkControlChangePolicy = "network_control_change_policy"
EventTypePaperChangeDeploymentPolicy = "paper_change_deployment_policy"
+ EventTypePaperChangeMemberLinkPolicy = "paper_change_member_link_policy"
EventTypePaperChangeMemberPolicy = "paper_change_member_policy"
EventTypePaperChangePolicy = "paper_change_policy"
EventTypePermanentDeleteChangePolicy = "permanent_delete_change_policy"
@@ -4887,6 +4935,7 @@ const (
EventTypeWebSessionsChangeFixedLengthPolicy = "web_sessions_change_fixed_length_policy"
EventTypeWebSessionsChangeIdleLengthPolicy = "web_sessions_change_idle_length_policy"
EventTypeTeamProfileAddLogo = "team_profile_add_logo"
+ EventTypeTeamProfileChangeDefaultLanguage = "team_profile_change_default_language"
EventTypeTeamProfileChangeLogo = "team_profile_change_logo"
EventTypeTeamProfileChangeName = "team_profile_change_name"
EventTypeTeamProfileRemoveLogo = "team_profile_remove_logo"
@@ -5639,9 +5688,9 @@ func NewGroupChangeMemberRoleDetails(IsGroupOwner bool) *GroupChangeMemberRoleDe
// GroupCreateDetails : Created a group.
type GroupCreateDetails struct {
- // IsAdminManaged : Is admin managed group. Might be missing due to
+ // IsCompanyManaged : Is company managed group. Might be missing due to
// historical data gap.
- IsAdminManaged bool `json:"is_admin_managed,omitempty"`
+ IsCompanyManaged bool `json:"is_company_managed,omitempty"`
// JoinPolicy : Group join policy.
JoinPolicy *GroupJoinPolicy `json:"join_policy"`
}
@@ -5655,9 +5704,9 @@ func NewGroupCreateDetails(JoinPolicy *GroupJoinPolicy) *GroupCreateDetails {
// GroupDeleteDetails : Deleted a group.
type GroupDeleteDetails struct {
- // IsAdminManaged : Is admin managed group. Might be missing due to
+ // IsCompanyManaged : Is company managed group. Might be missing due to
// historical data gap.
- IsAdminManaged bool `json:"is_admin_managed,omitempty"`
+ IsCompanyManaged bool `json:"is_company_managed,omitempty"`
}
// NewGroupDeleteDetails returns a new GroupDeleteDetails instance
@@ -6412,6 +6461,20 @@ func NewPaperChangeDeploymentPolicyDetails(NewValue *team_policies.PaperDeployme
return s
}
+// PaperChangeMemberLinkPolicyDetails : Changed whether non team members can
+// view Paper documents using a link.
+type PaperChangeMemberLinkPolicyDetails struct {
+ // NewValue : New paper external link accessibility policy.
+ NewValue *PaperMemberPolicy `json:"new_value"`
+}
+
+// NewPaperChangeMemberLinkPolicyDetails returns a new PaperChangeMemberLinkPolicyDetails instance
+func NewPaperChangeMemberLinkPolicyDetails(NewValue *PaperMemberPolicy) *PaperChangeMemberLinkPolicyDetails {
+ s := new(PaperChangeMemberLinkPolicyDetails)
+ s.NewValue = NewValue
+ return s
+}
+
// PaperChangeMemberPolicyDetails : Changed whether team members can share Paper
// documents externally (i.e. outside the team), and if so, whether they should
// be accessible only by team members or anyone by default.
@@ -8543,6 +8606,19 @@ const (
SpaceLimitsStatusOther = "other"
)
+// SsoAddCertDetails : Added the X.509 certificate for SSO.
+type SsoAddCertDetails struct {
+ // CertificateDetails : SSO certificate details.
+ CertificateDetails *Certificate `json:"certificate_details"`
+}
+
+// NewSsoAddCertDetails returns a new SsoAddCertDetails instance
+func NewSsoAddCertDetails(CertificateDetails *Certificate) *SsoAddCertDetails {
+ s := new(SsoAddCertDetails)
+ s.CertificateDetails = CertificateDetails
+ return s
+}
+
// SsoAddLoginUrlDetails : Added sign-in URL for SSO.
type SsoAddLoginUrlDetails struct {
// NewValue : New single sign-on login URL.
@@ -8571,14 +8647,16 @@ func NewSsoAddLogoutUrlDetails() *SsoAddLogoutUrlDetails {
// SsoChangeCertDetails : Changed the X.509 certificate for SSO.
type SsoChangeCertDetails struct {
- // CertificateDetails : SSO certificate details.
- CertificateDetails *Certificate `json:"certificate_details"`
+ // PreviousCertificateDetails : Previous SSO certificate details.
+ PreviousCertificateDetails *Certificate `json:"previous_certificate_details,omitempty"`
+ // NewCertificateDetails : New SSO certificate details.
+ NewCertificateDetails *Certificate `json:"new_certificate_details"`
}
// NewSsoChangeCertDetails returns a new SsoChangeCertDetails instance
-func NewSsoChangeCertDetails(CertificateDetails *Certificate) *SsoChangeCertDetails {
+func NewSsoChangeCertDetails(NewCertificateDetails *Certificate) *SsoChangeCertDetails {
s := new(SsoChangeCertDetails)
- s.CertificateDetails = CertificateDetails
+ s.NewCertificateDetails = NewCertificateDetails
return s
}
@@ -8659,6 +8737,16 @@ func NewSsoLoginFailDetails(ErrorDetails *FailureDetailsLogInfo) *SsoLoginFailDe
return s
}
+// SsoRemoveCertDetails : Removed the X.509 certificate for SSO.
+type SsoRemoveCertDetails struct {
+}
+
+// NewSsoRemoveCertDetails returns a new SsoRemoveCertDetails instance
+func NewSsoRemoveCertDetails() *SsoRemoveCertDetails {
+ s := new(SsoRemoveCertDetails)
+ return s
+}
+
// SsoRemoveLoginUrlDetails : Removed the sign-in URL for SSO.
type SsoRemoveLoginUrlDetails struct {
// PreviousValue : Previous single sign-on login URL.
@@ -8917,6 +9005,23 @@ func NewTeamProfileAddLogoDetails() *TeamProfileAddLogoDetails {
return s
}
+// TeamProfileChangeDefaultLanguageDetails : Changed the default language for
+// the team.
+type TeamProfileChangeDefaultLanguageDetails struct {
+ // NewValue : New team's default language.
+ NewValue string `json:"new_value"`
+ // PreviousValue : Previous team's default language.
+ PreviousValue string `json:"previous_value"`
+}
+
+// NewTeamProfileChangeDefaultLanguageDetails returns a new TeamProfileChangeDefaultLanguageDetails instance
+func NewTeamProfileChangeDefaultLanguageDetails(NewValue string, PreviousValue string) *TeamProfileChangeDefaultLanguageDetails {
+ s := new(TeamProfileChangeDefaultLanguageDetails)
+ s.NewValue = NewValue
+ s.PreviousValue = PreviousValue
+ return s
+}
+
// TeamProfileChangeLogoDetails : Changed the team logo to be displayed on
// shared link headers.
type TeamProfileChangeLogoDetails struct {
@@ -8989,14 +9094,14 @@ func NewTfaChangeBackupPhoneDetails() *TfaChangeBackupPhoneDetails {
// TfaChangePolicyDetails : Change two-step verification policy for the team.
type TfaChangePolicyDetails struct {
// NewValue : New change policy.
- NewValue *TfaPolicy `json:"new_value"`
+ NewValue *team_policies.TwoStepVerificationPolicy `json:"new_value"`
// PreviousValue : Previous change policy. Might be missing due to
// historical data gap.
- PreviousValue *TfaPolicy `json:"previous_value,omitempty"`
+ PreviousValue *team_policies.TwoStepVerificationPolicy `json:"previous_value,omitempty"`
}
// NewTfaChangePolicyDetails returns a new TfaChangePolicyDetails instance
-func NewTfaChangePolicyDetails(NewValue *TfaPolicy) *TfaChangePolicyDetails {
+func NewTfaChangePolicyDetails(NewValue *team_policies.TwoStepVerificationPolicy) *TfaChangePolicyDetails {
s := new(TfaChangePolicyDetails)
s.NewValue = NewValue
return s
@@ -9037,18 +9142,6 @@ const (
TfaConfigurationOther = "other"
)
-// TfaPolicy : Two factor authentication policy
-type TfaPolicy struct {
- dropbox.Tagged
-}
-
-// Valid tag values for TfaPolicy
-const (
- TfaPolicyAllowDisable = "allow_disable"
- TfaPolicyStickyEnable = "sticky_enable"
- TfaPolicyOther = "other"
-)
-
// TfaRemoveBackupPhoneDetails : Removed the backup phone for two-step
// verification.
type TfaRemoveBackupPhoneDetails struct {
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies/types.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies/types.go
index 718a8664a..58a9f1a35 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies/types.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies/types.go
@@ -195,3 +195,15 @@ func NewTeamSharingPolicies(SharedFolderMemberPolicy *SharedFolderMemberPolicy,
s.SharedLinkCreatePolicy = SharedLinkCreatePolicy
return s
}
+
+// TwoStepVerificationPolicy : has no documentation (yet)
+type TwoStepVerificationPolicy struct {
+ dropbox.Tagged
+}
+
+// Valid tag values for TwoStepVerificationPolicy
+const (
+ TwoStepVerificationPolicyRequireTfaEnable = "require_tfa_enable"
+ TwoStepVerificationPolicyRequireTfaDisable = "require_tfa_disable"
+ TwoStepVerificationPolicyOther = "other"
+)
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users/client.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users/client.go
index 5348f38cb..bf65fbfc9 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users/client.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users/client.go
@@ -54,7 +54,7 @@ type GetAccountAPIError struct {
func (dbx *apiImpl) GetAccount(arg *GetAccountArg) (res *BasicAccount, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -71,21 +71,21 @@ func (dbx *apiImpl) GetAccount(arg *GetAccountArg) (res *BasicAccount, err error
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -126,7 +126,7 @@ type GetAccountBatchAPIError struct {
func (dbx *apiImpl) GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccount, err error) {
cli := dbx.Client
- dbx.Config.TryLog("arg: %v", arg)
+ dbx.Config.LogDebug("arg: %v", arg)
b, err := json.Marshal(arg)
if err != nil {
return
@@ -143,21 +143,21 @@ func (dbx *apiImpl) GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccoun
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -207,21 +207,21 @@ func (dbx *apiImpl) GetCurrentAccount() (res *FullAccount, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
@@ -271,21 +271,21 @@ func (dbx *apiImpl) GetSpaceUsage() (res *SpaceUsage, err error) {
if err != nil {
return
}
- dbx.Config.TryLog("req: %v", req)
+ dbx.Config.LogInfo("req: %v", req)
resp, err := cli.Do(req)
if err != nil {
return
}
- dbx.Config.TryLog("resp: %v", resp)
+ dbx.Config.LogInfo("resp: %v", resp)
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
- dbx.Config.TryLog("body: %v", body)
+ dbx.Config.LogDebug("body: %v", body)
if resp.StatusCode == http.StatusOK {
err = json.Unmarshal(body, &res)
if err != nil {
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/generate-sdk.sh b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/generate-sdk.sh
index 108c18cd6..4bbf8850b 100755
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/generate-sdk.sh
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/generate-sdk.sh
@@ -15,7 +15,7 @@ stone -v -a :all go_types.stoneg.py "$gen_dir" "$spec_dir"/*.stone
stone -v -a :all go_client.stoneg.py "$gen_dir" "$spec_dir"/*.stone
# Update SDK and API spec versions
-sdk_version=${1:-"1.0.0-beta"}
+sdk_version=${1:-"3.0.0"}
pushd ${spec_dir}
spec_version=$(git rev-parse --short HEAD)
popd
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_client.stoneg.py b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_client.stoneg.py
index eb89d81e3..c0cd5ca0f 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_client.stoneg.py
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_client.stoneg.py
@@ -107,7 +107,7 @@ class GoClientBackend(CodeBackend):
body = 'nil'
if not is_void_type(route.arg_data_type):
- out('dbx.Config.TryLog("arg: %v", arg)')
+ out('dbx.Config.LogDebug("arg: %v", arg)')
out('b, err := json.Marshal(arg)')
with self.block('if err != nil'):
@@ -144,7 +144,7 @@ class GoClientBackend(CodeBackend):
with self.block('if err != nil'):
out('return')
- out('dbx.Config.TryLog("req: %v", req)')
+ out('dbx.Config.LogInfo("req: %v", req)')
out()
@@ -157,7 +157,7 @@ class GoClientBackend(CodeBackend):
out('return')
out()
- out('dbx.Config.TryLog("resp: %v", resp)')
+ out('dbx.Config.LogInfo("resp: %v", resp)')
def _generate_response(self, route):
out = self.emit
@@ -172,11 +172,19 @@ class GoClientBackend(CodeBackend):
out('return')
out()
- out('dbx.Config.TryLog("body: %v", body)')
+ out('dbx.Config.LogDebug("body: %v", body)')
def _generate_error_handling(self, route):
out = self.emit
+ style = route.attrs.get('style', 'rpc')
with self.block('if resp.StatusCode == http.StatusConflict'):
+ # If style was download, body was assigned to a header.
+ # Need to re-read the response body to parse the error
+ if style == 'download':
+ out('defer resp.Body.Close()')
+ with self.block('body, err = ioutil.ReadAll(resp.Body);'
+ 'if err != nil'):
+ out('return')
out('var apiError %sAPIError' % fmt_var(route.name))
with self.block('err = json.Unmarshal(body, &apiError);'
'if err != nil'):
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_rsrc/sdk.go b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_rsrc/sdk.go
index 4a37ba82f..7fc82df8e 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_rsrc/sdk.go
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_rsrc/sdk.go
@@ -48,8 +48,8 @@ func Version() (string, string) {
type Config struct {
// OAuth2 access token
Token string
- // Enable verbose logging in SDK
- Verbose bool
+ // Logging level for SDK generated logs
+ LogLevel LogLevel
// Logging target for verbose SDK logging
Logger *log.Logger
// Used with APIs that support operations as another user
@@ -64,12 +64,28 @@ type Config struct {
URLGenerator func(hostType string, style string, namespace string, route string) string
}
-// TryLog will, if Verbose is set, log to the config's logger
-// or the default log (stderr) if Config.Logger is nil.
-func (c *Config) TryLog(format string, v ...interface{}) {
- if !c.Verbose {
+// LogLevel defines a type that can set the desired level of logging the SDK will generate.
+type LogLevel uint
+
+const (
+ // LogOff will disable all SDK logging. This is the default log level
+ LogOff LogLevel = iota * (1 << 8)
+ // LogDebug will enable detailed SDK debug logs. It will log requests (including arguments),
+ // response and body contents.
+ LogDebug
+ // LogInfo will log SDK request (not including arguments) and responses.
+ LogInfo
+)
+
+func (l LogLevel) ShouldLog(v LogLevel) bool {
+ return l > v || l & v == v
+}
+
+func (c *Config) doLog(l LogLevel, format string, v ...interface{}) {
+ if !c.LogLevel.ShouldLog(l) {
return
}
+
if c.Logger != nil {
c.Logger.Printf(format, v...)
} else {
@@ -77,6 +93,16 @@ func (c *Config) TryLog(format string, v ...interface{}) {
}
}
+// LogDebug emits a debug level SDK log if config's log level is at least LogDebug
+func (c *Config) LogDebug(format string, v ...interface{}) {
+ c.doLog(LogDebug, format, v...)
+}
+
+// LogInfo emits an info level SDK log if config's log level is at least LogInfo
+func (c *Config) LogInfo(format string, v ...interface{}) {
+ c.doLog(LogInfo, format, v...)
+}
+
// Context is the base client context used to implement per-namespace clients.
type Context struct {
Config Config
diff --git a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_types.stoneg.py b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_types.stoneg.py
index 343a97060..3260e55af 100644
--- a/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_types.stoneg.py
+++ b/vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_types.stoneg.py
@@ -137,7 +137,9 @@ class GoTypesBackend(CodeBackend):
def _generate_union_helper(self, u):
name = u.name
namespace = u.namespace
- fields = u.fields
+ # Unions can be inherited, but don't need to be polymorphic.
+ # So let's flatten out all the inherited fields.
+ fields = u.all_fields
if is_struct_type(u) and u.has_enumerated_subtypes():
name = fmt_var(name, export=False) + 'Union'
fields = u.get_enumerated_subtypes()