forked from FabianVowie/Lithium
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
401 B
28 lines
401 B
package settings
|
|
|
|
import "encoding/json"
|
|
|
|
const (
|
|
Local FileSystemType = iota
|
|
)
|
|
|
|
type FileSystemType int
|
|
|
|
type Settings struct {
|
|
Endpoint string
|
|
Token string
|
|
FileSystem FileSystemSettings
|
|
}
|
|
|
|
type FileSystemSettings struct {
|
|
Type FileSystemType
|
|
BasePath string
|
|
}
|
|
|
|
func ParseSettings(data []byte) Settings {
|
|
settings := Settings{}
|
|
|
|
json.Unmarshal(data, &settings)
|
|
|
|
return settings
|
|
}
|