forked from TrueCloudLab/frostfs-node
[#1] Fix comments and error messages
Signed-off-by: Stanislav Bogatyrev <s.bogatyrev@yadro.com>
This commit is contained in:
parent
c761a95eef
commit
cb016d53a6
96 changed files with 167 additions and 167 deletions
|
@ -98,7 +98,7 @@ func (c *Checker) CheckBasicACL(info v2.RequestInfo) bool {
|
|||
|
||||
// StickyBitCheck validates owner field in the request if sticky bit is enabled.
|
||||
func (c *Checker) StickyBitCheck(info v2.RequestInfo, owner user.ID) bool {
|
||||
// According to NeoFS specification sticky bit has no effect on system nodes
|
||||
// According to FrostFS specification sticky bit has no effect on system nodes
|
||||
// for correct intra-container work with objects (in particular, replication).
|
||||
if info.RequestRole() == acl.RoleContainer {
|
||||
return true
|
||||
|
|
|
@ -192,9 +192,9 @@ func assertVerb(tok sessionSDK.Object, op acl.Op) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// assertSessionRelation checks if given token describing the NeoFS session
|
||||
// assertSessionRelation checks if given token describing the FrostFS session
|
||||
// relates to the given container and optional object. Missing object
|
||||
// means that the context isn't bound to any NeoFS object in the container.
|
||||
// means that the context isn't bound to any FrostFS object in the container.
|
||||
// Returns no error iff relation is correct. Criteria:
|
||||
//
|
||||
// session is bound to the given container
|
||||
|
|
|
@ -26,7 +26,7 @@ type NetworkInfo interface {
|
|||
netmap.State
|
||||
|
||||
// Must return the lifespan of the tombstones
|
||||
// in the NeoFS epochs.
|
||||
// in the FrostFS epochs.
|
||||
TombstoneLifetime() (uint64, error)
|
||||
|
||||
// Returns user ID of the local storage node. Result must not be nil.
|
||||
|
|
|
@ -91,7 +91,7 @@ func (s *Service) GetRangeHash(ctx context.Context, req *objectV2.GetRangeHashRe
|
|||
return toHashResponse(req.GetBody().GetType(), res), nil
|
||||
}
|
||||
|
||||
// Head serves NeoFS API v2 compatible HEAD requests.
|
||||
// Head serves ForstFS API v2 compatible HEAD requests.
|
||||
func (s *Service) Head(ctx context.Context, req *objectV2.HeadRequest) (*objectV2.HeadResponse, error) {
|
||||
resp := new(objectV2.HeadResponse)
|
||||
resp.SetBody(new(objectV2.HeadResponseBody))
|
||||
|
|
|
@ -34,7 +34,7 @@ type commonPrm struct {
|
|||
xHeaders []string
|
||||
}
|
||||
|
||||
// SetClient sets base client for NeoFS API communication.
|
||||
// SetClient sets base client for ForstFS API communication.
|
||||
//
|
||||
// Required parameter.
|
||||
func (x *commonPrm) SetClient(cli coreclient.Client) {
|
||||
|
@ -260,7 +260,7 @@ func HeadObject(prm HeadObjectPrm) (*HeadObjectRes, error) {
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("read object header from NeoFS: %w", err)
|
||||
return nil, fmt.Errorf("read object header from FrostFS: %w", err)
|
||||
}
|
||||
|
||||
var hdr object.Object
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Package internal provides functionality for NeoFS Node Object service communication with NeoFS network.
|
||||
// The base client for accessing remote nodes via NeoFS API is a NeoFS SDK Go API client.
|
||||
// Package internal provides functionality for FrostFS Node Object service communication with FrostFS network.
|
||||
// The base client for accessing remote nodes via FrostFS API is a FrostFS SDK Go API client.
|
||||
// However, although it encapsulates a useful piece of business logic (e.g. the signature mechanism),
|
||||
// the Object service does not fully use the client's flexible interface.
|
||||
//
|
||||
|
@ -7,5 +7,5 @@
|
|||
// This allows you to concentrate the entire spectrum of the client's use in one place (this will be convenient
|
||||
// both when updating the base client and for evaluating the UX of SDK library). So it is expected that all
|
||||
// Object service packages will be limited to this package for the development of functionality requiring
|
||||
// NeoFS API communication.
|
||||
// FrostFS API communication.
|
||||
package internal
|
||||
|
|
|
@ -7,25 +7,25 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util"
|
||||
)
|
||||
|
||||
// GetObjectStream is an interface of NeoFS API v2 compatible object streamer.
|
||||
// GetObjectStream is an interface of FrostFS API v2 compatible object streamer.
|
||||
type GetObjectStream interface {
|
||||
util.ServerStream
|
||||
Send(*object.GetResponse) error
|
||||
}
|
||||
|
||||
// GetObjectRangeStream is an interface of NeoFS API v2 compatible payload range streamer.
|
||||
// GetObjectRangeStream is an interface of FrostFS API v2 compatible payload range streamer.
|
||||
type GetObjectRangeStream interface {
|
||||
util.ServerStream
|
||||
Send(*object.GetRangeResponse) error
|
||||
}
|
||||
|
||||
// SearchStream is an interface of NeoFS API v2 compatible search streamer.
|
||||
// SearchStream is an interface of FrostFS API v2 compatible search streamer.
|
||||
type SearchStream interface {
|
||||
util.ServerStream
|
||||
Send(*object.SearchResponse) error
|
||||
}
|
||||
|
||||
// PutObjectStream is an interface of NeoFS API v2 compatible client's object streamer.
|
||||
// PutObjectStream is an interface of FrostFS API v2 compatible client's object streamer.
|
||||
type PutObjectStream interface {
|
||||
Send(*object.PutRequest) error
|
||||
CloseAndRecv() (*object.PutResponse, error)
|
||||
|
|
|
@ -41,7 +41,7 @@ func NewKeyStorage(localKey *ecdsa.PrivateKey, tokenStore SessionSource, net net
|
|||
}
|
||||
}
|
||||
|
||||
// SessionInfo groups information about NeoFS Object session
|
||||
// SessionInfo groups information about FrostFS Object session
|
||||
// which is reflected in KeyStorage.
|
||||
type SessionInfo struct {
|
||||
// Session unique identifier.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue