Documentation
¶
Index ¶
- func ComparePasswords(hashedPwd string, plainPwd []byte) bool
- func HashAndSalt(pwd []byte) (string, error)
- type APIKey
- type Alert
- type ApplicationStats
- type Color
- type Config
- type Database
- func (d *Database) AbandonRetrospective(RetrospectiveID string, UserID string) ([]*RetrospectiveUser, error)
- func (d *Database) AddUserToRetrospective(RetrospectiveID string, UserID string) ([]*RetrospectiveUser, 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) CleanGuests(DaysOld int) error
- func (d *Database) CleanRetrospectives(DaysOld int) error
- func (d *Database) ConfirmAdmin(AdminID string) error
- func (d *Database) ConfirmOwner(RetrospectiveID string, userID string) error
- func (d *Database) CreateRetrospective(OwnerID string, RetrospectiveName string) (*Retrospective, error)
- func (d *Database) CreateRetrospectiveAction(RetrospectiveID string, UserID string, Content string) ([]*RetrospectiveAction, error)
- func (d *Database) CreateRetrospectiveItemImprove(RetrospectiveID string, UserID string, Content string) ([]*RetrospectiveItem, error)
- func (d *Database) CreateRetrospectiveItemQuestion(RetrospectiveID string, UserID string, Content string) ([]*RetrospectiveItem, error)
- func (d *Database) CreateRetrospectiveItemWorked(RetrospectiveID string, UserID string, Content string) ([]*RetrospectiveItem, 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) DeleteRetrospective(RetrospectiveID string, userID string) error
- func (d *Database) DeleteRetrospectiveAction(RetrospectiveID string, userID string, ActionID string) ([]*RetrospectiveAction, error)
- func (d *Database) DeleteRetrospectiveItem(RetrospectiveID string, userID string, ItemID string) (WorkedItems []*RetrospectiveItem, ImproveItems []*RetrospectiveItem, ...)
- func (d *Database) DeleteUser(UserID string) error
- func (d *Database) DeleteUserAPIKey(UserID string, KeyID string) ([]*APIKey, 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) FilterItemsByUser(UserID string, Items []*RetrospectiveItem) []*RetrospectiveItem
- 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) GetRegisteredUsers(Limit int, Offset int) []*User
- func (d *Database) GetRetrospective(RetrospectiveID string) (*Retrospective, error)
- func (d *Database) GetRetrospectiveActions(RetrospectiveID string) []*RetrospectiveAction
- func (d *Database) GetRetrospectiveItems(RetrospectiveID string) (Worked []*RetrospectiveItem, Improve []*RetrospectiveItem, ...)
- func (d *Database) GetRetrospectiveUser(RetrospectiveID string, UserID string) (*RetrospectiveUser, error)
- func (d *Database) GetRetrospectiveUsers(RetrospectiveID string) []*RetrospectiveUser
- func (d *Database) GetRetrospectivesByUser(UserID string) ([]*Retrospective, error)
- 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) NestRetrospectiveItem(RetrospectiveID string, userID string, ItemID string, ParentID string) (WorkedItems []*RetrospectiveItem, ImproveItems []*RetrospectiveItem, ...)
- 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) RetreatUser(RetrospectiveID string, UserID string) []*RetrospectiveUser
- func (d *Database) RetrospectiveAdvancePhase(RetrospectiveID string, userID string, Phase int) (*Retrospective, error)
- func (d *Database) SetRetrospectiveOwner(RetrospectiveID string, userID string, OwnerID string) (*Retrospective, error)
- func (d *Database) TeamAddRetrospective(TeamID string, RetrospectiveID string) error
- func (d *Database) TeamAddUser(TeamID string, UserID string, Role string) (string, error)
- 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) TeamRemoveRetrospective(TeamID string, RetrospectiveID string) error
- func (d *Database) TeamRemoveUser(TeamID string, UserID string) error
- func (d *Database) TeamRetrospectiveList(TeamID string, Limit int, Offset int) []*Retrospective
- func (d *Database) TeamUserList(TeamID string, Limit int, Offset int) []*OrganizationUser
- func (d *Database) TeamUserRole(UserID string, TeamID string) (string, error)
- func (d *Database) UnNestRetrospectiveItem(RetrospectiveID string, userID string, ItemID string) (WorkedItems []*RetrospectiveItem, ImproveItems []*RetrospectiveItem, ...)
- func (d *Database) UpdateUserAPIKey(UserID string, KeyID string, Active bool) ([]*APIKey, error)
- func (d *Database) UpdateUserProfile(UserID string, UserName string, UserAvatar string, Country string, ...) error
- func (d *Database) UpdatedRetrospectiveAction(RetrospectiveID string, userID string, ActionID string, Completed bool) (Actions []*RetrospectiveAction, DeleteError 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) (userName string, userEmail string, resetErr error)
- func (d *Database) ValidateAPIKey(APK string) (UserID string, ValidatationErr error)
- func (d *Database) VerifyUserAccount(VerifyID string) error
- func (d *Database) VoteRetrospectiveItem(RetrospectiveID string, userID string, ItemID string) (WorkedItems []*RetrospectiveItem, ImproveItems []*RetrospectiveItem, ...)
- type Department
- type DepartmentUser
- type Organization
- type OrganizationUser
- type Retrospective
- type RetrospectiveAction
- type RetrospectiveItem
- type RetrospectiveUser
- type Team
- type TeamUser
- type User
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 ¶
type APIKey struct { ID string `json:"id"` Prefix string `json:"prefix"` UserID string `json:"userId"` 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 ¶
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"` RetrospectiveCount int `json:"retrospectiveCount"` OrganizationCount int `json:"organizationCount"` DepartmentCount int `json:"departmentCount"` TeamCount int `json:"teamCount"` APIKeyCount int `json:"apikeyCount"` ActiveRetroCount int `json:"activeRetroCount"` ActiveRetroUserCount int `json:"activeRetroUserCount"` }
ApplicationStats includes user, retrospective counts
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) AbandonRetrospective ¶
func (d *Database) AbandonRetrospective(RetrospectiveID string, UserID string) ([]*RetrospectiveUser, error)
AbandonRetrospective removes a user from the current retrospective by ID and sets abandoned true
func (*Database) AddUserToRetrospective ¶
func (d *Database) AddUserToRetrospective(RetrospectiveID string, UserID string) ([]*RetrospectiveUser, error)
AddUserToRetrospective adds a user by ID to the retrospective by ID
func (*Database) AlertDelete ¶
AlertDelete deletes an alert
func (*Database) AlertsCreate ¶
func (d *Database) AlertsCreate(Name string, Type string, Content string, Active bool, AllowDismiss bool, RegisteredOnly bool) error
AlertsCreate creates
func (*Database) AlertsList ¶
AlertsList gets alerts from db for admin listing
func (*Database) AlertsUpdate ¶
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) CleanGuests ¶
CleanGuests deletes guest users older than X days
func (*Database) CleanRetrospectives ¶
CleanRetrospectives deletes retrospectives older than X days
func (*Database) ConfirmAdmin ¶
ConfirmAdmin confirms whether the user is infact a ADMIN
func (*Database) ConfirmOwner ¶
ConfirmOwner confirms the user is infact owner of the retrospective
func (*Database) CreateRetrospective ¶
func (d *Database) CreateRetrospective(OwnerID string, RetrospectiveName string) (*Retrospective, error)
CreateRetrospective adds a new retrospective to the db
func (*Database) CreateRetrospectiveAction ¶
func (d *Database) CreateRetrospectiveAction(RetrospectiveID string, UserID string, Content string) ([]*RetrospectiveAction, error)
CreateRetroAction adds a new action to the retrospective
func (*Database) CreateRetrospectiveItemImprove ¶
func (d *Database) CreateRetrospectiveItemImprove(RetrospectiveID string, UserID string, Content string) ([]*RetrospectiveItem, error)
CreateRetrospectiveItemImprove adds a improve item to the retrospective
func (*Database) CreateRetrospectiveItemQuestion ¶
func (d *Database) CreateRetrospectiveItemQuestion(RetrospectiveID string, UserID string, Content string) ([]*RetrospectiveItem, error)
CreateRetrospectiveItemQuestion adds a question item to the retrospective
func (*Database) CreateRetrospectiveItemWorked ¶
func (d *Database) CreateRetrospectiveItemWorked(RetrospectiveID string, UserID string, Content string) ([]*RetrospectiveItem, error)
CreateRetrospectiveItemWorked adds a worked item to the retrospective
func (*Database) CreateUserGuest ¶
CreateUserGuest adds a new user guest to the db
func (*Database) CreateUserRegistered ¶
func (d *Database) CreateUserRegistered(UserName string, UserEmail string, UserPassword string, ActiveUserID string) (NewUser *User, VerifyID string, RegisterErr error)
CreateUserRegistered adds a new user registered to the db
func (*Database) DeleteRetrospective ¶
DeleteRetrospective removes all retrospective associations and the retrospective itself from DB by RetrospectiveID
func (*Database) DeleteRetrospectiveAction ¶
func (d *Database) DeleteRetrospectiveAction(RetrospectiveID string, userID string, ActionID string) ([]*RetrospectiveAction, error)
DeleteRetrospectiveAction removes a goal from the current board by ID
func (*Database) DeleteRetrospectiveItem ¶
func (d *Database) DeleteRetrospectiveItem(RetrospectiveID string, userID string, ItemID string) (WorkedItems []*RetrospectiveItem, ImproveItems []*RetrospectiveItem, QuestionItems []*RetrospectiveItem, DeleteError error)
DeleteRetrospectiveItem removes a item from the current board by ID
func (*Database) DeleteUser ¶
DeleteUser attempts to delete a user
func (*Database) DeleteUserAPIKey ¶
DeleteUserAPIKey removes a users api key
func (*Database) DemoteUser ¶
DemoteUser demotes a user to REGISTERED type
func (*Database) DepartmentAddUser ¶
func (d *Database) DepartmentAddUser(DepartmentID string, UserID string, Role string) (string, error)
DepartmentAddUser adds a user to an organization department
func (*Database) DepartmentCreate ¶
DepartmentCreate creates an organization department
func (*Database) DepartmentGet ¶
func (d *Database) DepartmentGet(DepartmentID string) (*Department, error)
DepartmentGet gets a department
func (*Database) DepartmentRemoveUser ¶
DepartmentRemoveUser removes a user from a department (and department teams)
func (*Database) DepartmentTeamCreate ¶
DepartmentTeamCreate creates a department team
func (*Database) DepartmentTeamList ¶
DepartmentTeamList gets a list of department teams
func (*Database) DepartmentTeamUserRole ¶
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 ¶
func (d *Database) DepartmentUserList(DepartmentID string, Limit int, Offset int) []*DepartmentUser
DepartmentUserList gets a list of department users
func (*Database) DepartmentUserRole ¶
func (d *Database) DepartmentUserRole(UserID string, OrgID string, DepartmentID string) (string, string, error)
DepartmentUserRole gets a users role in department (and organization)
func (*Database) FilterItemsByUser ¶
func (d *Database) FilterItemsByUser(UserID string, Items []*RetrospectiveItem) []*RetrospectiveItem
FilterItemsByUser filters the list of items by userId
func (*Database) GenerateAPIKey ¶
GenerateAPIKey generates a new API key for a User
func (*Database) GetAPIKeys ¶
GetAPIKeys gets a list of api keys
func (*Database) GetActiveAlerts ¶
func (d *Database) GetActiveAlerts() []interface{}
GetActiveAlerts gets alerts from db for UI display
func (*Database) GetActiveCountries ¶
GetActiveCountries gets a list of user countries
func (*Database) GetAppStats ¶
func (d *Database) GetAppStats() (*ApplicationStats, error)
GetAppStats gets counts of users (registered and unregistered), and retrospectives
func (*Database) GetRegisteredUsers ¶
GetRegisteredUsers retrieves the registered users from db
func (*Database) GetRetrospective ¶
func (d *Database) GetRetrospective(RetrospectiveID string) (*Retrospective, error)
GetRetrospective gets a retrospective by ID
func (*Database) GetRetrospectiveActions ¶
func (d *Database) GetRetrospectiveActions(RetrospectiveID string) []*RetrospectiveAction
GetRetrospectiveActions retrieves retrospective actions from the DB
func (*Database) GetRetrospectiveItems ¶
func (d *Database) GetRetrospectiveItems(RetrospectiveID string) (Worked []*RetrospectiveItem, Improve []*RetrospectiveItem, Question []*RetrospectiveItem)
GetRetrospectiveItems retrieves retrospective items from the DB
func (*Database) GetRetrospectiveUser ¶
func (d *Database) GetRetrospectiveUser(RetrospectiveID string, UserID string) (*RetrospectiveUser, error)
GetRetrospectiveUser gets a user from db by ID and checks retrospective active status
func (*Database) GetRetrospectiveUsers ¶
func (d *Database) GetRetrospectiveUsers(RetrospectiveID string) []*RetrospectiveUser
GetRetrospectiveUsers retrieves the users for a given retrospective from db
func (*Database) GetRetrospectivesByUser ¶
func (d *Database) GetRetrospectivesByUser(UserID string) ([]*Retrospective, error)
GetRetrospectivesByUser gets a list of retrospectives by UserID
func (*Database) GetUserAPIKeys ¶
GetUserAPIKeys gets a list of api keys for a user
func (*Database) GetUserByEmail ¶
GetUserByEmail gets a user by email
func (*Database) HashAPIKey ¶
HashAPIKey hashes the API key using SHA256 (not reversible)
func (*Database) NestRetrospectiveItem ¶
func (d *Database) NestRetrospectiveItem(RetrospectiveID string, userID string, ItemID string, ParentID string) (WorkedItems []*RetrospectiveItem, ImproveItems []*RetrospectiveItem, QuestionItems []*RetrospectiveItem, DeleteError error)
NestRetrospectiveItem nests a item under another
func (*Database) OrganizationAddUser ¶
OrganizationAddUser adds a user to an organization
func (*Database) OrganizationCreate ¶
OrganizationCreate creates an organization
func (*Database) OrganizationDepartmentList ¶
func (d *Database) OrganizationDepartmentList(OrgID string, Limit int, Offset int) []*Department
OrganizationDepartmentList gets a list of organization departments
func (*Database) OrganizationGet ¶
func (d *Database) OrganizationGet(OrgID string) (*Organization, error)
OrganizationGet gets an organization
func (*Database) OrganizationList ¶
func (d *Database) OrganizationList(Limit int, Offset int) []*Organization
OrganizationList gets a list of organizations
func (*Database) OrganizationListByUser ¶
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 ¶
OrganizationRemoveUser removes a user from a organization
func (*Database) OrganizationTeamCreate ¶
OrganizationTeamCreate creates an organization team
func (*Database) OrganizationTeamList ¶
OrganizationTeamList gets a list of organization teams
func (*Database) OrganizationTeamUserRole ¶
func (d *Database) OrganizationTeamUserRole(UserID string, OrgID string, TeamID string) (string, string, error)
OrganizationTeamUserRole gets a users role in organization team
func (*Database) OrganizationUserList ¶
func (d *Database) OrganizationUserList(OrgID string, Limit int, Offset int) []*OrganizationUser
OrganizationUserList gets a list of organization users
func (*Database) OrganizationUserRole ¶
OrganizationUserRole gets a users role in organization
func (*Database) PromoteUser ¶
PromoteUser promotes a user to ADMIN type
func (*Database) RetreatUser ¶
func (d *Database) RetreatUser(RetrospectiveID string, UserID string) []*RetrospectiveUser
RetreatUser removes a user from the current retrospective by ID
func (*Database) RetrospectiveAdvancePhase ¶
func (d *Database) RetrospectiveAdvancePhase(RetrospectiveID string, userID string, Phase int) (*Retrospective, error)
RetrospectiveAdvancePhase sets the phase for the retrospective
func (*Database) SetRetrospectiveOwner ¶
func (d *Database) SetRetrospectiveOwner(RetrospectiveID string, userID string, OwnerID string) (*Retrospective, error)
SetRetrospectiveOwner sets the ownerId for the retrospective
func (*Database) TeamAddRetrospective ¶
TeamAddRetrospective adds a retrospective to a team
func (*Database) TeamAddUser ¶
TeamAddUser adds a user to a team
func (*Database) TeamCreate ¶
TTeamCreate creates a team with current user as an ADMIN
func (*Database) TeamDelete ¶
TeamDelete deletes a team
func (*Database) TeamListByUser ¶
TeamListByUser gets a list of teams the user is on
func (*Database) TeamRemoveRetrospective ¶
TeamRemoveRetrospective removes a retrospective from a team
func (*Database) TeamRemoveUser ¶
TeamRemoveUser removes a user from a team
func (*Database) TeamRetrospectiveList ¶
func (d *Database) TeamRetrospectiveList(TeamID string, Limit int, Offset int) []*Retrospective
TeamRetrospectiveList gets a list of team retrospectives
func (*Database) TeamUserList ¶
func (d *Database) TeamUserList(TeamID string, Limit int, Offset int) []*OrganizationUser
TeamUserList gets a list of team users
func (*Database) TeamUserRole ¶
TeamUserRole gets a users role in team
func (*Database) UnNestRetrospectiveItem ¶
func (d *Database) UnNestRetrospectiveItem(RetrospectiveID string, userID string, ItemID string) (WorkedItems []*RetrospectiveItem, ImproveItems []*RetrospectiveItem, QuestionItems []*RetrospectiveItem, DeleteError error)
NestRetrospectiveItem unnests a item from under another
func (*Database) UpdateUserAPIKey ¶
UpdateUserAPIKey updates a users api key (active column only)
func (*Database) UpdateUserProfile ¶
func (d *Database) UpdateUserProfile(UserID string, UserName string, UserAvatar string, Country string, Locale string, Company string, JobTitle string) error
UpdateUserProfile attempts to update the users profile
func (*Database) UpdatedRetrospectiveAction ¶
func (d *Database) UpdatedRetrospectiveAction(RetrospectiveID string, userID string, ActionID string, Completed bool) (Actions []*RetrospectiveAction, DeleteError error)
UpdatedRetrospectiveAction updates an actions status
func (*Database) UserResetPassword ¶
func (d *Database) UserResetPassword(ResetID string, UserPassword string) (userName string, userEmail string, resetErr error)
UserResetPassword attempts to reset a users password
func (*Database) UserResetRequest ¶
func (d *Database) UserResetRequest(UserEmail string) (resetID string, userName string, resetErr error)
UserResetRequest inserts a new user reset request
func (*Database) UserUpdatePassword ¶
func (d *Database) UserUpdatePassword(UserID string, UserPassword string) (userName string, userEmail string, resetErr error)
UserUpdatePassword attempts to update a users password
func (*Database) ValidateAPIKey ¶
ValidateAPIKey checks to see if the API key exists in the database and if so returns UserID
func (*Database) VerifyUserAccount ¶
VerifyUserAccount attempts to verify a users account email
func (*Database) VoteRetrospectiveItem ¶
func (d *Database) VoteRetrospectiveItem(RetrospectiveID string, userID string, ItemID string) (WorkedItems []*RetrospectiveItem, ImproveItems []*RetrospectiveItem, QuestionItems []*RetrospectiveItem, DeleteError error)
VoteRetrospectiveItem votes for a retrospective item
type Department ¶
type DepartmentUser ¶
type Organization ¶
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 ¶
type Retrospective ¶
type Retrospective struct { RetrospectiveID string `json:"id" db:"id"` OwnerID string `json:"ownerId" db:"ownder_id"` RetrospectiveName string `json:"name" db:"name"` Users []*RetrospectiveUser `json:"users"` WorkedItems []*RetrospectiveItem `json:"workedItems"` ImproveItems []*RetrospectiveItem `json:"improveItems"` QuestionItems []*RetrospectiveItem `json:"questionItems"` ActionItems []*RetrospectiveAction `json:"actionItems"` Phase int `json:"phase" db:"phase"` }
Retrospective A story mapping board
type RetrospectiveAction ¶
type RetrospectiveAction struct { ID string `json:"id" db:"id"` RetrospectiveID string `json:"retrospectiveId" db:"retrospective_id"` Content string `json:"content" db:"content"` Completed bool `json:"completed" db:"completed"` }
RetrospectiveAction is an action the team can take based on retro feedback
type RetrospectiveItem ¶
type RetrospectiveItem struct { ID string `json:"id" db:"id"` RetrospectiveID string `json:"retrospectiveId" db:"retrospective_id"` UserID string `json:"userId" db:"user_id"` ParentID string `json:"parentId" db:"parent_id"` Content string `json:"content" db:"content"` Type string `json:"type" db:"type"` Votes []string `json:"votes" db:"votes"` }
RetrospectiveItem can be a pro (went well/worked), con (needs improvement), or a question
type RetrospectiveUser ¶
type RetrospectiveUser struct { UserID string `json:"id"` UserName string `json:"name"` Active bool `json:"active"` }
RetrospectiveUser aka user
type User ¶
type User struct { UserID string `json:"id"` UserName string `json:"name"` UserEmail string `json:"email"` UserAvatar string `json:"avatar"` UserType string `json:"type"` Verified bool `json:"verified"` Country string `json:"country"` Locale string `json:"locale"` Company string `json:"company"` JobTitle string `json:"jobTitle"` }
User aka user