diff --git a/README.md b/README.md index 1a739eb..c88d6c5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # frostfs-sdk-go -Go implementation of NeoFS SDK. It contains high-level version-independent wrappers +Go implementation of FrostFS SDK. It contains high-level version-independent wrappers for structures from [frostfs-api-go](https://github.com/TrueCloudLab/frostfs-api-go) as well as helper functions for simplifying node/dApp implementations. @@ -10,39 +10,39 @@ Contains fixed-point `Decimal` type for performing balance calculations. ### eacl Contains Extended ACL types for fine-grained access control. -There is also a reference implementation of checking algorithm which is used in NeoFS node. +There is also a reference implementation of checking algorithm which is used in FrostFS node. ### checksum Contains `Checksum` type encapsulating checksum as well as it's kind. Currently Sha256 and [Tillich-Zemor hashsum](https://github.com/TrueCloudLab/tzhash) are in use. ### owner -`owner.ID` type represents single account interacting with NeoFS. In v2 version of protocol +`owner.ID` type represents single account interacting with FrostFS. In v2 version of protocol it is just raw bytes behing [base58-encoded address](https://docs.neo.org/docs/en-us/basic/concept/wallets.html#address) in Neo blockchain. Note that for historical reasons it contains version prefix and checksum in addition to script-hash. ### token -Contains Bearer token type with several NeoFS-specific methods. +Contains Bearer token type with several FrostFS-specific methods. ### ns -In NeoFS there are 2 types of name resolution: DNS and NNS. NNS stands for Neo Name Service +In FrostFS there are 2 types of name resolution: DNS and NNS. NNS stands for Neo Name Service is just a [contract](https://github.com/TrueCloudLab/frostfs-contract) deployed on a Neo blockchain. Basically, NNS is just a DNS-on-chain which can be used for resolving container nice-names as well as any other name in dApps. See our [CoreDNS plugin](https://github.com/nspcc-dev/coredns/tree/master/plugin/nns) for the example of how NNS can be integrated in DNS. ### session -To help lightweight clients interact with NeoFS without sacrificing trust, NeoFS has a concept +To help lightweight clients interact with FrostFS without sacrificing trust, FrostFS has a concept of session token. It is signed by client and allows any node with which a session is established to perform certain actions on behalf of the user. ### client -Contains client for working with NeoFS. +Contains client for working with FrostFS. ```go var prmInit client.PrmInit prmInit.SetDefaultPrivateKey(key) // private key for request signing -prmInit.ResolveNeoFSFailures() // enable erroneous status parsing +prmInit.ResolveFrostFSFailures() // enable erroneous status parsing var c client.Client c.Init(prmInit) @@ -70,15 +70,15 @@ fmt.Printf("Balance for %s: %v\n", acc, res.Amount()) ``` #### Response status -In NeoFS every operation can fail on multiple levels, so a single `error` doesn't suffice, +In FrostFS every operation can fail on multiple levels, so a single `error` doesn't suffice, e.g. consider a case when object was put on 4 out of 5 replicas. Thus, all request execution details are contained in `Status` returned from every RPC call. dApp can inspect them if needed and perform any desired action. In the case above we may want to report these details to the user as well as retry an operation, possibly with different parameters. Status wire-format is extendable and each node can report any set of details it wants. The set of reserved status codes can be found in -[NeoFS API](https://github.com/TrueCloudLab/frostfs-api/blob/master/status/types.proto). There is also -a `client.PrmInit.ResolveNeoFSFailures()` to seamlessly convert erroneous statuses into Go error type. +[FrostFS API](https://github.com/TrueCloudLab/frostfs-api/blob/master/status/types.proto). There is also +a `client.PrmInit.ResolveFrostFSFailures()` to seamlessly convert erroneous statuses into Go error type. ### policy Contains helpers allowing conversion of placing policy from/to JSON representation @@ -107,7 +107,7 @@ import ( ) func placementNodes(addr *object.Address, p *netmap.PlacementPolicy, frostfsNodes []netmap.NodeInfo) { - // Convert list of nodes in NeoFS API format to the intermediate representation. + // Convert list of nodes in FrostFS API format to the intermediate representation. nodes := netmap.NodesFromInfo(nodes) // Create new netmap (errors are skipped for the sake of clarity). @@ -122,13 +122,13 @@ func placementNodes(addr *object.Address, p *netmap.PlacementPolicy, frostfsNode ``` ### pool -Simple pool for managing connections to NeoFS nodes. +Simple pool for managing connections to FrostFS nodes. ### acl, checksum, version, signature Contain simple API wrappers. ### logger -Wrapper over `zap.Logger` which is used across NeoFS codebase. +Wrapper over `zap.Logger` which is used across FrostFS codebase. ### util Utilities for working with signature-related code. \ No newline at end of file diff --git a/accounting/decimal.go b/accounting/decimal.go index 459bb99..8902121 100644 --- a/accounting/decimal.go +++ b/accounting/decimal.go @@ -15,7 +15,7 @@ import "github.com/TrueCloudLab/frostfs-api-go/v2/accounting" type Decimal accounting.Decimal // ReadFromV2 reads Decimal from the accounting.Decimal message. Checks if the -// message conforms to NeoFS API V2 protocol. +// message conforms to FrostFS API V2 protocol. // // See also WriteToV2. func (d *Decimal) ReadFromV2(m accounting.Decimal) error { diff --git a/accounting/doc.go b/accounting/doc.go index a235386..9dede1b 100644 --- a/accounting/doc.go +++ b/accounting/doc.go @@ -1,5 +1,5 @@ /* -Package accounting provides primitives to perform accounting operations in NeoFS. +Package accounting provides primitives to perform accounting operations in FrostFS. Decimal type provides functionality to process user balances. For example, when working with Fixed8 balance precision: @@ -8,7 +8,7 @@ working with Fixed8 balance precision: dec.SetValue(val) dec.SetPrecision(8) -Instances can be also used to process NeoFS API V2 protocol messages +Instances can be also used to process FrostFS API V2 protocol messages (see neo.fs.v2.accounting package in https://github.com/TrueCloudLab/frostfs-api). On client side: diff --git a/audit/doc.go b/audit/doc.go index a41f88d..e66fb56 100644 --- a/audit/doc.go +++ b/audit/doc.go @@ -1,5 +1,5 @@ /* -Package audit provides features to process data audit in NeoFS system. +Package audit provides features to process data audit in FrostFS system. Result type groups values which can be gathered during data audit process: diff --git a/audit/result.go b/audit/result.go index e6d1f13..52db9d4 100644 --- a/audit/result.go +++ b/audit/result.go @@ -11,7 +11,7 @@ import ( "github.com/TrueCloudLab/frostfs-sdk-go/version" ) -// Result represents report on the results of the data audit in NeoFS system. +// Result represents report on the results of the data audit in FrostFS system. // // Result is mutually binary-compatible with github.com/TrueCloudLab/frostfs-api-go/v2/audit.DataAuditResult // message. See Marshal / Unmarshal methods. @@ -23,7 +23,7 @@ type Result struct { v2 audit.DataAuditResult } -// Marshal encodes Result into a canonical NeoFS binary format (Protocol Buffers +// Marshal encodes Result into a canonical FrostFS binary format (Protocol Buffers // with direct field order). // // Writes version.Current() protocol version into the resulting message if Result @@ -43,7 +43,7 @@ func (r *Result) Marshal() []byte { var errCIDNotSet = errors.New("container ID is not set") -// Unmarshal decodes Result from its canonical NeoFS binary format (Protocol Buffers +// Unmarshal decodes Result from its canonical FrostFS binary format (Protocol Buffers // with direct field order). Returns an error describing a format violation. // // See also Marshal. @@ -91,7 +91,7 @@ func (r *Result) Unmarshal(data []byte) error { return nil } -// Epoch returns NeoFS epoch when the data associated with the Result was audited. +// Epoch returns FrostFS epoch when the data associated with the Result was audited. // // Zero Result has zero epoch. // @@ -100,7 +100,7 @@ func (r Result) Epoch() uint64 { return r.v2.GetAuditEpoch() } -// ForEpoch specifies NeoFS epoch when the data associated with the Result was audited. +// ForEpoch specifies FrostFS epoch when the data associated with the Result was audited. // // See also Epoch. func (r *Result) ForEpoch(epoch uint64) { @@ -136,8 +136,8 @@ func (r *Result) ForContainer(cnr cid.ID) { r.v2.SetContainerID(&cidV2) } -// AuditorKey returns public key of the auditing NeoFS Inner Ring node in -// a NeoFS binary key format. +// AuditorKey returns public key of the auditing FrostFS Inner Ring node in +// a FrostFS binary key format. // // Zero Result has nil key. Return value MUST NOT be mutated: to do this, // first make a copy. @@ -147,8 +147,8 @@ func (r Result) AuditorKey() []byte { return r.v2.GetPublicKey() } -// SetAuditorKey specifies public key of the auditing NeoFS Inner Ring node in -// a NeoFS binary key format. +// SetAuditorKey specifies public key of the auditing FrostFS Inner Ring node in +// a FrostFS binary key format. // // Argument MUST NOT be mutated at least until the end of using the Result. // diff --git a/bearer/bearer.go b/bearer/bearer.go index 2b0ae28..9fbd07e 100644 --- a/bearer/bearer.go +++ b/bearer/bearer.go @@ -136,7 +136,7 @@ func (b Token) WriteToV2(m *acl.BearerToken) { } // SetExp sets "exp" (expiration time) claim which identifies the -// expiration time (in NeoFS epochs) after which the Token MUST NOT be +// expiration time (in FrostFS epochs) after which the Token MUST NOT be // accepted for processing. The processing of the "exp" claim requires // that the current epoch MUST be before or equal to the expiration epoch // listed in the "exp" claim. @@ -150,7 +150,7 @@ func (b *Token) SetExp(exp uint64) { } // SetNbf sets "nbf" (not before) claim which identifies the time (in -// NeoFS epochs) before which the Token MUST NOT be accepted for processing. The +// FrostFS epochs) before which the Token MUST NOT be accepted for processing. The // processing of the "nbf" claim requires that the current epoch MUST be // after or equal to the not-before epoch listed in the "nbf" claim. // @@ -162,7 +162,7 @@ func (b *Token) SetNbf(nbf uint64) { b.lifetimeSet = true } -// SetIat sets "iat" (issued at) claim which identifies the time (in NeoFS +// SetIat sets "iat" (issued at) claim which identifies the time (in FrostFS // epochs) at which the Token was issued. This claim can be used to determine // the age of the Token. // @@ -189,7 +189,7 @@ func (b Token) InvalidAt(epoch uint64) bool { // within any issuer's container. // // SetEACLTable MUST be called if Token is going to be transmitted over -// NeoFS API V2 protocol. +// FrostFS API V2 protocol. // // See also EACLTable, AssertContainer. func (b *Token) SetEACLTable(table eacl.Table) { @@ -249,7 +249,7 @@ func (b Token) AssertUser(id user.ID) bool { // Returns signature calculation errors. // // Sign MUST be called if Token is going to be transmitted over -// NeoFS API V2 protocol. +// FrostFS API V2 protocol. // // Note that any Token mutation is likely to break the signature, so it is // expected to be calculated as a final stage of Token formation. @@ -285,7 +285,7 @@ func (b Token) VerifySignature() bool { return sig.ReadFromV2(b.sig) == nil && sig.Verify(b.signedData()) } -// Marshal encodes Token into a binary format of the NeoFS API protocol +// Marshal encodes Token into a binary format of the FrostFS API protocol // (Protocol Buffers V3 with direct field order). // // See also Unmarshal. @@ -296,7 +296,7 @@ func (b Token) Marshal() []byte { return m.StableMarshal(nil) } -// Unmarshal decodes NeoFS API protocol binary data into the Token +// Unmarshal decodes FrostFS API protocol binary data into the Token // (Protocol Buffers V3 with direct field order). Returns an error describing // a format violation. // @@ -312,7 +312,7 @@ func (b *Token) Unmarshal(data []byte) error { return b.readFromV2(m, false) } -// MarshalJSON encodes Token into a JSON format of the NeoFS API protocol +// MarshalJSON encodes Token into a JSON format of the FrostFS API protocol // (Protocol Buffers V3 JSON). // // See also UnmarshalJSON. @@ -323,7 +323,7 @@ func (b Token) MarshalJSON() ([]byte, error) { return m.MarshalJSON() } -// UnmarshalJSON decodes NeoFS API protocol JSON data into the Token +// UnmarshalJSON decodes FrostFS API protocol JSON data into the Token // (Protocol Buffers V3 JSON). Returns an error describing a format violation. // // See also MarshalJSON. @@ -339,7 +339,7 @@ func (b *Token) UnmarshalJSON(data []byte) error { } // SigningKeyBytes returns issuer's public key in a binary format of -// NeoFS API protocol. +// FrostFS API protocol. // // Unsigned Token has empty key. // diff --git a/checksum/checksum.go b/checksum/checksum.go index 01e191b..96c33e5 100644 --- a/checksum/checksum.go +++ b/checksum/checksum.go @@ -38,7 +38,7 @@ const ( ) // ReadFromV2 reads Checksum from the refs.Checksum message. Checks if the -// message conforms to NeoFS API V2 protocol. +// message conforms to FrostFS API V2 protocol. // // See also WriteToV2. func (c *Checksum) ReadFromV2(m refs.Checksum) error { diff --git a/client/accounting.go b/client/accounting.go index ede7d84..0ebad13 100644 --- a/client/accounting.go +++ b/client/accounting.go @@ -19,7 +19,7 @@ type PrmBalanceGet struct { account user.ID } -// SetAccount sets identifier of the NeoFS account for which the balance is requested. +// SetAccount sets identifier of the FrostFS account for which the balance is requested. // Required parameter. func (x *PrmBalanceGet) SetAccount(id user.ID) { x.account = id @@ -33,17 +33,17 @@ type ResBalanceGet struct { amount accounting.Decimal } -// Amount returns current amount of funds on the NeoFS account as decimal number. +// Amount returns current amount of funds on the FrostFS account as decimal number. func (x ResBalanceGet) Amount() accounting.Decimal { return x.amount } -// BalanceGet requests current balance of the NeoFS account. +// BalanceGet requests current balance of the FrostFS account. // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`, -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmBalanceGet docs). diff --git a/client/api.go b/client/api.go index 56bd336..83ea363 100644 --- a/client/api.go +++ b/client/api.go @@ -9,13 +9,13 @@ import ( "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" ) -// interface of NeoFS API server. Exists for test purposes only. -type neoFSAPIServer interface { +// interface of FrostFS API server. Exists for test purposes only. +type frostFSAPIServer interface { netMapSnapshot(context.Context, v2netmap.SnapshotRequest) (*v2netmap.SnapshotResponse, error) } -// wrapper over real client connection which communicates over NeoFS API protocol. -// Provides neoFSAPIServer for Client instances used in real applications. +// wrapper over real client connection which communicates over FrostFS API protocol. +// Provides frostFSAPIServer for Client instances used in real applications. type coreServer client.Client // unifies errors of all RPC. @@ -23,7 +23,7 @@ func rpcErr(e error) error { return fmt.Errorf("rpc failure: %w", e) } -// executes NetmapService.NetmapSnapshot RPC declared in NeoFS API protocol +// executes NetmapService.NetmapSnapshot RPC declared in FrostFS API protocol // using underlying client.Client. func (x *coreServer) netMapSnapshot(ctx context.Context, req v2netmap.SnapshotRequest) (*v2netmap.SnapshotResponse, error) { resp, err := rpcapi.NetMapSnapshot((*client.Client)(x), &req, client.WithContext(ctx)) diff --git a/client/client.go b/client/client.go index fc3d918..4c07133 100644 --- a/client/client.go +++ b/client/client.go @@ -12,14 +12,14 @@ import ( "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" ) -// Client represents virtual connection to the NeoFS network to communicate -// with NeoFS server using NeoFS API protocol. It is designed to provide +// Client represents virtual connection to the FrostFS network to communicate +// with FrostFS server using FrostFS API protocol. It is designed to provide // an abstraction interface from the protocol details of data transfer over -// a network in NeoFS. +// a network in FrostFS. // // Client can be created using simple Go variable declaration. Before starting // work with the Client, it SHOULD BE correctly initialized (see Init method). -// Before executing the NeoFS operations using the Client, connection to the +// Before executing the FrostFS operations using the Client, connection to the // server MUST BE correctly established (see Dial method and pay attention // to the mandatory parameters). Using the Client before connecting have // been established can lead to a panic. After the work, the Client SHOULD BE @@ -28,7 +28,7 @@ import ( // during the communication process step strongly discouraged as it leads to // undefined behavior. // -// Each method which produces a NeoFS API call may return a server response. +// Each method which produces a FrostFS API call may return a server response. // Status responses are returned in the result structure, and can be cast // to built-in error instance (or in the returned error if the client is // configured accordingly). Certain statuses can be checked using `apistatus` @@ -48,7 +48,7 @@ type Client struct { c client.Client - server neoFSAPIServer + server frostFSAPIServer } // Init brings the Client instance to its initial state. @@ -61,7 +61,7 @@ func (c *Client) Init(prm PrmInit) { c.prm = prm } -// Dial establishes a connection to the server from the NeoFS network. +// Dial establishes a connection to the server from the FrostFS network. // Returns an error describing failure reason. If failed, the Client // SHOULD NOT be used. // @@ -103,7 +103,7 @@ func (c *Client) Dial(prm PrmDial) error { client.WithRWTimeout(prm.streamTimeout), )...) - c.setNeoFSAPIServer((*coreServer)(&c.c)) + c.setFrostFSAPIServer((*coreServer)(&c.c)) if prm.parentCtx == nil { prm.parentCtx = context.Background() @@ -121,15 +121,15 @@ func (c *Client) Dial(prm PrmDial) error { return nil } -// sets underlying provider of neoFSAPIServer. The method is used for testing as an approach -// to skip Dial stage and override NeoFS API server. MUST NOT be used outside test code. +// sets underlying provider of frostFSAPIServer. The method is used for testing as an approach +// to skip Dial stage and override FrostFS API server. MUST NOT be used outside test code. // In real applications wrapper over github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client // is statically used. -func (c *Client) setNeoFSAPIServer(server neoFSAPIServer) { +func (c *Client) setFrostFSAPIServer(server frostFSAPIServer) { c.server = server } -// Close closes underlying connection to the NeoFS server. Implements io.Closer. +// Close closes underlying connection to the FrostFS server. Implements io.Closer. // MUST NOT be called before successful Dial. Can be called concurrently // with server operations processing on running goroutines: in this case // they are likely to fail due to a connection error. @@ -146,7 +146,7 @@ func (c *Client) Close() error { // // See also Init. type PrmInit struct { - resolveNeoFSErrors bool + resolveFrostFSErrors bool key ecdsa.PrivateKey @@ -163,16 +163,16 @@ func (x *PrmInit) SetDefaultPrivateKey(key ecdsa.PrivateKey) { x.key = key } -// ResolveNeoFSFailures makes the Client to resolve failure statuses of the -// NeoFS protocol into Go built-in errors. These errors are returned from +// ResolveFrostFSFailures makes the Client to resolve failure statuses of the +// FrostFS protocol into Go built-in errors. These errors are returned from // each protocol operation. By default, statuses aren't resolved and written // to the resulting structure (see corresponding Res* docs). -func (x *PrmInit) ResolveNeoFSFailures() { - x.resolveNeoFSErrors = true +func (x *PrmInit) ResolveFrostFSFailures() { + x.resolveFrostFSErrors = true } // SetResponseInfoCallback makes the Client to pass ResponseMetaInfo from each -// NeoFS server response to f. Nil (default) means ignore response meta info. +// FrostFS server response to f. Nil (default) means ignore response meta info. func (x *PrmInit) SetResponseInfoCallback(f func(ResponseMetaInfo) error) { x.cbRespInfo = f } @@ -194,7 +194,7 @@ type PrmDial struct { parentCtx context.Context } -// SetServerURI sets server URI in the NeoFS network. +// SetServerURI sets server URI in the FrostFS network. // Required parameter. // // Format of the URI: @@ -212,7 +212,7 @@ func (x *PrmDial) SetServerURI(endpoint string) { } // SetTLSConfig sets tls.Config to open TLS client connection -// to the NeoFS server. Nil (default) means insecure connection. +// to the FrostFS server. Nil (default) means insecure connection. // // See also SetServerURI. func (x *PrmDial) SetTLSConfig(tlsConfig *tls.Config) { diff --git a/client/client_test.go b/client/client_test.go index a78b769..87dc7b4 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -28,13 +28,13 @@ func assertStatusErr(tb testing.TB, res interface{ Status() apistatus.Status }) require.Equal(tb, statusErr.Message(), res.Status().(*apistatus.ServerInternal).Message()) } -func newClient(server neoFSAPIServer) *Client { +func newClient(server frostFSAPIServer) *Client { var prm PrmInit prm.SetDefaultPrivateKey(*key) var c Client c.Init(prm) - c.setNeoFSAPIServer(server) + c.setFrostFSAPIServer(server) return &c } diff --git a/client/common.go b/client/common.go index 764e32c..8cee7b8 100644 --- a/client/common.go +++ b/client/common.go @@ -36,7 +36,7 @@ func (x statusRes) Status() apistatus.Status { // groups meta parameters shared between all Client operations. type prmCommonMeta struct { - // NeoFS request X-Headers + // FrostFS request X-Headers xHeaders []string } @@ -100,7 +100,7 @@ type contextCall struct { // if set, protocol errors will be expanded into a final error resolveAPIFailures bool - // NeoFS network magic + // FrostFS network magic netMagic uint64 // Meta parameters @@ -256,7 +256,7 @@ func (c *Client) processResponse(resp responseV2) (apistatus.Status, error) { } st := apistatus.FromStatusV2(resp.GetMetaHeader().GetStatus()) - if c.prm.resolveNeoFSErrors { + if c.prm.resolveFrostFSErrors { return st, apistatus.ErrFromStatus(st) } return st, nil @@ -329,14 +329,14 @@ func (x *contextCall) processCall() bool { // initializes static cross-call parameters inherited from client. func (c *Client) initCallContext(ctx *contextCall) { ctx.key = c.prm.key - ctx.resolveAPIFailures = c.prm.resolveNeoFSErrors + ctx.resolveAPIFailures = c.prm.resolveFrostFSErrors ctx.callbackResp = c.prm.cbRespInfo ctx.netMagic = c.prm.netMagic } // ExecRaw executes f with underlying github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client.Client // instance. Communicate over the Protocol Buffers protocol in a more flexible way: -// most often used to transmit data over a fixed version of the NeoFS protocol, as well +// most often used to transmit data over a fixed version of the FrostFS protocol, as well // as to support custom services. // // The f must not manipulate the client connection passed into it. diff --git a/client/container.go b/client/container.go index 2e00fa9..23ee500 100644 --- a/client/container.go +++ b/client/container.go @@ -30,7 +30,7 @@ type PrmContainerPut struct { session session.Container } -// SetContainer sets structured information about new NeoFS container. +// SetContainer sets structured information about new FrostFS container. // Required parameter. func (x *PrmContainerPut) SetContainer(cnr container.Container) { x.cnr = cnr @@ -64,12 +64,12 @@ func (x ResContainerPut) ID() cid.ID { return x.id } -// ContainerPut sends request to save container in NeoFS. +// ContainerPut sends request to save container in FrostFS. // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Operation is asynchronous and no guaranteed even in the absence of errors. @@ -196,12 +196,12 @@ func (x ResContainerGet) Container() container.Container { return x.cnr } -// ContainerGet reads NeoFS container by ID. +// ContainerGet reads FrostFS container by ID. // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmContainerGet docs). @@ -275,7 +275,7 @@ type PrmContainerList struct { ownerID user.ID } -// SetAccount sets identifier of the NeoFS account to list the containers. +// SetAccount sets identifier of the FrostFS account to list the containers. // Required parameter. func (x *PrmContainerList) SetAccount(id user.ID) { x.ownerID = id @@ -300,8 +300,8 @@ func (x ResContainerList) Containers() []cid.ID { // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmContainerList docs). @@ -377,7 +377,7 @@ type PrmContainerDelete struct { tok session.Container } -// SetContainer sets identifier of the NeoFS container to be removed. +// SetContainer sets identifier of the FrostFS container to be removed. // Required parameter. func (x *PrmContainerDelete) SetContainer(id cid.ID) { x.id = id @@ -400,12 +400,12 @@ type ResContainerDelete struct { statusRes } -// ContainerDelete sends request to remove the NeoFS container. +// ContainerDelete sends request to remove the FrostFS container. // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Operation is asynchronous and no guaranteed even in the absence of errors. @@ -501,7 +501,7 @@ type PrmContainerEACL struct { id cid.ID } -// SetContainer sets identifier of the NeoFS container to read the eACL table. +// SetContainer sets identifier of the FrostFS container to read the eACL table. // Required parameter. func (x *PrmContainerEACL) SetContainer(id cid.ID) { x.id = id @@ -520,12 +520,12 @@ func (x ResContainerEACL) Table() eacl.Table { return x.table } -// ContainerEACL reads eACL table of the NeoFS container. +// ContainerEACL reads eACL table of the FrostFS container. // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmContainerEACL docs). @@ -629,12 +629,12 @@ type ResContainerSetEACL struct { statusRes } -// ContainerSetEACL sends request to update eACL table of the NeoFS container. +// ContainerSetEACL sends request to update eACL table of the FrostFS container. // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Operation is asynchronous and no guaranteed even in the absence of errors. @@ -738,8 +738,8 @@ type ResAnnounceSpace struct { // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Operation is asynchronous and no guaranteed even in the absence of errors. @@ -761,13 +761,13 @@ func (c *Client) ContainerAnnounceUsedSpace(ctx context.Context, prm PrmAnnounce panic("missing announcements") } - // convert list of SDK announcement structures into NeoFS-API v2 list + // convert list of SDK announcement structures into FrostFS-API v2 list v2announce := make([]v2container.UsedSpaceAnnouncement, len(prm.announcements)) for i := range prm.announcements { prm.announcements[i].WriteToV2(&v2announce[i]) } - // prepare body of the NeoFS-API v2 request and request itself + // prepare body of the FrostFS-API v2 request and request itself reqBody := new(v2container.AnnounceUsedSpaceRequestBody) reqBody.SetAnnouncements(v2announce) diff --git a/client/doc.go b/client/doc.go index 22e28ad..7b09704 100644 --- a/client/doc.go +++ b/client/doc.go @@ -1,5 +1,5 @@ /* -Package client provides NeoFS API client implementation. +Package client provides FrostFS API client implementation. The main component is Client type. It is a virtual connection to the network and provides methods for executing operations on the server. @@ -16,7 +16,7 @@ Initialize client state: c.Init(prm) -Connect to the NeoFS server: +Connect to the FrostFS server: var prm client.PrmDial prm.SetServerURI("localhost:8080") @@ -26,7 +26,7 @@ Connect to the NeoFS server: err := c.Dial(prm) // ... -Execute NeoFS operation on the server: +Execute FrostFS operation on the server: var prm client.PrmContainerPut prm.SetContainer(cnr) @@ -74,7 +74,7 @@ with an interface: import "github.com/TrueCloudLab/frostfs-sdk-go/client" - type NeoFSClient interface { + type FrostFSClient interface { // Operations according to the application needs CreateContainer(context.Context, container.Container) error // ... diff --git a/client/errors.go b/client/errors.go index 846bc45..ea67cac 100644 --- a/client/errors.go +++ b/client/errors.go @@ -16,7 +16,7 @@ func unwrapErr(err error) error { return err } -// IsErrContainerNotFound checks if err corresponds to NeoFS status +// IsErrContainerNotFound checks if err corresponds to FrostFS status // return corresponding to missing container. Supports wrapped errors. func IsErrContainerNotFound(err error) bool { switch unwrapErr(err).(type) { @@ -29,7 +29,7 @@ func IsErrContainerNotFound(err error) bool { } } -// IsErrEACLNotFound checks if err corresponds to NeoFS status +// IsErrEACLNotFound checks if err corresponds to FrostFS status // return corresponding to missing eACL table. Supports wrapped errors. func IsErrEACLNotFound(err error) bool { switch unwrapErr(err).(type) { @@ -42,7 +42,7 @@ func IsErrEACLNotFound(err error) bool { } } -// IsErrObjectNotFound checks if err corresponds to NeoFS status +// IsErrObjectNotFound checks if err corresponds to FrostFS status // return corresponding to missing object. Supports wrapped errors. func IsErrObjectNotFound(err error) bool { switch unwrapErr(err).(type) { @@ -55,7 +55,7 @@ func IsErrObjectNotFound(err error) bool { } } -// IsErrObjectAlreadyRemoved checks if err corresponds to NeoFS status +// IsErrObjectAlreadyRemoved checks if err corresponds to FrostFS status // return corresponding to already removed object. Supports wrapped errors. func IsErrObjectAlreadyRemoved(err error) bool { switch unwrapErr(err).(type) { @@ -68,7 +68,7 @@ func IsErrObjectAlreadyRemoved(err error) bool { } } -// IsErrSessionExpired checks if err corresponds to NeoFS status return +// IsErrSessionExpired checks if err corresponds to FrostFS status return // corresponding to expired session. Supports wrapped errors. func IsErrSessionExpired(err error) bool { switch unwrapErr(err).(type) { @@ -81,7 +81,7 @@ func IsErrSessionExpired(err error) bool { } } -// IsErrSessionNotFound checks if err corresponds to NeoFS status return +// IsErrSessionNotFound checks if err corresponds to FrostFS status return // corresponding to missing session. Supports wrapped errors. func IsErrSessionNotFound(err error) bool { switch unwrapErr(err).(type) { @@ -99,7 +99,7 @@ func newErrMissingResponseField(name string) error { return fmt.Errorf("missing %s field in the response", name) } -// returns error describing invalid field (according to the NeoFS protocol) +// returns error describing invalid field (according to the FrostFS protocol) // with the given name and format violation err. func newErrInvalidResponseField(name string, err error) error { return fmt.Errorf("invalid %s field in the response: %w", name, err) diff --git a/client/netmap.go b/client/netmap.go index ba98dd4..1049e82 100644 --- a/client/netmap.go +++ b/client/netmap.go @@ -28,12 +28,12 @@ type ResEndpointInfo struct { ni netmap.NodeInfo } -// LatestVersion returns latest NeoFS API protocol's version in use. +// LatestVersion returns latest FrostFS API protocol's version in use. func (x ResEndpointInfo) LatestVersion() version.Version { return x.version } -// NodeInfo returns information about the NeoFS node served on the remote endpoint. +// NodeInfo returns information about the FrostFS node served on the remote endpoint. func (x ResEndpointInfo) NodeInfo() netmap.NodeInfo { return x.ni } @@ -43,8 +43,8 @@ func (x ResEndpointInfo) NodeInfo() netmap.NodeInfo { // Method can be used as a health check to see if node is alive and responds to requests. // // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmEndpointInfo docs). @@ -132,16 +132,16 @@ type ResNetworkInfo struct { info netmap.NetworkInfo } -// Info returns structured information about the NeoFS network. +// Info returns structured information about the FrostFS network. func (x ResNetworkInfo) Info() netmap.NetworkInfo { return x.info } -// NetworkInfo requests information about the NeoFS network of which the remote server is a part. +// NetworkInfo requests information about the FrostFS network of which the remote server is a part. // // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmNetworkInfo docs). @@ -220,8 +220,8 @@ func (x ResNetMapSnapshot) NetMap() netmap.NetMap { // NetMapSnapshot requests current network view of the remote server. // // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Context is required and MUST NOT be nil. It is used for network communication. diff --git a/client/object_delete.go b/client/object_delete.go index 7f55db9..5d89576 100644 --- a/client/object_delete.go +++ b/client/object_delete.go @@ -55,7 +55,7 @@ func (x *PrmObjectDelete) WithBearerToken(t bearer.Token) { x.meta.SetBearerToken(&v2token) } -// FromContainer specifies NeoFS container of the object. +// FromContainer specifies FrostFS container of the object. // Required parameter. func (x *PrmObjectDelete) FromContainer(id cid.ID) { var cidV2 v2refs.ContainerID @@ -100,7 +100,7 @@ func (x ResObjectDelete) Tombstone() oid.ID { return x.tomb } -// ObjectDelete marks an object for deletion from the container using NeoFS API protocol. +// ObjectDelete marks an object for deletion from the container using FrostFS API protocol. // As a marker, a special unit called a tombstone is placed in the container. // It confirms the user's intent to delete the object, and is itself a container object. // Explicit deletion is done asynchronously, and is generally not guaranteed. @@ -110,8 +110,8 @@ func (x ResObjectDelete) Tombstone() oid.ID { // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`, -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmObjectDelete docs). diff --git a/client/object_get.go b/client/object_get.go index 2fa5718..c90fb89 100644 --- a/client/object_get.go +++ b/client/object_get.go @@ -72,7 +72,7 @@ func (x *prmObjectRead) WithBearerToken(t bearer.Token) { x.meta.SetBearerToken(&v2token) } -// FromContainer specifies NeoFS container of the object. +// FromContainer specifies FrostFS container of the object. // Required parameter. func (x *prmObjectRead) FromContainer(id cid.ID) { var cnrV2 v2refs.ContainerID @@ -100,7 +100,7 @@ type ResObjectGet struct { statusRes } -// ObjectReader is designed to read one object from NeoFS system. +// ObjectReader is designed to read one object from FrostFS system. // // Must be initialized using Client.ObjectGetInit, any other // usage is unsafe. @@ -251,7 +251,7 @@ func (x *ObjectReader) close(ignoreEOF bool) (*ResObjectGet, error) { // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as Go built-in error. -// If Client is tuned to resolve NeoFS API statuses, then NeoFS failures +// If Client is tuned to resolve FrostFS API statuses, then FrostFS failures // codes are returned as error. // // Return errors: @@ -291,7 +291,7 @@ func (x *ObjectReader) Read(p []byte) (int, error) { return n, nil } -// ObjectGetInit initiates reading an object through a remote server using NeoFS API protocol. +// ObjectGetInit initiates reading an object through a remote server using FrostFS API protocol. // // The call only opens the transmission channel, explicit fetching is done using the ObjectReader. // Exactly one return value is non-nil. Resulting reader must be finally closed. @@ -392,12 +392,12 @@ func (x *ResObjectHead) ReadHeader(dst *object.Object) bool { return true } -// ObjectHead reads object header through a remote server using NeoFS API protocol. +// ObjectHead reads object header through a remote server using FrostFS API protocol. // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`, -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmObjectHead docs). @@ -505,7 +505,7 @@ type ResObjectRange struct { } // ObjectRangeReader is designed to read payload range of one object -// from NeoFS system. +// from FrostFS system. // // Must be initialized using Client.ObjectRangeInit, any other // usage is unsafe. @@ -616,7 +616,7 @@ func (x *ObjectRangeReader) close(ignoreEOF bool) (*ResObjectRange, error) { // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as Go built-in error. -// If Client is tuned to resolve NeoFS API statuses, then NeoFS failures +// If Client is tuned to resolve FrostFS API statuses, then FrostFS failures // codes are returned as error. // // Return errors: @@ -658,7 +658,7 @@ func (x *ObjectRangeReader) Read(p []byte) (int, error) { } // ObjectRangeInit initiates reading an object's payload range through a remote -// server using NeoFS API protocol. +// server using FrostFS API protocol. // // The call only opens the transmission channel, explicit fetching is done using the ObjectRangeReader. // Exactly one return value is non-nil. Resulting reader must be finally closed. diff --git a/client/object_hash.go b/client/object_hash.go index 1827dc5..5c7fd99 100644 --- a/client/object_hash.go +++ b/client/object_hash.go @@ -69,7 +69,7 @@ func (x *PrmObjectHash) WithBearerToken(t bearer.Token) { x.meta.SetBearerToken(&v2token) } -// FromContainer specifies NeoFS container of the object. +// FromContainer specifies FrostFS container of the object. // Required parameter. func (x *PrmObjectHash) FromContainer(id cid.ID) { var cidV2 v2refs.ContainerID @@ -143,15 +143,15 @@ func (x ResObjectHash) Checksums() [][]byte { } // ObjectHash requests checksum of the range list of the object payload using -// NeoFS API protocol. +// FrostFS API protocol. // // Returns a list of checksums in raw form: the format of hashes and their number // is left for the caller to check. Client preserves the order of the server's response. // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`, -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmObjectHash docs). diff --git a/client/object_put.go b/client/object_put.go index 2f8432d..5dcdd7c 100644 --- a/client/object_put.go +++ b/client/object_put.go @@ -44,7 +44,7 @@ func (x ResObjectPut) StoredObjectID() oid.ID { return x.obj } -// ObjectWriter is designed to write one object to NeoFS system. +// ObjectWriter is designed to write one object to FrostFS system. // // Must be initialized using Client.ObjectPutInit, any other // usage is unsafe. @@ -181,7 +181,7 @@ func (x *ObjectWriter) WritePayloadChunk(chunk []byte) bool { // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as Go built-in error. -// If Client is tuned to resolve NeoFS API statuses, then NeoFS failures +// If Client is tuned to resolve FrostFS API statuses, then FrostFS failures // codes are returned as error. // // Return statuses: @@ -230,7 +230,7 @@ func (x *ObjectWriter) Close() (*ResObjectPut, error) { return &x.res, nil } -// ObjectPutInit initiates writing an object through a remote server using NeoFS API protocol. +// ObjectPutInit initiates writing an object through a remote server using FrostFS API protocol. // // The call only opens the transmission channel, explicit recording is done using the ObjectWriter. // Exactly one return value is non-nil. Resulting writer must be finally closed. diff --git a/client/object_search.go b/client/object_search.go index 338e532..bed47bb 100644 --- a/client/object_search.go +++ b/client/object_search.go @@ -94,7 +94,7 @@ type ResObjectSearch struct { statusRes } -// ObjectListReader is designed to read list of object identifiers from NeoFS system. +// ObjectListReader is designed to read list of object identifiers from FrostFS system. // // Must be initialized using Client.ObjectSearch, any other usage is unsafe. type ObjectListReader struct { @@ -194,7 +194,7 @@ func (x *ObjectListReader) Iterate(f func(oid.ID) bool) error { // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as Go built-in error. -// If Client is tuned to resolve NeoFS API statuses, then NeoFS failures +// If Client is tuned to resolve FrostFS API statuses, then FrostFS failures // codes are returned as error. // // Return statuses: @@ -212,7 +212,7 @@ func (x *ObjectListReader) Close() (*ResObjectSearch, error) { return &x.res, nil } -// ObjectSearchInit initiates object selection through a remote server using NeoFS API protocol. +// ObjectSearchInit initiates object selection through a remote server using FrostFS API protocol. // // The call only opens the transmission channel, explicit fetching of matched objects // is done using the ObjectListReader. Exactly one return value is non-nil. diff --git a/client/reputation.go b/client/reputation.go index 5ed46a2..b719da0 100644 --- a/client/reputation.go +++ b/client/reputation.go @@ -18,13 +18,13 @@ type PrmAnnounceLocalTrust struct { trusts []reputation.Trust } -// SetEpoch sets number of NeoFS epoch in which the trust was assessed. +// SetEpoch sets number of FrostFS epoch in which the trust was assessed. // Required parameter, must not be zero. func (x *PrmAnnounceLocalTrust) SetEpoch(epoch uint64) { x.epoch = epoch } -// SetValues sets values describing trust of the client to the NeoFS network participants. +// SetValues sets values describing trust of the client to the FrostFS network participants. // Required parameter. Must not be empty. // // Must not be mutated before the end of the operation. @@ -37,12 +37,12 @@ type ResAnnounceLocalTrust struct { statusRes } -// AnnounceLocalTrust sends client's trust values to the NeoFS network participants. +// AnnounceLocalTrust sends client's trust values to the FrostFS network participants. // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmAnnounceLocalTrust docs). @@ -113,7 +113,7 @@ type PrmAnnounceIntermediateTrust struct { trust reputation.PeerToPeerTrust } -// SetEpoch sets number of NeoFS epoch with which client's calculation algorithm is initialized. +// SetEpoch sets number of FrostFS epoch with which client's calculation algorithm is initialized. // Required parameter, must not be zero. func (x *PrmAnnounceIntermediateTrust) SetEpoch(epoch uint64) { x.epoch = epoch @@ -137,13 +137,13 @@ type ResAnnounceIntermediateTrust struct { statusRes } -// AnnounceIntermediateTrust sends global trust values calculated for the specified NeoFS network participants +// AnnounceIntermediateTrust sends global trust values calculated for the specified FrostFS network participants // at some stage of client's calculation algorithm. // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmAnnounceIntermediateTrust docs). diff --git a/client/response.go b/client/response.go index a10b812..dabfdf9 100644 --- a/client/response.go +++ b/client/response.go @@ -2,7 +2,7 @@ package client import "github.com/TrueCloudLab/frostfs-api-go/v2/session" -// ResponseMetaInfo groups meta information about any NeoFS API response. +// ResponseMetaInfo groups meta information about any FrostFS API response. type ResponseMetaInfo struct { key []byte @@ -21,7 +21,7 @@ func (x ResponseMetaInfo) ResponderKey() []byte { return x.key } -// Epoch returns local NeoFS epoch of the server. +// Epoch returns local FrostFS epoch of the server. func (x ResponseMetaInfo) Epoch() uint64 { return x.epoch } diff --git a/client/session.go b/client/session.go index b676ce0..b64999c 100644 --- a/client/session.go +++ b/client/session.go @@ -46,7 +46,7 @@ func (x *ResSessionCreate) setID(id []byte) { x.id = id } -// ID returns identifier of the opened session in a binary NeoFS API protocol format. +// ID returns identifier of the opened session in a binary FrostFS API protocol format. // // Client doesn't retain value so modification is safe. func (x ResSessionCreate) ID() []byte { @@ -57,7 +57,7 @@ func (x *ResSessionCreate) setSessionKey(key []byte) { x.sessionKey = key } -// PublicKey returns public key of the opened session in a binary NeoFS API protocol format. +// PublicKey returns public key of the opened session in a binary FrostFS API protocol format. func (x ResSessionCreate) PublicKey() []byte { return x.sessionKey } @@ -68,8 +68,8 @@ func (x ResSessionCreate) PublicKey() []byte { // // Exactly one return value is non-nil. By default, server status is returned in res structure. // Any client's internal or transport errors are returned as `error`. -// If PrmInit.ResolveNeoFSFailures has been called, unsuccessful -// NeoFS status codes are returned as `error`, otherwise, are included +// If PrmInit.ResolveFrostFSFailures has been called, unsuccessful +// FrostFS status codes are returned as `error`, otherwise, are included // in the returned result structure. // // Immediately panics if parameters are set incorrectly (see PrmSessionCreate docs). diff --git a/client/status/status.go b/client/status/status.go index 78f5c0f..e9b2414 100644 --- a/client/status/status.go +++ b/client/status/status.go @@ -1,6 +1,6 @@ package apistatus -// Status defines a variety of NeoFS API status returns. +// Status defines a variety of FrostFS API status returns. // // All statuses are split into two disjoint subsets: successful and failed, and: // - statuses that implement the build-in error interface are considered failed statuses; @@ -14,7 +14,7 @@ package apistatus // IsSuccessful function should be used (try to avoid nil comparison). // It should be noted that using direct typecasting is not a compatible approach. // -// To transport statuses using the NeoFS API V2 protocol, see StatusV2 interface and FromStatusV2 and ToStatusV2 functions. +// To transport statuses using the FrostFS API V2 protocol, see StatusV2 interface and FromStatusV2 and ToStatusV2 functions. type Status interface{} // ErrFromStatus converts Status instance to error if it is failed. Returns nil on successful Status. diff --git a/client/status/v2.go b/client/status/v2.go index 520a94c..7c45715 100644 --- a/client/status/v2.go +++ b/client/status/v2.go @@ -9,7 +9,7 @@ import ( "github.com/TrueCloudLab/frostfs-api-go/v2/status" ) -// StatusV2 defines a variety of Status instances compatible with NeoFS API V2 protocol. +// StatusV2 defines a variety of Status instances compatible with FrostFS API V2 protocol. // // Note: it is not recommended to use this type directly, it is intended for documentation of the library functionality. type StatusV2 interface { diff --git a/container/acl/acl_basic.go b/container/acl/acl_basic.go index e1ee3ef..7c9ffcc 100644 --- a/container/acl/acl_basic.go +++ b/container/acl/acl_basic.go @@ -6,9 +6,9 @@ import ( "strings" ) -// Basic represents basic part of the NeoFS container's ACL. It includes +// Basic represents basic part of the FrostFS container's ACL. It includes // common (pretty simple) access rules for operations inside the container. -// See NeoFS Specification for details. +// See FrostFS Specification for details. // // One can find some similarities with the traditional Unix permission, such as // @@ -236,7 +236,7 @@ const ( NamePublicAppendExtended = "eacl-public-append" ) -// Frequently used Basic values. Bitmasks are taken from the NeoFS Specification. +// Frequently used Basic values. Bitmasks are taken from the FrostFS Specification. const ( Private = Basic(0x1C8C8CCC) // private PrivateExtended = Basic(0x0C8C8CCC) // eacl-private diff --git a/container/acl/doc.go b/container/acl/doc.go index 3bf14d3..3683e6d 100644 --- a/container/acl/doc.go +++ b/container/acl/doc.go @@ -1,7 +1,7 @@ /* -Package acl provides functionality to control access to data and operations on them in NeoFS containers. +Package acl provides functionality to control access to data and operations on them in FrostFS containers. -Type Basic represents basic ACL of the NeoFS container which specifies the general order of data access. +Type Basic represents basic ACL of the FrostFS container which specifies the general order of data access. Basic provides interface of rule composition. Package acl also exports some frequently used settings like private or public. */ diff --git a/container/container.go b/container/container.go index acb9154..b48487c 100644 --- a/container/container.go +++ b/container/container.go @@ -22,17 +22,17 @@ import ( "github.com/google/uuid" ) -// Container represents descriptor of the NeoFS container. Container logically -// stores NeoFS objects. Container is one of the basic and at the same time -// necessary data storage units in the NeoFS. Container includes data about the +// Container represents descriptor of the FrostFS container. Container logically +// stores FrostFS objects. Container is one of the basic and at the same time +// necessary data storage units in the FrostFS. Container includes data about the // owner, rules for placing objects and other information necessary for the // system functioning. // // Container type instances can represent different container states in the -// system, depending on the context. To create new container in NeoFS zero +// system, depending on the context. To create new container in FrostFS zero // instance SHOULD be declared, initialized using Init method and filled using -// dedicated methods. Once container is saved in the NeoFS network, it can't be -// changed: containers stored in the system are immutable, and NeoFS is a CAS +// dedicated methods. Once container is saved in the FrostFS network, it can't be +// changed: containers stored in the system are immutable, and FrostFS is a CAS // of containers that are identified by a fixed length value (see cid.ID type). // Instances for existing containers can be initialized using decoding methods // (e.g Unmarshal). @@ -137,7 +137,7 @@ func (x *Container) readFromV2(m container.Container, checkFieldPresence bool) e } // ReadFromV2 reads Container from the container.Container message. Checks if the -// message conforms to NeoFS API V2 protocol. +// message conforms to FrostFS API V2 protocol. // // See also WriteToV2. func (x *Container) ReadFromV2(m container.Container) error { @@ -152,7 +152,7 @@ func (x Container) WriteToV2(m *container.Container) { *m = x.v2 } -// Marshal encodes Container into a binary format of the NeoFS API protocol +// Marshal encodes Container into a binary format of the FrostFS API protocol // (Protocol Buffers with direct field order). // // See also Unmarshal. @@ -160,7 +160,7 @@ func (x Container) Marshal() []byte { return x.v2.StableMarshal(nil) } -// Unmarshal decodes NeoFS API protocol binary format into the Container +// Unmarshal decodes FrostFS API protocol binary format into the Container // (Protocol Buffers with direct field order). Returns an error describing // a format violation. // @@ -176,7 +176,7 @@ func (x *Container) Unmarshal(data []byte) error { return x.readFromV2(m, false) } -// MarshalJSON encodes Container into a JSON format of the NeoFS API protocol +// MarshalJSON encodes Container into a JSON format of the FrostFS API protocol // (Protocol Buffers JSON). // // See also UnmarshalJSON. @@ -184,7 +184,7 @@ func (x Container) MarshalJSON() ([]byte, error) { return x.v2.MarshalJSON() } -// UnmarshalJSON decodes NeoFS API protocol JSON format into the Container +// UnmarshalJSON decodes FrostFS API protocol JSON format into the Container // (Protocol Buffers JSON). Returns an error describing a format violation. // // See also MarshalJSON. @@ -192,7 +192,7 @@ func (x *Container) UnmarshalJSON(data []byte) error { return x.v2.UnmarshalJSON(data) } -// Init initializes all internal data of the Container required by NeoFS API +// Init initializes all internal data of the Container required by FrostFS API // protocol. Init MUST be called when creating a new container. Init SHOULD NOT // be called multiple times. Init SHOULD NOT be called if the Container instance // is used for decoding only. @@ -212,7 +212,7 @@ func (x *Container) Init() { // SetOwner specifies the owner of the Container. Each Container has exactly // one owner, so SetOwner MUST be called for instances to be saved in the -// NeoFS. +// FrostFS. // // See also Owner. func (x *Container) SetOwner(owner user.ID) { @@ -224,7 +224,7 @@ func (x *Container) SetOwner(owner user.ID) { // Owner returns owner of the Container set using SetOwner. // -// Zero Container has no owner which is incorrect according to NeoFS API +// Zero Container has no owner which is incorrect according to FrostFS API // protocol. func (x Container) Owner() (res user.ID) { m := x.v2.GetOwnerID() @@ -256,7 +256,7 @@ func (x Container) BasicACL() (res acl.Basic) { } // SetPlacementPolicy sets placement policy for the objects within the Container. -// NeoFS storage layer strives to follow the specified policy. +// FrostFS storage layer strives to follow the specified policy. // // See also PlacementPolicy. func (x *Container) SetPlacementPolicy(policy netmap.PlacementPolicy) { @@ -269,7 +269,7 @@ func (x *Container) SetPlacementPolicy(policy netmap.PlacementPolicy) { // PlacementPolicy returns placement policy set using SetPlacementPolicy. // // Zero Container has no placement policy which is incorrect according to -// NeoFS API protocol. +// FrostFS API protocol. func (x Container) PlacementPolicy() (res netmap.PlacementPolicy) { m := x.v2.GetPlacementPolicy() if m != nil { @@ -284,7 +284,7 @@ func (x Container) PlacementPolicy() (res netmap.PlacementPolicy) { // SetAttribute sets Container attribute value by key. Both key and value // MUST NOT be empty. Attributes set by the creator (owner) are most commonly -// ignored by the NeoFS system and used for application layer. Some attributes +// ignored by the FrostFS system and used for application layer. Some attributes // are so-called system or well-known attributes: they are reserved for system // needs. System attributes SHOULD NOT be modified using SetAttribute, use // corresponding methods/functions. List of the reserved keys is documented @@ -383,7 +383,7 @@ func CreatedAt(cnr Container) time.Time { return time.Unix(sec, 0) } -// SetSubnet places the Container on the specified NeoFS subnet. If called, +// SetSubnet places the Container on the specified FrostFS subnet. If called, // container nodes will only be selected from the given subnet, otherwise from // the entire network. func SetSubnet(cnr *Container, subNet subnetid.ID) { @@ -423,7 +423,7 @@ func IsHomomorphicHashingDisabled(cnr Container) bool { } // Domain represents information about container domain registered in the NNS -// contract deployed in the NeoFS network. +// contract deployed in the FrostFS network. type Domain struct { name, zone string } @@ -477,7 +477,7 @@ func ReadDomain(cnr Container) (res Domain) { // CalculateSignature calculates signature of the Container using provided signer // and writes it into dst. Signature instance MUST NOT be nil. CalculateSignature // is expected to be called after all the Container data is filled and before -// saving the Container in the NeoFS network. Note that мany subsequent change +// saving the Container in the FrostFS network. Note that мany subsequent change // will most likely break the signature. // // See also VerifySignature. @@ -492,7 +492,7 @@ func VerifySignature(sig frostfscrypto.Signature, cnr Container) bool { } // CalculateIDFromBinary calculates identifier of the binary-encoded container -// in CAS of the NeoFS containers and writes it into dst. ID instance MUST NOT +// in CAS of the FrostFS containers and writes it into dst. ID instance MUST NOT // be nil. // // See also CalculateID, AssertID. @@ -509,7 +509,7 @@ func CalculateID(dst *cid.ID, cnr Container) { } // AssertID checks if the given Container matches its identifier in CAS of the -// NeoFS containers. +// FrostFS containers. // // See also CalculateID. func AssertID(id cid.ID, cnr Container) bool { diff --git a/container/doc.go b/container/doc.go index ceadd95..0a3f89d 100644 --- a/container/doc.go +++ b/container/doc.go @@ -1,7 +1,7 @@ /* -Package container provides functionality related to the NeoFS containers. +Package container provides functionality related to the FrostFS containers. -The base type is Container. To create new container in the NeoFS network +The base type is Container. To create new container in the FrostFS network Container instance should be initialized var cnr Container @@ -10,7 +10,7 @@ Container instance should be initialized // encode cnr and send -After the container is persisted in the NeoFS network, applications can process +After the container is persisted in the FrostFS network, applications can process it using the instance of Container types // recv binary container @@ -22,7 +22,7 @@ it using the instance of Container types // process the container data -Instances can be also used to process NeoFS API V2 protocol messages +Instances can be also used to process FrostFS API V2 protocol messages (see neo.fs.v2.container package in https://github.com/TrueCloudLab/frostfs-api). On client side: diff --git a/container/id/doc.go b/container/id/doc.go index a1597fc..c26c61a 100644 --- a/container/id/doc.go +++ b/container/id/doc.go @@ -1,5 +1,5 @@ /* -Package cid provides primitives to work with container identification in NeoFS. +Package cid provides primitives to work with container identification in FrostFS. Using package types in an application is recommended to potentially work with different protocol versions with which these types are compatible. diff --git a/container/id/id.go b/container/id/id.go index ea6a7d8..86b5c19 100644 --- a/container/id/id.go +++ b/container/id/id.go @@ -8,7 +8,7 @@ import ( "github.com/mr-tron/base58" ) -// ID represents NeoFS container identifier. +// ID represents FrostFS container identifier. // // ID is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.ContainerID // message. See ReadFromV2 / WriteToV2 methods. @@ -22,7 +22,7 @@ type ID [sha256.Size]byte // ReadFromV2 reads ID from the refs.ContainerID message. // Returns an error if the message is malformed according -// to the NeoFS API V2 protocol. +// to the FrostFS API V2 protocol. // // See also WriteToV2. func (id *ID) ReadFromV2(m refs.ContainerID) error { @@ -83,7 +83,7 @@ func (id ID) Equals(id2 ID) bool { return id == id2 } -// EncodeToString encodes ID into NeoFS API protocol string. +// EncodeToString encodes ID into FrostFS API protocol string. // // Zero ID is base58 encoding of 32 zeros. // @@ -92,7 +92,7 @@ func (id ID) EncodeToString() string { return base58.Encode(id[:]) } -// DecodeString decodes string into ID according to NeoFS API protocol. Returns +// DecodeString decodes string into ID according to FrostFS API protocol. Returns // an error if s is malformed. // // See also DecodeString. @@ -109,7 +109,7 @@ func (id *ID) DecodeString(s string) error { // // String is designed to be human-readable, and its format MAY differ between // SDK versions. String MAY return same result as EncodeToString. String MUST NOT -// be used to encode ID into NeoFS protocol string. +// be used to encode ID into FrostFS protocol string. func (id ID) String() string { return id.EncodeToString() } diff --git a/container/size.go b/container/size.go index ec1221a..5baee7b 100644 --- a/container/size.go +++ b/container/size.go @@ -10,7 +10,7 @@ import ( ) // SizeEstimation groups information about estimation of the size of the data -// stored in the NeoFS container. +// stored in the FrostFS container. // // SizeEstimation is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/container.UsedSpaceAnnouncement // message. See ReadFromV2 / WriteToV2 methods. @@ -19,7 +19,7 @@ type SizeEstimation struct { } // ReadFromV2 reads SizeEstimation from the container.UsedSpaceAnnouncement message. -// Checks if the message conforms to NeoFS API V2 protocol. +// Checks if the message conforms to FrostFS API V2 protocol. // // See also WriteToV2. func (x *SizeEstimation) ReadFromV2(m container.UsedSpaceAnnouncement) error { @@ -63,7 +63,7 @@ func (x SizeEstimation) Epoch() uint64 { } // SetContainer specifies the container for which the amount of data is estimated. -// Required by the NeoFS API protocol. +// Required by the FrostFS API protocol. // // See also Container. func (x *SizeEstimation) SetContainer(cnr cid.ID) { @@ -76,7 +76,7 @@ func (x *SizeEstimation) SetContainer(cnr cid.ID) { // Container returns container set using SetContainer. // // Zero SizeEstimation is not bound to any container (returns zero) which is -// incorrect according to NeoFS API protocol. +// incorrect according to FrostFS API protocol. func (x SizeEstimation) Container() (res cid.ID) { m := x.m.GetContainerID() if m != nil { diff --git a/crypto/doc.go b/crypto/doc.go index b249c3e..438d43c 100644 --- a/crypto/doc.go +++ b/crypto/doc.go @@ -1,7 +1,7 @@ /* -Package frostfscrypto collects NeoFS cryptographic primitives. +Package frostfscrypto collects FrostFS cryptographic primitives. -Signer type unifies entities for signing NeoFS data. +Signer type unifies entities for signing FrostFS data. // instantiate Signer // select data to be signed @@ -24,7 +24,7 @@ PublicKey allows to verify signatures. isValid := sig.Verify(data) // ... -Signature can be also used to process NeoFS API V2 protocol messages +Signature can be also used to process FrostFS API V2 protocol messages (see neo.fs.v2.refs package in https://github.com/TrueCloudLab/frostfs-api). On client side: diff --git a/crypto/ecdsa/doc.go b/crypto/ecdsa/doc.go index b5c9611..952b632 100644 --- a/crypto/ecdsa/doc.go +++ b/crypto/ecdsa/doc.go @@ -1,5 +1,5 @@ /* -Package frostfsecdsa collects ECDSA primitives for NeoFS cryptography. +Package frostfsecdsa collects ECDSA primitives for FrostFS cryptography. Signer and PublicKey support ECDSA signature algorithm with SHA-512 hashing. SignerRFC6979 and PublicKeyRFC6979 implement signature algorithm described in RFC 6979. diff --git a/crypto/ecdsa/public.go b/crypto/ecdsa/public.go index 8c5ebc8..6812bcf 100644 --- a/crypto/ecdsa/public.go +++ b/crypto/ecdsa/public.go @@ -11,7 +11,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/crypto/keys" ) -// PublicKey is a wrapper over ecdsa.PublicKey used for NeoFS needs. +// PublicKey is a wrapper over ecdsa.PublicKey used for FrostFS needs. // Provides frostfscrypto.PublicKey interface. // // Instances MUST be initialized from ecdsa.PublicKey using type conversion. @@ -77,7 +77,7 @@ func (x PublicKey) Verify(data, signature []byte) bool { return r != nil && s != nil && ecdsa.Verify((*ecdsa.PublicKey)(&x), h[:], r, s) } -// PublicKeyRFC6979 is a wrapper over ecdsa.PublicKey used for NeoFS needs. +// PublicKeyRFC6979 is a wrapper over ecdsa.PublicKey used for FrostFS needs. // Provides frostfscrypto.PublicKey interface. // // Instances MUST be initialized from ecdsa.PublicKey using type conversion. diff --git a/crypto/ecdsa/wallet_connect.go b/crypto/ecdsa/wallet_connect.go index 7207f5a..504f13f 100644 --- a/crypto/ecdsa/wallet_connect.go +++ b/crypto/ecdsa/wallet_connect.go @@ -38,7 +38,7 @@ func (x SignerWalletConnect) Public() frostfscrypto.PublicKey { return (*PublicKeyWalletConnect)(&x.PublicKey) } -// PublicKeyWalletConnect is a wrapper over ecdsa.PublicKey used for NeoFS needs. +// PublicKeyWalletConnect is a wrapper over ecdsa.PublicKey used for FrostFS needs. // Provides frostfscrypto.PublicKey interface. // // Instances MUST be initialized from ecdsa.PublicKey using type conversion. diff --git a/crypto/signature.go b/crypto/signature.go index 5dfff1d..5700a56 100644 --- a/crypto/signature.go +++ b/crypto/signature.go @@ -19,7 +19,7 @@ import ( type Signature refs.Signature // ReadFromV2 reads Signature from the refs.Signature message. Checks if the -// message conforms to NeoFS API V2 protocol. +// message conforms to FrostFS API V2 protocol. // // See also WriteToV2. func (x *Signature) ReadFromV2(m refs.Signature) error { diff --git a/crypto/signer.go b/crypto/signer.go index f92e769..8ed853e 100644 --- a/crypto/signer.go +++ b/crypto/signer.go @@ -45,7 +45,7 @@ func RegisterScheme(scheme Scheme, f func() PublicKey) { } // Signer is an interface of entities that can be used for signing operations -// in NeoFS. Unites secret and public parts. For example, an ECDSA private key +// in FrostFS. Unites secret and public parts. For example, an ECDSA private key // or external auth service. // // See also PublicKey. @@ -63,7 +63,7 @@ type Signer interface { } // PublicKey represents a public key using fixed signature scheme supported by -// NeoFS. +// FrostFS. // // See also Signer. type PublicKey interface { diff --git a/eacl/record.go b/eacl/record.go index 590d769..b25a5f3 100644 --- a/eacl/record.go +++ b/eacl/record.go @@ -38,12 +38,12 @@ func (r Record) Filters() []Filter { return r.filters } -// Operation returns NeoFS request verb to match. +// Operation returns FrostFS request verb to match. func (r Record) Operation() Operation { return r.operation } -// SetOperation sets NeoFS request verb to match. +// SetOperation sets FrostFS request verb to match. func (r *Record) SetOperation(operation Operation) { r.operation = operation } diff --git a/go.mod b/go.mod index 82cd18f..496865b 100644 --- a/go.mod +++ b/go.mod @@ -1,41 +1,41 @@ module github.com/TrueCloudLab/frostfs-sdk-go -go 1.17 +go 1.18 require ( github.com/TrueCloudLab/frostfs-api-go/v2 v2.0.0-20221212144048-1351b6656d68 github.com/TrueCloudLab/frostfs-contract v0.0.0-20221213081248-6c805c1b4e42 github.com/TrueCloudLab/hrw v1.1.0 github.com/TrueCloudLab/tzhash v1.7.0 - github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 + github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20221202181307-76fa05c21b12 github.com/google/uuid v1.3.0 - github.com/hashicorp/golang-lru v0.5.4 + github.com/hashicorp/golang-lru v0.6.0 github.com/mr-tron/base58 v1.2.0 - github.com/nspcc-dev/neo-go v0.99.4 - github.com/stretchr/testify v1.8.0 + github.com/nspcc-dev/neo-go v0.100.1 + github.com/stretchr/testify v1.8.1 go.uber.org/atomic v1.10.0 - go.uber.org/zap v1.23.0 + go.uber.org/zap v1.24.0 ) require ( github.com/TrueCloudLab/frostfs-crypto v0.5.0 // indirect github.com/TrueCloudLab/rfc6979 v0.3.0 // indirect - github.com/btcsuite/btcd v0.22.0-beta // indirect - github.com/coreos/go-semver v0.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 // indirect - github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220927123257-24c107e3a262 // indirect + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb // indirect github.com/nspcc-dev/rfc6979 v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - go.uber.org/multierr v1.8.0 // indirect - golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect - golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect - golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect - golang.org/x/text v0.3.7 // indirect + go.uber.org/multierr v1.9.0 // indirect + golang.org/x/crypto v0.4.0 // indirect + golang.org/x/exp v0.0.0-20221227203929-1b447090c38c // indirect + golang.org/x/net v0.3.0 // indirect + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 // indirect google.golang.org/grpc v1.48.0 // indirect google.golang.org/protobuf v1.28.1 // indirect diff --git a/go.sum b/go.sum index c8ee084..e0628e7 100644 --- a/go.sum +++ b/go.sum @@ -63,15 +63,14 @@ github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGn github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521073959-f0d4d129b7f1/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 h1:yL7+Jz0jTC6yykIK/Wh74gnTJnrGr5AyrNMXuA0gves= -github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20221202181307-76fa05c21b12 h1:npHgfD4Tl2WJS3AJaMUi5ynGDPUBfkg3U3fCzDyXZ+4= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20221202181307-76fa05c21b12/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= @@ -98,7 +97,6 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -106,6 +104,9 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -206,8 +207,9 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= +github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -267,10 +269,12 @@ github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU= github.com/nspcc-dev/neo-go v0.73.1-pre.0.20200303142215-f5a1b928ce09/go.mod h1:pPYwPZ2ks+uMnlRLUyXOpLieaDQSEaf4NM3zHVbRjmg= github.com/nspcc-dev/neo-go v0.98.0/go.mod h1:E3cc1x6RXSXrJb2nDWXTXjnXk3rIqVN8YdFyWv+FrqM= -github.com/nspcc-dev/neo-go v0.99.4 h1:8Y+SdRxksC72a4PNkcGCh/aaQinh9Gu+c5LilbcsXOI= github.com/nspcc-dev/neo-go v0.99.4/go.mod h1:mKTolfRUfKjFso5HPvGSQtUZc70n0VKBMs16eGuC5gA= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220927123257-24c107e3a262 h1:UTmSLZw5OpD/JPE1B5Vf98GF0zu2/Hsqq1lGLtStTUE= +github.com/nspcc-dev/neo-go v0.100.1 h1:yugxbQRdzM+ObVa5mtr9/n4rYjxSIrryne8MVr9NBwU= +github.com/nspcc-dev/neo-go v0.100.1/go.mod h1:Nnp7F4e9IBccsgtCeLtUWV+0T6gk1PtP5HRtA13hUfc= github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220927123257-24c107e3a262/go.mod h1:23bBw0v6pBYcrWs8CBEEDIEDJNbcFoIh8pGGcf2Vv8s= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb h1:GFxfkpXEYAbMIr69JpKOsQWeLOaGrd49HNAor8uDW+A= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb/go.mod h1:23bBw0v6pBYcrWs8CBEEDIEDJNbcFoIh8pGGcf2Vv8s= github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211201134523-3604d96f3fe1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= github.com/nspcc-dev/neofs-api-go/v2 v2.11.1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= github.com/nspcc-dev/neofs-crypto v0.2.0/go.mod h1:F/96fUzPM3wR+UGsPi3faVNmFlA9KAEAUQR7dMxZmNA= @@ -338,14 +342,16 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/syndtr/goleveldb v0.0.0-20180307113352-169b1b37be73/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 h1:xQdMZ1WLrgkkvOZ/LDQxjVxMLdby7osSh4ZEVa5sIjs= github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= @@ -358,7 +364,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= github.com/yuin/gopher-lua v0.0.0-20191128022950-c6266f4fe8d7/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= @@ -378,15 +383,14 @@ go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= -go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -397,8 +401,9 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= +golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -409,6 +414,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20221227203929-1b447090c38c h1:Govq2W3bnHJimHT2ium65kXcI7ZzTniZHcFATnLJM0Q= +golang.org/x/exp v0.0.0-20221227203929-1b447090c38c/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -429,7 +436,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -465,12 +471,12 @@ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -489,8 +495,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -539,16 +546,15 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210429154555-c04ba851c2a4/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -558,8 +564,9 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -606,7 +613,6 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -695,7 +701,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/abiosoft/ishell.v2 v2.0.0/go.mod h1:sFp+cGtH6o4s1FtpVPTMcHq2yue+c4DGOVohJCPUzwY= @@ -714,7 +719,6 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/netmap/doc.go b/netmap/doc.go index 4bac236..ec28625 100644 --- a/netmap/doc.go +++ b/netmap/doc.go @@ -1,10 +1,10 @@ /* Package netmap provides functionality for working with information about the -NeoFS network, primarily a layer of storage nodes. +FrostFS network, primarily a layer of storage nodes. -The package concentrates all the characteristics of NeoFS networks. +The package concentrates all the characteristics of FrostFS networks. -NetMap represents NeoFS network map - one of the main technologies used to +NetMap represents FrostFS network map - one of the main technologies used to store data in the system. It is composed of information about all storage nodes (NodeInfo type) in a particular network. NetMap methods allow you to impose container storage policies (PlacementPolicy type) on a fixed composition of @@ -14,7 +14,7 @@ container creator. NetworkInfo type is dedicated to descriptive characterization of network state and settings. -Instances can be also used to process NeoFS API V2 protocol messages +Instances can be also used to process FrostFS API V2 protocol messages (see neo.fs.v2.netmap package in https://github.com/TrueCloudLab/frostfs-api). On client side: diff --git a/netmap/netmap.go b/netmap/netmap.go index 7fb3e44..75451f0 100644 --- a/netmap/netmap.go +++ b/netmap/netmap.go @@ -7,8 +7,8 @@ import ( "github.com/TrueCloudLab/hrw" ) -// NetMap represents NeoFS network map. It includes information about all -// storage nodes registered in NeoFS the network. +// NetMap represents FrostFS network map. It includes information about all +// storage nodes registered in FrostFS the network. // // NetMap is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/netmap.NetMap // message. See ReadFromV2 / WriteToV2 methods. @@ -21,7 +21,7 @@ type NetMap struct { } // ReadFromV2 reads NetMap from the netmap.NetMap message. Checks if the -// message conforms to NeoFS API V2 protocol. +// message conforms to FrostFS API V2 protocol. // // See also WriteToV2. func (m *NetMap) ReadFromV2(msg netmap.NetMap) error { @@ -66,7 +66,7 @@ func (m NetMap) WriteToV2(msg *netmap.NetMap) { msg.SetEpoch(m.epoch) } -// SetNodes sets information list about all storage nodes from the NeoFS network. +// SetNodes sets information list about all storage nodes from the FrostFS network. // // Argument MUST NOT be mutated, make a copy first. // diff --git a/netmap/network_info.go b/netmap/network_info.go index af1fb88..e952e1d 100644 --- a/netmap/network_info.go +++ b/netmap/network_info.go @@ -11,7 +11,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" ) -// NetworkInfo groups information about the NeoFS network state. Mainly used to +// NetworkInfo groups information about the FrostFS network state. Mainly used to // describe the current state of the network. // // NetworkInfo is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/netmap.NetworkInfo @@ -24,7 +24,7 @@ type NetworkInfo struct { // reads NetworkInfo from netmap.NetworkInfo message. If checkFieldPresence is set, // returns an error on absence of any protocol-required field. Verifies format of any -// presented field according to NeoFS API V2 protocol. +// presented field according to FrostFS API V2 protocol. func (x *NetworkInfo) readFromV2(m netmap.NetworkInfo, checkFieldPresence bool) error { c := m.GetNetworkConfig() if checkFieldPresence && c == nil { @@ -97,7 +97,7 @@ func (x *NetworkInfo) readFromV2(m netmap.NetworkInfo, checkFieldPresence bool) } // ReadFromV2 reads NetworkInfo from the netmap.NetworkInfo message. Checks if the -// message conforms to NeoFS API V2 protocol. +// message conforms to FrostFS API V2 protocol. // // See also WriteToV2. func (x *NetworkInfo) ReadFromV2(m netmap.NetworkInfo) error { @@ -119,7 +119,7 @@ func (x NetworkInfo) CurrentEpoch() uint64 { return x.m.GetCurrentEpoch() } -// SetCurrentEpoch sets current epoch of the NeoFS network. +// SetCurrentEpoch sets current epoch of the FrostFS network. func (x *NetworkInfo) SetCurrentEpoch(epoch uint64) { x.m.SetCurrentEpoch(epoch) } @@ -131,7 +131,7 @@ func (x NetworkInfo) MagicNumber() uint64 { return x.m.GetMagicNumber() } -// SetMagicNumber sets magic number of the NeoFS Sidechain. +// SetMagicNumber sets magic number of the FrostFS Sidechain. // // See also MagicNumber. func (x *NetworkInfo) SetMagicNumber(epoch uint64) { @@ -143,7 +143,7 @@ func (x NetworkInfo) MsPerBlock() int64 { return x.m.GetMsPerBlock() } -// SetMsPerBlock sets MillisecondsPerBlock network parameter of the NeoFS Sidechain. +// SetMsPerBlock sets MillisecondsPerBlock network parameter of the FrostFS Sidechain. // // See also MsPerBlock. func (x *NetworkInfo) SetMsPerBlock(v int64) { @@ -203,8 +203,8 @@ func (x NetworkInfo) configValue(name string) (res []byte) { return } -// SetRawNetworkParameter sets named NeoFS network parameter whose value is -// transmitted but not interpreted by the NeoFS API protocol. +// SetRawNetworkParameter sets named FrostFS network parameter whose value is +// transmitted but not interpreted by the FrostFS API protocol. // // Argument MUST NOT be mutated, make a copy first. // @@ -441,8 +441,8 @@ func (x NetworkInfo) NumberOfEigenTrustIterations() uint64 { const configEpochDuration = "EpochDuration" -// SetEpochDuration sets NeoFS epoch duration measured in number of blocks of -// the NeoFS Sidechain. +// SetEpochDuration sets FrostFS epoch duration measured in number of blocks of +// the FrostFS Sidechain. // // See also EpochDuration. func (x *NetworkInfo) SetEpochDuration(blocks uint64) { @@ -492,7 +492,7 @@ func (x NetworkInfo) MaxObjectSize() uint64 { const configWithdrawalFee = "WithdrawFee" -// SetWithdrawalFee sets fee for withdrawals from the NeoFS accounts that +// SetWithdrawalFee sets fee for withdrawals from the FrostFS accounts that // account owners pay to each Alphabet node. // // See also WithdrawalFee. diff --git a/netmap/node_info.go b/netmap/node_info.go index 466b0ed..42adffd 100644 --- a/netmap/node_info.go +++ b/netmap/node_info.go @@ -14,9 +14,9 @@ import ( "github.com/TrueCloudLab/hrw" ) -// NodeInfo groups information about NeoFS storage node which is reflected -// in the NeoFS network map. Storage nodes advertise this information when -// registering with the NeoFS network. After successful registration, information +// NodeInfo groups information about FrostFS storage node which is reflected +// in the FrostFS network map. Storage nodes advertise this information when +// registering with the FrostFS network. After successful registration, information // about the nodes is available to all network participants to work with the network // map (mainly to comply with container storage policies). // @@ -30,7 +30,7 @@ type NodeInfo struct { // reads NodeInfo from netmap.NodeInfo message. If checkFieldPresence is set, // returns an error on absence of any protocol-required field. Verifies format of any -// presented field according to NeoFS API V2 protocol. +// presented field according to FrostFS API V2 protocol. func (x *NodeInfo) readFromV2(m netmap.NodeInfo, checkFieldPresence bool) error { var err error @@ -91,7 +91,7 @@ func (x *NodeInfo) readFromV2(m netmap.NodeInfo, checkFieldPresence bool) error } // ReadFromV2 reads NodeInfo from the netmap.NodeInfo message. Checks if the -// message conforms to NeoFS API V2 protocol. +// message conforms to FrostFS API V2 protocol. // // See also WriteToV2. func (x *NodeInfo) ReadFromV2(m netmap.NodeInfo) error { @@ -106,7 +106,7 @@ func (x NodeInfo) WriteToV2(m *netmap.NodeInfo) { *m = x.m } -// Marshal encodes NodeInfo into a binary format of the NeoFS API protocol +// Marshal encodes NodeInfo into a binary format of the FrostFS API protocol // (Protocol Buffers with direct field order). // // See also Unmarshal. @@ -117,7 +117,7 @@ func (x NodeInfo) Marshal() []byte { return m.StableMarshal(nil) } -// Unmarshal decodes NeoFS API protocol binary format into the NodeInfo +// Unmarshal decodes FrostFS API protocol binary format into the NodeInfo // (Protocol Buffers with direct field order). Returns an error describing // a format violation. // @@ -133,7 +133,7 @@ func (x *NodeInfo) Unmarshal(data []byte) error { return x.readFromV2(m, false) } -// MarshalJSON encodes NodeInfo into a JSON format of the NeoFS API protocol +// MarshalJSON encodes NodeInfo into a JSON format of the FrostFS API protocol // (Protocol Buffers JSON). // // See also UnmarshalJSON. @@ -144,7 +144,7 @@ func (x NodeInfo) MarshalJSON() ([]byte, error) { return m.MarshalJSON() } -// UnmarshalJSON decodes NeoFS API protocol JSON format into the NodeInfo +// UnmarshalJSON decodes FrostFS API protocol JSON format into the NodeInfo // (Protocol Buffers JSON). Returns an error describing a format violation. // // See also MarshalJSON. @@ -172,7 +172,7 @@ func (x *NodeInfo) SetPublicKey(key []byte) { // PublicKey returns value set using SetPublicKey. // // Zero NodeInfo has no public key, which is incorrect according to -// NeoFS system requirements. +// FrostFS system requirements. // // Return value MUST not be mutated, make a copy first. func (x NodeInfo) PublicKey() []byte { @@ -186,7 +186,7 @@ func StringifyPublicKey(node NodeInfo) string { // SetNetworkEndpoints sets list to the announced node's network endpoints. // Node MUSt have at least one announced endpoint. List MUST be unique. -// Endpoints are used for communication with the storage node within NeoFS +// Endpoints are used for communication with the storage node within FrostFS // network. It is expected that node serves storage node services on these // endpoints (it also adds a wait on their network availability). // @@ -209,7 +209,7 @@ func (x NodeInfo) NumberOfNetworkEndpoints() int { // MUST NOT be nil. // // Zero NodeInfo contains no endpoints which is incorrect according to -// NeoFS system requirements. +// FrostFS system requirements. // // See also SetNetworkEndpoints. func (x NodeInfo) IterateNetworkEndpoints(f func(string) bool) { @@ -297,7 +297,7 @@ func (x NodeInfo) capacity() uint64 { const attrUNLOCODE = "UN-LOCODE" // SetLOCODE specifies node's geographic location in UN/LOCODE format. Each -// storage node MUST declare it for entrance to the NeoFS network. Node MAY +// storage node MUST declare it for entrance to the FrostFS network. Node MAY // declare the code of the nearest location as needed, for example, when it is // impossible to unambiguously attribute the node to any location from UN/LOCODE // database. @@ -310,7 +310,7 @@ func (x *NodeInfo) SetLOCODE(locode string) { // LOCODE returns node's location code set using SetLOCODE. // // Zero NodeInfo has empty location code which is invalid according to -// NeoFS API system requirement. +// FrostFS API system requirement. func (x NodeInfo) LOCODE() string { return x.Attribute(attrUNLOCODE) } diff --git a/netmap/parser/generate.go b/netmap/parser/generate.go index 850f362..02641a3 100644 --- a/netmap/parser/generate.go +++ b/netmap/parser/generate.go @@ -1,3 +1,4 @@ package parser -//go:generate antlr4 -Dlanguage=Go -visitor QueryLexer.g4 Query.g4 +// ANTLR can be downloaded from https://www.antlr.org/download/antlr-4.11.1-complete.jar +//go:generate java -Xmx500M -cp "./antlr-4.11.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=Go -visitor QueryLexer.g4 Query.g4 diff --git a/netmap/parser/query_base_listener.go b/netmap/parser/query_base_listener.go index ae77aae..41dfb31 100644 --- a/netmap/parser/query_base_listener.go +++ b/netmap/parser/query_base_listener.go @@ -1,8 +1,8 @@ -// Code generated from Query.g4 by ANTLR 4.10.1. DO NOT EDIT. +// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT. package parser // Query -import "github.com/antlr/antlr4/runtime/Go/antlr" +import "github.com/antlr/antlr4/runtime/Go/antlr/v4" // BaseQueryListener is a complete listener for a parse tree produced by Query. type BaseQueryListener struct{} diff --git a/netmap/parser/query_base_visitor.go b/netmap/parser/query_base_visitor.go index a7e3599..23ff011 100644 --- a/netmap/parser/query_base_visitor.go +++ b/netmap/parser/query_base_visitor.go @@ -1,8 +1,8 @@ -// Code generated from Query.g4 by ANTLR 4.10.1. DO NOT EDIT. +// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT. package parser // Query -import "github.com/antlr/antlr4/runtime/Go/antlr" +import "github.com/antlr/antlr4/runtime/Go/antlr/v4" type BaseQueryVisitor struct { *antlr.BaseParseTreeVisitor diff --git a/netmap/parser/query_lexer.go b/netmap/parser/query_lexer.go index f4b08b8..7e119e0 100644 --- a/netmap/parser/query_lexer.go +++ b/netmap/parser/query_lexer.go @@ -1,4 +1,4 @@ -// Code generated from QueryLexer.g4 by ANTLR 4.10.1. DO NOT EDIT. +// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT. package parser @@ -7,7 +7,7 @@ import ( "sync" "unicode" - "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/antlr/antlr4/runtime/Go/antlr/v4" ) // Suppress unused import error diff --git a/netmap/parser/query_listener.go b/netmap/parser/query_listener.go index 87888d6..f90994c 100644 --- a/netmap/parser/query_listener.go +++ b/netmap/parser/query_listener.go @@ -1,8 +1,8 @@ -// Code generated from Query.g4 by ANTLR 4.10.1. DO NOT EDIT. +// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT. package parser // Query -import "github.com/antlr/antlr4/runtime/Go/antlr" +import "github.com/antlr/antlr4/runtime/Go/antlr/v4" // QueryListener is a complete listener for a parse tree produced by Query. type QueryListener interface { diff --git a/netmap/parser/query_parser.go b/netmap/parser/query_parser.go index 555ba58..578cd0e 100644 --- a/netmap/parser/query_parser.go +++ b/netmap/parser/query_parser.go @@ -1,4 +1,4 @@ -// Code generated from Query.g4 by ANTLR 4.10.1. DO NOT EDIT. +// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT. package parser // Query @@ -7,7 +7,7 @@ import ( "strconv" "sync" - "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/antlr/antlr4/runtime/Go/antlr/v4" ) // Suppress unused import errors @@ -133,7 +133,7 @@ func NewQuery(input antlr.TokenStream) *Query { this.RuleNames = staticData.ruleNames this.LiteralNames = staticData.literalNames this.SymbolicNames = staticData.symbolicNames - this.GrammarFileName = "Query.g4" + this.GrammarFileName = "java-escape" return this } @@ -2461,7 +2461,7 @@ func (p *Query) Keyword() (localctx IKeywordContext) { p.SetState(119) _la = p.GetTokenStream().LA(1) - if !(((_la)&-(0x1f+1)) == 0 && ((1<