forked from TrueCloudLab/frostfs-sdk-go
[#4] Rename NeoFS mentions in comments and method names
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
b204a62da1
commit
4ff9c00de3
75 changed files with 423 additions and 423 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
)
|
||||
|
||||
// Address represents global object identifier in NeoFS network. Each object
|
||||
// Address represents global object identifier in FrostFS network. Each object
|
||||
// belongs to exactly one container and is uniquely addressed within the container.
|
||||
//
|
||||
// Address is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.Address
|
||||
|
@ -23,7 +23,7 @@ type Address struct {
|
|||
}
|
||||
|
||||
// ReadFromV2 reads Address from the refs.Address message. Returns an error if
|
||||
// the message is malformed according to the NeoFS API V2 protocol.
|
||||
// the message is malformed according to the FrostFS API V2 protocol.
|
||||
//
|
||||
// See also WriteToV2.
|
||||
func (x *Address) ReadFromV2(m refs.Address) error {
|
||||
|
@ -65,7 +65,7 @@ func (x Address) WriteToV2(m *refs.Address) {
|
|||
m.SetContainerID(&cnr)
|
||||
}
|
||||
|
||||
// MarshalJSON encodes Address into a JSON format of the NeoFS API protocol
|
||||
// MarshalJSON encodes Address into a JSON format of the FrostFS API protocol
|
||||
// (Protocol Buffers JSON).
|
||||
//
|
||||
// See also UnmarshalJSON.
|
||||
|
@ -76,7 +76,7 @@ func (x Address) MarshalJSON() ([]byte, error) {
|
|||
return m.MarshalJSON()
|
||||
}
|
||||
|
||||
// UnmarshalJSON decodes NeoFS API protocol JSON format into the Address
|
||||
// UnmarshalJSON decodes FrostFS API protocol JSON format into the Address
|
||||
// (Protocol Buffers JSON). Returns an error describing a format violation.
|
||||
//
|
||||
// See also MarshalJSON.
|
||||
|
@ -91,9 +91,9 @@ func (x *Address) UnmarshalJSON(data []byte) error {
|
|||
return x.ReadFromV2(m)
|
||||
}
|
||||
|
||||
// Container returns unique identifier of the NeoFS object container.
|
||||
// Container returns unique identifier of the FrostFS object container.
|
||||
//
|
||||
// Zero Address has zero container ID, which is incorrect according to NeoFS
|
||||
// Zero Address has zero container ID, which is incorrect according to FrostFS
|
||||
// API protocol.
|
||||
//
|
||||
// See also SetContainer.
|
||||
|
@ -101,7 +101,7 @@ func (x Address) Container() cid.ID {
|
|||
return x.cnr
|
||||
}
|
||||
|
||||
// SetContainer sets unique identifier of the NeoFS object container.
|
||||
// SetContainer sets unique identifier of the FrostFS object container.
|
||||
//
|
||||
// See also Container.
|
||||
func (x *Address) SetContainer(id cid.ID) {
|
||||
|
@ -111,7 +111,7 @@ func (x *Address) SetContainer(id cid.ID) {
|
|||
// Object returns unique identifier of the object in the container
|
||||
// identified by Container().
|
||||
//
|
||||
// Zero Address has zero object ID, which is incorrect according to NeoFS
|
||||
// Zero Address has zero object ID, which is incorrect according to FrostFS
|
||||
// API protocol.
|
||||
//
|
||||
// See also SetObject.
|
||||
|
@ -130,7 +130,7 @@ func (x *Address) SetObject(id ID) {
|
|||
// delimiter of container and object IDs in Address protocol string.
|
||||
const idDelimiter = "/"
|
||||
|
||||
// EncodeToString encodes Address into NeoFS API protocol string: concatenation
|
||||
// EncodeToString encodes Address into FrostFS API protocol string: concatenation
|
||||
// of the string-encoded container and object IDs delimited by a slash.
|
||||
//
|
||||
// See also DecodeString.
|
||||
|
@ -138,7 +138,7 @@ func (x Address) EncodeToString() string {
|
|||
return x.cnr.EncodeToString() + "/" + x.obj.EncodeToString()
|
||||
}
|
||||
|
||||
// DecodeString decodes string into Address according to NeoFS API protocol. Returns
|
||||
// DecodeString decodes string into Address according to FrostFS API protocol. Returns
|
||||
// an error if s is malformed.
|
||||
//
|
||||
// See also DecodeString.
|
||||
|
@ -165,7 +165,7 @@ func (x *Address) 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 Address into NeoFS protocol string.
|
||||
// be used to encode Address into FrostFS protocol string.
|
||||
func (x Address) String() string {
|
||||
return x.EncodeToString()
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Package oid provides primitives to work with object identification in NeoFS.
|
||||
Package oid provides primitives to work with object identification in FrostFS.
|
||||
|
||||
Address type is used for global object identity inside the NeoFS network,
|
||||
Address type is used for global object identity inside the FrostFS network,
|
||||
while ID represents identity within a fixed container.
|
||||
|
||||
Using package types in an application is recommended to potentially work with
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/mr-tron/base58"
|
||||
)
|
||||
|
||||
// ID represents NeoFS object identifier in a container.
|
||||
// ID represents FrostFS object identifier in a container.
|
||||
//
|
||||
// ID is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.ObjectID
|
||||
// message. See ReadFromV2 / WriteToV2 methods.
|
||||
|
@ -24,7 +24,7 @@ import (
|
|||
type ID [sha256.Size]byte
|
||||
|
||||
// ReadFromV2 reads ID from the refs.ObjectID message. Returns an error if
|
||||
// the message is malformed according to the NeoFS API V2 protocol.
|
||||
// the message is malformed according to the FrostFS API V2 protocol.
|
||||
//
|
||||
// See also WriteToV2.
|
||||
func (id *ID) ReadFromV2(m refs.ObjectID) error {
|
||||
|
@ -85,7 +85,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.
|
||||
//
|
||||
|
@ -94,7 +94,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.
|
||||
|
@ -111,7 +111,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()
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
)
|
||||
|
||||
// Lock represents record with locked objects. It is compatible with
|
||||
// NeoFS API V2 protocol.
|
||||
// FrostFS API V2 protocol.
|
||||
//
|
||||
// Lock instance can be written to the Object, see WriteLock/ReadLock.
|
||||
type Lock v2object.Lock
|
||||
|
@ -62,12 +62,12 @@ func (x *Lock) WriteMembers(ids []oid.ID) {
|
|||
(*v2object.Lock)(x).SetMembers(members)
|
||||
}
|
||||
|
||||
// Marshal encodes the Lock into a NeoFS protocol binary format.
|
||||
// Marshal encodes the Lock into a FrostFS protocol binary format.
|
||||
func (x Lock) Marshal() []byte {
|
||||
return (*v2object.Lock)(&x).StableMarshal(nil)
|
||||
}
|
||||
|
||||
// Unmarshal decodes the Lock from its NeoFS protocol binary representation.
|
||||
// Unmarshal decodes the Lock from its FrostFS protocol binary representation.
|
||||
func (x *Lock) Unmarshal(data []byte) error {
|
||||
return (*v2object.Lock)(x).Unmarshal(data)
|
||||
}
|
||||
|
|
|
@ -16,22 +16,22 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-sdk-go/version"
|
||||
)
|
||||
|
||||
// Object represents in-memory structure of the NeoFS object.
|
||||
// Type is compatible with NeoFS API V2 protocol.
|
||||
// Object represents in-memory structure of the FrostFS object.
|
||||
// Type is compatible with FrostFS API V2 protocol.
|
||||
//
|
||||
// Instance can be created depending on scenario:
|
||||
// - InitCreation (an object to be placed in container);
|
||||
// - New (blank instance, usually needed for decoding);
|
||||
// - NewFromV2 (when working under NeoFS API V2 protocol).
|
||||
// - NewFromV2 (when working under FrostFS API V2 protocol).
|
||||
type Object object.Object
|
||||
|
||||
// RequiredFields contains the minimum set of object data that must be set
|
||||
// by the NeoFS user at the stage of creation.
|
||||
// by the FrostFS user at the stage of creation.
|
||||
type RequiredFields struct {
|
||||
// Identifier of the NeoFS container associated with the object.
|
||||
// Identifier of the FrostFS container associated with the object.
|
||||
Container cid.ID
|
||||
|
||||
// Object owner's user ID in the NeoFS system.
|
||||
// Object owner's user ID in the FrostFS system.
|
||||
Owner user.ID
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-api-go/v2/object"
|
||||
)
|
||||
|
||||
// RawObject represents v2-compatible NeoFS object that provides
|
||||
// RawObject represents v2-compatible FrostFS object that provides
|
||||
// a convenient interface to fill in the fields of
|
||||
// an object in isolation from its internal structure.
|
||||
//
|
||||
|
|
|
@ -213,7 +213,7 @@ func (f *SearchFilters) addReservedFilter(op SearchMatchType, keyTyp filterKeyTy
|
|||
}
|
||||
|
||||
// addFlagFilters adds filters that works like flags: they don't need to have
|
||||
// specific match type or value. They processed by NeoFS nodes by the fact
|
||||
// specific match type or value. They processed by FrostFS nodes by the fact
|
||||
// of presence in search query. E.g.: PHY, ROOT.
|
||||
func (f *SearchFilters) addFlagFilter(keyTyp filterKeyType) {
|
||||
f.addFilter(MatchUnknown, keyTyp, "", staticStringer(""))
|
||||
|
|
|
@ -33,7 +33,7 @@ func (t *Tombstone) ToV2() *tombstone.Tombstone {
|
|||
return (*tombstone.Tombstone)(t)
|
||||
}
|
||||
|
||||
// ExpirationEpoch returns the last NeoFS epoch
|
||||
// ExpirationEpoch returns the last FrostFS epoch
|
||||
// number of the tombstone lifetime.
|
||||
//
|
||||
// See also SetExpirationEpoch.
|
||||
|
@ -41,7 +41,7 @@ func (t *Tombstone) ExpirationEpoch() uint64 {
|
|||
return (*tombstone.Tombstone)(t).GetExpirationEpoch()
|
||||
}
|
||||
|
||||
// SetExpirationEpoch sets the last NeoFS epoch
|
||||
// SetExpirationEpoch sets the last FrostFS epoch
|
||||
// number of the tombstone lifetime.
|
||||
//
|
||||
// See also ExpirationEpoch.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue