Documentation ¶
Index ¶
- Constants
- Variables
- type Balance
- type IBalanceMongoMapper
- type MongoMapper
- func (m *MongoMapper) Delete(ctx context.Context, id string) (int64, error)
- func (m *MongoMapper) FindOne(ctx context.Context, id string) (*Balance, error)
- func (m *MongoMapper) Insert(ctx context.Context, data *Balance) (string, error)
- func (m *MongoMapper) Update(ctx context.Context, data *Balance) (*mongo.UpdateResult, error)
Constants ¶
View Source
const CollectionName = "balance"
Variables ¶
View Source
var PrefixBalanceCacheKey = "cache:balance:"
Functions ¶
This section is empty.
Types ¶
type IBalanceMongoMapper ¶
type IBalanceMongoMapper interface { Insert(ctx context.Context, data *Balance) (string, error) // 插入 FindOne(ctx context.Context, id string) (*Balance, error) // 查找 Update(ctx context.Context, data *Balance) (*mongo.UpdateResult, error) // 修改 Delete(ctx context.Context, id string) (int64, error) // 删除 }
func NewMongoMapper ¶
func NewMongoMapper(config *config.Config) IBalanceMongoMapper
Click to show internal directories.
Click to hide internal directories.