localrepo

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalRepo

type LocalRepo struct {
	// contains filtered or unexported fields
}

func AttachLocalRepo

func AttachLocalRepo(logger *zap.Logger, e exec.Interface, path string) (*LocalRepo, error)

func InitLocalRepo

func InitLocalRepo(logger *zap.Logger, e exec.Interface, path, username, email, remoteUrl string) (*LocalRepo, error)

func (*LocalRepo) ClearRevision

func (l *LocalRepo) ClearRevision(ctx context.Context) error

func (*LocalRepo) CreateFile

func (l *LocalRepo) CreateFile(name string, data []byte, perm os.FileMode) error

func (*LocalRepo) CurrentBranch

func (l *LocalRepo) CurrentBranch(ctx context.Context) (string, error)

func (*LocalRepo) DiffWithRemote

func (l *LocalRepo) DiffWithRemote(ctx context.Context) (bool, error)

func (*LocalRepo) Fetch

func (l *LocalRepo) Fetch(ctx context.Context) error

func (*LocalRepo) GetHeadInfo added in v0.0.3

func (l *LocalRepo) GetHeadInfo(ctx context.Context) (string, string, error)

func (*LocalRepo) GetRevision

func (l *LocalRepo) GetRevision(ctx context.Context) (string, error)

func (*LocalRepo) IsFirstCommit

func (l *LocalRepo) IsFirstCommit(ctx context.Context) (bool, error)

func (*LocalRepo) LoadConf

func (l *LocalRepo) LoadConf() (*config.Config, error)

func (*LocalRepo) Push

func (l *LocalRepo) Push(ctx context.Context) error

func (*LocalRepo) Reset

func (l *LocalRepo) Reset(ctx context.Context) error

func (*LocalRepo) SetRevision

func (l *LocalRepo) SetRevision(ctx context.Context, revision string) error

func (*LocalRepo) SwitchAndMerge

func (l *LocalRepo) SwitchAndMerge(ctx context.Context, branch string) error

func (*LocalRepo) SwitchDetachedBranch

func (l *LocalRepo) SwitchDetachedBranch(ctx context.Context, revision string) error

type LocalRepoIface

type LocalRepoIface interface {
	LoadConf() (*config.Config, error)
	CreateFile(name string, data []byte, perm os.FileMode) error
	Fetch(ctx context.Context) error
	SwitchAndMerge(ctx context.Context, branch string) error
	SwitchDetachedBranch(ctx context.Context, revision string) error
	Push(ctx context.Context) error
	CurrentBranch(ctx context.Context) (string, error)
	IsFirstCommit(ctx context.Context) (bool, error)
	DiffWithRemote(ctx context.Context) (bool, error)
	Reset(ctx context.Context) error
	GetRevision(ctx context.Context) (string, error)
	SetRevision(ctx context.Context, revision string) error
	ClearRevision(ctx context.Context) error
	GetHeadInfo(ctx context.Context) (string, string, error)
}

Jump to

Keyboard shortcuts

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