Micro-service for file storage and processing written in Go
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

  1. package settings
  2. import "encoding/json"
  3. const (
  4. Local FileSystemType = iota
  5. )
  6. type FileSystemType int
  7. type Settings struct {
  8. Endpoint string
  9. Token string
  10. FileSystem FileSystemSettings
  11. }
  12. type FileSystemSettings struct {
  13. Type FileSystemType
  14. BasePath string
  15. }
  16. func ParseSettings(data []byte) Settings {
  17. settings := Settings{}
  18. json.Unmarshal(data, &settings)
  19. return settings
  20. }