[#1] Fix comments and error messages

Signed-off-by: Stanislav Bogatyrev <s.bogatyrev@yadro.com>
This commit is contained in:
Stanislav Bogatyrev 2023-02-05 18:59:38 +03:00 committed by Stanislav Bogatyrev
parent c761a95eef
commit cb016d53a6
96 changed files with 167 additions and 167 deletions

View file

@ -7,7 +7,7 @@ import (
)
type CommonBindPrm struct {
ownerID []byte // NeoFS account identifier
ownerID []byte // FrostFS account identifier
keys [][]byte // list of serialized public keys
@ -18,7 +18,7 @@ func (x *CommonBindPrm) SetOptionalPrm(prm client.InvokePrmOptional) {
x.InvokePrmOptional = prm
}
// SetOwnerID sets NeoFS account identifier.
// SetOwnerID sets FrostFS account identifier.
func (x *CommonBindPrm) SetOwnerID(v []byte) {
x.ownerID = v
}
@ -28,7 +28,7 @@ func (x *CommonBindPrm) SetKeys(v [][]byte) {
x.keys = v
}
// AddKeys adds a list of public keys to/from NeoFS account.
// AddKeys adds a list of public keys to/from FrostFS account.
func (x *Client) AddKeys(p CommonBindPrm) error {
prm := client.InvokePrm{}
@ -44,7 +44,7 @@ func (x *Client) AddKeys(p CommonBindPrm) error {
return nil
}
// RemoveKeys removes a list of public keys to/from NeoFS account.
// RemoveKeys removes a list of public keys to/from FrostFS account.
func (x *Client) RemoveKeys(args CommonBindPrm) error {
prm := client.InvokePrm{}

View file

@ -10,14 +10,14 @@ import (
// Client is a wrapper over StaticClient
// which makes calls with the names and arguments
// of the NeoFS ID contract.
// of the FrostFS ID contract.
//
// Working client must be created via constructor New.
// Using the Client that has been created with new(Client)
// expression (or just declaring a Client variable) is unsafe
// and can lead to panic.
type Client struct {
client *client.StaticClient // static NeoFS ID contract client
client *client.StaticClient // static FrostFS ID contract client
}
const (
@ -26,7 +26,7 @@ const (
removeKeysMethod = "removeKey"
)
// NewFromMorph wraps client to work with NeoFS ID contract.
// NewFromMorph wraps client to work with FrostFS ID contract.
func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8, opts ...Option) (*Client, error) {
o := defaultOpts()
@ -36,7 +36,7 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8,
sc, err := client.NewStatic(cli, contract, fee, ([]client.StaticClientOption)(*o)...)
if err != nil {
return nil, fmt.Errorf("could not create client of NeoFS ID contract: %w", err)
return nil, fmt.Errorf("could not create client of FrostFS ID contract: %w", err)
}
return &Client{client: sc}, nil

View file

@ -19,7 +19,7 @@ func (a *AccountKeysPrm) SetID(id user.ID) {
a.id = id
}
// AccountKeys requests public keys of NeoFS account from NeoFS ID contract.
// AccountKeys requests public keys of FrostFS account from FrostFS ID contract.
func (x *Client) AccountKeys(p AccountKeysPrm) (keys.PublicKeys, error) {
prm := client.TestInvokePrm{}
prm.SetMethod(keyListingMethod)