forked from TrueCloudLab/frostfs-node
[#907] morph/event/container: Define PutNamed event
Define `PutNamed` structure of notary notification from `putNamed` method of Container contract. Embed `Put` type in order to inherit methods and parsing of common parts with `put` method. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3173bf345e
commit
a9494412da
1 changed files with 17 additions and 0 deletions
|
@ -47,6 +47,23 @@ func (p Put) NotaryRequest() *payload.P2PNotaryRequest {
|
||||||
return p.notaryRequest
|
return p.notaryRequest
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PutNamed represents notification event spawned by PutNamed method from Container contract of NeoFS Morph chain.
|
||||||
|
type PutNamed struct {
|
||||||
|
Put
|
||||||
|
|
||||||
|
name, zone string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Name returns "name" arg of contract call.
|
||||||
|
func (x PutNamed) Name() string {
|
||||||
|
return x.name
|
||||||
|
}
|
||||||
|
|
||||||
|
// Zone returns "zone" arg of contract call.
|
||||||
|
func (x PutNamed) Zone() string {
|
||||||
|
return x.zone
|
||||||
|
}
|
||||||
|
|
||||||
// ParsePut from notification into container event structure.
|
// ParsePut from notification into container event structure.
|
||||||
func ParsePut(params []stackitem.Item) (event.Event, error) {
|
func ParsePut(params []stackitem.Item) (event.Event, error) {
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in a new issue