form

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 (e *MenuCreateReq) SetCreatedAt()
type MenuDeleteReq struct {
	curd.OneID
}
type MenuGetReq struct {
	curd.OneID
}
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 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 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 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 (e *MenuUpdateReq) SetUpdatedAt()

type Pagination

type Pagination struct {
	Page     int64 `form:"page" query:"page"`
	PageSize int64 `form:"pageSize" query:"pageSize"`
}

type TenantAuthURLReq

type TenantAuthURLReq struct {
	ExtraScopes []string `query:"extraScopes" form:"extraScopes"`
	CrossClient []string `query:"crossClient" form:"crossClient"`
	ConnectorID string   `query:"connectorID" form:"connectorID"`
	State       string   `query:"state" form:"state"`
}

type TenantAuthURLResp

type TenantAuthURLResp struct {
	URL string `json:"url"`
}

type TenantCallbackReq

type TenantCallbackReq struct {
	Code             string `query:"code" form:"code"`
	RefreshToken     string `query:"refreshToken" form:"refreshToken"`
	State            string `query:"state" form:"state"`
	Error            string `query:"error" form:"error"`
	ErrorDescription string `query:"error_description" form:"error_description"`
}

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 TenantClientResp struct {
	ServerURL        string `json:"serverUrl"`
	ClientID         string `json:"clientId"`
	AppName          string `json:"appName"`
	OrganizationName string `json:"organizationName"`
	AuthCodeURL      string `json:"authCodeURL"`
}

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 TenantDeleteReq struct {
	curd.OneID
}

type TenantGetReq

type TenantGetReq struct {
	curd.OneID
}

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL