21 lines
363 B
Go
21 lines
363 B
Go
package db
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Team struct {
|
|
ID uint64 `json:"id"`
|
|
Slug string `json:"slug"`
|
|
Owner string `json:"owner"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
const orgTeamsQuery = `select * from teams where owner = ?`
|
|
|
|
func OrgTeams(login string) (teams []*Team) {
|
|
defer measure("OrgTeams", time.Now())
|
|
mustSelect(&teams, orgTeamsQuery, login)
|
|
return
|
|
}
|