func (c *Context) SetUserInfo(info UserInfo) {
	c.Set("userInfo", info)
}
SetUser sets user info into context
package common
import (
	"context"
	"encoding/json"
	"net/http"
	"runtime/debug"
	"github.com/baetyl/baetyl-go/v2/errors"
	"github.com/baetyl/baetyl-go/v2/log"
	"github.com/baetyl/baetyl-go/v2/utils"
	"github.com/gin-gonic/gin"
	"github.com/gin-gonic/gin/binding"
	uuid "github.com/satori/go.uuid"
	"gopkg.in/go-playground/validator.v9"
)
type Context struct {
	*gin.Context
}
type User struct {
	ID   string
	Name string
}
type UserInfo struct {
	User   User
	Roles  []Role
	Domain Domain
}
type Role struct {
	ID   string
	Type string
}
type Domain struct {
	ID   string
	Name string
}
func NewContext(inner *gin.Context) *Context {
	return &Context{inner}
}
func NewContextEmpty() *Context {
	return &Context{&gin.Context{}}
}
func (c *Context) SetNamespace(ns string) {
	c.Set("namespace", ns)
}
func (c *Context) GetNamespace() string {
	return c.GetString("namespace")
}
func (c *Context) SetUser(user User) {
	c.Set("user", user)
}
func (c *Context) GetUser() User {
	user, ok := c.Get("user")
	if !ok {
		return User{}
	}
	return user.(User)
}