Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPHeaderSafeJSON ¶
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 HandleCommonAPIErrors ¶
HandleCommonAPIErrors handles common API errors
func OAuthEndpoint ¶
OAuthEndpoint constructs an `oauth2.Endpoint` for the given domain
Types ¶
type APIError ¶
type APIError struct {
ErrorSummary string `json:"error_summary"`
}
APIError is the base type for endpoint-specific errors.
type Config ¶
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 // 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, style string, namespace string, route string) map[string]string // No need to set -- for testing only URLGenerator func(hostType string, style string, namespace string, route string) string }
Config contains parameters for configuring the SDK.
type Context ¶
type Context struct { Config Config Client *http.Client HeaderGenerator func(hostType string, style string, namespace string, route string) map[string]string URLGenerator func(hostType string, style string, namespace string, route string) string }
Context is the base client context used to implement per-namespace clients.
func NewContext ¶
NewContext returns a new Context with the given Config.
type LogLevel ¶
type LogLevel uint
LogLevel defines a type that can set the desired level of logging the SDK will generate.
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 )
Directories ¶
Path | Synopsis |
---|---|
Package async : has no documentation (yet)
|
Package async : has no documentation (yet) |
Package auth : has no documentation (yet)
|
Package auth : has no documentation (yet) |
Package common : has no documentation (yet)
|
Package common : has no documentation (yet) |
Package contacts : has no documentation (yet)
|
Package contacts : has no documentation (yet) |
Package file_properties : This namespace contains helpers for property and template metadata endpoints.
|
Package file_properties : This namespace contains helpers for property and template metadata endpoints. |
Package file_requests : This namespace contains endpoints and data types for file request operations.
|
Package file_requests : This namespace contains endpoints and data types for file request operations. |
Package files : This namespace contains endpoints and data types for basic file operations.
|
Package files : This namespace contains endpoints and data types for basic file operations. |
Package paper : This namespace contains endpoints and data types for managing docs and folders in Dropbox Paper.
|
Package paper : This namespace contains endpoints and data types for managing docs and folders in Dropbox Paper. |
Package seen_state : has no documentation (yet)
|
Package seen_state : has no documentation (yet) |
Package sharing : This namespace contains endpoints and data types for creating and managing shared links and shared folders.
|
Package sharing : This namespace contains endpoints and data types for creating and managing shared links and shared folders. |
Package team : has no documentation (yet)
|
Package team : has no documentation (yet) |
Package team_common : has no documentation (yet)
|
Package team_common : has no documentation (yet) |
Package team_log : has no documentation (yet)
|
Package team_log : has no documentation (yet) |
Package team_policies : has no documentation (yet)
|
Package team_policies : has no documentation (yet) |
Package users : This namespace contains endpoints and data types for user management.
|
Package users : This namespace contains endpoints and data types for user management. |
Package users_common : This namespace contains common data types used within the users namespace.
|
Package users_common : This namespace contains common data types used within the users namespace. |
Click to show internal directories.
Click to hide internal directories.