qiniu

package
v0.0.0-...-317ab5b Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(config Config) (store.Store, error)

Types

type Config

type Config struct {
	AccessKey string `mapstructure:"access_key" json:"access_key" yaml:"access_key"`
	SecretKey string `mapstructure:"secret_key" json:"secret_key" yaml:"secret_key"`
	Bucket    string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
	Domain    string `mapstructure:"domain" json:"domain" yaml:"domain"`
	IsSSL     bool   `mapstructure:"is_ssl" json:"is_ssl" yaml:"is_ssl"`
	IsPrivate bool   `mapstructure:"is_private" json:"is_private" yaml:"is_private"`
}

type Qiniu

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

func (*Qiniu) Copy

func (qiniu *Qiniu) Copy(souKey string, destKey string) error

func (*Qiniu) Delete

func (qiniu *Qiniu) Delete(key string) error

func (*Qiniu) Exists

func (qiniu *Qiniu) Exists(key string) (bool, error)

func (*Qiniu) Get

func (qiniu *Qiniu) Get(key string) (io.ReadCloser, error)

func (*Qiniu) Put

func (qiniu *Qiniu) Put(key string, r io.Reader, dataLength int64) error

func (*Qiniu) PutFile

func (qiniu *Qiniu) PutFile(key string, localFile string) error

func (*Qiniu) Rename

func (qiniu *Qiniu) Rename(sourceKey string, destKey string) error

func (*Qiniu) Size

func (qiniu *Qiniu) Size(key string) (int64, error)

func (*Qiniu) Url

func (qiniu *Qiniu) Url(key string) string

Jump to

Keyboard shortcuts

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