dropboxstorage

package module
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) (storagecore.Storage, error)

New constructs Dropbox-backed storage using the official SDK. @group Driver Constructors

Example: dropbox storage

fs, _ := dropboxstorage.New(dropboxstorage.Config{
	Token: "token",
})
_ = fs

func NewContext

func NewContext(ctx context.Context, cfg Config) (storagecore.Storage, error)

Types

type Config

type Config struct {
	Token  string
	Prefix string
}

Config defines a Dropbox-backed storage disk. @group Driver Config

Example: define dropbox storage config

cfg := dropboxstorage.Config{
	Token: "token",
}
_ = cfg

Example: define dropbox storage config with all fields

cfg := dropboxstorage.Config{
	Token:  "token",
	Prefix: "uploads", // default: ""
}
_ = cfg

func (Config) DriverName

func (Config) DriverName() string

func (Config) ResolvedConfig

func (c Config) ResolvedConfig() storagecore.ResolvedConfig

Jump to

Keyboard shortcuts

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