cloud

package
v5.3.3-pre13 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Name = `cloud`

Variables

View Source
var DefaultConfig = &Config{}

Functions

This section is empty.

Types

type Cloud

type Cloud struct {
	*local.Filesystem
	// contains filtered or unexported fields
}

func NewCloud

func NewCloud(ctx context.Context, subdir string) (*Cloud, error)

func (*Cloud) Close

func (f *Cloud) Close() error

func (*Cloud) Delete

func (f *Cloud) Delete(dstFile string) error

func (*Cloud) DeleteDir

func (f *Cloud) DeleteDir(dstDir string) error

func (*Cloud) Exists

func (f *Cloud) Exists(file string) (bool, error)

func (*Cloud) FileInfo

func (f *Cloud) FileInfo(file string) (os.FileInfo, error)

func (*Cloud) FixURL

func (f *Cloud) FixURL(content string, embedded ...bool) string

func (*Cloud) Get

func (f *Cloud) Get(dstFile string) (io.ReadCloser, error)

func (*Cloud) Name

func (f *Cloud) Name() string

func (*Cloud) PublicURL

func (f *Cloud) PublicURL(dstFile string) string

func (*Cloud) Put

func (f *Cloud) Put(dstFile string, src io.Reader, size int64) (savePath string, viewURL string, err error)

func (*Cloud) SendFile

func (f *Cloud) SendFile(ctx echo.Context, file string) error

func (*Cloud) URLToFile

func (f *Cloud) URLToFile(publicURL string) string

type Config

type Config struct {
	CloudServerURL string
	PublicBaseURL  string
}

func (*Config) New

func (c *Config) New(ctx context.Context) (b *blob.Bucket, err error)

Jump to

Keyboard shortcuts

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