docs: add package and exported symbol comments for revive lint compliance

This commit is contained in:
ryan
2026-06-09 13:42:06 +08:00
parent 4ac9857fe8
commit b05d26c9c6
40 changed files with 87 additions and 0 deletions
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package auth_source 提供认证源管理功能
package auth_source
import (
@@ -27,6 +28,7 @@ import (
"github.com/gin-gonic/gin"
)
// AuthSourceRequest 创建或更新认证源的请求参数
type AuthSourceRequest struct {
Name string `json:"name"`
Type string `json:"type"`
@@ -39,6 +41,7 @@ type AuthSourceRequest struct {
IconURL string `json:"icon_url"`
}
// ToggleAuthSourceRequest 切换认证源启用状态的请求参数
type ToggleAuthSourceRequest struct {
IsActive bool `json:"is_active"`
}
+2
View File
@@ -15,8 +15,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package admin 提供管理后台功能
package admin
// 管理后台错误消息常量
const (
AdminRequired = "未经授权访问"
InvalidAuthSourceID = "认证源 ID 无效"
+1
View File
@@ -29,6 +29,7 @@ import (
"github.com/gin-gonic/gin"
)
// LoginAdminRequired 返回管理员权限校验中间件
func LoginAdminRequired() gin.HandlerFunc {
return func(c *gin.Context) {
// init trace
@@ -15,8 +15,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package system_config 提供系统配置管理功能
package system_config
// 系统配置错误消息常量
const (
SystemConfigNotFound = "系统配置不存在"
ConfigKeyRequired = "配置键不能为空"
+2
View File
@@ -15,8 +15,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package task 提供任务管理接口
package task
// 任务管理相关错误消息
const (
InvalidTaskType = "无效的任务类型"
InvalidTimeRange = "无效的时间范围"
+2
View File
@@ -14,8 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package template 提供模板管理功能
package template
// 模板管理相关错误消息
const (
TemplateNotFound = "模板不存在"
TemplateKeyRequired = "模板标识符不能为空"
+1
View File
@@ -15,6 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package user 提供用户管理功能
package user
const (