modstggcs

package
v1.27.7 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name     = "backup-gcs"
	AltName1 = "gcs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

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

func New

func New() *Module

func (Module) AllBackups added in v1.27.4

func (g Module) AllBackups(ctx context.Context) ([]*backup.DistributedBackupDescriptor, error)

func (*Module) AltNames

func (m *Module) AltNames() []string

func (Module) GetObject

func (g Module) GetObject(ctx context.Context, backupID, key, overrideBucket, overridePath string) ([]byte, error)

func (Module) HomeDir

func (g Module) HomeDir(backupID, overrideBucket, overridePath string) string

func (*Module) Init

func (m *Module) Init(ctx context.Context,
	params moduletools.ModuleInitParams,
) error

func (Module) Initialize

func (g Module) Initialize(ctx context.Context, backupID, overrideBucket, overridePath string) error

func (*Module) IsExternal

func (m *Module) IsExternal() bool

func (*Module) MetaInfo

func (m *Module) MetaInfo() (map[string]interface{}, error)

func (*Module) Name

func (m *Module) Name() string

func (Module) PutObject

func (g Module) PutObject(ctx context.Context, backupID, key, overrideBucket, overridePath string, byes []byte) error

func (Module) Read added in v1.21.0

func (g Module) Read(ctx context.Context, backupID, key, overrideBucket, overridePath string, w io.WriteCloser) (int64, error)

func (*Module) RootHandler

func (m *Module) RootHandler() http.Handler

func (Module) SourceDataPath

func (g Module) SourceDataPath() string

func (*Module) Type

func (Module) Write added in v1.21.0

func (g Module) Write(ctx context.Context, backupID, key, overrideBucket, overridePath string, r io.ReadCloser) (int64, error)

func (Module) WriteToFile

func (g Module) WriteToFile(ctx context.Context, backupID, key, destPath, overrideBucket, overridePath string) (err error)

WriteToFile downloads an object and store its content in destPath The file destPath will be created if it doesn't exit

Jump to

Keyboard shortcuts

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