Documentation
¶
Index ¶
- type Duration
- type FlagSet
- type VFS
- func (vfs *VFS) Abs() (string, error)
- func (vfs *VFS) Addr() string
- func (vfs *VFS) FsServer() string
- func (vfs *VFS) Host() string
- func (vfs *VFS) Is(t VFSType) bool
- func (vfs *VFS) IsDisk() bool
- func (vfs *VFS) IsEmpty() bool
- func (vfs *VFS) LocalSyncDisabled() bool
- func (vfs VFS) MarshalText() (text []byte, err error)
- func (vfs *VFS) Path() string
- func (vfs *VFS) Port() int
- func (vfs *VFS) RemotePath() string
- func (vfs *VFS) Secure() bool
- func (vfs *VFS) Server() bool
- func (vfs *VFS) Type() VFSType
- func (vfs *VFS) UnmarshalText(data []byte) error
- type VFSType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Duration ¶ added in v0.3.3
Duration a duration with custom encoding
func (Duration) MarshalText ¶ added in v0.3.3
MarshalText implement interface encoding.TextMarshaler
func (*Duration) UnmarshalText ¶ added in v0.3.3
UnmarshalText implement interface encoding.TextUnmarshaler
type FlagSet ¶ added in v0.6.1
FlagSet is a custom flag.FlagSet
func NewFlagSet ¶ added in v0.6.1
func NewFlagSet(name string, errorHandling flag.ErrorHandling) *FlagSet
NewFlagSet returns a new, empty flag set with the specified name and error handling property. If the name is not empty, it will be printed in the default usage message and in error messages.
func (*FlagSet) DurationVar ¶ added in v0.6.1
DurationVar defines a core.Duration flag with specified name, default value, and usage string. The argument p points to a core.Duration variable in which to store the value of the flag. The flag accepts a value acceptable to time.ParseDuration.
type VFS ¶
type VFS struct {
// contains filtered or unexported fields
}
VFS virtual file system
func NewDiskVFS ¶
NewDiskVFS create an instance of VFS for the local disk file system
func NewEmptyVFS ¶
func NewEmptyVFS() VFS
NewEmptyVFS create an instance of VFS for the unknown file system
func NewVFS ¶
NewVFS auto recognition the file system and create an instance of VFS according to the path
func (*VFS) LocalSyncDisabled ¶
LocalSyncDisabled is local disk sync disabled
func (VFS) MarshalText ¶ added in v0.3.3
MarshalText implement interface encoding.TextMarshaler
func (*VFS) RemotePath ¶ added in v0.4.3
RemotePath the remote file path
func (*VFS) UnmarshalText ¶ added in v0.3.3
UnmarshalText implement interface encoding.TextUnmarshaler
type VFSType ¶
type VFSType int
VFSType the file data source type
const ( // Unknown the unknown file data source Unknown VFSType = iota // Disk the local disk file system data source Disk // RemoteDisk the remote disk file system data source RemoteDisk // FTP the ftp data source FTP // SFTP the sftp data source SFTP // MinIO the MinIO data source MinIO // NetworkDisk the network disk data source NetworkDisk SharedFolder )