[fix] use string and []byte to store resource #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
【issue】:#47
【修改内容】:
1、将原先 task 中的datatype和data修改成resource和resourceType,将原先的 interface 修改成[]byte
2、将service、schema、account、role都实现了上诉的 resource 接口
3、修改了task中的task_id字段为id(因为task有点多余),还有就是换了下 task 中几个字段的位置,按重要性拍了个序
【修改原因】:因为struct里面含有interface,marshal后再unmarshal回来,相应的结构体无法解析,有好几种解决方案。还是转换为[]byte,后unmarshal后再次unmarshal对应的资源类型就可以了
【影响范围】:无