2015-03-04 21:07:02 +00:00
|
|
|
package db
|
|
|
|
|
2015-03-06 10:00:04 +00:00
|
|
|
type Team struct {
|
2015-03-06 11:18:15 +00:00
|
|
|
ID uint64 `json:"id"`
|
2015-03-06 10:00:04 +00:00
|
|
|
Owner string `json:"owner"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
|
|
|
const orgTeamsQuery = `select * from teams where owner = ?`
|
|
|
|
|
|
|
|
func OrgTeams(login string) (teams []*Team) {
|
|
|
|
if err := conn.Select(&teams, orgTeamsQuery, login); err != nil {
|
|
|
|
panic(err)
|
2015-03-04 21:07:02 +00:00
|
|
|
}
|
2015-03-06 10:00:04 +00:00
|
|
|
return
|
|
|
|
}
|