mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
393 B
27 lines
393 B
package core
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/rocboss/paopao-ce/internal/model"
|
|
)
|
|
|
|
type BaseServant struct {
|
|
// TODO
|
|
}
|
|
|
|
type BaseBinding struct {
|
|
// TODO
|
|
}
|
|
|
|
type BaseRender struct {
|
|
// TODO
|
|
}
|
|
|
|
func (BaseServant) userFrom(c *gin.Context) (*model.User, bool) {
|
|
if u, exists := c.Get("USER"); exists {
|
|
user, ok := u.(*model.User)
|
|
return user, ok
|
|
}
|
|
return nil, false
|
|
}
|