config.go 766 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package core
  2. import (
  3. "time"
  4. "dev.hexasoftware.com/hxs/cloudmount/internal/coreutil"
  5. )
  6. // Config struct
  7. type Config struct {
  8. Daemonize bool
  9. Type string
  10. VerboseLog bool
  11. Verbose2Log bool
  12. RefreshTime time.Duration
  13. HomeDir string
  14. Target string // should be a folder
  15. Source string
  16. //Options map[string]string
  17. Options Options
  18. }
  19. // Options are specified in cloudmount -o option1=1, option2=2
  20. type Options struct { // are Options for specific driver?
  21. // Sub options
  22. UID uint32 `opt:"uid"`
  23. GID uint32 `opt:"gid"` // Mount GID
  24. Readonly bool `opt:"ro"`
  25. }
  26. func (o Options) String() string {
  27. return coreutil.OptionString(o)
  28. }
  29. func (o Options) ToMap() map[string]string {
  30. // Convert to map
  31. return map[string]string{}
  32. }