Documentation
¶
Index ¶
- type MenuCreateReq
- type MenuDeleteReq
- type MenuGetReq
- type MenuGetResp
- type MenuListItem
- type MenuListReq
- type MenuUpdateReq
- type Pagination
- type TenantAuthURLReq
- type TenantAuthURLResp
- type TenantCallbackReq
- type TenantCallbackResp
- type TenantClientResp
- type TenantCreateReq
- type TenantDeleteReq
- type TenantGetReq
- type TenantGetResp
- type TenantListItem
- type TenantListReq
- type TenantRefreshTokenReq
- type TenantUpdateReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MenuCreateReq ¶
type MenuCreateReq struct {
//租户id
TenantID string `bson:"tenantID" json:"tenantID" binding:"required"`
//名称
Name string `bson:"name" json:"name" binding:"required"`
//icon
Icon string `bson:"icon" json:"icon" `
//路径
Path string `bson:"path" json:"path" binding:"required"`
//权限
Access string `bson:"access" json:"access" binding:"required"`
//状态
Status enum.Status `bson:"status" json:"status" `
//父菜单
ParentKeys []string `bson:"parentKeys" json:"parentKeys" `
//重定向
Redirect string `bson:"redirect" json:"redirect" `
//Layout
Layout bool `bson:"layout" json:"layout" `
//组件
Component string `bson:"component" json:"component" `
//创建时间
CreatedAt time.Time `json:"-" bson:"createdAt"`
//更新时间
UpdatedAt time.Time `json:"-" bson:"updatedAt"`
}
func (*MenuCreateReq) SetCreatedAt ¶
func (e *MenuCreateReq) SetCreatedAt()
type MenuDeleteReq ¶
type MenuGetReq ¶
type MenuGetResp ¶
type MenuGetResp struct {
//id
Id string `bson:"id" json:"id"`
//租户id
TenantID string `bson:"tenantID" json:"tenantID"`
//名称
Name string `bson:"name" json:"name"`
//icon
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"`
//<no value>
ParentKeys []string `bson:"parentKeys" json:"parentKeys"`
//重定向
Redirect string `bson:"redirect" json:"redirect"`
//Layout
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"`
}
type MenuListItem ¶
type MenuListItem struct {
//id
Id string `bson:"id" json:"id"`
//租户id
TenantID string `bson:"tenantID" json:"tenantID"`
//名称
Name string `bson:"name" json:"name"`
//icon
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 []MenuListItem `bson:"routes" json:"routes"`
//<no value>
ParentKeys []string `bson:"parentKeys" json:"parentKeys"`
//重定向
Redirect string `bson:"redirect" json:"redirect"`
//Layout
Layout bool `bson:"layout" json:"layout"`
//组件
Component string `bson:"component" json:"component"`
}
type MenuListReq ¶
type MenuListReq struct {
curd.Pagination
//租户id
TenantID string `bson:"tenantID" form:"tenantID" query:"tenantID" search:"type:exact;column:tenantID"`
//名称
Name string `bson:"name" form:"name" query:"name" search:"type:contains;column:name"`
//路径
Path string `bson:"path" form:"path" query:"path" search:"type:contains;column:path"`
//权限
Access string `bson:"access" form:"access" query:"access" search:"type:contains;column:access"`
//状态
Status enum.Status `bson:"status" form:"status" query:"status" search:"type:contains;column:status"`
//<no value>
ParentKeys []string `bson:"parentKeys" form:"parentKeys" query:"parentKeys" search:"type:<no value>;column:parentKeys"`
//重定向
Redirect string `bson:"redirect" form:"redirect" query:"redirect" search:"type:contains;column:redirect"`
//Layout
Layout bool `bson:"layout" form:"layout" query:"layout" search:"type:<no value>;column:layout"`
//组件
Component string `bson:"component" form:"component" query:"component" search:"type:contains;column:component"`
}
type MenuUpdateReq ¶
type MenuUpdateReq struct {
curd.OneID
//租户id
TenantID string `bson:"tenantID" json:"tenantID" binding:"required"`
//名称
Name string `bson:"name" json:"name" binding:"required"`
//icon
Icon string `bson:"icon" json:"icon" `
//路径
Path string `bson:"path" json:"path" binding:"required"`
//权限
Access string `bson:"access" json:"access" binding:"required"`
//状态
Status enum.Status `bson:"status" json:"status" `
//父菜单
ParentKeys []string `bson:"parentKeys" json:"parentKeys" `
//重定向
Redirect string `bson:"redirect" json:"redirect" `
//Layout
Layout bool `bson:"layout" json:"layout" `
//组件
Component string `bson:"component" json:"component" `
//更新时间
UpdatedAt time.Time `json:"-" bson:"updatedAt"`
}
func (*MenuUpdateReq) SetUpdatedAt ¶
func (e *MenuUpdateReq) SetUpdatedAt()
type Pagination ¶
type TenantAuthURLReq ¶
type TenantAuthURLResp ¶
type TenantAuthURLResp struct {
URL string `json:"url"`
}
type TenantCallbackReq ¶
type TenantCallbackResp ¶
type TenantCallbackResp struct {
// AccessToken is the token that authorizes and authenticates
// the requests.
AccessToken string `json:"accessToken"`
// TokenType is the type of token.
// The Type method returns either this or "Bearer", the default.
TokenType string `json:"tokenType,omitempty"`
// RefreshToken is a token that's used by the application
// (as opposed to the user) to refresh the access token
// if it expires.
RefreshToken string `json:"refreshToken,omitempty"`
// Expiry is the optional expiration time of the access token.
//
// If zero, TokenSource implementations will reuse the same
// token forever and RefreshToken or equivalent
// mechanisms for that TokenSource will not be used.
Expiry time.Time `json:"expiry,omitempty"`
}
type TenantClientResp ¶
type TenantCreateReq ¶
type TenantCreateReq struct {
//名称
Name string `json:"name" bson:"name" binding:"required"`
//邮箱
Email string `json:"email" bson:"email" binding:"email"`
//联系方式
Contact string `json:"contact" bson:"contact"`
//描述
Description string `json:"description" bson:"description"`
//域名
Domains []string `json:"domains" bson:"domains"`
//系统管理
System bool `json:"system" bson:"system"`
//状态
Status enum.Status `json:"status" bson:"status"`
//有效期
ExpiredAt time.Time `json:"expiredAt" bson:"expiredAt" binding:"required"`
//创建时间
CreatedAt time.Time `json:"-" bson:"createdAt"`
//更新时间
UpdatedAt time.Time `json:"-" bson:"updatedAt"`
}
func (*TenantCreateReq) SetCreatedAt ¶
func (e *TenantCreateReq) SetCreatedAt()
type TenantDeleteReq ¶
type TenantGetReq ¶
type TenantGetResp ¶
type TenantGetResp struct {
//id
ID string `uri:"id" json:"-" 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"`
//有效期
ExpiredAt time.Time `json:"expiredAt" bson:"expiredAt" binding:"required"`
//创建时间
CreatedAt time.Time `json:"createdAt" bson:"createdAt"`
//更新时间
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"`
}
type TenantListItem ¶
type TenantListItem struct {
//id
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"`
//有效期
ExpiredAt time.Time `json:"expiredAt" bson:"expiredAt" binding:"required"`
//创建时间
CreatedAt time.Time `json:"createdAt" bson:"createdAt"`
//更新时间
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"`
}
type TenantListReq ¶
type TenantListReq struct {
curd.Pagination
//名称
Name string `query:"name" form:"name" search:"type:contains;column:name"`
//联系方式
Contact string `query:"contact" form:"contact" search:"type:contains;column:contact"`
//系统管理
System bool `query:"system" form:"system"`
//状态
Status enum.Status `query:"status" form:"status"`
//系统管理排序
SystemSort int8 `query:"systemSort" form:"systemSort" search:"type:order;column:system"`
}
type TenantRefreshTokenReq ¶
type TenantRefreshTokenReq struct {
RefreshToken string `query:"refreshToken" form:"refreshToken"`
}
type TenantUpdateReq ¶
type TenantUpdateReq struct {
curd.OneID
//名称
Name string `json:"name" bson:"name"`
//邮箱
Email string `json:"email" bson:"email"`
//联系方式
Contact string `json:"contact" bson:"contact"`
//描述
Description string `json:"description" bson:"description"`
//域名
Domains []string `json:"domains" bson:"domains"`
//有效期
ExpiredAt time.Time `json:"expiredAt" bson:"expiredAt" binding:"required"`
//更新时间
UpdatedAt time.Time `json:"-" bson:"updatedAt"`
}
func (*TenantUpdateReq) SetUpdatedAt ¶
func (e *TenantUpdateReq) SetUpdatedAt()
Click to show internal directories.
Click to hide internal directories.