Documentation ¶
Index ¶
- Constants
- func Check(i interface{})
- func DbxDatabase() *dbx.Database
- func ExecuteContext(ctx context.Context, fn TxFunc) error
- func GetEnvelopeActivityLink() string
- func GetEnvelopeDomain() string
- func Iris() *iris.Application
- func Props() kvs.ConfigSource
- func Translate() ut.Translator
- func Tx(fn TxFunc) error
- func TxContext(ctx context.Context, fn TxFunc) error
- func Validate() *validator.Validate
- func ValidateStruct(s interface{}) error
- func WithValueContext(parent context.Context, runner *dbx.TxRunner) context.Context
- type BaseDao
- type DbxDatabaseStarter
- type IrisServerStarter
- type PropsStarter
- type Res
- type ResCode
- type SystemAccount
- type TxFunc
- type ValidatorStarter
Constants ¶
View Source
const TX = "tx"
Variables ¶
This section is empty.
Functions ¶
func DbxDatabase ¶
func ExecuteContext ¶
该方法没有真正开启1个事务,从 ctx 获取 *TxRunner 事务对象
func GetEnvelopeActivityLink ¶
func GetEnvelopeActivityLink() string
func GetEnvelopeDomain ¶
func GetEnvelopeDomain() string
func Iris ¶
func Iris() *iris.Application
func ValidateStruct ¶
func ValidateStruct(s interface{}) error
Types ¶
type DbxDatabaseStarter ¶
type DbxDatabaseStarter struct { // 继承 BaseStarter 免去实现一系列的 start方法 infra.BaseStarter }
dbx数据库starter 设置为全局
func (*DbxDatabaseStarter) Setup ¶
func (s *DbxDatabaseStarter) Setup(ctx infra.StarterContext)
TODO:NOTICE 数据库连接启动生命周期要晚于配置文件加载 数据库资源初始化放到 Setup阶段
type IrisServerStarter ¶
type IrisServerStarter struct {
infra.BaseStarter
}
func (*IrisServerStarter) Init ¶
func (i *IrisServerStarter) Init(ctx infra.StarterContext)
func (*IrisServerStarter) Start ¶
func (i *IrisServerStarter) Start(ctx infra.StarterContext)
func (*IrisServerStarter) StartBlocking ¶
func (i *IrisServerStarter) StartBlocking() bool
IrisServerStarter 是阻塞式的 需要实现阻塞接口
type PropsStarter ¶
type PropsStarter struct { // 继承 BaseStarter infra.BaseStarter }
func (*PropsStarter) Init ¶
func (p *PropsStarter) Init(ctx infra.StarterContext)
配置相关启动优先级最高,程序启动要首先读取配置文件
type ValidatorStarter ¶
type ValidatorStarter struct {
infra.BaseStarter
}
func (*ValidatorStarter) Init ¶
func (v *ValidatorStarter) Init(ctx infra.StarterContext)
验证器翻译器 和 其他基础组件依赖性不强 只需要在接收用户请求之前创建好即可,即只需要先于web服务器创建前注册好验证器即可
Click to show internal directories.
Click to hide internal directories.