Documentation
¶
Index ¶
- func CheckEffectiveUser(w http.ResponseWriter, r *http.Request, userService services.IUserService, ...) (*models.User, error)
- func FilterColors(all map[string]string, haystack models.SummaryItems) map[string]string
- func GetBadgeParams(reqPath string, authorizedUser, requestedUser *models.User) (*models.KeyedInterval, *models.Filters, error)
- func GetEffectiveProjectsList(user *models.User, heartbeatSrvc services.IHeartbeatService, ...) ([]string, error)
- func LoadUserSummary(ss services.ISummaryService, r *http.Request) (*models.Summary, error, int)
- func LoadUserSummaryByParams(ss services.ISummaryService, params *models.SummaryParams) (*models.Summary, error, int)
- func ParseHeartbeats(r *http.Request) ([]*models.Heartbeat, error)
- func SetError(r *http.Request, w http.ResponseWriter, message string)
- func SetSuccess(r *http.Request, w http.ResponseWriter, message string)
- func WithSessionMessages[T view.BasicViewModel](vm T, r *http.Request, w http.ResponseWriter) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckEffectiveUser ¶
func CheckEffectiveUser(w http.ResponseWriter, r *http.Request, userService services.IUserService, fallback string) (*models.User, error)
CheckEffectiveUser extracts the requested user from a URL (like '/users/{user}'), compares it with the currently authorized user and writes an HTTP error if they differ. Fallback can be used to manually set a value for '{user}' if none is present.
func FilterColors ¶
func GetBadgeParams ¶
func GetEffectiveProjectsList ¶
func GetEffectiveProjectsList(user *models.User, heartbeatSrvc services.IHeartbeatService, aliasSrvc services.IAliasService) ([]string, error)
GetEffectiveProjectsList returns the user's projects, including all alias targets and excluding all remapped project names (alias sources) Example: "A" mapped to "AB" using an alias -> "A" itself should not appear as a project anymore -> Instead, the "virtual" project "AB" shall appear See https://github.com/muety/wakapi/issues/231
func LoadUserSummary ¶
func LoadUserSummaryByParams ¶
func LoadUserSummaryByParams(ss services.ISummaryService, params *models.SummaryParams) (*models.Summary, error, int)
func SetSuccess ¶
func SetSuccess(r *http.Request, w http.ResponseWriter, message string)
func WithSessionMessages ¶
func WithSessionMessages[T view.BasicViewModel](vm T, r *http.Request, w http.ResponseWriter) T
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.