kairos-sdk/types/fs.go
Itxaka a0c7d13520
Port signature utils to sdk from agent (#117)
It was added first to agent as it was needed for upgrade but if we are
gonna reuse this to check for signature validity in random files, we
better have it on sdk so we can use it both on agent and immucore and
works exactly the same

Signed-off-by: Itxaka <itxaka@kairos.io>
2024-06-04 08:31:00 +02:00

16 lines
349 B
Go

package types
import (
"io/fs"
"os"
)
// KairosFS is our interface for methods that need an FS
type KairosFS interface {
ReadFile(filename string) ([]byte, error)
Stat(name string) (fs.FileInfo, error)
Open(name string) (fs.File, error)
RawPath(name string) (string, error)
WriteFile(filename string, data []byte, perm os.FileMode) error
}