Documentation
¶
Index ¶
- Constants
- Variables
- func AddressCreate(address models.Address) int64
- func AddressDelete(address_id int64) int64
- func AddressRead(address_id int64) models.Address
- func AddressUpdate(address models.Address) int64
- func AdvisorCreate(advisor models.Advisor) int64
- func AdvisorDelete(advisor_id int64) int64
- func AdvisorGetAllSchools(advisor_id int64) []int64
- func AdvisorRead(advisor_id int64) models.Advisor
- func AdvisorReadAll() []*models.Advisor
- func AdvisorReadByEmail(email string) models.Advisor
- func AdvisorUpdate(advisor models.Advisor) int64
- func CredentialCreate(credential models.Credential) int64
- func CredentialDelete(emailaddress string) int64
- func CredentialRead(emailaddress string) *models.Credential
- func CredentialUpdate(emailaddress string, password string, credential_active bool) int64
- func FindAddress(address_zip *string, address_line1 *string) models.Address
- func ProblemCreate(problem models.Problem) models.Error
- func ProblemDelete(problem_id int64) int64
- func ProblemRead(problem_id int64) models.Problem
- func ProblemReadList() []*models.Problem
- func ProblemUpdate(problem models.Problem) int64
- func SchoolAddAdvisor(school_id int64, advisor_id int64) bool
- func SchoolCreate(school models.School) int64
- func SchoolDelete(school_id int64) int64
- func SchoolDeleteAdvisor(school_id int64, advisor_id int64) bool
- func SchoolList(params school.GetSchoolParams) []*models.School
- func SchoolRead(school_id int64) models.School
- func SchoolReadAdvisor(school_id int64) int64
- func SchoolUpdate(school models.School) int64
- func SessionCreate(principal *models.Principal) models.Error
- func SessionDelete(email string) int64
- func SessionRead(email string) *models.Principal
- func SolutionCreate(solution models.Solution) int64
- func SolutionDelete(solution_id int64) int64
- func SolutionForProblem(problem_id int64) []*models.Solution
- func SolutionRead(solution_id int64) models.Solution
- func SolutionUpdate(solution models.Solution) int64
- func StudentCreate(student models.Student) int64
- func StudentDelete(student_id int64) int64
- func StudentListBySchool(school_id int64) []*models.Student
- func StudentRead(student_id int64) models.Student
- func StudentUpdate(student models.Student) int64
- func TeamAddMember(team_id int64, student_id int64) bool
- func TeamCreate(team models.Team) int64
- func TeamDelete(team_id int64) int64
- func TeamDeleteMember(team_id int64, student_id int64) bool
- func TeamListForSchool(school_id int64) []int64
- func TeamRead(team_id int64) models.Team
- func TeamReadMembers(team_id int64) []int64
- func TeamUpdate(team models.Team) int64
Constants ¶
const (
MAX_STUDENT_PER_TEAM = 4
)
const (
Session_Collection_Name = "Session"
)
const (
Solution_Collection_Name = "Solutions"
)
Variables ¶
var ( POSTGRES_HOST = os.Getenv("POSTGRES_HOST") POSTGRES_DB = os.Getenv("POSTGRES_DB") POSTGRES_USER = os.Getenv("POSTGRES_USER") POSTGRES_PASSWORD = os.Getenv("POSTGRES_PASSWORD") )
var ( MONGO_DB_HOST = os.Getenv("MONGO_DB_HOST") MONGO_DB_USER = os.Getenv("MONGO_DB_USER") MONGO_DB_PASSWORD = os.Getenv("MONGO_DB_PASSWORD") MONGO_AUTH_DB = os.Getenv("MONGO_DB_AUTH_DB") Problem_Collection_Name = "Problems" )
TODO: Read from config file
Functions ¶
func AddressDelete ¶
func AddressRead ¶
func AddressUpdate ¶
func AdvisorDelete ¶
func AdvisorGetAllSchools ¶
* Given an AdvisorID, find all Schools
func AdvisorRead ¶
func AdvisorReadAll ¶
func AdvisorReadByEmail ¶
func AdvisorUpdate ¶
func CredentialDelete ¶
func CredentialRead ¶
func CredentialRead(emailaddress string) *models.Credential
func CredentialUpdate ¶
func FindAddress ¶
* Given zipcode and address line 1 we should be able to find an address. We assume that unlike houses/apartments there cannot be two schools at same zip code (state and city) and same address line1.
func ProblemCreate ¶
Problem
For experiment purpose, create return an model.Error instead of error code. We want to see if that helps in reducing the logic at requesthandler side.
func ProblemDelete ¶
func ProblemRead ¶
func ProblemReadList ¶
func ProblemUpdate ¶
func SchoolDelete ¶
func SchoolDeleteAdvisor ¶
* SchoolDeleteAdvisor deletes an Advisor from a School
func SchoolList ¶
func SchoolList(params school.GetSchoolParams) []*models.School
func SchoolRead ¶
func SchoolReadAdvisor ¶
* Given a school_id, get the advisor for the School.
func SchoolUpdate ¶
func SessionDelete ¶
func SessionRead ¶
func SolutionDelete ¶
func SolutionForProblem ¶
* Given an ProblemID find all related solutions.
func SolutionRead ¶
func SolutionUpdate ¶
func StudentDelete ¶
func StudentListBySchool ¶
* StudentListBySchool Finds and returns all Student who belongs to a School
func StudentRead ¶
func StudentUpdate ¶
func TeamAddMember ¶
Add a Student to a team
func TeamDelete ¶
func TeamDeleteMember ¶
func TeamListForSchool ¶
* Get the list of Teams for a School
func TeamReadMembers ¶
func TeamUpdate ¶
Types ¶
This section is empty.
Source Files
¶
- address_db_handler.go
- advisor_db_handler.go
- credential_db_handler.go
- get_postgres_connection.go
- parking_db_handler.go
- problem_db_handler.go
- school_advisor_db_handler.go
- school_db_handler.go
- session_db_handler.go
- solution_db_handler.go
- student_db_handler.go
- students_team_db_handler.go
- team_db_handler.go
- team_score_db_handler.go