1
0
mirror of https://github.com/fumiama/imago.git synced 2026-06-05 00:10:26 +08:00

add funcs in storage instance

This commit is contained in:
fumiama
2022-01-06 16:24:07 +08:00
parent 8ce09fa76d
commit d32e0e45f6
3 changed files with 23 additions and 0 deletions

View File

@@ -120,3 +120,13 @@ func (ns *NativeStorage) ScanImgs(imgdir string) error {
}
return nil
}
// SaveConf Save config file into storage
func (ns *NativeStorage) SaveConf(data []byte) error {
return os.WriteFile("conf.pb", data, 0644)
}
// SaveConf Save config file into storage
func (ns *NativeStorage) GetConf() ([]byte, error) {
return os.ReadFile("conf.pb")
}