Documentation ¶
Overview ¶
Package auth : has no documentation (yet)
Index ¶
- Constants
- func ParseError(err error, appError error) error
- type AccessAPIError
- type AccessError
- type AuthAPIError
- type AuthError
- type BadRequest
- type Client
- type InvalidAccountTypeError
- type PaperAccessError
- type RateLimitAPIError
- type RateLimitError
- type RateLimitReason
- type ServerError
- type TokenFromOAuth1Arg
- type TokenFromOAuth1Error
- type TokenFromOAuth1Result
- type TokenFromOauth1APIError
- type TokenRevokeAPIError
- type TokenScopeError
Constants ¶
const ( AccessErrorInvalidAccountType = "invalid_account_type" AccessErrorPaperAccessDenied = "paper_access_denied" AccessErrorOther = "other" )
Valid tag values for AccessError
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" )
Valid tag values for AuthError
const ( InvalidAccountTypeErrorEndpoint = "endpoint" InvalidAccountTypeErrorFeature = "feature" InvalidAccountTypeErrorOther = "other" )
Valid tag values for InvalidAccountTypeError
const ( PaperAccessErrorPaperDisabled = "paper_disabled" PaperAccessErrorNotPaperUser = "not_paper_user" PaperAccessErrorOther = "other" )
Valid tag values for PaperAccessError
const ( RateLimitReasonTooManyRequests = "too_many_requests" RateLimitReasonTooManyWriteOperations = "too_many_write_operations" RateLimitReasonOther = "other" )
Valid tag values for RateLimitReason
const ( TokenFromOAuth1ErrorInvalidOauth1TokenInfo = "invalid_oauth1_token_info" TokenFromOAuth1ErrorAppIdMismatch = "app_id_mismatch" TokenFromOAuth1ErrorOther = "other" )
Valid tag values for TokenFromOAuth1Error
Variables ¶
This section is empty.
Functions ¶
func ParseError ¶ added in v6.0.2
Types ¶
type AccessAPIError ¶
type AccessAPIError struct { dropbox.APIError AccessError *AccessError `json:"error"` }
AccessAPIError wraps AccessError
type AccessError ¶
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"` }
AccessError : Error occurred because the account doesn't have permission to access the resource.
func (*AccessError) UnmarshalJSON ¶
func (u *AccessError) UnmarshalJSON(body []byte) error
UnmarshalJSON deserializes into a AccessError instance
type AuthAPIError ¶
AuthAPIError wraps AuthError
type AuthError ¶
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"` }
AuthError : Errors occurred during authentication.
func (*AuthError) UnmarshalJSON ¶
UnmarshalJSON deserializes into a AuthError instance
type Client ¶
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) }
Client interface describes all routes in this namespace
type InvalidAccountTypeError ¶
InvalidAccountTypeError : has no documentation (yet)
type PaperAccessError ¶
PaperAccessError : has no documentation (yet)
type RateLimitAPIError ¶
type RateLimitAPIError struct { dropbox.APIError RateLimitError *RateLimitError `json:"error"` }
RateLimitAPIError wraps RateLimitError
type RateLimitError ¶
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"` }
RateLimitError : Error occurred because the app is being rate limited.
func NewRateLimitError ¶
func NewRateLimitError(Reason *RateLimitReason) *RateLimitError
NewRateLimitError returns a new RateLimitError instance
type RateLimitReason ¶
RateLimitReason : has no documentation (yet)
type ServerError ¶ added in v6.0.2
An error occurred on the Dropbox servers. Check status.dropbox.com for announcements about Dropbox service issues.
type TokenFromOAuth1Arg ¶
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"` }
TokenFromOAuth1Arg : has no documentation (yet)
func NewTokenFromOAuth1Arg ¶
func NewTokenFromOAuth1Arg(Oauth1Token string, Oauth1TokenSecret string) *TokenFromOAuth1Arg
NewTokenFromOAuth1Arg returns a new TokenFromOAuth1Arg instance
type TokenFromOAuth1Error ¶
TokenFromOAuth1Error : has no documentation (yet)
type TokenFromOAuth1Result ¶
type TokenFromOAuth1Result struct { // Oauth2Token : The OAuth 2.0 token generated from the supplied OAuth 1.0 // token. Oauth2Token string `json:"oauth2_token"` }
TokenFromOAuth1Result : has no documentation (yet)
func NewTokenFromOAuth1Result ¶
func NewTokenFromOAuth1Result(Oauth2Token string) *TokenFromOAuth1Result
NewTokenFromOAuth1Result returns a new TokenFromOAuth1Result instance
type TokenFromOauth1APIError ¶
type TokenFromOauth1APIError struct { dropbox.APIError EndpointError *TokenFromOAuth1Error `json:"error"` }
TokenFromOauth1APIError is an error-wrapper for the token/from_oauth1 route
type TokenRevokeAPIError ¶
TokenRevokeAPIError is an error-wrapper for the token/revoke route
type TokenScopeError ¶
type TokenScopeError struct { // RequiredScope : The required scope to access the route. RequiredScope string `json:"required_scope"` }
TokenScopeError : has no documentation (yet)
func NewTokenScopeError ¶
func NewTokenScopeError(RequiredScope string) *TokenScopeError
NewTokenScopeError returns a new TokenScopeError instance