惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - 猫猫客服

cursor编辑器 ai客服 laravel12 微服务 Claude Code 接口类,需要指定入参类型,出参类型 海量数据查询,es替代方案 数据库设计 php消费者 转载,电商系统多规格 php响应 docker,2024年8月9日 使用wsl,windows自带的linux虚拟机 go 微服务 vue3 前端工具 java基础 架构 es学习 简单分表 go 指针
Goframe 学习笔记
猫猫客服 · 2026-04-26 · via 博客园 - 猫猫客服

GoframePro

https://goflys.cn/articledetail?id=378

api层->controller控制层->service服务层->logic实现层->dao数据层

一个service服务层,可以调用多个logic实现层

一个logic实现层对应1个dao层

Goframe

https://goframe.org/quick/install

type HelloReq struct {
g.Meta `path:"/" method:"get"`
Name string `v:"required" dc:"姓名"`
Age int `v:"required" dc:"年龄"`
}

结构体,添加

g.Meta `path:"/" method:"get"`

请求时,自动绑定到这个结构体

 接口层api层,返回的是“接口对象”,类似php的协议,也就是说接口层是定义规范的,具体实现不参与

image

Entity 是和数据表一一对应的数据模型,是纯粹的数据载体,只定义表的字段和类型,不包含任何业务逻辑或数据库操作。

简单对应:

  • model/entity ≈ PHP 里的 Model(表结构映射、字段标签、表名绑定)GoFrame
  • model/do ≈ 数据传输 / 转换层(业务 ↔ 数据模型)GoFrame
  • dao ≈ 简化的 DAL,封装 CRUD,内部依赖 entity/doGoFrame