Documentation
¶
Index ¶
- Constants
- func NewCommittedValueIteratorFake(records []committed.Record) *committedValueIteratorFake
- func NewDiffIter(records []graveler.Diff) *diffIter
- func NewFakeBranchIteratorFactory(data []*graveler.BranchRecord) func() graveler.BranchIterator
- func NewValueIteratorFake(records []graveler.ValueRecord) graveler.ValueIterator
- type AddedCommitData
- type AppliedData
- type CommittedFake
- func (c *CommittedFake) Commit(_ context.Context, _ graveler.StorageNamespace, ...) (graveler.MetaRangeID, graveler.DiffSummary, error)
- func (c *CommittedFake) Compare(context.Context, graveler.StorageNamespace, graveler.MetaRangeID, ...) (graveler.DiffIterator, error)
- func (c *CommittedFake) Diff(context.Context, graveler.StorageNamespace, graveler.MetaRangeID, ...) (graveler.DiffIterator, error)
- func (c *CommittedFake) Exists(context.Context, graveler.StorageNamespace, graveler.MetaRangeID) (bool, error)
- func (c *CommittedFake) Get(_ context.Context, _ graveler.StorageNamespace, _ graveler.MetaRangeID, ...) (*graveler.Value, error)
- func (c *CommittedFake) GetMetaRange(_ context.Context, _ graveler.StorageNamespace, ...) (graveler.MetaRangeAddress, error)
- func (c *CommittedFake) GetRange(_ context.Context, _ graveler.StorageNamespace, rangeID graveler.RangeID) (graveler.RangeAddress, error)
- func (c *CommittedFake) GetRangeIDByKey(_ context.Context, _ graveler.StorageNamespace, _ graveler.MetaRangeID, ...) (graveler.RangeID, error)
- func (c *CommittedFake) List(_ context.Context, _ graveler.StorageNamespace, mr graveler.MetaRangeID) (graveler.ValueIterator, error)
- func (c *CommittedFake) Merge(_ context.Context, _ graveler.StorageNamespace, _, _, _ graveler.MetaRangeID, ...) (graveler.MetaRangeID, error)
- func (c *CommittedFake) WriteMetaRange(context.Context, graveler.StorageNamespace, []*graveler.RangeInfo) (*graveler.MetaRangeInfo, error)
- func (c *CommittedFake) WriteMetaRangeByIterator(context.Context, graveler.StorageNamespace, graveler.ValueIterator, ...) (*graveler.MetaRangeID, error)
- func (c *CommittedFake) WriteRange(context.Context, graveler.StorageNamespace, graveler.ValueIterator) (*graveler.RangeInfo, error)
- type DRV
- type FakeBranchIterator
- type FakeCommitIterator
- type FakeDiffIterator
- func (i *FakeDiffIterator) AddRange(p *committed.RangeDiff) *FakeDiffIterator
- func (i *FakeDiffIterator) AddValueRecords(vs ...*graveler.Diff) *FakeDiffIterator
- func (i *FakeDiffIterator) Close()
- func (i *FakeDiffIterator) Err() error
- func (i *FakeDiffIterator) Next() bool
- func (i *FakeDiffIterator) NextRange() bool
- func (i *FakeDiffIterator) ReadsByRange() []int
- func (i *FakeDiffIterator) SeekGE(id graveler.Key)
- func (i *FakeDiffIterator) SetErr(err error)
- func (i *FakeDiffIterator) Value() (*graveler.Diff, *committed.RangeDiff)
- type FakeIterator
- func (i *FakeIterator) AddRange(p *committed.Range) *FakeIterator
- func (i *FakeIterator) AddValueRecords(vs ...*graveler.ValueRecord) *FakeIterator
- func (i *FakeIterator) Close()
- func (i *FakeIterator) Err() error
- func (i *FakeIterator) Next() bool
- func (i *FakeIterator) NextRange() bool
- func (i *FakeIterator) ReadsByRange() []int
- func (i *FakeIterator) SeekGE(id graveler.Key)
- func (i *FakeIterator) SetErr(err error)
- func (i *FakeIterator) Value() (*graveler.ValueRecord, *committed.Range)
- type GravelerTest
- type MetaRangeFake
- type ProtectedBranchesManagerFake
- type RV
- type RefsFake
- func (m *RefsFake) AddCommit(_ context.Context, _ *graveler.RepositoryRecord, commit graveler.Commit) (graveler.CommitID, error)
- func (m *RefsFake) BranchUpdate(_ context.Context, _ *graveler.RepositoryRecord, _ graveler.BranchID, ...) error
- func (m *RefsFake) CreateBareRepository(_ context.Context, _ graveler.RepositoryID, _ graveler.Repository) (*graveler.RepositoryRecord, error)
- func (m *RefsFake) CreateBranch(_ context.Context, _ *graveler.RepositoryRecord, _ graveler.BranchID, ...) error
- func (m *RefsFake) CreateRepository(_ context.Context, repositoryID graveler.RepositoryID, ...) (*graveler.RepositoryRecord, error)
- func (m *RefsFake) CreateTag(context.Context, *graveler.RepositoryRecord, graveler.TagID, graveler.CommitID) error
- func (m *RefsFake) DeleteBranch(context.Context, *graveler.RepositoryRecord, graveler.BranchID) error
- func (m *RefsFake) DeleteExpiredImports(context.Context, *graveler.RepositoryRecord) error
- func (m *RefsFake) DeleteExpiredLinkAddresses(context.Context, *graveler.RepositoryRecord) error
- func (m *RefsFake) DeleteRepository(context.Context, graveler.RepositoryID) error
- func (m *RefsFake) DeleteTag(context.Context, *graveler.RepositoryRecord, graveler.TagID) error
- func (m *RefsFake) FillGenerations(_ context.Context, _ *graveler.RepositoryRecord) error
- func (m *RefsFake) FindMergeBase(context.Context, *graveler.RepositoryRecord, ...graveler.CommitID) (*graveler.Commit, error)
- func (m *RefsFake) GCBranchIterator(context.Context, *graveler.RepositoryRecord) (graveler.BranchIterator, error)
- func (m *RefsFake) GCCommitIterator(_ context.Context, _ *graveler.RepositoryRecord) (graveler.CommitIterator, error)
- func (m *RefsFake) GetBranch(context.Context, *graveler.RepositoryRecord, graveler.BranchID) (*graveler.Branch, error)
- func (m *RefsFake) GetCommit(_ context.Context, _ *graveler.RepositoryRecord, id graveler.CommitID) (*graveler.Commit, error)
- func (m *RefsFake) GetCommitByPrefix(_ context.Context, _ *graveler.RepositoryRecord, _ graveler.CommitID) (*graveler.Commit, error)
- func (m *RefsFake) GetRepository(_ context.Context, repositoryID graveler.RepositoryID) (*graveler.RepositoryRecord, error)
- func (m *RefsFake) GetTag(context.Context, *graveler.RepositoryRecord, graveler.TagID) (*graveler.CommitID, error)
- func (m *RefsFake) IsLinkAddressExpired(*graveler.LinkAddressData) (bool, error)
- func (m *RefsFake) ListBranches(context.Context, *graveler.RepositoryRecord) (graveler.BranchIterator, error)
- func (m *RefsFake) ListCommits(_ context.Context, _ *graveler.RepositoryRecord) (graveler.CommitIterator, error)
- func (m *RefsFake) ListLinkAddresses(context.Context, *graveler.RepositoryRecord) (graveler.AddressTokenIterator, error)
- func (m *RefsFake) ListRepositories(context.Context) (graveler.RepositoryIterator, error)
- func (m *RefsFake) ListTags(context.Context, *graveler.RepositoryRecord) (graveler.TagIterator, error)
- func (m *RefsFake) Log(context.Context, *graveler.RepositoryRecord, graveler.CommitID, bool) (graveler.CommitIterator, error)
- func (m *RefsFake) ParseRef(ref graveler.Ref) (graveler.RawRef, error)
- func (m *RefsFake) RemoveCommit(_ context.Context, _ *graveler.RepositoryRecord, commitID graveler.CommitID) error
- func (m *RefsFake) ResolveRawRef(_ context.Context, _ *graveler.RepositoryRecord, rawRef graveler.RawRef) (*graveler.ResolvedRef, error)
- func (m *RefsFake) SetBranch(context.Context, *graveler.RepositoryRecord, graveler.BranchID, ...) error
- func (m *RefsFake) SetLinkAddress(context.Context, *graveler.RepositoryRecord, string) error
- func (m *RefsFake) VerifyLinkAddress(context.Context, *graveler.RepositoryRecord, string) error
- type StagingFake
- func (s *StagingFake) Drop(context.Context, graveler.StagingToken) error
- func (s *StagingFake) DropAsync(ctx context.Context, st graveler.StagingToken) error
- func (s *StagingFake) DropByPrefix(context.Context, graveler.StagingToken, graveler.Key) error
- func (s *StagingFake) DropKey(_ context.Context, _ graveler.StagingToken, key graveler.Key) error
- func (s *StagingFake) Get(_ context.Context, st graveler.StagingToken, key graveler.Key) (*graveler.Value, error)
- func (s *StagingFake) List(_ context.Context, st graveler.StagingToken, _ int) (graveler.ValueIterator, error)
- func (s *StagingFake) Set(_ context.Context, _ graveler.StagingToken, key graveler.Key, ...) error
- func (s *StagingFake) Update(_ context.Context, st graveler.StagingToken, key graveler.Key, ...) error
Constants ¶
View Source
const DefaultBranchID = graveler.BranchID("main")
Variables ¶
This section is empty.
Functions ¶
func NewDiffIter ¶
func NewFakeBranchIteratorFactory ¶ added in v0.43.0
func NewFakeBranchIteratorFactory(data []*graveler.BranchRecord) func() graveler.BranchIterator
func NewValueIteratorFake ¶
func NewValueIteratorFake(records []graveler.ValueRecord) graveler.ValueIterator
Types ¶
type AddedCommitData ¶
type AddedCommitData struct { Committer string Message string MetaRangeID graveler.MetaRangeID Parents graveler.CommitParents Metadata graveler.Metadata }
type AppliedData ¶
type AppliedData struct { Values graveler.ValueIterator MetaRangeID graveler.MetaRangeID }
type CommittedFake ¶
type CommittedFake struct { ValuesByKey map[string]*graveler.Value ValueIterator graveler.ValueIterator Values map[string]graveler.ValueIterator DiffIterator graveler.DiffIterator Err error MetaRangeID graveler.MetaRangeID RangeInfo graveler.RangeInfo DiffSummary graveler.DiffSummary AppliedData AppliedData }
func (*CommittedFake) Commit ¶ added in v0.58.0
func (c *CommittedFake) Commit(_ context.Context, _ graveler.StorageNamespace, baseMetaRangeID graveler.MetaRangeID, changes graveler.ValueIterator) (graveler.MetaRangeID, graveler.DiffSummary, error)
func (*CommittedFake) Compare ¶
func (c *CommittedFake) Compare(context.Context, graveler.StorageNamespace, graveler.MetaRangeID, graveler.MetaRangeID, graveler.MetaRangeID) (graveler.DiffIterator, error)
func (*CommittedFake) Diff ¶
func (c *CommittedFake) Diff(context.Context, graveler.StorageNamespace, graveler.MetaRangeID, graveler.MetaRangeID) (graveler.DiffIterator, error)
func (*CommittedFake) Exists ¶
func (c *CommittedFake) Exists(context.Context, graveler.StorageNamespace, graveler.MetaRangeID) (bool, error)
func (*CommittedFake) Get ¶
func (c *CommittedFake) Get(_ context.Context, _ graveler.StorageNamespace, _ graveler.MetaRangeID, key graveler.Key) (*graveler.Value, error)
func (*CommittedFake) GetMetaRange ¶
func (c *CommittedFake) GetMetaRange(_ context.Context, _ graveler.StorageNamespace, metaRangeID graveler.MetaRangeID) (graveler.MetaRangeAddress, error)
func (*CommittedFake) GetRange ¶
func (c *CommittedFake) GetRange(_ context.Context, _ graveler.StorageNamespace, rangeID graveler.RangeID) (graveler.RangeAddress, error)
func (*CommittedFake) GetRangeIDByKey ¶ added in v0.98.0
func (c *CommittedFake) GetRangeIDByKey(_ context.Context, _ graveler.StorageNamespace, _ graveler.MetaRangeID, _ graveler.Key) (graveler.RangeID, error)
func (*CommittedFake) List ¶
func (c *CommittedFake) List(_ context.Context, _ graveler.StorageNamespace, mr graveler.MetaRangeID) (graveler.ValueIterator, error)
func (*CommittedFake) Merge ¶
func (c *CommittedFake) Merge(_ context.Context, _ graveler.StorageNamespace, _, _, _ graveler.MetaRangeID, _ graveler.MergeStrategy) (graveler.MetaRangeID, error)
func (*CommittedFake) WriteMetaRange ¶
func (c *CommittedFake) WriteMetaRange(context.Context, graveler.StorageNamespace, []*graveler.RangeInfo) (*graveler.MetaRangeInfo, error)
func (*CommittedFake) WriteMetaRangeByIterator ¶ added in v0.63.0
func (c *CommittedFake) WriteMetaRangeByIterator(context.Context, graveler.StorageNamespace, graveler.ValueIterator, graveler.Metadata) (*graveler.MetaRangeID, error)
func (*CommittedFake) WriteRange ¶ added in v0.63.0
func (c *CommittedFake) WriteRange(context.Context, graveler.StorageNamespace, graveler.ValueIterator) (*graveler.RangeInfo, error)
type FakeBranchIterator ¶ added in v0.43.0
type FakeBranchIterator struct { Data []*graveler.BranchRecord Index int }
func NewFakeBranchIterator ¶ added in v0.43.0
func NewFakeBranchIterator(data []*graveler.BranchRecord) *FakeBranchIterator
func (*FakeBranchIterator) Close ¶ added in v0.43.0
func (m *FakeBranchIterator) Close()
func (*FakeBranchIterator) Err ¶ added in v0.43.0
func (m *FakeBranchIterator) Err() error
func (*FakeBranchIterator) Next ¶ added in v0.43.0
func (m *FakeBranchIterator) Next() bool
func (*FakeBranchIterator) SeekGE ¶ added in v0.43.0
func (m *FakeBranchIterator) SeekGE(id graveler.BranchID)
func (*FakeBranchIterator) Value ¶ added in v0.43.0
func (m *FakeBranchIterator) Value() *graveler.BranchRecord
type FakeCommitIterator ¶ added in v0.45.1
type FakeCommitIterator struct { Data []*graveler.CommitRecord Index int }
func NewFakeCommitIterator ¶ added in v0.45.1
func NewFakeCommitIterator(data []*graveler.CommitRecord) *FakeCommitIterator
func (*FakeCommitIterator) Close ¶ added in v0.45.1
func (m *FakeCommitIterator) Close()
func (*FakeCommitIterator) Err ¶ added in v0.45.1
func (m *FakeCommitIterator) Err() error
func (*FakeCommitIterator) Next ¶ added in v0.45.1
func (m *FakeCommitIterator) Next() bool
func (*FakeCommitIterator) SeekGE ¶ added in v0.45.1
func (m *FakeCommitIterator) SeekGE(id graveler.CommitID)
func (*FakeCommitIterator) Value ¶ added in v0.45.1
func (m *FakeCommitIterator) Value() *graveler.CommitRecord
type FakeDiffIterator ¶ added in v0.40.0
type FakeDiffIterator struct { DRV []DRV // contains filtered or unexported fields }
func (*FakeDiffIterator) AddRange ¶ added in v0.40.0
func (i *FakeDiffIterator) AddRange(p *committed.RangeDiff) *FakeDiffIterator
func (*FakeDiffIterator) AddValueRecords ¶ added in v0.40.0
func (i *FakeDiffIterator) AddValueRecords(vs ...*graveler.Diff) *FakeDiffIterator
func (*FakeDiffIterator) Close ¶ added in v0.40.0
func (i *FakeDiffIterator) Close()
func (*FakeDiffIterator) Err ¶ added in v0.40.0
func (i *FakeDiffIterator) Err() error
func (*FakeDiffIterator) Next ¶ added in v0.40.0
func (i *FakeDiffIterator) Next() bool
func (*FakeDiffIterator) NextRange ¶ added in v0.40.0
func (i *FakeDiffIterator) NextRange() bool
func (*FakeDiffIterator) ReadsByRange ¶ added in v0.40.0
func (i *FakeDiffIterator) ReadsByRange() []int
ReadsByRange returns the number of Next operations performed inside each range
func (*FakeDiffIterator) SeekGE ¶ added in v0.40.0
func (i *FakeDiffIterator) SeekGE(id graveler.Key)
func (*FakeDiffIterator) SetErr ¶ added in v0.40.0
func (i *FakeDiffIterator) SetErr(err error)
type FakeIterator ¶
type FakeIterator struct { RV []RV // contains filtered or unexported fields }
func NewFakeIterator ¶
func NewFakeIterator() *FakeIterator
func (*FakeIterator) AddRange ¶
func (i *FakeIterator) AddRange(p *committed.Range) *FakeIterator
func (*FakeIterator) AddValueRecords ¶
func (i *FakeIterator) AddValueRecords(vs ...*graveler.ValueRecord) *FakeIterator
func (*FakeIterator) Close ¶
func (i *FakeIterator) Close()
func (*FakeIterator) Err ¶
func (i *FakeIterator) Err() error
func (*FakeIterator) Next ¶
func (i *FakeIterator) Next() bool
func (*FakeIterator) NextRange ¶
func (i *FakeIterator) NextRange() bool
func (*FakeIterator) ReadsByRange ¶
func (i *FakeIterator) ReadsByRange() []int
ReadsByRange returns the number of Next operations performed inside each range
func (*FakeIterator) SeekGE ¶
func (i *FakeIterator) SeekGE(id graveler.Key)
func (*FakeIterator) SetErr ¶
func (i *FakeIterator) SetErr(err error)
func (*FakeIterator) Value ¶
func (i *FakeIterator) Value() (*graveler.ValueRecord, *committed.Range)
type GravelerTest ¶ added in v0.85.0
type GravelerTest struct { Controller *gomock.Controller CommittedManager *mock.MockCommittedManager RefManager *mock.MockRefManager StagingManager *mock.MockStagingManager ProtectedBranchesManager *mock.MockProtectedBranchesManager GarbageCollectionManager *mock.MockGarbageCollectionManager KVStore *kvmock.MockStore Sut *graveler.Graveler }
func InitGravelerTest ¶ added in v0.85.0
func InitGravelerTest(t *testing.T) *GravelerTest
type MetaRangeFake ¶
type MetaRangeFake struct {
// contains filtered or unexported fields
}
func (*MetaRangeFake) ID ¶
func (t *MetaRangeFake) ID() graveler.MetaRangeID
type ProtectedBranchesManagerFake ¶ added in v0.52.0
type ProtectedBranchesManagerFake struct { graveler.ProtectedBranchesManager // contains filtered or unexported fields }
func NewProtectedBranchesManagerFake ¶ added in v0.52.0
func NewProtectedBranchesManagerFake(protectedBranches ...string) *ProtectedBranchesManagerFake
func (ProtectedBranchesManagerFake) IsBlocked ¶ added in v0.52.0
func (p ProtectedBranchesManagerFake) IsBlocked(_ context.Context, _ *graveler.RepositoryRecord, branchID graveler.BranchID, _ graveler.BranchProtectionBlockedAction) (bool, error)
type RefsFake ¶
type RefsFake struct { ListRepositoriesRes graveler.RepositoryIterator ListBranchesRes graveler.BranchIterator ListCommitsRes graveler.CommitIterator Refs map[graveler.Ref]*graveler.ResolvedRef ListTagsRes graveler.TagIterator CommitIter graveler.CommitIterator RefType graveler.ReferenceType Branch *graveler.Branch TagCommitID *graveler.CommitID Err error CommitErr error UpdateErr error AddedCommit AddedCommitData CommitID graveler.CommitID Commits map[graveler.CommitID]*graveler.Commit StagingToken graveler.StagingToken SealedTokens []graveler.StagingToken // contains filtered or unexported fields }
func (*RefsFake) BranchUpdate ¶ added in v0.70.0
func (m *RefsFake) BranchUpdate(_ context.Context, _ *graveler.RepositoryRecord, _ graveler.BranchID, update graveler.BranchUpdateFunc) error
func (*RefsFake) CreateBareRepository ¶
func (m *RefsFake) CreateBareRepository(_ context.Context, _ graveler.RepositoryID, _ graveler.Repository) (*graveler.RepositoryRecord, error)
func (*RefsFake) CreateBranch ¶ added in v0.54.0
func (*RefsFake) CreateRepository ¶
func (m *RefsFake) CreateRepository(_ context.Context, repositoryID graveler.RepositoryID, repository graveler.Repository) (*graveler.RepositoryRecord, error)
func (*RefsFake) DeleteBranch ¶
func (*RefsFake) DeleteExpiredImports ¶ added in v0.102.0
func (*RefsFake) DeleteExpiredLinkAddresses ¶ added in v0.90.0
func (*RefsFake) DeleteRepository ¶
func (*RefsFake) FillGenerations ¶ added in v0.41.1
func (*RefsFake) FindMergeBase ¶
func (*RefsFake) GCBranchIterator ¶ added in v0.70.0
func (m *RefsFake) GCBranchIterator(context.Context, *graveler.RepositoryRecord) (graveler.BranchIterator, error)
func (*RefsFake) GCCommitIterator ¶ added in v0.70.0
func (m *RefsFake) GCCommitIterator(_ context.Context, _ *graveler.RepositoryRecord) (graveler.CommitIterator, error)
func (*RefsFake) GetCommitByPrefix ¶ added in v0.69.1
func (*RefsFake) GetRepository ¶
func (m *RefsFake) GetRepository(_ context.Context, repositoryID graveler.RepositoryID) (*graveler.RepositoryRecord, error)
func (*RefsFake) IsLinkAddressExpired ¶ added in v0.90.0
func (m *RefsFake) IsLinkAddressExpired(*graveler.LinkAddressData) (bool, error)
func (*RefsFake) ListBranches ¶
func (m *RefsFake) ListBranches(context.Context, *graveler.RepositoryRecord) (graveler.BranchIterator, error)
func (*RefsFake) ListCommits ¶
func (m *RefsFake) ListCommits(_ context.Context, _ *graveler.RepositoryRecord) (graveler.CommitIterator, error)
func (*RefsFake) ListLinkAddresses ¶ added in v0.90.0
func (m *RefsFake) ListLinkAddresses(context.Context, *graveler.RepositoryRecord) (graveler.AddressTokenIterator, error)
func (*RefsFake) ListRepositories ¶
func (*RefsFake) ListTags ¶
func (m *RefsFake) ListTags(context.Context, *graveler.RepositoryRecord) (graveler.TagIterator, error)
func (*RefsFake) RemoveCommit ¶ added in v0.70.0
func (*RefsFake) ResolveRawRef ¶ added in v0.44.1
func (m *RefsFake) ResolveRawRef(_ context.Context, _ *graveler.RepositoryRecord, rawRef graveler.RawRef) (*graveler.ResolvedRef, error)
func (*RefsFake) SetLinkAddress ¶ added in v0.90.0
func (*RefsFake) VerifyLinkAddress ¶ added in v0.90.0
type StagingFake ¶
type StagingFake struct { Err error DropErr error // specific error for drop call Value *graveler.Value ValueIterator graveler.ValueIterator Values map[string]map[string]*graveler.Value LastSetValueRecord *graveler.ValueRecord LastRemovedKey graveler.Key DropCalled bool SetErr error UpdateErr error }
func (*StagingFake) Drop ¶
func (s *StagingFake) Drop(context.Context, graveler.StagingToken) error
func (*StagingFake) DropAsync ¶ added in v0.70.1
func (s *StagingFake) DropAsync(ctx context.Context, st graveler.StagingToken) error
func (*StagingFake) DropByPrefix ¶
func (s *StagingFake) DropByPrefix(context.Context, graveler.StagingToken, graveler.Key) error
func (*StagingFake) DropKey ¶
func (s *StagingFake) DropKey(_ context.Context, _ graveler.StagingToken, key graveler.Key) error
func (*StagingFake) Get ¶
func (s *StagingFake) Get(_ context.Context, st graveler.StagingToken, key graveler.Key) (*graveler.Value, error)
func (*StagingFake) List ¶
func (s *StagingFake) List(_ context.Context, st graveler.StagingToken, _ int) (graveler.ValueIterator, error)
func (*StagingFake) Update ¶ added in v0.70.0
func (s *StagingFake) Update(_ context.Context, st graveler.StagingToken, key graveler.Key, updateFunc graveler.ValueUpdateFunc) error
Click to show internal directories.
Click to hide internal directories.