mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-14 05:03:49 +08:00
golangci-lint run
This commit is contained in:
@@ -47,7 +47,7 @@ const { hasPermission } = usePermission();
|
||||
type MenuRouteMeta struct {
|
||||
// 解释参考:https://naive-ui-admin-docs.vercel.app/guide/router.html#%E5%A4%9A%E7%BA%A7%E8%B7%AF%E7%94%B1
|
||||
Title string `json:"title"` // 菜单名称 一般必填
|
||||
//Disabled bool `json:"disabled,omitempty"` // 禁用菜单
|
||||
// Disabled bool `json:"disabled,omitempty"` // 禁用菜单
|
||||
Icon string `json:"icon,omitempty"` // 菜单图标
|
||||
KeepAlive bool `json:"keepAlive,omitempty"` // 缓存该路由
|
||||
Hidden bool `json:"hidden,omitempty"` // 隐藏菜单
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
### 生成模板配置
|
||||
|
||||
- 注意:线上环境务必将allowedIPs参数设为空,考虑到项目安全问题请勿线上生成使用!
|
||||
- 注意:线上环境务必将`allowedIPs`参数设为空,考虑到项目安全问题请勿线上生成使用!
|
||||
|
||||
- 默认配置路径:server/manifest/config/config.yaml
|
||||
|
||||
|
||||
@@ -114,7 +114,8 @@ func (c *cHello) Hello(ctx context.Context, req *user.HelloReq) (res *user.Hello
|
||||
```
|
||||
|
||||
- 浏览器中访问响应内容如下:
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
#### 自定义响应
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
目录
|
||||
|
||||
- 配置文件
|
||||
- 实现接口
|
||||
- 一个例子
|
||||
- 控制台
|
||||
- 自定义队列驱动
|
||||
@@ -42,6 +43,18 @@ queue:
|
||||
|
||||
```
|
||||
|
||||
### 实现接口
|
||||
- 为了提供高度的扩展性,消费队列在设计上采用了接口化的思路。只需要实现以下接口,您就可以在任何地方注册和使用消费队列消费功能,从而实现更大的灵活性和可扩展性。
|
||||
|
||||
```go
|
||||
// Consumer 消费者接口,实现该接口即可加入到消费队列中
|
||||
type Consumer interface {
|
||||
GetTopic() string // 获取消费主题
|
||||
Handle(ctx context.Context, mqMsg MqMsg) (err error) // 处理消息的方法
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### 一个例子
|
||||
|
||||
每个被发送到队列的消息应该被定义为一个单独的文件结构。
|
||||
|
||||
Reference in New Issue
Block a user