创建配置系统框架。
Signed-off-by: rick.chan <cy@haoan119.com>
This commit is contained in:
parent
d1eea393eb
commit
798f3319d4
25
Config.go
Normal file
25
Config.go
Normal 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
11
config.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"album": {
|
||||
"folder": [
|
||||
{
|
||||
"name": "name",
|
||||
"path": ""
|
||||
}
|
||||
],
|
||||
"virtual": []
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user