Documentation
¶
Index ¶
- Constants
- func NewCommittedValueIteratorFake(records []committed.Record) *committedValueIteratorFake
- func NewDiffIter(records []graveler.Diff) *diffIter
- func NewFakeReference(refType graveler.ReferenceType, branchID graveler.BranchID, ...) *referenceFake
- 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 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) 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) RevParse(context.Context, graveler.RepositoryID, graveler.Ref) (graveler.Reference, 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("master")
Variables ¶
This section is empty.
Functions ¶
func NewDiffIter ¶
func NewFakeReference ¶
func NewFakeReference(refType graveler.ReferenceType, branchID graveler.BranchID, commitID graveler.CommitID) *referenceFake
NewFakeReference returns a referenceFake if branch parameter is empty branch record will be nil
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 NewCommittedFake ¶
func NewCommittedFake() *CommittedFake
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 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 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) 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)
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) Set ¶
func (s *StagingFake) Set(_ context.Context, _ graveler.StagingToken, key graveler.Key, value *graveler.Value) 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.