frostfs-node/pkg/morph/event/frostfs/unbind.go
Alex Vanin 20de74a505 Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 16:38:26 +03:00

33 lines
563 B
Go

package frostfs
import (
"fmt"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
"github.com/nspcc-dev/neo-go/pkg/core/state"
)
type Unbind struct {
bindCommon
}
func ParseUnbind(e *state.ContainedNotificationEvent) (event.Event, error) {
var (
ev Unbind
err error
)
params, err := event.ParseStackArray(e)
if err != nil {
return nil, fmt.Errorf("could not parse stack items from notify event: %w", err)
}
err = parseBind(&ev.bindCommon, params)
if err != nil {
return nil, err
}
ev.txHash = e.Container
return ev, nil
}