创建配置系统框架。

Signed-off-by: rick.chan <cy@haoan119.com>
This commit is contained in:
rick.chan 2024-07-24 10:28:45 +08:00
parent d1eea393eb
commit 798f3319d4
2 changed files with 36 additions and 0 deletions

25
Config.go Normal file
View File

@ -0,0 +1,25 @@
package main
type Config struct{}
type ConfigJ struct {
Album ConfigAlbum `json:"album,omitempty"`
}
type ConfigAlbum struct {
Folder []AlbumFolder `json:"folder,omitempty"`
Virtual map[string]interface{} `json:"virtual,omitempty"`
}
type AlbumFolder struct {
Name string `json:"name,omitempty"`
Path string `json:"path"`
}
func (my *Config) Init() *Config {
return my
}
func (my *Config) Read() {}
func (my *Config) Write() {}

11
config.json Normal file
View File

@ -0,0 +1,11 @@
{
"album": {
"folder": [
{
"name": "name",
"path": ""
}
],
"virtual": []
}
}