yandex

package
v0.0.0-...-724f8e7 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultAccessToken = os.Getenv("YANDEX_ACCESS_TOKEN")
	DefaultBaseURL     = "https://cloud-api.yandex.net/"
)

Default values for the file system.

Functions

func New

func New(opts ...Option) fs.FileSystem

New creates a new FileSystem using Yandex.Disk.

Types

type Option

type Option func(*config)

An Option customizes the config.

func WithAccessToken

func WithAccessToken(accessToken string) Option

WithAccessToken sets the access token in the config.

func WithBaseURL

func WithBaseURL(baseURL string) Option

WithBaseURL sets the base URL in the config.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

WithHTTPClient sets the default HTTP client in the config.

Jump to

Keyboard shortcuts

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