Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateUser ¶
CreateOrUpdateUser create or update user
Types ¶
type Menu ¶
type Menu struct { Id string `bson:"id" json:"id"` TenantID string `bson:"tenantID" json:"tenantID"` Name string `bson:"name" json:"name"` Icon string `bson:"icon" json:"icon"` Path string `bson:"path" json:"path"` Access string `bson:"access" json:"access"` Status enum.Status `bson:"status" json:"status"` Routes []Menu `bson:"routes" json:"routes"` ParentKeys []string `bson:"parentKeys" json:"parentKeys"` Redirect string `bson:"redirect" json:"redirect"` Layout bool `bson:"layout" json:"layout"` Component string `bson:"component" json:"component"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` }
Menu <no value>
func (*Menu) C ¶
func (e *Menu) C() *mongo.Collection
type OnlyClient ¶
type Role ¶
type Role struct { ID string `bson:"_id" json:"id"` TenantID string `bson:"tenantID" json:"tenantID"` Name string `bson:"name" json:"name"` Status enum.Status `bson:"status" json:"status"` Metadata interface{} `bson:"metadata" json:"metadata"` CreatedAt time.Time `bson:"createdAt" json:"createdAt"` UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"` }
func (*Role) C ¶
func (e *Role) C() *mongo.Collection
type Tenant ¶
type Tenant struct { ID string `json:"id" bson:"_id"` Name string `json:"name" bson:"name"` Contact string `json:"contact" bson:"contact"` System bool `json:"system" bson:"system"` Status enum.Status `json:"status" bson:"status"` Description string `json:"description" bson:"description"` Domains []string `json:"domains" bson:"domains"` Client config.OAuth2 `json:"client" bson:"client"` Metadata interface{} `json:"metadata" bson:"metadata"` ExpiredAt time.Time `json:"expiredAt" bson:"expiredAt" binding:"required"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` }
Tenant 租户
func (*Tenant) C ¶
func (e *Tenant) C() *mongo.Collection
func (*Tenant) GetClientByDomain ¶
GetClientByDomain 获取租户的client
type User ¶
type User struct { ID string `bson:"_id" json:"id"` TenantID string `bson:"tenantID" json:"tenantID"` Username string `bson:"username" json:"username"` Nickname string `bson:"nickname" json:"nickname"` Avatar string `bson:"avatar" json:"avatar"` Email string `bson:"email" json:"email"` Phone string `bson:"phone" json:"phone"` Status enum.Status `bson:"status" json:"status"` PWD UserPwd `bson:"pwd" json:"pwd"` Metadata interface{} `bson:"metadata" json:"metadata"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` }
func (*User) C ¶
func (e *User) C() *mongo.Collection
func (*User) VerifyPassword ¶
Click to show internal directories.
Click to hide internal directories.