Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthenticationEndpoint = "https://api.dropbox.com" ContentUploadEndpoint = "https://content.dropboxapi.com" )
View Source
const ( ResponseTypeCode = "code" ResponseTypeToken = "token" )
View Source
const ( TokenAccessTypeOffline = "offline" TokenAccessTypeOline = "online" )
View Source
const ( GrantTypeAuthorizationCode = "authorization_code" GrantTypeRefreshToken = "refresh_token" )
View Source
const ( WriteModeAdd = "add" WriteModeOverwrite = "overwrite" WriteModeUpdate = "update" )
View Source
const ServiceAPIVersion = "2"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Credentials *Credentials
HTTPClient HTTPClient
// contains filtered or unexported fields
}
func (*Client) CredentialsPath ¶
func (*Client) FilesUpload ¶
func (c *Client) FilesUpload(params *FilesUploadInput) (*FilesUploadOutput, error)
func (*Client) OAuth2Token ¶
func (c *Client) OAuth2Token(params *OAuth2TokenInput) (*OAuth2TokenOutput, error)
type Credentials ¶
type CredentialsResolver ¶
type CredentialsResolver struct {
// contains filtered or unexported fields
}
type EnvResolver ¶
type EnvResolver struct {
// contains filtered or unexported fields
}
type FileResolver ¶
type FileResolver struct {
// contains filtered or unexported fields
}
type FilesUploadInput ¶
type FilesUploadOutput ¶
type FilesUploadOutput struct {
ClientModified time.Time `json:"client_modified"`
ContentHash string `json:"content_hash"`
FileLockInfo struct {
Created time.Time `json:"created"`
IsLockholder bool `json:"is_lockholder"`
LockholderName string `json:"lockholder_name"`
} `json:"file_lock_info"`
ID string `json:"id"`
IsDownloadable bool `json:"is_downloadable"`
Name string `json:"name"`
PathDisplay string `json:"path_display"`
PathLower string `json:"path_lower"`
PropertyGroups []struct {
Fields []struct {
Name string `json:"name"`
Value string `json:"value"`
} `json:"fields"`
TemplateID string `json:"template_id"`
} `json:"property_groups"`
Rev string `json:"rev"`
ServerModified time.Time `json:"server_modified"`
SharingInfo struct {
ModifiedBy string `json:"modified_by"`
ParentSharedFolderID string `json:"parent_shared_folder_id"`
ReadOnly bool `json:"read_only"`
} `json:"sharing_info"`
Size int `json:"size"`
}
type OAuth2TokenInput ¶
type OAuth2TokenInput struct {
Code string `schema:"code,omitempty"`
CodeChallenge string `schema:"code_challenge,omitempty"`
CodeVerifier string `schema:"code_verifier,omitempty"`
ExpirationMinutes string `schema:"expiration_minutes,omitempty"`
GrantType string `schema:"grant_type,omitempty"`
RedirectURI string `schema:"redirect_uri,omitempty"`
RefreshToken string `schema:"refresh_token,omitempty"`
Scope string `schema:"scope,omitempty"`
}
type OAuth2TokenOutput ¶
type Option ¶
type Option func(*Client)
func WithCredentialsPath ¶
func WithHTTPClient ¶
func WithHTTPClient(cli HTTPClient) Option
type UploadArg ¶
type UploadArg struct {
Autorename bool `json:"auto_rename,omitempty"`
ClientModified string `json:"client_modified,omitempty"`
ContentHash string `json:"content_hash,omitempty"`
Mode string `json:"mode"`
Mute bool `json:"mute"`
Path string `json:"path"`
StrictConflict bool `json:"strict_conflict,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.