Showing preview only (2,166K chars total). Download the full file or copy to clipboard to get everything.
Repository: dropbox/dropbox-sdk-go-unofficial
Branch: master
Commit: b49d68a1f14f
Files: 56
Total size: 2.1 MB
Directory structure:
gitextract_i16arub0/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── config.yml
│ │ ├── feature_request.md
│ │ └── question_help.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── codeql-analysis.yml
│ ├── lint.yml
│ └── test.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── generator/
│ ├── README.md
│ ├── generate-sdk.sh
│ ├── go_client.stoneg.py
│ ├── go_helpers.py
│ ├── go_rsrc/
│ │ └── sdk.go
│ └── go_types.stoneg.py
└── v6/
├── dropbox/
│ ├── account/
│ │ ├── client.go
│ │ └── types.go
│ ├── async/
│ │ └── types.go
│ ├── auth/
│ │ ├── client.go
│ │ ├── sdk.go
│ │ └── types.go
│ ├── check/
│ │ ├── client.go
│ │ └── types.go
│ ├── common/
│ │ └── types.go
│ ├── contacts/
│ │ ├── client.go
│ │ └── types.go
│ ├── file_properties/
│ │ ├── client.go
│ │ └── types.go
│ ├── file_requests/
│ │ ├── client.go
│ │ └── types.go
│ ├── files/
│ │ ├── client.go
│ │ └── types.go
│ ├── openid/
│ │ ├── client.go
│ │ └── types.go
│ ├── paper/
│ │ ├── client.go
│ │ └── types.go
│ ├── sdk.go
│ ├── sdk_test.go
│ ├── secondary_emails/
│ │ └── types.go
│ ├── seen_state/
│ │ └── types.go
│ ├── sharing/
│ │ ├── client.go
│ │ └── types.go
│ ├── team/
│ │ ├── client.go
│ │ └── types.go
│ ├── team_common/
│ │ └── types.go
│ ├── team_log/
│ │ ├── client.go
│ │ └── types.go
│ ├── team_policies/
│ │ └── types.go
│ ├── users/
│ │ ├── client.go
│ │ └── types.go
│ └── users_common/
│ └── types.go
├── go.mod
└── go.sum
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve the SDK
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of the bug.
**To Reproduce**
The steps to reproduce the behavior
**Expected Behavior**
A clear description of what you expected to happen.
**Actual Behavior**
A clear description of what actually happened
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Versions**
* What version of the SDK are you using?
* What version of the language are you using?
* What platform are you using? (if applicable)
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: "\U0001F680 Feature Request"
about: Suggest an idea for this SDK
title: ''
labels: enhancement
assignees: ''
---
**Why is this feature valuable to you? Does it solve a problem you're having?**
A clear and concise description of why this feature is valuable. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered. (if applicable)
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/ISSUE_TEMPLATE/question_help.md
================================================
---
name: "\U0001F4AC Questions / Help"
about: Get help with issues you are experiencing
title: ''
labels: help-wanted, question
assignees: ''
---
**Before you start**
Have you checked StackOverflow, previous issues, and Dropbox Developer Forums for help?
**What is your question?**
A clear and concise description of the question.
**Screenshots**
If applicable, add screenshots to help explain your question.
**Versions**
* What version of the SDK are you using?
* What version of the language are you using?
* What platform are you using? (if applicable)
**Additional context**
Add any other context about the question here.
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/v6" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '18 6 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
================================================
FILE: .github/workflows/lint.yml
================================================
name: Lint
on:
pull_request:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: ./v6
================================================
FILE: .github/workflows/test.yml
================================================
name: Test
on:
pull_request:
env:
GO111MODULE: "on"
jobs:
test:
strategy:
matrix:
go-version: [1.11.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Test
run: go test -race -v ./...
working-directory: ./v6
================================================
FILE: .gitignore
================================================
# jetbrains
.idea
# swap
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
# emacs backups
*~
.pyc
__pycache__
================================================
FILE: .gitmodules
================================================
[submodule "generator/dropbox-api-spec"]
path = generator/dropbox-api-spec
url = https://github.com/dropbox/dropbox-api-spec
================================================
FILE: LICENSE
================================================
Copyright (c) 2009-2016 Dropbox Inc., http://www.dropbox.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# Dropbox SDK for Go [UNOFFICIAL] [](https://pkg.go.dev/github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox) [](https://github.com/dropbox/dropbox-sdk-go-unofficial/actions) [](https://github.com/dropbox/dropbox-sdk-go-unofficial/actions)
An **UNOFFICIAL** Go SDK for integrating with the Dropbox API v2. Tested with Go 1.11+
:warning: WARNING: This SDK is **NOT yet official**. What does this mean?
* There is no formal Dropbox [support](https://www.dropbox.com/developers/support) for this SDK at this point
* Bugs may or may not get fixed
* Not all SDK features may be implemented and implemented features may be buggy or incorrect
### Uh OK, so why are you releasing this?
* the SDK, while unofficial, _is_ usable. See [dbxcli](https://github.com/dropbox/dbxcli) for an example application built using the SDK
* we would like to get feedback from the community and evaluate the level of interest/enthusiasm before investing into official supporting one more SDK
## Installation
```sh
$ go get github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/...
```
For most applications, you should just import the relevant namespace(s) only. The SDK exports the following sub-packages:
* `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth`
* `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files`
* `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/sharing`
* `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team`
* `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users`
Additionally, the base `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox` package exports some configuration and helper methods.
## Usage
First, you need to [register a new "app"](https://dropbox.com/developers/apps) to start making API requests. Once you have created an app, you can either use the SDK via an access token (useful for testing) or via the regular OAuth2 flow (recommended for production).
### Using OAuth token
Once you've created an app, you can get an access token from the app's console. Note that this token will only work for the Dropbox account the token is associated with.
```go
import "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
import "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users"
func main() {
config := dropbox.Config{
Token: token,
LogLevel: dropbox.LogInfo, // if needed, set the desired logging level. Default is off
}
dbx := users.New(config)
// start making API calls
}
```
### Using OAuth2 flow
For this, you will need your `APP_KEY` and `APP_SECRET` from the developers console. Your app will then have to take users though the oauth flow, as part of which users will explicitly grant permissions to your app. At the end of this process, users will get a token that the app can then use for subsequent authentication. See [this](https://pkg.go.dev/golang.org/x/oauth2#example-Config) for an example of oauth2 flow in Go.
Once you have the token, usage is same as above.
### Making API calls
Each Dropbox API takes in a request type and returns a response type. For instance, [/users/get_account](https://www.dropbox.com/developers/documentation/http/documentation#users-get_account) takes as input a `GetAccountArg` and returns a `BasicAccount`. The typical pattern for making API calls is:
* Instantiate the argument via the `New*` convenience functions in the SDK
* Invoke the API
* Process the response (or handle error, as below)
Here's an example:
```go
arg := users.NewGetAccountArg(accountId)
if resp, err := dbx.GetAccount(arg); err != nil {
return err
} else {
fmt.Printf("Name: %v", resp.Name)
}
```
### Error Handling
As described in the [API docs](https://www.dropbox.com/developers/documentation/http/documentation#error-handling), all HTTP errors _except_ 409 are returned as-is to the client (with a helpful text message where possible). In case of a 409, the SDK will return an endpoint-specific error as described in the API. This will be made available as `EndpointError` member in the error.
## Note on using the Teams API
To use the Team API, you will need to create a Dropbox Business App. The OAuth token from this app will _only_ work for the Team API.
Please read the [API docs](https://www.dropbox.com/developers/documentation/http/teams) carefully to appropriate secure your apps and tokens when using the Team API.
## Code Generation
This SDK is automatically generated using the public [Dropbox API spec](https://github.com/dropbox/dropbox-api-spec) and [Stone](https://github.com/dropbox/stone). See this [README](https://github.com/dropbox/dropbox-sdk-go-unofficial/blob/master/generator/README.md)
for more details on how code is generated.
## Caveats
* To re-iterate, this is an **UNOFFICIAL** SDK and thus has no official support from Dropbox
* Only supports the v2 API. Parts of the v2 API are still in beta, and thus subject to change
* This SDK itself is in beta, and so interfaces may change at any point
================================================
FILE: generator/README.md
================================================
# Dropbox Go SDK Generator
This directory contains the [Stone](https://github.com/dropbox/stone) code generators
used to programmatically generate the [Dropbox Go SDK](https://github.com/dropbox/dropbox-sdk-go).
## Requirements
* While not a hard requirement, this repo currently assumes `python3` in the path.
* Assumes you have already installed [Stone](https://github.com/dropbox/stone) and have `stone` in the path.
* Requires [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) in the path to fix up imports in the auto-generated code.
## Basic Setup
* Clone this repo
* Run `git submodule init` followed by `git submodule update`. To fetch the latest API spec, use `git submodule update --remote`
* Run `./generate-sdk.sh X.Y.Z`, where `X.Y.Z` is the desired version number, to generate code under `../vX/dropbox`
## Generated Code
### Basic Types
Here is how Stone [basic types](https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#basic-types) map to Go types:
Stone Type | Go Type
---------- | -------
Int32/Int64/UInt32/UInt64 | int32/int64/uint32/uint64
Float32/Float64 | float32/float64
Boolean | bool
String | string
Timestamp | time.Time
Void | struct{}
### Structs
Stone [structs](https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#struct) are represented as Go [structs](https://gobyexample.com/structs) in a relatively straight-forward manner. Each struct member is exported and also gets assigned the correct json tag. The latter is used for serializing requests and deserializing responses. Non-primitive types are represented as pointers to the corresponding type.
```
struct Account
"The amount of detail revealed about an account depends on the user
being queried and the user making the query."
account_id AccountId
"The user's unique Dropbox ID."
name Name
"Details of a user's name."
```
```go
// The amount of detail revealed about an account depends on the user being
// queried and the user making the query.
type Account struct {
// The user's unique Dropbox ID.
AccountId string `json:"account_id"`
// Details of a user's name.
Name *Name `json:"name"`
}
```
#### Inheritance
Stone supports [struct inheritance](https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#inheritance). In Go, we support this via [embedding](https://golang.org/doc/effective_go.html#embedding)
```
struct BasicAccount extends Account
"Basic information about any account."
is_teammate Boolean
"Whether this user is a teammate of the current user. If this account
is the current user's account, then this will be :val:`true`."
```
```go
// Basic information about any account.
type BasicAccount struct {
Account
// Whether this user is a teammate of the current user. If this account is
// the current user's account, then this will be `True`.
IsTeammate bool `json:"is_teammate"`
```
### Unions
Stone https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#union[unions] are bit more complex as Go doesn't have native support for union types (tagged or otherwise). We declare a union as a Go struct with all the possible fields as pointer types, and then use the tag value to populate the correct field during deserialization. This necessitates the use of an intermediate wrapper struct for the deserialization to work correctly, see below for a concrete example.
```
union SpaceAllocation
"Space is allocated differently based on the type of account."
individual IndividualSpaceAllocation
"The user's space allocation applies only to their individual account."
team TeamSpaceAllocation
"The user shares space with other members of their team."
```
```go
// Space is allocated differently based on the type of account.
type SpaceAllocation struct {
dropbox.Tagged
// The user's space allocation applies only to their individual account.
Individual *IndividualSpaceAllocation `json:"individual,omitempty"`
// The user shares space with other members of their team.
Team *TeamSpaceAllocation `json:"team,omitempty"`
}
// Valid tag values for `SpaceAllocation`
const (
SpaceAllocation_Individual = "individual"
SpaceAllocation_Team = "team"
SpaceAllocation_Other = "other"
)
func (u *SpaceAllocation) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// The user's space allocation applies only to their individual account.
Individual json.RawMessage `json:"individual,omitempty"`
// The user shares space with other members of their team.
Team json.RawMessage `json:"team,omitempty"`
}
var w wrap
if err := json.Unmarshal(body, &w); err != nil {
return err
}
u.Tag = w.Tag
switch u.Tag {
case "individual":
if err := json.Unmarshal(body, &u.Individual); err != nil {
return err
}
case "team":
if err := json.Unmarshal(body, &u.Team); err != nil {
return err
}
}
return nil
}
```
### Struct with Enumerated Subtypes
Per the https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#struct-polymorphism[spec], structs with enumerated subtypes are a mechanism of inheritance:
> If a struct enumerates its subtypes, an instance of any subtype will satisfy the type constraint. This is useful when wanting to discriminate amongst types that are part of the same hierarchy while simultaneously being able to avoid discriminating when accessing common fields.
To represent structs with enumerated subtypes in Go, we use a combination of Go interface types and unions as implemented above. Considering the following:
```
struct Metadata
union
file FileMetadata
folder FolderMetadata
deleted DeletedMetadata # Used by list_folder* and search
name String
path_lower String?
path_display String?
parent_shared_folder_id common.SharedFolderId?
struct FileMetadata extends Metadata
id Id
client_modified common.DropboxTimestamp
...
```
In this case, `FileMetadata`, `FolderMetadata` etc are subtypes of `Metadata`. Specifically, any subtype can be used where a parent type is expected. Thus, if `list_folder` returns a list of `Metadata`s, we should be able to parse and "upcast" to one of the enumerated subtypes.
First, we define structs to represent the base and enumerated types as we did for inherited structs above:
```go
type Metadata struct {
Name string `json:"name"`
PathLower string `json:"path_lower,omitempty"`
PathDisplay string `json:"path_display,omitempty"`
ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
}
type FileMetadata struct {
Metadata
Id string `json:"id"`
ClientModified time.Time `json:"client_modified"`
...
}
```
Next, we define an interface type with a dummy method and ensure that both the base and the subtypes implement the interface:
```go
type IsMetadata interface {
IsMetadata()
}
func (u *Metadata) IsMetadata() {} // Subtypes get this for free due to embedding
```
At this point, types or methods that accept/return a struct with enumerated subtypes can use the interface type instead. For instance:
```go
func GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error) {...}
type ListFolderResult struct {
// The files and (direct) subfolders in the folder.
Entries []IsMetadata `json:"entries"`
...
}
```
Finally, to actually deserialize a bag of bytes into the appropriate type or subtype, we use a trick similar to how we handle unions above.
```go
type metadataUnion struct {
dropbox.Tagged
File *FileMetadata `json:"file,omitempty"`
Folder *FolderMetadata `json:"folder,omitempty"`
Deleted *DeletedMetadata `json:"deleted,omitempty"`
}
func (u *metadataUnion) UnmarshalJSON(body []byte) error {...}
func (dbx *apiImpl) GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error) {
...
var tmp metadataUnion
err = json.Unmarshal(body, &tmp)
if err != nil {
return
}
switch tmp.Tag {
case "file":
res = tmp.File
case "folder":
res = tmp.Folder
case "deleted":
res = tmp.Deleted
}
}
```
================================================
FILE: generator/generate-sdk.sh
================================================
#! /usr/bin/env bash
set -euo pipefail
if [[ $# -ne 1 ]]; then
echo "$0: Expecting exactly one command-line argument, got $#." 1>&2
exit 1
fi
version=$(echo $1 | cut -f1 -d'.')
loc=$(realpath -e $0)
base_dir=$(dirname "$loc")
spec_dir="$base_dir/dropbox-api-spec"
gen_dir=$(dirname ${base_dir})/v$version/dropbox
stone -v -a :all go_types.stoneg.py "$gen_dir" "$spec_dir"/*.stone
stone -v -a :all go_client.stoneg.py "$gen_dir" "$spec_dir"/*.stone
# Update SDK and API spec versions
sdk_version=${1}
pushd ${spec_dir}
spec_version=$(git rev-parse --short HEAD)
popd
sed -i.bak -e "s/UNKNOWN SDK VERSION/${sdk_version}/" \
-e "s/UNKNOWN SPEC VERSION/${spec_version}/" ${gen_dir}/sdk.go
rm ${gen_dir}/sdk.go.bak
pushd ${gen_dir}
goimports -l -w ${gen_dir}
popd
================================================
FILE: generator/go_client.stoneg.py
================================================
import os
from stone.backend import CodeBackend
from stone.ir import (
is_void_type,
is_struct_type
)
from go_helpers import (
HEADER,
fmt_type,
fmt_var,
generate_doc,
)
class GoClientBackend(CodeBackend):
def generate(self, api):
for namespace in api.namespaces.values():
if len(namespace.routes) > 0:
self._generate_client(namespace)
def _generate_client(self, namespace):
file_name = os.path.join(self.target_folder_path, namespace.name,
'client.go')
with self.output_to_relative_path(file_name):
self.emit_raw(HEADER)
self.emit()
self.emit('package %s' % namespace.name)
self.emit()
self.emit('// Client interface describes all routes in this namespace')
with self.block('type Client interface'):
for route in namespace.routes:
generate_doc(self, route)
self.emit(self._generate_route_signature(namespace, route))
self.emit()
self.emit('type apiImpl dropbox.Context')
for route in namespace.routes:
self._generate_route(namespace, route)
self.emit('// New returns a Client implementation for this namespace')
with self.block('func New(c dropbox.Config) Client'):
self.emit('ctx := apiImpl(dropbox.NewContext(c))')
self.emit('return &ctx')
def _generate_route_signature(self, namespace, route):
req = fmt_type(route.arg_data_type, namespace)
res = fmt_type(route.result_data_type, namespace, use_interface=True)
fn = fmt_var(route.name)
if route.version != 1:
fn += 'V%d' % route.version
style = route.attrs.get('style', 'rpc')
arg = '' if is_void_type(route.arg_data_type) else 'arg {req}'
ret = '(err error)' if is_void_type(route.result_data_type) else \
'(res {res}, err error)'
signature = '{fn}(' + arg + ') ' + ret
if style == 'download':
signature = '{fn}(' + arg + \
') (res {res}, content io.ReadCloser, err error)'
elif style == 'upload':
signature = '{fn}(' + arg + ', content io.Reader) ' + ret
if is_void_type(route.arg_data_type):
signature = '{fn}(content io.Reader) ' + ret
return signature.format(fn=fn, req=req, res=res)
def _generate_route(self, namespace, route):
out = self.emit
route_name = route.name
if route.version != 1:
route_name += '_v%d' % route.version
fn = fmt_var(route.name)
if route.version != 1:
fn += 'V%d' % route.version
err = fmt_type(route.error_data_type, namespace)
out('//%sAPIError is an error-wrapper for the %s route' %
(fn, route_name))
with self.block('type {fn}APIError struct'.format(fn=fn)):
out('dropbox.APIError')
out('EndpointError {err} `json:"error"`'.format(err=err))
out()
signature = 'func (dbx *apiImpl) ' + self._generate_route_signature(
namespace, route)
with self.block(signature):
if route.deprecated is not None:
out('log.Printf("WARNING: API `%s` is deprecated")' % fn)
if route.deprecated.by is not None:
replacement_fn = fmt_var(route.deprecated.by.name)
if route.deprecated.by.version != 1:
replacement_fn += "V%d" % route.deprecated.by.version
out('log.Printf("Use API `%s` instead")' % replacement_fn)
out()
args = {
"Host": route.attrs.get('host', 'api'),
"Namespace": namespace.name,
"Route": route_name,
"Auth": route.attrs.get('auth', ''),
"Style": route.attrs.get('style', 'rpc'),
}
with self.block('req := dropbox.Request'):
for k, v in args.items():
out(k + ':"' + v + '",')
out("Arg: {arg},".format(arg="arg" if not is_void_type(route.arg_data_type) else "nil"))
out("ExtraHeaders: {headers},".format(
headers="arg.ExtraHeaders" if fmt_var(route.name) == "Download" else "nil"))
out()
out("var resp []byte")
out("var respBody io.ReadCloser")
out("resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, {body})".format(
body="content" if route.attrs.get('style', '') == 'upload' else "nil"))
with self.block("if err != nil"):
out("var appErr {fn}APIError".format(fn=fn))
out("err = {auth}ParseError(err, &appErr)".format(
auth="auth." if namespace.name != "auth" else ""))
with self.block("if err == &appErr"):
out("err = appErr")
out("return")
out()
if is_struct_type(route.result_data_type) and route.result_data_type.has_enumerated_subtypes():
out('var tmp %sUnion' % fmt_var(route.result_data_type.name, export=False))
with self.block('err = json.Unmarshal(resp, &tmp);'
'if err != nil'):
out('return')
with self.block('switch tmp.Tag'):
for t in route.result_data_type.get_enumerated_subtypes():
with self.block('case "%s":' % t.name, delim=(None, None)):
self.emit('res = tmp.%s' % fmt_var(t.name))
elif not is_void_type(route.result_data_type):
with self.block('err = json.Unmarshal(resp, &res);'
'if err != nil'):
out('return')
out()
else:
out("_ = resp")
if route.attrs.get('style', 'rpc') == "download":
out("content = respBody")
else:
out("_ = respBody")
out('return')
out()
================================================
FILE: generator/go_helpers.py
================================================
from stone.ir import (ApiNamespace, ApiRoute)
from stone.ir import (
Boolean,
Float32,
Float64,
Int32,
Int64,
String,
Timestamp,
UInt32,
UInt64,
unwrap_nullable,
is_composite_type,
is_list_type,
is_map_type,
is_struct_type,
Void,
)
from stone.backends import helpers
HEADER = """\
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
"""
_reserved_keywords = {
'break', 'default', 'func', 'interface', 'select',
'case', 'defer', 'go', 'map', 'struct',
'chan', 'else', 'goto', 'package', 'switch',
'const', 'fallthrough', 'if', 'range', 'type',
'continue', 'for', 'import', 'return', 'var',
}
_type_table = {
UInt64: 'uint64',
Int64: 'int64',
UInt32: 'uint32',
Int32: 'int32',
Float64: 'float64',
Float32: 'float32',
Boolean: 'bool',
String: 'string',
Timestamp: 'time.Time',
Void: 'struct{}',
}
def _rename_if_reserved(s):
if s in _reserved_keywords:
return s + '_'
else:
return s
def fmt_type(data_type, namespace=None, use_interface=False, raw=False):
data_type, nullable = unwrap_nullable(data_type)
if is_list_type(data_type):
if raw and not _needs_base_type(data_type.data_type):
return "json.RawMessage"
return '[]%s' % fmt_type(data_type.data_type, namespace, use_interface, raw)
if is_map_type(data_type):
if raw and not _needs_base_type(data_type.data_type):
return "json.RawMessage"
return 'map[string]%s' % fmt_type(data_type.value_data_type, namespace, use_interface, raw)
if raw:
return "json.RawMessage"
type_name = data_type.name
if use_interface and _needs_base_type(data_type):
type_name = 'Is' + type_name
if is_composite_type(data_type) and namespace is not None and \
namespace.name != data_type.namespace.name:
type_name = data_type.namespace.name + '.' + type_name
if use_interface and _needs_base_type(data_type):
return _type_table.get(data_type.__class__, type_name)
else:
if data_type.__class__ not in _type_table:
return '*' + type_name
if data_type.__class__ == Timestamp:
# For other primitive types, `omitempty` does the job.
return ('*' if nullable else '') + _type_table[data_type.__class__]
return _type_table[data_type.__class__]
def fmt_var(name, export=True, check_reserved=False):
s = helpers.fmt_pascal(name) if export else helpers.fmt_camel(name)
return _rename_if_reserved(s) if check_reserved else s
def _doc_handler(tag, val):
if tag == 'type':
return '`{}`'.format(val)
elif tag == 'route':
return '`{}`'.format(helpers.fmt_camel(val))
elif tag == 'link':
anchor, link = val.rsplit(' ', 1)
return '`{}` <{}>'.format(anchor, link)
elif tag == 'val':
if val == 'null':
return 'nil'
else:
return val
elif tag == 'field':
return '`{}`'.format(val)
else:
raise RuntimeError('Unknown doc ref tag %r' % tag)
def generate_doc(code_generator, t):
doc = t.doc
if doc is None:
doc = 'has no documentation (yet)'
doc = code_generator.process_doc(doc, _doc_handler)
d = '%s : %s' % (fmt_var(t.name), doc)
if isinstance(t, ApiNamespace):
d = 'Package %s : %s' % (t.name, doc)
code_generator.emit_wrapped_text(d, prefix='// ')
# Generate comment for deprecated routes
if isinstance(t, ApiRoute):
if t.deprecated is not None:
d = 'Deprecated: '
if t.deprecated.by is not None:
deprecated_by = t.deprecated.by
fn = fmt_var(deprecated_by.name)
if deprecated_by.version != 1:
fn += 'V%d' % deprecated_by.version
d += 'Use `%s` instead' % fn
code_generator.emit_wrapped_text(d, prefix='// ')
def _needs_base_type(data_type):
data_type, _ = unwrap_nullable(data_type)
if is_struct_type(data_type) and data_type.has_enumerated_subtypes():
return True
if is_list_type(data_type):
return _needs_base_type(data_type.data_type)
if is_map_type(data_type):
return _needs_base_type(data_type.value_data_type)
return False
def needs_base_type(struct):
for field in struct.fields:
if _needs_base_type(field.data_type):
return True
return False
================================================
FILE: generator/go_rsrc/sdk.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package dropbox
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"strings"
"golang.org/x/oauth2"
)
const (
apiVersion = 2
defaultDomain = ".dropboxapi.com"
hostAPI = "api"
hostContent = "content"
hostNotify = "notify"
sdkVersion = "UNKNOWN SDK VERSION"
specVersion = "UNKNOWN SPEC VERSION"
)
// Version returns the current SDK version and API Spec version
func Version() (string, string) {
return sdkVersion, specVersion
}
// Tagged is used for tagged unions.
type Tagged struct {
Tag string `json:".tag"`
}
// APIError is the base type for endpoint-specific errors.
type APIError struct {
ErrorSummary string `json:"error_summary"`
}
func (e APIError) Error() string {
return e.ErrorSummary
}
type SDKInternalError struct {
StatusCode int
Content string
}
func (e SDKInternalError) Error() string {
return fmt.Sprintf("Unexpected error: %v (code: %v)", e.Content, e.StatusCode)
}
// Config contains parameters for configuring the SDK.
type Config struct {
// OAuth2 access token
Token string
// Logging level for SDK generated logs
LogLevel LogLevel
// Logging target for verbose SDK logging
Logger *log.Logger
// Used with APIs that support operations as another user
AsMemberID string
// Used with APIs that support operations as an admin
AsAdminID string
// Path relative to which action should be taken
PathRoot string
// No need to set -- for testing only
Domain string
// No need to set -- for testing only
Client *http.Client
// No need to set -- for testing only
HeaderGenerator func(hostType string, namespace string, route string) map[string]string
// No need to set -- for testing only
URLGenerator func(hostType string, namespace string, route string) string
}
// LogLevel defines a type that can set the desired level of logging the SDK will generate.
type LogLevel uint
const (
// LogOff will disable all SDK logging. This is the default log level
LogOff LogLevel = iota * (1 << 8)
// LogDebug will enable detailed SDK debug logs. It will log requests (including arguments),
// response and body contents.
LogDebug
// LogInfo will log SDK request (not including arguments) and responses.
LogInfo
)
func (l LogLevel) shouldLog(v LogLevel) bool {
return l > v || l&v == v
}
func (c *Config) doLog(l LogLevel, format string, v ...interface{}) {
if !c.LogLevel.shouldLog(l) {
return
}
if c.Logger != nil {
c.Logger.Printf(format, v...)
} else {
log.Printf(format, v...)
}
}
// 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...)
}
// Ergonomic methods to set namespace relative to which action should be taken
func (c Config) WithNamespaceID(nsID string) Config {
c.PathRoot = fmt.Sprintf(`{".tag": "namespace_id", "namespace_id": "%s"}`, nsID)
return c
}
func (c Config) WithRoot(nsID string) Config {
c.PathRoot = fmt.Sprintf(`{".tag": "root", "root": "%s"}`, nsID)
return c
}
// Context is the base client context used to implement per-namespace clients.
type Context struct {
Config Config
Client *http.Client
NoAuthClient *http.Client
HeaderGenerator func(hostType string, namespace string, route string) map[string]string
URLGenerator func(hostType string, namespace string, route string) string
}
type Request struct {
Host string
Namespace string
Route string
Style string
Auth string
Arg interface{}
ExtraHeaders map[string]string
}
func (c *Context) Execute(req Request, body io.Reader) ([]byte, io.ReadCloser, error) {
url := c.URLGenerator(req.Host, req.Namespace, req.Route)
httpReq, err := http.NewRequest("POST", url, body)
if err != nil {
return nil, nil, err
}
for k, v := range req.ExtraHeaders {
httpReq.Header.Add(k, v)
}
for k, v := range c.HeaderGenerator(req.Host, req.Namespace, req.Route) {
httpReq.Header.Add(k, v)
}
if httpReq.Header.Get("Host") != "" {
httpReq.Host = httpReq.Header.Get("Host")
}
if req.Auth == "noauth" {
httpReq.Header.Del("Authorization")
}
if req.Auth != "team" && c.Config.AsMemberID != "" {
httpReq.Header.Add("Dropbox-API-Select-User", c.Config.AsMemberID)
}
if req.Auth != "team" && c.Config.AsAdminID != "" {
httpReq.Header.Add("Dropbox-API-Select-Admin", c.Config.AsAdminID)
}
if c.Config.PathRoot != "" {
httpReq.Header.Add("Dropbox-API-Path-Root", c.Config.PathRoot)
}
if req.Arg != nil {
serializedArg, err := json.Marshal(req.Arg)
if err != nil {
return nil, nil, err
}
switch req.Style {
case "rpc":
if body != nil {
return nil, nil, errors.New("RPC style requests can not have body")
}
httpReq.Header.Set("Content-Type", "application/json")
httpReq.Body = ioutil.NopCloser(bytes.NewReader(serializedArg))
httpReq.ContentLength = int64(len(serializedArg))
case "upload", "download":
httpReq.Header.Set("Dropbox-API-Arg", string(serializedArg))
httpReq.Header.Set("Content-Type", "application/octet-stream")
}
}
client := c.Client
if req.Auth == "noauth" {
client = c.NoAuthClient
}
resp, err := client.Do(httpReq)
if err != nil {
return nil, nil, err
}
if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusPartialContent {
switch req.Style {
case "rpc", "upload":
if resp.Body == nil {
return nil, nil, errors.New("Expected body in RPC response, got nil")
}
b, err := ioutil.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
return nil, nil, err
}
return b, nil, nil
case "download":
b := []byte(resp.Header.Get("Dropbox-API-Result"))
return b, resp.Body, nil
}
}
b, err := ioutil.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
return nil, nil, err
}
return nil, nil, SDKInternalError{
StatusCode: resp.StatusCode,
Content: string(b),
}
}
// NewContext returns a new Context with the given Config.
func NewContext(c Config) Context {
domain := c.Domain
if domain == "" {
domain = defaultDomain
}
client := c.Client
if client == nil {
var conf = &oauth2.Config{Endpoint: OAuthEndpoint(domain)}
tok := &oauth2.Token{AccessToken: c.Token}
client = conf.Client(context.Background(), tok)
}
noAuthClient := c.Client
if noAuthClient == nil {
noAuthClient = &http.Client{}
}
headerGenerator := c.HeaderGenerator
if headerGenerator == nil {
headerGenerator = func(hostType string, namespace string, route string) map[string]string {
return map[string]string{}
}
}
urlGenerator := c.URLGenerator
if urlGenerator == nil {
hostMap := map[string]string{
hostAPI: hostAPI + domain,
hostContent: hostContent + domain,
hostNotify: hostNotify + domain,
}
urlGenerator = func(hostType string, namespace string, route string) string {
fqHost := hostMap[hostType]
return fmt.Sprintf("https://%s/%d/%s/%s", fqHost, apiVersion, namespace, route)
}
}
return Context{c, client, noAuthClient, headerGenerator, urlGenerator}
}
// OAuthEndpoint constructs an `oauth2.Endpoint` for the given domain
func OAuthEndpoint(domain string) oauth2.Endpoint {
if domain == "" {
domain = defaultDomain
}
authURL := fmt.Sprintf("https://meta%s/1/oauth2/authorize", domain)
tokenURL := fmt.Sprintf("https://api%s/1/oauth2/token", domain)
if domain == defaultDomain {
authURL = "https://www.dropbox.com/1/oauth2/authorize"
}
return oauth2.Endpoint{AuthURL: authURL, TokenURL: tokenURL}
}
// HTTPHeaderSafeJSON encode the JSON passed in b []byte passed in in
// a way that is suitable for HTTP headers.
//
// See: https://www.dropbox.com/developers/reference/json-encoding
func HTTPHeaderSafeJSON(b []byte) string {
var s strings.Builder
s.Grow(len(b))
for _, r := range string(b) {
if r >= 0x007f {
fmt.Fprintf(&s, "\\u%04x", r)
} else {
s.WriteRune(r)
}
}
return s.String()
}
================================================
FILE: generator/go_types.stoneg.py
================================================
import os
import shutil
from stone.backend import CodeBackend
from stone.ir import (
is_boolean_type,
is_list_type,
is_nullable_type,
is_primitive_type,
is_string_type,
is_struct_type,
is_union_type,
is_void_type,
)
from go_helpers import (
HEADER,
fmt_type,
fmt_var,
generate_doc,
needs_base_type,
_needs_base_type
)
class GoTypesBackend(CodeBackend):
def generate(self, api):
rsrc_folder = os.path.join(os.path.dirname(__file__), 'go_rsrc')
shutil.copy(os.path.join(rsrc_folder, 'sdk.go'),
self.target_folder_path)
for namespace in api.namespaces.values():
self._generate_namespace(namespace)
def _generate_namespace(self, namespace):
file_name = os.path.join(self.target_folder_path, namespace.name,
'types.go')
with self.output_to_relative_path(file_name):
self.emit_raw(HEADER)
self.emit()
generate_doc(self, namespace)
self.emit('package %s' % namespace.name)
self.emit()
for data_type in namespace.linearize_data_types():
self._generate_data_type(data_type)
def _generate_data_type(self, data_type):
generate_doc(self, data_type)
if is_struct_type(data_type):
self._generate_struct(data_type)
if data_type.has_enumerated_subtypes():
self._generate_base_type(data_type)
elif is_union_type(data_type):
self._generate_union(data_type)
else:
self.logger.info("Unhandled data type", data_type)
def _generate_base_type(self, base):
t = fmt_type(base).lstrip('*')
self.emit('// Is{0} is the interface type for {0} and its subtypes'.format(t))
with self.block('type Is%s interface' % t):
self.emit('Is%s()' % t)
self.emit()
self.emit('// Is{0} implements the Is{0} interface'.format(t))
self.emit("func (u *{0}) Is{0}() {{}}".format(t))
self.emit()
self._generate_union_helper(base)
self.emit("// Is{0}FromJSON converts JSON to a concrete Is{0} instance".format(t))
with self.block("func Is{0}FromJSON(data []byte) (Is{0}, error)".format(t)):
name = fmt_var(t, export=False) + 'Union'
self.emit("var t {0}".format(name))
with self.block("if err := json.Unmarshal(data, &t); err != nil"):
self.emit("return nil, err")
with self.block("switch t.Tag"):
fields = base.get_enumerated_subtypes()
for field in fields:
with self.block('case "%s":' % field.name, delim=(None, None)):
self.emit("return t.{0}, nil".format(fmt_var(field.name)))
# FIX THIS
self.emit("return nil, nil")
def _generate_struct(self, struct):
with self.block('type %s struct' % struct.name):
if struct.parent_type:
self.emit(fmt_type(struct.parent_type, struct.namespace).lstrip('*'))
for field in struct.fields:
self._generate_field(field, namespace=struct.namespace)
if struct.name in ('DownloadArg',):
self.emit('// ExtraHeaders can be used to pass Range, If-None-Match headers')
self.emit('ExtraHeaders map[string]string `json:"-"`')
self._generate_struct_builder(struct)
self.emit()
if needs_base_type(struct):
self.emit('// UnmarshalJSON deserializes into a %s instance' % struct.name)
with self.block('func (u *%s) UnmarshalJSON(b []byte) error' % struct.name):
with self.block('type wrap struct'):
for field in struct.all_fields:
self._generate_field(field, namespace=struct.namespace,
raw=_needs_base_type(field.data_type))
self.emit('var w wrap')
with self.block('if err := json.Unmarshal(b, &w); err != nil'):
self.emit('return err')
for field in struct.all_fields:
dt = field.data_type
fn = fmt_var(field.name)
tn = fmt_type(dt, namespace=struct.namespace, use_interface=True)
if _needs_base_type(dt):
if is_list_type(dt):
self.emit("u.{0} = make({1}, len(w.{0}))".format(fn, tn))
# Grab the underlying type to get the correct Is...FromJSON method
tn = fmt_type(dt.data_type, namespace=struct.namespace, use_interface=True)
with self.block("for i, e := range w.{0}".format(fn)):
self.emit("v, err := {1}FromJSON(e)".format(fn, tn))
with self.block('if err != nil'):
self.emit('return err')
self.emit("u.{0}[i] = v".format(fn))
else:
self.emit("{0}, err := {1}FromJSON(w.{0})".format(fn, tn))
with self.block('if err != nil'):
self.emit('return err')
self.emit("u.{0} = {0}".format(fn))
else:
self.emit("u.{0} = w.{0}".format(fn))
self.emit('return nil')
def _generate_struct_builder(self, struct):
fields = ["%s %s" % (fmt_var(field.name),
fmt_type(field.data_type, struct.namespace,
use_interface=True))
for field in struct.all_required_fields]
self.emit('// New{0} returns a new {0} instance'.format(struct.name))
signature = "func New{0}({1}) *{0}".format(struct.name, ', '.join(fields))
with self.block(signature):
self.emit('s := new({0})'.format(struct.name))
for field in struct.all_required_fields:
field_name = fmt_var(field.name)
self.emit("s.{0} = {0}".format(field_name))
for field in struct.all_optional_fields:
if field.has_default:
if is_primitive_type(field.data_type):
default = field.default
if is_boolean_type(field.data_type):
default = str(default).lower()
if is_string_type(field.data_type):
default = '"{}"'.format(default)
self.emit('s.{0} = {1}'.format(fmt_var(field.name), default))
elif is_union_type(field.data_type):
self.emit('s.%s = &%s{Tagged:dropbox.Tagged{Tag: "%s"}}' %
(fmt_var(field.name),
fmt_type(field.data_type, struct.namespace).lstrip('*'),
field.default.tag_name))
self.emit('return s')
self.emit()
def _generate_field(self, field, union_field=False, namespace=None, raw=False):
generate_doc(self, field)
field_name = fmt_var(field.name)
type_name = fmt_type(field.data_type, namespace, use_interface=True, raw=raw)
json_tag = '`json:"%s"`' % field.name
if is_nullable_type(field.data_type) or union_field:
json_tag = '`json:"%s,omitempty"`' % field.name
self.emit('%s %s %s' % (field_name, type_name, json_tag))
def _generate_union(self, union):
self._generate_union_helper(union)
def _generate_union_helper(self, u):
name = u.name
namespace = u.namespace
# Unions can be inherited, but don't need to be polymorphic.
# So let's flatten out all the inherited fields.
fields = u.all_fields
if is_struct_type(u) and u.has_enumerated_subtypes():
name = fmt_var(name, export=False) + 'Union'
fields = u.get_enumerated_subtypes()
with self.block('type %s struct' % name):
self.emit('dropbox.Tagged')
for field in fields:
if is_void_type(field.data_type):
continue
self._generate_field(field, union_field=True,
namespace=namespace)
self.emit()
self.emit('// Valid tag values for %s' % fmt_var(u.name))
with self.block('const', delim=('(', ')')):
for field in fields:
self.emit('%s%s = "%s"' % (fmt_var(u.name), fmt_var(field.name), field.name))
self.emit()
num_void_fields = sum([is_void_type(f.data_type) for f in fields])
# Simple structure, no need in UnmarshalJSON
if len(fields) == num_void_fields:
return
self.emit('// UnmarshalJSON deserializes into a %s instance' % name)
with self.block('func (u *%s) UnmarshalJSON(body []byte) error' % name):
with self.block('type wrap struct'):
self.emit('dropbox.Tagged')
for field in fields:
if is_void_type(field.data_type) or (
is_struct_type(field.data_type) and not _needs_base_type(field.data_type)):
# pure structures are flattened in the containing union json blob and thus are loaded from body
continue
# sub-unions must be handled as RawMessage, which will be loaded into correct implementation later
self._generate_field(field, union_field=True,
namespace=namespace, raw=_needs_base_type(field.data_type))
self.emit('var w wrap')
self.emit('var err error')
with self.block('if err = json.Unmarshal(body, &w); err != nil'):
self.emit('return err')
self.emit('u.Tag = w.Tag')
with self.block('switch u.Tag'):
for field in fields:
if is_void_type(field.data_type):
continue
field_name = fmt_var(field.name)
with self.block('case "%s":' % field.name, delim=(None, None)):
if _needs_base_type(field.data_type):
with self.block("if u.{0}, err = Is{1}FromJSON(w.{0}); err != nil"
.format(field_name, field.data_type.name)):
self.emit("return err")
elif is_struct_type(field.data_type):
with self.block('if err = json.Unmarshal(body, &u.{0}); err != nil'
.format(field_name)):
self.emit("return err")
else:
self.emit('u.{0} = w.{0}'.format(field_name))
self.emit('return nil')
self.emit()
================================================
FILE: v6/dropbox/account/client.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package account
import (
"encoding/json"
"io"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)
// Client interface describes all routes in this namespace
type Client interface {
// SetProfilePhoto : Sets a user's profile photo.
SetProfilePhoto(arg *SetProfilePhotoArg) (res *SetProfilePhotoResult, err error)
}
type apiImpl dropbox.Context
//SetProfilePhotoAPIError is an error-wrapper for the set_profile_photo route
type SetProfilePhotoAPIError struct {
dropbox.APIError
EndpointError *SetProfilePhotoError `json:"error"`
}
func (dbx *apiImpl) SetProfilePhoto(arg *SetProfilePhotoArg) (res *SetProfilePhotoResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "account",
Route: "set_profile_photo",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr SetProfilePhotoAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
// New returns a Client implementation for this namespace
func New(c dropbox.Config) Client {
ctx := apiImpl(dropbox.NewContext(c))
return &ctx
}
================================================
FILE: v6/dropbox/account/types.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package account : has no documentation (yet)
package account
import (
"encoding/json"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)
// PhotoSourceArg : has no documentation (yet)
type PhotoSourceArg struct {
dropbox.Tagged
// Base64Data : Image data in base64-encoded bytes.
Base64Data string `json:"base64_data,omitempty"`
}
// Valid tag values for PhotoSourceArg
const (
PhotoSourceArgBase64Data = "base64_data"
PhotoSourceArgOther = "other"
)
// UnmarshalJSON deserializes into a PhotoSourceArg instance
func (u *PhotoSourceArg) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// Base64Data : Image data in base64-encoded bytes.
Base64Data string `json:"base64_data,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 "base64_data":
u.Base64Data = w.Base64Data
}
return nil
}
// SetProfilePhotoArg : has no documentation (yet)
type SetProfilePhotoArg struct {
// Photo : Image to set as the user's new profile photo.
Photo *PhotoSourceArg `json:"photo"`
}
// NewSetProfilePhotoArg returns a new SetProfilePhotoArg instance
func NewSetProfilePhotoArg(Photo *PhotoSourceArg) *SetProfilePhotoArg {
s := new(SetProfilePhotoArg)
s.Photo = Photo
return s
}
// SetProfilePhotoError : has no documentation (yet)
type SetProfilePhotoError struct {
dropbox.Tagged
}
// Valid tag values for SetProfilePhotoError
const (
SetProfilePhotoErrorFileTypeError = "file_type_error"
SetProfilePhotoErrorFileSizeError = "file_size_error"
SetProfilePhotoErrorDimensionError = "dimension_error"
SetProfilePhotoErrorThumbnailError = "thumbnail_error"
SetProfilePhotoErrorTransientError = "transient_error"
SetProfilePhotoErrorOther = "other"
)
// SetProfilePhotoResult : has no documentation (yet)
type SetProfilePhotoResult struct {
// ProfilePhotoUrl : URL for the photo representing the user, if one is set.
ProfilePhotoUrl string `json:"profile_photo_url"`
}
// NewSetProfilePhotoResult returns a new SetProfilePhotoResult instance
func NewSetProfilePhotoResult(ProfilePhotoUrl string) *SetProfilePhotoResult {
s := new(SetProfilePhotoResult)
s.ProfilePhotoUrl = ProfilePhotoUrl
return s
}
================================================
FILE: v6/dropbox/async/types.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package async : has no documentation (yet)
package async
import (
"encoding/json"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)
// LaunchResultBase : Result returned by methods that launch an asynchronous
// job. A method who may either launch an asynchronous job, or complete the
// request synchronously, can use this union by extending it, and adding a
// 'complete' field with the type of the synchronous response. See
// `LaunchEmptyResult` for an example.
type LaunchResultBase struct {
dropbox.Tagged
// AsyncJobId : This response indicates that the processing is asynchronous.
// The string is an id that can be used to obtain the status of the
// asynchronous job.
AsyncJobId string `json:"async_job_id,omitempty"`
}
// Valid tag values for LaunchResultBase
const (
LaunchResultBaseAsyncJobId = "async_job_id"
)
// UnmarshalJSON deserializes into a LaunchResultBase instance
func (u *LaunchResultBase) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// AsyncJobId : This response indicates that the processing is
// asynchronous. The string is an id that can be used to obtain the
// status of the asynchronous job.
AsyncJobId string `json:"async_job_id,omitempty"`
}
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":
u.AsyncJobId = w.AsyncJobId
}
return nil
}
// LaunchEmptyResult : Result returned by methods that may either launch an
// asynchronous job or complete synchronously. Upon synchronous completion of
// the job, no additional information is returned.
type LaunchEmptyResult struct {
dropbox.Tagged
// AsyncJobId : This response indicates that the processing is asynchronous.
// The string is an id that can be used to obtain the status of the
// asynchronous job.
AsyncJobId string `json:"async_job_id,omitempty"`
}
// Valid tag values for LaunchEmptyResult
const (
LaunchEmptyResultAsyncJobId = "async_job_id"
LaunchEmptyResultComplete = "complete"
)
// UnmarshalJSON deserializes into a LaunchEmptyResult instance
func (u *LaunchEmptyResult) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// AsyncJobId : This response indicates that the processing is
// asynchronous. The string is an id that can be used to obtain the
// status of the asynchronous job.
AsyncJobId string `json:"async_job_id,omitempty"`
}
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":
u.AsyncJobId = w.AsyncJobId
}
return nil
}
// PollArg : Arguments for methods that poll the status of an asynchronous job.
type PollArg struct {
// AsyncJobId : Id of the asynchronous job. This is the value of a response
// returned from the method that launched the job.
AsyncJobId string `json:"async_job_id"`
}
// NewPollArg returns a new PollArg instance
func NewPollArg(AsyncJobId string) *PollArg {
s := new(PollArg)
s.AsyncJobId = AsyncJobId
return s
}
// PollResultBase : Result returned by methods that poll for the status of an
// asynchronous job. Unions that extend this union should add a 'complete' field
// with a type of the information returned upon job completion. See
// `PollEmptyResult` for an example.
type PollResultBase struct {
dropbox.Tagged
}
// Valid tag values for PollResultBase
const (
PollResultBaseInProgress = "in_progress"
)
// PollEmptyResult : Result returned by methods that poll for the status of an
// asynchronous job. Upon completion of the job, no additional information is
// returned.
type PollEmptyResult struct {
dropbox.Tagged
}
// Valid tag values for PollEmptyResult
const (
PollEmptyResultInProgress = "in_progress"
PollEmptyResultComplete = "complete"
)
// PollError : Error returned by methods for polling the status of asynchronous
// job.
type PollError struct {
dropbox.Tagged
}
// Valid tag values for PollError
const (
PollErrorInvalidAsyncJobId = "invalid_async_job_id"
PollErrorInternalError = "internal_error"
PollErrorOther = "other"
)
================================================
FILE: v6/dropbox/auth/client.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package auth
import (
"encoding/json"
"io"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)
// Client interface describes all routes in this namespace
type Client interface {
// TokenFromOauth1 : Creates an OAuth 2.0 access token from the supplied
// OAuth 1.0 access token.
TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error)
// TokenRevoke : Disables the access token used to authenticate the call. If
// there is a corresponding refresh token for the access token, this
// disables that refresh token, as well as any other access tokens for that
// refresh token.
TokenRevoke() (err error)
}
type apiImpl dropbox.Context
//TokenFromOauth1APIError is an error-wrapper for the token/from_oauth1 route
type TokenFromOauth1APIError struct {
dropbox.APIError
EndpointError *TokenFromOAuth1Error `json:"error"`
}
func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "auth",
Route: "token/from_oauth1",
Auth: "app",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TokenFromOauth1APIError
err = ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//TokenRevokeAPIError is an error-wrapper for the token/revoke route
type TokenRevokeAPIError struct {
dropbox.APIError
EndpointError struct{} `json:"error"`
}
func (dbx *apiImpl) TokenRevoke() (err error) {
req := dropbox.Request{
Host: "api",
Namespace: "auth",
Route: "token/revoke",
Auth: "user",
Style: "rpc",
Arg: nil,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TokenRevokeAPIError
err = ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
_ = resp
_ = respBody
return
}
// New returns a Client implementation for this namespace
func New(c dropbox.Config) Client {
ctx := apiImpl(dropbox.NewContext(c))
return &ctx
}
================================================
FILE: v6/dropbox/auth/sdk.go
================================================
package auth
import (
"encoding/json"
"net/http"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)
// AuthAPIError wraps AuthError
type AuthAPIError struct {
dropbox.APIError
AuthError *AuthError `json:"error"`
}
// AccessAPIError wraps AccessError
type AccessAPIError struct {
dropbox.APIError
AccessError *AccessError `json:"error"`
}
// RateLimitAPIError wraps RateLimitError
type RateLimitAPIError struct {
dropbox.APIError
RateLimitError *RateLimitError `json:"error"`
}
// Bad input parameter.
type BadRequest struct {
dropbox.APIError
}
// An error occurred on the Dropbox servers. Check status.dropbox.com for announcements about
// Dropbox service issues.
type ServerError struct {
dropbox.APIError
StatusCode int
}
func ParseError(err error, appError error) error {
sdkErr, ok := err.(dropbox.SDKInternalError)
if !ok {
return err
}
if sdkErr.StatusCode >= 500 && sdkErr.StatusCode <= 599 {
return ServerError{
APIError: dropbox.APIError{
ErrorSummary: sdkErr.Content,
},
}
}
switch sdkErr.StatusCode {
case http.StatusBadRequest:
return BadRequest{
APIError: dropbox.APIError{
ErrorSummary: sdkErr.Content,
},
}
case http.StatusUnauthorized:
var apiError AuthAPIError
if pErr := json.Unmarshal([]byte(sdkErr.Content), &apiError); pErr != nil {
return pErr
}
return apiError
case http.StatusForbidden:
var apiError AccessAPIError
if pErr := json.Unmarshal([]byte(sdkErr.Content), &apiError); pErr != nil {
return pErr
}
return apiError
case http.StatusTooManyRequests:
var apiError RateLimitAPIError
if pErr := json.Unmarshal([]byte(sdkErr.Content), &apiError); pErr != nil {
return pErr
}
return apiError
case http.StatusConflict:
if pErr := json.Unmarshal([]byte(sdkErr.Content), appError); pErr != nil {
return pErr
}
return appError
}
return err
}
================================================
FILE: v6/dropbox/auth/types.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package auth : has no documentation (yet)
package auth
import (
"encoding/json"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)
// AccessError : Error occurred because the account doesn't have permission to
// access the resource.
type AccessError struct {
dropbox.Tagged
// InvalidAccountType : Current account type cannot access the resource.
InvalidAccountType *InvalidAccountTypeError `json:"invalid_account_type,omitempty"`
// PaperAccessDenied : Current account cannot access Paper.
PaperAccessDenied *PaperAccessError `json:"paper_access_denied,omitempty"`
}
// Valid tag values for AccessError
const (
AccessErrorInvalidAccountType = "invalid_account_type"
AccessErrorPaperAccessDenied = "paper_access_denied"
AccessErrorOther = "other"
)
// UnmarshalJSON deserializes into a AccessError instance
func (u *AccessError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// InvalidAccountType : Current account type cannot access the resource.
InvalidAccountType *InvalidAccountTypeError `json:"invalid_account_type,omitempty"`
// PaperAccessDenied : Current account cannot access Paper.
PaperAccessDenied *PaperAccessError `json:"paper_access_denied,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 "invalid_account_type":
u.InvalidAccountType = w.InvalidAccountType
case "paper_access_denied":
u.PaperAccessDenied = w.PaperAccessDenied
}
return nil
}
// AuthError : Errors occurred during authentication.
type AuthError struct {
dropbox.Tagged
// MissingScope : The access token does not have the required scope to
// access the route.
MissingScope *TokenScopeError `json:"missing_scope,omitempty"`
}
// Valid tag values for AuthError
const (
AuthErrorInvalidAccessToken = "invalid_access_token"
AuthErrorInvalidSelectUser = "invalid_select_user"
AuthErrorInvalidSelectAdmin = "invalid_select_admin"
AuthErrorUserSuspended = "user_suspended"
AuthErrorExpiredAccessToken = "expired_access_token"
AuthErrorMissingScope = "missing_scope"
AuthErrorRouteAccessDenied = "route_access_denied"
AuthErrorOther = "other"
)
// UnmarshalJSON deserializes into a AuthError instance
func (u *AuthError) 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 "missing_scope":
if err = json.Unmarshal(body, &u.MissingScope); err != nil {
return err
}
}
return nil
}
// InvalidAccountTypeError : has no documentation (yet)
type InvalidAccountTypeError struct {
dropbox.Tagged
}
// Valid tag values for InvalidAccountTypeError
const (
InvalidAccountTypeErrorEndpoint = "endpoint"
InvalidAccountTypeErrorFeature = "feature"
InvalidAccountTypeErrorOther = "other"
)
// PaperAccessError : has no documentation (yet)
type PaperAccessError struct {
dropbox.Tagged
}
// Valid tag values for PaperAccessError
const (
PaperAccessErrorPaperDisabled = "paper_disabled"
PaperAccessErrorNotPaperUser = "not_paper_user"
PaperAccessErrorOther = "other"
)
// RateLimitError : Error occurred because the app is being rate limited.
type RateLimitError struct {
// Reason : The reason why the app is being rate limited.
Reason *RateLimitReason `json:"reason"`
// RetryAfter : The number of seconds that the app should wait before making
// another request.
RetryAfter uint64 `json:"retry_after"`
}
// NewRateLimitError returns a new RateLimitError instance
func NewRateLimitError(Reason *RateLimitReason) *RateLimitError {
s := new(RateLimitError)
s.Reason = Reason
s.RetryAfter = 1
return s
}
// RateLimitReason : has no documentation (yet)
type RateLimitReason struct {
dropbox.Tagged
}
// Valid tag values for RateLimitReason
const (
RateLimitReasonTooManyRequests = "too_many_requests"
RateLimitReasonTooManyWriteOperations = "too_many_write_operations"
RateLimitReasonOther = "other"
)
// TokenFromOAuth1Arg : has no documentation (yet)
type TokenFromOAuth1Arg struct {
// Oauth1Token : The supplied OAuth 1.0 access token.
Oauth1Token string `json:"oauth1_token"`
// Oauth1TokenSecret : The token secret associated with the supplied access
// token.
Oauth1TokenSecret string `json:"oauth1_token_secret"`
}
// NewTokenFromOAuth1Arg returns a new TokenFromOAuth1Arg instance
func NewTokenFromOAuth1Arg(Oauth1Token string, Oauth1TokenSecret string) *TokenFromOAuth1Arg {
s := new(TokenFromOAuth1Arg)
s.Oauth1Token = Oauth1Token
s.Oauth1TokenSecret = Oauth1TokenSecret
return s
}
// TokenFromOAuth1Error : has no documentation (yet)
type TokenFromOAuth1Error struct {
dropbox.Tagged
}
// Valid tag values for TokenFromOAuth1Error
const (
TokenFromOAuth1ErrorInvalidOauth1TokenInfo = "invalid_oauth1_token_info"
TokenFromOAuth1ErrorAppIdMismatch = "app_id_mismatch"
TokenFromOAuth1ErrorOther = "other"
)
// TokenFromOAuth1Result : has no documentation (yet)
type TokenFromOAuth1Result struct {
// Oauth2Token : The OAuth 2.0 token generated from the supplied OAuth 1.0
// token.
Oauth2Token string `json:"oauth2_token"`
}
// NewTokenFromOAuth1Result returns a new TokenFromOAuth1Result instance
func NewTokenFromOAuth1Result(Oauth2Token string) *TokenFromOAuth1Result {
s := new(TokenFromOAuth1Result)
s.Oauth2Token = Oauth2Token
return s
}
// TokenScopeError : has no documentation (yet)
type TokenScopeError struct {
// RequiredScope : The required scope to access the route.
RequiredScope string `json:"required_scope"`
}
// NewTokenScopeError returns a new TokenScopeError instance
func NewTokenScopeError(RequiredScope string) *TokenScopeError {
s := new(TokenScopeError)
s.RequiredScope = RequiredScope
return s
}
================================================
FILE: v6/dropbox/check/client.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package check
import (
"encoding/json"
"io"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)
// Client interface describes all routes in this namespace
type Client interface {
// App : This endpoint performs App Authentication, validating the supplied
// app key and secret, and returns the supplied string, to allow you to test
// your code and connection to the Dropbox API. It has no other effect. If
// you receive an HTTP 200 response with the supplied query, it indicates at
// least part of the Dropbox API infrastructure is working and that the app
// key and secret valid.
App(arg *EchoArg) (res *EchoResult, err error)
// User : This endpoint performs User Authentication, validating the
// supplied access token, and returns the supplied string, to allow you to
// test your code and connection to the Dropbox API. It has no other effect.
// If you receive an HTTP 200 response with the supplied query, it indicates
// at least part of the Dropbox API infrastructure is working and that the
// access token is valid.
User(arg *EchoArg) (res *EchoResult, err error)
}
type apiImpl dropbox.Context
//AppAPIError is an error-wrapper for the app route
type AppAPIError struct {
dropbox.APIError
EndpointError struct{} `json:"error"`
}
func (dbx *apiImpl) App(arg *EchoArg) (res *EchoResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "check",
Route: "app",
Auth: "app",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr AppAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//UserAPIError is an error-wrapper for the user route
type UserAPIError struct {
dropbox.APIError
EndpointError struct{} `json:"error"`
}
func (dbx *apiImpl) User(arg *EchoArg) (res *EchoResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "check",
Route: "user",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr UserAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
// New returns a Client implementation for this namespace
func New(c dropbox.Config) Client {
ctx := apiImpl(dropbox.NewContext(c))
return &ctx
}
================================================
FILE: v6/dropbox/check/types.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package check : has no documentation (yet)
package check
// EchoArg : EchoArg contains the arguments to be sent to the Dropbox servers.
type EchoArg struct {
// Query : The string that you'd like to be echoed back to you.
Query string `json:"query"`
}
// NewEchoArg returns a new EchoArg instance
func NewEchoArg() *EchoArg {
s := new(EchoArg)
s.Query = ""
return s
}
// EchoResult : EchoResult contains the result returned from the Dropbox
// servers.
type EchoResult struct {
// Result : If everything worked correctly, this would be the same as query.
Result string `json:"result"`
}
// NewEchoResult returns a new EchoResult instance
func NewEchoResult() *EchoResult {
s := new(EchoResult)
s.Result = ""
return s
}
================================================
FILE: v6/dropbox/common/types.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package common : has no documentation (yet)
package common
import (
"encoding/json"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)
// PathRoot : has no documentation (yet)
type PathRoot struct {
dropbox.Tagged
// Root : Paths are relative to the authenticating user's root namespace
// (This results in `PathRootError.invalid_root` if the user's root
// namespace has changed.).
Root string `json:"root,omitempty"`
// NamespaceId : Paths are relative to given namespace id (This results in
// `PathRootError.no_permission` if you don't have access to this
// namespace.).
NamespaceId string `json:"namespace_id,omitempty"`
}
// Valid tag values for PathRoot
const (
PathRootHome = "home"
PathRootRoot = "root"
PathRootNamespaceId = "namespace_id"
PathRootOther = "other"
)
// UnmarshalJSON deserializes into a PathRoot instance
func (u *PathRoot) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// Root : Paths are relative to the authenticating user's root namespace
// (This results in `PathRootError.invalid_root` if the user's root
// namespace has changed.).
Root string `json:"root,omitempty"`
// NamespaceId : Paths are relative to given namespace id (This results
// in `PathRootError.no_permission` if you don't have access to this
// namespace.).
NamespaceId string `json:"namespace_id,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 "root":
u.Root = w.Root
case "namespace_id":
u.NamespaceId = w.NamespaceId
}
return nil
}
// PathRootError : has no documentation (yet)
type PathRootError struct {
dropbox.Tagged
// InvalidRoot : The root namespace id in Dropbox-API-Path-Root header is
// not valid. The value of this error is the user's latest root info.
InvalidRoot IsRootInfo `json:"invalid_root,omitempty"`
}
// Valid tag values for PathRootError
const (
PathRootErrorInvalidRoot = "invalid_root"
PathRootErrorNoPermission = "no_permission"
PathRootErrorOther = "other"
)
// UnmarshalJSON deserializes into a PathRootError instance
func (u *PathRootError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// InvalidRoot : The root namespace id in Dropbox-API-Path-Root header
// is not valid. The value of this error is the user's latest root info.
InvalidRoot json.RawMessage `json:"invalid_root,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 "invalid_root":
if u.InvalidRoot, err = IsRootInfoFromJSON(w.InvalidRoot); err != nil {
return err
}
}
return nil
}
// RootInfo : Information about current user's root.
type RootInfo struct {
// RootNamespaceId : The namespace ID for user's root namespace. It will be
// the namespace ID of the shared team root if the user is member of a team
// with a separate team root. Otherwise it will be same as
// `RootInfo.home_namespace_id`.
RootNamespaceId string `json:"root_namespace_id"`
// HomeNamespaceId : The namespace ID for user's home namespace.
HomeNamespaceId string `json:"home_namespace_id"`
}
// NewRootInfo returns a new RootInfo instance
func NewRootInfo(RootNamespaceId string, HomeNamespaceId string) *RootInfo {
s := new(RootInfo)
s.RootNamespaceId = RootNamespaceId
s.HomeNamespaceId = HomeNamespaceId
return s
}
// IsRootInfo is the interface type for RootInfo and its subtypes
type IsRootInfo interface {
IsRootInfo()
}
// IsRootInfo implements the IsRootInfo interface
func (u *RootInfo) IsRootInfo() {}
type rootInfoUnion struct {
dropbox.Tagged
// Team : has no documentation (yet)
Team *TeamRootInfo `json:"team,omitempty"`
// User : has no documentation (yet)
User *UserRootInfo `json:"user,omitempty"`
}
// Valid tag values for RootInfo
const (
RootInfoTeam = "team"
RootInfoUser = "user"
)
// UnmarshalJSON deserializes into a rootInfoUnion instance
func (u *rootInfoUnion) 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 "team":
if err = json.Unmarshal(body, &u.Team); err != nil {
return err
}
case "user":
if err = json.Unmarshal(body, &u.User); err != nil {
return err
}
}
return nil
}
// IsRootInfoFromJSON converts JSON to a concrete IsRootInfo instance
func IsRootInfoFromJSON(data []byte) (IsRootInfo, error) {
var t rootInfoUnion
if err := json.Unmarshal(data, &t); err != nil {
return nil, err
}
switch t.Tag {
case "team":
return t.Team, nil
case "user":
return t.User, nil
}
return nil, nil
}
// TeamRootInfo : Root info when user is member of a team with a separate root
// namespace ID.
type TeamRootInfo struct {
RootInfo
// HomePath : The path for user's home directory under the shared team root.
HomePath string `json:"home_path"`
}
// NewTeamRootInfo returns a new TeamRootInfo instance
func NewTeamRootInfo(RootNamespaceId string, HomeNamespaceId string, HomePath string) *TeamRootInfo {
s := new(TeamRootInfo)
s.RootNamespaceId = RootNamespaceId
s.HomeNamespaceId = HomeNamespaceId
s.HomePath = HomePath
return s
}
// UserRootInfo : Root info when user is not member of a team or the user is a
// member of a team and the team does not have a separate root namespace.
type UserRootInfo struct {
RootInfo
}
// NewUserRootInfo returns a new UserRootInfo instance
func NewUserRootInfo(RootNamespaceId string, HomeNamespaceId string) *UserRootInfo {
s := new(UserRootInfo)
s.RootNamespaceId = RootNamespaceId
s.HomeNamespaceId = HomeNamespaceId
return s
}
================================================
FILE: v6/dropbox/contacts/client.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package contacts
import (
"io"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)
// Client interface describes all routes in this namespace
type Client interface {
// DeleteManualContacts : Removes all manually added contacts. You'll still
// keep contacts who are on your team or who you imported. New contacts will
// be added when you share.
DeleteManualContacts() (err error)
// DeleteManualContactsBatch : Removes manually added contacts from the
// given list.
DeleteManualContactsBatch(arg *DeleteManualContactsArg) (err error)
}
type apiImpl dropbox.Context
//DeleteManualContactsAPIError is an error-wrapper for the delete_manual_contacts route
type DeleteManualContactsAPIError struct {
dropbox.APIError
EndpointError struct{} `json:"error"`
}
func (dbx *apiImpl) DeleteManualContacts() (err error) {
req := dropbox.Request{
Host: "api",
Namespace: "contacts",
Route: "delete_manual_contacts",
Auth: "user",
Style: "rpc",
Arg: nil,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr DeleteManualContactsAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
_ = resp
_ = respBody
return
}
//DeleteManualContactsBatchAPIError is an error-wrapper for the delete_manual_contacts_batch route
type DeleteManualContactsBatchAPIError struct {
dropbox.APIError
EndpointError *DeleteManualContactsError `json:"error"`
}
func (dbx *apiImpl) DeleteManualContactsBatch(arg *DeleteManualContactsArg) (err error) {
req := dropbox.Request{
Host: "api",
Namespace: "contacts",
Route: "delete_manual_contacts_batch",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr DeleteManualContactsBatchAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
_ = resp
_ = respBody
return
}
// New returns a Client implementation for this namespace
func New(c dropbox.Config) Client {
ctx := apiImpl(dropbox.NewContext(c))
return &ctx
}
================================================
FILE: v6/dropbox/contacts/types.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package contacts : has no documentation (yet)
package contacts
import (
"encoding/json"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)
// DeleteManualContactsArg : has no documentation (yet)
type DeleteManualContactsArg struct {
// EmailAddresses : List of manually added contacts to be deleted.
EmailAddresses []string `json:"email_addresses"`
}
// NewDeleteManualContactsArg returns a new DeleteManualContactsArg instance
func NewDeleteManualContactsArg(EmailAddresses []string) *DeleteManualContactsArg {
s := new(DeleteManualContactsArg)
s.EmailAddresses = EmailAddresses
return s
}
// DeleteManualContactsError : has no documentation (yet)
type DeleteManualContactsError struct {
dropbox.Tagged
// ContactsNotFound : Can't delete contacts from this list. Make sure the
// list only has manually added contacts. The deletion was cancelled.
ContactsNotFound []string `json:"contacts_not_found,omitempty"`
}
// Valid tag values for DeleteManualContactsError
const (
DeleteManualContactsErrorContactsNotFound = "contacts_not_found"
DeleteManualContactsErrorOther = "other"
)
// UnmarshalJSON deserializes into a DeleteManualContactsError instance
func (u *DeleteManualContactsError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// ContactsNotFound : Can't delete contacts from this list. Make sure
// the list only has manually added contacts. The deletion was
// cancelled.
ContactsNotFound []string `json:"contacts_not_found,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 "contacts_not_found":
u.ContactsNotFound = w.ContactsNotFound
}
return nil
}
================================================
FILE: v6/dropbox/file_properties/client.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package file_properties
import (
"encoding/json"
"io"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)
// Client interface describes all routes in this namespace
type Client interface {
// PropertiesAdd : Add property groups to a Dropbox file. See
// `templatesAddForUser` or `templatesAddForTeam` to create new templates.
PropertiesAdd(arg *AddPropertiesArg) (err error)
// PropertiesOverwrite : Overwrite property groups associated with a file.
// This endpoint should be used instead of `propertiesUpdate` when property
// groups are being updated via a "snapshot" instead of via a "delta". In
// other words, this endpoint will delete all omitted fields from a property
// group, whereas `propertiesUpdate` will only delete fields that are
// explicitly marked for deletion.
PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error)
// PropertiesRemove : Permanently removes the specified property group from
// the file. To remove specific property field key value pairs, see
// `propertiesUpdate`. To update a template, see `templatesUpdateForUser` or
// `templatesUpdateForTeam`. To remove a template, see
// `templatesRemoveForUser` or `templatesRemoveForTeam`.
PropertiesRemove(arg *RemovePropertiesArg) (err error)
// PropertiesSearch : Search across property templates for particular
// property field values.
PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error)
// PropertiesSearchContinue : Once a cursor has been retrieved from
// `propertiesSearch`, use this to paginate through all search results.
PropertiesSearchContinue(arg *PropertiesSearchContinueArg) (res *PropertiesSearchResult, err error)
// PropertiesUpdate : Add, update or remove properties associated with the
// supplied file and templates. This endpoint should be used instead of
// `propertiesOverwrite` when property groups are being updated via a
// "delta" instead of via a "snapshot" . In other words, this endpoint will
// not delete any omitted fields from a property group, whereas
// `propertiesOverwrite` will delete any fields that are omitted from a
// property group.
PropertiesUpdate(arg *UpdatePropertiesArg) (err error)
// TemplatesAddForTeam : Add a template associated with a team. See
// `propertiesAdd` to add properties to a file or folder. Note: this
// endpoint will create team-owned templates.
TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error)
// TemplatesAddForUser : Add a template associated with a user. See
// `propertiesAdd` to add properties to a file. This endpoint can't be
// called on a team member or admin's behalf.
TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error)
// TemplatesGetForTeam : Get the schema for a specified template.
TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error)
// TemplatesGetForUser : Get the schema for a specified template. This
// endpoint can't be called on a team member or admin's behalf.
TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error)
// TemplatesListForTeam : Get the template identifiers for a team. To get
// the schema of each template use `templatesGetForTeam`.
TemplatesListForTeam() (res *ListTemplateResult, err error)
// TemplatesListForUser : Get the template identifiers for a team. To get
// the schema of each template use `templatesGetForUser`. This endpoint
// can't be called on a team member or admin's behalf.
TemplatesListForUser() (res *ListTemplateResult, err error)
// TemplatesRemoveForTeam : Permanently removes the specified template
// created from `templatesAddForUser`. All properties associated with the
// template will also be removed. This action cannot be undone.
TemplatesRemoveForTeam(arg *RemoveTemplateArg) (err error)
// TemplatesRemoveForUser : Permanently removes the specified template
// created from `templatesAddForUser`. All properties associated with the
// template will also be removed. This action cannot be undone.
TemplatesRemoveForUser(arg *RemoveTemplateArg) (err error)
// TemplatesUpdateForTeam : Update a template associated with a team. This
// route can update the template name, the template description and add
// optional properties to templates.
TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
// TemplatesUpdateForUser : Update a template associated with a user. This
// route can update the template name, the template description and add
// optional properties to templates. This endpoint can't be called on a team
// member or admin's behalf.
TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
}
type apiImpl dropbox.Context
//PropertiesAddAPIError is an error-wrapper for the properties/add route
type PropertiesAddAPIError struct {
dropbox.APIError
EndpointError *AddPropertiesError `json:"error"`
}
func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "properties/add",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr PropertiesAddAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
_ = resp
_ = respBody
return
}
//PropertiesOverwriteAPIError is an error-wrapper for the properties/overwrite route
type PropertiesOverwriteAPIError struct {
dropbox.APIError
EndpointError *InvalidPropertyGroupError `json:"error"`
}
func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "properties/overwrite",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr PropertiesOverwriteAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
_ = resp
_ = respBody
return
}
//PropertiesRemoveAPIError is an error-wrapper for the properties/remove route
type PropertiesRemoveAPIError struct {
dropbox.APIError
EndpointError *RemovePropertiesError `json:"error"`
}
func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "properties/remove",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr PropertiesRemoveAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
_ = resp
_ = respBody
return
}
//PropertiesSearchAPIError is an error-wrapper for the properties/search route
type PropertiesSearchAPIError struct {
dropbox.APIError
EndpointError *PropertiesSearchError `json:"error"`
}
func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "properties/search",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr PropertiesSearchAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//PropertiesSearchContinueAPIError is an error-wrapper for the properties/search/continue route
type PropertiesSearchContinueAPIError struct {
dropbox.APIError
EndpointError *PropertiesSearchContinueError `json:"error"`
}
func (dbx *apiImpl) PropertiesSearchContinue(arg *PropertiesSearchContinueArg) (res *PropertiesSearchResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "properties/search/continue",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr PropertiesSearchContinueAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//PropertiesUpdateAPIError is an error-wrapper for the properties/update route
type PropertiesUpdateAPIError struct {
dropbox.APIError
EndpointError *UpdatePropertiesError `json:"error"`
}
func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "properties/update",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr PropertiesUpdateAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
_ = resp
_ = respBody
return
}
//TemplatesAddForTeamAPIError is an error-wrapper for the templates/add_for_team route
type TemplatesAddForTeamAPIError struct {
dropbox.APIError
EndpointError *ModifyTemplateError `json:"error"`
}
func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "templates/add_for_team",
Auth: "team",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TemplatesAddForTeamAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//TemplatesAddForUserAPIError is an error-wrapper for the templates/add_for_user route
type TemplatesAddForUserAPIError struct {
dropbox.APIError
EndpointError *ModifyTemplateError `json:"error"`
}
func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "templates/add_for_user",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TemplatesAddForUserAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//TemplatesGetForTeamAPIError is an error-wrapper for the templates/get_for_team route
type TemplatesGetForTeamAPIError struct {
dropbox.APIError
EndpointError *TemplateError `json:"error"`
}
func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "templates/get_for_team",
Auth: "team",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TemplatesGetForTeamAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//TemplatesGetForUserAPIError is an error-wrapper for the templates/get_for_user route
type TemplatesGetForUserAPIError struct {
dropbox.APIError
EndpointError *TemplateError `json:"error"`
}
func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "templates/get_for_user",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TemplatesGetForUserAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//TemplatesListForTeamAPIError is an error-wrapper for the templates/list_for_team route
type TemplatesListForTeamAPIError struct {
dropbox.APIError
EndpointError *TemplateError `json:"error"`
}
func (dbx *apiImpl) TemplatesListForTeam() (res *ListTemplateResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "templates/list_for_team",
Auth: "team",
Style: "rpc",
Arg: nil,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TemplatesListForTeamAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//TemplatesListForUserAPIError is an error-wrapper for the templates/list_for_user route
type TemplatesListForUserAPIError struct {
dropbox.APIError
EndpointError *TemplateError `json:"error"`
}
func (dbx *apiImpl) TemplatesListForUser() (res *ListTemplateResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "templates/list_for_user",
Auth: "user",
Style: "rpc",
Arg: nil,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TemplatesListForUserAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//TemplatesRemoveForTeamAPIError is an error-wrapper for the templates/remove_for_team route
type TemplatesRemoveForTeamAPIError struct {
dropbox.APIError
EndpointError *TemplateError `json:"error"`
}
func (dbx *apiImpl) TemplatesRemoveForTeam(arg *RemoveTemplateArg) (err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "templates/remove_for_team",
Auth: "team",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TemplatesRemoveForTeamAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
_ = resp
_ = respBody
return
}
//TemplatesRemoveForUserAPIError is an error-wrapper for the templates/remove_for_user route
type TemplatesRemoveForUserAPIError struct {
dropbox.APIError
EndpointError *TemplateError `json:"error"`
}
func (dbx *apiImpl) TemplatesRemoveForUser(arg *RemoveTemplateArg) (err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "templates/remove_for_user",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TemplatesRemoveForUserAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
_ = resp
_ = respBody
return
}
//TemplatesUpdateForTeamAPIError is an error-wrapper for the templates/update_for_team route
type TemplatesUpdateForTeamAPIError struct {
dropbox.APIError
EndpointError *ModifyTemplateError `json:"error"`
}
func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "templates/update_for_team",
Auth: "team",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TemplatesUpdateForTeamAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//TemplatesUpdateForUserAPIError is an error-wrapper for the templates/update_for_user route
type TemplatesUpdateForUserAPIError struct {
dropbox.APIError
EndpointError *ModifyTemplateError `json:"error"`
}
func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_properties",
Route: "templates/update_for_user",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr TemplatesUpdateForUserAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
// New returns a Client implementation for this namespace
func New(c dropbox.Config) Client {
ctx := apiImpl(dropbox.NewContext(c))
return &ctx
}
================================================
FILE: v6/dropbox/file_properties/types.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package file_properties : This namespace contains helpers for property and
// template metadata endpoints. These endpoints enable you to tag arbitrary
// key/value data to Dropbox files. The most basic unit in this namespace is
// the `PropertyField`. These fields encapsulate the actual key/value data.
// Fields are added to a Dropbox file using a `PropertyGroup`. Property groups
// contain a reference to a Dropbox file and a `PropertyGroupTemplate`. Property
// groups are uniquely identified by the combination of their associated Dropbox
// file and template. The `PropertyGroupTemplate` is a way of restricting the
// possible key names and value types of the data within a property group. The
// possible key names and value types are explicitly enumerated using
// `PropertyFieldTemplate` objects. You can think of a property group template
// as a class definition for a particular key/value metadata object, and the
// property groups themselves as the instantiations of these objects. Templates
// are owned either by a user/app pair or team/app pair. Templates and their
// associated properties can't be accessed by any app other than the app that
// created them, and even then, only when the app is linked with the owner of
// the template (either a user or team). User-owned templates are accessed via
// the user-auth file_properties/templates/*_for_user endpoints, while
// team-owned templates are accessed via the team-auth
// file_properties/templates/*_for_team endpoints. Properties associated with
// either type of template can be accessed via the user-auth properties/*
// endpoints. Finally, properties can be accessed from a number of endpoints
// that return metadata, including `files/get_metadata`, and
// `files/list_folder`. Properties can also be added during upload, using
// `files/upload`.
package file_properties
import (
"encoding/json"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)
// AddPropertiesArg : has no documentation (yet)
type AddPropertiesArg struct {
// Path : A unique identifier for the file or folder.
Path string `json:"path"`
// PropertyGroups : The property groups which are to be added to a Dropbox
// file. No two groups in the input should refer to the same template.
PropertyGroups []*PropertyGroup `json:"property_groups"`
}
// NewAddPropertiesArg returns a new AddPropertiesArg instance
func NewAddPropertiesArg(Path string, PropertyGroups []*PropertyGroup) *AddPropertiesArg {
s := new(AddPropertiesArg)
s.Path = Path
s.PropertyGroups = PropertyGroups
return s
}
// TemplateError : has no documentation (yet)
type TemplateError struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
}
// Valid tag values for TemplateError
const (
TemplateErrorTemplateNotFound = "template_not_found"
TemplateErrorRestrictedContent = "restricted_content"
TemplateErrorOther = "other"
)
// UnmarshalJSON deserializes into a TemplateError instance
func (u *TemplateError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,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":
u.TemplateNotFound = w.TemplateNotFound
}
return nil
}
// PropertiesError : has no documentation (yet)
type PropertiesError struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
}
// Valid tag values for PropertiesError
const (
PropertiesErrorTemplateNotFound = "template_not_found"
PropertiesErrorRestrictedContent = "restricted_content"
PropertiesErrorOther = "other"
PropertiesErrorPath = "path"
PropertiesErrorUnsupportedFolder = "unsupported_folder"
)
// UnmarshalJSON deserializes into a PropertiesError instance
func (u *PropertiesError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
}
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":
u.TemplateNotFound = w.TemplateNotFound
case "path":
u.Path = w.Path
}
return nil
}
// InvalidPropertyGroupError : has no documentation (yet)
type InvalidPropertyGroupError struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
}
// Valid tag values for InvalidPropertyGroupError
const (
InvalidPropertyGroupErrorTemplateNotFound = "template_not_found"
InvalidPropertyGroupErrorRestrictedContent = "restricted_content"
InvalidPropertyGroupErrorOther = "other"
InvalidPropertyGroupErrorPath = "path"
InvalidPropertyGroupErrorUnsupportedFolder = "unsupported_folder"
InvalidPropertyGroupErrorPropertyFieldTooLarge = "property_field_too_large"
InvalidPropertyGroupErrorDoesNotFitTemplate = "does_not_fit_template"
InvalidPropertyGroupErrorDuplicatePropertyGroups = "duplicate_property_groups"
)
// UnmarshalJSON deserializes into a InvalidPropertyGroupError instance
func (u *InvalidPropertyGroupError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
}
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":
u.TemplateNotFound = w.TemplateNotFound
case "path":
u.Path = w.Path
}
return nil
}
// AddPropertiesError : has no documentation (yet)
type AddPropertiesError struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
}
// Valid tag values for AddPropertiesError
const (
AddPropertiesErrorTemplateNotFound = "template_not_found"
AddPropertiesErrorRestrictedContent = "restricted_content"
AddPropertiesErrorOther = "other"
AddPropertiesErrorPath = "path"
AddPropertiesErrorUnsupportedFolder = "unsupported_folder"
AddPropertiesErrorPropertyFieldTooLarge = "property_field_too_large"
AddPropertiesErrorDoesNotFitTemplate = "does_not_fit_template"
AddPropertiesErrorDuplicatePropertyGroups = "duplicate_property_groups"
AddPropertiesErrorPropertyGroupAlreadyExists = "property_group_already_exists"
)
// UnmarshalJSON deserializes into a AddPropertiesError instance
func (u *AddPropertiesError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
}
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":
u.TemplateNotFound = w.TemplateNotFound
case "path":
u.Path = w.Path
}
return nil
}
// PropertyGroupTemplate : Defines how a property group may be structured.
type PropertyGroupTemplate struct {
// Name : Display name for the template. Template names can be up to 256
// bytes.
Name string `json:"name"`
// Description : Description for the template. Template descriptions can be
// up to 1024 bytes.
Description string `json:"description"`
// Fields : Definitions of the property fields associated with this
// template. There can be up to 32 properties in a single template.
Fields []*PropertyFieldTemplate `json:"fields"`
}
// NewPropertyGroupTemplate returns a new PropertyGroupTemplate instance
func NewPropertyGroupTemplate(Name string, Description string, Fields []*PropertyFieldTemplate) *PropertyGroupTemplate {
s := new(PropertyGroupTemplate)
s.Name = Name
s.Description = Description
s.Fields = Fields
return s
}
// AddTemplateArg : has no documentation (yet)
type AddTemplateArg struct {
PropertyGroupTemplate
}
// NewAddTemplateArg returns a new AddTemplateArg instance
func NewAddTemplateArg(Name string, Description string, Fields []*PropertyFieldTemplate) *AddTemplateArg {
s := new(AddTemplateArg)
s.Name = Name
s.Description = Description
s.Fields = Fields
return s
}
// AddTemplateResult : has no documentation (yet)
type AddTemplateResult struct {
// TemplateId : An identifier for template added by See
// `templatesAddForUser` or `templatesAddForTeam`.
TemplateId string `json:"template_id"`
}
// NewAddTemplateResult returns a new AddTemplateResult instance
func NewAddTemplateResult(TemplateId string) *AddTemplateResult {
s := new(AddTemplateResult)
s.TemplateId = TemplateId
return s
}
// GetTemplateArg : has no documentation (yet)
type GetTemplateArg struct {
// TemplateId : An identifier for template added by route See
// `templatesAddForUser` or `templatesAddForTeam`.
TemplateId string `json:"template_id"`
}
// NewGetTemplateArg returns a new GetTemplateArg instance
func NewGetTemplateArg(TemplateId string) *GetTemplateArg {
s := new(GetTemplateArg)
s.TemplateId = TemplateId
return s
}
// GetTemplateResult : has no documentation (yet)
type GetTemplateResult struct {
PropertyGroupTemplate
}
// NewGetTemplateResult returns a new GetTemplateResult instance
func NewGetTemplateResult(Name string, Description string, Fields []*PropertyFieldTemplate) *GetTemplateResult {
s := new(GetTemplateResult)
s.Name = Name
s.Description = Description
s.Fields = Fields
return s
}
// ListTemplateResult : has no documentation (yet)
type ListTemplateResult struct {
// TemplateIds : List of identifiers for templates added by See
// `templatesAddForUser` or `templatesAddForTeam`.
TemplateIds []string `json:"template_ids"`
}
// NewListTemplateResult returns a new ListTemplateResult instance
func NewListTemplateResult(TemplateIds []string) *ListTemplateResult {
s := new(ListTemplateResult)
s.TemplateIds = TemplateIds
return s
}
// LogicalOperator : Logical operator to join search queries together.
type LogicalOperator struct {
dropbox.Tagged
}
// Valid tag values for LogicalOperator
const (
LogicalOperatorOrOperator = "or_operator"
LogicalOperatorOther = "other"
)
// LookUpPropertiesError : has no documentation (yet)
type LookUpPropertiesError struct {
dropbox.Tagged
}
// Valid tag values for LookUpPropertiesError
const (
LookUpPropertiesErrorPropertyGroupNotFound = "property_group_not_found"
LookUpPropertiesErrorOther = "other"
)
// LookupError : has no documentation (yet)
type LookupError struct {
dropbox.Tagged
// MalformedPath : has no documentation (yet)
MalformedPath string `json:"malformed_path,omitempty"`
}
// Valid tag values for LookupError
const (
LookupErrorMalformedPath = "malformed_path"
LookupErrorNotFound = "not_found"
LookupErrorNotFile = "not_file"
LookupErrorNotFolder = "not_folder"
LookupErrorRestrictedContent = "restricted_content"
LookupErrorOther = "other"
)
// UnmarshalJSON deserializes into a LookupError instance
func (u *LookupError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// MalformedPath : has no documentation (yet)
MalformedPath string `json:"malformed_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 "malformed_path":
u.MalformedPath = w.MalformedPath
}
return nil
}
// ModifyTemplateError : has no documentation (yet)
type ModifyTemplateError struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
}
// Valid tag values for ModifyTemplateError
const (
ModifyTemplateErrorTemplateNotFound = "template_not_found"
ModifyTemplateErrorRestrictedContent = "restricted_content"
ModifyTemplateErrorOther = "other"
ModifyTemplateErrorConflictingPropertyNames = "conflicting_property_names"
ModifyTemplateErrorTooManyProperties = "too_many_properties"
ModifyTemplateErrorTooManyTemplates = "too_many_templates"
ModifyTemplateErrorTemplateAttributeTooLarge = "template_attribute_too_large"
)
// UnmarshalJSON deserializes into a ModifyTemplateError instance
func (u *ModifyTemplateError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,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":
u.TemplateNotFound = w.TemplateNotFound
}
return nil
}
// OverwritePropertyGroupArg : has no documentation (yet)
type OverwritePropertyGroupArg struct {
// Path : A unique identifier for the file or folder.
Path string `json:"path"`
// PropertyGroups : The property groups "snapshot" updates to force apply.
// No two groups in the input should refer to the same template.
PropertyGroups []*PropertyGroup `json:"property_groups"`
}
// NewOverwritePropertyGroupArg returns a new OverwritePropertyGroupArg instance
func NewOverwritePropertyGroupArg(Path string, PropertyGroups []*PropertyGroup) *OverwritePropertyGroupArg {
s := new(OverwritePropertyGroupArg)
s.Path = Path
s.PropertyGroups = PropertyGroups
return s
}
// PropertiesSearchArg : has no documentation (yet)
type PropertiesSearchArg struct {
// Queries : Queries to search.
Queries []*PropertiesSearchQuery `json:"queries"`
// TemplateFilter : Filter results to contain only properties associated
// with these template IDs.
TemplateFilter *TemplateFilter `json:"template_filter"`
}
// NewPropertiesSearchArg returns a new PropertiesSearchArg instance
func NewPropertiesSearchArg(Queries []*PropertiesSearchQuery) *PropertiesSearchArg {
s := new(PropertiesSearchArg)
s.Queries = Queries
s.TemplateFilter = &TemplateFilter{Tagged: dropbox.Tagged{Tag: "filter_none"}}
return s
}
// PropertiesSearchContinueArg : has no documentation (yet)
type PropertiesSearchContinueArg struct {
// Cursor : The cursor returned by your last call to `propertiesSearch` or
// `propertiesSearchContinue`.
Cursor string `json:"cursor"`
}
// NewPropertiesSearchContinueArg returns a new PropertiesSearchContinueArg instance
func NewPropertiesSearchContinueArg(Cursor string) *PropertiesSearchContinueArg {
s := new(PropertiesSearchContinueArg)
s.Cursor = Cursor
return s
}
// PropertiesSearchContinueError : has no documentation (yet)
type PropertiesSearchContinueError struct {
dropbox.Tagged
}
// Valid tag values for PropertiesSearchContinueError
const (
PropertiesSearchContinueErrorReset = "reset"
PropertiesSearchContinueErrorOther = "other"
)
// PropertiesSearchError : has no documentation (yet)
type PropertiesSearchError struct {
dropbox.Tagged
// PropertyGroupLookup : has no documentation (yet)
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
}
// Valid tag values for PropertiesSearchError
const (
PropertiesSearchErrorPropertyGroupLookup = "property_group_lookup"
PropertiesSearchErrorOther = "other"
)
// UnmarshalJSON deserializes into a PropertiesSearchError instance
func (u *PropertiesSearchError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// PropertyGroupLookup : has no documentation (yet)
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,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 "property_group_lookup":
u.PropertyGroupLookup = w.PropertyGroupLookup
}
return nil
}
// PropertiesSearchMatch : has no documentation (yet)
type PropertiesSearchMatch struct {
// Id : The ID for the matched file or folder.
Id string `json:"id"`
// Path : The path for the matched file or folder.
Path string `json:"path"`
// IsDeleted : Whether the file or folder is deleted.
IsDeleted bool `json:"is_deleted"`
// PropertyGroups : List of custom property groups associated with the file.
PropertyGroups []*PropertyGroup `json:"property_groups"`
}
// NewPropertiesSearchMatch returns a new PropertiesSearchMatch instance
func NewPropertiesSearchMatch(Id string, Path string, IsDeleted bool, PropertyGroups []*PropertyGroup) *PropertiesSearchMatch {
s := new(PropertiesSearchMatch)
s.Id = Id
s.Path = Path
s.IsDeleted = IsDeleted
s.PropertyGroups = PropertyGroups
return s
}
// PropertiesSearchMode : has no documentation (yet)
type PropertiesSearchMode struct {
dropbox.Tagged
// FieldName : Search for a value associated with this field name.
FieldName string `json:"field_name,omitempty"`
}
// Valid tag values for PropertiesSearchMode
const (
PropertiesSearchModeFieldName = "field_name"
PropertiesSearchModeOther = "other"
)
// UnmarshalJSON deserializes into a PropertiesSearchMode instance
func (u *PropertiesSearchMode) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// FieldName : Search for a value associated with this field name.
FieldName string `json:"field_name,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 "field_name":
u.FieldName = w.FieldName
}
return nil
}
// PropertiesSearchQuery : has no documentation (yet)
type PropertiesSearchQuery struct {
// Query : The property field value for which to search across templates.
Query string `json:"query"`
// Mode : The mode with which to perform the search.
Mode *PropertiesSearchMode `json:"mode"`
// LogicalOperator : The logical operator with which to append the query.
LogicalOperator *LogicalOperator `json:"logical_operator"`
}
// NewPropertiesSearchQuery returns a new PropertiesSearchQuery instance
func NewPropertiesSearchQuery(Query string, Mode *PropertiesSearchMode) *PropertiesSearchQuery {
s := new(PropertiesSearchQuery)
s.Query = Query
s.Mode = Mode
s.LogicalOperator = &LogicalOperator{Tagged: dropbox.Tagged{Tag: "or_operator"}}
return s
}
// PropertiesSearchResult : has no documentation (yet)
type PropertiesSearchResult struct {
// Matches : A list (possibly empty) of matches for the query.
Matches []*PropertiesSearchMatch `json:"matches"`
// Cursor : Pass the cursor into `propertiesSearchContinue` to continue to
// receive search results. Cursor will be null when there are no more
// results.
Cursor string `json:"cursor,omitempty"`
}
// NewPropertiesSearchResult returns a new PropertiesSearchResult instance
func NewPropertiesSearchResult(Matches []*PropertiesSearchMatch) *PropertiesSearchResult {
s := new(PropertiesSearchResult)
s.Matches = Matches
return s
}
// PropertyField : Raw key/value data to be associated with a Dropbox file.
// Property fields are added to Dropbox files as a `PropertyGroup`.
type PropertyField struct {
// Name : Key of the property field associated with a file and template.
// Keys can be up to 256 bytes.
Name string `json:"name"`
// Value : Value of the property field associated with a file and template.
// Values can be up to 1024 bytes.
Value string `json:"value"`
}
// NewPropertyField returns a new PropertyField instance
func NewPropertyField(Name string, Value string) *PropertyField {
s := new(PropertyField)
s.Name = Name
s.Value = Value
return s
}
// PropertyFieldTemplate : Defines how a single property field may be
// structured. Used exclusively by `PropertyGroupTemplate`.
type PropertyFieldTemplate struct {
// Name : Key of the property field being described. Property field keys can
// be up to 256 bytes.
Name string `json:"name"`
// Description : Description of the property field. Property field
// descriptions can be up to 1024 bytes.
Description string `json:"description"`
// Type : Data type of the value of this property field. This type will be
// enforced upon property creation and modifications.
Type *PropertyType `json:"type"`
}
// NewPropertyFieldTemplate returns a new PropertyFieldTemplate instance
func NewPropertyFieldTemplate(Name string, Description string, Type *PropertyType) *PropertyFieldTemplate {
s := new(PropertyFieldTemplate)
s.Name = Name
s.Description = Description
s.Type = Type
return s
}
// PropertyGroup : A subset of the property fields described by the
// corresponding `PropertyGroupTemplate`. Properties are always added to a
// Dropbox file as a `PropertyGroup`. The possible key names and value types in
// this group are defined by the corresponding `PropertyGroupTemplate`.
type PropertyGroup struct {
// TemplateId : A unique identifier for the associated template.
TemplateId string `json:"template_id"`
// Fields : The actual properties associated with the template. There can be
// up to 32 property types per template.
Fields []*PropertyField `json:"fields"`
}
// NewPropertyGroup returns a new PropertyGroup instance
func NewPropertyGroup(TemplateId string, Fields []*PropertyField) *PropertyGroup {
s := new(PropertyGroup)
s.TemplateId = TemplateId
s.Fields = Fields
return s
}
// PropertyGroupUpdate : has no documentation (yet)
type PropertyGroupUpdate struct {
// TemplateId : A unique identifier for a property template.
TemplateId string `json:"template_id"`
// AddOrUpdateFields : Property fields to update. If the property field
// already exists, it is updated. If the property field doesn't exist, the
// property group is added.
AddOrUpdateFields []*PropertyField `json:"add_or_update_fields,omitempty"`
// RemoveFields : Property fields to remove (by name), provided they exist.
RemoveFields []string `json:"remove_fields,omitempty"`
}
// NewPropertyGroupUpdate returns a new PropertyGroupUpdate instance
func NewPropertyGroupUpdate(TemplateId string) *PropertyGroupUpdate {
s := new(PropertyGroupUpdate)
s.TemplateId = TemplateId
return s
}
// PropertyType : Data type of the given property field added.
type PropertyType struct {
dropbox.Tagged
}
// Valid tag values for PropertyType
const (
PropertyTypeString = "string"
PropertyTypeOther = "other"
)
// RemovePropertiesArg : has no documentation (yet)
type RemovePropertiesArg struct {
// Path : A unique identifier for the file or folder.
Path string `json:"path"`
// PropertyTemplateIds : A list of identifiers for a template created by
// `templatesAddForUser` or `templatesAddForTeam`.
PropertyTemplateIds []string `json:"property_template_ids"`
}
// NewRemovePropertiesArg returns a new RemovePropertiesArg instance
func NewRemovePropertiesArg(Path string, PropertyTemplateIds []string) *RemovePropertiesArg {
s := new(RemovePropertiesArg)
s.Path = Path
s.PropertyTemplateIds = PropertyTemplateIds
return s
}
// RemovePropertiesError : has no documentation (yet)
type RemovePropertiesError struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
// PropertyGroupLookup : has no documentation (yet)
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
}
// Valid tag values for RemovePropertiesError
const (
RemovePropertiesErrorTemplateNotFound = "template_not_found"
RemovePropertiesErrorRestrictedContent = "restricted_content"
RemovePropertiesErrorOther = "other"
RemovePropertiesErrorPath = "path"
RemovePropertiesErrorUnsupportedFolder = "unsupported_folder"
RemovePropertiesErrorPropertyGroupLookup = "property_group_lookup"
)
// UnmarshalJSON deserializes into a RemovePropertiesError instance
func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
// PropertyGroupLookup : has no documentation (yet)
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
}
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":
u.TemplateNotFound = w.TemplateNotFound
case "path":
u.Path = w.Path
case "property_group_lookup":
u.PropertyGroupLookup = w.PropertyGroupLookup
}
return nil
}
// RemoveTemplateArg : has no documentation (yet)
type RemoveTemplateArg struct {
// TemplateId : An identifier for a template created by
// `templatesAddForUser` or `templatesAddForTeam`.
TemplateId string `json:"template_id"`
}
// NewRemoveTemplateArg returns a new RemoveTemplateArg instance
func NewRemoveTemplateArg(TemplateId string) *RemoveTemplateArg {
s := new(RemoveTemplateArg)
s.TemplateId = TemplateId
return s
}
// TemplateFilterBase : has no documentation (yet)
type TemplateFilterBase struct {
dropbox.Tagged
// FilterSome : Only templates with an ID in the supplied list will be
// returned (a subset of templates will be returned).
FilterSome []string `json:"filter_some,omitempty"`
}
// Valid tag values for TemplateFilterBase
const (
TemplateFilterBaseFilterSome = "filter_some"
TemplateFilterBaseOther = "other"
)
// UnmarshalJSON deserializes into a TemplateFilterBase instance
func (u *TemplateFilterBase) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// FilterSome : Only templates with an ID in the supplied list will be
// returned (a subset of templates will be returned).
FilterSome []string `json:"filter_some,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 "filter_some":
u.FilterSome = w.FilterSome
}
return nil
}
// TemplateFilter : has no documentation (yet)
type TemplateFilter struct {
dropbox.Tagged
// FilterSome : Only templates with an ID in the supplied list will be
// returned (a subset of templates will be returned).
FilterSome []string `json:"filter_some,omitempty"`
}
// Valid tag values for TemplateFilter
const (
TemplateFilterFilterSome = "filter_some"
TemplateFilterOther = "other"
TemplateFilterFilterNone = "filter_none"
)
// UnmarshalJSON deserializes into a TemplateFilter instance
func (u *TemplateFilter) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// FilterSome : Only templates with an ID in the supplied list will be
// returned (a subset of templates will be returned).
FilterSome []string `json:"filter_some,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 "filter_some":
u.FilterSome = w.FilterSome
}
return nil
}
// TemplateOwnerType : has no documentation (yet)
type TemplateOwnerType struct {
dropbox.Tagged
}
// Valid tag values for TemplateOwnerType
const (
TemplateOwnerTypeUser = "user"
TemplateOwnerTypeTeam = "team"
TemplateOwnerTypeOther = "other"
)
// UpdatePropertiesArg : has no documentation (yet)
type UpdatePropertiesArg struct {
// Path : A unique identifier for the file or folder.
Path string `json:"path"`
// UpdatePropertyGroups : The property groups "delta" updates to apply.
UpdatePropertyGroups []*PropertyGroupUpdate `json:"update_property_groups"`
}
// NewUpdatePropertiesArg returns a new UpdatePropertiesArg instance
func NewUpdatePropertiesArg(Path string, UpdatePropertyGroups []*PropertyGroupUpdate) *UpdatePropertiesArg {
s := new(UpdatePropertiesArg)
s.Path = Path
s.UpdatePropertyGroups = UpdatePropertyGroups
return s
}
// UpdatePropertiesError : has no documentation (yet)
type UpdatePropertiesError struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
// PropertyGroupLookup : has no documentation (yet)
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
}
// Valid tag values for UpdatePropertiesError
const (
UpdatePropertiesErrorTemplateNotFound = "template_not_found"
UpdatePropertiesErrorRestrictedContent = "restricted_content"
UpdatePropertiesErrorOther = "other"
UpdatePropertiesErrorPath = "path"
UpdatePropertiesErrorUnsupportedFolder = "unsupported_folder"
UpdatePropertiesErrorPropertyFieldTooLarge = "property_field_too_large"
UpdatePropertiesErrorDoesNotFitTemplate = "does_not_fit_template"
UpdatePropertiesErrorDuplicatePropertyGroups = "duplicate_property_groups"
UpdatePropertiesErrorPropertyGroupLookup = "property_group_lookup"
)
// UnmarshalJSON deserializes into a UpdatePropertiesError instance
func (u *UpdatePropertiesError) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// TemplateNotFound : Template does not exist for the given identifier.
TemplateNotFound string `json:"template_not_found,omitempty"`
// Path : has no documentation (yet)
Path *LookupError `json:"path,omitempty"`
// PropertyGroupLookup : has no documentation (yet)
PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
}
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":
u.TemplateNotFound = w.TemplateNotFound
case "path":
u.Path = w.Path
case "property_group_lookup":
u.PropertyGroupLookup = w.PropertyGroupLookup
}
return nil
}
// UpdateTemplateArg : has no documentation (yet)
type UpdateTemplateArg struct {
// TemplateId : An identifier for template added by See
// `templatesAddForUser` or `templatesAddForTeam`.
TemplateId string `json:"template_id"`
// Name : A display name for the template. template names can be up to 256
// bytes.
Name string `json:"name,omitempty"`
// Description : Description for the new template. Template descriptions can
// be up to 1024 bytes.
Description string `json:"description,omitempty"`
// AddFields : Property field templates to be added to the group template.
// There can be up to 32 properties in a single template.
AddFields []*PropertyFieldTemplate `json:"add_fields,omitempty"`
}
// NewUpdateTemplateArg returns a new UpdateTemplateArg instance
func NewUpdateTemplateArg(TemplateId string) *UpdateTemplateArg {
s := new(UpdateTemplateArg)
s.TemplateId = TemplateId
return s
}
// UpdateTemplateResult : has no documentation (yet)
type UpdateTemplateResult struct {
// TemplateId : An identifier for template added by route See
// `templatesAddForUser` or `templatesAddForTeam`.
TemplateId string `json:"template_id"`
}
// NewUpdateTemplateResult returns a new UpdateTemplateResult instance
func NewUpdateTemplateResult(TemplateId string) *UpdateTemplateResult {
s := new(UpdateTemplateResult)
s.TemplateId = TemplateId
return s
}
================================================
FILE: v6/dropbox/file_requests/client.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package file_requests
import (
"encoding/json"
"io"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
)
// Client interface describes all routes in this namespace
type Client interface {
// Count : Returns the total number of file requests owned by this user.
// Includes both open and closed file requests.
Count() (res *CountFileRequestsResult, err error)
// Create : Creates a file request for this user.
Create(arg *CreateFileRequestArgs) (res *FileRequest, err error)
// Delete : Delete a batch of closed file requests.
Delete(arg *DeleteFileRequestArgs) (res *DeleteFileRequestsResult, err error)
// DeleteAllClosed : Delete all closed file requests owned by this user.
DeleteAllClosed() (res *DeleteAllClosedFileRequestsResult, err error)
// Get : Returns the specified file request.
Get(arg *GetFileRequestArgs) (res *FileRequest, err error)
// List : Returns a list of file requests owned by this user. For apps with
// the app folder permission, this will only return file requests with
// destinations in the app folder.
ListV2(arg *ListFileRequestsArg) (res *ListFileRequestsV2Result, err error)
// List : Returns a list of file requests owned by this user. For apps with
// the app folder permission, this will only return file requests with
// destinations in the app folder.
List() (res *ListFileRequestsResult, err error)
// ListContinue : Once a cursor has been retrieved from `list`, use this to
// paginate through all file requests. The cursor must come from a previous
// call to `list` or `listContinue`.
ListContinue(arg *ListFileRequestsContinueArg) (res *ListFileRequestsV2Result, err error)
// Update : Update a file request.
Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error)
}
type apiImpl dropbox.Context
//CountAPIError is an error-wrapper for the count route
type CountAPIError struct {
dropbox.APIError
EndpointError *CountFileRequestsError `json:"error"`
}
func (dbx *apiImpl) Count() (res *CountFileRequestsResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_requests",
Route: "count",
Auth: "user",
Style: "rpc",
Arg: nil,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr CountAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//CreateAPIError is an error-wrapper for the create route
type CreateAPIError struct {
dropbox.APIError
EndpointError *CreateFileRequestError `json:"error"`
}
func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileRequest, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_requests",
Route: "create",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr CreateAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//DeleteAPIError is an error-wrapper for the delete route
type DeleteAPIError struct {
dropbox.APIError
EndpointError *DeleteFileRequestError `json:"error"`
}
func (dbx *apiImpl) Delete(arg *DeleteFileRequestArgs) (res *DeleteFileRequestsResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_requests",
Route: "delete",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr DeleteAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//DeleteAllClosedAPIError is an error-wrapper for the delete_all_closed route
type DeleteAllClosedAPIError struct {
dropbox.APIError
EndpointError *DeleteAllClosedFileRequestsError `json:"error"`
}
func (dbx *apiImpl) DeleteAllClosed() (res *DeleteAllClosedFileRequestsResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_requests",
Route: "delete_all_closed",
Auth: "user",
Style: "rpc",
Arg: nil,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr DeleteAllClosedAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//GetAPIError is an error-wrapper for the get route
type GetAPIError struct {
dropbox.APIError
EndpointError *GetFileRequestError `json:"error"`
}
func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_requests",
Route: "get",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr GetAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//ListV2APIError is an error-wrapper for the list_v2 route
type ListV2APIError struct {
dropbox.APIError
EndpointError *ListFileRequestsError `json:"error"`
}
func (dbx *apiImpl) ListV2(arg *ListFileRequestsArg) (res *ListFileRequestsV2Result, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_requests",
Route: "list_v2",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr ListV2APIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//ListAPIError is an error-wrapper for the list route
type ListAPIError struct {
dropbox.APIError
EndpointError *ListFileRequestsError `json:"error"`
}
func (dbx *apiImpl) List() (res *ListFileRequestsResult, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_requests",
Route: "list",
Auth: "user",
Style: "rpc",
Arg: nil,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr ListAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//ListContinueAPIError is an error-wrapper for the list/continue route
type ListContinueAPIError struct {
dropbox.APIError
EndpointError *ListFileRequestsContinueError `json:"error"`
}
func (dbx *apiImpl) ListContinue(arg *ListFileRequestsContinueArg) (res *ListFileRequestsV2Result, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_requests",
Route: "list/continue",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr ListContinueAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
//UpdateAPIError is an error-wrapper for the update route
type UpdateAPIError struct {
dropbox.APIError
EndpointError *UpdateFileRequestError `json:"error"`
}
func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error) {
req := dropbox.Request{
Host: "api",
Namespace: "file_requests",
Route: "update",
Auth: "user",
Style: "rpc",
Arg: arg,
ExtraHeaders: nil,
}
var resp []byte
var respBody io.ReadCloser
resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
if err != nil {
var appErr UpdateAPIError
err = auth.ParseError(err, &appErr)
if err == &appErr {
err = appErr
}
return
}
err = json.Unmarshal(resp, &res)
if err != nil {
return
}
_ = respBody
return
}
// New returns a Client implementation for this namespace
func New(c dropbox.Config) Client {
ctx := apiImpl(dropbox.NewContext(c))
return &ctx
}
================================================
FILE: v6/dropbox/file_requests/types.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package file_requests : This namespace contains endpoints and data types for
// file request operations.
package file_requests
import (
"encoding/json"
"time"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
)
// GeneralFileRequestsError : There is an error accessing the file requests
// functionality.
type GeneralFileRequestsError struct {
dropbox.Tagged
}
// Valid tag values for GeneralFileRequestsError
const (
GeneralFileRequestsErrorDisabledForTeam = "disabled_for_team"
GeneralFileRequestsErrorOther = "other"
)
// CountFileRequestsError : There was an error counting the file requests.
type CountFileRequestsError struct {
dropbox.Tagged
}
// Valid tag values for CountFileRequestsError
const (
CountFileRequestsErrorDisabledForTeam = "disabled_for_team"
CountFileRequestsErrorOther = "other"
)
// CountFileRequestsResult : Result for `count`.
type CountFileRequestsResult struct {
// FileRequestCount : The number file requests owner by this user.
FileRequestCount uint64 `json:"file_request_count"`
}
// NewCountFileRequestsResult returns a new CountFileRequestsResult instance
func NewCountFileRequestsResult(FileRequestCount uint64) *CountFileRequestsResult {
s := new(CountFileRequestsResult)
s.FileRequestCount = FileRequestCount
return s
}
// CreateFileRequestArgs : Arguments for `create`.
type CreateFileRequestArgs struct {
// Title : The title of the file request. Must not be empty.
Title string `json:"title"`
// Destination : The path of the folder in the Dropbox where uploaded files
// will be sent. For apps with the app folder permission, this will be
// relative to the app folder.
Destination string `json:"destination"`
// Deadline : The deadline for the file request. Deadlines can only be set
// by Professional and Business accounts.
Deadline *FileRequestDeadline `json:"deadline,omitempty"`
// Open : Whether or not the file request should be open. If the file
// request is closed, it will not accept any file submissions, but it can be
// opened later.
Open bool `json:"open"`
// Description : A description of the file request.
Description string `json:"description,omitempty"`
}
// NewCreateFileRequestArgs returns a new CreateFileRequestArgs instance
func NewCreateFileRequestArgs(Title string, Destination string) *CreateFileRequestArgs {
s := new(CreateFileRequestArgs)
s.Title = Title
s.Destination = Destination
s.Open = true
return s
}
// FileRequestError : There is an error with the file request.
type FileRequestError struct {
dropbox.Tagged
}
// Valid tag values for FileRequestError
const (
FileRequestErrorDisabledForTeam = "disabled_for_team"
FileRequestErrorOther = "other"
FileRequestErrorNotFound = "not_found"
FileRequestErrorNotAFolder = "not_a_folder"
FileRequestErrorAppLacksAccess = "app_lacks_access"
FileRequestErrorNoPermission = "no_permission"
FileRequestErrorEmailUnverified = "email_unverified"
FileRequestErrorValidationError = "validation_error"
)
// CreateFileRequestError : There was an error creating the file request.
type CreateFileRequestError struct {
dropbox.Tagged
}
// Valid tag values for CreateFileRequestError
const (
CreateFileRequestErrorDisabledForTeam = "disabled_for_team"
CreateFileRequestErrorOther = "other"
CreateFileRequestErrorNotFound = "not_found"
CreateFileRequestErrorNotAFolder = "not_a_folder"
CreateFileRequestErrorAppLacksAccess = "app_lacks_access"
CreateFileRequestErrorNoPermission = "no_permission"
CreateFileRequestErrorEmailUnverified = "email_unverified"
CreateFileRequestErrorValidationError = "validation_error"
CreateFileRequestErrorInvalidLocation = "invalid_location"
CreateFileRequestErrorRateLimit = "rate_limit"
)
// DeleteAllClosedFileRequestsError : There was an error deleting all closed
// file requests.
type DeleteAllClosedFileRequestsError struct {
dropbox.Tagged
}
// Valid tag values for DeleteAllClosedFileRequestsError
const (
DeleteAllClosedFileRequestsErrorDisabledForTeam = "disabled_for_team"
DeleteAllClosedFileRequestsErrorOther = "other"
DeleteAllClosedFileRequestsErrorNotFound = "not_found"
DeleteAllClosedFileRequestsErrorNotAFolder = "not_a_folder"
DeleteAllClosedFileRequestsErrorAppLacksAccess = "app_lacks_access"
DeleteAllClosedFileRequestsErrorNoPermission = "no_permission"
DeleteAllClosedFileRequestsErrorEmailUnverified = "email_unverified"
DeleteAllClosedFileRequestsErrorValidationError = "validation_error"
)
// DeleteAllClosedFileRequestsResult : Result for `deleteAllClosed`.
type DeleteAllClosedFileRequestsResult struct {
// FileRequests : The file requests deleted for this user.
FileRequests []*FileRequest `json:"file_requests"`
}
// NewDeleteAllClosedFileRequestsResult returns a new DeleteAllClosedFileRequestsResult instance
func NewDeleteAllClosedFileRequestsResult(FileRequests []*FileRequest) *DeleteAllClosedFileRequestsResult {
s := new(DeleteAllClosedFileRequestsResult)
s.FileRequests = FileRequests
return s
}
// DeleteFileRequestArgs : Arguments for `delete`.
type DeleteFileRequestArgs struct {
// Ids : List IDs of the file requests to delete.
Ids []string `json:"ids"`
}
// NewDeleteFileRequestArgs returns a new DeleteFileRequestArgs instance
func NewDeleteFileRequestArgs(Ids []string) *DeleteFileRequestArgs {
s := new(DeleteFileRequestArgs)
s.Ids = Ids
return s
}
// DeleteFileRequestError : There was an error deleting these file requests.
type DeleteFileRequestError struct {
dropbox.Tagged
}
// Valid tag values for DeleteFileRequestError
const (
DeleteFileRequestErrorDisabledForTeam = "disabled_for_team"
DeleteFileRequestErrorOther = "other"
DeleteFileRequestErrorNotFound = "not_found"
DeleteFileRequestErrorNotAFolder = "not_a_folder"
DeleteFileRequestErrorAppLacksAccess = "app_lacks_access"
DeleteFileRequestErrorNoPermission = "no_permission"
DeleteFileRequestErrorEmailUnverified = "email_unverified"
DeleteFileRequestErrorValidationError = "validation_error"
DeleteFileRequestErrorFileRequestOpen = "file_request_open"
)
// DeleteFileRequestsResult : Result for `delete`.
type DeleteFileRequestsResult struct {
// FileRequests : The file requests deleted by the request.
FileRequests []*FileRequest `json:"file_requests"`
}
// NewDeleteFileRequestsResult returns a new DeleteFileRequestsResult instance
func NewDeleteFileRequestsResult(FileRequests []*FileRequest) *DeleteFileRequestsResult {
s := new(DeleteFileRequestsResult)
s.FileRequests = FileRequests
return s
}
// FileRequest : A `file request` <https://www.dropbox.com/help/9090> for
// receiving files into the user's Dropbox account.
type FileRequest struct {
// Id : The ID of the file request.
Id string `json:"id"`
// Url : The URL of the file request.
Url string `json:"url"`
// Title : The title of the file request.
Title string `json:"title"`
// Destination : The path of the folder in the Dropbox where uploaded files
// will be sent. This can be nil if the destination was removed. For apps
// with the app folder permission, this will be relative to the app folder.
Destination string `json:"destination,omitempty"`
// Created : When this file request was created.
Created time.Time `json:"created"`
// Deadline : The deadline for this file request. Only set if the request
// has a deadline.
Deadline *FileRequestDeadline `json:"deadline,omitempty"`
// IsOpen : Whether or not the file request is open. If the file request is
// closed, it will not accept any more file submissions.
IsOpen bool `json:"is_open"`
// FileCount : The number of files this file request has received.
FileCount int64 `json:"file_count"`
// Description : A description of the file request.
Description string `json:"description,omitempty"`
}
// NewFileRequest returns a new FileRequest instance
func NewFileRequest(Id string, Url string, Title string, Created time.Time, IsOpen bool, FileCount int64) *FileRequest {
s := new(FileRequest)
s.Id = Id
s.Url = Url
s.Title = Title
s.Created = Created
s.IsOpen = IsOpen
s.FileCount = FileCount
return s
}
// FileRequestDeadline : has no documentation (yet)
type FileRequestDeadline struct {
// Deadline : The deadline for this file request.
Deadline time.Time `json:"deadline"`
// AllowLateUploads : If set, allow uploads after the deadline has passed.
// These uploads will be marked overdue.
AllowLateUploads *GracePeriod `json:"allow_late_uploads,omitempty"`
}
// NewFileRequestDeadline returns a new FileRequestDeadline instance
func NewFileRequestDeadline(Deadline time.Time) *FileRequestDeadline {
s := new(FileRequestDeadline)
s.Deadline = Deadline
return s
}
// GetFileRequestArgs : Arguments for `get`.
type GetFileRequestArgs struct {
// Id : The ID of the file request to retrieve.
Id string `json:"id"`
}
// NewGetFileRequestArgs returns a new GetFileRequestArgs instance
func NewGetFileRequestArgs(Id string) *GetFileRequestArgs {
s := new(GetFileRequestArgs)
s.Id = Id
return s
}
// GetFileRequestError : There was an error retrieving the specified file
// request.
type GetFileRequestError struct {
dropbox.Tagged
}
// Valid tag values for GetFileRequestError
const (
GetFileRequestErrorDisabledForTeam = "disabled_for_team"
GetFileRequestErrorOther = "other"
GetFileRequestErrorNotFound = "not_found"
GetFileRequestErrorNotAFolder = "not_a_folder"
GetFileRequestErrorAppLacksAccess = "app_lacks_access"
GetFileRequestErrorNoPermission = "no_permission"
GetFileRequestErrorEmailUnverified = "email_unverified"
GetFileRequestErrorValidationError = "validation_error"
)
// GracePeriod : has no documentation (yet)
type GracePeriod struct {
dropbox.Tagged
}
// Valid tag values for GracePeriod
const (
GracePeriodOneDay = "one_day"
GracePeriodTwoDays = "two_days"
GracePeriodSevenDays = "seven_days"
GracePeriodThirtyDays = "thirty_days"
GracePeriodAlways = "always"
GracePeriodOther = "other"
)
// ListFileRequestsArg : Arguments for `list`.
type ListFileRequestsArg struct {
// Limit : The maximum number of file requests that should be returned per
// request.
Limit uint64 `json:"limit"`
}
// NewListFileRequestsArg returns a new ListFileRequestsArg instance
func NewListFileRequestsArg() *ListFileRequestsArg {
s := new(ListFileRequestsArg)
s.Limit = 1000
return s
}
// ListFileRequestsContinueArg : has no documentation (yet)
type ListFileRequestsContinueArg struct {
// Cursor : The cursor returned by the previous API call specified in the
// endpoint description.
Cursor string `json:"cursor"`
}
// NewListFileRequestsContinueArg returns a new ListFileRequestsContinueArg instance
func NewListFileRequestsContinueArg(Cursor string) *ListFileRequestsContinueArg {
s := new(ListFileRequestsContinueArg)
s.Cursor = Cursor
return s
}
// ListFileRequestsContinueError : There was an error retrieving the file
// requests.
type ListFileRequestsContinueError struct {
dropbox.Tagged
}
// Valid tag values for ListFileRequestsContinueError
const (
ListFileRequestsContinueErrorDisabledForTeam = "disabled_for_team"
ListFileRequestsContinueErrorOther = "other"
ListFileRequestsContinueErrorInvalidCursor = "invalid_cursor"
)
// ListFileRequestsError : There was an error retrieving the file requests.
type ListFileRequestsError struct {
dropbox.Tagged
}
// Valid tag values for ListFileRequestsError
const (
ListFileRequestsErrorDisabledForTeam = "disabled_for_team"
ListFileRequestsErrorOther = "other"
)
// ListFileRequestsResult : Result for `list`.
type ListFileRequestsResult struct {
// FileRequests : The file requests owned by this user. Apps with the app
// folder permission will only see file requests in their app folder.
FileRequests []*FileRequest `json:"file_requests"`
}
// NewListFileRequestsResult returns a new ListFileRequestsResult instance
func NewListFileRequestsResult(FileRequests []*FileRequest) *ListFileRequestsResult {
s := new(ListFileRequestsResult)
s.FileRequests = FileRequests
return s
}
// ListFileRequestsV2Result : Result for `list` and `listContinue`.
type ListFileRequestsV2Result struct {
// FileRequests : The file requests owned by this user. Apps with the app
// folder permission will only see file requests in their app folder.
FileRequests []*FileRequest `json:"file_requests"`
// Cursor : Pass the cursor into `listContinue` to obtain additional file
// requests.
Cursor string `json:"cursor"`
// HasMore : Is true if there are additional file requests that have not
// been returned yet. An additional call to :route:list/continue` can
// retrieve them.
HasMore bool `json:"has_more"`
}
// NewListFileRequestsV2Result returns a new ListFileRequestsV2Result instance
func NewListFileRequestsV2Result(FileRequests []*FileRequest, Cursor string, HasMore bool) *ListFileRequestsV2Result {
s := new(ListFileRequestsV2Result)
s.FileRequests = FileRequests
s.Cursor = Cursor
s.HasMore = HasMore
return s
}
// UpdateFileRequestArgs : Arguments for `update`.
type UpdateFileRequestArgs struct {
// Id : The ID of the file request to update.
Id string `json:"id"`
// Title : The new title of the file request. Must not be empty.
Title string `json:"title,omitempty"`
// Destination : The new path of the folder in the Dropbox where uploaded
// files will be sent. For apps with the app folder permission, this will be
// relative to the app folder.
Destination string `json:"destination,omitempty"`
// Deadline : The new deadline for the file request. Deadlines can only be
// set by Professional and Business accounts.
Deadline *UpdateFileRequestDeadline `json:"deadline"`
// Open : Whether to set this file request as open or closed.
Open bool `json:"open,omitempty"`
// Description : The description of the file request.
Description string `json:"description,omitempty"`
}
// NewUpdateFileRequestArgs returns a new UpdateFileRequestArgs instance
func NewUpdateFileRequestArgs(Id string) *UpdateFileRequestArgs {
s := new(UpdateFileRequestArgs)
s.Id = Id
s.Deadline = &UpdateFileRequestDeadline{Tagged: dropbox.Tagged{Tag: "no_update"}}
return s
}
// UpdateFileRequestDeadline : has no documentation (yet)
type UpdateFileRequestDeadline struct {
dropbox.Tagged
// Update : If nil, the file request's deadline is cleared.
Update *FileRequestDeadline `json:"update,omitempty"`
}
// Valid tag values for UpdateFileRequestDeadline
const (
UpdateFileRequestDeadlineNoUpdate = "no_update"
UpdateFileRequestDeadlineUpdate = "update"
UpdateFileRequestDeadlineOther = "other"
)
// UnmarshalJSON deserializes into a UpdateFileRequestDeadline instance
func (u *UpdateFileRequestDeadline) UnmarshalJSON(body []byte) error {
type wrap struct {
dropbox.Tagged
// Update : If nil, the file request's deadline is cleared.
Update *FileRequestDeadline `json:"update,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 "update":
u.Update = w.Update
}
return nil
}
// UpdateFileRequestError : There is an error updating the file request.
type UpdateFileRequestError struct {
dropbox.Tagged
}
// Valid tag values for UpdateFileRequestError
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"
)
================================================
FILE: v6/dropbox/files/client.go
================================================
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package files
import (
"encoding/json"
"io"
"log"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/async"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/file_properties"
)
// Client interface describes all routes in this namespace
type Client interface {
// AlphaGetMetadata : Returns the metadata for a file or folder. This is an
// alpha endpoint compatible with the properties API. Note: Metadata for the
// root folder is unsupported.
// Deprecated: Use `GetMetadata` instead
AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error)
// AlphaUpload : Create a new file with the contents provided in the
// request. Note that the behavior of this alpha endpoint is unstable and
// subject to change. Do not use this to upload a file larger than 150 MB.
// Instead, create an upload session with `uploadSessionStart`.
// Deprecated: Use `Upload` instead
AlphaUpload(arg *UploadArg, content io.Reader) (res *FileMetadata, err error)
// Copy : Copy a file or folder to a different location in the user's
// Dropbox. If the source path is a folder all its contents will be copied.
CopyV2(arg *RelocationArg) (res *RelocationResult, err error)
// Copy : Copy a file or folder to a different location in the user's
// Dropbox. If the source path is a folder all its contents will be copied.
// Deprecated: Use `CopyV2` instead
Copy(arg *RelocationArg) (res IsMetadata, err error)
// CopyBatch : Copy multiple files or folders to different locations at once
// in the user's Dropbox. This route will replace `copyBatch`. The main
// difference is this route will return status for each entry, while
// `copyBatch` raises failure if any entry fails. This route will either
// finish synchronously, or return a job ID and do the async copy job in
// background. Please use `copyBatchCheck` to check the job status.
CopyBatchV2(arg *RelocationBatchArgBase) (res *RelocationBatchV2Launch, err error)
// CopyBatch : Copy multiple files or folders to different locations at once
// in the user's Dropbox. This route will return job ID immediately and do
// the async copy job in background. Please use `copyBatchCheck` to check
// the job status.
// Deprecated: Use `CopyBatchV2` instead
CopyBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error)
// CopyBatchCheck : Returns the status of an asynchronous job for
// `copyBatch`. It returns list of results for each entry.
CopyBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error)
// CopyBatchCheck : Returns the status of an asynchronous job for
// `copyBatch`. If success, it returns list of results for each entry.
// Deprecated: Use `CopyBatchCheckV2` instead
CopyBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error)
// CopyReferenceGet : Get a copy reference to a file or folder. This
// reference string can be used to save that file or folder to another
// user's Dropbox by passing it to `copyReferenceSave`.
CopyReferenceGet(arg *GetCopyReferenceArg) (res *GetCopyReferenceResult, err error)
// CopyReferenceSave : Save a copy reference returned by `copyReferenceGet`
// to the user's Dropbox.
CopyReferenceSave(arg *SaveCopyReferenceArg) (res *SaveCopyReferenceResult, err error)
// CreateFolder : Create a folder at a given path.
CreateFolderV2(arg *CreateFolderArg) (res *CreateFolderResult, err error)
// CreateFolder : Create a folder at a given path.
// Deprecated: Use `CreateFolderV2` instead
CreateFolder(arg *CreateFolderArg) (res *FolderMetadata, err error)
// CreateFolderBatch : Create multiple folders at once. This route is
// asynchronous for large batches, which returns a job ID immediately and
// runs the create folder batch asynchronously. Otherwise, creates the
// folders and returns the result synchronously for smaller inputs. You can
// force asynchronous behaviour by using the
// `CreateFolderBatchArg.force_async` flag. Use `createFolderBatchCheck` to
// check the job status.
CreateFolderBatch(arg *CreateFolderBatchArg) (res *CreateFolderBatchLaunch, err error)
// CreateFolderBatchCheck : Returns the status of an asynchronous job for
// `createFolderBatch`. If success, it returns list of result for each
// entry.
CreateFolderBatchCheck(arg *async.PollArg) (res *CreateFolderBatchJobStatus, err error)
// Delete : Delete the file or folder at a given path. If the path is a
// folder, all its contents will be deleted too. A successful response
// indicates that the file or folder was deleted. The returned metadata will
// be the corresponding `FileMetadata` or `FolderMetadata` for the item at
// time of deletion, and not a `DeletedMetadata` object.
DeleteV2(arg *DeleteArg) (res *DeleteResult, err error)
// Delete : Delete the file or folder at a given path. If the path is a
// folder, all its contents will be deleted too. A successful response
// indicates that the file or folder was deleted. The returned metadata will
// be the corresponding `FileMetadata` or `FolderMetadata` for the item at
// time of deletion, and not a `DeletedMetadata` object.
// Deprecated: Use `DeleteV2` instead
Delete(arg *DeleteArg) (res IsMetadata, err error)
// DeleteBatch : Delete multiple files/folders at once. This route is
// asynchronous, which returns a job ID immediately and runs the delete
// batch asynchronously. Use `deleteBatchCheck` to check the job status.
DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatchLaunch, err error)
// DeleteBatchCheck : Returns the status of an asynchronous job for
// `deleteBatch`. If success, it returns list of result for each entry.
DeleteBatchCheck(arg *async.PollArg) (res *DeleteBatchJobStatus, err error)
// Download : Download a file from a user's Dropbox.
Download(arg *DownloadArg) (res *FileMetadata, content io.ReadCloser, err error)
// DownloadZip : Download a folder from the user's Dropbox, as a zip file.
// The folder must be less than 20 GB in size and any single file within
// must be less than 4 GB in size. The resulting zip must have fewer than
// 10,000 total file and folder entries, including the top level folder. The
// input cannot be a single file. Note: this endpoint does not support HTTP
// range requests.
DownloadZip(arg *DownloadZipArg) (res *DownloadZipResult, content io.ReadCloser, err error)
// Export : Export a file from a user's Dropbox. This route only supports
// exporting files that cannot be downloaded directly and whose
// `ExportResult.file_metadata` has `ExportInfo.export_as` populated.
Export(arg *ExportArg) (res *ExportResult, content io.ReadCloser, err error)
// GetFileLockBatch : Return the lock metadata for the given list of paths.
GetFileLockBatch(arg *LockFileBatchArg) (res *LockFileBatchResult, err error)
// GetMetadata : Returns the metadata for a file or folder. Note: Metadata
// for the root folder is unsupported.
GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error)
// GetPreview : Get a preview for a file. Currently, PDF previews are
// generated for files with the following extensions: .ai, .doc, .docm,
// .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt,
// .pptm, .pptx, .rtf. HTML previews are generated for files with the
// following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other
// formats will return an unsupported extension error.
GetPreview(arg *PreviewArg) (res *FileMetadata, content io.ReadCloser, err error)
// GetTemporaryLink : Get a temporary link to stream content of a file. This
// link will expire in four hours and afterwards you will get 410 Gone. This
// URL should not be used to display content directly in the browser. The
// Content-Type of the link is determined automatically by the file's mime
// type.
GetTemporaryLink(arg *GetTemporaryLinkArg) (res *GetTemporaryLinkResult, err error)
// GetTemporaryUploadLink : Get a one-time use temporary upload link to
// upload a file to a Dropbox location. This endpoint acts as a delayed
// `upload`. The returned temporary upload link may be used to make a POST
// request with the data to be uploaded. The upload will then be perfomed
// with the `CommitInfo` previously provided to `getTemporaryUploadLink` but
// evaluated only upon consumption. Hence, errors stemming from invalid
// `CommitInfo` with respect to the state of the user's Dropbox will only be
// communicated at consumption time. Additionally, these errors are surfaced
// as generic HTTP 409 Conflict responses, potentially hiding issue details.
// The maximum temporary upload link duration is 4 hours. Upon consumption
// or expiration, a new link will have to be generated. Multiple links may
// exist for a specific upload path at any given time. The POST request on
// the temporary upload link must have its Content-Type set to
// "application/octet-stream". Example temporary upload link consumption
// request: curl -X POST
// https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND --header
// "Content-Type: application/octet-stream" --data-binary @local_file.txt A
// successful temporary upload link consumption request returns the content
// hash of the uploaded data in JSON format. Example successful temporary
// upload link consumption response: {"content-hash":
// "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary
// upload link consumption request returns any of the following status
// codes: HTTP 400 Bad Request: Content-Type is not one of
// application/octet-stream and text/plain or request is invalid. HTTP 409
// Conflict: The temporary upload link does not exist or is currently
// unavailable, the upload failed, or another error happened. HTTP 410 Gone:
// The temporary upload link is expired or consumed. Example unsuccessful
// temporary upload link consumption response: Temporary upload link has
// been recently consumed.
GetTemporaryUploadLink(arg *GetTemporaryUploadLinkArg) (res *GetTemporaryUploadLinkResult, err error)
// GetThumbnail : Get a thumbnail for an image. This method currently
// supports files with the following file extensions: jpg, jpeg, png, tiff,
// tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size
// won't be converted to a thumbnail.
GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content io.ReadCloser, err error)
// GetThumbnail : Get a thumbnail for an image. This method currently
// supports files with the following file extensions: jpg, jpeg, png, tiff,
// tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size
// won't be converted to a thumbnail.
GetThumbnailV2(arg *ThumbnailV2Arg) (res *PreviewResult, content io.ReadCloser, err error)
// GetThumbnailBatch : Get thumbnails for a list of images. We allow up to
// 25 thumbnails in a single batch. This method currently supports files
// with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp,
// ppm and bmp. Photos that are larger than 20MB in size won't be converted
// to a thumbnail.
GetThumbnailBatch(arg *GetThumbnailBatchArg) (res *GetThumbnailBatchResult, err error)
// ListFolder : Starts returning the contents of a folder. If the result's
// `ListFolderResult.has_more` field is true, call `listFolderContinue` with
// the returned `ListFolderResult.cursor` to retrieve more entries. If
// you're using `ListFolderArg.recursive` set to true to keep a local cache
// of the contents of a Dropbox account, iterate through each entry in order
// and process them as follows to keep your local state in sync: For each
// `FileMetadata`, store the new entry at the given path in your local
// state. If the required parent folders don't exist yet, create them. If
// there's already something else at the given path, replace it and remove
// all its children. For each `FolderMetadata`, store the new entry at the
// given path in your local state. If the required parent folders don't
// exist yet, create them. If there's already something else at the given
// path, replace it but leave the children as they are. Check the new
// entry's `FolderSharingInfo.read_only` and set all its children's
// read-only statuses to match. For each `DeletedMetadata`, if your local
// state has something at the given path, remove it and all its children. If
// there's nothing at the given path, ignore this entry. Note:
// `auth.RateLimitError` may be returned if multiple `listFolder` or
// `listFolderContinue` calls with same parameters are made simultaneously
// by same API app for same user. If your app implements retry logic, please
// hold off the retry until the previous request finishes.
ListFolder(arg *ListFolderArg) (res *ListFolderResult, err error)
// ListFolderContinue : Once a cursor has been retrieved from `listFolder`,
// use this to paginate through all files and retrieve updates to the
// folder, following the same rules as documented for `listFolder`.
ListFolderContinue(arg *ListFolderContinueArg) (res *ListFolderResult, err error)
// ListFolderGetLatestCursor : A way to quickly get a cursor for the
// folder's state. Unlike `listFolder`, `listFolderGetLatestCursor` doesn't
// return any entries. This endpoint is for app which only needs to know
// about new files and modifications and doesn't need to know about files
// that already exist in Dropbox.
ListFolderGetLatestCursor(arg *ListFolderArg) (res *ListFolderGetLatestCursorResult, err error)
// ListFolderLongpoll : A longpoll endpoint to wait for changes on an
// account. In conjunction with `listFolderContinue`, this call gives you a
// low-latency way to monitor an account for file changes. The connection
// will block until there are changes available or a timeout occurs. This
// endpoint is useful mostly for client-side apps. If you're looking for
// server-side notifications, check out our `webhooks documentation`
// <https://www.dropbox.com/developers/reference/webhooks>.
ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFolderLongpollResult, err error)
// ListRevisions : Returns revisions for files based on a file path or a
// file id. The file path or file id is identified from the latest file
// entry at the given file path or id. This end point allows your app to
// query either by file path or file id by setting the mode parameter
// appropriately. In the `ListRevisionsMode.path` (default) mode, all
// revisions at the same file path as the latest file entry are returned. If
// revisions with the same file id are desired, then mode must be set to
// `ListRevisionsMode.id`. The `ListRevisionsMode.id` mode is useful to
// retrieve revisions for a given file across moves or renames.
ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResult, err error)
// LockFileBatch : Lock the files at the given paths. A locked file will be
// writable only by the lock holder. A successful response indicates that
// the file has been locked. Returns a list of the locked file paths and
// their metadata after this operation.
LockFileBatch(arg *LockFileBatchArg) (res *LockFileBatchResult, err error)
// Move : Move a file or folder to a different location in the user's
// Dropbox. If the source path is a folder all its contents will be moved.
// Note that we do not currently support case-only renaming.
MoveV2(arg *RelocationArg) (res *RelocationResult, err error)
// Move : Move a file or folder to a different location in the user's
// Dropbox. If the source path is a folder all its contents will be moved.
// Deprecated: Use `MoveV2` instead
Move(arg *RelocationArg) (res IsMetadata, err error)
// MoveBatch : Move multiple files or folders to different locations at once
// in the user's Dropbox. Note that we do not currently support case-only
// renaming. This route will replace `moveBatch`. The main difference is
// this route will return status for each entry, while `moveBatch` raises
// failure if any entry fails. This route will either finish synchronously,
// or return a job ID and do the async move job in background. Please use
// `moveBatchCheck` to check the job status.
MoveBatchV2(arg *MoveBatchArg) (res *RelocationBatchV2Launch, err error)
// MoveBatch : Move multiple files or folders to different locations at once
// in the user's Dropbox. This route will return job ID immediately and do
// the async moving job in background. Please use `moveBatchCheck` to check
// the job status.
// Deprecated: Use `MoveBatchV2` instead
MoveBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error)
// MoveBatchCheck : Returns the status of an asynchronous job for
// `moveBatch`. It returns list of results for each entry.
MoveBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error)
// MoveBatchCheck : Returns the status of an asynchronous job for
// `moveBatch`. If success, it returns list of results for each entry.
// Deprecated: Use `MoveBatchCheckV2` instead
MoveBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error)
// PaperCreate : Creates a new Paper doc with the provided content.
PaperCreate(arg *PaperCreateArg, content io.Reader) (res *PaperCreateResult, err error)
// PaperUpdate : Updates an existing Paper doc with the provided content.
PaperUpdate(arg *PaperUpdateArg, content io.Reader) (res *PaperUpdateResult, err error)
// PermanentlyDelete : Permanently delete the file or folder at a given path
// (see https://www.dropbox.com/en/help/40). If the given file or folder is
// not yet deleted, this route will first delete it. It is possible for this
// route to successfully delete, then fail to permanently delete. Note: This
// endpoint is only available for Dropbox Business apps.
PermanentlyDelete(arg *DeleteArg) (err error)
// PropertiesAdd : has no documentation (yet)
// Deprecated:
PropertiesAdd(arg *file_properties.AddPropertiesArg) (err error)
// PropertiesOverwrite : has no documentation (yet)
// Deprecated:
PropertiesOverwrite(arg *file_properties.OverwritePropertyGroupArg) (err error)
// PropertiesRemove : has no documentation (yet)
// Deprecated:
PropertiesRemove(arg *file_properties.RemovePropertiesArg) (err error)
// PropertiesTemplateGet : has no documentation (yet)
// Deprecated:
PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error)
// PropertiesTemplateList : has no documentation (yet)
// Deprecated:
PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error)
// PropertiesUpdate : has no doc
gitextract_i16arub0/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── config.yml
│ │ ├── feature_request.md
│ │ └── question_help.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── codeql-analysis.yml
│ ├── lint.yml
│ └── test.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── generator/
│ ├── README.md
│ ├── generate-sdk.sh
│ ├── go_client.stoneg.py
│ ├── go_helpers.py
│ ├── go_rsrc/
│ │ └── sdk.go
│ └── go_types.stoneg.py
└── v6/
├── dropbox/
│ ├── account/
│ │ ├── client.go
│ │ └── types.go
│ ├── async/
│ │ └── types.go
│ ├── auth/
│ │ ├── client.go
│ │ ├── sdk.go
│ │ └── types.go
│ ├── check/
│ │ ├── client.go
│ │ └── types.go
│ ├── common/
│ │ └── types.go
│ ├── contacts/
│ │ ├── client.go
│ │ └── types.go
│ ├── file_properties/
│ │ ├── client.go
│ │ └── types.go
│ ├── file_requests/
│ │ ├── client.go
│ │ └── types.go
│ ├── files/
│ │ ├── client.go
│ │ └── types.go
│ ├── openid/
│ │ ├── client.go
│ │ └── types.go
│ ├── paper/
│ │ ├── client.go
│ │ └── types.go
│ ├── sdk.go
│ ├── sdk_test.go
│ ├── secondary_emails/
│ │ └── types.go
│ ├── seen_state/
│ │ └── types.go
│ ├── sharing/
│ │ ├── client.go
│ │ └── types.go
│ ├── team/
│ │ ├── client.go
│ │ └── types.go
│ ├── team_common/
│ │ └── types.go
│ ├── team_log/
│ │ ├── client.go
│ │ └── types.go
│ ├── team_policies/
│ │ └── types.go
│ ├── users/
│ │ ├── client.go
│ │ └── types.go
│ └── users_common/
│ └── types.go
├── go.mod
└── go.sum
Showing preview only (874K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (7930 symbols across 40 files)
FILE: generator/go_client.stoneg.py
class GoClientBackend (line 17) | class GoClientBackend(CodeBackend):
method generate (line 18) | def generate(self, api):
method _generate_client (line 23) | def _generate_client(self, namespace):
method _generate_route_signature (line 47) | def _generate_route_signature(self, namespace, route):
method _generate_route (line 69) | def _generate_route(self, namespace, route):
FILE: generator/go_helpers.py
function _rename_if_reserved (line 65) | def _rename_if_reserved(s):
function fmt_type (line 72) | def fmt_type(data_type, namespace=None, use_interface=False, raw=False):
function fmt_var (line 101) | def fmt_var(name, export=True, check_reserved=False):
function _doc_handler (line 106) | def _doc_handler(tag, val):
function generate_doc (line 125) | def generate_doc(code_generator, t):
function _needs_base_type (line 148) | def _needs_base_type(data_type):
function needs_base_type (line 159) | def needs_base_type(struct):
FILE: generator/go_rsrc/sdk.go
constant apiVersion (line 39) | apiVersion = 2
constant defaultDomain (line 40) | defaultDomain = ".dropboxapi.com"
constant hostAPI (line 41) | hostAPI = "api"
constant hostContent (line 42) | hostContent = "content"
constant hostNotify (line 43) | hostNotify = "notify"
constant sdkVersion (line 44) | sdkVersion = "UNKNOWN SDK VERSION"
constant specVersion (line 45) | specVersion = "UNKNOWN SPEC VERSION"
function Version (line 49) | func Version() (string, string) {
type Tagged (line 54) | type Tagged struct
type APIError (line 59) | type APIError struct
method Error (line 63) | func (e APIError) Error() string {
type SDKInternalError (line 67) | type SDKInternalError struct
method Error (line 72) | func (e SDKInternalError) Error() string {
type Config (line 77) | type Config struct
method doLog (line 117) | func (c *Config) doLog(l LogLevel, format string, v ...interface{}) {
method LogDebug (line 130) | func (c *Config) LogDebug(format string, v ...interface{}) {
method LogInfo (line 135) | func (c *Config) LogInfo(format string, v ...interface{}) {
method WithNamespaceID (line 140) | func (c Config) WithNamespaceID(nsID string) Config {
method WithRoot (line 145) | func (c Config) WithRoot(nsID string) Config {
type LogLevel (line 101) | type LogLevel
method shouldLog (line 113) | func (l LogLevel) shouldLog(v LogLevel) bool {
constant LogOff (line 105) | LogOff LogLevel = iota * (1 << 8)
constant LogDebug (line 108) | LogDebug
constant LogInfo (line 110) | LogInfo
type Context (line 151) | type Context struct
method Execute (line 170) | func (c *Context) Execute(req Request, body io.Reader) ([]byte, io.Rea...
type Request (line 159) | type Request struct
function NewContext (line 266) | func NewContext(c Config) Context {
function OAuthEndpoint (line 308) | func OAuthEndpoint(domain string) oauth2.Endpoint {
function HTTPHeaderSafeJSON (line 324) | func HTTPHeaderSafeJSON(b []byte) string {
FILE: generator/go_types.stoneg.py
class GoTypesBackend (line 26) | class GoTypesBackend(CodeBackend):
method generate (line 27) | def generate(self, api):
method _generate_namespace (line 34) | def _generate_namespace(self, namespace):
method _generate_data_type (line 47) | def _generate_data_type(self, data_type):
method _generate_base_type (line 58) | def _generate_base_type(self, base):
method _generate_struct (line 83) | def _generate_struct(self, struct):
method _generate_struct_builder (line 127) | def _generate_struct_builder(self, struct):
method _generate_field (line 157) | def _generate_field(self, field, union_field=False, namespace=None, ra...
method _generate_union (line 166) | def _generate_union(self, union):
method _generate_union_helper (line 169) | def _generate_union_helper(self, u):
FILE: v6/dropbox/account/client.go
type Client (line 32) | type Client interface
type apiImpl (line 37) | type apiImpl
method SetProfilePhoto (line 45) | func (dbx *apiImpl) SetProfilePhoto(arg *SetProfilePhotoArg) (res *Set...
type SetProfilePhotoAPIError (line 40) | type SetProfilePhotoAPIError struct
function New (line 78) | func New(c dropbox.Config) Client {
FILE: v6/dropbox/account/types.go
type PhotoSourceArg (line 31) | type PhotoSourceArg struct
method UnmarshalJSON (line 44) | func (u *PhotoSourceArg) UnmarshalJSON(body []byte) error {
constant PhotoSourceArgBase64Data (line 39) | PhotoSourceArgBase64Data = "base64_data"
constant PhotoSourceArgOther (line 40) | PhotoSourceArgOther = "other"
type SetProfilePhotoArg (line 65) | type SetProfilePhotoArg struct
function NewSetProfilePhotoArg (line 71) | func NewSetProfilePhotoArg(Photo *PhotoSourceArg) *SetProfilePhotoArg {
type SetProfilePhotoError (line 78) | type SetProfilePhotoError struct
constant SetProfilePhotoErrorFileTypeError (line 84) | SetProfilePhotoErrorFileTypeError = "file_type_error"
constant SetProfilePhotoErrorFileSizeError (line 85) | SetProfilePhotoErrorFileSizeError = "file_size_error"
constant SetProfilePhotoErrorDimensionError (line 86) | SetProfilePhotoErrorDimensionError = "dimension_error"
constant SetProfilePhotoErrorThumbnailError (line 87) | SetProfilePhotoErrorThumbnailError = "thumbnail_error"
constant SetProfilePhotoErrorTransientError (line 88) | SetProfilePhotoErrorTransientError = "transient_error"
constant SetProfilePhotoErrorOther (line 89) | SetProfilePhotoErrorOther = "other"
type SetProfilePhotoResult (line 93) | type SetProfilePhotoResult struct
function NewSetProfilePhotoResult (line 99) | func NewSetProfilePhotoResult(ProfilePhotoUrl string) *SetProfilePhotoRe...
FILE: v6/dropbox/async/types.go
type LaunchResultBase (line 35) | type LaunchResultBase struct
method UnmarshalJSON (line 49) | func (u *LaunchResultBase) UnmarshalJSON(body []byte) error {
constant LaunchResultBaseAsyncJobId (line 45) | LaunchResultBaseAsyncJobId = "async_job_id"
type LaunchEmptyResult (line 74) | type LaunchEmptyResult struct
method UnmarshalJSON (line 89) | func (u *LaunchEmptyResult) UnmarshalJSON(body []byte) error {
constant LaunchEmptyResultAsyncJobId (line 84) | LaunchEmptyResultAsyncJobId = "async_job_id"
constant LaunchEmptyResultComplete (line 85) | LaunchEmptyResultComplete = "complete"
type PollArg (line 112) | type PollArg struct
function NewPollArg (line 119) | func NewPollArg(AsyncJobId string) *PollArg {
type PollResultBase (line 129) | type PollResultBase struct
constant PollResultBaseInProgress (line 135) | PollResultBaseInProgress = "in_progress"
type PollEmptyResult (line 141) | type PollEmptyResult struct
constant PollEmptyResultInProgress (line 147) | PollEmptyResultInProgress = "in_progress"
constant PollEmptyResultComplete (line 148) | PollEmptyResultComplete = "complete"
type PollError (line 153) | type PollError struct
constant PollErrorInvalidAsyncJobId (line 159) | PollErrorInvalidAsyncJobId = "invalid_async_job_id"
constant PollErrorInternalError (line 160) | PollErrorInternalError = "internal_error"
constant PollErrorOther (line 161) | PollErrorOther = "other"
FILE: v6/dropbox/auth/client.go
type Client (line 31) | type Client interface
type apiImpl (line 42) | type apiImpl
method TokenFromOauth1 (line 50) | func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *Tok...
method TokenRevoke (line 88) | func (dbx *apiImpl) TokenRevoke() (err error) {
type TokenFromOauth1APIError (line 45) | type TokenFromOauth1APIError struct
type TokenRevokeAPIError (line 83) | type TokenRevokeAPIError struct
function New (line 117) | func New(c dropbox.Config) Client {
FILE: v6/dropbox/auth/sdk.go
type AuthAPIError (line 11) | type AuthAPIError struct
type AccessAPIError (line 17) | type AccessAPIError struct
type RateLimitAPIError (line 23) | type RateLimitAPIError struct
type BadRequest (line 29) | type BadRequest struct
type ServerError (line 35) | type ServerError struct
function ParseError (line 40) | func ParseError(err error, appError error) error {
FILE: v6/dropbox/auth/types.go
type AccessError (line 32) | type AccessError struct
method UnmarshalJSON (line 48) | func (u *AccessError) UnmarshalJSON(body []byte) error {
constant AccessErrorInvalidAccountType (line 42) | AccessErrorInvalidAccountType = "invalid_account_type"
constant AccessErrorPaperAccessDenied (line 43) | AccessErrorPaperAccessDenied = "paper_access_denied"
constant AccessErrorOther (line 44) | AccessErrorOther = "other"
type AuthError (line 74) | type AuthError struct
method UnmarshalJSON (line 94) | func (u *AuthError) UnmarshalJSON(body []byte) error {
constant AuthErrorInvalidAccessToken (line 83) | AuthErrorInvalidAccessToken = "invalid_access_token"
constant AuthErrorInvalidSelectUser (line 84) | AuthErrorInvalidSelectUser = "invalid_select_user"
constant AuthErrorInvalidSelectAdmin (line 85) | AuthErrorInvalidSelectAdmin = "invalid_select_admin"
constant AuthErrorUserSuspended (line 86) | AuthErrorUserSuspended = "user_suspended"
constant AuthErrorExpiredAccessToken (line 87) | AuthErrorExpiredAccessToken = "expired_access_token"
constant AuthErrorMissingScope (line 88) | AuthErrorMissingScope = "missing_scope"
constant AuthErrorRouteAccessDenied (line 89) | AuthErrorRouteAccessDenied = "route_access_denied"
constant AuthErrorOther (line 90) | AuthErrorOther = "other"
type InvalidAccountTypeError (line 115) | type InvalidAccountTypeError struct
constant InvalidAccountTypeErrorEndpoint (line 121) | InvalidAccountTypeErrorEndpoint = "endpoint"
constant InvalidAccountTypeErrorFeature (line 122) | InvalidAccountTypeErrorFeature = "feature"
constant InvalidAccountTypeErrorOther (line 123) | InvalidAccountTypeErrorOther = "other"
type PaperAccessError (line 127) | type PaperAccessError struct
constant PaperAccessErrorPaperDisabled (line 133) | PaperAccessErrorPaperDisabled = "paper_disabled"
constant PaperAccessErrorNotPaperUser (line 134) | PaperAccessErrorNotPaperUser = "not_paper_user"
constant PaperAccessErrorOther (line 135) | PaperAccessErrorOther = "other"
type RateLimitError (line 139) | type RateLimitError struct
function NewRateLimitError (line 148) | func NewRateLimitError(Reason *RateLimitReason) *RateLimitError {
type RateLimitReason (line 156) | type RateLimitReason struct
constant RateLimitReasonTooManyRequests (line 162) | RateLimitReasonTooManyRequests = "too_many_requests"
constant RateLimitReasonTooManyWriteOperations (line 163) | RateLimitReasonTooManyWriteOperations = "too_many_write_operations"
constant RateLimitReasonOther (line 164) | RateLimitReasonOther = "other"
type TokenFromOAuth1Arg (line 168) | type TokenFromOAuth1Arg struct
function NewTokenFromOAuth1Arg (line 177) | func NewTokenFromOAuth1Arg(Oauth1Token string, Oauth1TokenSecret string)...
type TokenFromOAuth1Error (line 185) | type TokenFromOAuth1Error struct
constant TokenFromOAuth1ErrorInvalidOauth1TokenInfo (line 191) | TokenFromOAuth1ErrorInvalidOauth1TokenInfo = "invalid_oauth1_token_info"
constant TokenFromOAuth1ErrorAppIdMismatch (line 192) | TokenFromOAuth1ErrorAppIdMismatch = "app_id_mismatch"
constant TokenFromOAuth1ErrorOther (line 193) | TokenFromOAuth1ErrorOther = "other"
type TokenFromOAuth1Result (line 197) | type TokenFromOAuth1Result struct
function NewTokenFromOAuth1Result (line 204) | func NewTokenFromOAuth1Result(Oauth2Token string) *TokenFromOAuth1Result {
type TokenScopeError (line 211) | type TokenScopeError struct
function NewTokenScopeError (line 217) | func NewTokenScopeError(RequiredScope string) *TokenScopeError {
FILE: v6/dropbox/check/client.go
type Client (line 32) | type Client interface
type apiImpl (line 49) | type apiImpl
method App (line 57) | func (dbx *apiImpl) App(arg *EchoArg) (res *EchoResult, err error) {
method User (line 95) | func (dbx *apiImpl) User(arg *EchoArg) (res *EchoResult, err error) {
type AppAPIError (line 52) | type AppAPIError struct
type UserAPIError (line 90) | type UserAPIError struct
function New (line 128) | func New(c dropbox.Config) Client {
FILE: v6/dropbox/check/types.go
type EchoArg (line 25) | type EchoArg struct
function NewEchoArg (line 31) | func NewEchoArg() *EchoArg {
type EchoResult (line 39) | type EchoResult struct
function NewEchoResult (line 45) | func NewEchoResult() *EchoResult {
FILE: v6/dropbox/common/types.go
type PathRoot (line 31) | type PathRoot struct
method UnmarshalJSON (line 52) | func (u *PathRoot) UnmarshalJSON(body []byte) error {
constant PathRootHome (line 45) | PathRootHome = "home"
constant PathRootRoot (line 46) | PathRootRoot = "root"
constant PathRootNamespaceId (line 47) | PathRootNamespaceId = "namespace_id"
constant PathRootOther (line 48) | PathRootOther = "other"
type PathRootError (line 82) | type PathRootError struct
method UnmarshalJSON (line 97) | func (u *PathRootError) UnmarshalJSON(body []byte) error {
constant PathRootErrorInvalidRoot (line 91) | PathRootErrorInvalidRoot = "invalid_root"
constant PathRootErrorNoPermission (line 92) | PathRootErrorNoPermission = "no_permission"
constant PathRootErrorOther (line 93) | PathRootErrorOther = "other"
type RootInfo (line 121) | type RootInfo struct
method IsRootInfo (line 145) | func (u *RootInfo) IsRootInfo() {}
function NewRootInfo (line 132) | func NewRootInfo(RootNamespaceId string, HomeNamespaceId string) *RootIn...
type IsRootInfo (line 140) | type IsRootInfo interface
type rootInfoUnion (line 147) | type rootInfoUnion struct
method UnmarshalJSON (line 162) | func (u *rootInfoUnion) UnmarshalJSON(body []byte) error {
constant RootInfoTeam (line 157) | RootInfoTeam = "team"
constant RootInfoUser (line 158) | RootInfoUser = "user"
function IsRootInfoFromJSON (line 188) | func IsRootInfoFromJSON(data []byte) (IsRootInfo, error) {
type TeamRootInfo (line 206) | type TeamRootInfo struct
function NewTeamRootInfo (line 213) | func NewTeamRootInfo(RootNamespaceId string, HomeNamespaceId string, Hom...
type UserRootInfo (line 223) | type UserRootInfo struct
function NewUserRootInfo (line 228) | func NewUserRootInfo(RootNamespaceId string, HomeNamespaceId string) *Us...
FILE: v6/dropbox/contacts/client.go
type Client (line 31) | type Client interface
type apiImpl (line 41) | type apiImpl
method DeleteManualContacts (line 49) | func (dbx *apiImpl) DeleteManualContacts() (err error) {
method DeleteManualContactsBatch (line 83) | func (dbx *apiImpl) DeleteManualContactsBatch(arg *DeleteManualContact...
type DeleteManualContactsAPIError (line 44) | type DeleteManualContactsAPIError struct
type DeleteManualContactsBatchAPIError (line 78) | type DeleteManualContactsBatchAPIError struct
function New (line 112) | func New(c dropbox.Config) Client {
FILE: v6/dropbox/contacts/types.go
type DeleteManualContactsArg (line 31) | type DeleteManualContactsArg struct
function NewDeleteManualContactsArg (line 37) | func NewDeleteManualContactsArg(EmailAddresses []string) *DeleteManualCo...
type DeleteManualContactsError (line 44) | type DeleteManualContactsError struct
method UnmarshalJSON (line 58) | func (u *DeleteManualContactsError) UnmarshalJSON(body []byte) error {
constant DeleteManualContactsErrorContactsNotFound (line 53) | DeleteManualContactsErrorContactsNotFound = "contacts_not_found"
constant DeleteManualContactsErrorOther (line 54) | DeleteManualContactsErrorOther = "other"
FILE: v6/dropbox/file_properties/client.go
type Client (line 32) | type Client interface
type apiImpl (line 102) | type apiImpl
method PropertiesAdd (line 110) | func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) {
method PropertiesOverwrite (line 144) | func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg...
method PropertiesRemove (line 178) | func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err er...
method PropertiesSearch (line 212) | func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *P...
method PropertiesSearchContinue (line 250) | func (dbx *apiImpl) PropertiesSearchContinue(arg *PropertiesSearchCont...
method PropertiesUpdate (line 288) | func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err er...
method TemplatesAddForTeam (line 322) | func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *Add...
method TemplatesAddForUser (line 360) | func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *Add...
method TemplatesGetForTeam (line 398) | func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *Get...
method TemplatesGetForUser (line 436) | func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *Get...
method TemplatesListForTeam (line 474) | func (dbx *apiImpl) TemplatesListForTeam() (res *ListTemplateResult, e...
method TemplatesListForUser (line 512) | func (dbx *apiImpl) TemplatesListForUser() (res *ListTemplateResult, e...
method TemplatesRemoveForTeam (line 550) | func (dbx *apiImpl) TemplatesRemoveForTeam(arg *RemoveTemplateArg) (er...
method TemplatesRemoveForUser (line 584) | func (dbx *apiImpl) TemplatesRemoveForUser(arg *RemoveTemplateArg) (er...
method TemplatesUpdateForTeam (line 618) | func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (re...
method TemplatesUpdateForUser (line 656) | func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (re...
type PropertiesAddAPIError (line 105) | type PropertiesAddAPIError struct
type PropertiesOverwriteAPIError (line 139) | type PropertiesOverwriteAPIError struct
type PropertiesRemoveAPIError (line 173) | type PropertiesRemoveAPIError struct
type PropertiesSearchAPIError (line 207) | type PropertiesSearchAPIError struct
type PropertiesSearchContinueAPIError (line 245) | type PropertiesSearchContinueAPIError struct
type PropertiesUpdateAPIError (line 283) | type PropertiesUpdateAPIError struct
type TemplatesAddForTeamAPIError (line 317) | type TemplatesAddForTeamAPIError struct
type TemplatesAddForUserAPIError (line 355) | type TemplatesAddForUserAPIError struct
type TemplatesGetForTeamAPIError (line 393) | type TemplatesGetForTeamAPIError struct
type TemplatesGetForUserAPIError (line 431) | type TemplatesGetForUserAPIError struct
type TemplatesListForTeamAPIError (line 469) | type TemplatesListForTeamAPIError struct
type TemplatesListForUserAPIError (line 507) | type TemplatesListForUserAPIError struct
type TemplatesRemoveForTeamAPIError (line 545) | type TemplatesRemoveForTeamAPIError struct
type TemplatesRemoveForUserAPIError (line 579) | type TemplatesRemoveForUserAPIError struct
type TemplatesUpdateForTeamAPIError (line 613) | type TemplatesUpdateForTeamAPIError struct
type TemplatesUpdateForUserAPIError (line 651) | type TemplatesUpdateForUserAPIError struct
function New (line 689) | func New(c dropbox.Config) Client {
FILE: v6/dropbox/file_properties/types.go
type AddPropertiesArg (line 55) | type AddPropertiesArg struct
function NewAddPropertiesArg (line 64) | func NewAddPropertiesArg(Path string, PropertyGroups []*PropertyGroup) *...
type TemplateError (line 72) | type TemplateError struct
method UnmarshalJSON (line 86) | func (u *TemplateError) UnmarshalJSON(body []byte) error {
constant TemplateErrorTemplateNotFound (line 80) | TemplateErrorTemplateNotFound = "template_not_found"
constant TemplateErrorRestrictedContent (line 81) | TemplateErrorRestrictedContent = "restricted_content"
constant TemplateErrorOther (line 82) | TemplateErrorOther = "other"
type PropertiesError (line 107) | type PropertiesError struct
method UnmarshalJSON (line 125) | func (u *PropertiesError) UnmarshalJSON(body []byte) error {
constant PropertiesErrorTemplateNotFound (line 117) | PropertiesErrorTemplateNotFound = "template_not_found"
constant PropertiesErrorRestrictedContent (line 118) | PropertiesErrorRestrictedContent = "restricted_content"
constant PropertiesErrorOther (line 119) | PropertiesErrorOther = "other"
constant PropertiesErrorPath (line 120) | PropertiesErrorPath = "path"
constant PropertiesErrorUnsupportedFolder (line 121) | PropertiesErrorUnsupportedFolder = "unsupported_folder"
type InvalidPropertyGroupError (line 151) | type InvalidPropertyGroupError struct
method UnmarshalJSON (line 172) | func (u *InvalidPropertyGroupError) UnmarshalJSON(body []byte) error {
constant InvalidPropertyGroupErrorTemplateNotFound (line 161) | InvalidPropertyGroupErrorTemplateNotFound = "template_not_found"
constant InvalidPropertyGroupErrorRestrictedContent (line 162) | InvalidPropertyGroupErrorRestrictedContent = "restricted_content"
constant InvalidPropertyGroupErrorOther (line 163) | InvalidPropertyGroupErrorOther = "other"
constant InvalidPropertyGroupErrorPath (line 164) | InvalidPropertyGroupErrorPath = "path"
constant InvalidPropertyGroupErrorUnsupportedFolder (line 165) | InvalidPropertyGroupErrorUnsupportedFolder = "unsupported_folder"
constant InvalidPropertyGroupErrorPropertyFieldTooLarge (line 166) | InvalidPropertyGroupErrorPropertyFieldTooLarge = "property_field_too_l...
constant InvalidPropertyGroupErrorDoesNotFitTemplate (line 167) | InvalidPropertyGroupErrorDoesNotFitTemplate = "does_not_fit_template"
constant InvalidPropertyGroupErrorDuplicatePropertyGroups (line 168) | InvalidPropertyGroupErrorDuplicatePropertyGroups = "duplicate_property_g...
type AddPropertiesError (line 198) | type AddPropertiesError struct
method UnmarshalJSON (line 220) | func (u *AddPropertiesError) UnmarshalJSON(body []byte) error {
constant AddPropertiesErrorTemplateNotFound (line 208) | AddPropertiesErrorTemplateNotFound = "template_not_found"
constant AddPropertiesErrorRestrictedContent (line 209) | AddPropertiesErrorRestrictedContent = "restricted_content"
constant AddPropertiesErrorOther (line 210) | AddPropertiesErrorOther = "other"
constant AddPropertiesErrorPath (line 211) | AddPropertiesErrorPath = "path"
constant AddPropertiesErrorUnsupportedFolder (line 212) | AddPropertiesErrorUnsupportedFolder = "unsupported_folder"
constant AddPropertiesErrorPropertyFieldTooLarge (line 213) | AddPropertiesErrorPropertyFieldTooLarge = "property_field_too_large"
constant AddPropertiesErrorDoesNotFitTemplate (line 214) | AddPropertiesErrorDoesNotFitTemplate = "does_not_fit_template"
constant AddPropertiesErrorDuplicatePropertyGroups (line 215) | AddPropertiesErrorDuplicatePropertyGroups = "duplicate_property_groups"
constant AddPropertiesErrorPropertyGroupAlreadyExists (line 216) | AddPropertiesErrorPropertyGroupAlreadyExists = "property_group_already_e...
type PropertyGroupTemplate (line 246) | type PropertyGroupTemplate struct
function NewPropertyGroupTemplate (line 259) | func NewPropertyGroupTemplate(Name string, Description string, Fields []...
type AddTemplateArg (line 268) | type AddTemplateArg struct
function NewAddTemplateArg (line 273) | func NewAddTemplateArg(Name string, Description string, Fields []*Proper...
type AddTemplateResult (line 282) | type AddTemplateResult struct
function NewAddTemplateResult (line 289) | func NewAddTemplateResult(TemplateId string) *AddTemplateResult {
type GetTemplateArg (line 296) | type GetTemplateArg struct
function NewGetTemplateArg (line 303) | func NewGetTemplateArg(TemplateId string) *GetTemplateArg {
type GetTemplateResult (line 310) | type GetTemplateResult struct
function NewGetTemplateResult (line 315) | func NewGetTemplateResult(Name string, Description string, Fields []*Pro...
type ListTemplateResult (line 324) | type ListTemplateResult struct
function NewListTemplateResult (line 331) | func NewListTemplateResult(TemplateIds []string) *ListTemplateResult {
type LogicalOperator (line 338) | type LogicalOperator struct
constant LogicalOperatorOrOperator (line 344) | LogicalOperatorOrOperator = "or_operator"
constant LogicalOperatorOther (line 345) | LogicalOperatorOther = "other"
type LookUpPropertiesError (line 349) | type LookUpPropertiesError struct
constant LookUpPropertiesErrorPropertyGroupNotFound (line 355) | LookUpPropertiesErrorPropertyGroupNotFound = "property_group_not_found"
constant LookUpPropertiesErrorOther (line 356) | LookUpPropertiesErrorOther = "other"
type LookupError (line 360) | type LookupError struct
method UnmarshalJSON (line 377) | func (u *LookupError) UnmarshalJSON(body []byte) error {
constant LookupErrorMalformedPath (line 368) | LookupErrorMalformedPath = "malformed_path"
constant LookupErrorNotFound (line 369) | LookupErrorNotFound = "not_found"
constant LookupErrorNotFile (line 370) | LookupErrorNotFile = "not_file"
constant LookupErrorNotFolder (line 371) | LookupErrorNotFolder = "not_folder"
constant LookupErrorRestrictedContent (line 372) | LookupErrorRestrictedContent = "restricted_content"
constant LookupErrorOther (line 373) | LookupErrorOther = "other"
type ModifyTemplateError (line 398) | type ModifyTemplateError struct
method UnmarshalJSON (line 416) | func (u *ModifyTemplateError) UnmarshalJSON(body []byte) error {
constant ModifyTemplateErrorTemplateNotFound (line 406) | ModifyTemplateErrorTemplateNotFound = "template_not_found"
constant ModifyTemplateErrorRestrictedContent (line 407) | ModifyTemplateErrorRestrictedContent = "restricted_content"
constant ModifyTemplateErrorOther (line 408) | ModifyTemplateErrorOther = "other"
constant ModifyTemplateErrorConflictingPropertyNames (line 409) | ModifyTemplateErrorConflictingPropertyNames = "conflicting_property_names"
constant ModifyTemplateErrorTooManyProperties (line 410) | ModifyTemplateErrorTooManyProperties = "too_many_properties"
constant ModifyTemplateErrorTooManyTemplates (line 411) | ModifyTemplateErrorTooManyTemplates = "too_many_templates"
constant ModifyTemplateErrorTemplateAttributeTooLarge (line 412) | ModifyTemplateErrorTemplateAttributeTooLarge = "template_attribute_too_l...
type OverwritePropertyGroupArg (line 437) | type OverwritePropertyGroupArg struct
function NewOverwritePropertyGroupArg (line 446) | func NewOverwritePropertyGroupArg(Path string, PropertyGroups []*Propert...
type PropertiesSearchArg (line 454) | type PropertiesSearchArg struct
function NewPropertiesSearchArg (line 463) | func NewPropertiesSearchArg(Queries []*PropertiesSearchQuery) *Propertie...
type PropertiesSearchContinueArg (line 471) | type PropertiesSearchContinueArg struct
function NewPropertiesSearchContinueArg (line 478) | func NewPropertiesSearchContinueArg(Cursor string) *PropertiesSearchCont...
type PropertiesSearchContinueError (line 485) | type PropertiesSearchContinueError struct
constant PropertiesSearchContinueErrorReset (line 491) | PropertiesSearchContinueErrorReset = "reset"
constant PropertiesSearchContinueErrorOther (line 492) | PropertiesSearchContinueErrorOther = "other"
type PropertiesSearchError (line 496) | type PropertiesSearchError struct
method UnmarshalJSON (line 509) | func (u *PropertiesSearchError) UnmarshalJSON(body []byte) error {
constant PropertiesSearchErrorPropertyGroupLookup (line 504) | PropertiesSearchErrorPropertyGroupLookup = "property_group_lookup"
constant PropertiesSearchErrorOther (line 505) | PropertiesSearchErrorOther = "other"
type PropertiesSearchMatch (line 530) | type PropertiesSearchMatch struct
function NewPropertiesSearchMatch (line 542) | func NewPropertiesSearchMatch(Id string, Path string, IsDeleted bool, Pr...
type PropertiesSearchMode (line 552) | type PropertiesSearchMode struct
method UnmarshalJSON (line 565) | func (u *PropertiesSearchMode) UnmarshalJSON(body []byte) error {
constant PropertiesSearchModeFieldName (line 560) | PropertiesSearchModeFieldName = "field_name"
constant PropertiesSearchModeOther (line 561) | PropertiesSearchModeOther = "other"
type PropertiesSearchQuery (line 586) | type PropertiesSearchQuery struct
function NewPropertiesSearchQuery (line 596) | func NewPropertiesSearchQuery(Query string, Mode *PropertiesSearchMode) ...
type PropertiesSearchResult (line 605) | type PropertiesSearchResult struct
function NewPropertiesSearchResult (line 615) | func NewPropertiesSearchResult(Matches []*PropertiesSearchMatch) *Proper...
type PropertyField (line 623) | type PropertyField struct
function NewPropertyField (line 633) | func NewPropertyField(Name string, Value string) *PropertyField {
type PropertyFieldTemplate (line 642) | type PropertyFieldTemplate struct
function NewPropertyFieldTemplate (line 655) | func NewPropertyFieldTemplate(Name string, Description string, Type *Pro...
type PropertyGroup (line 667) | type PropertyGroup struct
function NewPropertyGroup (line 676) | func NewPropertyGroup(TemplateId string, Fields []*PropertyField) *Prope...
type PropertyGroupUpdate (line 684) | type PropertyGroupUpdate struct
function NewPropertyGroupUpdate (line 696) | func NewPropertyGroupUpdate(TemplateId string) *PropertyGroupUpdate {
type PropertyType (line 703) | type PropertyType struct
constant PropertyTypeString (line 709) | PropertyTypeString = "string"
constant PropertyTypeOther (line 710) | PropertyTypeOther = "other"
type RemovePropertiesArg (line 714) | type RemovePropertiesArg struct
function NewRemovePropertiesArg (line 723) | func NewRemovePropertiesArg(Path string, PropertyTemplateIds []string) *...
type RemovePropertiesError (line 731) | type RemovePropertiesError struct
method UnmarshalJSON (line 752) | func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error {
constant RemovePropertiesErrorTemplateNotFound (line 743) | RemovePropertiesErrorTemplateNotFound = "template_not_found"
constant RemovePropertiesErrorRestrictedContent (line 744) | RemovePropertiesErrorRestrictedContent = "restricted_content"
constant RemovePropertiesErrorOther (line 745) | RemovePropertiesErrorOther = "other"
constant RemovePropertiesErrorPath (line 746) | RemovePropertiesErrorPath = "path"
constant RemovePropertiesErrorUnsupportedFolder (line 747) | RemovePropertiesErrorUnsupportedFolder = "unsupported_folder"
constant RemovePropertiesErrorPropertyGroupLookup (line 748) | RemovePropertiesErrorPropertyGroupLookup = "property_group_lookup"
type RemoveTemplateArg (line 783) | type RemoveTemplateArg struct
function NewRemoveTemplateArg (line 790) | func NewRemoveTemplateArg(TemplateId string) *RemoveTemplateArg {
type TemplateFilterBase (line 797) | type TemplateFilterBase struct
method UnmarshalJSON (line 811) | func (u *TemplateFilterBase) UnmarshalJSON(body []byte) error {
constant TemplateFilterBaseFilterSome (line 806) | TemplateFilterBaseFilterSome = "filter_some"
constant TemplateFilterBaseOther (line 807) | TemplateFilterBaseOther = "other"
type TemplateFilter (line 833) | type TemplateFilter struct
method UnmarshalJSON (line 848) | func (u *TemplateFilter) UnmarshalJSON(body []byte) error {
constant TemplateFilterFilterSome (line 842) | TemplateFilterFilterSome = "filter_some"
constant TemplateFilterOther (line 843) | TemplateFilterOther = "other"
constant TemplateFilterFilterNone (line 844) | TemplateFilterFilterNone = "filter_none"
type TemplateOwnerType (line 870) | type TemplateOwnerType struct
constant TemplateOwnerTypeUser (line 876) | TemplateOwnerTypeUser = "user"
constant TemplateOwnerTypeTeam (line 877) | TemplateOwnerTypeTeam = "team"
constant TemplateOwnerTypeOther (line 878) | TemplateOwnerTypeOther = "other"
type UpdatePropertiesArg (line 882) | type UpdatePropertiesArg struct
function NewUpdatePropertiesArg (line 890) | func NewUpdatePropertiesArg(Path string, UpdatePropertyGroups []*Propert...
type UpdatePropertiesError (line 898) | type UpdatePropertiesError struct
method UnmarshalJSON (line 922) | func (u *UpdatePropertiesError) UnmarshalJSON(body []byte) error {
constant UpdatePropertiesErrorTemplateNotFound (line 910) | UpdatePropertiesErrorTemplateNotFound = "template_not_found"
constant UpdatePropertiesErrorRestrictedContent (line 911) | UpdatePropertiesErrorRestrictedContent = "restricted_content"
constant UpdatePropertiesErrorOther (line 912) | UpdatePropertiesErrorOther = "other"
constant UpdatePropertiesErrorPath (line 913) | UpdatePropertiesErrorPath = "path"
constant UpdatePropertiesErrorUnsupportedFolder (line 914) | UpdatePropertiesErrorUnsupportedFolder = "unsupported_folder"
constant UpdatePropertiesErrorPropertyFieldTooLarge (line 915) | UpdatePropertiesErrorPropertyFieldTooLarge = "property_field_too_large"
constant UpdatePropertiesErrorDoesNotFitTemplate (line 916) | UpdatePropertiesErrorDoesNotFitTemplate = "does_not_fit_template"
constant UpdatePropertiesErrorDuplicatePropertyGroups (line 917) | UpdatePropertiesErrorDuplicatePropertyGroups = "duplicate_property_groups"
constant UpdatePropertiesErrorPropertyGroupLookup (line 918) | UpdatePropertiesErrorPropertyGroupLookup = "property_group_lookup"
type UpdateTemplateArg (line 953) | type UpdateTemplateArg struct
function NewUpdateTemplateArg (line 969) | func NewUpdateTemplateArg(TemplateId string) *UpdateTemplateArg {
type UpdateTemplateResult (line 976) | type UpdateTemplateResult struct
function NewUpdateTemplateResult (line 983) | func NewUpdateTemplateResult(TemplateId string) *UpdateTemplateResult {
FILE: v6/dropbox/file_requests/client.go
type Client (line 32) | type Client interface
type apiImpl (line 60) | type apiImpl
method Count (line 68) | func (dbx *apiImpl) Count() (res *CountFileRequestsResult, err error) {
method Create (line 106) | func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileReque...
method Delete (line 144) | func (dbx *apiImpl) Delete(arg *DeleteFileRequestArgs) (res *DeleteFil...
method DeleteAllClosed (line 182) | func (dbx *apiImpl) DeleteAllClosed() (res *DeleteAllClosedFileRequest...
method Get (line 220) | func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, er...
method ListV2 (line 258) | func (dbx *apiImpl) ListV2(arg *ListFileRequestsArg) (res *ListFileReq...
method List (line 296) | func (dbx *apiImpl) List() (res *ListFileRequestsResult, err error) {
method ListContinue (line 334) | func (dbx *apiImpl) ListContinue(arg *ListFileRequestsContinueArg) (re...
method Update (line 372) | func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileReque...
type CountAPIError (line 63) | type CountAPIError struct
type CreateAPIError (line 101) | type CreateAPIError struct
type DeleteAPIError (line 139) | type DeleteAPIError struct
type DeleteAllClosedAPIError (line 177) | type DeleteAllClosedAPIError struct
type GetAPIError (line 215) | type GetAPIError struct
type ListV2APIError (line 253) | type ListV2APIError struct
type ListAPIError (line 291) | type ListAPIError struct
type ListContinueAPIError (line 329) | type ListContinueAPIError struct
type UpdateAPIError (line 367) | type UpdateAPIError struct
function New (line 405) | func New(c dropbox.Config) Client {
FILE: v6/dropbox/file_requests/types.go
type GeneralFileRequestsError (line 34) | type GeneralFileRequestsError struct
constant GeneralFileRequestsErrorDisabledForTeam (line 40) | GeneralFileRequestsErrorDisabledForTeam = "disabled_for_team"
constant GeneralFileRequestsErrorOther (line 41) | GeneralFileRequestsErrorOther = "other"
type CountFileRequestsError (line 45) | type CountFileRequestsError struct
constant CountFileRequestsErrorDisabledForTeam (line 51) | CountFileRequestsErrorDisabledForTeam = "disabled_for_team"
constant CountFileRequestsErrorOther (line 52) | CountFileRequestsErrorOther = "other"
type CountFileRequestsResult (line 56) | type CountFileRequestsResult struct
function NewCountFileRequestsResult (line 62) | func NewCountFileRequestsResult(FileRequestCount uint64) *CountFileReque...
type CreateFileRequestArgs (line 69) | type CreateFileRequestArgs struct
function NewCreateFileRequestArgs (line 88) | func NewCreateFileRequestArgs(Title string, Destination string) *CreateF...
type FileRequestError (line 97) | type FileRequestError struct
constant FileRequestErrorDisabledForTeam (line 103) | FileRequestErrorDisabledForTeam = "disabled_for_team"
constant FileRequestErrorOther (line 104) | FileRequestErrorOther = "other"
constant FileRequestErrorNotFound (line 105) | FileRequestErrorNotFound = "not_found"
constant FileRequestErrorNotAFolder (line 106) | FileRequestErrorNotAFolder = "not_a_folder"
constant FileRequestErrorAppLacksAccess (line 107) | FileRequestErrorAppLacksAccess = "app_lacks_access"
constant FileRequestErrorNoPermission (line 108) | FileRequestErrorNoPermission = "no_permission"
constant FileRequestErrorEmailUnverified (line 109) | FileRequestErrorEmailUnverified = "email_unverified"
constant FileRequestErrorValidationError (line 110) | FileRequestErrorValidationError = "validation_error"
type CreateFileRequestError (line 114) | type CreateFileRequestError struct
constant CreateFileRequestErrorDisabledForTeam (line 120) | CreateFileRequestErrorDisabledForTeam = "disabled_for_team"
constant CreateFileRequestErrorOther (line 121) | CreateFileRequestErrorOther = "other"
constant CreateFileRequestErrorNotFound (line 122) | CreateFileRequestErrorNotFound = "not_found"
constant CreateFileRequestErrorNotAFolder (line 123) | CreateFileRequestErrorNotAFolder = "not_a_folder"
constant CreateFileRequestErrorAppLacksAccess (line 124) | CreateFileRequestErrorAppLacksAccess = "app_lacks_access"
constant CreateFileRequestErrorNoPermission (line 125) | CreateFileRequestErrorNoPermission = "no_permission"
constant CreateFileRequestErrorEmailUnverified (line 126) | CreateFileRequestErrorEmailUnverified = "email_unverified"
constant CreateFileRequestErrorValidationError (line 127) | CreateFileRequestErrorValidationError = "validation_error"
constant CreateFileRequestErrorInvalidLocation (line 128) | CreateFileRequestErrorInvalidLocation = "invalid_location"
constant CreateFileRequestErrorRateLimit (line 129) | CreateFileRequestErrorRateLimit = "rate_limit"
type DeleteAllClosedFileRequestsError (line 134) | type DeleteAllClosedFileRequestsError struct
constant DeleteAllClosedFileRequestsErrorDisabledForTeam (line 140) | DeleteAllClosedFileRequestsErrorDisabledForTeam = "disabled_for_team"
constant DeleteAllClosedFileRequestsErrorOther (line 141) | DeleteAllClosedFileRequestsErrorOther = "other"
constant DeleteAllClosedFileRequestsErrorNotFound (line 142) | DeleteAllClosedFileRequestsErrorNotFound = "not_found"
constant DeleteAllClosedFileRequestsErrorNotAFolder (line 143) | DeleteAllClosedFileRequestsErrorNotAFolder = "not_a_folder"
constant DeleteAllClosedFileRequestsErrorAppLacksAccess (line 144) | DeleteAllClosedFileRequestsErrorAppLacksAccess = "app_lacks_access"
constant DeleteAllClosedFileRequestsErrorNoPermission (line 145) | DeleteAllClosedFileRequestsErrorNoPermission = "no_permission"
constant DeleteAllClosedFileRequestsErrorEmailUnverified (line 146) | DeleteAllClosedFileRequestsErrorEmailUnverified = "email_unverified"
constant DeleteAllClosedFileRequestsErrorValidationError (line 147) | DeleteAllClosedFileRequestsErrorValidationError = "validation_error"
type DeleteAllClosedFileRequestsResult (line 151) | type DeleteAllClosedFileRequestsResult struct
function NewDeleteAllClosedFileRequestsResult (line 157) | func NewDeleteAllClosedFileRequestsResult(FileRequests []*FileRequest) *...
type DeleteFileRequestArgs (line 164) | type DeleteFileRequestArgs struct
function NewDeleteFileRequestArgs (line 170) | func NewDeleteFileRequestArgs(Ids []string) *DeleteFileRequestArgs {
type DeleteFileRequestError (line 177) | type DeleteFileRequestError struct
constant DeleteFileRequestErrorDisabledForTeam (line 183) | DeleteFileRequestErrorDisabledForTeam = "disabled_for_team"
constant DeleteFileRequestErrorOther (line 184) | DeleteFileRequestErrorOther = "other"
constant DeleteFileRequestErrorNotFound (line 185) | DeleteFileRequestErrorNotFound = "not_found"
constant DeleteFileRequestErrorNotAFolder (line 186) | DeleteFileRequestErrorNotAFolder = "not_a_folder"
constant DeleteFileRequestErrorAppLacksAccess (line 187) | DeleteFileRequestErrorAppLacksAccess = "app_lacks_access"
constant DeleteFileRequestErrorNoPermission (line 188) | DeleteFileRequestErrorNoPermission = "no_permission"
constant DeleteFileRequestErrorEmailUnverified (line 189) | DeleteFileRequestErrorEmailUnverified = "email_unverified"
constant DeleteFileRequestErrorValidationError (line 190) | DeleteFileRequestErrorValidationError = "validation_error"
constant DeleteFileRequestErrorFileRequestOpen (line 191) | DeleteFileRequestErrorFileRequestOpen = "file_request_open"
type DeleteFileRequestsResult (line 195) | type DeleteFileRequestsResult struct
function NewDeleteFileRequestsResult (line 201) | func NewDeleteFileRequestsResult(FileRequests []*FileRequest) *DeleteFil...
type FileRequest (line 209) | type FileRequest struct
function NewFileRequest (line 235) | func NewFileRequest(Id string, Url string, Title string, Created time.Ti...
type FileRequestDeadline (line 247) | type FileRequestDeadline struct
function NewFileRequestDeadline (line 256) | func NewFileRequestDeadline(Deadline time.Time) *FileRequestDeadline {
type GetFileRequestArgs (line 263) | type GetFileRequestArgs struct
function NewGetFileRequestArgs (line 269) | func NewGetFileRequestArgs(Id string) *GetFileRequestArgs {
type GetFileRequestError (line 277) | type GetFileRequestError struct
constant GetFileRequestErrorDisabledForTeam (line 283) | GetFileRequestErrorDisabledForTeam = "disabled_for_team"
constant GetFileRequestErrorOther (line 284) | GetFileRequestErrorOther = "other"
constant GetFileRequestErrorNotFound (line 285) | GetFileRequestErrorNotFound = "not_found"
constant GetFileRequestErrorNotAFolder (line 286) | GetFileRequestErrorNotAFolder = "not_a_folder"
constant GetFileRequestErrorAppLacksAccess (line 287) | GetFileRequestErrorAppLacksAccess = "app_lacks_access"
constant GetFileRequestErrorNoPermission (line 288) | GetFileRequestErrorNoPermission = "no_permission"
constant GetFileRequestErrorEmailUnverified (line 289) | GetFileRequestErrorEmailUnverified = "email_unverified"
constant GetFileRequestErrorValidationError (line 290) | GetFileRequestErrorValidationError = "validation_error"
type GracePeriod (line 294) | type GracePeriod struct
constant GracePeriodOneDay (line 300) | GracePeriodOneDay = "one_day"
constant GracePeriodTwoDays (line 301) | GracePeriodTwoDays = "two_days"
constant GracePeriodSevenDays (line 302) | GracePeriodSevenDays = "seven_days"
constant GracePeriodThirtyDays (line 303) | GracePeriodThirtyDays = "thirty_days"
constant GracePeriodAlways (line 304) | GracePeriodAlways = "always"
constant GracePeriodOther (line 305) | GracePeriodOther = "other"
type ListFileRequestsArg (line 309) | type ListFileRequestsArg struct
function NewListFileRequestsArg (line 316) | func NewListFileRequestsArg() *ListFileRequestsArg {
type ListFileRequestsContinueArg (line 323) | type ListFileRequestsContinueArg struct
function NewListFileRequestsContinueArg (line 330) | func NewListFileRequestsContinueArg(Cursor string) *ListFileRequestsCont...
type ListFileRequestsContinueError (line 338) | type ListFileRequestsContinueError struct
constant ListFileRequestsContinueErrorDisabledForTeam (line 344) | ListFileRequestsContinueErrorDisabledForTeam = "disabled_for_team"
constant ListFileRequestsContinueErrorOther (line 345) | ListFileRequestsContinueErrorOther = "other"
constant ListFileRequestsContinueErrorInvalidCursor (line 346) | ListFileRequestsContinueErrorInvalidCursor = "invalid_cursor"
type ListFileRequestsError (line 350) | type ListFileRequestsError struct
constant ListFileRequestsErrorDisabledForTeam (line 356) | ListFileRequestsErrorDisabledForTeam = "disabled_for_team"
constant ListFileRequestsErrorOther (line 357) | ListFileRequestsErrorOther = "other"
type ListFileRequestsResult (line 361) | type ListFileRequestsResult struct
function NewListFileRequestsResult (line 368) | func NewListFileRequestsResult(FileRequests []*FileRequest) *ListFileReq...
type ListFileRequestsV2Result (line 375) | type ListFileRequestsV2Result struct
function NewListFileRequestsV2Result (line 389) | func NewListFileRequestsV2Result(FileRequests []*FileRequest, Cursor str...
type UpdateFileRequestArgs (line 398) | type UpdateFileRequestArgs struct
function NewUpdateFileRequestArgs (line 417) | func NewUpdateFileRequestArgs(Id string) *UpdateFileRequestArgs {
type UpdateFileRequestDeadline (line 425) | type UpdateFileRequestDeadline struct
method UnmarshalJSON (line 439) | func (u *UpdateFileRequestDeadline) UnmarshalJSON(body []byte) error {
constant UpdateFileRequestDeadlineNoUpdate (line 433) | UpdateFileRequestDeadlineNoUpdate = "no_update"
constant UpdateFileRequestDeadlineUpdate (line 434) | UpdateFileRequestDeadlineUpdate = "update"
constant UpdateFileRequestDeadlineOther (line 435) | UpdateFileRequestDeadlineOther = "other"
type UpdateFileRequestError (line 460) | type UpdateFileRequestError struct
constant UpdateFileRequestErrorDisabledForTeam (line 466) | UpdateFileRequestErrorDisabledForTeam = "disabled_for_team"
constant UpdateFileRequestErrorOther (line 467) | UpdateFileRequestErrorOther = "other"
constant UpdateFileRequestErrorNotFound (line 468) | UpdateFileRequestErrorNotFound = "not_found"
constant UpdateFileRequestErrorNotAFolder (line 469) | UpdateFileRequestErrorNotAFolder = "not_a_folder"
constant UpdateFileRequestErrorAppLacksAccess (line 470) | UpdateFileRequestErrorAppLacksAccess = "app_lacks_access"
constant UpdateFileRequestErrorNoPermission (line 471) | UpdateFileRequestErrorNoPermission = "no_permission"
constant UpdateFileRequestErrorEmailUnverified (line 472) | UpdateFileRequestErrorEmailUnverified = "email_unverified"
constant UpdateFileRequestErrorValidationError (line 473) | UpdateFileRequestErrorValidationError = "validation_error"
FILE: v6/dropbox/files/client.go
type Client (line 35) | type Client interface
type apiImpl (line 463) | type apiImpl
method AlphaGetMetadata (line 471) | func (dbx *apiImpl) AlphaGetMetadata(arg *AlphaGetMetadataArg) (res Is...
method AlphaUpload (line 523) | func (dbx *apiImpl) AlphaUpload(arg *UploadArg, content io.Reader) (re...
method CopyV2 (line 564) | func (dbx *apiImpl) CopyV2(arg *RelocationArg) (res *RelocationResult,...
method Copy (line 602) | func (dbx *apiImpl) Copy(arg *RelocationArg) (res IsMetadata, err erro...
method CopyBatchV2 (line 654) | func (dbx *apiImpl) CopyBatchV2(arg *RelocationBatchArgBase) (res *Rel...
method CopyBatch (line 692) | func (dbx *apiImpl) CopyBatch(arg *RelocationBatchArg) (res *Relocatio...
method CopyBatchCheckV2 (line 733) | func (dbx *apiImpl) CopyBatchCheckV2(arg *async.PollArg) (res *Relocat...
method CopyBatchCheck (line 771) | func (dbx *apiImpl) CopyBatchCheck(arg *async.PollArg) (res *Relocatio...
method CopyReferenceGet (line 812) | func (dbx *apiImpl) CopyReferenceGet(arg *GetCopyReferenceArg) (res *G...
method CopyReferenceSave (line 850) | func (dbx *apiImpl) CopyReferenceSave(arg *SaveCopyReferenceArg) (res ...
method CreateFolderV2 (line 888) | func (dbx *apiImpl) CreateFolderV2(arg *CreateFolderArg) (res *CreateF...
method CreateFolder (line 926) | func (dbx *apiImpl) CreateFolder(arg *CreateFolderArg) (res *FolderMet...
method CreateFolderBatch (line 967) | func (dbx *apiImpl) CreateFolderBatch(arg *CreateFolderBatchArg) (res ...
method CreateFolderBatchCheck (line 1005) | func (dbx *apiImpl) CreateFolderBatchCheck(arg *async.PollArg) (res *C...
method DeleteV2 (line 1043) | func (dbx *apiImpl) DeleteV2(arg *DeleteArg) (res *DeleteResult, err e...
method Delete (line 1081) | func (dbx *apiImpl) Delete(arg *DeleteArg) (res IsMetadata, err error) {
method DeleteBatch (line 1133) | func (dbx *apiImpl) DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatch...
method DeleteBatchCheck (line 1171) | func (dbx *apiImpl) DeleteBatchCheck(arg *async.PollArg) (res *DeleteB...
method Download (line 1209) | func (dbx *apiImpl) Download(arg *DownloadArg) (res *FileMetadata, con...
method DownloadZip (line 1247) | func (dbx *apiImpl) DownloadZip(arg *DownloadZipArg) (res *DownloadZip...
method Export (line 1285) | func (dbx *apiImpl) Export(arg *ExportArg) (res *ExportResult, content...
method GetFileLockBatch (line 1323) | func (dbx *apiImpl) GetFileLockBatch(arg *LockFileBatchArg) (res *Lock...
method GetMetadata (line 1361) | func (dbx *apiImpl) GetMetadata(arg *GetMetadataArg) (res IsMetadata, ...
method GetPreview (line 1410) | func (dbx *apiImpl) GetPreview(arg *PreviewArg) (res *FileMetadata, co...
method GetTemporaryLink (line 1448) | func (dbx *apiImpl) GetTemporaryLink(arg *GetTemporaryLinkArg) (res *G...
method GetTemporaryUploadLink (line 1486) | func (dbx *apiImpl) GetTemporaryUploadLink(arg *GetTemporaryUploadLink...
method GetThumbnail (line 1524) | func (dbx *apiImpl) GetThumbnail(arg *ThumbnailArg) (res *FileMetadata...
method GetThumbnailV2 (line 1562) | func (dbx *apiImpl) GetThumbnailV2(arg *ThumbnailV2Arg) (res *PreviewR...
method GetThumbnailBatch (line 1600) | func (dbx *apiImpl) GetThumbnailBatch(arg *GetThumbnailBatchArg) (res ...
method ListFolder (line 1638) | func (dbx *apiImpl) ListFolder(arg *ListFolderArg) (res *ListFolderRes...
method ListFolderContinue (line 1676) | func (dbx *apiImpl) ListFolderContinue(arg *ListFolderContinueArg) (re...
method ListFolderGetLatestCursor (line 1714) | func (dbx *apiImpl) ListFolderGetLatestCursor(arg *ListFolderArg) (res...
method ListFolderLongpoll (line 1752) | func (dbx *apiImpl) ListFolderLongpoll(arg *ListFolderLongpollArg) (re...
method ListRevisions (line 1790) | func (dbx *apiImpl) ListRevisions(arg *ListRevisionsArg) (res *ListRev...
method LockFileBatch (line 1828) | func (dbx *apiImpl) LockFileBatch(arg *LockFileBatchArg) (res *LockFil...
method MoveV2 (line 1866) | func (dbx *apiImpl) MoveV2(arg *RelocationArg) (res *RelocationResult,...
method Move (line 1904) | func (dbx *apiImpl) Move(arg *RelocationArg) (res IsMetadata, err erro...
method MoveBatchV2 (line 1956) | func (dbx *apiImpl) MoveBatchV2(arg *MoveBatchArg) (res *RelocationBat...
method MoveBatch (line 1994) | func (dbx *apiImpl) MoveBatch(arg *RelocationBatchArg) (res *Relocatio...
method MoveBatchCheckV2 (line 2035) | func (dbx *apiImpl) MoveBatchCheckV2(arg *async.PollArg) (res *Relocat...
method MoveBatchCheck (line 2073) | func (dbx *apiImpl) MoveBatchCheck(arg *async.PollArg) (res *Relocatio...
method PaperCreate (line 2114) | func (dbx *apiImpl) PaperCreate(arg *PaperCreateArg, content io.Reader...
method PaperUpdate (line 2152) | func (dbx *apiImpl) PaperUpdate(arg *PaperUpdateArg, content io.Reader...
method PermanentlyDelete (line 2190) | func (dbx *apiImpl) PermanentlyDelete(arg *DeleteArg) (err error) {
method PropertiesAdd (line 2224) | func (dbx *apiImpl) PropertiesAdd(arg *file_properties.AddPropertiesAr...
method PropertiesOverwrite (line 2260) | func (dbx *apiImpl) PropertiesOverwrite(arg *file_properties.Overwrite...
method PropertiesRemove (line 2296) | func (dbx *apiImpl) PropertiesRemove(arg *file_properties.RemoveProper...
method PropertiesTemplateGet (line 2332) | func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemp...
method PropertiesTemplateList (line 2372) | func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.Lis...
method PropertiesUpdate (line 2412) | func (dbx *apiImpl) PropertiesUpdate(arg *file_properties.UpdateProper...
method Restore (line 2448) | func (dbx *apiImpl) Restore(arg *RestoreArg) (res *FileMetadata, err e...
method SaveUrl (line 2486) | func (dbx *apiImpl) SaveUrl(arg *SaveUrlArg) (res *SaveUrlResult, err ...
method SaveUrlCheckJobStatus (line 2524) | func (dbx *apiImpl) SaveUrlCheckJobStatus(arg *async.PollArg) (res *Sa...
method Search (line 2562) | func (dbx *apiImpl) Search(arg *SearchArg) (res *SearchResult, err err...
method SearchV2 (line 2603) | func (dbx *apiImpl) SearchV2(arg *SearchV2Arg) (res *SearchV2Result, e...
method SearchContinueV2 (line 2641) | func (dbx *apiImpl) SearchContinueV2(arg *SearchV2ContinueArg) (res *S...
method TagsAdd (line 2679) | func (dbx *apiImpl) TagsAdd(arg *AddTagArg) (err error) {
method TagsGet (line 2713) | func (dbx *apiImpl) TagsGet(arg *GetTagsArg) (res *GetTagsResult, err ...
method TagsRemove (line 2751) | func (dbx *apiImpl) TagsRemove(arg *RemoveTagArg) (err error) {
method UnlockFileBatch (line 2785) | func (dbx *apiImpl) UnlockFileBatch(arg *UnlockFileBatchArg) (res *Loc...
method Upload (line 2823) | func (dbx *apiImpl) Upload(arg *UploadArg, content io.Reader) (res *Fi...
method UploadSessionAppendV2 (line 2861) | func (dbx *apiImpl) UploadSessionAppendV2(arg *UploadSessionAppendArg,...
method UploadSessionAppend (line 2895) | func (dbx *apiImpl) UploadSessionAppend(arg *UploadSessionCursor, cont...
method UploadSessionFinish (line 2932) | func (dbx *apiImpl) UploadSessionFinish(arg *UploadSessionFinishArg, c...
method UploadSessionFinishBatch (line 2970) | func (dbx *apiImpl) UploadSessionFinishBatch(arg *UploadSessionFinishB...
method UploadSessionFinishBatchV2 (line 3011) | func (dbx *apiImpl) UploadSessionFinishBatchV2(arg *UploadSessionFinis...
method UploadSessionFinishBatchCheck (line 3049) | func (dbx *apiImpl) UploadSessionFinishBatchCheck(arg *async.PollArg) ...
method UploadSessionStart (line 3087) | func (dbx *apiImpl) UploadSessionStart(arg *UploadSessionStartArg, con...
method UploadSessionStartBatch (line 3125) | func (dbx *apiImpl) UploadSessionStartBatch(arg *UploadSessionStartBat...
type AlphaGetMetadataAPIError (line 466) | type AlphaGetMetadataAPIError struct
type AlphaUploadAPIError (line 518) | type AlphaUploadAPIError struct
type CopyV2APIError (line 559) | type CopyV2APIError struct
type CopyAPIError (line 597) | type CopyAPIError struct
type CopyBatchV2APIError (line 649) | type CopyBatchV2APIError struct
type CopyBatchAPIError (line 687) | type CopyBatchAPIError struct
type CopyBatchCheckV2APIError (line 728) | type CopyBatchCheckV2APIError struct
type CopyBatchCheckAPIError (line 766) | type CopyBatchCheckAPIError struct
type CopyReferenceGetAPIError (line 807) | type CopyReferenceGetAPIError struct
type CopyReferenceSaveAPIError (line 845) | type CopyReferenceSaveAPIError struct
type CreateFolderV2APIError (line 883) | type CreateFolderV2APIError struct
type CreateFolderAPIError (line 921) | type CreateFolderAPIError struct
type CreateFolderBatchAPIError (line 962) | type CreateFolderBatchAPIError struct
type CreateFolderBatchCheckAPIError (line 1000) | type CreateFolderBatchCheckAPIError struct
type DeleteV2APIError (line 1038) | type DeleteV2APIError struct
type DeleteAPIError (line 1076) | type DeleteAPIError struct
type DeleteBatchAPIError (line 1128) | type DeleteBatchAPIError struct
type DeleteBatchCheckAPIError (line 1166) | type DeleteBatchCheckAPIError struct
type DownloadAPIError (line 1204) | type DownloadAPIError struct
type DownloadZipAPIError (line 1242) | type DownloadZipAPIError struct
type ExportAPIError (line 1280) | type ExportAPIError struct
type GetFileLockBatchAPIError (line 1318) | type GetFileLockBatchAPIError struct
type GetMetadataAPIError (line 1356) | type GetMetadataAPIError struct
type GetPreviewAPIError (line 1405) | type GetPreviewAPIError struct
type GetTemporaryLinkAPIError (line 1443) | type GetTemporaryLinkAPIError struct
type GetTemporaryUploadLinkAPIError (line 1481) | type GetTemporaryUploadLinkAPIError struct
type GetThumbnailAPIError (line 1519) | type GetThumbnailAPIError struct
type GetThumbnailV2APIError (line 1557) | type GetThumbnailV2APIError struct
type GetThumbnailBatchAPIError (line 1595) | type GetThumbnailBatchAPIError struct
type ListFolderAPIError (line 1633) | type ListFolderAPIError struct
type ListFolderContinueAPIError (line 1671) | type ListFolderContinueAPIError struct
type ListFolderGetLatestCursorAPIError (line 1709) | type ListFolderGetLatestCursorAPIError struct
type ListFolderLongpollAPIError (line 1747) | type ListFolderLongpollAPIError struct
type ListRevisionsAPIError (line 1785) | type ListRevisionsAPIError struct
type LockFileBatchAPIError (line 1823) | type LockFileBatchAPIError struct
type MoveV2APIError (line 1861) | type MoveV2APIError struct
type MoveAPIError (line 1899) | type MoveAPIError struct
type MoveBatchV2APIError (line 1951) | type MoveBatchV2APIError struct
type MoveBatchAPIError (line 1989) | type MoveBatchAPIError struct
type MoveBatchCheckV2APIError (line 2030) | type MoveBatchCheckV2APIError struct
type MoveBatchCheckAPIError (line 2068) | type MoveBatchCheckAPIError struct
type PaperCreateAPIError (line 2109) | type PaperCreateAPIError struct
type PaperUpdateAPIError (line 2147) | type PaperUpdateAPIError struct
type PermanentlyDeleteAPIError (line 2185) | type PermanentlyDeleteAPIError struct
type PropertiesAddAPIError (line 2219) | type PropertiesAddAPIError struct
type PropertiesOverwriteAPIError (line 2255) | type PropertiesOverwriteAPIError struct
type PropertiesRemoveAPIError (line 2291) | type PropertiesRemoveAPIError struct
type PropertiesTemplateGetAPIError (line 2327) | type PropertiesTemplateGetAPIError struct
type PropertiesTemplateListAPIError (line 2367) | type PropertiesTemplateListAPIError struct
type PropertiesUpdateAPIError (line 2407) | type PropertiesUpdateAPIError struct
type RestoreAPIError (line 2443) | type RestoreAPIError struct
type SaveUrlAPIError (line 2481) | type SaveUrlAPIError struct
type SaveUrlCheckJobStatusAPIError (line 2519) | type SaveUrlCheckJobStatusAPIError struct
type SearchAPIError (line 2557) | type SearchAPIError struct
type SearchV2APIError (line 2598) | type SearchV2APIError struct
type SearchContinueV2APIError (line 2636) | type SearchContinueV2APIError struct
type TagsAddAPIError (line 2674) | type TagsAddAPIError struct
type TagsGetAPIError (line 2708) | type TagsGetAPIError struct
type TagsRemoveAPIError (line 2746) | type TagsRemoveAPIError struct
type UnlockFileBatchAPIError (line 2780) | type UnlockFileBatchAPIError struct
type UploadAPIError (line 2818) | type UploadAPIError struct
type UploadSessionAppendV2APIError (line 2856) | type UploadSessionAppendV2APIError struct
type UploadSessionAppendAPIError (line 2890) | type UploadSessionAppendAPIError struct
type UploadSessionFinishAPIError (line 2927) | type UploadSessionFinishAPIError struct
type UploadSessionFinishBatchAPIError (line 2965) | type UploadSessionFinishBatchAPIError struct
type UploadSessionFinishBatchV2APIError (line 3006) | type UploadSessionFinishBatchV2APIError struct
type UploadSessionFinishBatchCheckAPIError (line 3044) | type UploadSessionFinishBatchCheckAPIError struct
type UploadSessionStartAPIError (line 3082) | type UploadSessionStartAPIError struct
type UploadSessionStartBatchAPIError (line 3120) | type UploadSessionStartBatchAPIError struct
function New (line 3158) | func New(c dropbox.Config) Client {
FILE: v6/dropbox/files/types.go
type AddTagArg (line 34) | type AddTagArg struct
function NewAddTagArg (line 43) | func NewAddTagArg(Path string, TagText string) *AddTagArg {
type BaseTagError (line 51) | type BaseTagError struct
method UnmarshalJSON (line 64) | func (u *BaseTagError) UnmarshalJSON(body []byte) error {
constant BaseTagErrorPath (line 59) | BaseTagErrorPath = "path"
constant BaseTagErrorOther (line 60) | BaseTagErrorOther = "other"
type AddTagError (line 85) | type AddTagError struct
method UnmarshalJSON (line 99) | func (u *AddTagError) UnmarshalJSON(body []byte) error {
constant AddTagErrorPath (line 93) | AddTagErrorPath = "path"
constant AddTagErrorOther (line 94) | AddTagErrorOther = "other"
constant AddTagErrorTooManyTags (line 95) | AddTagErrorTooManyTags = "too_many_tags"
type GetMetadataArg (line 120) | type GetMetadataArg struct
function NewGetMetadataArg (line 140) | func NewGetMetadataArg(Path string) *GetMetadataArg {
type AlphaGetMetadataArg (line 150) | type AlphaGetMetadataArg struct
function NewAlphaGetMetadataArg (line 158) | func NewAlphaGetMetadataArg(Path string) *AlphaGetMetadataArg {
type GetMetadataError (line 168) | type GetMetadataError struct
method UnmarshalJSON (line 180) | func (u *GetMetadataError) UnmarshalJSON(body []byte) error {
constant GetMetadataErrorPath (line 176) | GetMetadataErrorPath = "path"
type AlphaGetMetadataError (line 201) | type AlphaGetMetadataError struct
method UnmarshalJSON (line 216) | func (u *AlphaGetMetadataError) UnmarshalJSON(body []byte) error {
constant AlphaGetMetadataErrorPath (line 211) | AlphaGetMetadataErrorPath = "path"
constant AlphaGetMetadataErrorPropertiesError (line 212) | AlphaGetMetadataErrorPropertiesError = "properties_error"
type CommitInfo (line 242) | type CommitInfo struct
function NewCommitInfo (line 273) | func NewCommitInfo(Path string) *CommitInfo {
type ContentSyncSetting (line 284) | type ContentSyncSetting struct
function NewContentSyncSetting (line 292) | func NewContentSyncSetting(Id string, SyncSetting *SyncSetting) *Content...
type ContentSyncSettingArg (line 300) | type ContentSyncSettingArg struct
function NewContentSyncSettingArg (line 308) | func NewContentSyncSettingArg(Id string, SyncSetting *SyncSettingArg) *C...
type CreateFolderArg (line 316) | type CreateFolderArg struct
function NewCreateFolderArg (line 325) | func NewCreateFolderArg(Path string) *CreateFolderArg {
type CreateFolderBatchArg (line 333) | type CreateFolderBatchArg struct
function NewCreateFolderBatchArg (line 345) | func NewCreateFolderBatchArg(Paths []string) *CreateFolderBatchArg {
type CreateFolderBatchError (line 354) | type CreateFolderBatchError struct
constant CreateFolderBatchErrorTooManyFiles (line 360) | CreateFolderBatchErrorTooManyFiles = "too_many_files"
constant CreateFolderBatchErrorOther (line 361) | CreateFolderBatchErrorOther = "other"
type CreateFolderBatchJobStatus (line 365) | type CreateFolderBatchJobStatus struct
method UnmarshalJSON (line 382) | func (u *CreateFolderBatchJobStatus) UnmarshalJSON(body []byte) error {
constant CreateFolderBatchJobStatusInProgress (line 375) | CreateFolderBatchJobStatusInProgress = "in_progress"
constant CreateFolderBatchJobStatusComplete (line 376) | CreateFolderBatchJobStatusComplete = "complete"
constant CreateFolderBatchJobStatusFailed (line 377) | CreateFolderBatchJobStatusFailed = "failed"
constant CreateFolderBatchJobStatusOther (line 378) | CreateFolderBatchJobStatusOther = "other"
type CreateFolderBatchLaunch (line 409) | type CreateFolderBatchLaunch struct
method UnmarshalJSON (line 427) | func (u *CreateFolderBatchLaunch) UnmarshalJSON(body []byte) error {
constant CreateFolderBatchLaunchAsyncJobId (line 421) | CreateFolderBatchLaunchAsyncJobId = "async_job_id"
constant CreateFolderBatchLaunchComplete (line 422) | CreateFolderBatchLaunchComplete = "complete"
constant CreateFolderBatchLaunchOther (line 423) | CreateFolderBatchLaunchOther = "other"
type FileOpsResult (line 455) | type FileOpsResult struct
function NewFileOpsResult (line 459) | func NewFileOpsResult() *FileOpsResult {
type CreateFolderBatchResult (line 465) | type CreateFolderBatchResult struct
function NewCreateFolderBatchResult (line 473) | func NewCreateFolderBatchResult(Entries []*CreateFolderBatchResultEntry)...
type CreateFolderBatchResultEntry (line 480) | type CreateFolderBatchResultEntry struct
method UnmarshalJSON (line 495) | func (u *CreateFolderBatchResultEntry) UnmarshalJSON(body []byte) error {
constant CreateFolderBatchResultEntrySuccess (line 490) | CreateFolderBatchResultEntrySuccess = "success"
constant CreateFolderBatchResultEntryFailure (line 491) | CreateFolderBatchResultEntryFailure = "failure"
type CreateFolderEntryError (line 521) | type CreateFolderEntryError struct
method UnmarshalJSON (line 534) | func (u *CreateFolderEntryError) UnmarshalJSON(body []byte) error {
constant CreateFolderEntryErrorPath (line 529) | CreateFolderEntryErrorPath = "path"
constant CreateFolderEntryErrorOther (line 530) | CreateFolderEntryErrorOther = "other"
type CreateFolderEntryResult (line 555) | type CreateFolderEntryResult struct
function NewCreateFolderEntryResult (line 561) | func NewCreateFolderEntryResult(Metadata *FolderMetadata) *CreateFolderE...
type CreateFolderError (line 568) | type CreateFolderError struct
method UnmarshalJSON (line 580) | func (u *CreateFolderError) UnmarshalJSON(body []byte) error {
constant CreateFolderErrorPath (line 576) | CreateFolderErrorPath = "path"
type CreateFolderResult (line 601) | type CreateFolderResult struct
function NewCreateFolderResult (line 608) | func NewCreateFolderResult(Metadata *FolderMetadata) *CreateFolderResult {
type DeleteArg (line 615) | type DeleteArg struct
function NewDeleteArg (line 624) | func NewDeleteArg(Path string) *DeleteArg {
type DeleteBatchArg (line 631) | type DeleteBatchArg struct
function NewDeleteBatchArg (line 637) | func NewDeleteBatchArg(Entries []*DeleteArg) *DeleteBatchArg {
type DeleteBatchError (line 644) | type DeleteBatchError struct
constant DeleteBatchErrorTooManyWriteOperations (line 650) | DeleteBatchErrorTooManyWriteOperations = "too_many_write_operations"
constant DeleteBatchErrorOther (line 651) | DeleteBatchErrorOther = "other"
type DeleteBatchJobStatus (line 655) | type DeleteBatchJobStatus struct
method UnmarshalJSON (line 672) | func (u *DeleteBatchJobStatus) UnmarshalJSON(body []byte) error {
constant DeleteBatchJobStatusInProgress (line 665) | DeleteBatchJobStatusInProgress = "in_progress"
constant DeleteBatchJobStatusComplete (line 666) | DeleteBatchJobStatusComplete = "complete"
constant DeleteBatchJobStatusFailed (line 667) | DeleteBatchJobStatusFailed = "failed"
constant DeleteBatchJobStatusOther (line 668) | DeleteBatchJobStatusOther = "other"
type DeleteBatchLaunch (line 699) | type DeleteBatchLaunch struct
method UnmarshalJSON (line 717) | func (u *DeleteBatchLaunch) UnmarshalJSON(body []byte) error {
constant DeleteBatchLaunchAsyncJobId (line 711) | DeleteBatchLaunchAsyncJobId = "async_job_id"
constant DeleteBatchLaunchComplete (line 712) | DeleteBatchLaunchComplete = "complete"
constant DeleteBatchLaunchOther (line 713) | DeleteBatchLaunchOther = "other"
type DeleteBatchResult (line 745) | type DeleteBatchResult struct
function NewDeleteBatchResult (line 753) | func NewDeleteBatchResult(Entries []*DeleteBatchResultEntry) *DeleteBatc...
type DeleteBatchResultData (line 760) | type DeleteBatchResultData struct
method UnmarshalJSON (line 773) | func (u *DeleteBatchResultData) UnmarshalJSON(b []byte) error {
function NewDeleteBatchResultData (line 766) | func NewDeleteBatchResultData(Metadata IsMetadata) *DeleteBatchResultData {
type DeleteBatchResultEntry (line 791) | type DeleteBatchResultEntry struct
method UnmarshalJSON (line 806) | func (u *DeleteBatchResultEntry) UnmarshalJSON(body []byte) error {
constant DeleteBatchResultEntrySuccess (line 801) | DeleteBatchResultEntrySuccess = "success"
constant DeleteBatchResultEntryFailure (line 802) | DeleteBatchResultEntryFailure = "failure"
type DeleteError (line 832) | type DeleteError struct
method UnmarshalJSON (line 850) | func (u *DeleteError) UnmarshalJSON(body []byte) error {
constant DeleteErrorPathLookup (line 842) | DeleteErrorPathLookup = "path_lookup"
constant DeleteErrorPathWrite (line 843) | DeleteErrorPathWrite = "path_write"
constant DeleteErrorTooManyWriteOperations (line 844) | DeleteErrorTooManyWriteOperations = "too_many_write_operations"
constant DeleteErrorTooManyFiles (line 845) | DeleteErrorTooManyFiles = "too_many_files"
constant DeleteErrorOther (line 846) | DeleteErrorOther = "other"
type DeleteResult (line 876) | type DeleteResult struct
method UnmarshalJSON (line 890) | func (u *DeleteResult) UnmarshalJSON(b []byte) error {
function NewDeleteResult (line 883) | func NewDeleteResult(Metadata IsMetadata) *DeleteResult {
type Metadata (line 908) | type Metadata struct
method IsMetadata (line 944) | func (u *Metadata) IsMetadata() {}
function NewMetadata (line 932) | func NewMetadata(Name string) *Metadata {
type IsMetadata (line 939) | type IsMetadata interface
type metadataUnion (line 946) | type metadataUnion struct
method UnmarshalJSON (line 964) | func (u *metadataUnion) UnmarshalJSON(body []byte) error {
constant MetadataFile (line 958) | MetadataFile = "file"
constant MetadataFolder (line 959) | MetadataFolder = "folder"
constant MetadataDeleted (line 960) | MetadataDeleted = "deleted"
function IsMetadataFromJSON (line 995) | func IsMetadataFromJSON(data []byte) (IsMetadata, error) {
type DeletedMetadata (line 1016) | type DeletedMetadata struct
function NewDeletedMetadata (line 1021) | func NewDeletedMetadata(Name string) *DeletedMetadata {
type Dimensions (line 1028) | type Dimensions struct
function NewDimensions (line 1036) | func NewDimensions(Height uint64, Width uint64) *Dimensions {
type DownloadArg (line 1044) | type DownloadArg struct
function NewDownloadArg (line 1054) | func NewDownloadArg(Path string) *DownloadArg {
type DownloadError (line 1061) | type DownloadError struct
method UnmarshalJSON (line 1075) | func (u *DownloadError) UnmarshalJSON(body []byte) error {
constant DownloadErrorPath (line 1069) | DownloadErrorPath = "path"
constant DownloadErrorUnsupportedFile (line 1070) | DownloadErrorUnsupportedFile = "unsupported_file"
constant DownloadErrorOther (line 1071) | DownloadErrorOther = "other"
type DownloadZipArg (line 1096) | type DownloadZipArg struct
function NewDownloadZipArg (line 1102) | func NewDownloadZipArg(Path string) *DownloadZipArg {
type DownloadZipError (line 1109) | type DownloadZipError struct
method UnmarshalJSON (line 1124) | func (u *DownloadZipError) UnmarshalJSON(body []byte) error {
constant DownloadZipErrorPath (line 1117) | DownloadZipErrorPath = "path"
constant DownloadZipErrorTooLarge (line 1118) | DownloadZipErrorTooLarge = "too_large"
constant DownloadZipErrorTooManyFiles (line 1119) | DownloadZipErrorTooManyFiles = "too_many_files"
constant DownloadZipErrorOther (line 1120) | DownloadZipErrorOther = "other"
type DownloadZipResult (line 1145) | type DownloadZipResult struct
function NewDownloadZipResult (line 1151) | func NewDownloadZipResult(Metadata *FolderMetadata) *DownloadZipResult {
type ExportArg (line 1158) | type ExportArg struct
function NewExportArg (line 1169) | func NewExportArg(Path string) *ExportArg {
type ExportError (line 1176) | type ExportError struct
method UnmarshalJSON (line 1192) | func (u *ExportError) UnmarshalJSON(body []byte) error {
constant ExportErrorPath (line 1184) | ExportErrorPath = "path"
constant ExportErrorNonExportable (line 1185) | ExportErrorNonExportable = "non_exportable"
constant ExportErrorInvalidExportFormat (line 1186) | ExportErrorInvalidExportFormat = "invalid_export_format"
constant ExportErrorRetryError (line 1187) | ExportErrorRetryError = "retry_error"
constant ExportErrorOther (line 1188) | ExportErrorOther = "other"
type ExportInfo (line 1213) | type ExportInfo struct
function NewExportInfo (line 1222) | func NewExportInfo() *ExportInfo {
type ExportMetadata (line 1228) | type ExportMetadata struct
function NewExportMetadata (line 1245) | func NewExportMetadata(Name string, Size uint64) *ExportMetadata {
type ExportResult (line 1253) | type ExportResult struct
function NewExportResult (line 1261) | func NewExportResult(ExportMetadata *ExportMetadata, FileMetadata *FileM...
type FileCategory (line 1269) | type FileCategory struct
constant FileCategoryImage (line 1275) | FileCategoryImage = "image"
constant FileCategoryDocument (line 1276) | FileCategoryDocument = "document"
constant FileCategoryPdf (line 1277) | FileCategoryPdf = "pdf"
constant FileCategorySpreadsheet (line 1278) | FileCategorySpreadsheet = "spreadsheet"
constant FileCategoryPresentation (line 1279) | FileCategoryPresentation = "presentation"
constant FileCategoryAudio (line 1280) | FileCategoryAudio = "audio"
constant FileCategoryVideo (line 1281) | FileCategoryVideo = "video"
constant FileCategoryFolder (line 1282) | FileCategoryFolder = "folder"
constant FileCategoryPaper (line 1283) | FileCategoryPaper = "paper"
constant FileCategoryOthers (line 1284) | FileCategoryOthers = "others"
constant FileCategoryOther (line 1285) | FileCategoryOther = "other"
type FileLock (line 1289) | type FileLock struct
function NewFileLock (line 1295) | func NewFileLock(Content *FileLockContent) *FileLock {
type FileLockContent (line 1302) | type FileLockContent struct
method UnmarshalJSON (line 1316) | func (u *FileLockContent) UnmarshalJSON(body []byte) error {
constant FileLockContentUnlocked (line 1310) | FileLockContentUnlocked = "unlocked"
constant FileLockContentSingleUser (line 1311) | FileLockContentSingleUser = "single_user"
constant FileLockContentOther (line 1312) | FileLockContentOther = "other"
type FileLockMetadata (line 1337) | type FileLockMetadata struct
function NewFileLockMetadata (line 1349) | func NewFileLockMetadata() *FileLockMetadata {
type FileMetadata (line 1355) | type FileMetadata struct
function NewFileMetadata (line 1407) | func NewFileMetadata(Name string, Id string, ClientModified time.Time, S...
type SharingInfo (line 1420) | type SharingInfo struct
function NewSharingInfo (line 1427) | func NewSharingInfo(ReadOnly bool) *SharingInfo {
type FileSharingInfo (line 1435) | type FileSharingInfo struct
function NewFileSharingInfo (line 1445) | func NewFileSharingInfo(ReadOnly bool, ParentSharedFolderId string) *Fil...
type FileStatus (line 1453) | type FileStatus struct
constant FileStatusActive (line 1459) | FileStatusActive = "active"
constant FileStatusDeleted (line 1460) | FileStatusDeleted = "deleted"
constant FileStatusOther (line 1461) | FileStatusOther = "other"
type FolderMetadata (line 1465) | type FolderMetadata struct
function NewFolderMetadata (line 1482) | func NewFolderMetadata(Name string, Id string) *FolderMetadata {
type FolderSharingInfo (line 1491) | type FolderSharingInfo struct
function NewFolderSharingInfo (line 1508) | func NewFolderSharingInfo(ReadOnly bool) *FolderSharingInfo {
type GetCopyReferenceArg (line 1517) | type GetCopyReferenceArg struct
function NewGetCopyReferenceArg (line 1524) | func NewGetCopyReferenceArg(Path string) *GetCopyReferenceArg {
type GetCopyReferenceError (line 1531) | type GetCopyReferenceError struct
method UnmarshalJSON (line 1544) | func (u *GetCopyReferenceError) UnmarshalJSON(body []byte) error {
constant GetCopyReferenceErrorPath (line 1539) | GetCopyReferenceErrorPath = "path"
constant GetCopyReferenceErrorOther (line 1540) | GetCopyReferenceErrorOther = "other"
type GetCopyReferenceResult (line 1565) | type GetCopyReferenceResult struct
method UnmarshalJSON (line 1586) | func (u *GetCopyReferenceResult) UnmarshalJSON(b []byte) error {
function NewGetCopyReferenceResult (line 1577) | func NewGetCopyReferenceResult(Metadata IsMetadata, CopyReference string...
type GetTagsArg (line 1612) | type GetTagsArg struct
function NewGetTagsArg (line 1618) | func NewGetTagsArg(Paths []string) *GetTagsArg {
type GetTagsResult (line 1625) | type GetTagsResult struct
function NewGetTagsResult (line 1631) | func NewGetTagsResult(PathsToTags []*PathToTags) *GetTagsResult {
type GetTemporaryLinkArg (line 1638) | type GetTemporaryLinkArg struct
function NewGetTemporaryLinkArg (line 1644) | func NewGetTemporaryLinkArg(Path string) *GetTemporaryLinkArg {
type GetTemporaryLinkError (line 1651) | type GetTemporaryLinkError struct
method UnmarshalJSON (line 1667) | func (u *GetTemporaryLinkError) UnmarshalJSON(body []byte) error {
constant GetTemporaryLinkErrorPath (line 1659) | GetTemporaryLinkErrorPath = "path"
constant GetTemporaryLinkErrorEmailNotVerified (line 1660) | GetTemporaryLinkErrorEmailNotVerified = "email_not_verified"
constant GetTemporaryLinkErrorUnsupportedFile (line 1661) | GetTemporaryLinkErrorUnsupportedFile = "unsupported_file"
constant GetTemporaryLinkErrorNotAllowed (line 1662) | GetTemporaryLinkErrorNotAllowed = "not_allowed"
constant GetTemporaryLinkErrorOther (line 1663) | GetTemporaryLinkErrorOther = "other"
type GetTemporaryLinkResult (line 1688) | type GetTemporaryLinkResult struct
function NewGetTemporaryLinkResult (line 1696) | func NewGetTemporaryLinkResult(Metadata *FileMetadata, Link string) *Get...
type GetTemporaryUploadLinkArg (line 1704) | type GetTemporaryUploadLinkArg struct
function NewGetTemporaryUploadLinkArg (line 1715) | func NewGetTemporaryUploadLinkArg(CommitInfo *CommitInfo) *GetTemporaryU...
type GetTemporaryUploadLinkResult (line 1723) | type GetTemporaryUploadLinkResult struct
function NewGetTemporaryUploadLinkResult (line 1730) | func NewGetTemporaryUploadLinkResult(Link string) *GetTemporaryUploadLin...
type GetThumbnailBatchArg (line 1737) | type GetThumbnailBatchArg struct
function NewGetThumbnailBatchArg (line 1743) | func NewGetThumbnailBatchArg(Entries []*ThumbnailArg) *GetThumbnailBatch...
type GetThumbnailBatchError (line 1750) | type GetThumbnailBatchError struct
constant GetThumbnailBatchErrorTooManyFiles (line 1756) | GetThumbnailBatchErrorTooManyFiles = "too_many_files"
constant GetThumbnailBatchErrorOther (line 1757) | GetThumbnailBatchErrorOther = "other"
type GetThumbnailBatchResult (line 1761) | type GetThumbnailBatchResult struct
function NewGetThumbnailBatchResult (line 1767) | func NewGetThumbnailBatchResult(Entries []*GetThumbnailBatchResultEntry)...
type GetThumbnailBatchResultData (line 1774) | type GetThumbnailBatchResultData struct
function NewGetThumbnailBatchResultData (line 1783) | func NewGetThumbnailBatchResultData(Metadata *FileMetadata, Thumbnail st...
type GetThumbnailBatchResultEntry (line 1791) | type GetThumbnailBatchResultEntry struct
method UnmarshalJSON (line 1807) | func (u *GetThumbnailBatchResultEntry) UnmarshalJSON(body []byte) error {
constant GetThumbnailBatchResultEntrySuccess (line 1801) | GetThumbnailBatchResultEntrySuccess = "success"
constant GetThumbnailBatchResultEntryFailure (line 1802) | GetThumbnailBatchResultEntryFailure = "failure"
constant GetThumbnailBatchResultEntryOther (line 1803) | GetThumbnailBatchResultEntryOther = "other"
type GpsCoordinates (line 1833) | type GpsCoordinates struct
function NewGpsCoordinates (line 1841) | func NewGpsCoordinates(Latitude float64, Longitude float64) *GpsCoordina...
type HighlightSpan (line 1849) | type HighlightSpan struct
function NewHighlightSpan (line 1858) | func NewHighlightSpan(HighlightStr string, IsHighlighted bool) *Highligh...
type ImportFormat (line 1866) | type ImportFormat struct
constant ImportFormatHtml (line 1872) | ImportFormatHtml = "html"
constant ImportFormatMarkdown (line 1873) | ImportFormatMarkdown = "markdown"
constant ImportFormatPlainText (line 1874) | ImportFormatPlainText = "plain_text"
constant ImportFormatOther (line 1875) | ImportFormatOther = "other"
type ListFolderArg (line 1879) | type ListFolderArg struct
function NewListFolderArg (line 1919) | func NewListFolderArg(Path string) *ListFolderArg {
type ListFolderContinueArg (line 1932) | type ListFolderContinueArg struct
function NewListFolderContinueArg (line 1939) | func NewListFolderContinueArg(Cursor string) *ListFolderContinueArg {
type ListFolderContinueError (line 1946) | type ListFolderContinueError struct
method UnmarshalJSON (line 1960) | func (u *ListFolderContinueError) UnmarshalJSON(body []byte) error {
constant ListFolderContinueErrorPath (line 1954) | ListFolderContinueErrorPath = "path"
constant ListFolderContinueErrorReset (line 1955) | ListFolderContinueErrorReset = "reset"
constant ListFolderContinueErrorOther (line 1956) | ListFolderContinueErrorOther = "other"
type ListFolderError (line 1981) | type ListFolderError struct
method UnmarshalJSON (line 1997) | func (u *ListFolderError) UnmarshalJSON(body []byte) error {
constant ListFolderErrorPath (line 1991) | ListFolderErrorPath = "path"
constant ListFolderErrorTemplateError (line 1992) | ListFolderErrorTemplateError = "template_error"
constant ListFolderErrorOther (line 1993) | ListFolderErrorOther = "other"
type ListFolderGetLatestCursorResult (line 2023) | type ListFolderGetLatestCursorResult struct
function NewListFolderGetLatestCursorResult (line 2030) | func NewListFolderGetLatestCursorResult(Cursor string) *ListFolderGetLat...
type ListFolderLongpollArg (line 2037) | type ListFolderLongpollArg struct
function NewListFolderLongpollArg (line 2050) | func NewListFolderLongpollArg(Cursor string) *ListFolderLongpollArg {
type ListFolderLongpollError (line 2058) | type ListFolderLongpollError struct
constant ListFolderLongpollErrorReset (line 2064) | ListFolderLongpollErrorReset = "reset"
constant ListFolderLongpollErrorOther (line 2065) | ListFolderLongpollErrorOther = "other"
type ListFolderLongpollResult (line 2069) | type ListFolderLongpollResult struct
function NewListFolderLongpollResult (line 2079) | func NewListFolderLongpollResult(Changes bool) *ListFolderLongpollResult {
type ListFolderResult (line 2086) | type ListFolderResult struct
method UnmarshalJSON (line 2107) | func (u *ListFolderResult) UnmarshalJSON(b []byte) error {
function NewListFolderResult (line 2098) | func NewListFolderResult(Entries []IsMetadata, Cursor string, HasMore bo...
type ListRevisionsArg (line 2136) | type ListRevisionsArg struct
function NewListRevisionsArg (line 2147) | func NewListRevisionsArg(Path string) *ListRevisionsArg {
type ListRevisionsError (line 2156) | type ListRevisionsError struct
method UnmarshalJSON (line 2169) | func (u *ListRevisionsError) UnmarshalJSON(body []byte) error {
constant ListRevisionsErrorPath (line 2164) | ListRevisionsErrorPath = "path"
constant ListRevisionsErrorOther (line 2165) | ListRevisionsErrorOther = "other"
type ListRevisionsMode (line 2190) | type ListRevisionsMode struct
constant ListRevisionsModePath (line 2196) | ListRevisionsModePath = "path"
constant ListRevisionsModeId (line 2197) | ListRevisionsModeId = "id"
constant ListRevisionsModeOther (line 2198) | ListRevisionsModeOther = "other"
type ListRevisionsResult (line 2202) | type ListRevisionsResult struct
function NewListRevisionsResult (line 2214) | func NewListRevisionsResult(IsDeleted bool, Entries []*FileMetadata) *Li...
type LockConflictError (line 2222) | type LockConflictError struct
function NewLockConflictError (line 2228) | func NewLockConflictError(Lock *FileLock) *LockConflictError {
type LockFileArg (line 2235) | type LockFileArg struct
function NewLockFileArg (line 2241) | func NewLockFileArg(Path string) *LockFileArg {
type LockFileBatchArg (line 2248) | type LockFileBatchArg struct
function NewLockFileBatchArg (line 2256) | func NewLockFileBatchArg(Entries []*LockFileArg) *LockFileBatchArg {
type LockFileBatchResult (line 2263) | type LockFileBatchResult struct
function NewLockFileBatchResult (line 2272) | func NewLockFileBatchResult(Entries []*LockFileResultEntry) *LockFileBat...
type LockFileError (line 2279) | type LockFileError struct
method UnmarshalJSON (line 2302) | func (u *LockFileError) UnmarshalJSON(body []byte) error {
constant LockFileErrorPathLookup (line 2290) | LockFileErrorPathLookup = "path_lookup"
constant LockFileErrorTooManyWriteOperations (line 2291) | LockFileErrorTooManyWriteOperations = "too_many_write_operations"
constant LockFileErrorTooManyFiles (line 2292) | LockFileErrorTooManyFiles = "too_many_files"
constant LockFileErrorNoWritePermission (line 2293) | LockFileErrorNoWritePermission = "no_write_permission"
constant LockFileErrorCannotBeLocked (line 2294) | LockFileErrorCannotBeLocked = "cannot_be_locked"
constant LockFileErrorFileNotShared (line 2295) | LockFileErrorFileNotShared = "file_not_shared"
constant LockFileErrorLockConflict (line 2296) | LockFileErrorLockConflict = "lock_conflict"
constant LockFileErrorInternalError (line 2297) | LockFileErrorInternalError = "internal_error"
constant LockFileErrorOther (line 2298) | LockFileErrorOther = "other"
type LockFileResult (line 2328) | type LockFileResult struct
method UnmarshalJSON (line 2344) | func (u *LockFileResult) UnmarshalJSON(b []byte) error {
function NewLockFileResult (line 2336) | func NewLockFileResult(Metadata IsMetadata, Lock *FileLock) *LockFileRes...
type LockFileResultEntry (line 2365) | type LockFileResultEntry struct
method UnmarshalJSON (line 2380) | func (u *LockFileResultEntry) UnmarshalJSON(body []byte) error {
constant LockFileResultEntrySuccess (line 2375) | LockFileResultEntrySuccess = "success"
constant LockFileResultEntryFailure (line 2376) | LockFileResultEntryFailure = "failure"
type LookupError (line 2406) | type LookupError struct
method UnmarshalJSON (line 2428) | func (u *LookupError) UnmarshalJSON(body []byte) error {
constant LookupErrorMalformedPath (line 2417) | LookupErrorMalformedPath = "malformed_path"
constant LookupErrorNotFound (line 2418) | LookupErrorNotFound = "not_found"
constant LookupErrorNotFile (line 2419) | LookupErrorNotFile = "not_file"
constant LookupErrorNotFolder (line 2420) | LookupErrorNotFolder = "not_folder"
constant LookupErrorRestrictedContent (line 2421) | LookupErrorRestrictedContent = "restricted_content"
constant LookupErrorUnsupportedContentType (line 2422) | LookupErrorUnsupportedContentType = "unsupported_content_type"
constant LookupErrorLocked (line 2423) | LookupErrorLocked = "locked"
constant LookupErrorOther (line 2424) | LookupErrorOther = "other"
type MediaInfo (line 2452) | type MediaInfo struct
method UnmarshalJSON (line 2465) | func (u *MediaInfo) UnmarshalJSON(body []byte) error {
constant MediaInfoPending (line 2460) | MediaInfoPending = "pending"
constant MediaInfoMetadata (line 2461) | MediaInfoMetadata = "metadata"
type MediaMetadata (line 2488) | type MediaMetadata struct
method IsMediaMetadata (line 2509) | func (u *MediaMetadata) IsMediaMetadata() {}
function NewMediaMetadata (line 2498) | func NewMediaMetadata() *MediaMetadata {
type IsMediaMetadata (line 2504) | type IsMediaMetadata interface
type mediaMetadataUnion (line 2511) | type mediaMetadataUnion struct
method UnmarshalJSON (line 2526) | func (u *mediaMetadataUnion) UnmarshalJSON(body []byte) error {
constant MediaMetadataPhoto (line 2521) | MediaMetadataPhoto = "photo"
constant MediaMetadataVideo (line 2522) | MediaMetadataVideo = "video"
function IsMediaMetadataFromJSON (line 2552) | func IsMediaMetadataFromJSON(data []byte) (IsMediaMetadata, error) {
type MetadataV2 (line 2569) | type MetadataV2 struct
method UnmarshalJSON (line 2582) | func (u *MetadataV2) UnmarshalJSON(body []byte) error {
constant MetadataV2Metadata (line 2577) | MetadataV2Metadata = "metadata"
constant MetadataV2Other (line 2578) | MetadataV2Other = "other"
type MinimalFileLinkMetadata (line 2605) | type MinimalFileLinkMetadata struct
function NewMinimalFileLinkMetadata (line 2621) | func NewMinimalFileLinkMetadata(Url string, Rev string) *MinimalFileLink...
type RelocationBatchArgBase (line 2629) | type RelocationBatchArgBase struct
function NewRelocationBatchArgBase (line 2639) | func NewRelocationBatchArgBase(Entries []*RelocationPath) *RelocationBat...
type MoveBatchArg (line 2647) | type MoveBatchArg struct
function NewMoveBatchArg (line 2656) | func NewMoveBatchArg(Entries []*RelocationPath) *MoveBatchArg {
type MoveIntoFamilyError (line 2665) | type MoveIntoFamilyError struct
constant MoveIntoFamilyErrorIsSharedFolder (line 2671) | MoveIntoFamilyErrorIsSharedFolder = "is_shared_folder"
constant MoveIntoFamilyErrorOther (line 2672) | MoveIntoFamilyErrorOther = "other"
type MoveIntoVaultError (line 2676) | type MoveIntoVaultError struct
constant MoveIntoVaultErrorIsSharedFolder (line 2682) | MoveIntoVaultErrorIsSharedFolder = "is_shared_folder"
constant MoveIntoVaultErrorOther (line 2683) | MoveIntoVaultErrorOther = "other"
type PaperContentError (line 2687) | type PaperContentError struct
constant PaperContentErrorInsufficientPermissions (line 2693) | PaperContentErrorInsufficientPermissions = "insufficient_permissions"
constant PaperContentErrorContentMalformed (line 2694) | PaperContentErrorContentMalformed = "content_malformed"
constant PaperContentErrorDocLengthExceeded (line 2695) | PaperContentErrorDocLengthExceeded = "doc_length_exceeded"
constant PaperContentErrorImageSizeExceeded (line 2696) | PaperContentErrorImageSizeExceeded = "image_size_exceeded"
constant PaperContentErrorOther (line 2697) | PaperContentErrorOther = "other"
type PaperCreateArg (line 2701) | type PaperCreateArg struct
function NewPaperCreateArg (line 2711) | func NewPaperCreateArg(Path string, ImportFormat *ImportFormat) *PaperCr...
type PaperCreateError (line 2719) | type PaperCreateError struct
constant PaperCreateErrorInsufficientPermissions (line 2725) | PaperCreateErrorInsufficientPermissions = "insufficient_permissions"
constant PaperCreateErrorContentMalformed (line 2726) | PaperCreateErrorContentMalformed = "content_malformed"
constant PaperCreateErrorDocLengthExceeded (line 2727) | PaperCreateErrorDocLengthExceeded = "doc_length_exceeded"
constant PaperCreateErrorImageSizeExceeded (line 2728) | PaperCreateErrorImageSizeExceeded = "image_size_exceeded"
constant PaperCreateErrorOther (line 2729) | PaperCreateErrorOther = "other"
constant PaperCreateErrorInvalidPath (line 2730) | PaperCreateErrorInvalidPath = "invalid_path"
constant PaperCreateErrorEmailUnverified (line 2731) | PaperCreateErrorEmailUnverified = "email_unverified"
constant PaperCreateErrorInvalidFileExtension (line 2732) | PaperCreateErrorInvalidFileExtension = "invalid_file_extension"
constant PaperCreateErrorPaperDisabled (line 2733) | PaperCreateErrorPaperDisabled = "paper_disabled"
type PaperCreateResult (line 2737) | type PaperCreateResult struct
function NewPaperCreateResult (line 2750) | func NewPaperCreateResult(Url string, ResultPath string, FileId string, ...
type PaperDocUpdatePolicy (line 2760) | type PaperDocUpdatePolicy struct
constant PaperDocUpdatePolicyUpdate (line 2766) | PaperDocUpdatePolicyUpdate = "update"
constant PaperDocUpdatePolicyOverwrite (line 2767) | PaperDocUpdatePolicyOverwrite = "overwrite"
constant PaperDocUpdatePolicyPrepend (line 2768) | PaperDocUpdatePolicyPrepend = "prepend"
constant PaperDocUpdatePolicyAppend (line 2769) | PaperDocUpdatePolicyAppend = "append"
constant PaperDocUpdatePolicyOther (line 2770) | PaperDocUpdatePolicyOther = "other"
type PaperUpdateArg (line 2774) | type PaperUpdateArg struct
function NewPaperUpdateArg (line 2789) | func NewPaperUpdateArg(Path string, ImportFormat *ImportFormat, DocUpdat...
type PaperUpdateError (line 2798) | type PaperUpdateError struct
method UnmarshalJSON (line 2818) | func (u *PaperUpdateError) UnmarshalJSON(body []byte) error {
constant PaperUpdateErrorInsufficientPermissions (line 2806) | PaperUpdateErrorInsufficientPermissions = "insufficient_permissions"
constant PaperUpdateErrorContentMalformed (line 2807) | PaperUpdateErrorContentMalformed = "content_malformed"
constant PaperUpdateErrorDocLengthExceeded (line 2808) | PaperUpdateErrorDocLengthExceeded = "doc_length_exceeded"
constant PaperUpdateErrorImageSizeExceeded (line 2809) | PaperUpdateErrorImageSizeExceeded = "image_size_exceeded"
constant PaperUpdateErrorOther (line 2810) | PaperUpdateErrorOther = "other"
constant PaperUpdateErrorPath (line 2811) | PaperUpdateErrorPath = "path"
constant PaperUpdateErrorRevisionMismatch (line 2812) | PaperUpdateErrorRevisionMismatch = "revision_mismatch"
constant PaperUpdateErrorDocArchived (line 2813) | PaperUpdateErrorDocArchived = "doc_archived"
constant PaperUpdateErrorDocDeleted (line 2814) | PaperUpdateErrorDocDeleted = "doc_deleted"
type PaperUpdateResult (line 2839) | type PaperUpdateResult struct
function NewPaperUpdateResult (line 2845) | func NewPaperUpdateResult(PaperRevision int64) *PaperUpdateResult {
type PathOrLink (line 2852) | type PathOrLink struct
method UnmarshalJSON (line 2868) | func (u *PathOrLink) UnmarshalJSON(body []byte) error {
constant PathOrLinkPath (line 2862) | PathOrLinkPath = "path"
constant PathOrLinkLink (line 2863) | PathOrLinkLink = "link"
constant PathOrLinkOther (line 2864) | PathOrLinkOther = "other"
type PathToTags (line 2894) | type PathToTags struct
function NewPathToTags (line 2902) | func NewPathToTags(Path string, Tags []*Tag) *PathToTags {
type PhotoMetadata (line 2910) | type PhotoMetadata struct
function NewPhotoMetadata (line 2915) | func NewPhotoMetadata() *PhotoMetadata {
type PreviewArg (line 2921) | type PreviewArg struct
function NewPreviewArg (line 2929) | func NewPreviewArg(Path string) *PreviewArg {
type PreviewError (line 2936) | type PreviewError struct
method UnmarshalJSON (line 2951) | func (u *PreviewError) UnmarshalJSON(body []byte) error {
constant PreviewErrorPath (line 2944) | PreviewErrorPath = "path"
constant PreviewErrorInProgress (line 2945) | PreviewErrorInProgress = "in_progress"
constant PreviewErrorUnsupportedExtension (line 2946) | PreviewErrorUnsupportedExtension = "unsupported_extension"
constant PreviewErrorUnsupportedContent (line 2947) | PreviewErrorUnsupportedContent = "unsupported_content"
type PreviewResult (line 2972) | type PreviewResult struct
function NewPreviewResult (line 2984) | func NewPreviewResult() *PreviewResult {
type RelocationPath (line 2990) | type RelocationPath struct
function NewRelocationPath (line 2998) | func NewRelocationPath(FromPath string, ToPath string) *RelocationPath {
type RelocationArg (line 3006) | type RelocationArg struct
function NewRelocationArg (line 3020) | func NewRelocationArg(FromPath string, ToPath string) *RelocationArg {
type RelocationBatchArg (line 3031) | type RelocationBatchArg struct
function NewRelocationBatchArg (line 3042) | func NewRelocationBatchArg(Entries []*RelocationPath) *RelocationBatchArg {
type RelocationError (line 3052) | type RelocationError struct
method UnmarshalJSON (line 3088) | func (u *RelocationError) UnmarshalJSON(body []byte) error {
constant RelocationErrorFromLookup (line 3070) | RelocationErrorFromLookup = "from_lookup"
constant RelocationErrorFromWrite (line 3071) | RelocationErrorFromWrite = "from_write"
constant RelocationErrorTo (line 3072) | RelocationErrorTo = "to"
constant RelocationErrorCantCopySharedFolder (line 3073) | RelocationErrorCantCopySharedFolder = "cant_copy_shared_folder"
constant RelocationErrorCantNestSharedFolder (line 3074) | RelocationErrorCantNestSharedFolder = "cant_nest_shared_folder"
constant RelocationErrorCantMoveFolderIntoItself (line 3075) | RelocationErrorCantMoveFolderIntoItself = "cant_move_folder_into_itself"
constant RelocationErrorTooManyFiles (line 3076) | RelocationErrorTooManyFiles = "too_many_files"
constant RelocationErrorDuplicatedOrNestedPaths (line 3077) | RelocationErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
constant RelocationErrorCantTransferOwnership (line 3078) | RelocationErrorCantTransferOwnership = "cant_transfer_ownership"
constant RelocationErrorInsufficientQuota (line 3079) | RelocationErrorInsufficientQuota = "insufficient_quota"
constant RelocationErrorInternalError (line 3080) | RelocationErrorInternalError = "internal_error"
constant RelocationErrorCantMoveSharedFolder (line 3081) | RelocationErrorCantMoveSharedFolder = "cant_move_shared_folder"
constant RelocationErrorCantMoveIntoVault (line 3082) | RelocationErrorCantMoveIntoVault = "cant_move_into_vault"
constant RelocationErrorCantMoveIntoFamily (line 3083) | RelocationErrorCantMoveIntoFamily = "cant_move_into_family"
constant RelocationErrorOther (line 3084) | RelocationErrorOther = "other"
type RelocationBatchError (line 3131) | type RelocationBatchError struct
method UnmarshalJSON (line 3168) | func (u *RelocationBatchError) UnmarshalJSON(body []byte) error {
constant RelocationBatchErrorFromLookup (line 3149) | RelocationBatchErrorFromLookup = "from_lookup"
constant RelocationBatchErrorFromWrite (line 3150) | RelocationBatchErrorFromWrite = "from_write"
constant RelocationBatchErrorTo (line 3151) | RelocationBatchErrorTo = "to"
constant RelocationBatchErrorCantCopySharedFolder (line 3152) | RelocationBatchErrorCantCopySharedFolder = "cant_copy_shared_folder"
constant RelocationBatchErrorCantNestSharedFolder (line 3153) | RelocationBatchErrorCantNestSharedFolder = "cant_nest_shared_folder"
constant RelocationBatchErrorCantMoveFolderIntoItself (line 3154) | RelocationBatchErrorCantMoveFolderIntoItself = "cant_move_folder_into_it...
constant RelocationBatchErrorTooManyFiles (line 3155) | RelocationBatchErrorTooManyFiles = "too_many_files"
constant RelocationBatchErrorDuplicatedOrNestedPaths (line 3156) | RelocationBatchErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
constant RelocationBatchErrorCantTransferOwnership (line 3157) | RelocationBatchErrorCantTransferOwnership = "cant_transfer_ownership"
constant RelocationBatchErrorInsufficientQuota (line 3158) | RelocationBatchErrorInsufficientQuota = "insufficient_quota"
constant RelocationBatchErrorInternalError (line 3159) | RelocationBatchErrorInternalError = "internal_error"
constant RelocationBatchErrorCantMoveSharedFolder (line 3160) | RelocationBatchErrorCantMoveSharedFolder = "cant_move_shared_folder"
constant RelocationBatchErrorCantMoveIntoVault (line 3161) | RelocationBatchErrorCantMoveIntoVault = "cant_move_into_vault"
constant RelocationBatchErrorCantMoveIntoFamily (line 3162) | RelocationBatchErrorCantMoveIntoFamily = "cant_move_into_family"
constant RelocationBatchErrorOther (line 3163) | RelocationBatchErrorOther = "other"
constant RelocationBatchErrorTooManyWriteOperations (line 3164) | RelocationBatchErrorTooManyWriteOperations = "too_many_write_operations"
type RelocationBatchErrorEntry (line 3211) | type RelocationBatchErrorEntry struct
method UnmarshalJSON (line 3226) | func (u *RelocationBatchErrorEntry) UnmarshalJSON(body []byte) error {
constant RelocationBatchErrorEntryRelocationError (line 3219) | RelocationBatchErrorEntryRelocationError = "relocation_error"
constant RelocationBatchErrorEntryInternalError (line 3220) | RelocationBatchErrorEntryInternalError = "internal_error"
constant RelocationBatchErrorEntryTooManyWriteOperations (line 3221) | RelocationBatchErrorEntryTooManyWriteOperations = "too_many_write_operat...
constant RelocationBatchErrorEntryOther (line 3222) | RelocationBatchErrorEntryOther = "other"
type RelocationBatchJobStatus (line 3247) | type RelocationBatchJobStatus struct
method UnmarshalJSON (line 3263) | func (u *RelocationBatchJobStatus) UnmarshalJSON(body []byte) error {
constant RelocationBatchJobStatusInProgress (line 3257) | RelocationBatchJobStatusInProgress = "in_progress"
constant RelocationBatchJobStatusComplete (line 3258) | RelocationBatchJobStatusComplete = "complete"
constant RelocationBatchJobStatusFailed (line 3259) | RelocationBatchJobStatusFailed = "failed"
type RelocationBatchLaunch (line 3290) | type RelocationBatchLaunch struct
method UnmarshalJSON (line 3308) | func (u *RelocationBatchLaunch) UnmarshalJSON(body []byte) error {
constant RelocationBatchLaunchAsyncJobId (line 3302) | RelocationBatchLaunchAsyncJobId = "async_job_id"
constant RelocationBatchLaunchComplete (line 3303) | RelocationBatchLaunchComplete = "complete"
constant RelocationBatchLaunchOther (line 3304) | RelocationBatchLaunchOther = "other"
type RelocationBatchResult (line 3336) | type RelocationBatchResult struct
function NewRelocationBatchResult (line 3343) | func NewRelocationBatchResult(Entries []*RelocationBatchResultData) *Rel...
type RelocationBatchResultData (line 3350) | type RelocationBatchResultData struct
method UnmarshalJSON (line 3363) | func (u *RelocationBatchResultData) UnmarshalJSON(b []byte) error {
function NewRelocationBatchResultData (line 3356) | func NewRelocationBatchResultData(Metadata IsMetadata) *RelocationBatchR...
type RelocationBatchResultEntry (line 3381) | type RelocationBatchResultEntry struct
method UnmarshalJSON (line 3397) | func (u *RelocationBatchResultEntry) UnmarshalJSON(body []byte) error {
constant RelocationBatchResultEntrySuccess (line 3391) | RelocationBatchResultEntrySuccess = "success"
constant RelocationBatchResultEntryFailure (line 3392) | RelocationBatchResultEntryFailure = "failure"
constant RelocationBatchResultEntryOther (line 3393) | RelocationBatchResultEntryOther = "other"
type RelocationBatchV2JobStatus (line 3427) | type RelocationBatchV2JobStatus struct
method UnmarshalJSON (line 3440) | func (u *RelocationBatchV2JobStatus) UnmarshalJSON(body []byte) error {
constant RelocationBatchV2JobStatusInProgress (line 3435) | RelocationBatchV2JobStatusInProgress = "in_progress"
constant RelocationBatchV2JobStatusComplete (line 3436) | RelocationBatchV2JobStatusComplete = "complete"
type RelocationBatchV2Launch (line 3462) | type RelocationBatchV2Launch struct
method UnmarshalJSON (line 3479) | func (u *RelocationBatchV2Launch) UnmarshalJSON(body []byte) error {
constant RelocationBatchV2LaunchAsyncJobId (line 3474) | RelocationBatchV2LaunchAsyncJobId = "async_job_id"
constant RelocationBatchV2LaunchComplete (line 3475) | RelocationBatchV2LaunchComplete = "complete"
type RelocationBatchV2Result (line 3507) | type RelocationBatchV2Result struct
function NewRelocationBatchV2Result (line 3516) | func NewRelocationBatchV2Result(Entries []*RelocationBatchResultEntry) *...
type RelocationResult (line 3523) | type RelocationResult struct
method UnmarshalJSON (line 3537) | func (u *RelocationResult) UnmarshalJSON(b []byte) error {
function NewRelocationResult (line 3530) | func NewRelocationResult(Metadata IsMetadata) *RelocationResult {
type RemoveTagArg (line 3555) | type RemoveTagArg struct
function NewRemoveTagArg (line 3564) | func NewRemoveTagArg(Path string, TagText string) *RemoveTagArg {
type RemoveTagError (line 3572) | type RemoveTagError struct
method UnmarshalJSON (line 3586) | func (u *RemoveTagError) UnmarshalJSON(body []byte) error {
constant RemoveTagErrorPath (line 3580) | RemoveTagErrorPath = "path"
constant RemoveTagErrorOther (line 3581) | RemoveTagErrorOther = "other"
constant RemoveTagErrorTagNotPresent (line 3582) | RemoveTagErrorTagNotPresent = "tag_not_present"
type RestoreArg (line 3607) | type RestoreArg struct
function NewRestoreArg (line 3615) | func NewRestoreArg(Path string, Rev string) *RestoreArg {
type RestoreError (line 3623) | type RestoreError struct
method UnmarshalJSON (line 3641) | func (u *RestoreError) UnmarshalJSON(body []byte) error {
constant RestoreErrorPathLookup (line 3633) | RestoreErrorPathLookup = "path_lookup"
constant RestoreErrorPathWrite (line 3634) | RestoreErrorPathWrite = "path_write"
constant RestoreErrorInvalidRevision (line 3635) | RestoreErrorInvalidRevision = "invalid_revision"
constant RestoreErrorInProgress (line 3636) | RestoreErrorInProgress = "in_progress"
constant RestoreErrorOther (line 3637) | RestoreErrorOther = "other"
type SaveCopyReferenceArg (line 3668) | type SaveCopyReferenceArg struct
function NewSaveCopyReferenceArg (line 3676) | func NewSaveCopyReferenceArg(CopyReference string, Path string) *SaveCop...
type SaveCopyReferenceError (line 3684) | type SaveCopyReferenceError struct
method UnmarshalJSON (line 3701) | func (u *SaveCopyReferenceError) UnmarshalJSON(body []byte) error {
constant SaveCopyReferenceErrorPath (line 3692) | SaveCopyReferenceErrorPath = "path"
constant SaveCopyReferenceErrorInvalidCopyReference (line 3693) | SaveCopyReferenceErrorInvalidCopyReference = "invalid_copy_reference"
constant SaveCopyReferenceErrorNoPermission (line 3694) | SaveCopyReferenceErrorNoPermission = "no_permission"
constant SaveCopyReferenceErrorNotFound (line 3695) | SaveCopyReferenceErrorNotFound = "not_found"
constant SaveCopyReferenceErrorTooManyFiles (line 3696) | SaveCopyReferenceErrorTooManyFiles = "too_many_files"
constant SaveCopyReferenceErrorOther (line 3697) | SaveCopyReferenceErrorOther = "other"
type SaveCopyReferenceResult (line 3722) | type SaveCopyReferenceResult struct
method UnmarshalJSON (line 3736) | func (u *SaveCopyReferenceResult) UnmarshalJSON(b []byte) error {
function NewSaveCopyReferenceResult (line 3729) | func NewSaveCopyReferenceResult(Metadata IsMetadata) *SaveCopyReferenceR...
type SaveUrlArg (line 3755) | type SaveUrlArg struct
function NewSaveUrlArg (line 3763) | func NewSaveUrlArg(Path string, Url string) *SaveUrlArg {
type SaveUrlError (line 3771) | type SaveUrlError struct
method UnmarshalJSON (line 3787) | func (u *SaveUrlError) UnmarshalJSON(body []byte) error {
constant SaveUrlErrorPath (line 3779) | SaveUrlErrorPath = "path"
constant SaveUrlErrorDownloadFailed (line 3780) | SaveUrlErrorDownloadFailed = "download_failed"
constant SaveUrlErrorInvalidUrl (line 3781) | SaveUrlErrorInvalidUrl = "invalid_url"
constant SaveUrlErrorNotFound (line 3782) | SaveUrlErrorNotFound = "not_found"
constant SaveUrlErrorOther (line 3783) | SaveUrlErrorOther = "other"
type SaveUrlJobStatus (line 3808) | type SaveUrlJobStatus struct
method UnmarshalJSON (line 3824) | func (u *SaveUrlJobStatus) UnmarshalJSON(body []byte) error {
constant SaveUrlJobStatusInProgress (line 3818) | SaveUrlJobStatusInProgress = "in_progress"
constant SaveUrlJobStatusComplete (line 3819) | SaveUrlJobStatusComplete = "complete"
constant SaveUrlJobStatusFailed (line 3820) | SaveUrlJobStatusFailed = "failed"
type SaveUrlResult (line 3850) | type SaveUrlResult struct
method UnmarshalJSON (line 3867) | func (u *SaveUrlResult) UnmarshalJSON(body []byte) error {
constant SaveUrlResultAsyncJobId (line 3862) | SaveUrlResultAsyncJobId = "async_job_id"
constant SaveUrlResultComplete (line 3863) | SaveUrlResultComplete = "complete"
type SearchArg (line 3895) | type SearchArg struct
function NewSearchArg (line 3915) | func NewSearchArg(Path string, Query string) *SearchArg {
type SearchError (line 3926) | type SearchError struct
method UnmarshalJSON (line 3943) | func (u *SearchError) UnmarshalJSON(body []byte) error {
constant SearchErrorPath (line 3936) | SearchErrorPath = "path"
constant SearchErrorInvalidArgument (line 3937) | SearchErrorInvalidArgument = "invalid_argument"
constant SearchErrorInternalError (line 3938) | SearchErrorInternalError = "internal_error"
constant SearchErrorOther (line 3939) | SearchErrorOther = "other"
type SearchMatch (line 3969) | type SearchMatch struct
method UnmarshalJSON (line 3985) | func (u *SearchMatch) UnmarshalJSON(b []byte) error {
function NewSearchMatch (line 3977) | func NewSearchMatch(MatchType *SearchMatchType, Metadata IsMetadata) *Se...
type SearchMatchFieldOptions (line 4006) | type SearchMatchFieldOptions struct
function NewSearchMatchFieldOptions (line 4012) | func NewSearchMatchFieldOptions() *SearchMatchFieldOptions {
type SearchMatchType (line 4019) | type SearchMatchType struct
constant SearchMatchTypeFilename (line 4025) | SearchMatchTypeFilename = "filename"
constant SearchMatchTypeContent (line 4026) | SearchMatchTypeContent = "content"
constant SearchMatchTypeBoth (line 4027) | SearchMatchTypeBoth = "both"
type SearchMatchTypeV2 (line 4031) | type SearchMatchTypeV2 struct
constant SearchMatchTypeV2Filename (line 4037) | SearchMatchTypeV2Filename = "filename"
constant SearchMatchTypeV2FileContent (line 4038) | SearchMatchTypeV2FileContent = "file_content"
constant SearchMatchTypeV2FilenameAndContent (line 4039) | SearchMatchTypeV2FilenameAndContent = "filename_and_content"
constant SearchMatchTypeV2ImageContent (line 4040) | SearchMatchTypeV2ImageContent = "image_content"
constant SearchMatchTypeV2Other (line 4041) | SearchMatchTypeV2Other = "other"
type SearchMatchV2 (line 4045) | type SearchMatchV2 struct
function NewSearchMatchV2 (line 4056) | func NewSearchMatchV2(Metadata *MetadataV2) *SearchMatchV2 {
type SearchMode (line 4063) | type SearchMode struct
constant SearchModeFilename (line 4069) | SearchModeFilename = "filename"
constant SearchModeFilenameAndContent (line 4070) | SearchModeFilenameAndContent = "filename_and_content"
constant SearchModeDeletedFilename (line 4071) | SearchModeDeletedFilename = "deleted_filename"
type SearchOptions (line 4075) | type SearchOptions struct
function NewSearchOptions (line 4099) | func NewSearchOptions() *SearchOptions {
type SearchOrderBy (line 4108) | type SearchOrderBy struct
constant SearchOrderByRelevance (line 4114) | SearchOrderByRelevance = "relevance"
constant SearchOrderByLastModifiedTime (line 4115) | SearchOrderByLastModifiedTime = "last_modified_time"
constant SearchOrderByOther (line 4116) | SearchOrderByOther = "other"
type SearchResult (line 4120) | type SearchResult struct
function NewSearchResult (line 4132) | func NewSearchResult(Matches []*SearchMatch, More bool, Start uint64) *S...
type SearchV2Arg (line 4141) | type SearchV2Arg struct
function NewSearchV2Arg (line 4155) | func NewSearchV2Arg(Query string) *SearchV2Arg {
type SearchV2ContinueArg (line 4162) | type SearchV2ContinueArg struct
function NewSearchV2ContinueArg (line 4169) | func NewSearchV2ContinueArg(Cursor string) *SearchV2ContinueArg {
type SearchV2Result (line 4176) | type SearchV2Result struct
function NewSearchV2Result (line 4189) | func NewSearchV2Result(Matches []*SearchMatchV2, HasMore bool) *SearchV2...
type SharedLink (line 4197) | type SharedLink struct
function NewSharedLink (line 4205) | func NewSharedLink(Url string) *SharedLink {
type SharedLinkFileInfo (line 4212) | type SharedLinkFileInfo struct
function NewSharedLinkFileInfo (line 4226) | func NewSharedLinkFileInfo(Url string) *SharedLinkFileInfo {
type SingleUserLock (line 4233) | type SingleUserLock struct
function NewSingleUserLock (line 4243) | func NewSingleUserLock(Created time.Time, LockHolderAccountId string) *S...
type SymlinkInfo (line 4251) | type SymlinkInfo struct
function NewSymlinkInfo (line 4257) | func NewSymlinkInfo(Target string) *SymlinkInfo {
type SyncSetting (line 4264) | type SyncSetting struct
constant SyncSettingDefault (line 4270) | SyncSettingDefault = "default"
constant SyncSettingNotSynced (line 4271) | SyncSettingNotSynced = "not_synced"
constant SyncSettingNotSyncedInactive (line 4272) | SyncSettingNotSyncedInactive = "not_synced_inactive"
constant SyncSettingOther (line 4273) | SyncSettingOther = "other"
type SyncSettingArg (line 4277) | type SyncSettingArg struct
constant SyncSettingArgDefault (line 4283) | SyncSettingArgDefault = "default"
constant SyncSettingArgNotSynced (line 4284) | SyncSettingArgNotSynced = "not_synced"
constant SyncSettingArgOther (line 4285) | SyncSettingArgOther = "other"
type SyncSettingsError (line 4289) | type SyncSettingsError struct
method UnmarshalJSON (line 4304) | func (u *SyncSettingsError) UnmarshalJSON(body []byte) error {
constant SyncSettingsErrorPath (line 4297) | SyncSettingsErrorPath = "path"
constant SyncSettingsErrorUnsupportedCombination (line 4298) | SyncSettingsErrorUnsupportedCombination = "unsupported_combination"
constant SyncSettingsErrorUnsupportedConfiguration (line 4299) | SyncSettingsErrorUnsupportedConfiguration = "unsupported_configuration"
constant SyncSettingsErrorOther (line 4300) | SyncSettingsErrorOther = "other"
type Tag (line 4325) | type Tag struct
method UnmarshalJSON (line 4338) | func (u *Tag) UnmarshalJSON(body []byte) error {
constant TagUserGeneratedTag (line 4333) | TagUserGeneratedTag = "user_generated_tag"
constant TagOther (line 4334) | TagOther = "other"
type ThumbnailArg (line 4359) | type ThumbnailArg struct
function NewThumbnailArg (line 4373) | func NewThumbnailArg(Path string) *ThumbnailArg {
type ThumbnailError (line 4383) | type ThumbnailError struct
method UnmarshalJSON (line 4398) | func (u *ThumbnailError) UnmarshalJSON(body []byte) error {
constant ThumbnailErrorPath (line 4391) | ThumbnailErrorPath = "path"
constant ThumbnailErrorUnsupportedExtension (line 4392) | ThumbnailErrorUnsupportedExtension = "unsupported_extension"
constant ThumbnailErrorUnsupportedImage (line 4393) | ThumbnailErrorUnsupportedImage = "unsupported_image"
constant ThumbnailErrorConversionError (line 4394) | ThumbnailErrorConversionError = "conversion_error"
type ThumbnailFormat (line 4419) | type ThumbnailFormat struct
constant ThumbnailFormatJpeg (line 4425) | ThumbnailFormatJpeg = "jpeg"
constant ThumbnailFormatPng (line 4426) | ThumbnailFormatPng = "png"
type ThumbnailMode (line 4430) | type ThumbnailMode struct
constant ThumbnailModeStrict (line 4436) | ThumbnailModeStrict = "strict"
constant ThumbnailModeBestfit (line 4437) | ThumbnailModeBestfit = "bestfit"
constant ThumbnailModeFitoneBestfit (line 4438) | ThumbnailModeFitoneBestfit = "fitone_bestfit"
type ThumbnailSize (line 4442) | type ThumbnailSize struct
constant ThumbnailSizeW32h32 (line 4448) | ThumbnailSizeW32h32 = "w32h32"
constant ThumbnailSizeW64h64 (line 4449) | ThumbnailSizeW64h64 = "w64h64"
constant ThumbnailSizeW128h128 (line 4450) | ThumbnailSizeW128h128 = "w128h128"
constant ThumbnailSizeW256h256 (line 4451) | ThumbnailSizeW256h256 = "w256h256"
constant ThumbnailSizeW480h320 (line 4452) | ThumbnailSizeW480h320 = "w480h320"
constant ThumbnailSizeW640h480 (line 4453) | ThumbnailSizeW640h480 = "w640h480"
constant ThumbnailSizeW960h640 (line 4454) | ThumbnailSizeW960h640 = "w960h640"
constant ThumbnailSizeW1024h768 (line 4455) | ThumbnailSizeW1024h768 = "w1024h768"
constant ThumbnailSizeW2048h1536 (line 4456) | ThumbnailSizeW2048h1536 = "w2048h1536"
type ThumbnailV2Arg (line 4460) | type ThumbnailV2Arg struct
function NewThumbnailV2Arg (line 4476) | func NewThumbnailV2Arg(Resource *PathOrLink) *ThumbnailV2Arg {
type ThumbnailV2Error (line 4486) | type ThumbnailV2Error struct
method UnmarshalJSON (line 4504) | func (u *ThumbnailV2Error) UnmarshalJSON(body []byte) error {
constant ThumbnailV2ErrorPath (line 4494) | ThumbnailV2ErrorPath = "path"
constant ThumbnailV2ErrorUnsupportedExtension (line 4495) | ThumbnailV2ErrorUnsupportedExtension = "unsupported_extension"
constant ThumbnailV2ErrorUnsupportedImage (line 4496) | ThumbnailV2ErrorUnsupportedImage = "unsupported_image"
constant ThumbnailV2ErrorConversionError (line 4497) | ThumbnailV2ErrorConversionError = "conversion_error"
constant ThumbnailV2ErrorAccessDenied (line 4498) | ThumbnailV2ErrorAccessDenied = "access_denied"
constant ThumbnailV2ErrorNotFound (line 4499) | ThumbnailV2ErrorNotFound = "not_found"
constant ThumbnailV2ErrorOther (line 4500) | ThumbnailV2ErrorOther = "other"
type UnlockFileArg (line 4525) | type UnlockFileArg struct
function NewUnlockFileArg (line 4531) | func NewUnlockFileArg(Path string) *UnlockFileArg {
type UnlockFileBatchArg (line 4538) | type UnlockFileBatchArg struct
function NewUnlockFileBatchArg (line 4546) | func NewUnlockFileBatchArg(Entries []*UnlockFileArg) *UnlockFileBatchArg {
type UploadArg (line 4553) | type UploadArg struct
function NewUploadArg (line 4563) | func NewUploadArg(Path string) *UploadArg {
type UploadError (line 4574) | type UploadError struct
method UnmarshalJSON (line 4593) | func (u *UploadError) UnmarshalJSON(body []byte) error {
constant UploadErrorPath (line 4585) | UploadErrorPath = "path"
constant UploadErrorPropertiesError (line 4586) | UploadErrorPropertiesError = "properties_error"
constant UploadErrorPayloadTooLarge (line 4587) | UploadErrorPayloadTooLarge = "payload_too_large"
constant UploadErrorContentHashMismatch (line 4588) | UploadErrorContentHashMismatch = "content_hash_mismatch"
constant UploadErrorOther (line 4589) | UploadErrorOther = "other"
type UploadSessionAppendArg (line 4620) | type UploadSessionAppendArg struct
function NewUploadSessionAppendArg (line 4635) | func NewUploadSessionAppendArg(Cursor *UploadSessionCursor) *UploadSessi...
type UploadSessionLookupError (line 4643) | type UploadSessionLookupError struct
method UnmarshalJSON (line 4666) | func (u *UploadSessionLookupError) UnmarshalJSON(body []byte) error {
constant UploadSessionLookupErrorNotFound (line 4654) | UploadSessionLookupErrorNotFound = "not_found"
constant UploadSessionLookupErrorIncorrectOffset (line 4655) | UploadSessionLookupErrorIncorrectOffset = "incorrect_of...
constant UploadSessionLookupErrorClosed (line 4656) | UploadSessionLookupErrorClosed = "closed"
constant UploadSessionLookupErrorNotClosed (line 4657) | UploadSessionLookupErrorNotClosed = "not_closed"
constant UploadSessionLookupErrorTooLarge (line 4658) | UploadSessionLookupErrorTooLarge = "too_large"
constant UploadSessionLookupErrorConcurrentSessionInvalidOffset (line 4659) | UploadSessionLookupErrorConcurrentSessionInvalidOffset = "concurrent_s...
constant UploadSessionLookupErrorConcurrentSessionInvalidDataSize (line 4660) | UploadSessionLookupErrorConcurrentSessionInvalidDataSize = "concurrent_s...
constant UploadSessionLookupErrorPayloadTooLarge (line 4661) | UploadSessionLookupErrorPayloadTooLarge = "payload_too_...
constant UploadSessionLookupErrorOther (line 4662) | UploadSessionLookupErrorOther = "other"
type UploadSessionAppendError (line 4687) | type UploadSessionAppendError struct
method UnmarshalJSON (line 4711) | func (u *UploadSessionAppendError) UnmarshalJSON(body []byte) error {
constant UploadSessionAppendErrorNotFound (line 4698) | UploadSessionAppendErrorNotFound = "not_found"
constant UploadSessionAppendErrorIncorrectOffset (line 4699) | UploadSessionAppendErrorIncorrectOffset = "incorrect_of...
constant UploadSessionAppendErrorClosed (line 4700) | UploadSessionAppendErrorClosed = "closed"
constant UploadSessionAppendErrorNotClosed (line 4701) | UploadSessionAppendErrorNotClosed = "not_closed"
constant UploadSessionAppendErrorTooLarge (line 4702) | UploadSessionAppendErrorTooLarge = "too_large"
constant UploadSessionAppendErrorConcurrentSessionInvalidOffset (line 4703) | UploadSessionAppendErrorConcurrentSessionInvalidOffset = "concurrent_s...
constant UploadSessionAppendErrorConcurrentSessionInvalidDataSize (line 4704) | UploadSessionAppendErrorConcurrentSessionInvalidDataSize = "concurrent_s...
constant UploadSessionAppendErrorPayloadTooLarge (line 4705) | UploadSessionAppendErrorPayloadTooLarge = "payload_too_...
constant UploadSessionAppendErrorOther (line 4706) | UploadSessionAppendErrorOther = "other"
constant UploadSessionAppendErrorContentHashMismatch (line 4707) | UploadSessionAppendErrorContentHashMismatch = "content_hash...
type UploadSessionCursor (line 4732) | type UploadSessionCursor struct
function NewUploadSessionCursor (line 4742) | func NewUploadSessionCursor(SessionId string, Offset uint64) *UploadSess...
type UploadSessionFinishArg (line 4750) | type UploadSessionFinishArg struct
function NewUploadSessionFinishArg (line 4763) | func NewUploadSessionFinishArg(Cursor *UploadSessionCursor, Commit *Comm...
type UploadSessionFinishBatchArg (line 4771) | type UploadSessionFinishBatchArg struct
function NewUploadSessionFinishBatchArg (line 4777) | func NewUploadSessionFinishBatchArg(Entries []*UploadSessionFinishArg) *...
type UploadSessionFinishBatchJobStatus (line 4784) | type UploadSessionFinishBatchJobStatus struct
method UnmarshalJSON (line 4797) | func (u *UploadSessionFinishBatchJobStatus) UnmarshalJSON(body []byte)...
constant UploadSessionFinishBatchJobStatusInProgress (line 4792) | UploadSessionFinishBatchJobStatusInProgress = "in_progress"
constant UploadSessionFinishBatchJobStatusComplete (line 4793) | UploadSessionFinishBatchJobStatusComplete = "complete"
type UploadSessionFinishBatchLaunch (line 4820) | type UploadSessionFinishBatchLaunch struct
method UnmarshalJSON (line 4838) | func (u *UploadSessionFinishBatchLaunch) UnmarshalJSON(body []byte) er...
constant UploadSessionFinishBatchLaunchAsyncJobId (line 4832) | UploadSessionFinishBatchLaunchAsyncJobId = "async_job_id"
constant UploadSessionFinishBatchLaunchComplete (line 4833) | UploadSessionFinishBatchLaunchComplete = "complete"
constant UploadSessionFinishBatchLaunchOther (line 4834) | UploadSessionFinishBatchLaunchOther = "other"
type UploadSessionFinishBatchResult (line 4866) | type UploadSessionFinishBatchResult struct
function NewUploadSessionFinishBatchResult (line 4873) | func NewUploadSessionFinishBatchResult(Entries []*UploadSessionFinishBat...
type UploadSessionFinishBatchResultEntry (line 4880) | type UploadSessionFinishBatchResultEntry struct
method UnmarshalJSON (line 4895) | func (u *UploadSessionFinishBatchResultEntry) UnmarshalJSON(body []byt...
constant UploadSessionFinishBatchResultEntrySuccess (line 4890) | UploadSessionFinishBatchResultEntrySuccess = "success"
constant UploadSessionFinishBatchResultEntryFailure (line 4891) | UploadSessionFinishBatchResultEntryFailure = "failure"
type UploadSessionFinishError (line 4921) | type UploadSessionFinishError struct
method UnmarshalJSON (line 4951) | func (u *UploadSessionFinishError) UnmarshalJSON(body []byte) error {
constant UploadSessionFinishErrorLookupFailed (line 4937) | UploadSessionFinishErrorLookupFailed = "lookup_failed"
constant UploadSessionFinishErrorPath (line 4938) | UploadSessionFinishErrorPath = "path"
constant UploadSessionFinishErrorPropertiesError (line 4939) | UploadSessionFinishErrorPropertiesError = "properties_er...
constant UploadSessionFinishErrorTooManySharedFolderTargets (line 4940) | UploadSessionFinishErrorTooManySharedFolderTargets = "too_many_shar...
constant UploadSessionFinishErrorTooManyWriteOperations (line 4941) | UploadSessionFinishErrorTooManyWriteOperations = "too_many_writ...
constant UploadSessionFinishErrorConcurrentSessionDataNotAllowed (line 4942) | UploadSessionFinishErrorConcurrentSessionDataNotAllowed = "concurrent_se...
constant UploadSessionFinishErrorConcurrentSessionNotClosed (line 4943) | UploadSessionFinishErrorConcurrentSessionNotClosed = "concurrent_se...
constant UploadSessionFinishErrorConcurrentSessionMissingData (line 4944) | UploadSessionFinishErrorConcurrentSessionMissingData = "concurrent_se...
constant UploadSessionFinishErrorPayloadTooLarge (line 4945) | UploadSessionFinishErrorPayloadTooLarge = "payload_too_l...
constant UploadSessionFinishErrorContentHashMismatch (line 4946) | UploadSessionFinishErrorContentHashMismatch = "content_hash_...
constant UploadSessionFinishErrorOther (line 4947) | UploadSessionFinishErrorOther = "other"
type UploadSessionOffsetError (line 4986) | type UploadSessionOffsetError struct
function NewUploadSessionOffsetError (line 4992) | func NewUploadSessionOffsetError(CorrectOffset uint64) *UploadSessionOff...
type UploadSessionStartArg (line 4999) | type UploadSessionStartArg struct
function NewUploadSessionStartArg (line 5015) | func NewUploadSessionStartArg() *UploadSessionStartArg {
type UploadSessionStartBatchArg (line 5022) | type UploadSessionStartBatchArg struct
function NewUploadSessionStartBatchArg (line 5031) | func NewUploadSessionStartBatchArg(NumSessions uint64) *UploadSessionSta...
type UploadSessionStartBatchResult (line 5038) | type UploadSessionStartBatchResult struct
function NewUploadSessionStartBatchResult (line 5045) | func NewUploadSessionStartBatchResult(SessionIds []string) *UploadSessio...
type UploadSessionStartError (line 5052) | type UploadSessionStartError struct
constant UploadSessionStartErrorConcurrentSessionDataNotAllowed (line 5058) | UploadSessionStartErrorConcurrentSessionDataNotAllowed = "concurrent_se...
constant UploadSessionStartErrorConcurrentSessionCloseNotAllowed (line 5059) | UploadSessionStartErrorConcurrentSessionCloseNotAllowed = "concurrent_se...
constant UploadSessionStartErrorPayloadTooLarge (line 5060) | UploadSessionStartErrorPayloadTooLarge = "payload_too_l...
constant UploadSessionStartErrorContentHashMismatch (line 5061) | UploadSessionStartErrorContentHashMismatch = "content_hash_...
constant UploadSessionStartErrorOther (line 5062) | UploadSessionStartErrorOther = "other"
type UploadSessionStartResult (line 5066) | type UploadSessionStartResult struct
function NewUploadSessionStartResult (line 5073) | func NewUploadSessionStartResult(SessionId string) *UploadSessionStartRe...
type UploadSessionType (line 5080) | type UploadSessionType struct
constant UploadSessionTypeSequential (line 5086) | UploadSessionTypeSequential = "sequential"
constant UploadSessionTypeConcurrent (line 5087) | UploadSessionTypeConcurrent = "concurrent"
constant UploadSessionTypeOther (line 5088) | UploadSessionTypeOther = "other"
type UploadWriteFailed (line 5092) | type UploadWriteFailed struct
function NewUploadWriteFailed (line 5102) | func NewUploadWriteFailed(Reason *WriteError, UploadSessionId string) *U...
type UserGeneratedTag (line 5110) | type UserGeneratedTag struct
function NewUserGeneratedTag (line 5116) | func NewUserGeneratedTag(TagText string) *UserGeneratedTag {
type VideoMetadata (line 5123) | type VideoMetadata struct
function NewVideoMetadata (line 5130) | func NewVideoMetadata() *VideoMetadata {
type WriteConflictError (line 5136) | type WriteConflictError struct
constant WriteConflictErrorFile (line 5142) | WriteConflictErrorFile = "file"
constant WriteConflictErrorFolder (line 5143) | WriteConflictErrorFolder = "folder"
constant WriteConflictErrorFileAncestor (line 5144) | WriteConflictErrorFileAncestor = "file_ancestor"
constant WriteConflictErrorOther (line 5145) | WriteConflictErrorOther = "other"
type WriteError (line 5149) | type WriteError struct
method UnmarshalJSON (line 5175) | func (u *WriteError) UnmarshalJSON(body []byte) error {
constant WriteErrorMalformedPath (line 5163) | WriteErrorMalformedPath = "malformed_path"
constant WriteErrorConflict (line 5164) | WriteErrorConflict = "conflict"
constant WriteErrorNoWritePermission (line 5165) | WriteErrorNoWritePermission = "no_write_permission"
constant WriteErrorInsufficientSpace (line 5166) | WriteErrorInsufficientSpace = "insufficient_space"
constant WriteErrorDisallowedName (line 5167) | WriteErrorDisallowedName = "disallowed_name"
constant WriteErrorTeamFolder (line 5168) | WriteErrorTeamFolder = "team_folder"
constant WriteErrorOperationSuppressed (line 5169) | WriteErrorOperationSuppressed = "operation_suppressed"
constant WriteErrorTooManyWriteOperations (line 5170) | WriteErrorTooManyWriteOperations = "too_many_write_operations"
constant WriteErrorOther (line 5171) | WriteErrorOther = "other"
type WriteMode (line 5213) | type WriteMode struct
method UnmarshalJSON (line 5235) | func (u *WriteMode) UnmarshalJSON(body []byte) error {
constant WriteModeAdd (line 5229) | WriteModeAdd = "add"
constant WriteModeOverwrite (line 5230) | WriteModeOverwrite = "overwrite"
constant WriteModeUpdate (line 5231) | WriteModeUpdate = "update"
FILE: v6/dropbox/openid/client.go
type Client (line 32) | type Client interface
type apiImpl (line 39) | type apiImpl
method Userinfo (line 47) | func (dbx *apiImpl) Userinfo(arg *UserInfoArgs) (res *UserInfoResult, ...
type UserinfoAPIError (line 42) | type UserinfoAPIError struct
function New (line 80) | func New(c dropbox.Config) Client {
FILE: v6/dropbox/openid/types.go
type AuthError (line 31) | type AuthError struct
constant AuthErrorInvalidToken (line 37) | AuthErrorInvalidToken = "invalid_token"
constant AuthErrorNoOpenidAuth (line 38) | AuthErrorNoOpenidAuth = "no_openid_auth"
constant AuthErrorOther (line 39) | AuthErrorOther = "other"
type UserInfoArgs (line 44) | type UserInfoArgs struct
function NewUserInfoArgs (line 48) | func NewUserInfoArgs() *UserInfoArgs {
type UserInfoError (line 54) | type UserInfoError struct
function NewUserInfoError (line 62) | func NewUserInfoError() *UserInfoError {
type UserInfoResult (line 69) | type UserInfoResult struct
function NewUserInfoResult (line 86) | func NewUserInfoResult() *UserInfoResult {
type err_union (line 94) | type err_union struct
method UnmarshalJSON (line 107) | func (u *err_union) UnmarshalJSON(body []byte) error {
constant ErrUnionAuthError (line 102) | ErrUnionAuthError = "auth_error"
constant ErrUnionOther (line 103) | ErrUnionOther = "other"
FILE: v6/dropbox/paper/client.go
type Client (line 33) | type Client interface
type apiImpl (line 231) | type apiImpl
method DocsArchive (line 239) | func (dbx *apiImpl) DocsArchive(arg *RefPaperDoc) (err error) {
method DocsCreate (line 275) | func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Rea...
method DocsDownload (line 315) | func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocEx...
method DocsFolderUsersList (line 355) | func (dbx *apiImpl) DocsFolderUsersList(arg *ListUsersOnFolderArgs) (r...
method DocsFolderUsersListContinue (line 395) | func (dbx *apiImpl) DocsFolderUsersListContinue(arg *ListUsersOnFolder...
method DocsGetFolderInfo (line 435) | func (dbx *apiImpl) DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersC...
method DocsList (line 475) | func (dbx *apiImpl) DocsList(arg *ListPaperDocsArgs) (res *ListPaperDo...
method DocsListContinue (line 515) | func (dbx *apiImpl) DocsListContinue(arg *ListPaperDocsContinueArgs) (...
method DocsPermanentlyDelete (line 555) | func (dbx *apiImpl) DocsPermanentlyDelete(arg *RefPaperDoc) (err error) {
method DocsSharingPolicyGet (line 591) | func (dbx *apiImpl) DocsSharingPolicyGet(arg *RefPaperDoc) (res *Shari...
method DocsSharingPolicySet (line 631) | func (dbx *apiImpl) DocsSharingPolicySet(arg *PaperDocSharingPolicy) (...
method DocsUpdate (line 667) | func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Rea...
method DocsUsersAdd (line 707) | func (dbx *apiImpl) DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPape...
method DocsUsersList (line 747) | func (dbx *apiImpl) DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *...
method DocsUsersListContinue (line 787) | func (dbx *apiImpl) DocsUsersListContinue(arg *ListUsersOnPaperDocCont...
method DocsUsersRemove (line 827) | func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err erro...
method FoldersCreate (line 863) | func (dbx *apiImpl) FoldersCreate(arg *PaperFolderCreateArg) (res *Pap...
type DocsArchiveAPIError (line 234) | type DocsArchiveAPIError struct
type DocsCreateAPIError (line 270) | type DocsCreateAPIError struct
type DocsDownloadAPIError (line 310) | type DocsDownloadAPIError struct
type DocsFolderUsersListAPIError (line 350) | type DocsFolderUsersListAPIError struct
type DocsFolderUsersListContinueAPIError (line 390) | type DocsFolderUsersListContinueAPIError struct
type DocsGetFolderInfoAPIError (line 430) | type DocsGetFolderInfoAPIError struct
type DocsListAPIError (line 470) | type DocsListAPIError struct
type DocsListContinueAPIError (line 510) | type DocsListContinueAPIError struct
type DocsPermanentlyDeleteAPIError (line 550) | type DocsPermanentlyDeleteAPIError struct
type DocsSharingPolicyGetAPIError (line 586) | type DocsSharingPolicyGetAPIError struct
type DocsSharingPolicySetAPIError (line 626) | type DocsSharingPolicySetAPIError struct
type DocsUpdateAPIError (line 662) | type DocsUpdateAPIError struct
type DocsUsersAddAPIError (line 702) | type DocsUsersAddAPIError struct
type DocsUsersListAPIError (line 742) | type DocsUsersListAPIError struct
type DocsUsersListContinueAPIError (line 782) | type DocsUsersListContinueAPIError struct
type DocsUsersRemoveAPIError (line 822) | type DocsUsersRemoveAPIError struct
type FoldersCreateAPIError (line 858) | type FoldersCreateAPIError struct
function New (line 898) | func New(c dropbox.Config) Client {
FILE: v6/dropbox/paper/types.go
type AddMember (line 39) | type AddMember struct
function NewAddMember (line 48) | func NewAddMember(Member *sharing.MemberSelector) *AddMember {
type RefPaperDoc (line 56) | type RefPaperDoc struct
function NewRefPaperDoc (line 62) | func NewRefPaperDoc(DocId string) *RefPaperDoc {
type AddPaperDocUser (line 69) | type AddPaperDocUser struct
function NewAddPaperDocUser (line 83) | func NewAddPaperDocUser(DocId string, Members []*AddMember) *AddPaperDoc...
type AddPaperDocUserMemberResult (line 92) | type AddPaperDocUserMemberResult struct
function NewAddPaperDocUserMemberResult (line 100) | func NewAddPaperDocUserMemberResult(Member *sharing.MemberSelector, Resu...
type AddPaperDocUserResult (line 108) | type AddPaperDocUserResult struct
constant AddPaperDocUserResultSuccess (line 114) | AddPaperDocUserResultSuccess = "success"
constant AddPaperDocUserResultUnknownError (line 115) | AddPaperDocUserResultUnknownError = "unknown_error"
constant AddPaperDocUserResultSharingOutsideTeamDisabled (line 116) | AddPaperDocUserResultSharingOutsideTeamDisabled = "sharing_outside_team_...
constant AddPaperDocUserResultDailyLimitReached (line 117) | AddPaperDocUserResultDailyLimitReached = "daily_limit_reached"
constant AddPaperDocUserResultUserIsOwner (line 118) | AddPaperDocUserResultUserIsOwner = "user_is_owner"
constant AddPaperDocUserResultFailedUserDataRetrieval (line 119) | AddPaperDocUserResultFailedUserDataRetrieval = "failed_user_data_retr...
constant AddPaperDocUserResultPermissionAlreadyGranted (line 120) | AddPaperDocUserResultPermissionAlreadyGranted = "permission_already_gr...
constant AddPaperDocUserResultOther (line 121) | AddPaperDocUserResultOther = "other"
type Cursor (line 125) | type Cursor struct
function NewCursor (line 145) | func NewCursor(Value string) *Cursor {
type PaperApiBaseError (line 152) | type PaperApiBaseError struct
constant PaperApiBaseErrorInsufficientPermissions (line 158) | PaperApiBaseErrorInsufficientPermissions = "insufficient_permissions"
constant PaperApiBaseErrorOther (line 159) | PaperApiBaseErrorOther = "other"
type DocLookupError (line 163) | type DocLookupError struct
constant DocLookupErrorInsufficientPermissions (line 169) | DocLookupErrorInsufficientPermissions = "insufficient_permissions"
constant DocLookupErrorOther (line 170) | DocLookupErrorOther = "other"
constant DocLookupErrorDocNotFound (line 171) | DocLookupErrorDocNotFound = "doc_not_found"
type DocSubscriptionLevel (line 175) | type DocSubscriptionLevel struct
constant DocSubscriptionLevelDefault (line 181) | DocSubscriptionLevelDefault = "default"
constant DocSubscriptionLevelIgnore (line 182) | DocSubscriptionLevelIgnore = "ignore"
constant DocSubscriptionLevelEvery (line 183) | DocSubscriptionLevelEvery = "every"
constant DocSubscriptionLevelNoEmail (line 184) | DocSubscriptionLevelNoEmail = "no_email"
type ExportFormat (line 188) | type ExportFormat struct
constant ExportFormatHtml (line 194) | ExportFormatHtml = "html"
constant ExportFormatMarkdown (line 195) | ExportFormatMarkdown = "markdown"
constant ExportFormatOther (line 196) | ExportFormatOther = "other"
type Folder (line 200) | type Folder struct
function NewFolder (line 208) | func NewFolder(Id string, Name string) *Folder {
type FolderSharingPolicyType (line 217) | type FolderSharingPolicyType struct
constant FolderSharingPolicyTypeTeam (line 223) | FolderSharingPolicyTypeTeam = "team"
constant FolderSharingPolicyTypeInviteOnly (line 224) | FolderSharingPolicyTypeInviteOnly = "invite_only"
type FolderSubscriptionLevel (line 228) | type FolderSubscriptionLevel struct
constant FolderSubscriptionLevelNone (line 234) | FolderSubscriptionLevelNone = "none"
constant FolderSubscriptionLevelActivityOnly (line 235) | FolderSubscriptionLevelActivityOnly = "activity_only"
constant FolderSubscriptionLevelDailyEmails (line 236) | FolderSubscriptionLevelDailyEmails = "daily_emails"
constant FolderSubscriptionLevelWeeklyEmails (line 237) | FolderSubscriptionLevelWeeklyEmails = "weekly_emails"
type FoldersContainingPaperDoc (line 242) | type FoldersContainingPaperDoc struct
function NewFoldersContainingPaperDoc (line 252) | func NewFoldersContainingPaperDoc() *FoldersContainingPaperDoc {
type ImportFormat (line 258) | type ImportFormat struct
constant ImportFormatHtml (line 264) | ImportFormatHtml = "html"
constant ImportFormatMarkdown (line 265) | ImportFormatMarkdown = "markdown"
constant ImportFormatPlainText (line 266) | ImportFormatPlainText = "plain_text"
constant ImportFormatOther (line 267) | ImportFormatOther = "other"
type InviteeInfoWithPermissionLevel (line 271) | type InviteeInfoWithPermissionLevel struct
function NewInviteeInfoWithPermissionLevel (line 279) | func NewInviteeInfoWithPermissionLevel(Invitee *sharing.InviteeInfo, Per...
type ListDocsCursorError (line 287) | type ListDocsCursorError struct
method UnmarshalJSON (line 300) | func (u *ListDocsCursorError) UnmarshalJSON(body []byte) error {
constant ListDocsCursorErrorCursorError (line 295) | ListDocsCursorErrorCursorError = "cursor_error"
constant ListDocsCursorErrorOther (line 296) | ListDocsCursorErrorOther = "other"
type ListPaperDocsArgs (line 321) | type ListPaperDocsArgs struct
function NewListPaperDocsArgs (line 335) | func NewListPaperDocsArgs() *ListPaperDocsArgs {
type ListPaperDocsContinueArgs (line 345) | type ListPaperDocsContinueArgs struct
function NewListPaperDocsContinueArgs (line 352) | func NewListPaperDocsContinueArgs(Cursor string) *ListPaperDocsContinueA...
type ListPaperDocsFilterBy (line 359) | type ListPaperDocsFilterBy struct
constant ListPaperDocsFilterByDocsAccessed (line 365) | ListPaperDocsFilterByDocsAccessed = "docs_accessed"
constant ListPaperDocsFilterByDocsCreated (line 366) | ListPaperDocsFilterByDocsCreated = "docs_created"
constant ListPaperDocsFilterByOther (line 367) | ListPaperDocsFilterByOther = "other"
type ListPaperDocsResponse (line 371) | type ListPaperDocsResponse struct
function NewListPaperDocsResponse (line 388) | func NewListPaperDocsResponse(DocIds []string, Cursor *Cursor, HasMore b...
type ListPaperDocsSortBy (line 397) | type ListPaperDocsSortBy struct
constant ListPaperDocsSortByAccessed (line 403) | ListPaperDocsSortByAccessed = "accessed"
constant ListPaperDocsSortByModified (line 404) | ListPaperDocsSortByModified = "modified"
constant ListPaperDocsSortByCreated (line 405) | ListPaperDocsSortByCreated = "created"
constant ListPaperDocsSortByOther (line 406) | ListPaperDocsSortByOther = "other"
type ListPaperDocsSortOrder (line 410) | type ListPaperDocsSortOrder struct
constant ListPaperDocsSortOrderAscending (line 416) | ListPaperDocsSortOrderAscending = "ascending"
constant ListPaperDocsSortOrderDescending (line 417) | ListPaperDocsSortOrderDescending = "descending"
constant ListPaperDocsSortOrderOther (line 418) | ListPaperDocsSortOrderOther = "other"
type ListUsersCursorError (line 422) | type ListUsersCursorError struct
method UnmarshalJSON (line 437) | func (u *ListUsersCursorError) UnmarshalJSON(body []byte) error {
constant ListUsersCursorErrorInsufficientPermissions (line 430) | ListUsersCursorErrorInsufficientPermissions = "insufficient_permissions"
constant ListUsersCursorErrorOther (line 431) | ListUsersCursorErrorOther = "other"
constant ListUsersCursorErrorDocNotFound (line 432) | ListUsersCursorErrorDocNotFound = "doc_not_found"
constant ListUsersCursorErrorCursorError (line 433) | ListUsersCursorErrorCursorError = "cursor_error"
type ListUsersOnFolderArgs (line 458) | type ListUsersOnFolderArgs struct
function NewListUsersOnFolderArgs (line 467) | func NewListUsersOnFolderArgs(DocId string) *ListUsersOnFolderArgs {
type ListUsersOnFolderContinueArgs (line 475) | type ListUsersOnFolderContinueArgs struct
function NewListUsersOnFolderContinueArgs (line 483) | func NewListUsersOnFolderContinueArgs(DocId string, Cursor string) *List...
type ListUsersOnFolderResponse (line 491) | type ListUsersOnFolderResponse struct
function NewListUsersOnFolderResponse (line 508) | func NewListUsersOnFolderResponse(Invitees []*sharing.InviteeInfo, Users...
type ListUsersOnPaperDocArgs (line 518) | type ListUsersOnPaperDocArgs struct
function NewListUsersOnPaperDocArgs (line 530) | func NewListUsersOnPaperDocArgs(DocId string) *ListUsersOnPaperDocArgs {
type ListUsersOnPaperDocContinueArgs (line 539) | type ListUsersOnPaperDocContinueArgs struct
function NewListUsersOnPaperDocContinueArgs (line 547) | func NewListUsersOnPaperDocContinueArgs(DocId string, Cursor string) *Li...
type ListUsersOnPaperDocResponse (line 555) | type ListUsersOnPaperDocResponse struct
function NewListUsersOnPaperDocResponse (line 577) | func NewListUsersOnPaperDocResponse(Invitees []*InviteeInfoWithPermissio...
type PaperApiCursorError (line 588) | type PaperApiCursorError struct
constant PaperApiCursorErrorExpiredCursor (line 594) | PaperApiCursorErrorExpiredCursor = "expired_cursor"
constant PaperApiCursorErrorInvalidCursor (line 595) | PaperApiCursorErrorInvalidCursor = "invalid_cursor"
constant PaperApiCursorErrorWrongUserInCursor (line 596) | PaperApiCursorErrorWrongUserInCursor = "wrong_user_in_cursor"
constant PaperApiCursorErrorReset (line 597) | PaperApiCursorErrorReset = "reset"
constant PaperApiCursorErrorOther (line 598) | PaperApiCursorErrorOther = "other"
type PaperDocCreateArgs (line 602) | type PaperDocCreateArgs struct
function NewPaperDocCreateArgs (line 612) | func NewPaperDocCreateArgs(ImportFormat *ImportFormat) *PaperDocCreateAr...
type PaperDocCreateError (line 619) | type PaperDocCreateError struct
constant PaperDocCreateErrorInsufficientPermissions (line 625) | PaperDocCreateErrorInsufficientPermissions = "insufficient_permissions"
constant PaperDocCreateErrorOther (line 626) | PaperDocCreateErrorOther = "other"
constant PaperDocCreateErrorContentMalformed (line 627) | PaperDocCreateErrorContentMalformed = "content_malformed"
constant PaperDocCreateErrorFolderNotFound (line 628) | PaperDocCreateErrorFolderNotFound = "folder_not_found"
constant PaperDocCreateErrorDocLengthExceeded (line 629) | PaperDocCreateErrorDocLengthExceeded = "doc_length_exceeded"
constant PaperDocCreateErrorImageSizeExceeded (line 630) | PaperDocCreateErrorImageSizeExceeded = "image_size_exceeded"
type PaperDocCreateUpdateResult (line 634) | type PaperDocCreateUpdateResult struct
function NewPaperDocCreateUpdateResult (line 644) | func NewPaperDocCreateUpdateResult(DocId string, Revision int64, Title s...
type PaperDocExport (line 653) | type PaperDocExport struct
function NewPaperDocExport (line 660) | func NewPaperDocExport(DocId string, ExportFormat *ExportFormat) *PaperD...
type PaperDocExportResult (line 668) | type PaperDocExportResult struct
function NewPaperDocExportResult (line 681) | func NewPaperDocExportResult(Owner string, Title string, Revision int64,...
type PaperDocPermissionLevel (line 691) | type PaperDocPermissionLevel struct
constant PaperDocPermissionLevelEdit (line 697) | PaperDocPermissionLevelEdit = "edit"
constant PaperDocPermissionLevelViewAndComment (line 698) | PaperDocPermissionLevelViewAndComment = "view_and_comment"
constant PaperDocPermissionLevelOther (line 699) | PaperDocPermissionLevelOther = "other"
type PaperDocSharingPolicy (line 703) | type PaperDocSharingPolicy struct
function NewPaperDocSharingPolicy (line 710) | func NewPaperDocSharingPolicy(DocId string, SharingPolicy *SharingPolicy...
type PaperDocUpdateArgs (line 718) | type PaperDocUpdateArgs struct
function NewPaperDocUpdateArgs (line 731) | func NewPaperDocUpdateArgs(DocId string, DocUpdatePolicy *PaperDocUpdate...
type PaperDocUpdateError (line 741) | type PaperDocUpdateError struct
constant PaperDocUpdateErrorInsufficientPermissions (line 747) | PaperDocUpdateErrorInsufficientPermissions = "insufficient_permissions"
constant PaperDocUpdateErrorOther (line 748) | PaperDocUpdateErrorOther = "other"
constant PaperDocUpdateErrorDocNotFound (line 749) | PaperDocUpdateErrorDocNotFound = "doc_not_found"
constant PaperDocUpdateErrorContentMalformed (line 750) | PaperDocUpdateErrorContentMalformed = "content_malformed"
constant PaperDocUpdateErrorRevisionMismatch (line 751) | PaperDocUpdateErrorRevisionMismatch = "revision_mismatch"
constant PaperDocUpdateErrorDocLengthExceeded (line 752) | PaperDocUpdateErrorDocLengthExceeded = "doc_length_exceeded"
constant PaperDocUpdateErrorImageSizeExceeded (line 753) | PaperDocUpdateErrorImageSizeExceeded = "image_size_exceeded"
constant PaperDocUpdateErrorDocArchived (line 754) | PaperDocUpdateErrorDocArchived = "doc_archived"
constant PaperDocUpdateErrorDocDeleted (line 755) | PaperDocUpdateErrorDocDeleted = "doc_deleted"
type PaperDocUpdatePolicy (line 759) | type PaperDocUpdatePolicy struct
constant PaperDocUpdatePolicyAppend (line 765) | PaperDocUpdatePolicyAppend = "append"
constant PaperDocUpdatePolicyPrepend (line 766) | PaperDocUpdatePolicyPrepend = "prepend"
constant PaperDocUpdatePolicyOverwriteAll (line 767) | PaperDocUpdatePolicyOverwriteAll = "overwrite_all"
constant PaperDocUpdatePolicyOther (line 768) | PaperDocUpdatePolicyOther = "other"
type PaperFolderCreateArg (line 772) | type PaperFolderCreateArg struct
function NewPaperFolderCreateArg (line 789) | func NewPaperFolderCreateArg(Name string) *PaperFolderCreateArg {
type PaperFolderCreateError (line 796) | type PaperFolderCreateError struct
constant PaperFolderCreateErrorInsufficientPermissions (line 802) | PaperFolderCreateErrorInsufficientPermissions = "insufficient_permissions"
constant PaperFolderCreateErrorOther (line 803) | PaperFolderCreateErrorOther = "other"
constant PaperFolderCreateErrorFolderNotFound (line 804) | PaperFolderCreateErrorFolderNotFound = "folder_not_found"
constant PaperFolderCreateErrorInvalidFolderId (line 805) | PaperFolderCreateErrorInvalidFolderId = "invalid_folder_id"
type PaperFolderCreateResult (line 809) | type PaperFolderCreateResult struct
function NewPaperFolderCreateResult (line 815) | func NewPaperFolderCreateResult(FolderId string) *PaperFolderCreateResult {
type RemovePaperDocUser (line 822) | type RemovePaperDocUser struct
function NewRemovePaperDocUser (line 830) | func NewRemovePaperDocUser(DocId string, Member *sharing.MemberSelector)...
type SharingPolicy (line 838) | type SharingPolicy struct
function NewSharingPolicy (line 847) | func NewSharingPolicy() *SharingPolicy {
type SharingTeamPolicyType (line 853) | type SharingTeamPolicyType struct
constant SharingTeamPolicyTypePeopleWithLinkCanEdit (line 859) | SharingTeamPolicyTypePeopleWithLinkCanEdit = "people_with_link...
constant SharingTeamPolicyTypePeopleWithLinkCanViewAndComment (line 860) | SharingTeamPolicyTypePeopleWithLinkCanViewAndComment = "people_with_link...
constant SharingTeamPolicyTypeInviteOnly (line 861) | SharingTeamPolicyTypeInviteOnly = "invite_only"
type SharingPublicPolicyType (line 865) | type SharingPublicPolicyType struct
constant SharingPublicPolicyTypePeopleWithLinkCanEdit (line 871) | SharingPublicPolicyTypePeopleWithLinkCanEdit = "people_with_li...
constant SharingPublicPolicyTypePeopleWithLinkCanViewAndComment (line 872) | SharingPublicPolicyTypePeopleWithLinkCanViewAndComment = "people_with_li...
constant SharingPublicPolicyTypeInviteOnly (line 873) | SharingPublicPolicyTypeInviteOnly = "invite_only"
constant SharingPublicPolicyTypeDisabled (line 874) | SharingPublicPolicyTypeDisabled = "disabled"
type UserInfoWithPermissionLevel (line 878) | type UserInfoWithPermissionLevel struct
function NewUserInfoWithPermissionLevel (line 886) | func NewUserInfoWithPermissionLevel(User *sharing.UserInfo, PermissionLe...
type UserOnPaperDocFilter (line 894) | type UserOnPaperDocFilter struct
constant UserOnPaperDocFilterVisited (line 900) | UserOnPaperDocFilterVisited = "visited"
constant UserOnPaperDocFilterShared (line 901) | UserOnPaperDocFilterShared = "shared"
constant UserOnPaperDocFilterOther (line 902) | UserOnPaperDocFilterOther = "other"
FILE: v6/dropbox/sdk.go
constant apiVersion (line 39) | apiVersion = 2
constant defaultDomain (line 40) | defaultDomain = ".dropboxapi.com"
constant hostAPI (line 41) | hostAPI = "api"
constant hostContent (line 42) | hostContent = "content"
constant hostNotify (line 43) | hostNotify = "notify"
constant sdkVersion (line 44) | sdkVersion = "6.0.5"
constant specVersion (line 45) | specVersion = "c36ba27"
function Version (line 49) | func Version() (string, string) {
type Tagged (line 54) | type Tagged struct
type APIError (line 59) | type APIError struct
method Error (line 63) | func (e APIError) Error() string {
type SDKInternalError (line 67) | type SDKInternalError struct
method Error (line 72) | func (e SDKInternalError) Error() string {
type Config (line 77) | type Config struct
method doLog (line 117) | func (c *Config) doLog(l LogLevel, format string, v ...interface{}) {
method LogDebug (line 130) | func (c *Config) LogDebug(format string, v ...interface{}) {
method LogInfo (line 135) | func (c *Config) LogInfo(format string, v ...interface{}) {
method WithNamespaceID (line 140) | func (c Config) WithNamespaceID(nsID string) Config {
method WithRoot (line 145) | func (c Config) WithRoot(nsID string) Config {
type LogLevel (line 101) | type LogLevel
method shouldLog (line 113) | func (l LogLevel) shouldLog(v LogLevel) bool {
constant LogOff (line 105) | LogOff LogLevel = iota * (1 << 8)
constant LogDebug (line 108) | LogDebug
constant LogInfo (line 110) | LogInfo
type Context (line 151) | type Context struct
method Execute (line 170) | func (c *Context) Execute(req Request, body io.Reader) ([]byte, io.Rea...
type Request (line 159) | type Request struct
function NewContext (line 266) | func NewContext(c Config) Context {
function OAuthEndpoint (line 308) | func OAuthEndpoint(domain string) oauth2.Endpoint {
function HTTPHeaderSafeJSON (line 324) | func HTTPHeaderSafeJSON(b []byte) string {
FILE: v6/dropbox/sdk_test.go
function generateURL (line 36) | func generateURL(base string, namespace string, route string) string {
function TestInternalError (line 40) | func TestInternalError(t *testing.T) {
function TestRateLimitJSON (line 59) | func TestRateLimitJSON(t *testing.T) {
function TestAuthError (line 88) | func TestAuthError(t *testing.T) {
function TestAccessError (line 114) | func TestAccessError(t *testing.T) {
function TestAppError (line 146) | func TestAppError(t *testing.T) {
function TestHTTPHeaderSafeJSON (line 171) | func TestHTTPHeaderSafeJSON(t *testing.T) {
FILE: v6/dropbox/secondary_emails/types.go
type SecondaryEmail (line 25) | type SecondaryEmail struct
function NewSecondaryEmail (line 34) | func NewSecondaryEmail(Email string, IsVerified bool) *SecondaryEmail {
FILE: v6/dropbox/seen_state/types.go
type PlatformType (line 27) | type PlatformType struct
constant PlatformTypeWeb (line 33) | PlatformTypeWeb = "web"
constant PlatformTypeDesktop (line 34) | PlatformTypeDesktop = "desktop"
constant PlatformTypeMobileIos (line 35) | PlatformTypeMobileIos = "mobile_ios"
constant PlatformTypeMobileAndroid (line 36) | PlatformTypeMobileAndroid = "mobile_android"
constant PlatformTypeApi (line 37) | PlatformTypeApi = "api"
constant PlatformTypeUnknown (line 38) | PlatformTypeUnknown = "unknown"
constant PlatformTypeMobile (line 39) | PlatformTypeMobile = "mobile"
constant PlatformTypeOther (line 40) | PlatformTypeOther = "other"
FILE: v6/dropbox/sharing/client.go
type Client (line 34) | type Client interface
type apiImpl (line 211) | type apiImpl
method AddFileMember (line 219) | func (dbx *apiImpl) AddFileMember(arg *AddFileMemberArgs) (res []*File...
method AddFolderMember (line 257) | func (dbx *apiImpl) AddFolderMember(arg *AddFolderMemberArg) (err erro...
method CheckJobStatus (line 291) | func (dbx *apiImpl) CheckJobStatus(arg *async.PollArg) (res *JobStatus...
method CheckRemoveMemberJobStatus (line 329) | func (dbx *apiImpl) CheckRemoveMemberJobStatus(arg *async.PollArg) (re...
method CheckShareJobStatus (line 367) | func (dbx *apiImpl) CheckShareJobStatus(arg *async.PollArg) (res *Shar...
method CreateSharedLink (line 405) | func (dbx *apiImpl) CreateSharedLink(arg *CreateSharedLinkArg) (res *P...
method CreateSharedLinkWithSettings (line 446) | func (dbx *apiImpl) CreateSharedLinkWithSettings(arg *CreateSharedLink...
method GetFileMetadata (line 492) | func (dbx *apiImpl) GetFileMetadata(arg *GetFileMetadataArg) (res *Sha...
method GetFileMetadataBatch (line 530) | func (dbx *apiImpl) GetFileMetadataBatch(arg *GetFileMetadataBatchArg)...
method GetFolderMetadata (line 568) | func (dbx *apiImpl) GetFolderMetadata(arg *GetMetadataArgs) (res *Shar...
method GetSharedLinkFile (line 606) | func (dbx *apiImpl) GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (...
method GetSharedLinkMetadata (line 652) | func (dbx *apiImpl) GetSharedLinkMetadata(arg *GetSharedLinkMetadataAr...
method GetSharedLinks (line 698) | func (dbx *apiImpl) GetSharedLinks(arg *GetSharedLinksArg) (res *GetSh...
method ListFileMembers (line 739) | func (dbx *apiImpl) ListFileMembers(arg *ListFileMembersArg) (res *Sha...
method ListFileMembersBatch (line 777) | func (dbx *apiImpl) ListFileMembersBatch(arg *ListFileMembersBatchArg)...
method ListFileMembersContinue (line 815) | func (dbx *apiImpl) ListFileMembersContinue(arg *ListFileMembersContin...
method ListFolderMembers (line 853) | func (dbx *apiImpl) ListFolderMembers(arg *ListFolderMembersArgs) (res...
method ListFolderMembersContinue (line 891) | func (dbx *apiImpl) ListFolderMembersContinue(arg *ListFolderMembersCo...
method ListFolders (line 929) | func (dbx *apiImpl) ListFolders(arg *ListFoldersArgs) (res *ListFolder...
method ListFoldersContinue (line 967) | func (dbx *apiImpl) ListFoldersContinue(arg *ListFoldersContinueArg) (...
method ListMountableFolders (line 1005) | func (dbx *apiImpl) ListMountableFolders(arg *ListFoldersArgs) (res *L...
method ListMountableFoldersContinue (line 1043) | func (dbx *apiImpl) ListMountableFoldersContinue(arg *ListFoldersConti...
method ListReceivedFiles (line 1081) | func (dbx *apiImpl) ListReceivedFiles(arg *ListFilesArg) (res *ListFil...
method ListReceivedFilesContinue (line 1119) | func (dbx *apiImpl) ListReceivedFilesContinue(arg *ListFilesContinueAr...
method ListSharedLinks (line 1157) | func (dbx *apiImpl) ListSharedLinks(arg *ListSharedLinksArg) (res *Lis...
method ModifySharedLinkSettings (line 1195) | func (dbx *apiImpl) ModifySharedLinkSettings(arg *ModifySharedLinkSett...
method MountFolder (line 1241) | func (dbx *apiImpl) MountFolder(arg *MountFolderArg) (res *SharedFolde...
method RelinquishFileMembership (line 1279) | func (dbx *apiImpl) RelinquishFileMembership(arg *RelinquishFileMember...
method RelinquishFolderMembership (line 1313) | func (dbx *apiImpl) RelinquishFolderMembership(arg *RelinquishFolderMe...
method RemoveFileMember (line 1351) | func (dbx *apiImpl) RemoveFileMember(arg *RemoveFileMemberArg) (res *F...
method RemoveFileMember2 (line 1392) | func (dbx *apiImpl) RemoveFileMember2(arg *RemoveFileMemberArg) (res *...
method RemoveFolderMember (line 1430) | func (dbx *apiImpl) RemoveFolderMember(arg *RemoveFolderMemberArg) (re...
method RevokeSharedLink (line 1468) | func (dbx *apiImpl) RevokeSharedLink(arg *RevokeSharedLinkArg) (err er...
method SetAccessInheritance (line 1502) | func (dbx *apiImpl) SetAccessInheritance(arg *SetAccessInheritanceArg)...
method ShareFolder (line 1540) | func (dbx *apiImpl) ShareFolder(arg *ShareFolderArg) (res *ShareFolder...
method TransferFolder (line 1578) | func (dbx *apiImpl) TransferFolder(arg *TransferFolderArg) (err error) {
method UnmountFolder (line 1612) | func (dbx *apiImpl) UnmountFolder(arg *UnmountFolderArg) (err error) {
method UnshareFile (line 1646) | func (dbx *apiImpl) UnshareFile(arg *UnshareFileArg) (err error) {
method UnshareFolder (line 1680) | func (dbx *apiImpl) UnshareFolder(arg *UnshareFolderArg) (res *async.L...
method UpdateFileMember (line 1718) | func (dbx *apiImpl) UpdateFileMember(arg *UpdateFileMemberArgs) (res *...
method UpdateFolderMember (line 1756) | func (dbx *apiImpl) UpdateFolderMember(arg *UpdateFolderMemberArg) (re...
method UpdateFolderPolicy (line 1794) | func (dbx *apiImpl) UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (re...
type AddFileMemberAPIError (line 214) | type AddFileMemberAPIError struct
type AddFolderMemberAPIError (line 252) | type AddFolderMemberAPIError struct
type CheckJobStatusAPIError (line 286) | type CheckJobStatusAPIError struct
type CheckRemoveMemberJobStatusAPIError (line 324) | type CheckRemoveMemberJobStatusAPIError struct
type CheckShareJobStatusAPIError (line 362) | type CheckShareJobStatusAPIError struct
type CreateSharedLinkAPIError (line 400) | type CreateSharedLinkAPIError struct
type CreateSharedLinkWithSettingsAPIError (line 441) | type CreateSharedLinkWithSettingsAPIError struct
type GetFileMetadataAPIError (line 487) | type GetFileMetadataAPIError struct
type GetFileMetadataBatchAPIError (line 525) | type GetFileMetadataBatchAPIError struct
type GetFolderMetadataAPIError (line 563) | type GetFolderMetadataAPIError struct
type GetSharedLinkFileAPIError (line 601) | type GetSharedLinkFileAPIError struct
type GetSharedLinkMetadataAPIError (line 647) | type GetSharedLinkMetadataAPIError struct
type GetSharedLinksAPIError (line 693) | type GetSharedLinksAPIError struct
type ListFileMembersAPIError (line 734) | type ListFileMembersAPIError struct
type ListFileMembersBatchAPIError (line 772) | type ListFileMembersBatchAPIError struct
type ListFileMembersContinueAPIError (line 810) | type ListFileMembersContinueAPIError struct
type ListFolderMembersAPIError (line 848) | type ListFolderMembersAPIError struct
type ListFolderMembersContinueAPIError (line 886) | type ListFolderMembersContinueAPIError struct
type ListFoldersAPIError (line 924) | type ListFoldersAPIError struct
type ListFoldersContinueAPIError (line 962) | type ListFoldersContinueAPIError struct
type ListMountableFoldersAPIError (line 1000) | type ListMountableFoldersAPIError struct
type ListMountableFoldersContinueAPIError (line 1038) | type ListMountableFoldersContinueAPIError struct
type ListReceivedFilesAPIError (line 1076) | type ListReceivedFilesAPIError struct
type ListReceivedFilesContinueAPIError (line 1114) | type ListReceivedFilesContinueAPIError struct
type ListSharedLinksAPIError (line 1152) | type ListSharedLinksAPIError struct
type ModifySharedLinkSettingsAPIError (line 1190) | type ModifySharedLinkSettingsAPIError struct
type MountFolderAPIError (line 1236) | type MountFolderAPIError struct
type RelinquishFileMembershipAPIError (line 1274) | type RelinquishFileMembershipAPIError struct
type RelinquishFolderMembershipAPIError (line 1308) | type RelinquishFolderMembershipAPIError struct
type RemoveFileMemberAPIError (line 1346) | type RemoveFileMemberAPIError struct
type RemoveFileMember2APIError (line 1387) | type RemoveFileMember2APIError struct
type RemoveFolderMemberAPIError (line 1425) | type RemoveFolderMemberAPIError struct
type RevokeSharedLinkAPIError (line 1463) | type RevokeSharedLinkAPIError struct
type SetAccessInheritanceAPIError (line 1497) | type SetAccessInheritanceAPIError struct
type ShareFolderAPIError (line 1535) | type ShareFolderAPIError struct
type TransferFolderAPIError (line 1573) | type TransferFolderAPIError struct
type UnmountFolderAPIError (line 1607) | type UnmountFolderAPIError struct
type UnshareFileAPIError (line 1641) | type UnshareFileAPIError struct
type UnshareFolderAPIError (line 1675) | type UnshareFolderAPIError struct
type UpdateFileMemberAPIError (line 1713) | type UpdateFileMemberAPIError struct
type UpdateFolderMemberAPIError (line 1751) | type UpdateFolderMemberAPIError struct
type UpdateFolderPolicyAPIError (line 1789) | type UpdateFolderPolicyAPIError struct
function New (line 1827) | func New(c dropbox.Config) Client {
FILE: v6/dropbox/sharing/types.go
type AccessInheritance (line 38) | type AccessInheritance struct
constant AccessInheritanceInherit (line 44) | AccessInheritanceInherit = "inherit"
constant AccessInheritanceNoInherit (line 45) | AccessInheritanceNoInherit = "no_inherit"
constant AccessInheritanceOther (line 46) | AccessInheritanceOther = "other"
type AccessLevel (line 50) | type AccessLevel struct
constant AccessLevelOwner (line 56) | AccessLevelOwner = "owner"
constant AccessLevelEditor (line 57) | AccessLevelEditor = "editor"
constant AccessLevelViewer (line 58) | AccessLevelViewer = "viewer"
constant AccessLevelViewerNoComment (line 59) | AccessLevelViewerNoComment = "viewer_no_comment"
constant AccessLevelTraverse (line 60) | AccessLevelTraverse = "traverse"
constant AccessLevelOther (line 61) | AccessLevelOther = "other"
type AclUpdatePolicy (line 66) | type AclUpdatePolicy struct
constant AclUpdatePolicyOwner (line 72) | AclUpdatePolicyOwner = "owner"
constant AclUpdatePolicyEditors (line 73) | AclUpdatePolicyEditors = "editors"
constant AclUpdatePolicyOther (line 74) | AclUpdatePolicyOther = "other"
type AddFileMemberArgs (line 78) | type AddFileMemberArgs struct
function NewAddFileMemberArgs (line 99) | func NewAddFileMemberArgs(File string, Members []*MemberSelector) *AddFi...
type AddFileMemberError (line 110) | type AddFileMemberError struct
method UnmarshalJSON (line 128) | func (u *AddFileMemberError) UnmarshalJSON(body []byte) error {
constant AddFileMemberErrorUserError (line 120) | AddFileMemberErrorUserError = "user_error"
constant AddFileMemberErrorAccessError (line 121) | AddFileMemberErrorAccessError = "access_error"
constant AddFileMemberErrorRateLimit (line 122) | AddFileMemberErrorRateLimit = "rate_limit"
constant AddFileMemberErrorInvalidComment (line 123) | AddFileMemberErrorInvalidComment = "invalid_comment"
constant AddFileMemberErrorOther (line 124) | AddFileMemberErrorOther = "other"
type AddFolderMemberArg (line 154) | type AddFolderMemberArg struct
function NewAddFolderMemberArg (line 169) | func NewAddFolderMemberArg(SharedFolderId string, Members []*AddMember) ...
type AddFolderMemberError (line 178) | type AddFolderMemberError struct
method UnmarshalJSON (line 211) | func (u *AddFolderMemberError) UnmarshalJSON(body []byte) error {
constant AddFolderMemberErrorAccessError (line 194) | AddFolderMemberErrorAccessError = "access_error"
constant AddFolderMemberErrorEmailUnverified (line 195) | AddFolderMemberErrorEmailUnverified = "email_unverified"
constant AddFolderMemberErrorBannedMember (line 196) | AddFolderMemberErrorBannedMember = "banned_member"
constant AddFolderMemberErrorBadMember (line 197) | AddFolderMemberErrorBadMember = "bad_member"
constant AddFolderMemberErrorCantShareOutsideTeam (line 198) | AddFolderMemberErrorCantShareOutsideTeam = "cant_share_outside_team"
constant AddFolderMemberErrorTooManyMembers (line 199) | AddFolderMemberErrorTooManyMembers = "too_many_members"
constant AddFolderMemberErrorTooManyPendingInvites (line 200) | AddFolderMemberErrorTooManyPendingInvites = "too_many_pending_invites"
constant AddFolderMemberErrorRateLimit (line 201) | AddFolderMemberErrorRateLimit = "rate_limit"
constant AddFolderMemberErrorTooManyInvitees (line 202) | AddFolderMemberErrorTooManyInvitees = "too_many_invitees"
constant AddFolderMemberErrorInsufficientPlan (line 203) | AddFolderMemberErrorInsufficientPlan = "insufficient_plan"
constant AddFolderMemberErrorTeamFolder (line 204) | AddFolderMemberErrorTeamFolder = "team_folder"
constant AddFolderMemberErrorNoPermission (line 205) | AddFolderMemberErrorNoPermission = "no_permission"
constant AddFolderMemberErrorInvalidSharedFolder (line 206) | AddFolderMemberErrorInvalidSharedFolder = "invalid_shared_folder"
constant AddFolderMemberErrorOther (line 207) | AddFolderMemberErrorOther = "other"
type AddMember (line 250) | type AddMember struct
function NewAddMember (line 259) | func NewAddMember(Member *MemberSelector) *AddMember {
type AddMemberSelectorError (line 267) | type AddMemberSelectorError struct
method UnmarshalJSON (line 291) | func (u *AddMemberSelectorError) UnmarshalJSON(body []byte) error {
constant AddMemberSelectorErrorAutomaticGroup (line 281) | AddMemberSelectorErrorAutomaticGroup = "automatic_group"
constant AddMemberSelectorErrorInvalidDropboxId (line 282) | AddMemberSelectorErrorInvalidDropboxId = "invalid_dropbox_id"
constant AddMemberSelectorErrorInvalidEmail (line 283) | AddMemberSelectorErrorInvalidEmail = "invalid_email"
constant AddMemberSelectorErrorUnverifiedDropboxId (line 284) | AddMemberSelectorErrorUnverifiedDropboxId = "unverified_dropbox_id"
constant AddMemberSelectorErrorGroupDeleted (line 285) | AddMemberSelectorErrorGroupDeleted = "group_deleted"
constant AddMemberSelectorErrorGroupNotOnTeam (line 286) | AddMemberSelectorErrorGroupNotOnTeam = "group_not_on_team"
constant AddMemberSelectorErrorOther (line 287) | AddMemberSelectorErrorOther = "other"
type RequestedVisibility (line 328) | type RequestedVisibility struct
constant RequestedVisibilityPublic (line 334) | RequestedVisibilityPublic = "public"
constant RequestedVisibilityTeamOnly (line 335) | RequestedVisibilityTeamOnly = "team_only"
constant RequestedVisibilityPassword (line 336) | RequestedVisibilityPassword = "password"
type ResolvedVisibility (line 343) | type ResolvedVisibility struct
constant ResolvedVisibilityPublic (line 349) | ResolvedVisibilityPublic = "public"
constant ResolvedVisibilityTeamOnly (line 350) | ResolvedVisibilityTeamOnly = "team_only"
constant ResolvedVisibilityPassword (line 351) | ResolvedVisibilityPassword = "password"
constant ResolvedVisibilityTeamAndPassword (line 352) | ResolvedVisibilityTeamAndPassword = "team_and_password"
constant ResolvedVisibilitySharedFolderOnly (line 353) | ResolvedVisibilitySharedFolderOnly = "shared_folder_only"
constant ResolvedVisibilityNoOne (line 354) | ResolvedVisibilityNoOne = "no_one"
constant ResolvedVisibilityOnlyYou (line 355) | ResolvedVisibilityOnlyYou = "only_you"
constant ResolvedVisibilityOther (line 356) | ResolvedVisibilityOther = "other"
type AlphaResolvedVisibility (line 360) | type AlphaResolvedVisibility struct
constant AlphaResolvedVisibilityPublic (line 366) | AlphaResolvedVisibilityPublic = "public"
constant AlphaResolvedVisibilityTeamOnly (line 367) | AlphaResolvedVisibilityTeamOnly = "team_only"
constant AlphaResolvedVisibilityPassword (line 368) | AlphaResolvedVisibilityPassword = "password"
constant AlphaResolvedVisibilityTeamAndPassword (line 369) | AlphaResolvedVisibilityTeamAndPassword = "team_and_password"
constant AlphaResolvedVisibilitySharedFolderOnly (line 370) | AlphaResolvedVisibilitySharedFolderOnly = "shared_folder_only"
constant AlphaResolvedVisibilityNoOne (line 371) | AlphaResolvedVisibilityNoOne = "no_one"
constant AlphaResolvedVisibilityOnlyYou (line 372) | AlphaResolvedVisibilityOnlyYou = "only_you"
constant AlphaResolvedVisibilityOther (line 373) | AlphaResolvedVisibilityOther = "other"
type AudienceExceptionContentInfo (line 378) | type AudienceExceptionContentInfo struct
function NewAudienceExceptionContentInfo (line 384) | func NewAudienceExceptionContentInfo(Name string) *AudienceExceptionCont...
type AudienceExceptions (line 393) | type AudienceExceptions struct
function NewAudienceExceptions (line 403) | func NewAudienceExceptions(Count uint32, Exceptions []*AudienceException...
type AudienceRestrictingSharedFolder (line 412) | type AudienceRestrictingSharedFolder struct
function NewAudienceRestrictingSharedFolder (line 422) | func NewAudienceRestrictingSharedFolder(SharedFolderId string, Name stri...
type LinkMetadata (line 432) | type LinkMetadata struct
method IsLinkMetadata (line 455) | func (u *LinkMetadata) IsLinkMetadata() {}
function NewLinkMetadata (line 442) | func NewLinkMetadata(Url string, Visibility *Visibility) *LinkMetadata {
type IsLinkMetadata (line 450) | type IsLinkMetadata interface
type linkMetadataUnion (line 457) | type linkMetadataUnion struct
method UnmarshalJSON (line 472) | func (u *linkMetadataUnion) UnmarshalJSON(body []byte) error {
constant LinkMetadataPath (line 467) | LinkMetadataPath = "path"
constant LinkMetadataCollection (line 468) | LinkMetadataCollection = "collection"
function IsLinkMetadataFromJSON (line 498) | func IsLinkMetadataFromJSON(data []byte) (IsLinkMetadata, error) {
type CollectionLinkMetadata (line 515) | type CollectionLinkMetadata struct
function NewCollectionLinkMetadata (line 520) | func NewCollectionLinkMetadata(Url string, Visibility *Visibility) *Coll...
type CreateSharedLinkArg (line 528) | type CreateSharedLinkArg struct
function NewCreateSharedLinkArg (line 540) | func NewCreateSharedLinkArg(Path string) *CreateSharedLinkArg {
type CreateSharedLinkError (line 548) | type CreateSharedLinkError struct
method UnmarshalJSON (line 561) | func (u *CreateSharedLinkError) UnmarshalJSON(body []byte) error {
constant CreateSharedLinkErrorPath (line 556) | CreateSharedLinkErrorPath = "path"
constant CreateSharedLinkErrorOther (line 557) | CreateSharedLinkErrorOther = "other"
type CreateSharedLinkWithSettingsArg (line 582) | type CreateSharedLinkWithSettingsArg struct
function NewCreateSharedLinkWithSettingsArg (line 590) | func NewCreateSharedLinkWithSettingsArg(Path string) *CreateSharedLinkWi...
type CreateSharedLinkWithSettingsError (line 597) | type CreateSharedLinkWithSettingsError struct
method UnmarshalJSON (line 619) | func (u *CreateSharedLinkWithSettingsError) UnmarshalJSON(body []byte)...
constant CreateSharedLinkWithSettingsErrorPath (line 611) | CreateSharedLinkWithSettingsErrorPath = "path"
constant CreateSharedLinkWithSettingsErrorEmailNotVerified (line 612) | CreateSharedLinkWithSettingsErrorEmailNotVerified = "email_not_ve...
constant CreateSharedLinkWithSettingsErrorSharedLinkAlreadyExists (line 613) | CreateSharedLinkWithSettingsErrorSharedLinkAlreadyExists = "shared_link_...
constant CreateSharedLinkWithSettingsErrorSettingsError (line 614) | CreateSharedLinkWithSettingsErrorSettingsError = "settings_error"
constant CreateSharedLinkWithSettingsErrorAccessDenied (line 615) | CreateSharedLinkWithSettingsErrorAccessDenied = "access_denied"
type SharedContentLinkMetadataBase (line 652) | type SharedContentLinkMetadataBase struct
function NewSharedContentLinkMetadataBase (line 677) | func NewSharedContentLinkMetadataBase(AudienceOptions []*LinkAudience, C...
type ExpectedSharedContentLinkMetadata (line 689) | type ExpectedSharedContentLinkMetadata struct
function NewExpectedSharedContentLinkMetadata (line 694) | func NewExpectedSharedContentLinkMetadata(AudienceOptions []*LinkAudienc...
type FileAction (line 704) | type FileAction struct
constant FileActionDisableViewerInfo (line 710) | FileActionDisableViewerInfo = "disable_viewer_info"
constant FileActionEditContents (line 711) | FileActionEditContents = "edit_contents"
constant FileActionEnableViewerInfo (line 712) | FileActionEnableViewerInfo = "enable_viewer_info"
constant FileActionInviteViewer (line 713) | FileActionInviteViewer = "invite_viewer"
constant FileActionInviteViewerNoComment (line 714) | FileActionInviteViewerNoComment = "invite_viewer_no_comment"
constant FileActionInviteEditor (line 715) | FileActionInviteEditor = "invite_editor"
constant FileActionUnshare (line 716) | FileActionUnshare = "unshare"
constant FileActionRelinquishMembership (line 717) | FileActionRelinquishMembership = "relinquish_membership"
constant FileActionShareLink (line 718) | FileActionShareLink = "share_link"
constant FileActionCreateLink (line 719) | FileActionCreateLink = "create_link"
constant FileActionCreateViewLink (line 720) | FileActionCreateViewLink = "create_view_link"
constant FileActionCreateEditLink (line 721) | FileActionCreateEditLink = "create_edit_link"
constant FileActionOther (line 722) | FileActionOther = "other"
type FileErrorResult (line 726) | type FileErrorResult struct
method UnmarshalJSON (line 747) | func (u *FileErrorResult) UnmarshalJSON(body []byte) error {
constant FileErrorResultFileNotFoundError (line 740) | FileErrorResultFileNotFoundError = "file_not_found_error"
constant FileErrorResultInvalidFileActionError (line 741) | FileErrorResultInvalidFileActionError = "invalid_file_action_error"
constant FileErrorResultPermissionDeniedError (line 742) | FileErrorResultPermissionDeniedError = "permission_denied_error"
constant FileErrorResultOther (line 743) | FileErrorResultOther = "other"
type SharedLinkMetadata (line 780) | type SharedLinkMetadata struct
method IsSharedLinkMetadata (line 820) | func (u *SharedLinkMetadata) IsSharedLinkMetadata() {}
function NewSharedLinkMetadata (line 806) | func NewSharedLinkMetadata(Url string, Name string, LinkPermissions *Lin...
type IsSharedLinkMetadata (line 815) | type IsSharedLinkMetadata interface
type sharedLinkMetadataUnion (line 822) | type sharedLinkMetadataUnion struct
method UnmarshalJSON (line 837) | func (u *sharedLinkMetadataUnion) UnmarshalJSON(body []byte) error {
constant SharedLinkMetadataFile (line 832) | SharedLinkMetadataFile = "file"
constant SharedLinkMetadataFolder (line 833) | SharedLinkMetadataFolder = "folder"
function IsSharedLinkMetadataFromJSON (line 863) | func IsSharedLinkMetadataFromJSON(data []byte) (IsSharedLinkMetadata, er...
type FileLinkMetadata (line 880) | type FileLinkMetadata struct
function NewFileLinkMetadata (line 899) | func NewFileLinkMetadata(Url string, Name string, LinkPermissions *LinkP...
type FileMemberActionError (line 912) | type FileMemberActionError struct
method UnmarshalJSON (line 932) | func (u *FileMemberActionError) UnmarshalJSON(body []byte) error {
constant FileMemberActionErrorInvalidMember (line 924) | FileMemberActionErrorInvalidMember = "invalid_member"
constant FileMemberActionErrorNoPermission (line 925) | FileMemberActionErrorNoPermission = "no_permission"
constant FileMemberActionErrorAccessError (line 926) | FileMemberActionErrorAccessError = "access_error"
constant FileMemberActionErrorNoExplicitAccess (line 927) | FileMemberActionErrorNoExplicitAccess = "no_explicit_access"
constant FileMemberActionErrorOther (line 928) | FileMemberActionErrorOther = "other"
type FileMemberActionIndividualResult (line 959) | type FileMemberActionIndividualResult struct
method UnmarshalJSON (line 978) | func (u *FileMemberActionIndividualResult) UnmarshalJSON(body []byte) ...
constant FileMemberActionIndividualResultSuccess (line 973) | FileMemberActionIndividualResultSuccess = "success"
constant FileMemberActionIndividualResultMemberError (line 974) | FileMemberActionIndividualResultMemberError = "member_error"
type FileMemberActionResult (line 1009) | type FileMemberActionResult struct
function NewFileMemberActionResult (line 1023) | func NewFileMemberActionResult(Member *MemberSelector, Result *FileMembe...
type FileMemberRemoveActionResult (line 1031) | type FileMemberRemoveActionResult struct
method UnmarshalJSON (line 1047) | func (u *FileMemberRemoveActionResult) UnmarshalJSON(body []byte) error {
constant FileMemberRemoveActionResultSuccess (line 1041) | FileMemberRemoveActionResultSuccess = "success"
constant FileMemberRemoveActionResultMemberError (line 1042) | FileMemberRemoveActionResultMemberError = "member_error"
constant FileMemberRemoveActionResultOther (line 1043) | FileMemberRemoveActionResultOther = "other"
type FilePermission (line 1074) | type FilePermission struct
function NewFilePermission (line 1085) | func NewFilePermission(Action *FileAction, Allow bool) *FilePermission {
type FolderAction (line 1093) | type FolderAction struct
constant FolderActionChangeOptions (line 1099) | FolderActionChangeOptions = "change_options"
constant FolderActionDisableViewerInfo (line 1100) | FolderActionDisableViewerInfo = "disable_viewer_info"
constant FolderActionEditContents (line 1101) | FolderActionEditContents = "edit_contents"
constant FolderActionEnableViewerInfo (line 1102) | FolderActionEnableViewerInfo = "enable_viewer_info"
constant FolderActionInviteEditor (line 1103) | FolderActionInviteEditor = "invite_editor"
constant FolderActionInviteViewer (line 1104) | FolderActionInviteViewer = "invite_viewer"
constant FolderActionInviteViewerNoComment (line 1105) | FolderActionInviteViewerNoComment = "invite_viewer_no_comment"
constant FolderActionRelinquishMembership (line 1106) | FolderActionRelinquishMembership = "relinquish_membership"
constant FolderActionUnmount (line 1107) | FolderActionUnmount = "unmount"
constant FolderActionUnshare (line 1108) | FolderActionUnshare = "unshare"
constant FolderActionLeaveACopy (line 1109) | FolderActionLeaveACopy = "leave_a_copy"
constant FolderActionShareLink (line 1110) | FolderActionShareLink = "share_link"
constant FolderActionCreateLink (line 1111) | FolderActionCreateLink = "create_link"
constant FolderActionSetAccessInheritance (line 1112) | FolderActionSetAccessInheritance = "set_access_inheritance"
constant FolderActionOther (line 1113) | FolderActionOther = "other"
type FolderLinkMetadata (line 1117) | type FolderLinkMetadata struct
function NewFolderLinkMetadata (line 1122) | func NewFolderLinkMetadata(Url string, Name string, LinkPermissions *Lin...
type FolderPermission (line 1132) | type FolderPermission struct
function NewFolderPermission (line 1143) | func NewFolderPermission(Action *FolderAction, Allow bool) *FolderPermis...
type FolderPolicy (line 1152) | type FolderPolicy struct
function NewFolderPolicy (line 1174) | func NewFolderPolicy(AclUpdatePolicy *AclUpdatePolicy, SharedLinkPolicy ...
type GetFileMetadataArg (line 1182) | type GetFileMetadataArg struct
function NewGetFileMetadataArg (line 1192) | func NewGetFileMetadataArg(File string) *GetFileMetadataArg {
type GetFileMetadataBatchArg (line 1199) | type GetFileMetadataBatchArg struct
function NewGetFileMetadataBatchArg (line 1209) | func NewGetFileMetadataBatchArg(Files []string) *GetFileMetadataBatchArg {
type GetFileMetadataBatchResult (line 1216) | type GetFileMetadataBatchResult struct
function NewGetFileMetadataBatchResult (line 1225) | func NewGetFileMetadataBatchResult(File string, Result *GetFileMetadataI...
type GetFileMetadataError (line 1233) | type GetFileMetadataError struct
method UnmarshalJSON (line 1249) | func (u *GetFileMetadataError) UnmarshalJSON(body []byte) error {
constant GetFileMetadataErrorUserError (line 1243) | GetFileMetadataErrorUserError = "user_error"
constant GetFileMetadataErrorAccessError (line 1244) | GetFileMetadataErrorAccessError = "access_error"
constant GetFileMetadataErrorOther (line 1245) | GetFileMetadataErrorOther = "other"
type GetFileMetadataIndividualResult (line 1275) | type GetFileMetadataIndividualResult struct
method UnmarshalJSON (line 1291) | func (u *GetFileMetadataIndividualResult) UnmarshalJSON(body []byte) e...
constant GetFileMetadataIndividualResultMetadata (line 1285) | GetFileMetadataIndividualResultMetadata = "metadata"
constant GetFileMetadataIndividualResultAccessError (line 1286) | GetFileMetadataIndividualResultAccessError = "access_error"
constant GetFileMetadataIndividualResultOther (line 1287) | GetFileMetadataIndividualResultOther = "other"
type GetMetadataArgs (line 1317) | type GetMetadataArgs struct
function NewGetMetadataArgs (line 1328) | func NewGetMetadataArgs(SharedFolderId string) *GetMetadataArgs {
type SharedLinkError (line 1335) | type SharedLinkError struct
constant SharedLinkErrorSharedLinkNotFound (line 1341) | SharedLinkErrorSharedLinkNotFound = "shared_link_not_found"
constant SharedLinkErrorSharedLinkAccessDenied (line 1342) | SharedLinkErrorSharedLinkAccessDenied = "shared_link_access_denied"
constant SharedLinkErrorUnsupportedLinkType (line 1343) | SharedLinkErrorUnsupportedLinkType = "unsupported_link_type"
constant SharedLinkErrorOther (line 1344) | SharedLinkErrorOther = "other"
type GetSharedLinkFileError (line 1348) | type GetSharedLinkFileError struct
constant GetSharedLinkFileErrorSharedLinkNotFound (line 1354) | GetSharedLinkFileErrorSharedLinkNotFound = "shared_link_not_found"
constant GetSharedLinkFileErrorSharedLinkAccessDenied (line 1355) | GetSharedLinkFileErrorSharedLinkAccessDenied = "shared_link_access_denied"
constant GetSharedLinkFileErrorUnsupportedLinkType (line 1356) | GetSharedLinkFileErrorUnsupportedLinkType = "unsupported_link_type"
constant GetSharedLinkFileErrorOther (line 1357) | GetSharedLinkFileErrorOther = "other"
constant GetSharedLinkFileErrorSharedLinkIsDirectory (line 1358) | GetSharedLinkFileErrorSharedLinkIsDirectory = "shared_link_is_directory"
type GetSharedLinkMetadataArg (line 1362) | type GetSharedLinkMetadataArg struct
function NewGetSharedLinkMetadataArg (line 1375) | func NewGetSharedLinkMetadataArg(Url string) *GetSharedLinkMetadataArg {
type GetSharedLinksArg (line 1382) | type GetSharedLinksArg struct
function NewGetSharedLinksArg (line 1388) | func NewGetSharedLinksArg() *GetSharedLinksArg {
type GetSharedLinksError (line 1394) | type GetSharedLinksError struct
method UnmarshalJSON (line 1407) | func (u *GetSharedLinksError) UnmarshalJSON(body []byte) error {
constant GetSharedLinksErrorPath (line 1402) | GetSharedLinksErrorPath = "path"
constant GetSharedLinksErrorOther (line 1403) | GetSharedLinksErrorOther = "other"
type GetSharedLinksResult (line 1428) | type GetSharedLinksResult struct
method UnmarshalJSON (line 1441) | func (u *GetSharedLinksResult) UnmarshalJSON(b []byte) error {
function NewGetSharedLinksResult (line 1434) | func NewGetSharedLinksResult(Links []IsLinkMetadata) *GetSharedLinksResu...
type GroupInfo (line 1463) | type GroupInfo struct
function NewGroupInfo (line 1476) | func NewGroupInfo(GroupName string, GroupId string, GroupManagementType ...
type MembershipInfo (line 1489) | type MembershipInfo struct
function NewMembershipInfo (line 1504) | func NewMembershipInfo(AccessType *AccessLevel) *MembershipInfo {
type GroupMembershipInfo (line 1513) | type GroupMembershipInfo struct
function NewGroupMembershipInfo (line 1520) | func NewGroupMembershipInfo(AccessType *AccessLevel, Group *GroupInfo) *...
type InsufficientPlan (line 1529) | type InsufficientPlan struct
function NewInsufficientPlan (line 1540) | func NewInsufficientPlan(Message string) *InsufficientPlan {
type InsufficientQuotaAmounts (line 1547) | type InsufficientQuotaAmounts struct
function NewInsufficientQuotaAmounts (line 1559) | func NewInsufficientQuotaAmounts(SpaceNeeded uint64, SpaceShortage uint6...
type InviteeInfo (line 1568) | type InviteeInfo struct
method UnmarshalJSON (line 1581) | func (u *InviteeInfo) UnmarshalJSON(body []byte) error {
constant InviteeInfoEmail (line 1576) | InviteeInfoEmail = "email"
constant InviteeInfoOther (line 1577) | InviteeInfoOther = "other"
type InviteeMembershipInfo (line 1603) | type InviteeMembershipInfo struct
function NewInviteeMembershipInfo (line 1612) | func NewInviteeMembershipInfo(AccessType *AccessLevel, Invitee *InviteeI...
type JobError (line 1622) | type JobError struct
method UnmarshalJSON (line 1644) | func (u *JobError) UnmarshalJSON(body []byte) error {
constant JobErrorUnshareFolderError (line 1637) | JobErrorUnshareFolderError = "unshare_folder_error"
constant JobErrorRemoveFolderMemberError (line 1638) | JobErrorRemoveFolderMemberError = "remove_folder_member_error"
constant JobErrorRelinquishFolderMembershipError (line 1639) | JobErrorRelinquishFolderMembershipError = "relinquish_folder_membership_...
constant JobErrorOther (line 1640) | JobErrorOther = "other"
type JobStatus (line 1678) | type JobStatus struct
method UnmarshalJSON (line 1692) | func (u *JobStatus) UnmarshalJSON(body []byte) error {
constant JobStatusInProgress (line 1686) | JobStatusInProgress = "in_progress"
constant JobStatusComplete (line 1687) | JobStatusComplete = "complete"
constant JobStatusFailed (line 1688) | JobStatusFailed = "failed"
type LinkAccessLevel (line 1713) | type LinkAccessLevel struct
constant LinkAccessLevelViewer (line 1719) | LinkAccessLevelViewer = "viewer"
constant LinkAccessLevelEditor (line 1720) | LinkAccessLevelEditor = "editor"
constant LinkAccessLevelOther (line 1721) | LinkAccessLevelOther = "other"
type LinkAction (line 1725) | type LinkAction struct
constant LinkActionChangeAccessLevel (line 1731) | LinkActionChangeAccessLevel = "change_access_level"
constant LinkActionChangeAudience (line 1732) | LinkActionChangeAudience = "change_audience"
constant LinkActionRemoveExpiry (line 1733) | LinkActionRemoveExpiry = "remove_expiry"
constant LinkActionRemovePassword (line 1734) | LinkActionRemovePassword = "remove_password"
constant LinkActionSetExpiry (line 1735) | LinkActionSetExpiry = "set_expiry"
constant LinkActionSetPassword (line 1736) | LinkActionSetPassword = "set_password"
constant LinkActionOther (line 1737) | LinkActionOther = "other"
type LinkAudience (line 1741) | type LinkAudience struct
constant LinkAudiencePublic (line 1747) | LinkAudiencePublic = "public"
constant LinkAudienceTeam (line 1748) | LinkAudienceTeam = "team"
constant LinkAudienceNoOne (line 1749) | LinkAudienceNoOne = "no_one"
constant LinkAudiencePassword (line 1750) | LinkAudiencePassword = "password"
constant LinkAudienceMembers (line 1751) | LinkAudienceMembers = "members"
constant LinkAudienceOther (line 1752) | LinkAudienceOther = "other"
type VisibilityPolicyDisallowedReason (line 1756) | type VisibilityPolicyDisallowedReason struct
constant VisibilityPolicyDisallowedReasonDeleteAndRecreate (line 1762) | VisibilityPolicyDisallowedReasonDeleteAndRecreate = "delete_and_r...
constant VisibilityPolicyDisallowedReasonRestrictedBySharedFolder (line 1763) | VisibilityPolicyDisallowedReasonRestrictedBySharedFolder = "restricted_b...
constant VisibilityPolicyDisallowedReasonRestrictedByTeam (line 1764) | VisibilityPolicyDisallowedReasonRestrictedByTeam = "restricted_b...
constant VisibilityPolicyDisallowedReasonUserNotOnTeam (line 1765) | VisibilityPolicyDisallowedReasonUserNotOnTeam = "user_not_on_...
constant VisibilityPolicyDisallowedReasonUserAccountType (line 1766) | VisibilityPolicyDisallowedReasonUserAccountType = "user_account...
constant VisibilityPolicyDisallowedReasonPermissionDenied (line 1767) | VisibilityPolicyDisallowedReasonPermissionDenied = "permission_d...
constant VisibilityPolicyDisallowedReasonOther (line 1768) | VisibilityPolicyDisallowedReasonOther = "other"
type LinkAudienceDisallowedReason (line 1773) | type LinkAudienceDisallowedReason struct
constant LinkAudienceDisallowedReasonDeleteAndRecreate (line 1779) | LinkAudienceDisallowedReasonDeleteAndRecreate = "delete_and_recre...
constant LinkAudienceDisallowedReasonRestrictedBySharedFolder (line 1780) | LinkAudienceDisallowedReasonRestrictedBySharedFolder = "restricted_by_sh...
constant LinkAudienceDisallowedReasonRestrictedByTeam (line 1781) | LinkAudienceDisallowedReasonRestrictedByTeam = "restricted_by_team"
constant LinkAudienceDisallowedReasonUserNotOnTeam (line 1782) | LinkAudienceDisallowedReasonUserNotOnTeam = "user_not_on_team"
constant LinkAudienceDisallowedReasonUserAccountType (line 1783) | LinkAudienceDisallowedReasonUserAccountType = "user_account_type"
constant LinkAudienceDisallowedReasonPermissionDenied (line 1784) | LinkAudienceDisallowedReasonPermissionDenied = "permission_denied"
constant LinkAudienceDisallowedReasonOther (line 1785) | LinkAudienceDisallowedReasonOther = "other"
type LinkAudienceOption (line 1789) | type LinkAudienceOption struct
function NewLinkAudienceOption (line 1801) | func NewLinkAudienceOption(Audience *LinkAudience, Allowed bool) *LinkAu...
type LinkExpiry (line 1809) | type LinkExpiry struct
method UnmarshalJSON (line 1823) | func (u *LinkExpiry) UnmarshalJSON(body []byte) error {
constant LinkExpiryRemoveExpiry (line 1817) | LinkExpiryRemoveExpiry = "remove_expiry"
constant LinkExpirySetExpiry (line 1818) | LinkExpirySetExpiry = "set_expiry"
constant LinkExpiryOther (line 1819) | LinkExpiryOther = "other"
type LinkPassword (line 1844) | type LinkPassword struct
method UnmarshalJSON (line 1858) | func (u *LinkPassword) UnmarshalJSON(body []byte) error {
constant LinkPasswordRemovePassword (line 1852) | LinkPasswordRemovePassword = "remove_password"
constant LinkPasswordSetPassword (line 1853) | LinkPasswordSetPassword = "set_password"
constant LinkPasswordOther (line 1854) | LinkPasswordOther = "other"
type LinkPermission (line 1879) | type LinkPermission struct
function NewLinkPermission (line 1889) | func NewLinkPermission(Action *LinkAction, Allow bool) *LinkPermission {
type LinkPermissions (line 1897) | type LinkPermissions struct
function NewLinkPermissions (line 1969) | func NewLinkPermissions(CanRevoke bool, VisibilityPolicies []*Visibility...
type LinkSettings (line 1984) | type LinkSettings struct
function NewLinkSettings (line 1997) | func NewLinkSettings() *LinkSettings {
type ListFileMembersArg (line 2003) | type ListFileMembersArg struct
function NewListFileMembersArg (line 2017) | func NewListFileMembersArg(File string) *ListFileMembersArg {
type ListFileMembersBatchArg (line 2026) | type ListFileMembersBatchArg struct
function NewListFileMembersBatchArg (line 2035) | func NewListFileMembersBatchArg(Files []string) *ListFileMembersBatchArg {
type ListFileMembersBatchResult (line 2043) | type ListFileMembersBatchResult struct
function NewListFileMembersBatchResult (line 2051) | func NewListFileMembersBatchResult(File string, Result *ListFileMembersI...
type ListFileMembersContinueArg (line 2059) | type ListFileMembersContinueArg struct
function NewListFileMembersContinueArg (line 2066) | func NewListFileMembersContinueArg(Cursor string) *ListFileMembersContin...
type ListFileMembersContinueError (line 2073) | type ListFileMembersContinueError struct
method UnmarshalJSON (line 2090) | func (u *ListFileMembersContinueError) UnmarshalJSON(body []byte) error {
constant ListFileMembersContinueErrorUserError (line 2083) | ListFileMembersContinueErrorUserError = "user_error"
constant ListFileMembersContinueErrorAccessError (line 2084) | ListFileMembersContinueErrorAccessError = "access_error"
constant ListFileMembersContinueErrorInvalidCursor (line 2085) | ListFileMembersContinueErrorInvalidCursor = "invalid_cursor"
constant ListFileMembersContinueErrorOther (line 2086) | ListFileMembersContinueErrorOther = "other"
type ListFileMembersCountResult (line 2116) | type ListFileMembersCountResult struct
function NewListFileMembersCountResult (line 2125) | func NewListFileMembersCountResult(Members *SharedFileMembers, MemberCou...
type ListFileMembersError (line 2133) | type ListFileMembersError struct
method UnmarshalJSON (line 2149) | func (u *ListFileMembersError) UnmarshalJSON(body []byte) error {
constant ListFileMembersErrorUserError (line 2143) | ListFileMembersErrorUserError = "user_error"
constant ListFileMembersErrorAccessError (line 2144) | ListFileMembersErrorAccessError = "access_error"
constant ListFileMembersErrorOther (line 2145) | ListFileMembersErrorOther = "other"
type ListFileMembersIndividualResult (line 2175) | type ListFileMembersIndividualResult struct
method UnmarshalJSON (line 2191) | func (u *ListFileMembersIndividualResult) UnmarshalJSON(body []byte) e...
constant ListFileMembersIndividualResultResult (line 2185) | ListFileMembersIndividualResultResult = "result"
constant ListFileMembersIndividualResultAccessError (line 2186) | ListFileMembersIndividualResultAccessError = "access_error"
constant ListFileMembersIndividualResultOther (line 2187) | ListFileMembersIndividualResultOther = "other"
type ListFilesArg (line 2218) | type ListFilesArg struct
function NewListFilesArg (line 2229) | func NewListFilesArg() *ListFilesArg {
type ListFilesContinueArg (line 2236) | type ListFilesContinueArg struct
function NewListFilesContinueArg (line 2242) | func NewListFilesContinueArg(Cursor string) *ListFilesContinueArg {
type ListFilesContinueError (line 2249) | type ListFilesContinueError struct
method UnmarshalJSON (line 2263) | func (u *ListFilesContinueError) UnmarshalJSON(body []byte) error {
constant ListFilesContinueErrorUserError (line 2257) | ListFilesContinueErrorUserError = "user_error"
constant ListFilesContinueErrorInvalidCursor (line 2258) | ListFilesContinueErrorInvalidCursor = "invalid_cursor"
constant ListFilesContinueErrorOther (line 2259) | ListFilesContinueErrorOther = "other"
Condensed preview — 56 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,289K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 682,
"preview": "---\nname: \"\\U0001F41B Bug report\"\nabout: Create a report to help us improve the SDK\ntitle: ''\nlabels: bug\nassignees: ''\n"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 27,
"preview": "blank_issues_enabled: false"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 651,
"preview": "---\nname: \"\\U0001F680 Feature Request\"\nabout: Suggest an idea for this SDK\ntitle: ''\nlabels: enhancement\nassignees: ''\n\n"
},
{
"path": ".github/ISSUE_TEMPLATE/question_help.md",
"chars": 633,
"preview": "---\nname: \"\\U0001F4AC Questions / Help\"\nabout: Get help with issues you are experiencing\ntitle: ''\nlabels: help-wanted, "
},
{
"path": ".github/dependabot.yml",
"chars": 603,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/workflows/codeql-analysis.yml",
"chars": 2345,
"preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
},
{
"path": ".github/workflows/lint.yml",
"chars": 285,
"preview": "name: Lint\non:\n pull_request:\njobs:\n golangci:\n name: lint\n runs-on: ubuntu-latest\n steps:\n - uses: acti"
},
{
"path": ".github/workflows/test.yml",
"chars": 477,
"preview": "name: Test\non:\n pull_request:\nenv:\n GO111MODULE: \"on\"\njobs:\n test:\n strategy:\n matrix:\n go-version: [1"
},
{
"path": ".gitignore",
"chars": 98,
"preview": "# jetbrains\n.idea\n\n# swap\n[._]*.s[a-w][a-z]\n[._]s[a-w][a-z]\n\n# emacs backups\n*~\n\n.pyc\n__pycache__\n"
},
{
"path": ".gitmodules",
"chars": 127,
"preview": "[submodule \"generator/dropbox-api-spec\"]\n\tpath = generator/dropbox-api-spec\n\turl = https://github.com/dropbox/dropbox-ap"
},
{
"path": "LICENSE",
"chars": 1086,
"preview": "Copyright (c) 2009-2016 Dropbox Inc., http://www.dropbox.com/\n\nPermission is hereby granted, free of charge, to any pers"
},
{
"path": "README.md",
"chars": 5309,
"preview": "# Dropbox SDK for Go [UNOFFICIAL] [ code generators\nused t"
},
{
"path": "generator/generate-sdk.sh",
"chars": 776,
"preview": "#! /usr/bin/env bash\nset -euo pipefail\n\nif [[ $# -ne 1 ]]; then\n echo \"$0: Expecting exactly one command-line argumen"
},
{
"path": "generator/go_client.stoneg.py",
"chars": 6220,
"preview": "import os\n\nfrom stone.backend import CodeBackend\nfrom stone.ir import (\n is_void_type,\n is_struct_type\n)\n\nfrom go_"
},
{
"path": "generator/go_helpers.py",
"chars": 5543,
"preview": "from stone.ir import (ApiNamespace, ApiRoute)\nfrom stone.ir import (\n Boolean,\n Float32,\n Float64,\n Int32,\n "
},
{
"path": "generator/go_rsrc/sdk.go",
"chars": 9215,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "generator/go_types.stoneg.py",
"chars": 11120,
"preview": "import os\nimport shutil\n\nfrom stone.backend import CodeBackend\nfrom stone.ir import (\n is_boolean_type,\n is_list_t"
},
{
"path": "v6/dropbox/account/client.go",
"chars": 2523,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/account/types.go",
"chars": 3373,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/async/types.go",
"chars": 5238,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/auth/client.go",
"chars": 3460,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/auth/sdk.go",
"chars": 1884,
"preview": "package auth\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n\n\t\"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox\"\n)\n\n// Au"
},
{
"path": "v6/dropbox/auth/types.go",
"chars": 7002,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/check/client.go",
"chars": 3924,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/check/types.go",
"chars": 1843,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/common/types.go",
"chars": 6854,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/contacts/client.go",
"chars": 3499,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/contacts/types.go",
"chars": 2843,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/file_properties/client.go",
"chars": 19505,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/file_properties/types.go",
"chars": 33303,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/file_requests/client.go",
"chars": 10263,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/file_requests/types.go",
"chars": 16911,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/files/client.go",
"chars": 90085,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/files/types.go",
"chars": 161279,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/openid/client.go",
"chars": 2604,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/openid/types.go",
"chars": 3747,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/paper/client.go",
"chars": 29062,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/paper/types.go",
"chars": 31635,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/sdk.go",
"chars": 9188,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/sdk_test.go",
"chars": 7110,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/secondary_emails/types.go",
"chars": 1685,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/seen_state/types.go",
"chars": 1719,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/sharing/client.go",
"chars": 50008,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/sharing/types.go",
"chars": 153473,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/team/client.go",
"chars": 105206,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/team/types.go",
"chars": 211762,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/team_common/types.go",
"chars": 3584,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/team_log/client.go",
"chars": 4216,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/team_log/types.go",
"chars": 1067223,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/team_policies/types.go",
"chars": 12565,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/users/client.go",
"chars": 6431,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/users/types.go",
"chars": 21068,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/dropbox/users_common/types.go",
"chars": 1537,
"preview": "// Copyright (c) Dropbox, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of "
},
{
"path": "v6/go.mod",
"chars": 100,
"preview": "module github.com/dropbox/dropbox-sdk-go-unofficial/v6\n\ngo 1.13\n\nrequire golang.org/x/oauth2 v0.7.0\n"
},
{
"path": "v6/go.sum",
"chars": 4996,
"preview": "cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=\ngithub.com/golang/pro"
}
]
About this extraction
This page contains the full source code of the dropbox/dropbox-sdk-go-unofficial GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 56 files (2.1 MB), approximately 541.7k tokens, and a symbol index with 7930 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.