glepnir / leaseapp Goto Github PK
View Code? Open in Web Editor NEWgo开发的后台API
go开发的后台API
怎么确定该使用Restful方式还是RBAC方式?
https://casbin.org/docs/zh-CN/supported-models
如上图所示,Restful这种方式好像没有用到角色,但是您代码中是有角色的,那选择使用restful和rbac方式的依据是什么呢?
没有页面啊
请教大佬一个问题,就是在写Api中 Create 数据验证和Update数据验证 如何做可以避免写两套验证代码。。。我现在是用Gin + Gorm + gookit/validate
type User struct {
ID uint `gorm:"primary_key;AUTO_INCREMENT;" json:"id" form:"id" validate:"-"`
UserName string `gorm:"unique;not null" json:"user_name" form:"user_name" validate:"required|customValidator"`
UserPasswd string `gorm:"not null" json:"-" form:"user_passwd" validate:"required"`
}
这样就会导致了这套验证规则在Update中并不适用。请大佬给点思路!!
有个问题请教,有些接口用户登录了,需要关联用户,此时就需要获取用户信息,请问怎么根据接口携带的token获取用户信息
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.