mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-08-30 21:51:56 +00:00
Adds raw disk utils to convert a raw disk into a GCE or Azure image Adds a new constants package to store constants that can be reused across all of our projects Expands KairosFs interface to be in line with whats used on other projects so we can use it
35 lines
1.1 KiB
Go
35 lines
1.1 KiB
Go
package types
|
|
|
|
import (
|
|
"io/fs"
|
|
"os"
|
|
"time"
|
|
)
|
|
|
|
// KairosFS is our interface for methods that need an FS
|
|
type KairosFS interface {
|
|
Open(name string) (fs.File, error)
|
|
Chmod(name string, mode os.FileMode) error
|
|
Create(name string) (*os.File, error)
|
|
Mkdir(name string, perm os.FileMode) error
|
|
Stat(name string) (os.FileInfo, error)
|
|
Lstat(name string) (os.FileInfo, error)
|
|
RemoveAll(path string) error
|
|
ReadFile(filename string) ([]byte, error)
|
|
Readlink(name string) (string, error)
|
|
RawPath(name string) (string, error)
|
|
ReadDir(dirname string) ([]fs.DirEntry, error)
|
|
Remove(name string) error
|
|
OpenFile(name string, flag int, perm fs.FileMode) (*os.File, error)
|
|
WriteFile(filename string, data []byte, perm os.FileMode) error
|
|
Rename(oldpath, newpath string) error
|
|
Truncate(name string, size int64) error
|
|
Chown(name string, uid, git int) error
|
|
Chtimes(name string, atime, mtime time.Time) error
|
|
Glob(pattern string) ([]string, error)
|
|
Lchown(name string, uid, git int) error
|
|
Link(oldname, newname string) error
|
|
PathSeparator() rune
|
|
Symlink(oldname, newname string) error
|
|
}
|