Documentation ¶
Index ¶
- Variables
- type DBHandler
- type Database
- func (db Database) AddAdvisorToTeam(advisorMember model.TeamMember, teamId string) (model.Team, error)
- func (db Database) AddFounderToTeam(founderMember model.TeamMember, teamId string) (model.Team, error)
- func (db Database) AddMemberToGroup(memberId string, groupId string) (model.Group, error)
- func (db Database) AddTeamMemberToTeam(teamMember model.TeamMember, teamId string) (model.Team, error)
- func (db Database) CreateGroup(owner model.User, group model.Group) error
- func (db Database) CreateTeam(founder model.User, team model.Team) error
- func (db Database) CreateUser(user model.User) error
- func (db Database) DeleteGroupById(groupId string) (bool, error)
- func (db Database) DeleteTeamBasedOnParam(param string, query string) (bool, error)
- func (db Database) DeleteTeamById(teamId string) (bool, error)
- func (db Database) DeleteTeamByName(teamName string) (bool, error)
- func (db Database) DeleteTeamTeamByEmail(teamEmail string) (bool, error)
- func (db Database) DeleteUserBasedOnParam(param string, query string) (bool, error)
- func (db Database) DeleteUserByEmail(id string) (bool, error)
- func (db Database) DeleteUserById(id string) (bool, error)
- func (db Database) DeleteUserByUsername(id string) (bool, error)
- func (db Database) DoesTeamExist(searchParam string, query string) (bool, error)
- func (db Database) DoesUserExist(searchParam string, query string) (bool, error)
- func (db Database) GetAllTeams() ([]model.Team, error)
- func (db Database) GetAllTeamsFromSearchQuery(search map[string]interface{}) ([]model.Team, error)
- func (db Database) GetAllUsers() ([]model.User, error)
- func (db Database) GetAllUsersFromSearchQuery(query map[string]interface{}) ([]model.User, error)
- func (db Database) GetGroupBasedOnParam(param string, query string) (model.Group, error)
- func (db Database) GetGroupById(id string) (model.Group, error)
- func (db Database) GetGroupByName(name string) (model.Group, error)
- func (db Database) GetTeamBasedOnParam(param string, query string) (model.Team, error)
- func (db Database) GetTeamByID(id string) (model.Team, error)
- func (db Database) GetTeamByName(name string) (model.Team, error)
- func (db Database) GetTeamsByIndustry(industry string) ([]model.Team, error)
- func (db Database) GetTeamsByType(teamType string) (model.Team, error)
- func (db Database) GetUserBasedOnParam(param string, query string) (model.User, error)
- func (db Database) GetUserByEmail(email string) (model.User, error)
- func (db Database) GetUserById(id string) (model.User, error)
- func (db Database) GetUserByUsername(username string) (model.User, error)
- func (db Database) RemoveAdvisorFromTeam(advisorMember model.TeamMember, teamId string) (model.Team, error)
- func (db Database) RemoveFounderFromTeam(founderMember model.TeamMember, teamId string) (model.Team, error)
- func (db Database) RemoveMemberFromGroup(memberId string, groupId string) (model.Group, error)
- func (db Database) RemoveTeamMemberFromTeam(teamMember model.TeamMember, teamId string) (model.Team, error)
- func (db Database) UpdateTeamIndustry(industry string, teamId string) (model.Team, error)
- func (db Database) UpdateTeamName(name string, teamId string) (model.Team, error)
- func (db Database) UpdateTeamOverview(overView string, teamId string) (model.Team, error)
- func (db Database) UpdateTeamType(teamType string, teamId string) (model.Team, error)
- func (db Database) UpdateUser(param map[string]interface{}, id string) (model.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GetUserByIdQuery = "SELECT * FROM users_table WHERE id =$1" GetUserByUsernameQuery = "SELECT * FROM users_table WHERE username =$1" GetUserByEmailQuery = "SELECT * FROM users_table WHERE email =$1" )
Functions ¶
This section is empty.
Types ¶
type DBHandler ¶
type DBHandler interface { // Create CreateUser(user baseuser.User) error CreateTeam(founder baseuser.User, team baseteam.Team) error CreateGroup(owner baseuser.User, group group.Group) error // GET GetUserById(id string) (model.Team, error) GetUserByEmail(email string) (model.Team, error) GetUserByUsername(username string) (model.Team, error) GetPassword(id string) (string, error) GetAllUsers() ([]model.User, error) GetAllUsersFromSearchQuery(search map[string]interface{}) ([]model.User, error) GetUserBasedOnParam(param string, query string) (model.User, error) GetTeamByID(id string) (model.Team, error) GetTeamByName(name string) (model.Team, error) GetTeamsByType(teamType string) ([]model.Team, error) GetTeamsByIndustry(industry string) ([]model.Team, error) GetAllTeams() ([]model.Team, error) GetAllTeamsFromSearchQuery(search map[string]interface{}) ([]model.Team, error) GetTeamBasedOnParam(param string, query string) (model.Team, error) GetGroupBasedOnParam(param string, query string) (model.Group, error) GetGroupById(id string) (model.Group, error) GetGroupByName(name string) (model.Group, error) // Update UpdateUser(param map[string]interface{}, id string) (model.Team, error) UpdateTeamName(name string, teamId string) (model.Team, error) UpdateTeamType(teamType string, teamId string) (model.Team, error) UpdateTeamOverview(overView string, teamId string) (model.Team, error) AddTeamMemberToTeam(teamMember model.TeamMember, teamId string) (model.Team, error) RemoveTeamMemberFromTeam(teamMember model.TeamMember, teamId string) (model.Team, error) AddAdvisorToTeam(advisorMember model.TeamMember, teamId string) (model.Team, error) RemoveAdvisorFromTeam(advisorMember model.TeamMember, teamId string) (model.Team, error) AddFounderToTeam(advisorMember model.TeamMember, teamId string) (model.Team, error) RemoveFounderFromTeam(advisorMember model.TeamMember, teamId string) (model.Team, error) AddMemberToGroup(memberId string, groupId string) (model.Team, error) RemoveMemberFromGroup(memberId string, groupId string) (model.Team, error) // Delete DeleteUserById(id string) (bool, error) DeleteUserByUsername(id string) (bool, error) DeleteUserByEmail(id string) (bool, error) DeleteUserBasedOnParam(param string, query string) (bool, error) DeleteTeamById(teamId string) (bool, error) DeleteTeamByName(teamName string) (bool, error) DeleteTeamTeamByEmail(teamEmail string) (bool, error) DeleteTeamBasedOnParam(param string, query string) (bool, error) DeleteGroupById(teamId string) (bool, error) // Existence DoesUserExist(searchParam string, query string) (bool, error) DoesTeamExist(searchParam string, query string) (bool, error) // contains filtered or unexported methods }
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (Database) AddAdvisorToTeam ¶
func (Database) AddFounderToTeam ¶
func (Database) AddMemberToGroup ¶
func (Database) AddTeamMemberToTeam ¶
func (Database) CreateGroup ¶
func (Database) CreateTeam ¶
func (Database) CreateUser ¶
func (Database) DeleteTeamBasedOnParam ¶
func (Database) DeleteTeamByName ¶
func (Database) DeleteTeamTeamByEmail ¶
func (Database) DeleteUserBasedOnParam ¶
func (Database) DeleteUserByUsername ¶
func (Database) DoesTeamExist ¶
func (Database) DoesUserExist ¶
func (Database) GetAllTeams ¶
func (Database) GetAllTeamsFromSearchQuery ¶
func (Database) GetAllUsers ¶
func (Database) GetAllUsersFromSearchQuery ¶
func (Database) GetGroupBasedOnParam ¶
func (Database) GetGroupById ¶
func (Database) GetGroupByName ¶
func (Database) GetTeamBasedOnParam ¶
func (Database) GetTeamByID ¶
func (Database) GetTeamByName ¶
func (Database) GetTeamsByIndustry ¶
func (Database) GetTeamsByType ¶
func (Database) GetUserBasedOnParam ¶
func (Database) GetUserByEmail ¶
func (Database) GetUserById ¶
func (Database) GetUserByUsername ¶
func (Database) RemoveAdvisorFromTeam ¶
func (Database) RemoveFounderFromTeam ¶
func (Database) RemoveMemberFromGroup ¶
func (Database) RemoveTeamMemberFromTeam ¶
func (Database) UpdateTeamIndustry ¶
func (Database) UpdateTeamName ¶
func (Database) UpdateTeamOverview ¶
func (Database) UpdateTeamType ¶
Click to show internal directories.
Click to hide internal directories.