pacmanconf.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package pacmanconf
  2. type Repository struct {
  3. Name string
  4. Servers []string
  5. SigLevel []string
  6. Usage []string
  7. }
  8. type Config struct {
  9. RootDir string
  10. DBPath string
  11. CacheDir []string
  12. HookDir []string
  13. GPGDir string
  14. LogFile string
  15. HoldPkg []string
  16. IgnorePkg []string
  17. IgnoreGroup []string
  18. Architecture string
  19. XferCommand string
  20. NoUpgrade []string
  21. NoExtract []string
  22. CleanMethod []string
  23. SigLevel []string
  24. LocalFileSigLevel []string
  25. RemoteFileSigLevel []string
  26. UseSyslog bool
  27. Color bool
  28. UseDelta float64
  29. TotalDownload bool
  30. CheckSpace bool
  31. VerbosePkgLists bool
  32. DisableDownloadTimeout bool
  33. Repos []Repository
  34. }
  35. func (conf *Config) Repository(name string) *Repository {
  36. for _, repo := range conf.Repos {
  37. if repo.Name == name {
  38. return &repo
  39. }
  40. }
  41. return nil
  42. }