Documentation ¶
Index ¶
- type MetaCommonService
- func (ms *MetaCommonService) AddMeta(ctx context.Context, objID, key, value string) (err error)
- func (ms *MetaCommonService) AddOrUpdateMetaByObjectIdAndKey(ctx context.Context, objID, key string, ...) (err error)
- func (ms *MetaCommonService) GetMetaByObjectIdAndKey(ctx context.Context, objectID, key string) (meta *entity.Meta, err error)
- func (ms *MetaCommonService) GetMetaList(ctx context.Context, objID string) (metas []*entity.Meta, err error)
- func (ms *MetaCommonService) RemoveMeta(ctx context.Context, id int) (err error)
- func (ms *MetaCommonService) UpdateMeta(ctx context.Context, metaID int, key, value string) (err error)
- type MetaRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetaCommonService ¶
type MetaCommonService struct {
// contains filtered or unexported fields
}
MetaCommonService user service
func NewMetaCommonService ¶
func NewMetaCommonService(metaRepo MetaRepo) *MetaCommonService
func (*MetaCommonService) AddMeta ¶
func (ms *MetaCommonService) AddMeta(ctx context.Context, objID, key, value string) (err error)
AddMeta add meta
func (*MetaCommonService) AddOrUpdateMetaByObjectIdAndKey ¶
func (*MetaCommonService) GetMetaByObjectIdAndKey ¶
func (ms *MetaCommonService) GetMetaByObjectIdAndKey(ctx context.Context, objectID, key string) (meta *entity.Meta, err error)
GetMetaByObjectIdAndKey get meta one
func (*MetaCommonService) GetMetaList ¶
func (ms *MetaCommonService) GetMetaList(ctx context.Context, objID string) (metas []*entity.Meta, err error)
GetMetaList get meta list all
func (*MetaCommonService) RemoveMeta ¶
func (ms *MetaCommonService) RemoveMeta(ctx context.Context, id int) (err error)
RemoveMeta delete meta
func (*MetaCommonService) UpdateMeta ¶
func (ms *MetaCommonService) UpdateMeta(ctx context.Context, metaID int, key, value string) (err error)
UpdateMeta update meta
type MetaRepo ¶
type MetaRepo interface { AddMeta(ctx context.Context, meta *entity.Meta) (err error) RemoveMeta(ctx context.Context, id int) (err error) UpdateMeta(ctx context.Context, meta *entity.Meta) (err error) AddOrUpdateMetaByObjectIdAndKey(ctx context.Context, objectId, key string, f func(*entity.Meta, bool) (*entity.Meta, error)) error GetMetaByObjectIdAndKey(ctx context.Context, objectId, key string) (meta *entity.Meta, exist bool, err error) GetMetaList(ctx context.Context, meta *entity.Meta) (metas []*entity.Meta, err error) }
MetaRepo meta repository
Click to show internal directories.
Click to hide internal directories.