fsbos

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *Config) flysystem.IAdapter

Types

type Config

type Config struct {
	CDN string `json:"cdn" xml:"CDN" yaml:"CDN"`
	Ak  string `json:"ak" xml:"Ak" yaml:"Ak"`
	Sk  string `json:"sk" xml:"Sk" yaml:"Sk"`
	//https://cloud.baidu.com/doc/BOS/s/Ojwvyrpgd
	Endpoint         string `json:"endpoint" xml:"Endpoint" yaml:"Endpoint"`
	RedirectDisabled bool   `json:"redirect_disabled" xml:"RedirectDisabled" yaml:"RedirectDisabled"`
	Bucket           string `json:"bucket" xml:"Bucket" yaml:"Bucket"`
	PathPrefix       string `json:"path_prefix" xml:"PathPrefix" yaml:"PathPrefix"`
}

func (*Config) New added in v0.3.2

func (c *Config) New() flysystem.IAdapter

type FSBos added in v0.1.1

type FSBos struct {
	gfs.AbstractAdapter
	Config *Config
	// contains filtered or unexported fields
}

func NewBOS

func NewBOS(config *Config) *FSBos

func (*FSBos) Copy added in v0.1.1

func (a *FSBos) Copy(source, destination string) (bool, error)

func (*FSBos) Delete added in v0.1.1

func (a *FSBos) Delete(path string) (int64, error)

func (*FSBos) DiskName added in v0.1.1

func (a *FSBos) DiskName() string

func (*FSBos) Exists added in v0.1.1

func (a *FSBos) Exists(path string) (bool, error)

func (*FSBos) GFSAdapter added in v0.3.0

func (a *FSBos) GFSAdapter() gfs.IAdapter

func (*FSBos) MimeType added in v0.1.1

func (a *FSBos) MimeType(path string) (string, error)

func (*FSBos) Move added in v0.1.1

func (a *FSBos) Move(source, destination string) (bool, error)

func (*FSBos) Read added in v0.1.1

func (a *FSBos) Read(path string) ([]byte, error)

func (*FSBos) Size added in v0.1.1

func (a *FSBos) Size(path string) (int64, error)

func (*FSBos) URL added in v0.1.2

func (a *FSBos) URL(path string) (*url.URL, error)

func (*FSBos) Update added in v0.1.1

func (a *FSBos) Update(path string, contents []byte) (string, error)

func (*FSBos) UpdateStream added in v0.1.1

func (a *FSBos) UpdateStream(path, resource string) (string, error)

func (*FSBos) Write added in v0.1.1

func (a *FSBos) Write(path string, contents []byte) (string, error)

func (*FSBos) WriteReader added in v0.1.1

func (a *FSBos) WriteReader(path string, reader io.Reader) (string, error)

func (*FSBos) WriteStream added in v0.1.1

func (a *FSBos) WriteStream(path, resource string) (string, error)

Jump to

Keyboard shortcuts

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