Documentation
¶
Index ¶
- Constants
- func CreateContainer(logger logger.Logger, addr, cont string, config *v3io.NewSessionInput, ...) (v3io.Container, error)
- func IsMatch(task *ListDirTask, name string, mtime time.Time, size int64) bool
- func ParseFilename(fullpath string, params *PathParams, forceDir bool) error
- func SplitPath(path string) (string, string)
- func ValidFSTarget(filePath string) error
- type FSClient
- func GetNewClient(logger logger.Logger, params *PathParams) (FSClient, error)
- func NewLocalClient(logger logger.Logger, params *PathParams) (FSClient, error)
- func NewS3Client(logger logger.Logger, params *PathParams) (FSClient, error)
- func NewV3ioClient(logger logger.Logger, params *PathParams) (FSClient, error)
- type FSReader
- type FileDetails
- type FileMeta
- type ListDirTask
- type ListSummary
- type LocalClient
- type PathParams
- type V3ioClient
- type V3ioClientOpts
Constants ¶
View Source
const ( V3ioPathEnvironmentVariable = "V3IO_API" V3ioUserEnvironmentVariable = "V3IO_USERNAME" V3ioPasswordEnvironmentVariable = "V3IO_PASSWORD" V3ioSessionKeyEnvironmentVariable = "V3IO_ACCESS_KEY" )
View Source
const OriginalModeKey = "original_mode"
View Source
const OriginalModeS3Key = "X-Amz-Meta-Original_mode"
View Source
const OriginalMtimeKey = "original_mtime"
View Source
const OriginalMtimeS3Key = "X-Amz-Meta-Original_mtime"
Variables ¶
This section is empty.
Functions ¶
func CreateContainer ¶
func ParseFilename ¶ added in v0.2.0
func ParseFilename(fullpath string, params *PathParams, forceDir bool) error
return is file, err
func ValidFSTarget ¶
Types ¶
type FSClient ¶
type FSClient interface {
ListDir(fileChan chan *FileDetails, task *ListDirTask, summary *ListSummary) error
Reader(path string) (FSReader, error)
Writer(path string, opts *FileMeta) (io.WriteCloser, error)
}
func GetNewClient ¶
func GetNewClient(logger logger.Logger, params *PathParams) (FSClient, error)
func NewLocalClient ¶
func NewLocalClient(logger logger.Logger, params *PathParams) (FSClient, error)
func NewS3Client ¶
func NewS3Client(logger logger.Logger, params *PathParams) (FSClient, error)
func NewV3ioClient ¶
func NewV3ioClient(logger logger.Logger, params *PathParams) (FSClient, error)
type ListDirTask ¶ added in v0.2.0
type ListSummary ¶
type LocalClient ¶
type LocalClient struct {
// contains filtered or unexported fields
}
func (*LocalClient) ListDir ¶
func (c *LocalClient) ListDir(fileChan chan *FileDetails, task *ListDirTask, summary *ListSummary) error
func (*LocalClient) Writer ¶
func (c *LocalClient) Writer(path string, opts *FileMeta) (io.WriteCloser, error)
type PathParams ¶
type PathParams struct {
Kind string `json:"kind"`
Endpoint string `json:"endpoint,omitempty"`
Bucket string `json:"bucket,omitempty"`
Path string `json:"path"`
Tag string `json:"tag,omitempty"`
Secure bool `json:"secure,omitempty"`
UserKey string `json:"userKey,omitempty"`
Secret string `json:"secret,omitempty"`
Token string `json:"token,omitempty"`
// contains filtered or unexported fields
}
func (*PathParams) String ¶ added in v0.2.0
func (p *PathParams) String() string
type V3ioClient ¶
type V3ioClient struct {
// contains filtered or unexported fields
}
func (*V3ioClient) ListDir ¶
func (c *V3ioClient) ListDir(fileChan chan *FileDetails, task *ListDirTask, summary *ListSummary) error
func (*V3ioClient) Writer ¶
func (c *V3ioClient) Writer(path string, opts *FileMeta) (io.WriteCloser, error)
type V3ioClientOpts ¶
type V3ioClientOpts struct {
WebApiEndpoint string `json:"webApiEndpoint"`
Container string `json:"container"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
SessionKey string `json:"sessionKey,omitempty"`
// Logging level (for verbose output) - "debug" | "info" | "warn" | "error"
LogLevel string `json:"logLevel,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.