dropbox

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID              = "dropbox"
	ClientIdKey     = "key"
	ClientSecretKey = "secret"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dropbox

type Dropbox struct {
	// contains filtered or unexported fields
}

func NewDropbox

func NewDropbox(clientId, clientSecret, redirectURI, accessToken string) *Dropbox

func (*Dropbox) AuthorizeURL

func (v *Dropbox) AuthorizeURL() string

func (*Dropbox) GetAccessToken

func (v *Dropbox) GetAccessToken(code string) (interface{}, error)

func (*Dropbox) Redirect

func (v *Dropbox) Redirect(c *fiber.Ctx, gateway *sdk.GatewayClient) error

func (*Dropbox) StoreAccessToken

func (v *Dropbox) StoreAccessToken(c *fiber.Ctx, gateway *sdk.GatewayClient) error

func (*Dropbox) Upload

func (v *Dropbox) Upload(path string, content io.Reader) error

type TokenResponse

type TokenResponse struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	UID         string `json:"uid"`
	AccountID   string `json:"account_id"`
	Scope       string `json:"scope"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL