Documentation ¶
Index ¶
- Variables
- func NewDiscovery(conf *conf.Registry) registry.Discovery
- func NewExampleRepo(data *Data, logger log.Logger) biz.ExampleRepo
- func NewMysqlCmd(conf *conf.Bootstrap, logger log.Logger) *gorm.DB
- func NewRedisClient(conf *conf.Data) *redis.Client
- func NewRedisCmd(conf *conf.Data, logger log.Logger) redis.Cmdable
- func NewRegistrar(conf *conf.Registry) registry.Registrar
- func Paginate(page, pageSize int64) func(db *gorm.DB) *gorm.DB
- type BaseFields
- type Data
- type ExampleEntity
- type ExampleRepo
- func (r ExampleRepo) CreateExample(ctx context.Context, example *domain.Example) (*domain.Example, error)
- func (r ExampleRepo) DeleteExample(ctx context.Context, domain *domain.Example) error
- func (r ExampleRepo) GetExample(ctx context.Context, params map[string]interface{}) (*domain.Example, error)
- func (r ExampleRepo) GetExampleByParams(ctx context.Context, params map[string]interface{}) (record *ExampleEntity, err error)
- func (r ExampleRepo) GetExampleCount(ctx context.Context, params map[string]interface{}) (count int64, err error)
- func (r ExampleRepo) ListExample(ctx context.Context, page, pageSize int64, params map[string]interface{}) ([]*domain.Example, error)
- func (r ExampleRepo) RecoverExample(ctx context.Context, domain *domain.Example) error
- func (r ExampleRepo) UpdateExample(ctx context.Context, domain *domain.Example) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewData, NewDiscovery, NewRegistrar, NewRedisCmd, NewMysqlCmd, NewRedisClient, NewExampleRepo)
ProviderSet is data providers.
Functions ¶
func NewExampleRepo ¶
func NewExampleRepo(data *Data, logger log.Logger) biz.ExampleRepo
Types ¶
type BaseFields ¶
type ExampleEntity ¶
type ExampleEntity struct { BaseFields Name string `gorm:"type:varchar(255);not null;comment:名称"` Status bool `gorm:"not null;comment:状态0冻结1正常"` Domain string `gorm:"type:varchar(255);not null;comment:域"` }
func (ExampleEntity) TableName ¶
func (ExampleEntity) TableName() string
type ExampleRepo ¶
type ExampleRepo struct {
// contains filtered or unexported fields
}
func (ExampleRepo) CreateExample ¶
func (ExampleRepo) DeleteExample ¶
func (ExampleRepo) GetExample ¶
func (ExampleRepo) GetExampleByParams ¶
func (r ExampleRepo) GetExampleByParams(ctx context.Context, params map[string]interface{}) (record *ExampleEntity, err error)
func (ExampleRepo) GetExampleCount ¶
func (ExampleRepo) ListExample ¶
func (ExampleRepo) RecoverExample ¶
func (ExampleRepo) UpdateExample ¶
Click to show internal directories.
Click to hide internal directories.