Documentation ¶
Index ¶
- Constants
- func DataSha256sum(data []byte) string
- func FileSha256sum(fsb afero.Fs, filepath string) (string, error)
- func FsbFileSha256sum(f afero.File) string
- func LimitReader(r io.ReadSeeker, n int64) io.ReadSeeker
- func MergeErrorList(errorList []error) error
- func SanitizeServerAddress(address string) (string, error)
- type CmdLine
- type CmdLineExecuter
- type FileSystem
- func (fs *FileSystem) Format(targetDevice string, fsType string, formatOptions string) error
- func (fs *FileSystem) Mount(targetDevice string, mountPath string, fsType string, mountOptions string) error
- func (fs *FileSystem) TempDir(fsb afero.Fs, prefix string) (string, error)
- func (fs *FileSystem) Umount(mountPath string) error
- type FileSystemHelper
- type LimitedReader
- type Permissions
- type PermissionsDefaultImpl
- type Rebooter
- type RebooterImpl
Constants ¶
View Source
const (
ChunkSize = 128 * 1024
)
Variables ¶
This section is empty.
Functions ¶
func DataSha256sum ¶
func FsbFileSha256sum ¶
func LimitReader ¶
func LimitReader(r io.ReadSeeker, n int64) io.ReadSeeker
func MergeErrorList ¶
func SanitizeServerAddress ¶
Types ¶
type CmdLineExecuter ¶
type FileSystem ¶
type FileSystem struct {
CmdLineExecuter
}
func (*FileSystem) Format ¶
func (fs *FileSystem) Format(targetDevice string, fsType string, formatOptions string) error
func (*FileSystem) Umount ¶
func (fs *FileSystem) Umount(mountPath string) error
type FileSystemHelper ¶
type LimitedReader ¶
type LimitedReader struct { R io.ReadSeeker N int64 }
type Permissions ¶
type PermissionsDefaultImpl ¶
type PermissionsDefaultImpl struct { }
func (*PermissionsDefaultImpl) ApplyChmod ¶
func (*PermissionsDefaultImpl) ApplyChown ¶
func (pdi *PermissionsDefaultImpl) ApplyChown(filepath string, uid interface{}, gid interface{}) error
FIXME: this cannot be tested yet with unit tests because requires mock for: os.Chown, os.Lchown, os.Lstat, user.Lookup and user.LookupGroup. Since we can't change ownership on a real filesystem, this must be tested through integration.
type RebooterImpl ¶
type RebooterImpl struct { }
func (*RebooterImpl) Reboot ¶
func (r *RebooterImpl) Reboot() error
Click to show internal directories.
Click to hide internal directories.