Documentation ¶
Index ¶
- func GetBaseConfig(c framework.Container) *contract.DBConfig
- func NewAnanGorm(params ...interface{}) (interface{}, error)
- func WithConfigPath(configPath string) contract.DBoption
- type AnanGorm
- type GormProvider
- type OrmLogger
- func (ol *OrmLogger) Error(ctx context.Context, s string, i ...interface{})
- func (ol *OrmLogger) Info(ctx context.Context, s string, i ...interface{})
- func (ol *OrmLogger) LogMode(level logger.LogLevel) logger.Interface
- func (ol *OrmLogger) Trace(ctx context.Context, begin time.Time, ...)
- func (ol *OrmLogger) Warn(ctx context.Context, s string, i ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBaseConfig ¶
从database.yaml文件中读取数据
func NewAnanGorm ¶
func NewAnanGorm(params ...interface{}) (interface{}, error)
Types ¶
type AnanGorm ¶
type AnanGorm struct {
// contains filtered or unexported fields
}
AnanOrm 代表anan框架的orm实现
type GormProvider ¶
type GormProvider struct { }
提供App的具体实现方法
func (*GormProvider) IsDefer ¶
func (a *GormProvider) IsDefer() bool
func (*GormProvider) Name ¶
func (a *GormProvider) Name() string
func (*GormProvider) Params ¶
func (a *GormProvider) Params(container framework.Container) []interface{}
func (*GormProvider) Register ¶
func (a *GormProvider) Register(container framework.Container) framework.NewInstance
Click to show internal directories.
Click to hide internal directories.