Documentation ¶
Index ¶
- func GetMetaWithError(err error) *v1.Metadata
- func GetMetaWithErrorString(err string) *v1.Metadata
- func GetSnowflakeId() int64
- func GetSuccessMeta() *v1.Metadata
- func InitDefaultSnowflakeNode(node int64)
- func InitStdLogger(config *conf.App) log.Logger
- type DBClient
- func (c *DBClient) DB(ctx context.Context) *gorm.DB
- func (c *DBClient) ExecTx(ctx context.Context, fn func(ctx context.Context) error) error
- func (c *DBClient) GetDB() *gorm.DB
- func (c *DBClient) WhereWithPaginateAndSort(ctx context.Context, fn WhereConditionFn, value interface{}, sort string, ...) *gorm.DB
- type Transaction
- type WhereConditionFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetaWithError ¶
func GetMetaWithErrorString ¶
func GetSnowflakeId ¶
func GetSnowflakeId() int64
func GetSuccessMeta ¶
func InitDefaultSnowflakeNode ¶
func InitDefaultSnowflakeNode(node int64)
Types ¶
type DBClient ¶
type DBClient struct {
// contains filtered or unexported fields
}
func (*DBClient) WhereWithPaginateAndSort ¶
func (c *DBClient) WhereWithPaginateAndSort( ctx context.Context, fn WhereConditionFn, value interface{}, sort string, request *dto.PaginationRequest, ) *gorm.DB
type Transaction ¶
Click to show internal directories.
Click to hide internal directories.