Documentation
¶
Index ¶
- func DeleteHistoryLogs(c *gin.Context)
- func GetAllLogs(c *gin.Context)
- func GetCurrentUserLog(c *gin.Context)
- func GetLog(c *gin.Context)
- func GetLogFilterOptions(c *gin.Context)
- func GetLogsSelfStat(c *gin.Context)
- func GetLogsStat(c *gin.Context)
- func GetUserLogFilterOptions(c *gin.Context)
- func GetUserLogs(c *gin.Context)
- func SearchAllLogs(c *gin.Context)
- func SearchUserLogs(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteHistoryLogs ¶
DeleteHistoryLogs godoc @Summary Delete history logs (admin) @Tags admin @Security BearerAuth @Produce json @Param target_timestamp query int true "Target timestamp (unix)" @Success 200 {object} docs.StandardResponse @Failure 401 {object} docs.ErrorResponse @Router /api/v1/admin/log [delete]
func GetAllLogs ¶
GetAllLogs godoc @Summary List logs (admin) @Tags admin @Security BearerAuth @Produce json @Param page query int false "Page (1-based)" @Param type query int false "Log type" @Param start_timestamp query int false "Start timestamp (unix)" @Param end_timestamp query int false "End timestamp (unix)" @Param username query string false "Username" @Param token_name query string false "Token name" @Param model_name query string false "Model name" @Param group_id query string false "Group ID" @Param channel query int false "Channel ID" @Success 200 {object} docs.UserLogListResponse @Failure 401 {object} docs.ErrorResponse @Router /api/v1/admin/log [get]
func GetCurrentUserLog ¶ added in v0.0.3
GetCurrentUserLog godoc @Summary Get current user log by ID @Tags public @Security BearerAuth @Produce json @Router /api/v1/public/log/{id} [get]
func GetLog ¶ added in v0.0.3
GetLog godoc @Summary Get log by ID (admin) @Tags admin @Security BearerAuth @Produce json @Router /api/v1/admin/log/{id} [get]
func GetLogFilterOptions ¶ added in v0.0.7
GetLogFilterOptions godoc @Summary List log filter options (admin) @Tags admin @Security BearerAuth @Produce json @Success 200 {object} docs.StandardResponse @Failure 401 {object} docs.ErrorResponse @Router /api/v1/admin/log/options [get]
func GetLogsSelfStat ¶
GetLogsSelfStat godoc @Summary Log stats for current user @Tags public @Security BearerAuth @Produce json @Param type query int false "Log type" @Param start_timestamp query int false "Start timestamp (unix)" @Param end_timestamp query int false "End timestamp (unix)" @Param token_name query string false "Token name" @Param model_name query string false "Model name" @Param channel query int false "Channel ID" @Success 200 {object} docs.UserLogStatResponse @Failure 401 {object} docs.ErrorResponse @Router /api/v1/public/log/stat [get]
func GetLogsStat ¶
GetLogsStat godoc @Summary Log stats (admin) @Tags admin @Security BearerAuth @Produce json @Param type query int false "Log type" @Param start_timestamp query int false "Start timestamp (unix)" @Param end_timestamp query int false "End timestamp (unix)" @Param token_name query string false "Token name" @Param username query string false "Username" @Param model_name query string false "Model name" @Param channel query int false "Channel ID" @Success 200 {object} docs.UserLogStatResponse @Failure 401 {object} docs.ErrorResponse @Router /api/v1/admin/log/stat [get]
func GetUserLogFilterOptions ¶ added in v0.0.7
GetUserLogFilterOptions godoc @Summary List current user log filter options @Tags public @Security BearerAuth @Produce json @Success 200 {object} docs.StandardResponse @Failure 401 {object} docs.ErrorResponse @Router /api/v1/public/log/options [get]
func GetUserLogs ¶
GetUserLogs godoc @Summary List user logs @Tags public @Security BearerAuth @Produce json @Param page query int false "Page (1-based)" @Param type query int false "Log type" @Param start_timestamp query int false "Start timestamp (unix)" @Param end_timestamp query int false "End timestamp (unix)" @Param token_name query string false "Token name" @Param model_name query string false "Model name" @Success 200 {object} docs.UserLogListResponse @Failure 401 {object} docs.ErrorResponse @Router /api/v1/public/log [get]
func SearchAllLogs ¶
SearchAllLogs godoc @Summary Search logs (admin) @Tags admin @Security BearerAuth @Produce json @Param keyword query string false "Keyword" @Success 200 {object} docs.UserLogListResponse @Failure 401 {object} docs.ErrorResponse @Router /api/v1/admin/log/search [get]
func SearchUserLogs ¶
SearchUserLogs godoc @Summary Search user logs @Tags public @Security BearerAuth @Produce json @Param keyword query string false "Keyword" @Success 200 {object} docs.UserLogListResponse @Failure 401 {object} docs.ErrorResponse @Router /api/v1/public/log/search [get]
Types ¶
This section is empty.