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:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user