forked from TrueCloudLab/rclone
vendor: update github.com/dropbox/dropbox-sdk-go-unofficial to fix #1804
This commit is contained in:
parent
e491093cd1
commit
fc352c1ff6
25 changed files with 1859 additions and 902 deletions
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
@ -83,7 +83,7 @@
|
||||||
branch = "master"
|
branch = "master"
|
||||||
name = "github.com/dropbox/dropbox-sdk-go-unofficial"
|
name = "github.com/dropbox/dropbox-sdk-go-unofficial"
|
||||||
packages = ["dropbox","dropbox/async","dropbox/file_properties","dropbox/files"]
|
packages = ["dropbox","dropbox/async","dropbox/file_properties","dropbox/files"]
|
||||||
revision = "98997935f6b3ff4f4fa46275abaa23b02537178d"
|
revision = "9a536e3b58ed271dc9d1f21681db990ca601a551"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/go-ini/ini"
|
name = "github.com/go-ini/ini"
|
||||||
|
|
5
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/README.md
generated
vendored
5
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/README.md
generated
vendored
|
@ -43,7 +43,10 @@ import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
|
||||||
import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users"
|
import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users"
|
||||||
|
|
||||||
func main() {
|
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)
|
dbx := users.New(config)
|
||||||
// start making API calls
|
// start making API calls
|
||||||
}
|
}
|
||||||
|
|
32
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async/types.go
generated
vendored
32
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async/types.go
generated
vendored
|
@ -72,13 +72,40 @@ func (u *LaunchResultBase) UnmarshalJSON(body []byte) error {
|
||||||
// the job, no additional information is returned.
|
// the job, no additional information is returned.
|
||||||
type LaunchEmptyResult struct {
|
type LaunchEmptyResult struct {
|
||||||
dropbox.Tagged
|
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
|
// Valid tag values for LaunchEmptyResult
|
||||||
const (
|
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.
|
// PollArg : Arguments for methods that poll the status of an asynchronous job.
|
||||||
type PollArg struct {
|
type PollArg struct {
|
||||||
// AsyncJobId : Id of the asynchronous job. This is the value of a response
|
// 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
|
// Valid tag values for PollEmptyResult
|
||||||
const (
|
const (
|
||||||
PollEmptyResultComplete = "complete"
|
PollEmptyResultInProgress = "in_progress"
|
||||||
|
PollEmptyResultComplete = "complete"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PollError : Error returned by methods for polling the status of asynchronous
|
// PollError : Error returned by methods for polling the status of asynchronous
|
||||||
|
|
14
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth/client.go
generated
vendored
14
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth/client.go
generated
vendored
|
@ -49,7 +49,7 @@ type TokenFromOauth1APIError struct {
|
||||||
func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error) {
|
func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -66,21 +66,21 @@ func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAut
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -130,21 +130,21 @@ func (dbx *apiImpl) TokenRevoke() (err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
120
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/client.go
generated
vendored
120
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/client.go
generated
vendored
|
@ -42,8 +42,8 @@ type Client interface {
|
||||||
// explicitly marked for deletion.
|
// explicitly marked for deletion.
|
||||||
PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error)
|
PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error)
|
||||||
// PropertiesRemove : Remove the specified property group from the file. To
|
// PropertiesRemove : Remove the specified property group from the file. To
|
||||||
// remove specific property field key value pairs, see route
|
// remove specific property field key value pairs, see `propertiesUpdate`.
|
||||||
// `propertiesUpdate`. To update a template, see `templatesUpdateForUser` or
|
// To update a template, see `templatesUpdateForUser` or
|
||||||
// `templatesUpdateForTeam`. Templates can't be removed once created.
|
// `templatesUpdateForTeam`. Templates can't be removed once created.
|
||||||
PropertiesRemove(arg *RemovePropertiesArg) (err error)
|
PropertiesRemove(arg *RemovePropertiesArg) (err error)
|
||||||
// PropertiesSearch : Search across property templates for particular
|
// PropertiesSearch : Search across property templates for particular
|
||||||
|
@ -57,21 +57,24 @@ type Client interface {
|
||||||
// `propertiesOverwrite` will delete any fields that are omitted from a
|
// `propertiesOverwrite` will delete any fields that are omitted from a
|
||||||
// property group.
|
// property group.
|
||||||
PropertiesUpdate(arg *UpdatePropertiesArg) (err error)
|
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.
|
// `propertiesAdd` to add properties to a file or folder.
|
||||||
TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error)
|
TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error)
|
||||||
// TemplatesAddForUser : Add a template associated with a user. See route
|
// TemplatesAddForUser : Add a template associated with a user. See
|
||||||
// `propertiesAdd` to add properties to a file.
|
// `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)
|
TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error)
|
||||||
// TemplatesGetForTeam : Get the schema for a specified template.
|
// TemplatesGetForTeam : Get the schema for a specified template.
|
||||||
TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error)
|
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)
|
TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error)
|
||||||
// TemplatesListForTeam : Get the template identifiers for a team. To get
|
// TemplatesListForTeam : Get the template identifiers for a team. To get
|
||||||
// the schema of each template use `templatesGetForTeam`.
|
// the schema of each template use `templatesGetForTeam`.
|
||||||
TemplatesListForTeam() (res *ListTemplateResult, err error)
|
TemplatesListForTeam() (res *ListTemplateResult, err error)
|
||||||
// TemplatesListForUser : Get the template identifiers for a team. To get
|
// 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)
|
TemplatesListForUser() (res *ListTemplateResult, err error)
|
||||||
// TemplatesUpdateForTeam : Update a template associated with a team. This
|
// TemplatesUpdateForTeam : Update a template associated with a team. This
|
||||||
// route can update the template name, the template description and add
|
// 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)
|
TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
|
||||||
// TemplatesUpdateForUser : Update a template associated with a user. This
|
// TemplatesUpdateForUser : Update a template associated with a user. This
|
||||||
// route can update the template name, the template description and add
|
// 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)
|
TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +98,7 @@ type PropertiesAddAPIError struct {
|
||||||
func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) {
|
func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -111,21 +115,21 @@ func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -161,7 +165,7 @@ type PropertiesOverwriteAPIError struct {
|
||||||
func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error) {
|
func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -178,21 +182,21 @@ func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err err
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -228,7 +232,7 @@ type PropertiesRemoveAPIError struct {
|
||||||
func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err error) {
|
func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -245,21 +249,21 @@ func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -295,7 +299,7 @@ type PropertiesSearchAPIError struct {
|
||||||
func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error) {
|
func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -312,21 +316,21 @@ func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesS
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -367,7 +371,7 @@ type PropertiesUpdateAPIError struct {
|
||||||
func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err error) {
|
func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -384,21 +388,21 @@ func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -434,7 +438,7 @@ type TemplatesAddForTeamAPIError struct {
|
||||||
func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
|
func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -448,21 +452,21 @@ func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateRe
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -503,7 +507,7 @@ type TemplatesAddForUserAPIError struct {
|
||||||
func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
|
func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -520,21 +524,21 @@ func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateRe
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -575,7 +579,7 @@ type TemplatesGetForTeamAPIError struct {
|
||||||
func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
|
func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -589,21 +593,21 @@ func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateRe
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -644,7 +648,7 @@ type TemplatesGetForUserAPIError struct {
|
||||||
func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
|
func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -661,21 +665,21 @@ func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateRe
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -722,21 +726,21 @@ func (dbx *apiImpl) TemplatesListForTeam() (res *ListTemplateResult, err error)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -786,21 +790,21 @@ func (dbx *apiImpl) TemplatesListForUser() (res *ListTemplateResult, err error)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -841,7 +845,7 @@ type TemplatesUpdateForTeamAPIError struct {
|
||||||
func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
|
func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -855,21 +859,21 @@ func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateT
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -910,7 +914,7 @@ type TemplatesUpdateForUserAPIError struct {
|
||||||
func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
|
func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -927,21 +931,21 @@ func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateT
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
168
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/types.go
generated
vendored
168
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties/types.go
generated
vendored
|
@ -95,12 +95,17 @@ func (u *TemplateError) UnmarshalJSON(body []byte) error {
|
||||||
// PropertiesError : has no documentation (yet)
|
// PropertiesError : has no documentation (yet)
|
||||||
type PropertiesError struct {
|
type PropertiesError struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
// TemplateNotFound : Template does not exist for the given identifier.
|
||||||
|
TemplateNotFound string `json:"template_not_found,omitempty"`
|
||||||
// Path : has no documentation (yet)
|
// Path : has no documentation (yet)
|
||||||
Path *LookupError `json:"path,omitempty"`
|
Path *LookupError `json:"path,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for PropertiesError
|
// Valid tag values for PropertiesError
|
||||||
const (
|
const (
|
||||||
|
PropertiesErrorTemplateNotFound = "template_not_found"
|
||||||
|
PropertiesErrorRestrictedContent = "restricted_content"
|
||||||
|
PropertiesErrorOther = "other"
|
||||||
PropertiesErrorPath = "path"
|
PropertiesErrorPath = "path"
|
||||||
PropertiesErrorUnsupportedFolder = "unsupported_folder"
|
PropertiesErrorUnsupportedFolder = "unsupported_folder"
|
||||||
)
|
)
|
||||||
|
@ -119,6 +124,12 @@ func (u *PropertiesError) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
|
case "template_not_found":
|
||||||
|
err = json.Unmarshal(body, &u.TemplateNotFound)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
case "path":
|
case "path":
|
||||||
err = json.Unmarshal(w.Path, &u.Path)
|
err = json.Unmarshal(w.Path, &u.Path)
|
||||||
|
|
||||||
|
@ -132,24 +143,104 @@ func (u *PropertiesError) UnmarshalJSON(body []byte) error {
|
||||||
// InvalidPropertyGroupError : has no documentation (yet)
|
// InvalidPropertyGroupError : has no documentation (yet)
|
||||||
type InvalidPropertyGroupError struct {
|
type InvalidPropertyGroupError struct {
|
||||||
dropbox.Tagged
|
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
|
// Valid tag values for InvalidPropertyGroupError
|
||||||
const (
|
const (
|
||||||
|
InvalidPropertyGroupErrorTemplateNotFound = "template_not_found"
|
||||||
|
InvalidPropertyGroupErrorRestrictedContent = "restricted_content"
|
||||||
|
InvalidPropertyGroupErrorOther = "other"
|
||||||
|
InvalidPropertyGroupErrorPath = "path"
|
||||||
|
InvalidPropertyGroupErrorUnsupportedFolder = "unsupported_folder"
|
||||||
InvalidPropertyGroupErrorPropertyFieldTooLarge = "property_field_too_large"
|
InvalidPropertyGroupErrorPropertyFieldTooLarge = "property_field_too_large"
|
||||||
InvalidPropertyGroupErrorDoesNotFitTemplate = "does_not_fit_template"
|
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)
|
// AddPropertiesError : has no documentation (yet)
|
||||||
type AddPropertiesError struct {
|
type AddPropertiesError struct {
|
||||||
dropbox.Tagged
|
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
|
// Valid tag values for AddPropertiesError
|
||||||
const (
|
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"
|
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.
|
// PropertyGroupTemplate : Defines how a property group may be structured.
|
||||||
type PropertyGroupTemplate struct {
|
type PropertyGroupTemplate struct {
|
||||||
// Name : Display name for the template. Template names can be up to 256
|
// 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)
|
// ModifyTemplateError : has no documentation (yet)
|
||||||
type ModifyTemplateError struct {
|
type ModifyTemplateError struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
// TemplateNotFound : Template does not exist for the given identifier.
|
||||||
|
TemplateNotFound string `json:"template_not_found,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for ModifyTemplateError
|
// Valid tag values for ModifyTemplateError
|
||||||
const (
|
const (
|
||||||
|
ModifyTemplateErrorTemplateNotFound = "template_not_found"
|
||||||
|
ModifyTemplateErrorRestrictedContent = "restricted_content"
|
||||||
|
ModifyTemplateErrorOther = "other"
|
||||||
ModifyTemplateErrorConflictingPropertyNames = "conflicting_property_names"
|
ModifyTemplateErrorConflictingPropertyNames = "conflicting_property_names"
|
||||||
ModifyTemplateErrorTooManyProperties = "too_many_properties"
|
ModifyTemplateErrorTooManyProperties = "too_many_properties"
|
||||||
ModifyTemplateErrorTooManyTemplates = "too_many_templates"
|
ModifyTemplateErrorTooManyTemplates = "too_many_templates"
|
||||||
ModifyTemplateErrorTemplateAttributeTooLarge = "template_attribute_too_large"
|
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)
|
// OverwritePropertyGroupArg : has no documentation (yet)
|
||||||
type OverwritePropertyGroupArg struct {
|
type OverwritePropertyGroupArg struct {
|
||||||
// Path : A unique identifier for the file or folder.
|
// 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)
|
// RemovePropertiesError : has no documentation (yet)
|
||||||
type RemovePropertiesError struct {
|
type RemovePropertiesError struct {
|
||||||
dropbox.Tagged
|
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 : has no documentation (yet)
|
||||||
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
|
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for RemovePropertiesError
|
// Valid tag values for RemovePropertiesError
|
||||||
const (
|
const (
|
||||||
|
RemovePropertiesErrorTemplateNotFound = "template_not_found"
|
||||||
|
RemovePropertiesErrorRestrictedContent = "restricted_content"
|
||||||
|
RemovePropertiesErrorOther = "other"
|
||||||
|
RemovePropertiesErrorPath = "path"
|
||||||
|
RemovePropertiesErrorUnsupportedFolder = "unsupported_folder"
|
||||||
RemovePropertiesErrorPropertyGroupLookup = "property_group_lookup"
|
RemovePropertiesErrorPropertyGroupLookup = "property_group_lookup"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -597,6 +724,8 @@ const (
|
||||||
func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error {
|
func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error {
|
||||||
type wrap struct {
|
type wrap struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
// Path : has no documentation (yet)
|
||||||
|
Path json.RawMessage `json:"path,omitempty"`
|
||||||
// PropertyGroupLookup : has no documentation (yet)
|
// PropertyGroupLookup : has no documentation (yet)
|
||||||
PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"`
|
PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -607,6 +736,18 @@ func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.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":
|
case "property_group_lookup":
|
||||||
err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup)
|
err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup)
|
||||||
|
|
||||||
|
@ -688,19 +829,32 @@ func NewUpdatePropertiesArg(Path string, UpdatePropertyGroups []*PropertyGroupUp
|
||||||
// UpdatePropertiesError : has no documentation (yet)
|
// UpdatePropertiesError : has no documentation (yet)
|
||||||
type UpdatePropertiesError struct {
|
type UpdatePropertiesError struct {
|
||||||
dropbox.Tagged
|
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 : has no documentation (yet)
|
||||||
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
|
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for UpdatePropertiesError
|
// Valid tag values for UpdatePropertiesError
|
||||||
const (
|
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
|
// UnmarshalJSON deserializes into a UpdatePropertiesError instance
|
||||||
func (u *UpdatePropertiesError) UnmarshalJSON(body []byte) error {
|
func (u *UpdatePropertiesError) UnmarshalJSON(body []byte) error {
|
||||||
type wrap struct {
|
type wrap struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
// Path : has no documentation (yet)
|
||||||
|
Path json.RawMessage `json:"path,omitempty"`
|
||||||
// PropertyGroupLookup : has no documentation (yet)
|
// PropertyGroupLookup : has no documentation (yet)
|
||||||
PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"`
|
PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -711,6 +865,18 @@ func (u *UpdatePropertiesError) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.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":
|
case "property_group_lookup":
|
||||||
err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup)
|
err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup)
|
||||||
|
|
||||||
|
|
30
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/client.go
generated
vendored
30
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/client.go
generated
vendored
|
@ -54,7 +54,7 @@ type CreateAPIError struct {
|
||||||
func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileRequest, err error) {
|
func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileRequest, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -71,21 +71,21 @@ func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileRequest, err er
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -126,7 +126,7 @@ type GetAPIError struct {
|
||||||
func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, err error) {
|
func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -143,21 +143,21 @@ func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -207,21 +207,21 @@ func (dbx *apiImpl) List() (res *ListFileRequestsResult, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -262,7 +262,7 @@ type UpdateAPIError struct {
|
||||||
func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error) {
|
func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -279,21 +279,21 @@ func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err er
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
40
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/types.go
generated
vendored
40
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_requests/types.go
generated
vendored
|
@ -19,8 +19,7 @@
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
// Package file_requests : This namespace contains endpoints and data types for
|
// Package file_requests : This namespace contains endpoints and data types for
|
||||||
// file request operations. Warning: This namespace is in beta and is subject to
|
// file request operations.
|
||||||
// backwards-incompatible changes.
|
|
||||||
package file_requests
|
package file_requests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -75,6 +74,8 @@ type FileRequestError struct {
|
||||||
|
|
||||||
// Valid tag values for FileRequestError
|
// Valid tag values for FileRequestError
|
||||||
const (
|
const (
|
||||||
|
FileRequestErrorDisabledForTeam = "disabled_for_team"
|
||||||
|
FileRequestErrorOther = "other"
|
||||||
FileRequestErrorNotFound = "not_found"
|
FileRequestErrorNotFound = "not_found"
|
||||||
FileRequestErrorNotAFolder = "not_a_folder"
|
FileRequestErrorNotAFolder = "not_a_folder"
|
||||||
FileRequestErrorAppLacksAccess = "app_lacks_access"
|
FileRequestErrorAppLacksAccess = "app_lacks_access"
|
||||||
|
@ -90,6 +91,14 @@ type CreateFileRequestError struct {
|
||||||
|
|
||||||
// Valid tag values for CreateFileRequestError
|
// Valid tag values for CreateFileRequestError
|
||||||
const (
|
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"
|
CreateFileRequestErrorInvalidLocation = "invalid_location"
|
||||||
CreateFileRequestErrorRateLimit = "rate_limit"
|
CreateFileRequestErrorRateLimit = "rate_limit"
|
||||||
)
|
)
|
||||||
|
@ -167,7 +176,16 @@ type GetFileRequestError struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for GetFileRequestError
|
// 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)
|
// GracePeriod : has no documentation (yet)
|
||||||
type GracePeriod struct {
|
type GracePeriod struct {
|
||||||
|
@ -190,7 +208,10 @@ type ListFileRequestsError struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for ListFileRequestsError
|
// Valid tag values for ListFileRequestsError
|
||||||
const ()
|
const (
|
||||||
|
ListFileRequestsErrorDisabledForTeam = "disabled_for_team"
|
||||||
|
ListFileRequestsErrorOther = "other"
|
||||||
|
)
|
||||||
|
|
||||||
// ListFileRequestsResult : Result for `list`.
|
// ListFileRequestsResult : Result for `list`.
|
||||||
type ListFileRequestsResult struct {
|
type ListFileRequestsResult struct {
|
||||||
|
@ -274,4 +295,13 @@ type UpdateFileRequestError struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for UpdateFileRequestError
|
// 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"
|
||||||
|
)
|
||||||
|
|
399
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/client.go
generated
vendored
399
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/client.go
generated
vendored
File diff suppressed because it is too large
Load diff
198
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/types.go
generated
vendored
198
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files/types.go
generated
vendored
|
@ -113,12 +113,15 @@ func (u *GetMetadataError) UnmarshalJSON(body []byte) error {
|
||||||
// AlphaGetMetadataError : has no documentation (yet)
|
// AlphaGetMetadataError : has no documentation (yet)
|
||||||
type AlphaGetMetadataError struct {
|
type AlphaGetMetadataError struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
// Path : has no documentation (yet)
|
||||||
|
Path *LookupError `json:"path,omitempty"`
|
||||||
// PropertiesError : has no documentation (yet)
|
// PropertiesError : has no documentation (yet)
|
||||||
PropertiesError *file_properties.LookUpPropertiesError `json:"properties_error,omitempty"`
|
PropertiesError *file_properties.LookUpPropertiesError `json:"properties_error,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for AlphaGetMetadataError
|
// Valid tag values for AlphaGetMetadataError
|
||||||
const (
|
const (
|
||||||
|
AlphaGetMetadataErrorPath = "path"
|
||||||
AlphaGetMetadataErrorPropertiesError = "properties_error"
|
AlphaGetMetadataErrorPropertiesError = "properties_error"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -126,6 +129,8 @@ const (
|
||||||
func (u *AlphaGetMetadataError) UnmarshalJSON(body []byte) error {
|
func (u *AlphaGetMetadataError) UnmarshalJSON(body []byte) error {
|
||||||
type wrap struct {
|
type wrap struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
// Path : has no documentation (yet)
|
||||||
|
Path json.RawMessage `json:"path,omitempty"`
|
||||||
// PropertiesError : has no documentation (yet)
|
// PropertiesError : has no documentation (yet)
|
||||||
PropertiesError json.RawMessage `json:"properties_error,omitempty"`
|
PropertiesError json.RawMessage `json:"properties_error,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -136,6 +141,12 @@ func (u *AlphaGetMetadataError) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
|
case "path":
|
||||||
|
err = json.Unmarshal(w.Path, &u.Path)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
case "properties_error":
|
case "properties_error":
|
||||||
err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
|
err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
|
||||||
|
|
||||||
|
@ -320,9 +331,10 @@ type DeleteBatchJobStatus struct {
|
||||||
|
|
||||||
// Valid tag values for DeleteBatchJobStatus
|
// Valid tag values for DeleteBatchJobStatus
|
||||||
const (
|
const (
|
||||||
DeleteBatchJobStatusComplete = "complete"
|
DeleteBatchJobStatusInProgress = "in_progress"
|
||||||
DeleteBatchJobStatusFailed = "failed"
|
DeleteBatchJobStatusComplete = "complete"
|
||||||
DeleteBatchJobStatusOther = "other"
|
DeleteBatchJobStatusFailed = "failed"
|
||||||
|
DeleteBatchJobStatusOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a DeleteBatchJobStatus instance
|
// UnmarshalJSON deserializes into a DeleteBatchJobStatus instance
|
||||||
|
@ -361,14 +373,19 @@ func (u *DeleteBatchJobStatus) UnmarshalJSON(body []byte) error {
|
||||||
// an asynchronous job or complete synchronously.
|
// an asynchronous job or complete synchronously.
|
||||||
type DeleteBatchLaunch struct {
|
type DeleteBatchLaunch struct {
|
||||||
dropbox.Tagged
|
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 : has no documentation (yet)
|
||||||
Complete *DeleteBatchResult `json:"complete,omitempty"`
|
Complete *DeleteBatchResult `json:"complete,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for DeleteBatchLaunch
|
// Valid tag values for DeleteBatchLaunch
|
||||||
const (
|
const (
|
||||||
DeleteBatchLaunchComplete = "complete"
|
DeleteBatchLaunchAsyncJobId = "async_job_id"
|
||||||
DeleteBatchLaunchOther = "other"
|
DeleteBatchLaunchComplete = "complete"
|
||||||
|
DeleteBatchLaunchOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a DeleteBatchLaunch instance
|
// UnmarshalJSON deserializes into a DeleteBatchLaunch instance
|
||||||
|
@ -385,6 +402,12 @@ func (u *DeleteBatchLaunch) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
|
case "async_job_id":
|
||||||
|
err = json.Unmarshal(body, &u.AsyncJobId)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
case "complete":
|
case "complete":
|
||||||
err = json.Unmarshal(body, &u.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
|
// is an approximate number and there can be slightly more entries returned
|
||||||
// in some cases.
|
// in some cases.
|
||||||
Limit uint32 `json:"limit,omitempty"`
|
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
|
// NewListFolderArg returns a new ListFolderArg instance
|
||||||
|
@ -1335,6 +1363,9 @@ func NewListFolderResult(Entries []IsMetadata, Cursor string, HasMore bool) *Lis
|
||||||
type ListRevisionsArg struct {
|
type ListRevisionsArg struct {
|
||||||
// Path : The path to the file you want to see the revisions of.
|
// Path : The path to the file you want to see the revisions of.
|
||||||
Path string `json:"path"`
|
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 : The maximum number of revision entries returned.
|
||||||
Limit uint64 `json:"limit"`
|
Limit uint64 `json:"limit"`
|
||||||
}
|
}
|
||||||
|
@ -1343,6 +1374,7 @@ type ListRevisionsArg struct {
|
||||||
func NewListRevisionsArg(Path string) *ListRevisionsArg {
|
func NewListRevisionsArg(Path string) *ListRevisionsArg {
|
||||||
s := new(ListRevisionsArg)
|
s := new(ListRevisionsArg)
|
||||||
s.Path = Path
|
s.Path = Path
|
||||||
|
s.Mode = &ListRevisionsMode{Tagged: dropbox.Tagged{"path"}}
|
||||||
s.Limit = 10
|
s.Limit = 10
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
@ -1384,9 +1416,22 @@ func (u *ListRevisionsError) UnmarshalJSON(body []byte) error {
|
||||||
return nil
|
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)
|
// ListRevisionsResult : has no documentation (yet)
|
||||||
type ListRevisionsResult struct {
|
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"`
|
IsDeleted bool `json:"is_deleted"`
|
||||||
// ServerDeleted : The time of deletion if the file was deleted.
|
// ServerDeleted : The time of deletion if the file was deleted.
|
||||||
ServerDeleted time.Time `json:"server_deleted,omitempty"`
|
ServerDeleted time.Time `json:"server_deleted,omitempty"`
|
||||||
|
@ -1773,13 +1818,69 @@ func (u *RelocationError) UnmarshalJSON(body []byte) error {
|
||||||
// RelocationBatchError : has no documentation (yet)
|
// RelocationBatchError : has no documentation (yet)
|
||||||
type RelocationBatchError struct {
|
type RelocationBatchError struct {
|
||||||
dropbox.Tagged
|
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
|
// Valid tag values for RelocationBatchError
|
||||||
const (
|
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)
|
// RelocationBatchJobStatus : has no documentation (yet)
|
||||||
type RelocationBatchJobStatus struct {
|
type RelocationBatchJobStatus struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
@ -1791,8 +1892,9 @@ type RelocationBatchJobStatus struct {
|
||||||
|
|
||||||
// Valid tag values for RelocationBatchJobStatus
|
// Valid tag values for RelocationBatchJobStatus
|
||||||
const (
|
const (
|
||||||
RelocationBatchJobStatusComplete = "complete"
|
RelocationBatchJobStatusInProgress = "in_progress"
|
||||||
RelocationBatchJobStatusFailed = "failed"
|
RelocationBatchJobStatusComplete = "complete"
|
||||||
|
RelocationBatchJobStatusFailed = "failed"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a RelocationBatchJobStatus instance
|
// 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.
|
// may either launch an asynchronous job or complete synchronously.
|
||||||
type RelocationBatchLaunch struct {
|
type RelocationBatchLaunch struct {
|
||||||
dropbox.Tagged
|
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 : has no documentation (yet)
|
||||||
Complete *RelocationBatchResult `json:"complete,omitempty"`
|
Complete *RelocationBatchResult `json:"complete,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for RelocationBatchLaunch
|
// Valid tag values for RelocationBatchLaunch
|
||||||
const (
|
const (
|
||||||
RelocationBatchLaunchComplete = "complete"
|
RelocationBatchLaunchAsyncJobId = "async_job_id"
|
||||||
RelocationBatchLaunchOther = "other"
|
RelocationBatchLaunchComplete = "complete"
|
||||||
|
RelocationBatchLaunchOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a RelocationBatchLaunch instance
|
// UnmarshalJSON deserializes into a RelocationBatchLaunch instance
|
||||||
|
@ -1855,6 +1962,12 @@ func (u *RelocationBatchLaunch) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
|
case "async_job_id":
|
||||||
|
err = json.Unmarshal(body, &u.AsyncJobId)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
case "complete":
|
case "complete":
|
||||||
err = json.Unmarshal(body, &u.Complete)
|
err = json.Unmarshal(body, &u.Complete)
|
||||||
|
|
||||||
|
@ -2110,8 +2223,9 @@ type SaveUrlJobStatus struct {
|
||||||
|
|
||||||
// Valid tag values for SaveUrlJobStatus
|
// Valid tag values for SaveUrlJobStatus
|
||||||
const (
|
const (
|
||||||
SaveUrlJobStatusComplete = "complete"
|
SaveUrlJobStatusInProgress = "in_progress"
|
||||||
SaveUrlJobStatusFailed = "failed"
|
SaveUrlJobStatusComplete = "complete"
|
||||||
|
SaveUrlJobStatusFailed = "failed"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a SaveUrlJobStatus instance
|
// UnmarshalJSON deserializes into a SaveUrlJobStatus instance
|
||||||
|
@ -2149,13 +2263,18 @@ func (u *SaveUrlJobStatus) UnmarshalJSON(body []byte) error {
|
||||||
// SaveUrlResult : has no documentation (yet)
|
// SaveUrlResult : has no documentation (yet)
|
||||||
type SaveUrlResult struct {
|
type SaveUrlResult struct {
|
||||||
dropbox.Tagged
|
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 : Metadata of the file where the URL is saved to.
|
||||||
Complete *FileMetadata `json:"complete,omitempty"`
|
Complete *FileMetadata `json:"complete,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for SaveUrlResult
|
// Valid tag values for SaveUrlResult
|
||||||
const (
|
const (
|
||||||
SaveUrlResultComplete = "complete"
|
SaveUrlResultAsyncJobId = "async_job_id"
|
||||||
|
SaveUrlResultComplete = "complete"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a SaveUrlResult instance
|
// UnmarshalJSON deserializes into a SaveUrlResult instance
|
||||||
|
@ -2172,6 +2291,12 @@ func (u *SaveUrlResult) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
|
case "async_job_id":
|
||||||
|
err = json.Unmarshal(body, &u.AsyncJobId)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
case "complete":
|
case "complete":
|
||||||
err = json.Unmarshal(body, &u.Complete)
|
err = json.Unmarshal(body, &u.Complete)
|
||||||
|
|
||||||
|
@ -2310,6 +2435,21 @@ func NewSearchResult(Matches []*SearchMatch, More bool, Start uint64) *SearchRes
|
||||||
return s
|
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)
|
// ThumbnailArg : has no documentation (yet)
|
||||||
type ThumbnailArg struct {
|
type ThumbnailArg struct {
|
||||||
// Path : The path to the image file you want to thumbnail.
|
// 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)
|
// UploadErrorWithProperties : has no documentation (yet)
|
||||||
type UploadErrorWithProperties struct {
|
type UploadErrorWithProperties struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
// Path : Unable to save the uploaded contents to a file.
|
||||||
|
Path *UploadWriteFailed `json:"path,omitempty"`
|
||||||
// PropertiesError : has no documentation (yet)
|
// PropertiesError : has no documentation (yet)
|
||||||
PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
|
PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for UploadErrorWithProperties
|
// Valid tag values for UploadErrorWithProperties
|
||||||
const (
|
const (
|
||||||
|
UploadErrorWithPropertiesPath = "path"
|
||||||
|
UploadErrorWithPropertiesOther = "other"
|
||||||
UploadErrorWithPropertiesPropertiesError = "properties_error"
|
UploadErrorWithPropertiesPropertiesError = "properties_error"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2448,6 +2592,8 @@ const (
|
||||||
func (u *UploadErrorWithProperties) UnmarshalJSON(body []byte) error {
|
func (u *UploadErrorWithProperties) UnmarshalJSON(body []byte) error {
|
||||||
type wrap struct {
|
type wrap struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
// Path : Unable to save the uploaded contents to a file.
|
||||||
|
Path json.RawMessage `json:"path,omitempty"`
|
||||||
// PropertiesError : has no documentation (yet)
|
// PropertiesError : has no documentation (yet)
|
||||||
PropertiesError json.RawMessage `json:"properties_error,omitempty"`
|
PropertiesError json.RawMessage `json:"properties_error,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -2458,6 +2604,12 @@ func (u *UploadErrorWithProperties) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
|
case "path":
|
||||||
|
err = json.Unmarshal(body, &u.Path)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
case "properties_error":
|
case "properties_error":
|
||||||
err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
|
err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
|
||||||
|
|
||||||
|
@ -2542,7 +2694,8 @@ type UploadSessionFinishBatchJobStatus struct {
|
||||||
|
|
||||||
// Valid tag values for UploadSessionFinishBatchJobStatus
|
// Valid tag values for UploadSessionFinishBatchJobStatus
|
||||||
const (
|
const (
|
||||||
UploadSessionFinishBatchJobStatusComplete = "complete"
|
UploadSessionFinishBatchJobStatusInProgress = "in_progress"
|
||||||
|
UploadSessionFinishBatchJobStatusComplete = "complete"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a UploadSessionFinishBatchJobStatus instance
|
// UnmarshalJSON deserializes into a UploadSessionFinishBatchJobStatus instance
|
||||||
|
@ -2574,14 +2727,19 @@ func (u *UploadSessionFinishBatchJobStatus) UnmarshalJSON(body []byte) error {
|
||||||
// complete synchronously.
|
// complete synchronously.
|
||||||
type UploadSessionFinishBatchLaunch struct {
|
type UploadSessionFinishBatchLaunch struct {
|
||||||
dropbox.Tagged
|
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 : has no documentation (yet)
|
||||||
Complete *UploadSessionFinishBatchResult `json:"complete,omitempty"`
|
Complete *UploadSessionFinishBatchResult `json:"complete,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for UploadSessionFinishBatchLaunch
|
// Valid tag values for UploadSessionFinishBatchLaunch
|
||||||
const (
|
const (
|
||||||
UploadSessionFinishBatchLaunchComplete = "complete"
|
UploadSessionFinishBatchLaunchAsyncJobId = "async_job_id"
|
||||||
UploadSessionFinishBatchLaunchOther = "other"
|
UploadSessionFinishBatchLaunchComplete = "complete"
|
||||||
|
UploadSessionFinishBatchLaunchOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a UploadSessionFinishBatchLaunch instance
|
// UnmarshalJSON deserializes into a UploadSessionFinishBatchLaunch instance
|
||||||
|
@ -2598,6 +2756,12 @@ func (u *UploadSessionFinishBatchLaunch) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
|
case "async_job_id":
|
||||||
|
err = json.Unmarshal(body, &u.AsyncJobId)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
case "complete":
|
case "complete":
|
||||||
err = json.Unmarshal(body, &u.Complete)
|
err = json.Unmarshal(body, &u.Complete)
|
||||||
|
|
||||||
|
|
133
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/client.go
generated
vendored
133
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/client.go
generated
vendored
|
@ -108,7 +108,7 @@ type DocsArchiveAPIError struct {
|
||||||
func (dbx *apiImpl) DocsArchive(arg *RefPaperDoc) (err error) {
|
func (dbx *apiImpl) DocsArchive(arg *RefPaperDoc) (err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -125,21 +125,21 @@ func (dbx *apiImpl) DocsArchive(arg *RefPaperDoc) (err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ type DocsCreateAPIError struct {
|
||||||
func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) {
|
func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -193,21 +193,21 @@ func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -248,7 +248,7 @@ type DocsDownloadAPIError struct {
|
||||||
func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult, content io.ReadCloser, err error) {
|
func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult, content io.ReadCloser, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -265,17 +265,17 @@ func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
body := []byte(resp.Header.Get("Dropbox-API-Result"))
|
body := []byte(resp.Header.Get("Dropbox-API-Result"))
|
||||||
content = resp.Body
|
content = resp.Body
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -285,6 +285,11 @@ func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if resp.StatusCode == http.StatusConflict {
|
if resp.StatusCode == http.StatusConflict {
|
||||||
|
defer resp.Body.Close()
|
||||||
|
body, err = ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
var apiError DocsDownloadAPIError
|
var apiError DocsDownloadAPIError
|
||||||
err = json.Unmarshal(body, &apiError)
|
err = json.Unmarshal(body, &apiError)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -316,7 +321,7 @@ type DocsFolderUsersListAPIError struct {
|
||||||
func (dbx *apiImpl) DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUsersOnFolderResponse, err error) {
|
func (dbx *apiImpl) DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUsersOnFolderResponse, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -333,21 +338,21 @@ func (dbx *apiImpl) DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUs
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -388,7 +393,7 @@ type DocsFolderUsersListContinueAPIError struct {
|
||||||
func (dbx *apiImpl) DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueArgs) (res *ListUsersOnFolderResponse, err error) {
|
func (dbx *apiImpl) DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueArgs) (res *ListUsersOnFolderResponse, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -405,21 +410,21 @@ func (dbx *apiImpl) DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueAr
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -460,7 +465,7 @@ type DocsGetFolderInfoAPIError struct {
|
||||||
func (dbx *apiImpl) DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingPaperDoc, err error) {
|
func (dbx *apiImpl) DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingPaperDoc, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -477,21 +482,21 @@ func (dbx *apiImpl) DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingP
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -532,7 +537,7 @@ type DocsListAPIError struct {
|
||||||
func (dbx *apiImpl) DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse, err error) {
|
func (dbx *apiImpl) DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -549,21 +554,21 @@ func (dbx *apiImpl) DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -604,7 +609,7 @@ type DocsListContinueAPIError struct {
|
||||||
func (dbx *apiImpl) DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListPaperDocsResponse, err error) {
|
func (dbx *apiImpl) DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListPaperDocsResponse, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -621,21 +626,21 @@ func (dbx *apiImpl) DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListP
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -676,7 +681,7 @@ type DocsPermanentlyDeleteAPIError struct {
|
||||||
func (dbx *apiImpl) DocsPermanentlyDelete(arg *RefPaperDoc) (err error) {
|
func (dbx *apiImpl) DocsPermanentlyDelete(arg *RefPaperDoc) (err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -693,21 +698,21 @@ func (dbx *apiImpl) DocsPermanentlyDelete(arg *RefPaperDoc) (err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -743,7 +748,7 @@ type DocsSharingPolicyGetAPIError struct {
|
||||||
func (dbx *apiImpl) DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy, err error) {
|
func (dbx *apiImpl) DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -760,21 +765,21 @@ func (dbx *apiImpl) DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy,
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -815,7 +820,7 @@ type DocsSharingPolicySetAPIError struct {
|
||||||
func (dbx *apiImpl) DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error) {
|
func (dbx *apiImpl) DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -832,21 +837,21 @@ func (dbx *apiImpl) DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -882,7 +887,7 @@ type DocsUpdateAPIError struct {
|
||||||
func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) {
|
func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -900,21 +905,21 @@ func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -955,7 +960,7 @@ type DocsUsersAddAPIError struct {
|
||||||
func (dbx *apiImpl) DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMemberResult, err error) {
|
func (dbx *apiImpl) DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMemberResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -972,21 +977,21 @@ func (dbx *apiImpl) DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMe
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1027,7 +1032,7 @@ type DocsUsersListAPIError struct {
|
||||||
func (dbx *apiImpl) DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersOnPaperDocResponse, err error) {
|
func (dbx *apiImpl) DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersOnPaperDocResponse, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -1044,21 +1049,21 @@ func (dbx *apiImpl) DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersO
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1099,7 +1104,7 @@ type DocsUsersListContinueAPIError struct {
|
||||||
func (dbx *apiImpl) DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs) (res *ListUsersOnPaperDocResponse, err error) {
|
func (dbx *apiImpl) DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs) (res *ListUsersOnPaperDocResponse, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -1116,21 +1121,21 @@ func (dbx *apiImpl) DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1171,7 +1176,7 @@ type DocsUsersRemoveAPIError struct {
|
||||||
func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) {
|
func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -1188,21 +1193,21 @@ func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
40
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/types.go
generated
vendored
40
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/paper/types.go
generated
vendored
|
@ -161,7 +161,9 @@ type DocLookupError struct {
|
||||||
|
|
||||||
// Valid tag values for DocLookupError
|
// Valid tag values for DocLookupError
|
||||||
const (
|
const (
|
||||||
DocLookupErrorDocNotFound = "doc_not_found"
|
DocLookupErrorInsufficientPermissions = "insufficient_permissions"
|
||||||
|
DocLookupErrorOther = "other"
|
||||||
|
DocLookupErrorDocNotFound = "doc_not_found"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DocSubscriptionLevel : The subscription level of a Paper doc.
|
// DocSubscriptionLevel : The subscription level of a Paper doc.
|
||||||
|
@ -423,8 +425,10 @@ type ListUsersCursorError struct {
|
||||||
|
|
||||||
// Valid tag values for ListUsersCursorError
|
// Valid tag values for ListUsersCursorError
|
||||||
const (
|
const (
|
||||||
ListUsersCursorErrorDocNotFound = "doc_not_found"
|
ListUsersCursorErrorInsufficientPermissions = "insufficient_permissions"
|
||||||
ListUsersCursorErrorCursorError = "cursor_error"
|
ListUsersCursorErrorOther = "other"
|
||||||
|
ListUsersCursorErrorDocNotFound = "doc_not_found"
|
||||||
|
ListUsersCursorErrorCursorError = "cursor_error"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a ListUsersCursorError instance
|
// UnmarshalJSON deserializes into a ListUsersCursorError instance
|
||||||
|
@ -619,10 +623,12 @@ type PaperDocCreateError struct {
|
||||||
|
|
||||||
// Valid tag values for PaperDocCreateError
|
// Valid tag values for PaperDocCreateError
|
||||||
const (
|
const (
|
||||||
PaperDocCreateErrorContentMalformed = "content_malformed"
|
PaperDocCreateErrorInsufficientPermissions = "insufficient_permissions"
|
||||||
PaperDocCreateErrorFolderNotFound = "folder_not_found"
|
PaperDocCreateErrorOther = "other"
|
||||||
PaperDocCreateErrorDocLengthExceeded = "doc_length_exceeded"
|
PaperDocCreateErrorContentMalformed = "content_malformed"
|
||||||
PaperDocCreateErrorImageSizeExceeded = "image_size_exceeded"
|
PaperDocCreateErrorFolderNotFound = "folder_not_found"
|
||||||
|
PaperDocCreateErrorDocLengthExceeded = "doc_length_exceeded"
|
||||||
|
PaperDocCreateErrorImageSizeExceeded = "image_size_exceeded"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PaperDocCreateUpdateResult : has no documentation (yet)
|
// PaperDocCreateUpdateResult : has no documentation (yet)
|
||||||
|
@ -739,12 +745,15 @@ type PaperDocUpdateError struct {
|
||||||
|
|
||||||
// Valid tag values for PaperDocUpdateError
|
// Valid tag values for PaperDocUpdateError
|
||||||
const (
|
const (
|
||||||
PaperDocUpdateErrorContentMalformed = "content_malformed"
|
PaperDocUpdateErrorInsufficientPermissions = "insufficient_permissions"
|
||||||
PaperDocUpdateErrorRevisionMismatch = "revision_mismatch"
|
PaperDocUpdateErrorOther = "other"
|
||||||
PaperDocUpdateErrorDocLengthExceeded = "doc_length_exceeded"
|
PaperDocUpdateErrorDocNotFound = "doc_not_found"
|
||||||
PaperDocUpdateErrorImageSizeExceeded = "image_size_exceeded"
|
PaperDocUpdateErrorContentMalformed = "content_malformed"
|
||||||
PaperDocUpdateErrorDocArchived = "doc_archived"
|
PaperDocUpdateErrorRevisionMismatch = "revision_mismatch"
|
||||||
PaperDocUpdateErrorDocDeleted = "doc_deleted"
|
PaperDocUpdateErrorDocLengthExceeded = "doc_length_exceeded"
|
||||||
|
PaperDocUpdateErrorImageSizeExceeded = "image_size_exceeded"
|
||||||
|
PaperDocUpdateErrorDocArchived = "doc_archived"
|
||||||
|
PaperDocUpdateErrorDocDeleted = "doc_deleted"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PaperDocUpdatePolicy : has no documentation (yet)
|
// PaperDocUpdatePolicy : has no documentation (yet)
|
||||||
|
@ -810,7 +819,10 @@ type SharingPublicPolicyType struct {
|
||||||
|
|
||||||
// Valid tag values for SharingPublicPolicyType
|
// Valid tag values for SharingPublicPolicyType
|
||||||
const (
|
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)
|
// UserInfoWithPermissionLevel : has no documentation (yet)
|
||||||
|
|
42
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sdk.go
generated
vendored
42
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sdk.go
generated
vendored
|
@ -35,8 +35,8 @@ const (
|
||||||
hostAPI = "api"
|
hostAPI = "api"
|
||||||
hostContent = "content"
|
hostContent = "content"
|
||||||
hostNotify = "notify"
|
hostNotify = "notify"
|
||||||
sdkVersion = "1.0.0-beta"
|
sdkVersion = "3.3.0"
|
||||||
specVersion = "52ee619"
|
specVersion = "318810d"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Version returns the current SDK version and API Spec version
|
// Version returns the current SDK version and API Spec version
|
||||||
|
@ -48,8 +48,8 @@ func Version() (string, string) {
|
||||||
type Config struct {
|
type Config struct {
|
||||||
// OAuth2 access token
|
// OAuth2 access token
|
||||||
Token string
|
Token string
|
||||||
// Enable verbose logging in SDK
|
// Logging level for SDK generated logs
|
||||||
Verbose bool
|
LogLevel LogLevel
|
||||||
// Logging target for verbose SDK logging
|
// Logging target for verbose SDK logging
|
||||||
Logger *log.Logger
|
Logger *log.Logger
|
||||||
// Used with APIs that support operations as another user
|
// 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
|
URLGenerator func(hostType string, style string, namespace string, route string) string
|
||||||
}
|
}
|
||||||
|
|
||||||
// TryLog will, if Verbose is set, log to the config's logger
|
// LogLevel defines a type that can set the desired level of logging the SDK will generate.
|
||||||
// or the default log (stderr) if Config.Logger is nil.
|
type LogLevel uint
|
||||||
func (c *Config) TryLog(format string, v ...interface{}) {
|
|
||||||
if !c.Verbose {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.Logger != nil {
|
if c.Logger != nil {
|
||||||
c.Logger.Printf(format, v...)
|
c.Logger.Printf(format, v...)
|
||||||
} else {
|
} 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.
|
// Context is the base client context used to implement per-namespace clients.
|
||||||
type Context struct {
|
type Context struct {
|
||||||
Config Config
|
Config Config
|
||||||
|
|
341
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/client.go
generated
vendored
341
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/client.go
generated
vendored
File diff suppressed because it is too large
Load diff
140
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/types.go
generated
vendored
140
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing/types.go
generated
vendored
|
@ -1342,7 +1342,11 @@ type GetSharedLinkFileError struct {
|
||||||
|
|
||||||
// Valid tag values for GetSharedLinkFileError
|
// Valid tag values for GetSharedLinkFileError
|
||||||
const (
|
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)
|
// GetSharedLinkMetadataArg : has no documentation (yet)
|
||||||
|
@ -1660,8 +1664,9 @@ type JobStatus struct {
|
||||||
|
|
||||||
// Valid tag values for JobStatus
|
// Valid tag values for JobStatus
|
||||||
const (
|
const (
|
||||||
JobStatusComplete = "complete"
|
JobStatusInProgress = "in_progress"
|
||||||
JobStatusFailed = "failed"
|
JobStatusComplete = "complete"
|
||||||
|
JobStatusFailed = "failed"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a JobStatus instance
|
// UnmarshalJSON deserializes into a JobStatus instance
|
||||||
|
@ -2537,8 +2542,12 @@ type ModifySharedLinkSettingsError struct {
|
||||||
|
|
||||||
// Valid tag values for ModifySharedLinkSettingsError
|
// Valid tag values for ModifySharedLinkSettingsError
|
||||||
const (
|
const (
|
||||||
ModifySharedLinkSettingsErrorSettingsError = "settings_error"
|
ModifySharedLinkSettingsErrorSharedLinkNotFound = "shared_link_not_found"
|
||||||
ModifySharedLinkSettingsErrorEmailNotVerified = "email_not_verified"
|
ModifySharedLinkSettingsErrorSharedLinkAccessDenied = "shared_link_access_denied"
|
||||||
|
ModifySharedLinkSettingsErrorUnsupportedLinkType = "unsupported_link_type"
|
||||||
|
ModifySharedLinkSettingsErrorOther = "other"
|
||||||
|
ModifySharedLinkSettingsErrorSettingsError = "settings_error"
|
||||||
|
ModifySharedLinkSettingsErrorEmailNotVerified = "email_not_verified"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a ModifySharedLinkSettingsError instance
|
// UnmarshalJSON deserializes into a ModifySharedLinkSettingsError instance
|
||||||
|
@ -3014,8 +3023,9 @@ type RemoveMemberJobStatus struct {
|
||||||
|
|
||||||
// Valid tag values for RemoveMemberJobStatus
|
// Valid tag values for RemoveMemberJobStatus
|
||||||
const (
|
const (
|
||||||
RemoveMemberJobStatusComplete = "complete"
|
RemoveMemberJobStatusInProgress = "in_progress"
|
||||||
RemoveMemberJobStatusFailed = "failed"
|
RemoveMemberJobStatusComplete = "complete"
|
||||||
|
RemoveMemberJobStatusFailed = "failed"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a RemoveMemberJobStatus instance
|
// UnmarshalJSON deserializes into a RemoveMemberJobStatus instance
|
||||||
|
@ -3077,6 +3087,9 @@ type ResolvedVisibility struct {
|
||||||
|
|
||||||
// Valid tag values for ResolvedVisibility
|
// Valid tag values for ResolvedVisibility
|
||||||
const (
|
const (
|
||||||
|
ResolvedVisibilityPublic = "public"
|
||||||
|
ResolvedVisibilityTeamOnly = "team_only"
|
||||||
|
ResolvedVisibilityPassword = "password"
|
||||||
ResolvedVisibilityTeamAndPassword = "team_and_password"
|
ResolvedVisibilityTeamAndPassword = "team_and_password"
|
||||||
ResolvedVisibilitySharedFolderOnly = "shared_folder_only"
|
ResolvedVisibilitySharedFolderOnly = "shared_folder_only"
|
||||||
ResolvedVisibilityOther = "other"
|
ResolvedVisibilityOther = "other"
|
||||||
|
@ -3102,7 +3115,11 @@ type RevokeSharedLinkError struct {
|
||||||
|
|
||||||
// Valid tag values for RevokeSharedLinkError
|
// Valid tag values for RevokeSharedLinkError
|
||||||
const (
|
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)
|
// ShareFolderArgBase : has no documentation (yet)
|
||||||
|
@ -3197,13 +3214,44 @@ func (u *ShareFolderErrorBase) UnmarshalJSON(body []byte) error {
|
||||||
// ShareFolderError : has no documentation (yet)
|
// ShareFolderError : has no documentation (yet)
|
||||||
type ShareFolderError struct {
|
type ShareFolderError struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
// BadPath : `ShareFolderArg.path` is invalid.
|
||||||
|
BadPath *SharePathError `json:"bad_path,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for ShareFolderError
|
// Valid tag values for ShareFolderError
|
||||||
const (
|
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)
|
// ShareFolderJobStatus : has no documentation (yet)
|
||||||
type ShareFolderJobStatus struct {
|
type ShareFolderJobStatus struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
@ -3216,8 +3264,9 @@ type ShareFolderJobStatus struct {
|
||||||
|
|
||||||
// Valid tag values for ShareFolderJobStatus
|
// Valid tag values for ShareFolderJobStatus
|
||||||
const (
|
const (
|
||||||
ShareFolderJobStatusComplete = "complete"
|
ShareFolderJobStatusInProgress = "in_progress"
|
||||||
ShareFolderJobStatusFailed = "failed"
|
ShareFolderJobStatusComplete = "complete"
|
||||||
|
ShareFolderJobStatusFailed = "failed"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a ShareFolderJobStatus instance
|
// UnmarshalJSON deserializes into a ShareFolderJobStatus instance
|
||||||
|
@ -3256,13 +3305,18 @@ func (u *ShareFolderJobStatus) UnmarshalJSON(body []byte) error {
|
||||||
// ShareFolderLaunch : has no documentation (yet)
|
// ShareFolderLaunch : has no documentation (yet)
|
||||||
type ShareFolderLaunch struct {
|
type ShareFolderLaunch struct {
|
||||||
dropbox.Tagged
|
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 : has no documentation (yet)
|
||||||
Complete *SharedFolderMetadata `json:"complete,omitempty"`
|
Complete *SharedFolderMetadata `json:"complete,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for ShareFolderLaunch
|
// Valid tag values for ShareFolderLaunch
|
||||||
const (
|
const (
|
||||||
ShareFolderLaunchComplete = "complete"
|
ShareFolderLaunchAsyncJobId = "async_job_id"
|
||||||
|
ShareFolderLaunchComplete = "complete"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a ShareFolderLaunch instance
|
// UnmarshalJSON deserializes into a ShareFolderLaunch instance
|
||||||
|
@ -3279,6 +3333,12 @@ func (u *ShareFolderLaunch) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
|
case "async_job_id":
|
||||||
|
err = json.Unmarshal(body, &u.AsyncJobId)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
case "complete":
|
case "complete":
|
||||||
err = json.Unmarshal(body, &u.Complete)
|
err = json.Unmarshal(body, &u.Complete)
|
||||||
|
|
||||||
|
@ -3368,7 +3428,7 @@ func NewSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudien
|
||||||
// part of the results for `listFileMembersBatch`.
|
// part of the results for `listFileMembersBatch`.
|
||||||
type SharedFileMembers struct {
|
type SharedFileMembers struct {
|
||||||
// Users : The list of user members of the shared file.
|
// 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 : The list of group members of the shared file.
|
||||||
Groups []*GroupMembershipInfo `json:"groups"`
|
Groups []*GroupMembershipInfo `json:"groups"`
|
||||||
// Invitees : The list of invited members of a file, but have not logged in
|
// 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
|
// 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 := new(SharedFileMembers)
|
||||||
s.Users = Users
|
s.Users = Users
|
||||||
s.Groups = Groups
|
s.Groups = Groups
|
||||||
|
@ -4106,6 +4166,41 @@ func (u *UpdateFolderPolicyError) UnmarshalJSON(body []byte) error {
|
||||||
return nil
|
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
|
// UserInfo : Basic information about a user. Use `usersAccount` and
|
||||||
// `usersAccountBatch` to obtain more detailed information.
|
// `usersAccountBatch` to obtain more detailed information.
|
||||||
type UserInfo struct {
|
type UserInfo struct {
|
||||||
|
@ -4126,23 +4221,6 @@ func NewUserInfo(AccountId string, SameTeam bool) *UserInfo {
|
||||||
return s
|
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)
|
// ViewerInfoPolicy : has no documentation (yet)
|
||||||
type ViewerInfoPolicy struct {
|
type ViewerInfoPolicy struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
|
478
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/client.go
generated
vendored
478
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/client.go
generated
vendored
File diff suppressed because it is too large
Load diff
318
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/types.go
generated
vendored
318
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team/types.go
generated
vendored
|
@ -697,6 +697,8 @@ type GroupSelectorWithTeamGroupError struct {
|
||||||
|
|
||||||
// Valid tag values for GroupSelectorWithTeamGroupError
|
// Valid tag values for GroupSelectorWithTeamGroupError
|
||||||
const (
|
const (
|
||||||
|
GroupSelectorWithTeamGroupErrorGroupNotFound = "group_not_found"
|
||||||
|
GroupSelectorWithTeamGroupErrorOther = "other"
|
||||||
GroupSelectorWithTeamGroupErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
|
GroupSelectorWithTeamGroupErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -707,7 +709,10 @@ type GroupDeleteError struct {
|
||||||
|
|
||||||
// Valid tag values for GroupDeleteError
|
// Valid tag values for GroupDeleteError
|
||||||
const (
|
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.
|
// GroupFullInfo : Full description of a group.
|
||||||
|
@ -771,7 +776,10 @@ type GroupMemberSelectorError struct {
|
||||||
|
|
||||||
// Valid tag values for GroupMemberSelectorError
|
// Valid tag values for GroupMemberSelectorError
|
||||||
const (
|
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)
|
// GroupMemberSetAccessTypeError : has no documentation (yet)
|
||||||
|
@ -781,6 +789,10 @@ type GroupMemberSetAccessTypeError struct {
|
||||||
|
|
||||||
// Valid tag values for GroupMemberSetAccessTypeError
|
// Valid tag values for GroupMemberSetAccessTypeError
|
||||||
const (
|
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"
|
GroupMemberSetAccessTypeErrorUserCannotBeManagerOfCompanyManagedGroup = "user_cannot_be_manager_of_company_managed_group"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -834,6 +846,9 @@ type GroupMembersAddError struct {
|
||||||
|
|
||||||
// Valid tag values for GroupMembersAddError
|
// Valid tag values for GroupMembersAddError
|
||||||
const (
|
const (
|
||||||
|
GroupMembersAddErrorGroupNotFound = "group_not_found"
|
||||||
|
GroupMembersAddErrorOther = "other"
|
||||||
|
GroupMembersAddErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
|
||||||
GroupMembersAddErrorDuplicateUser = "duplicate_user"
|
GroupMembersAddErrorDuplicateUser = "duplicate_user"
|
||||||
GroupMembersAddErrorGroupNotInTeam = "group_not_in_team"
|
GroupMembersAddErrorGroupNotInTeam = "group_not_in_team"
|
||||||
GroupMembersAddErrorMembersNotInTeam = "members_not_in_team"
|
GroupMembersAddErrorMembersNotInTeam = "members_not_in_team"
|
||||||
|
@ -932,7 +947,10 @@ type GroupMembersSelectorError struct {
|
||||||
|
|
||||||
// Valid tag values for GroupMembersSelectorError
|
// Valid tag values for GroupMembersSelectorError
|
||||||
const (
|
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)
|
// GroupMembersRemoveError : has no documentation (yet)
|
||||||
|
@ -946,9 +964,13 @@ type GroupMembersRemoveError struct {
|
||||||
|
|
||||||
// Valid tag values for GroupMembersRemoveError
|
// Valid tag values for GroupMembersRemoveError
|
||||||
const (
|
const (
|
||||||
GroupMembersRemoveErrorGroupNotInTeam = "group_not_in_team"
|
GroupMembersRemoveErrorGroupNotFound = "group_not_found"
|
||||||
GroupMembersRemoveErrorMembersNotInTeam = "members_not_in_team"
|
GroupMembersRemoveErrorOther = "other"
|
||||||
GroupMembersRemoveErrorUsersNotFound = "users_not_found"
|
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
|
// UnmarshalJSON deserializes into a GroupMembersRemoveError instance
|
||||||
|
@ -1094,9 +1116,12 @@ type GroupUpdateError struct {
|
||||||
|
|
||||||
// Valid tag values for GroupUpdateError
|
// Valid tag values for GroupUpdateError
|
||||||
const (
|
const (
|
||||||
GroupUpdateErrorGroupNameAlreadyUsed = "group_name_already_used"
|
GroupUpdateErrorGroupNotFound = "group_not_found"
|
||||||
GroupUpdateErrorGroupNameInvalid = "group_name_invalid"
|
GroupUpdateErrorOther = "other"
|
||||||
GroupUpdateErrorExternalIdAlreadyInUse = "external_id_already_in_use"
|
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)
|
// GroupsGetInfoError : has no documentation (yet)
|
||||||
|
@ -1285,7 +1310,10 @@ type GroupsPollError struct {
|
||||||
|
|
||||||
// Valid tag values for GroupsPollError
|
// Valid tag values for GroupsPollError
|
||||||
const (
|
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
|
// GroupsSelector : Argument for selecting a list of groups, either by
|
||||||
|
@ -1950,6 +1978,7 @@ type MemberSelectorError struct {
|
||||||
|
|
||||||
// Valid tag values for MemberSelectorError
|
// Valid tag values for MemberSelectorError
|
||||||
const (
|
const (
|
||||||
|
MemberSelectorErrorUserNotFound = "user_not_found"
|
||||||
MemberSelectorErrorUserNotInTeam = "user_not_in_team"
|
MemberSelectorErrorUserNotInTeam = "user_not_in_team"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1983,8 +2012,9 @@ type MembersAddJobStatus struct {
|
||||||
|
|
||||||
// Valid tag values for MembersAddJobStatus
|
// Valid tag values for MembersAddJobStatus
|
||||||
const (
|
const (
|
||||||
MembersAddJobStatusComplete = "complete"
|
MembersAddJobStatusInProgress = "in_progress"
|
||||||
MembersAddJobStatusFailed = "failed"
|
MembersAddJobStatusComplete = "complete"
|
||||||
|
MembersAddJobStatusFailed = "failed"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a MembersAddJobStatus instance
|
// UnmarshalJSON deserializes into a MembersAddJobStatus instance
|
||||||
|
@ -2022,13 +2052,18 @@ func (u *MembersAddJobStatus) UnmarshalJSON(body []byte) error {
|
||||||
// MembersAddLaunch : has no documentation (yet)
|
// MembersAddLaunch : has no documentation (yet)
|
||||||
type MembersAddLaunch struct {
|
type MembersAddLaunch struct {
|
||||||
dropbox.Tagged
|
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 : has no documentation (yet)
|
||||||
Complete []*MemberAddResult `json:"complete,omitempty"`
|
Complete []*MemberAddResult `json:"complete,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for MembersAddLaunch
|
// Valid tag values for MembersAddLaunch
|
||||||
const (
|
const (
|
||||||
MembersAddLaunchComplete = "complete"
|
MembersAddLaunchAsyncJobId = "async_job_id"
|
||||||
|
MembersAddLaunchComplete = "complete"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a MembersAddLaunch instance
|
// UnmarshalJSON deserializes into a MembersAddLaunch instance
|
||||||
|
@ -2045,6 +2080,12 @@ func (u *MembersAddLaunch) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
|
case "async_job_id":
|
||||||
|
err = json.Unmarshal(body, &u.AsyncJobId)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
case "complete":
|
case "complete":
|
||||||
err = json.Unmarshal(body, &u.Complete)
|
err = json.Unmarshal(body, &u.Complete)
|
||||||
|
|
||||||
|
@ -2080,6 +2121,7 @@ type MembersDeactivateError struct {
|
||||||
|
|
||||||
// Valid tag values for MembersDeactivateError
|
// Valid tag values for MembersDeactivateError
|
||||||
const (
|
const (
|
||||||
|
MembersDeactivateErrorUserNotFound = "user_not_found"
|
||||||
MembersDeactivateErrorUserNotInTeam = "user_not_in_team"
|
MembersDeactivateErrorUserNotInTeam = "user_not_in_team"
|
||||||
MembersDeactivateErrorOther = "other"
|
MembersDeactivateErrorOther = "other"
|
||||||
)
|
)
|
||||||
|
@ -2248,6 +2290,7 @@ type MembersRecoverError struct {
|
||||||
|
|
||||||
// Valid tag values for MembersRecoverError
|
// Valid tag values for MembersRecoverError
|
||||||
const (
|
const (
|
||||||
|
MembersRecoverErrorUserNotFound = "user_not_found"
|
||||||
MembersRecoverErrorUserUnrecoverable = "user_unrecoverable"
|
MembersRecoverErrorUserUnrecoverable = "user_unrecoverable"
|
||||||
MembersRecoverErrorUserNotInTeam = "user_not_in_team"
|
MembersRecoverErrorUserNotInTeam = "user_not_in_team"
|
||||||
MembersRecoverErrorTeamLicenseLimit = "team_license_limit"
|
MembersRecoverErrorTeamLicenseLimit = "team_license_limit"
|
||||||
|
@ -2287,6 +2330,9 @@ type MembersRemoveError struct {
|
||||||
|
|
||||||
// Valid tag values for MembersRemoveError
|
// Valid tag values for MembersRemoveError
|
||||||
const (
|
const (
|
||||||
|
MembersRemoveErrorUserNotFound = "user_not_found"
|
||||||
|
MembersRemoveErrorUserNotInTeam = "user_not_in_team"
|
||||||
|
MembersRemoveErrorOther = "other"
|
||||||
MembersRemoveErrorRemoveLastAdmin = "remove_last_admin"
|
MembersRemoveErrorRemoveLastAdmin = "remove_last_admin"
|
||||||
MembersRemoveErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ"
|
MembersRemoveErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ"
|
||||||
MembersRemoveErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ"
|
MembersRemoveErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ"
|
||||||
|
@ -2308,7 +2354,9 @@ type MembersSendWelcomeError struct {
|
||||||
|
|
||||||
// Valid tag values for MembersSendWelcomeError
|
// Valid tag values for MembersSendWelcomeError
|
||||||
const (
|
const (
|
||||||
MembersSendWelcomeErrorOther = "other"
|
MembersSendWelcomeErrorUserNotFound = "user_not_found"
|
||||||
|
MembersSendWelcomeErrorUserNotInTeam = "user_not_in_team"
|
||||||
|
MembersSendWelcomeErrorOther = "other"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MembersSetPermissionsArg : Exactly one of team_member_id, email, or
|
// MembersSetPermissionsArg : Exactly one of team_member_id, email, or
|
||||||
|
@ -2335,6 +2383,7 @@ type MembersSetPermissionsError struct {
|
||||||
|
|
||||||
// Valid tag values for MembersSetPermissionsError
|
// Valid tag values for MembersSetPermissionsError
|
||||||
const (
|
const (
|
||||||
|
MembersSetPermissionsErrorUserNotFound = "user_not_found"
|
||||||
MembersSetPermissionsErrorLastAdmin = "last_admin"
|
MembersSetPermissionsErrorLastAdmin = "last_admin"
|
||||||
MembersSetPermissionsErrorUserNotInTeam = "user_not_in_team"
|
MembersSetPermissionsErrorUserNotInTeam = "user_not_in_team"
|
||||||
MembersSetPermissionsErrorCannotSetPermissions = "cannot_set_permissions"
|
MembersSetPermissionsErrorCannotSetPermissions = "cannot_set_permissions"
|
||||||
|
@ -2391,6 +2440,8 @@ type MembersSetProfileError struct {
|
||||||
|
|
||||||
// Valid tag values for MembersSetProfileError
|
// Valid tag values for MembersSetProfileError
|
||||||
const (
|
const (
|
||||||
|
MembersSetProfileErrorUserNotFound = "user_not_found"
|
||||||
|
MembersSetProfileErrorUserNotInTeam = "user_not_in_team"
|
||||||
MembersSetProfileErrorExternalIdAndNewExternalIdUnsafe = "external_id_and_new_external_id_unsafe"
|
MembersSetProfileErrorExternalIdAndNewExternalIdUnsafe = "external_id_and_new_external_id_unsafe"
|
||||||
MembersSetProfileErrorNoNewDataSpecified = "no_new_data_specified"
|
MembersSetProfileErrorNoNewDataSpecified = "no_new_data_specified"
|
||||||
MembersSetProfileErrorEmailReservedForOtherUser = "email_reserved_for_other_user"
|
MembersSetProfileErrorEmailReservedForOtherUser = "email_reserved_for_other_user"
|
||||||
|
@ -2409,6 +2460,9 @@ type MembersSuspendError struct {
|
||||||
|
|
||||||
// Valid tag values for MembersSuspendError
|
// Valid tag values for MembersSuspendError
|
||||||
const (
|
const (
|
||||||
|
MembersSuspendErrorUserNotFound = "user_not_found"
|
||||||
|
MembersSuspendErrorUserNotInTeam = "user_not_in_team"
|
||||||
|
MembersSuspendErrorOther = "other"
|
||||||
MembersSuspendErrorSuspendInactiveUser = "suspend_inactive_user"
|
MembersSuspendErrorSuspendInactiveUser = "suspend_inactive_user"
|
||||||
MembersSuspendErrorSuspendLastAdmin = "suspend_last_admin"
|
MembersSuspendErrorSuspendLastAdmin = "suspend_last_admin"
|
||||||
MembersSuspendErrorTeamLicenseLimit = "team_license_limit"
|
MembersSuspendErrorTeamLicenseLimit = "team_license_limit"
|
||||||
|
@ -2435,6 +2489,9 @@ type MembersUnsuspendError struct {
|
||||||
|
|
||||||
// Valid tag values for MembersUnsuspendError
|
// Valid tag values for MembersUnsuspendError
|
||||||
const (
|
const (
|
||||||
|
MembersUnsuspendErrorUserNotFound = "user_not_found"
|
||||||
|
MembersUnsuspendErrorUserNotInTeam = "user_not_in_team"
|
||||||
|
MembersUnsuspendErrorOther = "other"
|
||||||
MembersUnsuspendErrorUnsuspendNonSuspendedMember = "unsuspend_non_suspended_member"
|
MembersUnsuspendErrorUnsuspendNonSuspendedMember = "unsuspend_non_suspended_member"
|
||||||
MembersUnsuspendErrorTeamLicenseLimit = "team_license_limit"
|
MembersUnsuspendErrorTeamLicenseLimit = "team_license_limit"
|
||||||
)
|
)
|
||||||
|
@ -2845,10 +2902,61 @@ const (
|
||||||
// TeamFolderActivateError :
|
// TeamFolderActivateError :
|
||||||
type TeamFolderActivateError struct {
|
type TeamFolderActivateError struct {
|
||||||
dropbox.Tagged
|
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
|
// 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)
|
// TeamFolderIdArg : has no documentation (yet)
|
||||||
type TeamFolderIdArg struct {
|
type TeamFolderIdArg struct {
|
||||||
|
@ -2881,10 +2989,61 @@ func NewTeamFolderArchiveArg(TeamFolderId string) *TeamFolderArchiveArg {
|
||||||
// TeamFolderArchiveError :
|
// TeamFolderArchiveError :
|
||||||
type TeamFolderArchiveError struct {
|
type TeamFolderArchiveError struct {
|
||||||
dropbox.Tagged
|
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
|
// 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)
|
// TeamFolderArchiveJobStatus : has no documentation (yet)
|
||||||
type TeamFolderArchiveJobStatus struct {
|
type TeamFolderArchiveJobStatus struct {
|
||||||
|
@ -2899,8 +3058,9 @@ type TeamFolderArchiveJobStatus struct {
|
||||||
|
|
||||||
// Valid tag values for TeamFolderArchiveJobStatus
|
// Valid tag values for TeamFolderArchiveJobStatus
|
||||||
const (
|
const (
|
||||||
TeamFolderArchiveJobStatusComplete = "complete"
|
TeamFolderArchiveJobStatusInProgress = "in_progress"
|
||||||
TeamFolderArchiveJobStatusFailed = "failed"
|
TeamFolderArchiveJobStatusComplete = "complete"
|
||||||
|
TeamFolderArchiveJobStatusFailed = "failed"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a TeamFolderArchiveJobStatus instance
|
// UnmarshalJSON deserializes into a TeamFolderArchiveJobStatus instance
|
||||||
|
@ -2940,13 +3100,18 @@ func (u *TeamFolderArchiveJobStatus) UnmarshalJSON(body []byte) error {
|
||||||
// TeamFolderArchiveLaunch : has no documentation (yet)
|
// TeamFolderArchiveLaunch : has no documentation (yet)
|
||||||
type TeamFolderArchiveLaunch struct {
|
type TeamFolderArchiveLaunch struct {
|
||||||
dropbox.Tagged
|
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 : has no documentation (yet)
|
||||||
Complete *TeamFolderMetadata `json:"complete,omitempty"`
|
Complete *TeamFolderMetadata `json:"complete,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid tag values for TeamFolderArchiveLaunch
|
// Valid tag values for TeamFolderArchiveLaunch
|
||||||
const (
|
const (
|
||||||
TeamFolderArchiveLaunchComplete = "complete"
|
TeamFolderArchiveLaunchAsyncJobId = "async_job_id"
|
||||||
|
TeamFolderArchiveLaunchComplete = "complete"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UnmarshalJSON deserializes into a TeamFolderArchiveLaunch instance
|
// UnmarshalJSON deserializes into a TeamFolderArchiveLaunch instance
|
||||||
|
@ -2963,6 +3128,12 @@ func (u *TeamFolderArchiveLaunch) UnmarshalJSON(body []byte) error {
|
||||||
}
|
}
|
||||||
u.Tag = w.Tag
|
u.Tag = w.Tag
|
||||||
switch u.Tag {
|
switch u.Tag {
|
||||||
|
case "async_job_id":
|
||||||
|
err = json.Unmarshal(body, &u.AsyncJobId)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
case "complete":
|
case "complete":
|
||||||
err = json.Unmarshal(body, &u.Complete)
|
err = json.Unmarshal(body, &u.Complete)
|
||||||
|
|
||||||
|
@ -3170,10 +3341,61 @@ func NewTeamFolderMetadata(TeamFolderId string, Name string, Status *TeamFolderS
|
||||||
// TeamFolderPermanentlyDeleteError :
|
// TeamFolderPermanentlyDeleteError :
|
||||||
type TeamFolderPermanentlyDeleteError struct {
|
type TeamFolderPermanentlyDeleteError struct {
|
||||||
dropbox.Tagged
|
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
|
// 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)
|
// TeamFolderRenameArg : has no documentation (yet)
|
||||||
type TeamFolderRenameArg struct {
|
type TeamFolderRenameArg struct {
|
||||||
|
@ -3193,15 +3415,65 @@ func NewTeamFolderRenameArg(TeamFolderId string, Name string) *TeamFolderRenameA
|
||||||
// TeamFolderRenameError : has no documentation (yet)
|
// TeamFolderRenameError : has no documentation (yet)
|
||||||
type TeamFolderRenameError struct {
|
type TeamFolderRenameError struct {
|
||||||
dropbox.Tagged
|
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
|
// Valid tag values for TeamFolderRenameError
|
||||||
const (
|
const (
|
||||||
TeamFolderRenameErrorInvalidFolderName = "invalid_folder_name"
|
TeamFolderRenameErrorAccessError = "access_error"
|
||||||
TeamFolderRenameErrorFolderNameAlreadyUsed = "folder_name_already_used"
|
TeamFolderRenameErrorStatusError = "status_error"
|
||||||
TeamFolderRenameErrorFolderNameReserved = "folder_name_reserved"
|
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)
|
// TeamFolderStatus : has no documentation (yet)
|
||||||
type TeamFolderStatus struct {
|
type TeamFolderStatus struct {
|
||||||
dropbox.Tagged
|
dropbox.Tagged
|
||||||
|
|
16
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/client.go
generated
vendored
16
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/client.go
generated
vendored
|
@ -49,7 +49,7 @@ type GetEventsAPIError struct {
|
||||||
func (dbx *apiImpl) GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult, err error) {
|
func (dbx *apiImpl) GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -63,21 +63,21 @@ func (dbx *apiImpl) GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult,
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -118,7 +118,7 @@ type GetEventsContinueAPIError struct {
|
||||||
func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTeamEventsResult, err error) {
|
func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTeamEventsResult, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -132,21 +132,21 @@ func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTe
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
145
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/types.go
generated
vendored
145
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_log/types.go
generated
vendored
|
@ -1213,9 +1213,6 @@ func NewDomainVerificationAddDomainSuccessDetails(DomainNames []string) *DomainV
|
||||||
type DomainVerificationRemoveDomainDetails struct {
|
type DomainVerificationRemoveDomainDetails struct {
|
||||||
// DomainNames : Domain names.
|
// DomainNames : Domain names.
|
||||||
DomainNames []string `json:"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
|
// NewDomainVerificationRemoveDomainDetails returns a new DomainVerificationRemoveDomainDetails instance
|
||||||
|
@ -1856,6 +1853,8 @@ type EventDetails struct {
|
||||||
// ShmodelVisibilityTeamOnlyDetails : Made a file/folder visible only to
|
// ShmodelVisibilityTeamOnlyDetails : Made a file/folder visible only to
|
||||||
// team members with the link.
|
// team members with the link.
|
||||||
ShmodelVisibilityTeamOnlyDetails *ShmodelVisibilityTeamOnlyDetails `json:"shmodel_visibility_team_only_details,omitempty"`
|
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 : Added sign-in URL for SSO.
|
||||||
SsoAddLoginUrlDetails *SsoAddLoginUrlDetails `json:"sso_add_login_url_details,omitempty"`
|
SsoAddLoginUrlDetails *SsoAddLoginUrlDetails `json:"sso_add_login_url_details,omitempty"`
|
||||||
// SsoAddLogoutUrlDetails : Added sign-out URL for SSO.
|
// SsoAddLogoutUrlDetails : Added sign-out URL for SSO.
|
||||||
|
@ -1869,6 +1868,8 @@ type EventDetails struct {
|
||||||
// SsoChangeSamlIdentityModeDetails : Changed the SAML identity mode for
|
// SsoChangeSamlIdentityModeDetails : Changed the SAML identity mode for
|
||||||
// SSO.
|
// SSO.
|
||||||
SsoChangeSamlIdentityModeDetails *SsoChangeSamlIdentityModeDetails `json:"sso_change_saml_identity_mode_details,omitempty"`
|
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 : Removed the sign-in URL for SSO.
|
||||||
SsoRemoveLoginUrlDetails *SsoRemoveLoginUrlDetails `json:"sso_remove_login_url_details,omitempty"`
|
SsoRemoveLoginUrlDetails *SsoRemoveLoginUrlDetails `json:"sso_remove_login_url_details,omitempty"`
|
||||||
// SsoRemoveLogoutUrlDetails : Removed single sign-on logout URL.
|
// SsoRemoveLogoutUrlDetails : Removed single sign-on logout URL.
|
||||||
|
@ -1968,6 +1969,9 @@ type EventDetails struct {
|
||||||
// PaperChangeDeploymentPolicyDetails : Changed whether Dropbox Paper, when
|
// PaperChangeDeploymentPolicyDetails : Changed whether Dropbox Paper, when
|
||||||
// enabled, is deployed to all teams or to specific members of the team.
|
// enabled, is deployed to all teams or to specific members of the team.
|
||||||
PaperChangeDeploymentPolicyDetails *PaperChangeDeploymentPolicyDetails `json:"paper_change_deployment_policy_details,omitempty"`
|
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
|
// PaperChangeMemberPolicyDetails : Changed whether team members can share
|
||||||
// Paper documents externally (i.e. outside the team), and if so, whether
|
// Paper documents externally (i.e. outside the team), and if so, whether
|
||||||
// they should be accessible only by team members or anyone by default.
|
// 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
|
// TeamProfileAddLogoDetails : Added a team logo to be displayed on shared
|
||||||
// link headers.
|
// link headers.
|
||||||
TeamProfileAddLogoDetails *TeamProfileAddLogoDetails `json:"team_profile_add_logo_details,omitempty"`
|
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
|
// TeamProfileChangeLogoDetails : Changed the team logo to be displayed on
|
||||||
// shared link headers.
|
// shared link headers.
|
||||||
TeamProfileChangeLogoDetails *TeamProfileChangeLogoDetails `json:"team_profile_change_logo_details,omitempty"`
|
TeamProfileChangeLogoDetails *TeamProfileChangeLogoDetails `json:"team_profile_change_logo_details,omitempty"`
|
||||||
|
@ -2249,12 +2256,14 @@ const (
|
||||||
EventDetailsShmodelVisibilityPasswordDetails = "shmodel_visibility_password_details"
|
EventDetailsShmodelVisibilityPasswordDetails = "shmodel_visibility_password_details"
|
||||||
EventDetailsShmodelVisibilityPublicDetails = "shmodel_visibility_public_details"
|
EventDetailsShmodelVisibilityPublicDetails = "shmodel_visibility_public_details"
|
||||||
EventDetailsShmodelVisibilityTeamOnlyDetails = "shmodel_visibility_team_only_details"
|
EventDetailsShmodelVisibilityTeamOnlyDetails = "shmodel_visibility_team_only_details"
|
||||||
|
EventDetailsSsoAddCertDetails = "sso_add_cert_details"
|
||||||
EventDetailsSsoAddLoginUrlDetails = "sso_add_login_url_details"
|
EventDetailsSsoAddLoginUrlDetails = "sso_add_login_url_details"
|
||||||
EventDetailsSsoAddLogoutUrlDetails = "sso_add_logout_url_details"
|
EventDetailsSsoAddLogoutUrlDetails = "sso_add_logout_url_details"
|
||||||
EventDetailsSsoChangeCertDetails = "sso_change_cert_details"
|
EventDetailsSsoChangeCertDetails = "sso_change_cert_details"
|
||||||
EventDetailsSsoChangeLoginUrlDetails = "sso_change_login_url_details"
|
EventDetailsSsoChangeLoginUrlDetails = "sso_change_login_url_details"
|
||||||
EventDetailsSsoChangeLogoutUrlDetails = "sso_change_logout_url_details"
|
EventDetailsSsoChangeLogoutUrlDetails = "sso_change_logout_url_details"
|
||||||
EventDetailsSsoChangeSamlIdentityModeDetails = "sso_change_saml_identity_mode_details"
|
EventDetailsSsoChangeSamlIdentityModeDetails = "sso_change_saml_identity_mode_details"
|
||||||
|
EventDetailsSsoRemoveCertDetails = "sso_remove_cert_details"
|
||||||
EventDetailsSsoRemoveLoginUrlDetails = "sso_remove_login_url_details"
|
EventDetailsSsoRemoveLoginUrlDetails = "sso_remove_login_url_details"
|
||||||
EventDetailsSsoRemoveLogoutUrlDetails = "sso_remove_logout_url_details"
|
EventDetailsSsoRemoveLogoutUrlDetails = "sso_remove_logout_url_details"
|
||||||
EventDetailsTeamFolderChangeStatusDetails = "team_folder_change_status_details"
|
EventDetailsTeamFolderChangeStatusDetails = "team_folder_change_status_details"
|
||||||
|
@ -2289,6 +2298,7 @@ const (
|
||||||
EventDetailsMicrosoftOfficeAddinChangePolicyDetails = "microsoft_office_addin_change_policy_details"
|
EventDetailsMicrosoftOfficeAddinChangePolicyDetails = "microsoft_office_addin_change_policy_details"
|
||||||
EventDetailsNetworkControlChangePolicyDetails = "network_control_change_policy_details"
|
EventDetailsNetworkControlChangePolicyDetails = "network_control_change_policy_details"
|
||||||
EventDetailsPaperChangeDeploymentPolicyDetails = "paper_change_deployment_policy_details"
|
EventDetailsPaperChangeDeploymentPolicyDetails = "paper_change_deployment_policy_details"
|
||||||
|
EventDetailsPaperChangeMemberLinkPolicyDetails = "paper_change_member_link_policy_details"
|
||||||
EventDetailsPaperChangeMemberPolicyDetails = "paper_change_member_policy_details"
|
EventDetailsPaperChangeMemberPolicyDetails = "paper_change_member_policy_details"
|
||||||
EventDetailsPaperChangePolicyDetails = "paper_change_policy_details"
|
EventDetailsPaperChangePolicyDetails = "paper_change_policy_details"
|
||||||
EventDetailsPermanentDeleteChangePolicyDetails = "permanent_delete_change_policy_details"
|
EventDetailsPermanentDeleteChangePolicyDetails = "permanent_delete_change_policy_details"
|
||||||
|
@ -2304,6 +2314,7 @@ const (
|
||||||
EventDetailsWebSessionsChangeFixedLengthPolicyDetails = "web_sessions_change_fixed_length_policy_details"
|
EventDetailsWebSessionsChangeFixedLengthPolicyDetails = "web_sessions_change_fixed_length_policy_details"
|
||||||
EventDetailsWebSessionsChangeIdleLengthPolicyDetails = "web_sessions_change_idle_length_policy_details"
|
EventDetailsWebSessionsChangeIdleLengthPolicyDetails = "web_sessions_change_idle_length_policy_details"
|
||||||
EventDetailsTeamProfileAddLogoDetails = "team_profile_add_logo_details"
|
EventDetailsTeamProfileAddLogoDetails = "team_profile_add_logo_details"
|
||||||
|
EventDetailsTeamProfileChangeDefaultLanguageDetails = "team_profile_change_default_language_details"
|
||||||
EventDetailsTeamProfileChangeLogoDetails = "team_profile_change_logo_details"
|
EventDetailsTeamProfileChangeLogoDetails = "team_profile_change_logo_details"
|
||||||
EventDetailsTeamProfileChangeNameDetails = "team_profile_change_name_details"
|
EventDetailsTeamProfileChangeNameDetails = "team_profile_change_name_details"
|
||||||
EventDetailsTeamProfileRemoveLogoDetails = "team_profile_remove_logo_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
|
// ShmodelVisibilityTeamOnlyDetails : Made a file/folder visible only to
|
||||||
// team members with the link.
|
// team members with the link.
|
||||||
ShmodelVisibilityTeamOnlyDetails json.RawMessage `json:"shmodel_visibility_team_only_details,omitempty"`
|
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 : Added sign-in URL for SSO.
|
||||||
SsoAddLoginUrlDetails json.RawMessage `json:"sso_add_login_url_details,omitempty"`
|
SsoAddLoginUrlDetails json.RawMessage `json:"sso_add_login_url_details,omitempty"`
|
||||||
// SsoAddLogoutUrlDetails : Added sign-out URL for SSO.
|
// 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
|
// SsoChangeSamlIdentityModeDetails : Changed the SAML identity mode for
|
||||||
// SSO.
|
// SSO.
|
||||||
SsoChangeSamlIdentityModeDetails json.RawMessage `json:"sso_change_saml_identity_mode_details,omitempty"`
|
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 : Removed the sign-in URL for SSO.
|
||||||
SsoRemoveLoginUrlDetails json.RawMessage `json:"sso_remove_login_url_details,omitempty"`
|
SsoRemoveLoginUrlDetails json.RawMessage `json:"sso_remove_login_url_details,omitempty"`
|
||||||
// SsoRemoveLogoutUrlDetails : Removed single sign-on logout URL.
|
// 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
|
// when enabled, is deployed to all teams or to specific members of the
|
||||||
// team.
|
// team.
|
||||||
PaperChangeDeploymentPolicyDetails json.RawMessage `json:"paper_change_deployment_policy_details,omitempty"`
|
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
|
// PaperChangeMemberPolicyDetails : Changed whether team members can
|
||||||
// share Paper documents externally (i.e. outside the team), and if so,
|
// share Paper documents externally (i.e. outside the team), and if so,
|
||||||
// whether they should be accessible only by team members or anyone by
|
// 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
|
// TeamProfileAddLogoDetails : Added a team logo to be displayed on
|
||||||
// shared link headers.
|
// shared link headers.
|
||||||
TeamProfileAddLogoDetails json.RawMessage `json:"team_profile_add_logo_details,omitempty"`
|
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
|
// TeamProfileChangeLogoDetails : Changed the team logo to be displayed
|
||||||
// on shared link headers.
|
// on shared link headers.
|
||||||
TeamProfileChangeLogoDetails json.RawMessage `json:"team_profile_change_logo_details,omitempty"`
|
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":
|
case "shmodel_visibility_team_only_details":
|
||||||
err = json.Unmarshal(body, &u.ShmodelVisibilityTeamOnlyDetails)
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -4257,6 +4284,12 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
||||||
case "sso_change_saml_identity_mode_details":
|
case "sso_change_saml_identity_mode_details":
|
||||||
err = json.Unmarshal(body, &u.SsoChangeSamlIdentityModeDetails)
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -4461,6 +4494,12 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
||||||
case "paper_change_deployment_policy_details":
|
case "paper_change_deployment_policy_details":
|
||||||
err = json.Unmarshal(body, &u.PaperChangeDeploymentPolicyDetails)
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -4551,6 +4590,12 @@ func (u *EventDetails) UnmarshalJSON(body []byte) error {
|
||||||
case "team_profile_add_logo_details":
|
case "team_profile_add_logo_details":
|
||||||
err = json.Unmarshal(body, &u.TeamProfileAddLogoDetails)
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -4832,12 +4877,14 @@ const (
|
||||||
EventTypeShmodelVisibilityPassword = "shmodel_visibility_password"
|
EventTypeShmodelVisibilityPassword = "shmodel_visibility_password"
|
||||||
EventTypeShmodelVisibilityPublic = "shmodel_visibility_public"
|
EventTypeShmodelVisibilityPublic = "shmodel_visibility_public"
|
||||||
EventTypeShmodelVisibilityTeamOnly = "shmodel_visibility_team_only"
|
EventTypeShmodelVisibilityTeamOnly = "shmodel_visibility_team_only"
|
||||||
|
EventTypeSsoAddCert = "sso_add_cert"
|
||||||
EventTypeSsoAddLoginUrl = "sso_add_login_url"
|
EventTypeSsoAddLoginUrl = "sso_add_login_url"
|
||||||
EventTypeSsoAddLogoutUrl = "sso_add_logout_url"
|
EventTypeSsoAddLogoutUrl = "sso_add_logout_url"
|
||||||
EventTypeSsoChangeCert = "sso_change_cert"
|
EventTypeSsoChangeCert = "sso_change_cert"
|
||||||
EventTypeSsoChangeLoginUrl = "sso_change_login_url"
|
EventTypeSsoChangeLoginUrl = "sso_change_login_url"
|
||||||
EventTypeSsoChangeLogoutUrl = "sso_change_logout_url"
|
EventTypeSsoChangeLogoutUrl = "sso_change_logout_url"
|
||||||
EventTypeSsoChangeSamlIdentityMode = "sso_change_saml_identity_mode"
|
EventTypeSsoChangeSamlIdentityMode = "sso_change_saml_identity_mode"
|
||||||
|
EventTypeSsoRemoveCert = "sso_remove_cert"
|
||||||
EventTypeSsoRemoveLoginUrl = "sso_remove_login_url"
|
EventTypeSsoRemoveLoginUrl = "sso_remove_login_url"
|
||||||
EventTypeSsoRemoveLogoutUrl = "sso_remove_logout_url"
|
EventTypeSsoRemoveLogoutUrl = "sso_remove_logout_url"
|
||||||
EventTypeTeamFolderChangeStatus = "team_folder_change_status"
|
EventTypeTeamFolderChangeStatus = "team_folder_change_status"
|
||||||
|
@ -4872,6 +4919,7 @@ const (
|
||||||
EventTypeMicrosoftOfficeAddinChangePolicy = "microsoft_office_addin_change_policy"
|
EventTypeMicrosoftOfficeAddinChangePolicy = "microsoft_office_addin_change_policy"
|
||||||
EventTypeNetworkControlChangePolicy = "network_control_change_policy"
|
EventTypeNetworkControlChangePolicy = "network_control_change_policy"
|
||||||
EventTypePaperChangeDeploymentPolicy = "paper_change_deployment_policy"
|
EventTypePaperChangeDeploymentPolicy = "paper_change_deployment_policy"
|
||||||
|
EventTypePaperChangeMemberLinkPolicy = "paper_change_member_link_policy"
|
||||||
EventTypePaperChangeMemberPolicy = "paper_change_member_policy"
|
EventTypePaperChangeMemberPolicy = "paper_change_member_policy"
|
||||||
EventTypePaperChangePolicy = "paper_change_policy"
|
EventTypePaperChangePolicy = "paper_change_policy"
|
||||||
EventTypePermanentDeleteChangePolicy = "permanent_delete_change_policy"
|
EventTypePermanentDeleteChangePolicy = "permanent_delete_change_policy"
|
||||||
|
@ -4887,6 +4935,7 @@ const (
|
||||||
EventTypeWebSessionsChangeFixedLengthPolicy = "web_sessions_change_fixed_length_policy"
|
EventTypeWebSessionsChangeFixedLengthPolicy = "web_sessions_change_fixed_length_policy"
|
||||||
EventTypeWebSessionsChangeIdleLengthPolicy = "web_sessions_change_idle_length_policy"
|
EventTypeWebSessionsChangeIdleLengthPolicy = "web_sessions_change_idle_length_policy"
|
||||||
EventTypeTeamProfileAddLogo = "team_profile_add_logo"
|
EventTypeTeamProfileAddLogo = "team_profile_add_logo"
|
||||||
|
EventTypeTeamProfileChangeDefaultLanguage = "team_profile_change_default_language"
|
||||||
EventTypeTeamProfileChangeLogo = "team_profile_change_logo"
|
EventTypeTeamProfileChangeLogo = "team_profile_change_logo"
|
||||||
EventTypeTeamProfileChangeName = "team_profile_change_name"
|
EventTypeTeamProfileChangeName = "team_profile_change_name"
|
||||||
EventTypeTeamProfileRemoveLogo = "team_profile_remove_logo"
|
EventTypeTeamProfileRemoveLogo = "team_profile_remove_logo"
|
||||||
|
@ -5639,9 +5688,9 @@ func NewGroupChangeMemberRoleDetails(IsGroupOwner bool) *GroupChangeMemberRoleDe
|
||||||
|
|
||||||
// GroupCreateDetails : Created a group.
|
// GroupCreateDetails : Created a group.
|
||||||
type GroupCreateDetails struct {
|
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.
|
// historical data gap.
|
||||||
IsAdminManaged bool `json:"is_admin_managed,omitempty"`
|
IsCompanyManaged bool `json:"is_company_managed,omitempty"`
|
||||||
// JoinPolicy : Group join policy.
|
// JoinPolicy : Group join policy.
|
||||||
JoinPolicy *GroupJoinPolicy `json:"join_policy"`
|
JoinPolicy *GroupJoinPolicy `json:"join_policy"`
|
||||||
}
|
}
|
||||||
|
@ -5655,9 +5704,9 @@ func NewGroupCreateDetails(JoinPolicy *GroupJoinPolicy) *GroupCreateDetails {
|
||||||
|
|
||||||
// GroupDeleteDetails : Deleted a group.
|
// GroupDeleteDetails : Deleted a group.
|
||||||
type GroupDeleteDetails struct {
|
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.
|
// historical data gap.
|
||||||
IsAdminManaged bool `json:"is_admin_managed,omitempty"`
|
IsCompanyManaged bool `json:"is_company_managed,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewGroupDeleteDetails returns a new GroupDeleteDetails instance
|
// NewGroupDeleteDetails returns a new GroupDeleteDetails instance
|
||||||
|
@ -6412,6 +6461,20 @@ func NewPaperChangeDeploymentPolicyDetails(NewValue *team_policies.PaperDeployme
|
||||||
return s
|
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
|
// PaperChangeMemberPolicyDetails : Changed whether team members can share Paper
|
||||||
// documents externally (i.e. outside the team), and if so, whether they should
|
// documents externally (i.e. outside the team), and if so, whether they should
|
||||||
// be accessible only by team members or anyone by default.
|
// be accessible only by team members or anyone by default.
|
||||||
|
@ -8543,6 +8606,19 @@ const (
|
||||||
SpaceLimitsStatusOther = "other"
|
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.
|
// SsoAddLoginUrlDetails : Added sign-in URL for SSO.
|
||||||
type SsoAddLoginUrlDetails struct {
|
type SsoAddLoginUrlDetails struct {
|
||||||
// NewValue : New single sign-on login URL.
|
// NewValue : New single sign-on login URL.
|
||||||
|
@ -8571,14 +8647,16 @@ func NewSsoAddLogoutUrlDetails() *SsoAddLogoutUrlDetails {
|
||||||
|
|
||||||
// SsoChangeCertDetails : Changed the X.509 certificate for SSO.
|
// SsoChangeCertDetails : Changed the X.509 certificate for SSO.
|
||||||
type SsoChangeCertDetails struct {
|
type SsoChangeCertDetails struct {
|
||||||
// CertificateDetails : SSO certificate details.
|
// PreviousCertificateDetails : Previous SSO certificate details.
|
||||||
CertificateDetails *Certificate `json:"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
|
// NewSsoChangeCertDetails returns a new SsoChangeCertDetails instance
|
||||||
func NewSsoChangeCertDetails(CertificateDetails *Certificate) *SsoChangeCertDetails {
|
func NewSsoChangeCertDetails(NewCertificateDetails *Certificate) *SsoChangeCertDetails {
|
||||||
s := new(SsoChangeCertDetails)
|
s := new(SsoChangeCertDetails)
|
||||||
s.CertificateDetails = CertificateDetails
|
s.NewCertificateDetails = NewCertificateDetails
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8659,6 +8737,16 @@ func NewSsoLoginFailDetails(ErrorDetails *FailureDetailsLogInfo) *SsoLoginFailDe
|
||||||
return s
|
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.
|
// SsoRemoveLoginUrlDetails : Removed the sign-in URL for SSO.
|
||||||
type SsoRemoveLoginUrlDetails struct {
|
type SsoRemoveLoginUrlDetails struct {
|
||||||
// PreviousValue : Previous single sign-on login URL.
|
// PreviousValue : Previous single sign-on login URL.
|
||||||
|
@ -8917,6 +9005,23 @@ func NewTeamProfileAddLogoDetails() *TeamProfileAddLogoDetails {
|
||||||
return s
|
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
|
// TeamProfileChangeLogoDetails : Changed the team logo to be displayed on
|
||||||
// shared link headers.
|
// shared link headers.
|
||||||
type TeamProfileChangeLogoDetails struct {
|
type TeamProfileChangeLogoDetails struct {
|
||||||
|
@ -8989,14 +9094,14 @@ func NewTfaChangeBackupPhoneDetails() *TfaChangeBackupPhoneDetails {
|
||||||
// TfaChangePolicyDetails : Change two-step verification policy for the team.
|
// TfaChangePolicyDetails : Change two-step verification policy for the team.
|
||||||
type TfaChangePolicyDetails struct {
|
type TfaChangePolicyDetails struct {
|
||||||
// NewValue : New change policy.
|
// 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
|
// PreviousValue : Previous change policy. Might be missing due to
|
||||||
// historical data gap.
|
// historical data gap.
|
||||||
PreviousValue *TfaPolicy `json:"previous_value,omitempty"`
|
PreviousValue *team_policies.TwoStepVerificationPolicy `json:"previous_value,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewTfaChangePolicyDetails returns a new TfaChangePolicyDetails instance
|
// NewTfaChangePolicyDetails returns a new TfaChangePolicyDetails instance
|
||||||
func NewTfaChangePolicyDetails(NewValue *TfaPolicy) *TfaChangePolicyDetails {
|
func NewTfaChangePolicyDetails(NewValue *team_policies.TwoStepVerificationPolicy) *TfaChangePolicyDetails {
|
||||||
s := new(TfaChangePolicyDetails)
|
s := new(TfaChangePolicyDetails)
|
||||||
s.NewValue = NewValue
|
s.NewValue = NewValue
|
||||||
return s
|
return s
|
||||||
|
@ -9037,18 +9142,6 @@ const (
|
||||||
TfaConfigurationOther = "other"
|
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
|
// TfaRemoveBackupPhoneDetails : Removed the backup phone for two-step
|
||||||
// verification.
|
// verification.
|
||||||
type TfaRemoveBackupPhoneDetails struct {
|
type TfaRemoveBackupPhoneDetails struct {
|
||||||
|
|
12
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies/types.go
generated
vendored
12
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies/types.go
generated
vendored
|
@ -195,3 +195,15 @@ func NewTeamSharingPolicies(SharedFolderMemberPolicy *SharedFolderMemberPolicy,
|
||||||
s.SharedLinkCreatePolicy = SharedLinkCreatePolicy
|
s.SharedLinkCreatePolicy = SharedLinkCreatePolicy
|
||||||
return s
|
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"
|
||||||
|
)
|
||||||
|
|
28
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users/client.go
generated
vendored
28
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users/client.go
generated
vendored
|
@ -54,7 +54,7 @@ type GetAccountAPIError struct {
|
||||||
func (dbx *apiImpl) GetAccount(arg *GetAccountArg) (res *BasicAccount, err error) {
|
func (dbx *apiImpl) GetAccount(arg *GetAccountArg) (res *BasicAccount, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -71,21 +71,21 @@ func (dbx *apiImpl) GetAccount(arg *GetAccountArg) (res *BasicAccount, err error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -126,7 +126,7 @@ type GetAccountBatchAPIError struct {
|
||||||
func (dbx *apiImpl) GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccount, err error) {
|
func (dbx *apiImpl) GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccount, err error) {
|
||||||
cli := dbx.Client
|
cli := dbx.Client
|
||||||
|
|
||||||
dbx.Config.TryLog("arg: %v", arg)
|
dbx.Config.LogDebug("arg: %v", arg)
|
||||||
b, err := json.Marshal(arg)
|
b, err := json.Marshal(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -143,21 +143,21 @@ func (dbx *apiImpl) GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccoun
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -207,21 +207,21 @@ func (dbx *apiImpl) GetCurrentAccount() (res *FullAccount, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -271,21 +271,21 @@ func (dbx *apiImpl) GetSpaceUsage() (res *SpaceUsage, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbx.Config.TryLog("req: %v", req)
|
dbx.Config.LogInfo("req: %v", req)
|
||||||
|
|
||||||
resp, err := cli.Do(req)
|
resp, err := cli.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("resp: %v", resp)
|
dbx.Config.LogInfo("resp: %v", resp)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dbx.Config.TryLog("body: %v", body)
|
dbx.Config.LogDebug("body: %v", body)
|
||||||
if resp.StatusCode == http.StatusOK {
|
if resp.StatusCode == http.StatusOK {
|
||||||
err = json.Unmarshal(body, &res)
|
err = json.Unmarshal(body, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
2
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/generate-sdk.sh
generated
vendored
2
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/generate-sdk.sh
generated
vendored
|
@ -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
|
stone -v -a :all go_client.stoneg.py "$gen_dir" "$spec_dir"/*.stone
|
||||||
|
|
||||||
# Update SDK and API spec versions
|
# Update SDK and API spec versions
|
||||||
sdk_version=${1:-"1.0.0-beta"}
|
sdk_version=${1:-"3.0.0"}
|
||||||
pushd ${spec_dir}
|
pushd ${spec_dir}
|
||||||
spec_version=$(git rev-parse --short HEAD)
|
spec_version=$(git rev-parse --short HEAD)
|
||||||
popd
|
popd
|
||||||
|
|
16
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_client.stoneg.py
generated
vendored
16
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_client.stoneg.py
generated
vendored
|
@ -107,7 +107,7 @@ class GoClientBackend(CodeBackend):
|
||||||
|
|
||||||
body = 'nil'
|
body = 'nil'
|
||||||
if not is_void_type(route.arg_data_type):
|
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)')
|
out('b, err := json.Marshal(arg)')
|
||||||
with self.block('if err != nil'):
|
with self.block('if err != nil'):
|
||||||
|
@ -144,7 +144,7 @@ class GoClientBackend(CodeBackend):
|
||||||
with self.block('if err != nil'):
|
with self.block('if err != nil'):
|
||||||
out('return')
|
out('return')
|
||||||
|
|
||||||
out('dbx.Config.TryLog("req: %v", req)')
|
out('dbx.Config.LogInfo("req: %v", req)')
|
||||||
|
|
||||||
out()
|
out()
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ class GoClientBackend(CodeBackend):
|
||||||
out('return')
|
out('return')
|
||||||
out()
|
out()
|
||||||
|
|
||||||
out('dbx.Config.TryLog("resp: %v", resp)')
|
out('dbx.Config.LogInfo("resp: %v", resp)')
|
||||||
|
|
||||||
def _generate_response(self, route):
|
def _generate_response(self, route):
|
||||||
out = self.emit
|
out = self.emit
|
||||||
|
@ -172,11 +172,19 @@ class GoClientBackend(CodeBackend):
|
||||||
out('return')
|
out('return')
|
||||||
out()
|
out()
|
||||||
|
|
||||||
out('dbx.Config.TryLog("body: %v", body)')
|
out('dbx.Config.LogDebug("body: %v", body)')
|
||||||
|
|
||||||
def _generate_error_handling(self, route):
|
def _generate_error_handling(self, route):
|
||||||
out = self.emit
|
out = self.emit
|
||||||
|
style = route.attrs.get('style', 'rpc')
|
||||||
with self.block('if resp.StatusCode == http.StatusConflict'):
|
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))
|
out('var apiError %sAPIError' % fmt_var(route.name))
|
||||||
with self.block('err = json.Unmarshal(body, &apiError);'
|
with self.block('err = json.Unmarshal(body, &apiError);'
|
||||||
'if err != nil'):
|
'if err != nil'):
|
||||||
|
|
38
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_rsrc/sdk.go
generated
vendored
38
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_rsrc/sdk.go
generated
vendored
|
@ -48,8 +48,8 @@ func Version() (string, string) {
|
||||||
type Config struct {
|
type Config struct {
|
||||||
// OAuth2 access token
|
// OAuth2 access token
|
||||||
Token string
|
Token string
|
||||||
// Enable verbose logging in SDK
|
// Logging level for SDK generated logs
|
||||||
Verbose bool
|
LogLevel LogLevel
|
||||||
// Logging target for verbose SDK logging
|
// Logging target for verbose SDK logging
|
||||||
Logger *log.Logger
|
Logger *log.Logger
|
||||||
// Used with APIs that support operations as another user
|
// 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
|
URLGenerator func(hostType string, style string, namespace string, route string) string
|
||||||
}
|
}
|
||||||
|
|
||||||
// TryLog will, if Verbose is set, log to the config's logger
|
// LogLevel defines a type that can set the desired level of logging the SDK will generate.
|
||||||
// or the default log (stderr) if Config.Logger is nil.
|
type LogLevel uint
|
||||||
func (c *Config) TryLog(format string, v ...interface{}) {
|
|
||||||
if !c.Verbose {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.Logger != nil {
|
if c.Logger != nil {
|
||||||
c.Logger.Printf(format, v...)
|
c.Logger.Printf(format, v...)
|
||||||
} else {
|
} 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.
|
// Context is the base client context used to implement per-namespace clients.
|
||||||
type Context struct {
|
type Context struct {
|
||||||
Config Config
|
Config Config
|
||||||
|
|
4
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_types.stoneg.py
generated
vendored
4
vendor/github.com/dropbox/dropbox-sdk-go-unofficial/generator/go_types.stoneg.py
generated
vendored
|
@ -137,7 +137,9 @@ class GoTypesBackend(CodeBackend):
|
||||||
def _generate_union_helper(self, u):
|
def _generate_union_helper(self, u):
|
||||||
name = u.name
|
name = u.name
|
||||||
namespace = u.namespace
|
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():
|
if is_struct_type(u) and u.has_enumerated_subtypes():
|
||||||
name = fmt_var(name, export=False) + 'Union'
|
name = fmt_var(name, export=False) + 'Union'
|
||||||
fields = u.get_enumerated_subtypes()
|
fields = u.get_enumerated_subtypes()
|
||||||
|
|
Loading…
Add table
Reference in a new issue