-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
morph: add method for container's new metainfo method
Follows nspcc-dev/neofs-contract#414. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package container | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/nspcc-dev/neofs-node/pkg/morph/client" | ||
) | ||
|
||
// SubmitObjectPut puts object meta information. | ||
// | ||
// Returns any error encountered that caused the saving to interrupt. | ||
func (c *Client) SubmitObjectPut(meta []byte, sigs [][]byte) error { | ||
if len(meta) == 0 || len(sigs) == 0 { | ||
return errNilArgument | ||
} | ||
|
||
var prm client.InvokePrm | ||
prm.SetMethod(submitObjectPutMethod) | ||
prm.SetArgs(meta, sigs) | ||
|
||
err := c.client.Invoke(prm) | ||
if err != nil { | ||
return fmt.Errorf("could not invoke method (%s): %w", submitObjectPutMethod, err) | ||
} | ||
|
||
return nil | ||
} |