Documentation ¶
Index ¶
- func AWSErrorCode(err error) string
- func IsClusterReadable(p Path) bool
- func IsDirectory(p Path) bool
- func RelativePath(base Path, child Path) (string, error)
- func SyncDir(src *VFSScan, destBase Path) error
- type Change
- type ChangeType
- type FSPath
- func (p *FSPath) Base() string
- func (p *FSPath) CreateFile(data []byte) error
- func (p *FSPath) Hash(a hashing.HashAlgorithm) (*hashing.Hash, error)
- func (p *FSPath) Join(relativePath ...string) Path
- func (p *FSPath) Path() string
- func (p *FSPath) PreferredHash() (*hashing.Hash, error)
- func (p *FSPath) ReadDir() ([]Path, error)
- func (p *FSPath) ReadFile() ([]byte, error)
- func (p *FSPath) ReadTree() ([]Path, error)
- func (p *FSPath) Remove() error
- func (p *FSPath) String() string
- func (p *FSPath) WriteFile(data []byte) error
- type HasClusterReadable
- type HasHash
- type MemFSContext
- type MemFSPath
- func (p *MemFSPath) Base() string
- func (p *MemFSPath) CreateFile(data []byte) error
- func (c *MemFSPath) IsClusterReadable() bool
- func (p *MemFSPath) Join(relativePath ...string) Path
- func (p *MemFSPath) Path() string
- func (p *MemFSPath) ReadDir() ([]Path, error)
- func (p *MemFSPath) ReadFile() ([]byte, error)
- func (p *MemFSPath) ReadTree() ([]Path, error)
- func (p *MemFSPath) Remove() error
- func (p *MemFSPath) String() string
- func (p *MemFSPath) WriteFile(data []byte) error
- type Path
- type S3Path
- func (p *S3Path) Base() string
- func (p *S3Path) Bucket() string
- func (p *S3Path) CreateFile(data []byte) error
- func (p *S3Path) Hash(a hashing.HashAlgorithm) (*hashing.Hash, error)
- func (p *S3Path) Join(relativePath ...string) Path
- func (p *S3Path) Key() string
- func (p *S3Path) Path() string
- func (p *S3Path) PreferredHash() (*hashing.Hash, error)
- func (p *S3Path) ReadDir() ([]Path, error)
- func (p *S3Path) ReadFile() ([]byte, error)
- func (p *S3Path) ReadTree() ([]Path, error)
- func (p *S3Path) Remove() error
- func (p *S3Path) String() string
- func (p *S3Path) WriteFile(data []byte) error
- type SSHPath
- func (p *SSHPath) Base() string
- func (p *SSHPath) CreateFile(data []byte) error
- func (p *SSHPath) Join(relativePath ...string) Path
- func (p *SSHPath) Path() string
- func (p *SSHPath) ReadDir() ([]Path, error)
- func (p *SSHPath) ReadFile() ([]byte, error)
- func (p *SSHPath) ReadTree() ([]Path, error)
- func (p *SSHPath) Remove() error
- func (p *SSHPath) String() string
- func (p *SSHPath) WriteFile(data []byte) error
- type VFS
- type VFSContext
- type VFSScan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AWSErrorCode ¶
AWSErrorCode returns the aws error code, if it is an awserr.Error, otherwise ""
func IsClusterReadable ¶
func IsDirectory ¶
Types ¶
type ChangeType ¶
type ChangeType string
const ChangeType_Added ChangeType = "ADDED"
const ChangeType_Modified ChangeType = "MODIFIED"
const ChangeType_Removed ChangeType = "REMOVED"
type FSPath ¶
type FSPath struct {
// contains filtered or unexported fields
}
func (*FSPath) CreateFile ¶
type HasClusterReadable ¶
type HasClusterReadable interface {
IsClusterReadable() bool
}
type MemFSContext ¶
type MemFSContext struct {
// contains filtered or unexported fields
}
func NewMemFSContext ¶
func NewMemFSContext() *MemFSContext
func (*MemFSContext) MarkClusterReadable ¶
func (c *MemFSContext) MarkClusterReadable()
MarkClusterReadable pretends the current memfscontext is cluster readable; this is useful for tests
type MemFSPath ¶
type MemFSPath struct {
// contains filtered or unexported fields
}
func NewMemFSPath ¶
func NewMemFSPath(context *MemFSContext, location string) *MemFSPath
func (*MemFSPath) CreateFile ¶
func (*MemFSPath) IsClusterReadable ¶
type Path ¶
type Path interface { Join(relativePath ...string) Path ReadFile() ([]byte, error) WriteFile(data []byte) error // CreateFile writes the file contents, but only if the file does not already exist CreateFile(data []byte) error // Remove deletes the file Remove() error // Base returns the base name (last element) Base() string // Path returns a string representing the full path Path() string // ReadDir lists the files in a particular Path ReadDir() ([]Path, error) // ReadTree lists all files in the subtree rooted at the current Path ReadTree() ([]Path, error) }
type S3Path ¶
type S3Path struct {
// contains filtered or unexported fields
}
func (*S3Path) CreateFile ¶
type SSHPath ¶
type SSHPath struct {
// contains filtered or unexported fields
}
func NewSSHPath ¶
func (*SSHPath) CreateFile ¶
type VFSContext ¶
type VFSContext struct { }
VFSContext is a 'context' for VFS, that is normally a singleton but allows us to configure S3 credentials, for example
var Context VFSContext
func (*VFSContext) BuildVfsPath ¶
func (c *VFSContext) BuildVfsPath(p string) (Path, error)
type VFSScan ¶
type VFSScan struct { Base Path // contains filtered or unexported fields }
VFSScan scans a source Path for changes files
func NewVFSScan ¶
Click to show internal directories.
Click to hide internal directories.