51 lines
1.3 KiB
Go
51 lines
1.3 KiB
Go
package goap
|
|
|
|
type W3SecurityOwnerData struct {
|
|
FullIdType
|
|
}
|
|
|
|
func (actor *W3SecurityOwnerData) GetSelfOrBase() (BaseApChain, bool) {
|
|
return actor.FullIdType.GetSelfOrBase()
|
|
}
|
|
|
|
func (actor *W3SecurityOwnerData) MarshalToMap() map[string]any {
|
|
return actor.FullIdType.MarshalToMapWithName(KEY_W3_SECURITY_OWNER)
|
|
}
|
|
|
|
type W3SecurityPublicKeyData struct {
|
|
Next BaseApChain
|
|
Id string
|
|
Owner string
|
|
Key string
|
|
}
|
|
|
|
func (publickeydata *W3SecurityPublicKeyData) GetSelfOrBase() (BaseApChain, bool) {
|
|
return publickeydata.Next, true
|
|
}
|
|
|
|
func (publickeydata *W3SecurityPublicKeyData) MarshalToMap() map[string]any {
|
|
m := publickeydata.Next.MarshalToMap()
|
|
m[KEY_W3_SECURITY_PUBLICKEY] = []map[string]any{{
|
|
KEY_ID: publickeydata.Id,
|
|
KEY_W3_SECURITY_OWNER: []map[string]any{{KEY_ID: publickeydata.Owner}},
|
|
KEY_W3_SECURITY_PUBLICKEYPEM: []map[string]any{{KEY_VALUE: publickeydata.Key}},
|
|
}}
|
|
return m
|
|
}
|
|
|
|
type W3SecurityPublicKeyPemData struct {
|
|
Next BaseApChain
|
|
Value ValueValue[bool]
|
|
}
|
|
|
|
func (namedata *W3SecurityPublicKeyPemData) GetSelfOrBase() (BaseApChain, bool) {
|
|
return namedata.Next, true
|
|
}
|
|
|
|
func (namedata *W3SecurityPublicKeyPemData) MarshalToMap() map[string]any {
|
|
return appendWithKey(
|
|
namedata.Next.MarshalToMap(),
|
|
KEY_W3_SECURITY_PUBLICKEYPEM,
|
|
[]map[string]any{namedata.Value.Marshal()},
|
|
)
|
|
}
|