configuration.go 752 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package configuration
  2. type Cfg struct {
  3. Http HttpCfg
  4. }
  5. type HttpCfg struct {
  6. Port string
  7. GoogleOAuth OAuthCfg
  8. GithubOAuth OAuthCfg
  9. }
  10. type OAuthCfg struct {
  11. Enabled bool
  12. ClientId string
  13. ClientSecret string
  14. }
  15. type DashboardSourceCfg struct {
  16. sourceType string
  17. path string
  18. }
  19. func NewCfg(port string) *Cfg {
  20. return &Cfg{
  21. Http: HttpCfg{
  22. Port: port,
  23. GoogleOAuth: OAuthCfg{
  24. Enabled: true,
  25. ClientId: "106011922963-4pvl05e9urtrm8bbqr0vouosj3e8p8kb.apps.googleusercontent.com",
  26. ClientSecret: "K2evIa4QhfbhhAm3SO72t2Zv",
  27. },
  28. GithubOAuth: OAuthCfg{
  29. Enabled: true,
  30. ClientId: "de054205006b9baa2e17",
  31. ClientSecret: "72b7ea52d9f1096fdf36cea95e95362a307e0322",
  32. },
  33. },
  34. }
  35. }