Documentation ¶
Overview ¶
The very app statistics routes and controllers logic package for the backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStatRouter ¶ added in v0.44.24
func NewStatRouter(statController *StatController) chi.Router
func NewStatService ¶ added in v0.44.24
func NewStatService( pollRepository models.PollRepositoryInterface, postRepository models.PostRepositoryInterface, userRepository models.UserRepositoryInterface, ) models.StatServiceInterface
Types ¶
type StatController ¶ added in v0.44.24
type StatController struct {
// contains filtered or unexported fields
}
func NewStatController ¶ added in v0.44.24
func NewStatController(statService models.StatServiceInterface) *StatController
func (*StatController) GetAll ¶ added in v0.44.24
func (c *StatController) GetAll(w http.ResponseWriter, r *http.Request)
GetAll acts like a handler for stats page.
@Summary Get stats @Description This function call retrieves the system and users' statistics. @Tags stats @Produce json @Success 200 {object} common.APIResponse{data=stats.GetAll.responseData} "Stats were calculated and are returned." @Failure 400 {object} common.APIResponse{data=models.Stub} "Invalid called ID." @Failure 500 {object} common.APIResponse{data=models.Stub} "A serious problem occurred while stats were being calculated." @Router /stats [get]
Click to show internal directories.
Click to hide internal directories.