storage

package
v0.0.0-...-f1b58f7 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(opts *options)

func WithBucketName

func WithBucketName(data string) Option

func WithEndpoint

func WithEndpoint(data string) Option

func WithRegion

func WithRegion(data string) Option

func WithSecretIdKey

func WithSecretIdKey(id, key string) Option

type Storage

type Storage interface {
	Exists(path string) (bool, error)
	Get(path string) (io.Reader, error)
	Put(path string, reader io.Reader) error
	Delete(path string) error
	Copy(path1, path2 string) error
	Move(path1, path2 string) error
	Path(path string) string
	Url(path string) string
}

func NewAliOSS

func NewAliOSS(root, host string, opts ...Option) Storage

func NewCOS

func NewCOS(root, host string, opts ...Option) Storage

func NewLocal

func NewLocal(root, host string) Storage

Jump to

Keyboard shortcuts

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