git

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LF byte = 10
)

Variables

This section is empty.

Functions

func InitLogger added in v0.6.1

func InitLogger(logger *zap.SugaredLogger)

Types

type Config added in v0.6.1

type Config struct {
	Path         Folder `yaml:"dir"`
	URL          string `yaml:"url"`
	Remote       string `yaml:"remote"`
	Revision     string `yaml:"revision"`
	RsaPath      string `yaml:"rsaPath"`
	HttpUser     string `yaml:"httpUser"`
	HttpPassword string `yaml:"httpPassword"`
	Disable      bool   `yaml:"disable"`
}

func (*Config) Checkout added in v0.6.1

func (gc *Config) Checkout(revision string) error

func (Config) Clean added in v0.6.1

func (gc Config) Clean() error

func (Config) Clone added in v0.6.1

func (gc Config) Clone() error

func (*Config) Initialize added in v0.6.1

func (gc *Config) Initialize(workdir Folder)

Initialize the git config with defaults

func (Config) Pull added in v0.6.1

func (gc Config) Pull() error

type Folder added in v0.6.1

type Folder string

func (Folder) Exists added in v0.6.1

func (gf Folder) Exists() (bool, error)

Exists checks if the folder exists (which coud then still be empty

func (Folder) GetCommit added in v0.6.1

func (gf Folder) GetCommit(revision string) string

func (Folder) IsEmpty added in v0.6.1

func (gf Folder) IsEmpty() (bool, error)

func (Folder) IsGitRepo added in v0.6.1

func (gf Folder) IsGitRepo() bool

IsGitRepo checks if the folder is already initialized as a git repo

func (Folder) IsPrepared added in v0.6.1

func (gf Folder) IsPrepared() bool

func (Folder) RunGitCommand added in v0.6.1

func (gf Folder) RunGitCommand(command []string) error

func (Folder) String added in v0.6.1

func (gf Folder) String() string

func (Folder) SubFolder added in v0.6.1

func (gf Folder) SubFolder(name string) (Folder, error)

type FolderState added in v0.6.1

type FolderState int

Jump to

Keyboard shortcuts

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