settings.go 808 B

1234567891011121314151617181920212223242526272829
  1. package settings
  2. import "github.com/jinzhu/gorm"
  3. var DB *gorm.DB
  4. const (
  5. TimeLayout = "15:04"
  6. dateLayout = ""
  7. login = "dbuser"
  8. password = "QWEasd123"
  9. ipaddr = "192.168.10.14"
  10. port = "3306"
  11. dbname = "Schedule"
  12. protocol = "tcp"
  13. args = "parseTime=true&charset=utf8&loc=Local"
  14. CONSTR = login + ":" + password + "@" + protocol + "(" + ipaddr + ":" + port + ")/" + dbname + "?" + args
  15. // clientLDAP= &ldap.LDAPClient{
  16. // Base: "dc=ttit,dc=local",
  17. // Host: "ttit.local",
  18. // Port: 389,
  19. // UseSSL: false,
  20. // BindDN: "uid=User,ou=People,dc=ttit,dc=local",
  21. // BindPassword: "Password",
  22. // UserFilter: "(uid=%s)",
  23. // GroupFilter: "(memberUid=%s)",
  24. // Attributes: []string{"givenName", "sn", "mail", "uid"},
  25. // }
  26. )