repotest

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFiles

func NewFiles() repository.Files

NewFiles mock repo files

Types

type MockConfigReadWriter

type MockConfigReadWriter struct {
	Configs map[string]string
}

MockConfigReadWriter mock config reader and writer

func NewConfigReadWriter

func NewConfigReadWriter() *MockConfigReadWriter

NewConfigReadWriter mock config reader and writer

func (*MockConfigReadWriter) GetConfig

func (m *MockConfigReadWriter) GetConfig(key string) (string, error)

GetConfig get config

func (*MockConfigReadWriter) SetConfig

func (m *MockConfigReadWriter) SetConfig(key, value string) error

SetConfig update config

type MockFiles

type MockFiles struct{}

MockFiles mock files

func (*MockFiles) ListAllFiles

func (m *MockFiles) ListAllFiles() (sha1 string, uploads []string, err error)

ListAllFiles list all fiels

func (*MockFiles) ListChangedFiles

func (m *MockFiles) ListChangedFiles(baseSha1 string) (sha1 string, uploads []string, deletes []string, err error)

ListChangedFiles list changed files

type MockHeadReadWriter

type MockHeadReadWriter struct {
	repository.HeadReader
	repository.HeadWriter
}

MockHeadReadWriter mock head read and writer

func NewHeadReadWriter

func NewHeadReadWriter() *MockHeadReadWriter

NewHeadReadWriter mock head reader and writer

type MockHeadReader

type MockHeadReader struct {
	Head string
}

MockHeadReader mock head reader

func NewHeadReader

func NewHeadReader() *MockHeadReader

NewHeadReader mock head reader

func (*MockHeadReader) GetHead

func (m *MockHeadReader) GetHead() (string, error)

GetHead get head

func (*MockHeadReader) GetHeadSHA1

func (m *MockHeadReader) GetHeadSHA1() (string, error)

GetHeadSHA1 get head sha1

type MockHeadWriter

type MockHeadWriter struct {
	Head string
}

MockHeadWriter mock head writer

func NewHeadWriter

func NewHeadWriter() *MockHeadWriter

NewHeadWriter mock head writer

func (*MockHeadWriter) PopHead

func (m *MockHeadWriter) PopHead(head string) error

PopHead pop head

func (*MockHeadWriter) PushHead

func (m *MockHeadWriter) PushHead(head string) (string, error)

PushHead push head

Jump to

Keyboard shortcuts

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