Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) ChooseRouter ¶
ChooseRouter 选择Router 参数: - routerType: 路由类型,有两种
- api.RouterRoot: 根路由
- api.RouterPrefix: 带url前缀的路由
- version: 版本,用于获取基于上面两中路由够造的带有版本号的路由,传空字符串则选定上面两种路由本身 返回值: - 选择的Router
func (*App) Infrastructure ¶
func (app *App) Infrastructure() *infrastructure.Infrastructure
Infrastructure 获取Infrastructure实例 参数: 无 返回值: - Infrastructure实例
type Config ¶
type Config struct {
ApiConfig `json:"api" yaml:"api"`
InfrastructureConfig `json:"infrastructure" yaml:"infrastructure"`
}
func LoadFromJson ¶
func LoadFromJsonFile ¶
func LoadFromYaml ¶
func LoadFromYamlFile ¶
type InfoIDField ¶
type InfoIDField struct {
ID string `json:"id" sqlresult:"column:id"`
}
InfoIDField Info的ID字段
type InfoTenantIDField ¶
type InfoTenantIDField struct {
TenantID string `json:"tenantId" sqlresult:"column:tenant_id"`
}
InfoTenantIDField Info的租户ID字段
type InfoTimeFields ¶
type InfoTimeFields struct {
CreatedTime string `json:"createdTime" sqlresult:"column:created_time;timeLayout:'2006-01-02 15:04:05'"`
LastUpdatedTime string `json:"lastUpdatedTime" sqlresult:"column:last_updated_time;timeLayout:'2006-01-02 15:04:05'"`
}
InfoTimeFields Info的时间相关字段
type InfoUserIDFields ¶
type InfoUserIDFields struct {
CreateUserID string `json:"createUserId" sqlresult:"column:create_user_id;"`
LastUpdateUserID string `json:"lastUpdateUserId" sqlresult:"column:last_update_user_id;"`
}
InfoUserIDFields Info的用户ID相关字段
type InfrastructureConfig ¶
type InfrastructureConfig struct {
Database infrastructure.DatabaseConfig `json:"database" yaml:"database"`
Cache infrastructure.CacheConfig `json:"cache" yaml:"cache"`
MessageQueue infrastructure.MessageQueueConfig `json:"message_queue" yaml:"message_queue"`
}
Click to show internal directories.
Click to hide internal directories.