frostfs-node/pkg/core/container/storage.go
Alexander Chuprov eae9debc14
All checks were successful
DCO action / DCO (pull_request) Successful in 46s
Vulncheck / Vulncheck (pull_request) Successful in 1m11s
Build / Build Components (pull_request) Successful in 1m59s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m56s
Tests and linters / gopls check (pull_request) Successful in 2m51s
Tests and linters / Tests with -race (pull_request) Successful in 3m11s
Tests and linters / Run gofumpt (pull_request) Successful in 3m42s
Tests and linters / Staticcheck (pull_request) Successful in 4m23s
Tests and linters / Lint (pull_request) Successful in 4m33s
Tests and linters / Tests (pull_request) Successful in 4m44s
[#1613] morph: Add tracing for morph queries to neo-go
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-02-05 16:37:11 +03:00

62 lines
1.8 KiB
Go

package container
import (
"context"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container"
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
frostfscrypto "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/crypto"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/eacl"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/session"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
)
// Container groups information about the FrostFS container stored in the FrostFS network.
type Container struct {
// Container structure.
Value container.Container
// Signature of the Value.
Signature frostfscrypto.Signature
// Session within which Value was created. Nil means session absence.
Session *session.Container
}
// DelInfo contains info about removed container.
type DelInfo struct {
// Container owner.
Owner user.ID
// Epoch indicates when the container was removed.
Epoch uint64
}
// Source is an interface that wraps
// basic container receiving method.
type Source interface {
// Get reads the container from the storage by its identifier.
// It returns the pointer to the requested container and any error encountered.
//
// Get must return exactly one non-nil value.
// Get must return an error of type apistatus.ContainerNotFound if the container is not in the storage.
//
// Implementations must not retain the container pointer and modify
// the container through it.
Get(ctx context.Context, cid cid.ID) (*Container, error)
DeletionInfo(ctx context.Context, cid cid.ID) (*DelInfo, error)
}
// EACL groups information about the FrostFS container's extended ACL stored in
// the FrostFS network.
type EACL struct {
// Extended ACL structure.
Value *eacl.Table
// Signature of the Value.
Signature frostfscrypto.Signature
// Session within which Value was set. Nil means session absence.
Session *session.Container
}