Documentation ¶
Index ¶
- func ComparePasswords(hashedPwd string, plainPwd []byte) bool
- func HashAndSalt(pwd []byte) (string, error)
- type APIKey
- type Alert
- type ApplicationStats
- type Battle
- type BattleUser
- type Config
- type Database
- func (d *Database) AbandonBattle(BattleID string, UserID string) ([]*BattleUser, error)
- func (d *Database) ActivatePlanVoting(BattleID string, UserID string, PlanID string) ([]*Plan, error)
- func (d *Database) AddBattleLeadersByEmail(BattleID string, UserID string, LeaderEmails []string) ([]string, error)
- func (d *Database) AddUserToBattle(BattleID string, UserID string) ([]*BattleUser, error)
- func (d *Database) AlertDelete(AlertID string) error
- func (d *Database) AlertsCreate(Name string, Type string, Content string, Active bool, AllowDismiss bool, ...) error
- func (d *Database) AlertsList(Limit int, Offset int) []interface{}
- func (d *Database) AlertsUpdate(ID string, Name string, Type string, Content string, Active bool, ...) error
- func (d *Database) AuthUser(UserEmail string, UserPassword string) (*User, error)
- func (d *Database) BurnPlan(BattleID string, UserID string, PlanID string) ([]*Plan, error)
- func (d *Database) CleanBattles(DaysOld int) error
- func (d *Database) CleanGuests(DaysOld int) error
- func (d *Database) ConfirmAdmin(UserID string) error
- func (d *Database) ConfirmLeader(BattleID string, UserID string) error
- func (d *Database) CreateBattle(LeaderID string, BattleName string, PointValuesAllowed []string, Plans []*Plan, ...) (*Battle, error)
- func (d *Database) CreatePlan(BattleID string, UserID string, PlanName string, PlanType string, ...) ([]*Plan, error)
- func (d *Database) CreateUserGuest(UserName string) (*User, error)
- func (d *Database) CreateUserRegistered(UserName string, UserEmail string, UserPassword string, ActiveUserID string) (NewUser *User, VerifyID string, RegisterErr error)
- func (d *Database) DeleteBattle(BattleID string, UserID string) error
- func (d *Database) DeleteUser(UserID string) error
- func (d *Database) DeleteUserAPIKey(UserID string, KeyID string) ([]*APIKey, error)
- func (d *Database) DemoteBattleLeader(BattleID string, UserID string, LeaderID string) ([]string, error)
- func (d *Database) DemoteUser(UserID string) error
- func (d *Database) DepartmentAddUser(DepartmentID string, UserID string, Role string) (string, error)
- func (d *Database) DepartmentCreate(OrgID string, OrgName string) (string, error)
- func (d *Database) DepartmentGet(DepartmentID string) (*Department, error)
- func (d *Database) DepartmentRemoveUser(DepartmentID string, UserID string) error
- func (d *Database) DepartmentTeamCreate(DepartmentID string, TeamName string) (string, error)
- func (d *Database) DepartmentTeamList(DepartmentID string, Limit int, Offset int) []*Team
- func (d *Database) DepartmentTeamUserRole(UserID string, OrgID string, DepartmentID string, TeamID string) (string, string, string, error)
- func (d *Database) DepartmentUserList(DepartmentID string, Limit int, Offset int) []*DepartmentUser
- func (d *Database) DepartmentUserRole(UserID string, OrgID string, DepartmentID string) (string, string, error)
- func (d *Database) EndPlanVoting(BattleID string, UserID string, PlanID string, AutoFinishVoting bool) ([]*Plan, error)
- func (d *Database) FinalizePlan(BattleID string, UserID string, PlanID string, PlanPoints string) ([]*Plan, error)
- func (d *Database) GenerateAPIKey(UserID string, KeyName string) (*APIKey, error)
- func (d *Database) GetAPIKeys(Limit int, Offset int) []*APIKey
- func (d *Database) GetActiveAlerts() []interface{}
- func (d *Database) GetActiveCountries() ([]string, error)
- func (d *Database) GetAppStats() (*ApplicationStats, error)
- func (d *Database) GetBattle(BattleID string, UserID string) (*Battle, error)
- func (d *Database) GetBattleActiveUsers(BattleID string) []*BattleUser
- func (d *Database) GetBattleUser(BattleID string, UserID string) (*BattleUser, error)
- func (d *Database) GetBattleUsers(BattleID string) []*BattleUser
- func (d *Database) GetBattlesByUser(UserID string) ([]*Battle, error)
- func (d *Database) GetPlans(BattleID string, UserID string) []*Plan
- func (d *Database) GetRegisteredUsers(Limit int, Offset int) []*User
- func (d *Database) GetUser(UserID string) (*User, error)
- func (d *Database) GetUserAPIKeys(UserID string) ([]*APIKey, error)
- func (d *Database) GetUserByEmail(UserEmail string) (*User, error)
- func (d *Database) HashAPIKey(apikey string) string
- func (d *Database) LowercaseUserEmails() ([]*User, error)
- func (d *Database) MergeDuplicateAccounts() ([]*User, error)
- func (d *Database) OrganizationAddUser(OrgID string, UserID string, Role string) (string, error)
- func (d *Database) OrganizationCreate(UserID string, OrgName string) (string, error)
- func (d *Database) OrganizationDepartmentList(OrgID string, Limit int, Offset int) []*Department
- func (d *Database) OrganizationGet(OrgID string) (*Organization, error)
- func (d *Database) OrganizationList(Limit int, Offset int) []*Organization
- func (d *Database) OrganizationListByUser(UserID string, Limit int, Offset int) []*Organization
- func (d *Database) OrganizationRemoveUser(OrganizationID string, UserID string) error
- func (d *Database) OrganizationTeamCreate(OrgID string, TeamName string) (string, error)
- func (d *Database) OrganizationTeamList(OrgID string, Limit int, Offset int) []*Team
- func (d *Database) OrganizationTeamUserRole(UserID string, OrgID string, TeamID string) (string, string, error)
- func (d *Database) OrganizationUserList(OrgID string, Limit int, Offset int) []*OrganizationUser
- func (d *Database) OrganizationUserRole(UserID string, OrgID string) (string, error)
- func (d *Database) PromoteUser(UserID string) error
- func (d *Database) RetractVote(BattleID string, UserID string, PlanID string) []*Plan
- func (d *Database) RetreatUser(BattleID string, UserID string) []*BattleUser
- func (d *Database) ReviseBattle(BattleID string, UserID string, BattleName string, PointValuesAllowed []string, ...) error
- func (d *Database) RevisePlan(BattleID string, UserID string, PlanID string, PlanName string, ...) ([]*Plan, error)
- func (d *Database) SetBattleLeader(BattleID string, UserID string, LeaderID string) ([]string, error)
- func (d *Database) SetVote(BattleID string, UserID string, PlanID string, VoteValue string) (BattlePlans []*Plan, AllUsersVoted bool)
- func (d *Database) SkipPlan(BattleID string, UserID string, PlanID string) ([]*Plan, error)
- func (d *Database) TeamAddBattle(TeamID string, BattleID string) error
- func (d *Database) TeamAddUser(TeamID string, UserID string, Role string) (string, error)
- func (d *Database) TeamBattleList(TeamID string, Limit int, Offset int) []*Battle
- func (d *Database) TeamCreate(UserID string, TeamName string) (string, error)
- func (d *Database) TeamDelete(TeamID string) error
- func (d *Database) TeamGet(TeamID string) (*Team, error)
- func (d *Database) TeamList(Limit int, Offset int) []*Team
- func (d *Database) TeamListByUser(UserID string, Limit int, Offset int) []*Team
- func (d *Database) TeamRemoveBattle(TeamID string, BattleID string) error
- func (d *Database) TeamRemoveUser(TeamID string, UserID string) error
- func (d *Database) TeamUserList(TeamID string, Limit int, Offset int) []*OrganizationUser
- func (d *Database) TeamUserRole(UserID string, TeamID string) (string, error)
- func (d *Database) ToggleSpectator(BattleID string, UserID string, Spectator bool) ([]*BattleUser, error)
- func (d *Database) UpdateUserAPIKey(UserID string, KeyID string, Active bool) ([]*APIKey, error)
- func (d *Database) UpdateUserProfile(UserID string, UserName string, UserAvatar string, NotificationsEnabled bool, ...) error
- func (d *Database) UserResetPassword(ResetID string, UserPassword string) (UserName string, UserEmail string, resetErr error)
- func (d *Database) UserResetRequest(UserEmail string) (resetID string, UserName string, resetErr error)
- func (d *Database) UserUpdatePassword(UserID string, UserPassword string) (Name string, Email string, resetErr error)
- func (d *Database) ValidateAPIKey(APK string) (UserID string, ValidatationErr error)
- func (d *Database) VerifyUserAccount(VerifyID string) error
- type Department
- type DepartmentUser
- type Organization
- type OrganizationUser
- type Plan
- type Team
- type TeamUser
- type User
- type Vote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePasswords ¶
ComparePasswords takes a password hash and compares it to entered password bytes returning true if matches false if not
func HashAndSalt ¶
HashAndSalt takes a password byte and salt + hashes it returning a hash string to store in db
Types ¶
type APIKey ¶ added in v1.2.0
type APIKey struct { ID string `json:"id"` Prefix string `json:"prefix"` UserID string `json:"warriorId"` Name string `json:"name"` Key string `json:"apiKey"` Active bool `json:"active"` CreatedDate time.Time `json:"createdDate"` UpdatedDate time.Time `json:"updatedDate"` }
APIKey structure
type Alert ¶ added in v1.10.0
type Alert struct { AlertID string `json:"id" db:"id"` Name string `json:"name" db:"name"` Type string `json:"type" db:"type"` Content string `json:"content" db:"content"` Active bool `json:"active" db:"active"` AllowDismiss bool `json:"allowDismiss" db:"allow_dismiss"` RegisteredOnly bool `json:"registeredOnly" db:"registered_only"` CreatedDate string `json:"createdDate" db:"created_date"` UpdatedDate string `json:"updatedDate" db:"updated_date"` }
type ApplicationStats ¶
type ApplicationStats struct { RegisteredCount int `json:"registeredUserCount"` UnregisteredCount int `json:"unregisteredUserCount"` BattleCount int `json:"battleCount"` PlanCount int `json:"planCount"` OrganizationCount int `json:"organizationCount"` DepartmentCount int `json:"departmentCount"` TeamCount int `json:"teamCount"` APIKeyCount int `json:"apikeyCount"` ActiveBattleCount int `json:"activeBattleCount"` ActiveBattleUserCount int `json:"activeBattleUserCount"` }
ApplicationStats includes user, organization, team, battle, and plan counts
type Battle ¶
type Battle struct { BattleID string `json:"id"` BattleName string `json:"name"` Users []*BattleUser `json:"warriors"` Plans []*Plan `json:"plans"` VotingLocked bool `json:"votingLocked"` ActivePlanID string `json:"activePlanId"` PointValuesAllowed []string `json:"pointValuesAllowed"` AutoFinishVoting bool `json:"autoFinishVoting"` Leaders []string `json:"leaders"` PointAverageRounding string `json:"pointAverageRounding"` }
Battle aka arena
type BattleUser ¶ added in v1.8.0
type BattleUser struct { UserID string `json:"id"` UserName string `json:"name"` UserType string `json:"rank"` UserAvatar string `json:"avatar"` Active bool `json:"active"` Abandoned bool `json:"abandoned"` Spectator bool `json:"spectator"` }
BattleUser aka user
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config holds all the configuration for the db
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database contains all the methods to interact with DB
func New ¶
New runs db migrations, sets up a db connection pool and sets previously active users to false during startup
func (*Database) AbandonBattle ¶
func (d *Database) AbandonBattle(BattleID string, UserID string) ([]*BattleUser, error)
AbandonBattle removes a user from the current battle by ID and sets abandoned true
func (*Database) ActivatePlanVoting ¶
func (d *Database) ActivatePlanVoting(BattleID string, UserID string, PlanID string) ([]*Plan, error)
ActivatePlanVoting sets the plan by ID to active, wipes any previous votes/points, and disables votingLock
func (*Database) AddBattleLeadersByEmail ¶ added in v1.16.0
func (d *Database) AddBattleLeadersByEmail(BattleID string, UserID string, LeaderEmails []string) ([]string, error)
AddBattleLeadersByEmail adds additional battle leaders using provided emails for matches
func (*Database) AddUserToBattle ¶ added in v1.8.0
func (d *Database) AddUserToBattle(BattleID string, UserID string) ([]*BattleUser, error)
AddUserToBattle adds a user by ID to the battle by ID
func (*Database) AlertDelete ¶ added in v1.10.0
AlertDelete deletes an alert
func (*Database) AlertsCreate ¶ added in v1.10.0
func (d *Database) AlertsCreate(Name string, Type string, Content string, Active bool, AllowDismiss bool, RegisteredOnly bool) error
AlertsCreate creates
func (*Database) AlertsList ¶ added in v1.10.0
AlertsList gets alerts from db for admin listing
func (*Database) AlertsUpdate ¶ added in v1.10.0
func (d *Database) AlertsUpdate(ID string, Name string, Type string, Content string, Active bool, AllowDismiss bool, RegisteredOnly bool) error
AlertsUpdate updates an alert
func (*Database) CleanBattles ¶ added in v1.4.0
CleanBattles deletes battles older than X days
func (*Database) CleanGuests ¶ added in v1.4.0
CleanGuests deletes guest users older than X days
func (*Database) ConfirmAdmin ¶
ConfirmAdmin confirms whether the users is infact an admin
func (*Database) ConfirmLeader ¶
ConfirmLeader confirms the user is infact leader of the battle
func (*Database) CreateBattle ¶
func (d *Database) CreateBattle(LeaderID string, BattleName string, PointValuesAllowed []string, Plans []*Plan, AutoFinishVoting bool, PointAverageRounding string) (*Battle, error)
CreateBattle adds a new battle to the db
func (*Database) CreatePlan ¶
func (d *Database) CreatePlan(BattleID string, UserID string, PlanName string, PlanType string, ReferenceID string, Link string, Description string, AcceptanceCriteria string) ([]*Plan, error)
CreatePlan adds a new plan to a battle
func (*Database) CreateUserGuest ¶ added in v1.8.0
CreateUserGuest adds a new guest user to the db
func (*Database) CreateUserRegistered ¶ added in v1.8.0
func (d *Database) CreateUserRegistered(UserName string, UserEmail string, UserPassword string, ActiveUserID string) (NewUser *User, VerifyID string, RegisterErr error)
CreateUserRegistered adds a new registered user to the db
func (*Database) DeleteBattle ¶
DeleteBattle removes all battle associations and the battle itself from DB by BattleID
func (*Database) DeleteUser ¶ added in v1.8.0
UpdateUserProfile attempts to delete a user
func (*Database) DeleteUserAPIKey ¶ added in v1.8.0
DeleteUserAPIKey removes a users api key
func (*Database) DemoteBattleLeader ¶ added in v1.6.0
func (d *Database) DemoteBattleLeader(BattleID string, UserID string, LeaderID string) ([]string, error)
DemoteBattleLeader removes a user from battle leaders
func (*Database) DemoteUser ¶ added in v1.8.0
DemoteUser demotes a user to registered type
func (*Database) DepartmentAddUser ¶ added in v1.8.0
func (d *Database) DepartmentAddUser(DepartmentID string, UserID string, Role string) (string, error)
DepartmentAddUser adds a user to an organization department
func (*Database) DepartmentCreate ¶ added in v1.8.0
DepartmentCreate creates an organization department
func (*Database) DepartmentGet ¶ added in v1.8.0
func (d *Database) DepartmentGet(DepartmentID string) (*Department, error)
DepartmentGet gets a department
func (*Database) DepartmentRemoveUser ¶ added in v1.8.0
DepartmentRemoveUser removes a user from a department (and department teams)
func (*Database) DepartmentTeamCreate ¶ added in v1.8.0
DepartmentTeamCreate creates a department team
func (*Database) DepartmentTeamList ¶ added in v1.8.0
DepartmentTeamList gets a list of department teams
func (*Database) DepartmentTeamUserRole ¶ added in v1.8.0
func (d *Database) DepartmentTeamUserRole(UserID string, OrgID string, DepartmentID string, TeamID string) (string, string, string, error)
DepartmentTeamUserRole gets a users role in organization department team
func (*Database) DepartmentUserList ¶ added in v1.8.0
func (d *Database) DepartmentUserList(DepartmentID string, Limit int, Offset int) []*DepartmentUser
DepartmentUserList gets a list of department users
func (*Database) DepartmentUserRole ¶ added in v1.8.0
func (d *Database) DepartmentUserRole(UserID string, OrgID string, DepartmentID string) (string, string, error)
DepartmentUserRole gets a users role in department (and organization)
func (*Database) EndPlanVoting ¶
func (d *Database) EndPlanVoting(BattleID string, UserID string, PlanID string, AutoFinishVoting bool) ([]*Plan, error)
EndPlanVoting sets plan to active: false
func (*Database) FinalizePlan ¶
func (d *Database) FinalizePlan(BattleID string, UserID string, PlanID string, PlanPoints string) ([]*Plan, error)
FinalizePlan sets plan to active: false
func (*Database) GenerateAPIKey ¶ added in v1.2.0
GenerateAPIKey generates a new API key for a User
func (*Database) GetAPIKeys ¶ added in v1.9.0
GetAPIKeys gets a list of api keys
func (*Database) GetActiveAlerts ¶ added in v1.10.0
func (d *Database) GetActiveAlerts() []interface{}
GetActiveAlerts gets alerts from db for UI display
func (*Database) GetActiveCountries ¶ added in v1.10.0
GetActiveCountries gets a list of user countries
func (*Database) GetAppStats ¶
func (d *Database) GetAppStats() (*ApplicationStats, error)
GetAppStats gets counts of users (registered and unregistered), battles, and plans
func (*Database) GetBattleActiveUsers ¶ added in v1.8.0
func (d *Database) GetBattleActiveUsers(BattleID string) []*BattleUser
GetBattleActiveUsers retrieves the active users for a given battle from db
func (*Database) GetBattleUser ¶ added in v1.8.0
func (d *Database) GetBattleUser(BattleID string, UserID string) (*BattleUser, error)
GetBattleUser gets a user from db by ID and checks battle active status
func (*Database) GetBattleUsers ¶ added in v1.8.0
func (d *Database) GetBattleUsers(BattleID string) []*BattleUser
GetBattleUsers retrieves the users for a given battle from db
func (*Database) GetBattlesByUser ¶ added in v1.8.0
GetBattlesByUser gets a list of battles by UserID
func (*Database) GetRegisteredUsers ¶ added in v1.8.0
GetRegisteredUsers retrieves the registered users from db
func (*Database) GetUserAPIKeys ¶ added in v1.8.0
GetUserAPIKeys gets a list of api keys for a user
func (*Database) GetUserByEmail ¶ added in v1.8.0
GetUserByEmail gets the user by email
func (*Database) HashAPIKey ¶ added in v1.2.0
HashAPIKey hashes the API key using SHA256 (not reversible)
func (*Database) LowercaseUserEmails ¶ added in v1.13.0
LowercaseUserEmails goes through and lowercases any user email that has any uppercase letters returning the list of updated users
func (*Database) MergeDuplicateAccounts ¶ added in v1.13.0
MergeDuplicateAccounts goes through and merges any user accounts with duplicate emails that has any uppercase letters returning the list of merged users
func (*Database) OrganizationAddUser ¶ added in v1.8.0
OrganizationAddUser adds a user to an organization
func (*Database) OrganizationCreate ¶ added in v1.8.0
OrganizationCreate creates an organization
func (*Database) OrganizationDepartmentList ¶ added in v1.8.0
func (d *Database) OrganizationDepartmentList(OrgID string, Limit int, Offset int) []*Department
OrganizationDepartmentList gets a list of organization departments
func (*Database) OrganizationGet ¶ added in v1.8.0
func (d *Database) OrganizationGet(OrgID string) (*Organization, error)
OrganizationGet gets an organization
func (*Database) OrganizationList ¶ added in v1.8.0
func (d *Database) OrganizationList(Limit int, Offset int) []*Organization
OrganizationList gets a list of organizations
func (*Database) OrganizationListByUser ¶ added in v1.8.0
func (d *Database) OrganizationListByUser(UserID string, Limit int, Offset int) []*Organization
OrganizationList gets a list of organizations the user is apart of
func (*Database) OrganizationRemoveUser ¶ added in v1.8.0
OrganizationRemoveUser removes a user from a organization
func (*Database) OrganizationTeamCreate ¶ added in v1.8.0
OrganizationTeamCreate creates an organization team
func (*Database) OrganizationTeamList ¶ added in v1.8.0
OrganizationTeamList gets a list of organization teams
func (*Database) OrganizationTeamUserRole ¶ added in v1.8.0
func (d *Database) OrganizationTeamUserRole(UserID string, OrgID string, TeamID string) (string, string, error)
OrganizationTeamUserRole gets a users role in organization team
func (*Database) OrganizationUserList ¶ added in v1.8.0
func (d *Database) OrganizationUserList(OrgID string, Limit int, Offset int) []*OrganizationUser
OrganizationUserList gets a list of organization users
func (*Database) OrganizationUserRole ¶ added in v1.8.0
OrganizationUserRole gets a users role in organization
func (*Database) PromoteUser ¶ added in v1.8.0
PromoteUser promotes a user to admin type
func (*Database) RetractVote ¶
RetractVote removes a users vote for the plan
func (*Database) RetreatUser ¶ added in v1.8.0
func (d *Database) RetreatUser(BattleID string, UserID string) []*BattleUser
RetreatUser removes a user from the current battle by ID
func (*Database) ReviseBattle ¶
func (d *Database) ReviseBattle(BattleID string, UserID string, BattleName string, PointValuesAllowed []string, AutoFinishVoting bool, PointAverageRounding string) error
ReviseBattle updates the battle by ID
func (*Database) RevisePlan ¶
func (d *Database) RevisePlan(BattleID string, UserID string, PlanID string, PlanName string, PlanType string, ReferenceID string, Link string, Description string, AcceptanceCriteria string) ([]*Plan, error)
RevisePlan updates the plan by ID
func (*Database) SetBattleLeader ¶
func (d *Database) SetBattleLeader(BattleID string, UserID string, LeaderID string) ([]string, error)
SetBattleLeader sets the leaderId for the battle
func (*Database) SetVote ¶
func (d *Database) SetVote(BattleID string, UserID string, PlanID string, VoteValue string) (BattlePlans []*Plan, AllUsersVoted bool)
SetVote sets a users vote for the plan
func (*Database) TeamAddBattle ¶ added in v1.8.0
TeamAddBattle adds a battle to a team
func (*Database) TeamAddUser ¶ added in v1.8.0
TeamAddUser adds a user to a team
func (*Database) TeamBattleList ¶ added in v1.8.0
TeamBattleList gets a list of team battles
func (*Database) TeamCreate ¶ added in v1.8.0
TTeamCreate creates a team with current user as an ADMIN
func (*Database) TeamDelete ¶ added in v1.8.0
TeamDelete deletes a team
func (*Database) TeamListByUser ¶ added in v1.8.0
TeamListByUser gets a list of teams the user is on
func (*Database) TeamRemoveBattle ¶ added in v1.8.0
TeamRemoveBattle removes a battle from a team
func (*Database) TeamRemoveUser ¶ added in v1.8.0
TeamRemoveUser removes a user from a team
func (*Database) TeamUserList ¶ added in v1.8.0
func (d *Database) TeamUserList(TeamID string, Limit int, Offset int) []*OrganizationUser
TeamUserList gets a list of team users
func (*Database) TeamUserRole ¶ added in v1.8.0
TeamUserRole gets a users role in team
func (*Database) ToggleSpectator ¶ added in v1.14.1
func (*Database) UpdateUserAPIKey ¶ added in v1.8.0
UpdateUserAPIKey updates a user api key (active column only)
func (*Database) UpdateUserProfile ¶ added in v1.8.0
func (d *Database) UpdateUserProfile(UserID string, UserName string, UserAvatar string, NotificationsEnabled bool, Country string, Locale string, Company string, JobTitle string) error
UpdateUserProfile attempts to update the users profile
func (*Database) UserResetPassword ¶ added in v1.8.0
func (d *Database) UserResetPassword(ResetID string, UserPassword string) (UserName string, UserEmail string, resetErr error)
UserResetPassword attempts to reset a users password
func (*Database) UserResetRequest ¶ added in v1.8.0
func (d *Database) UserResetRequest(UserEmail string) (resetID string, UserName string, resetErr error)
UserResetRequest inserts a new user reset request
func (*Database) UserUpdatePassword ¶ added in v1.8.0
func (d *Database) UserUpdatePassword(UserID string, UserPassword string) (Name string, Email string, resetErr error)
UserUpdatePassword attempts to update a users password
func (*Database) ValidateAPIKey ¶ added in v1.2.0
ValidateAPIKey checks to see if the API key exists in the database and if so returns UserID
func (*Database) VerifyUserAccount ¶ added in v1.8.0
VerifyUserAccount attempts to verify a users account email
type Department ¶ added in v1.8.0
type DepartmentUser ¶ added in v1.8.0
type Organization ¶ added in v1.8.0
type Organization struct { OrganizationID string `json:"id"` Name string `json:"name"` CreatedDate string `json:"createdDate"` UpdatedDate string `json:"updatedDate"` }
Organization can be a company
type OrganizationUser ¶ added in v1.8.0
type Plan ¶
type Plan struct { PlanID string `json:"id"` PlanName string `json:"name"` Type string `json:"type"` ReferenceID string `json:"referenceId"` Link string `json:"link"` Description string `json:"description"` AcceptanceCriteria string `json:"acceptanceCriteria"` Votes []*Vote `json:"votes"` Points string `json:"points"` PlanActive bool `json:"active"` PlanSkipped bool `json:"skipped"` VoteStartTime time.Time `json:"voteStartTime"` VoteEndTime time.Time `json:"voteEndTime"` }
Plan aka Story structure
type User ¶ added in v1.8.0
type User struct { UserID string `json:"id"` UserName string `json:"name"` UserEmail string `json:"email"` UserType string `json:"rank"` UserAvatar string `json:"avatar"` Verified bool `json:"verified"` NotificationsEnabled bool `json:"notificationsEnabled"` Country string `json:"country"` Locale string `json:"locale"` Company string `json:"company"` JobTitle string `json:"jobTitle"` }
User aka user