metadatamock

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() auacornapi.Acorn

Types

type Impl

type Impl struct {
	Fs  billy.Filesystem
	Now func() time.Time

	FilesWritten   map[string]bool
	FilesCommitted map[string]bool
	Pushed         bool

	SimulateRemoteFailure      bool
	SimulateConcurrencyFailure bool
	SimulateUnchangedFailure   bool
}

func (*Impl) AcornName

func (r *Impl) AcornName() string

func (*Impl) AssembleAcorn

func (r *Impl) AssembleAcorn(registry auacornapi.AcornRegistry) error

func (*Impl) Clone

func (r *Impl) Clone(ctx context.Context) error

func (*Impl) Commit

func (r *Impl) Commit(ctx context.Context, message string) (repository.CommitInfo, error)

func (*Impl) DeleteFile

func (r *Impl) DeleteFile(filename string) error

func (*Impl) Discard

func (r *Impl) Discard(ctx context.Context)

func (*Impl) IsCommitKnown

func (r *Impl) IsCommitKnown(hash string) bool

func (*Impl) IsMetadata

func (r *Impl) IsMetadata() bool

func (*Impl) LastUpdated

func (r *Impl) LastUpdated() time.Time

func (*Impl) MkdirAll

func (r *Impl) MkdirAll(path string) error

func (*Impl) NewPulledCommits

func (r *Impl) NewPulledCommits() []repository.CommitInfo

func (*Impl) Pull

func (r *Impl) Pull(ctx context.Context) error

func (*Impl) Push

func (r *Impl) Push(ctx context.Context) error

func (*Impl) ReadContents

func (r *Impl) ReadContents(filename string) string

func (*Impl) ReadDir

func (r *Impl) ReadDir(path string) ([]os.FileInfo, error)

func (*Impl) ReadFile

func (r *Impl) ReadFile(filename string) ([]byte, repository.CommitInfo, error)

func (*Impl) Reset

func (r *Impl) Reset()

func (*Impl) SetupAcorn

func (r *Impl) SetupAcorn(registry auacornapi.AcornRegistry) error

func (*Impl) Stat

func (r *Impl) Stat(filename string) (os.FileInfo, error)

func (*Impl) TeardownAcorn

func (r *Impl) TeardownAcorn(registry auacornapi.AcornRegistry) error

func (*Impl) WriteFile

func (r *Impl) WriteFile(filename string, contents []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL