Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateConfigPath ¶
ValidateConfigPath just makes sure, that the path provided is a file, that can be read
Types ¶
type Config ¶
type Config struct { Server struct { ServerURL string `yaml:"url" default:"sdfss://localhost:6442" envconfig:"URL"` Password string `yaml:"password" default:"" envconfig:"PASSWORD"` DisableTrust bool `yaml:"disable_trust" envconfig:"DISABLE_TRUST"` } `yaml:"server"` Listener struct { Download bool `yaml:"download" envconfig:"DOWNLOAD"` Upload bool `yaml:"upload" envconfig:"UPLOAD"` Write bool `yaml:"write" envconfig:"WRITE"` Delete bool `yaml:"delete" envconfig:"READ"` Ignore []string `yaml:"ignore" default:".sdfsclitemp/"` } `yaml:"listener"` GCS struct { Credentials string `yaml:"credentials" envconfig:"GOOGLE_APPLICATION_CREDENTIALS"` BucketName string `yaml:"bucket" envconfig:"GCS_BUCKET"` ProjectID string `yaml:"projectid" envconfig:"GCS_PROJECT_ID"` BasePath string `yaml:"base_path" evnconfig:"GCS_BASE_PATH"` Enabled bool `yaml:"enabled" envconfig:"GCS_ENABLED"` Region string `yaml:"region" default:"US" envconfig:"GCS_REGION"` TempDir string `yaml:"tempdir" default:"/tmp" envconfig:"GCS_TEMP_DIR"` Retry int `yaml:"retry" default:"3" envconfig:"GCS_RETRY"` // contains filtered or unexported fields } `yaml:"gcs"` FOLDER struct { Path string `yaml:"base_path" envconfig:"LOCAL_PATH"` Owner int64 `yaml:"owner" default:"0" envconfig:"LOCAL_OWNER"` Group int64 `yaml:"group" default:"0" envconfig:"LOCAL_GROUP"` Permissions int32 `yaml:"permissions" default:"0" envconfig:"LOCAL_PERMISSIONS"` Enabled bool `yaml:"enabled" envconfig:"LOCAL_ENABLED"` } `yaml:"folder"` }
Config is the configuration of the Connection
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener is the listener object for executing on changes
func NewsdfsListener ¶
NewsdfsListener returns a listener for a sdfs file system changes whose config file is the given config file. This node implements all NodeXxxxer operations available.
func (*Listener) CopyLocally ¶
CopyLocally creates a local copy of the file
func (*Listener) CreateGCSBucket ¶
CreateGCSBucket creates a GCS bucket if it does not exist
func (*Listener) UploadToGCS ¶
UploadToGCS uploads a file to GCS
Click to show internal directories.
Click to hide internal directories.