Documentation ¶
Index ¶
- type MetaRepo
- type MetaService
- func (ms *MetaService) AddMeta(ctx context.Context, objID, key, value string) (err error)
- func (ms *MetaService) GetMetaByObjectIdAndKey(ctx context.Context, objectID, key string) (meta *entity.Meta, err error)
- func (ms *MetaService) GetMetaList(ctx context.Context, objID string) (metas []*entity.Meta, err error)
- func (ms *MetaService) RemoveMeta(ctx context.Context, id int) (err error)
- func (ms *MetaService) UpdateMeta(ctx context.Context, metaID int, key, value string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) 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
type MetaService ¶
type MetaService struct {
// contains filtered or unexported fields
}
MetaService user service
func NewMetaService ¶
func NewMetaService(metaRepo MetaRepo) *MetaService
func (*MetaService) AddMeta ¶
func (ms *MetaService) AddMeta(ctx context.Context, objID, key, value string) (err error)
AddMeta add meta
func (*MetaService) GetMetaByObjectIdAndKey ¶
func (ms *MetaService) GetMetaByObjectIdAndKey(ctx context.Context, objectID, key string) (meta *entity.Meta, err error)
GetMetaByObjectIdAndKey get meta one
func (*MetaService) GetMetaList ¶
func (ms *MetaService) GetMetaList(ctx context.Context, objID string) (metas []*entity.Meta, err error)
GetMetaList get meta list all
func (*MetaService) RemoveMeta ¶
func (ms *MetaService) RemoveMeta(ctx context.Context, id int) (err error)
RemoveMeta delete meta
func (*MetaService) UpdateMeta ¶
UpdateMeta update meta
Click to show internal directories.
Click to hide internal directories.