forked from TrueCloudLab/policy-engine
[#75] chain: Refactor ObjectType
type
* Rename `ObjectType` to `Kind`; * Rename `Object` field in `Condition` to `ConditionKind`; * Regenerate easy-json marshalers/unmarshalers; * Fix unit-tests Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
This commit is contained in:
parent
e75200bb8e
commit
84c4872b20
13 changed files with 287 additions and 287 deletions
|
@ -218,7 +218,7 @@ func marshalCondition(buf []byte, offset int, c Condition) (int, error) {
|
|||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
offset, err = marshal.ByteMarshal(buf, offset, byte(c.Object))
|
||||
offset, err = marshal.ByteMarshal(buf, offset, byte(c.Kind))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ func unmarshalCondition(buf []byte, offset int) (Condition, int, error) {
|
|||
if err != nil {
|
||||
return Condition{}, 0, err
|
||||
}
|
||||
c.Object = ObjectType(obV)
|
||||
c.Kind = ConditionKindType(obV)
|
||||
|
||||
c.Key, offset, err = marshal.StringUnmarshal(buf, offset)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue