storage

package
v0.0.0-...-f28940e Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func NewStorage

func NewStorage(ctx context.Context, bucketName string) (*Storage, error)

func (*Storage) Close

func (s *Storage) Close()

func (*Storage) Delete

func (s *Storage) Delete(ctx context.Context, dirs []string, fileName string) error

Delete files

func (*Storage) DisableVersioning

func (s *Storage) DisableVersioning(ctx context.Context) error

disable to versioning.

func (*Storage) FileExist

func (s *Storage) FileExist(ctx context.Context, dirs []string, fileName string) (bool, error)

Check if file exists. Exist if true, false not.

func (*Storage) Object

func (s *Storage) Object(dirs []string, fileName string) *storage.ObjectHandle

Create Storage object. Returns an ObjectHandle that looks like a directory and file to manipulate.

func (*Storage) ReadFile

func (s *Storage) ReadFile(ctx context.Context, dirs []string, fileName string) ([]byte, string, error)

Read file.

func (*Storage) WriteFile

func (s *Storage) WriteFile(ctx context.Context, dirs []string, fileName string, body io.Reader, contentType string) error

Write file

Jump to

Keyboard shortcuts

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