Documentation ¶
Index ¶
- Constants
- type AttributeDto
- type AttributeKV
- type BatchAttribute
- type MgoAttribute
- func (s *MgoAttribute) DeleteAllByBizId(ctx context.Context, id string) (int64, error)
- func (s *MgoAttribute) DeleteAttributeByBizId(ctx context.Context, id string, delKeys []string) (int64, error)
- func (s *MgoAttribute) GetAssetAttribute(ctx context.Context, id string) (map[string]interface{}, error)
- func (s *MgoAttribute) GetAttributeByBizId(ctx context.Context, id string, path []string) (interface{}, error)
- func (s *MgoAttribute) ListByBizIds(ctx context.Context, ids []string) ([]map[string]interface{}, error)
- func (s *MgoAttribute) Page(ctx context.Context, filter bson.D, p *Page) (PageResult, error)
- func (s *MgoAttribute) Save(ctx context.Context, kv []*AttributeKV) (string, error)
- func (s *MgoAttribute) SaveBatch(ctx context.Context, batchKv *BatchAttribute) ([]string, error)
- func (s *MgoAttribute) UpdateBatch(ctx context.Context, id string, dto *AttributeDto) (int64, error)
- func (s *MgoAttribute) UpdateOneByBizId(ctx context.Context, id string, m *AttributeDto) (int64, error)
- func (s *MgoAttribute) UseCollection(c string) *MgoAttribute
- type MgoAttributeBackup
- func (s *MgoAttributeBackup) DeleteAllById(ctx context.Context, id string) (int64, error)
- func (s *MgoAttributeBackup) DeleteAttributeById(ctx context.Context, id string, delKeys []string) (int64, error)
- func (s *MgoAttributeBackup) GetAttributeById(ctx context.Context, id string, path []string) (interface{}, error)
- func (s *MgoAttributeBackup) Page(ctx context.Context, filter bson.D, p *Page) (PageResult, error)
- func (s *MgoAttributeBackup) Save(ctx context.Context, kv []*AttributeKV) (*Result, error)
- func (s *MgoAttributeBackup) SaveBatch(ctx context.Context, batchKv *BatchAttribute) ([]string, error)
- func (s *MgoAttributeBackup) UpdateBatch(ctx context.Context, id string, dto *AttributeDto) (int64, error)
- func (s *MgoAttributeBackup) UseCollection(c string)
- type Page
- type PageResult
- type Result
- type Service
- type Sort
- type UpdateResult
Constants ¶
View Source
const BizId = "biz_id"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeDto ¶
type AttributeDto struct {
KV []*AttributeKV
}
type AttributeKV ¶
type AttributeKV struct { Key string Value interface{} }
type BatchAttribute ¶
type BatchAttribute struct {
BatchKv []*AttributeDto
}
type MgoAttribute ¶
type MgoAttribute struct {
// contains filtered or unexported fields
}
func NewMongoAttribute ¶
func NewMongoAttribute(m *mongo.Database, c string) *MgoAttribute
func (*MgoAttribute) DeleteAllByBizId ¶
func (*MgoAttribute) DeleteAttributeByBizId ¶
func (*MgoAttribute) GetAssetAttribute ¶
func (*MgoAttribute) GetAttributeByBizId ¶
func (*MgoAttribute) ListByBizIds ¶
func (*MgoAttribute) Page ¶
func (s *MgoAttribute) Page(ctx context.Context, filter bson.D, p *Page) (PageResult, error)
func (*MgoAttribute) Save ¶
func (s *MgoAttribute) Save(ctx context.Context, kv []*AttributeKV) (string, error)
func (*MgoAttribute) SaveBatch ¶
func (s *MgoAttribute) SaveBatch(ctx context.Context, batchKv *BatchAttribute) ([]string, error)
func (*MgoAttribute) UpdateBatch ¶
func (s *MgoAttribute) UpdateBatch(ctx context.Context, id string, dto *AttributeDto) (int64, error)
func (*MgoAttribute) UpdateOneByBizId ¶
func (s *MgoAttribute) UpdateOneByBizId(ctx context.Context, id string, m *AttributeDto) (int64, error)
func (*MgoAttribute) UseCollection ¶
func (s *MgoAttribute) UseCollection(c string) *MgoAttribute
type MgoAttributeBackup ¶
type MgoAttributeBackup struct {
// contains filtered or unexported fields
}
func NewMongoBackAttribute ¶
func NewMongoBackAttribute(m *mongo.Database, c string) *MgoAttributeBackup
func (*MgoAttributeBackup) DeleteAllById ¶
func (*MgoAttributeBackup) DeleteAttributeById ¶
func (*MgoAttributeBackup) GetAttributeById ¶
func (*MgoAttributeBackup) Page ¶
func (s *MgoAttributeBackup) Page(ctx context.Context, filter bson.D, p *Page) (PageResult, error)
func (*MgoAttributeBackup) Save ¶
func (s *MgoAttributeBackup) Save(ctx context.Context, kv []*AttributeKV) (*Result, error)
func (*MgoAttributeBackup) SaveBatch ¶
func (s *MgoAttributeBackup) SaveBatch(ctx context.Context, batchKv *BatchAttribute) ([]string, error)
func (*MgoAttributeBackup) UpdateBatch ¶
func (s *MgoAttributeBackup) UpdateBatch(ctx context.Context, id string, dto *AttributeDto) (int64, error)
func (*MgoAttributeBackup) UseCollection ¶
func (s *MgoAttributeBackup) UseCollection(c string)
type PageResult ¶
type Service ¶
type Service interface { Save(ctx context.Context, kv []*AttributeKV) (string, error) UpdateOneByBizId(ctx context.Context, id string, m *AttributeDto) (int64, error) SaveBatch(ctx context.Context, batchKv *BatchAttribute) ([]string, error) UpdateBatch(ctx context.Context, id string, dto *AttributeDto) (int64, error) DeleteAllByBizId(ctx context.Context, id string) (int64, error) DeleteAttributeByBizId(ctx context.Context, id string, delKeys []string) (int64, error) GetAttributeByBizId(ctx context.Context, id string, path []string) (interface{}, error) }
type UpdateResult ¶
Click to show internal directories.
Click to hide internal directories.