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) Apply(_ 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(ctx context.Context, ns graveler.StorageNamespace, ...) (graveler.MetaRangeInfo, error)
- func (c *CommittedFake) GetRange(ctx context.Context, ns graveler.StorageNamespace, rangeID graveler.RangeID) (graveler.RangeInfo, error)
- func (c *CommittedFake) List(context.Context, graveler.StorageNamespace, graveler.MetaRangeID) (graveler.ValueIterator, error)
- func (c *CommittedFake) Merge(_ context.Context, _ graveler.StorageNamespace, _, _, _ graveler.MetaRangeID) (graveler.MetaRangeID, graveler.DiffSummary, error)
- func (c *CommittedFake) WriteMetaRange(ctx context.Context, ns graveler.StorageNamespace, it graveler.ValueIterator, ...) (*graveler.MetaRangeID, error)
- type DRV
- type FakeBranchIterator
- 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 MetaRangeFake
- type RV
- type RefsFake
- func (m *RefsFake) AddCommit(_ context.Context, _ graveler.RepositoryID, commit graveler.Commit) (graveler.CommitID, error)
- func (m *RefsFake) CreateBareRepository(ctx context.Context, repositoryID graveler.RepositoryID, ...) error
- func (m *RefsFake) CreateRepository(context.Context, graveler.RepositoryID, graveler.Repository, ...) error
- func (m *RefsFake) CreateTag(context.Context, graveler.RepositoryID, graveler.TagID, graveler.CommitID) error
- func (m *RefsFake) DeleteBranch(context.Context, graveler.RepositoryID, graveler.BranchID) error
- func (m *RefsFake) DeleteRepository(context.Context, graveler.RepositoryID) error
- func (m *RefsFake) DeleteTag(context.Context, graveler.RepositoryID, graveler.TagID) error
- func (m *RefsFake) FillGenerations(ctx context.Context, repositoryID graveler.RepositoryID) error
- func (m *RefsFake) FindMergeBase(context.Context, graveler.RepositoryID, ...graveler.CommitID) (*graveler.Commit, error)
- func (m *RefsFake) GetBranch(context.Context, graveler.RepositoryID, graveler.BranchID) (*graveler.Branch, error)
- func (m *RefsFake) GetCommit(_ context.Context, _ graveler.RepositoryID, id graveler.CommitID) (*graveler.Commit, error)
- func (m *RefsFake) GetRepository(context.Context, graveler.RepositoryID) (*graveler.Repository, error)
- func (m *RefsFake) GetTag(context.Context, graveler.RepositoryID, graveler.TagID) (*graveler.CommitID, error)
- func (m *RefsFake) ListBranches(context.Context, graveler.RepositoryID) (graveler.BranchIterator, error)
- func (m *RefsFake) ListCommits(ctx context.Context, repositoryID graveler.RepositoryID) (graveler.CommitIterator, error)
- func (m *RefsFake) ListRepositories(context.Context) (graveler.RepositoryIterator, error)
- func (m *RefsFake) ListTags(context.Context, graveler.RepositoryID) (graveler.TagIterator, error)
- func (m *RefsFake) Log(context.Context, graveler.RepositoryID, graveler.CommitID) (graveler.CommitIterator, error)
- func (m *RefsFake) ParseRef(ref graveler.Ref) (graveler.RawRef, error)
- func (m *RefsFake) ResolveRawRef(ctx context.Context, repoID graveler.RepositoryID, rawRef graveler.RawRef) (*graveler.ResolvedRef, error)
- func (m *RefsFake) SetBranch(context.Context, graveler.RepositoryID, graveler.BranchID, graveler.Branch) error
- type StagingFake
- func (s *StagingFake) Drop(context.Context, 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, graveler.StagingToken, graveler.Key) (*graveler.Value, error)
- func (s *StagingFake) List(context.Context, graveler.StagingToken) (graveler.ValueIterator, error)
- func (s *StagingFake) ListSnapshot(context.Context, graveler.StagingToken, graveler.Key) (graveler.ValueIterator, error)
- func (s *StagingFake) Set(_ context.Context, _ graveler.StagingToken, key graveler.Key, ...) error
- func (s *StagingFake) Snapshot(context.Context, graveler.StagingToken) (graveler.StagingToken, 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 DiffIterator graveler.DiffIterator Err error MetaRangeID graveler.MetaRangeID DiffSummary graveler.DiffSummary AppliedData AppliedData }
func (*CommittedFake) Apply ¶
func (c *CommittedFake) Apply(_ context.Context, _ graveler.StorageNamespace, metaRangeID graveler.MetaRangeID, values 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(ctx context.Context, ns graveler.StorageNamespace, metaRangeID graveler.MetaRangeID) (graveler.MetaRangeInfo, error)
func (*CommittedFake) GetRange ¶
func (c *CommittedFake) GetRange(ctx context.Context, ns graveler.StorageNamespace, rangeID graveler.RangeID) (graveler.RangeInfo, error)
func (*CommittedFake) List ¶
func (c *CommittedFake) List(context.Context, graveler.StorageNamespace, graveler.MetaRangeID) (graveler.ValueIterator, error)
func (*CommittedFake) Merge ¶
func (c *CommittedFake) Merge(_ context.Context, _ graveler.StorageNamespace, _, _, _ graveler.MetaRangeID) (graveler.MetaRangeID, graveler.DiffSummary, error)
func (*CommittedFake) WriteMetaRange ¶
func (c *CommittedFake) WriteMetaRange(ctx context.Context, ns graveler.StorageNamespace, it graveler.ValueIterator, metadata graveler.Metadata) (*graveler.MetaRangeID, 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 FakeDiffIterator ¶ added in v0.40.0
type FakeDiffIterator struct { DRV []DRV // contains filtered or unexported fields }
func NewFakeDiffIterator ¶ added in v0.40.0
func NewFakeDiffIterator() *FakeDiffIterator
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 MetaRangeFake ¶
type MetaRangeFake struct {
// contains filtered or unexported fields
}
func (*MetaRangeFake) ID ¶
func (t *MetaRangeFake) ID() graveler.MetaRangeID
type RefsFake ¶
type RefsFake struct { ListRepositoriesRes graveler.RepositoryIterator ListBranchesRes graveler.BranchIterator 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 AddedCommit AddedCommitData CommitID graveler.CommitID Commits map[graveler.CommitID]*graveler.Commit }
func (*RefsFake) CreateBareRepository ¶
func (m *RefsFake) CreateBareRepository(ctx context.Context, repositoryID graveler.RepositoryID, repository graveler.Repository) error
func (*RefsFake) CreateRepository ¶
func (m *RefsFake) CreateRepository(context.Context, graveler.RepositoryID, graveler.Repository, graveler.StagingToken) error
func (*RefsFake) DeleteBranch ¶
func (*RefsFake) DeleteRepository ¶
func (*RefsFake) FillGenerations ¶ added in v0.41.1
func (*RefsFake) FindMergeBase ¶
func (*RefsFake) GetRepository ¶
func (m *RefsFake) GetRepository(context.Context, graveler.RepositoryID) (*graveler.Repository, error)
func (*RefsFake) ListBranches ¶
func (m *RefsFake) ListBranches(context.Context, graveler.RepositoryID) (graveler.BranchIterator, error)
func (*RefsFake) ListCommits ¶
func (m *RefsFake) ListCommits(ctx context.Context, repositoryID graveler.RepositoryID) (graveler.CommitIterator, error)
func (*RefsFake) ListRepositories ¶
func (*RefsFake) ListTags ¶
func (m *RefsFake) ListTags(context.Context, graveler.RepositoryID) (graveler.TagIterator, error)
func (*RefsFake) Log ¶
func (m *RefsFake) Log(context.Context, graveler.RepositoryID, graveler.CommitID) (graveler.CommitIterator, error)
func (*RefsFake) ResolveRawRef ¶ added in v0.44.1
func (m *RefsFake) ResolveRawRef(ctx context.Context, repoID graveler.RepositoryID, rawRef graveler.RawRef) (*graveler.ResolvedRef, error)
type StagingFake ¶
type StagingFake struct { Err error DropErr error // specific error for drop call Value *graveler.Value ValueIterator graveler.ValueIterator LastSetValueRecord *graveler.ValueRecord LastRemovedKey graveler.Key DropCalled bool SetErr error // contains filtered or unexported fields }
func (*StagingFake) Drop ¶
func (s *StagingFake) Drop(context.Context, 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, graveler.StagingToken, graveler.Key) (*graveler.Value, error)
func (*StagingFake) List ¶
func (s *StagingFake) List(context.Context, graveler.StagingToken) (graveler.ValueIterator, error)
func (*StagingFake) ListSnapshot ¶
func (s *StagingFake) ListSnapshot(context.Context, graveler.StagingToken, graveler.Key) (graveler.ValueIterator, error)
func (*StagingFake) Snapshot ¶
func (s *StagingFake) Snapshot(context.Context, graveler.StagingToken) (graveler.StagingToken, error)
Click to show internal directories.
Click to hide internal directories.