fs

package
v1.8.17 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 28 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CFSFile added in v1.8.4

type CFSFile struct {
	Label string `json:"label"`
}

type CleanPlan added in v1.8.4

type CleanPlan struct {
	Dir           string
	FilesToRemove []*FileInfo
	Label         string
}

type FSClient

type FSClient struct {
	Quiet bool
	// contains filtered or unexported fields
}

func CreateFSClient

func CreateFSClient(coloniesClient *client.ColoniesClient, colonyName string, executorPrvKey string) (*FSClient, error)

func (*FSClient) ApplyCleanPlan added in v1.8.4

func (fsClient *FSClient) ApplyCleanPlan(cleanPlan *CleanPlan) error

func (*FSClient) ApplySyncPlan

func (fsClient *FSClient) ApplySyncPlan(syncPlan *SyncPlan) error

func (*FSClient) CalcCleanPlan added in v1.8.4

func (fsClient *FSClient) CalcCleanPlan(dir string, label string) (*CleanPlan, error)

func (*FSClient) CalcCleanPlans added in v1.8.4

func (fsClient *FSClient) CalcCleanPlans(dir string, label string) ([]*CleanPlan, error)

func (*FSClient) CalcSyncPlan

func (fsClient *FSClient) CalcSyncPlan(dir string, label string, keepLocal bool) (*SyncPlan, error)

func (*FSClient) CalcSyncPlans added in v1.6.0

func (fsClient *FSClient) CalcSyncPlans(dir string, label string, keepLocal bool) ([]*SyncPlan, error)

func (*FSClient) Download

func (fsClient *FSClient) Download(colonyName string, fileID string, downloadDir string) error

func (*FSClient) DownloadSnapshot

func (fsClient *FSClient) DownloadSnapshot(snapshotID string, downloadDir string) error

func (*FSClient) RemoveAllFilesWithLabel

func (fsClient *FSClient) RemoveAllFilesWithLabel(label string) error

func (*FSClient) RemoveFileByID

func (fsClient *FSClient) RemoveFileByID(colonyName string, fileID string) error

func (*FSClient) RemoveFileByName

func (fsClient *FSClient) RemoveFileByName(colonyName string, label string, name string) error

type FileInfo

type FileInfo struct {
	Name       string
	Checksum   string
	Size       int64
	S3Filename string
	Dir        bool
}

type ProgressWriter added in v1.7.7

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

func (*ProgressWriter) Write added in v1.7.7

func (pw *ProgressWriter) Write(p []byte) (n int, err error)

type S3Client

type S3Client struct {
	BucketName string
	Endpoint   string
	AccessKey  string
	SecretKey  string
	Region     string
	TLS        bool
	// contains filtered or unexported fields
}

func CreateS3Client

func CreateS3Client() (*S3Client, error)

func (*S3Client) Download

func (s3Client *S3Client) Download(filename string, s3Filename string, downloadDir string, tracker *progress.Tracker, quiet bool) error

func (*S3Client) Exists

func (s3Client *S3Client) Exists(filename string) bool

func (*S3Client) Remove

func (s3Client *S3Client) Remove(filename string) error

func (*S3Client) Upload

func (s3Client *S3Client) Upload(dir string, filename string, s3Filename string, filelength int64, tracker *progress.Tracker, quiet bool) error

type SyncPlan

type SyncPlan struct {
	Dir           string
	LocalMissing  []*FileInfo
	RemoteMissing []*FileInfo
	Conflicts     []*FileInfo
	KeepLocal     bool
	Label         string
}

Jump to

Keyboard shortcuts

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