app

package
v0.0.0-...-c43793d Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Configuration *configuration.Configuration
	Debug         bool
	Dryrun        bool
	ShowDiffs     bool
	Subcommand    string
	Verbose       bool
	Version       string
}

func (*App) LogDebug

func (a *App) LogDebug(text string)

func (*App) Run

func (a *App) Run() int

func (*App) Sync

func (a *App) Sync(target string) int

type Repository

type Repository struct {
	CandidateFiles         []*SyncCandidate
	FilesystemPath         string
	RawRepository          *git.Repository
	Ref                    string
	RefType                string
	RequiresAuthentication bool
	ShowDiffs              bool
	TemplatesDirectory     string
	Url                    string
}

func (*Repository) Checkout

func (r *Repository) Checkout() error

func (*Repository) Clone

func (r *Repository) Clone(tempdir string, verbose bool) error

func (*Repository) ExecuteCandidateSync

func (r *Repository) ExecuteCandidateSync() error

func (*Repository) FindSyncCandidates

func (r *Repository) FindSyncCandidates() error

func (*Repository) ListFiles

func (r *Repository) ListFiles() ([]fs.FileInfo, error)

func (*Repository) PrintCandidates

func (r *Repository) PrintCandidates()

type SyncCandidate

type SyncCandidate struct {
	Diff           string
	Name           string
	SourceContents []byte
	SourceFile     string
	TargetContents []byte
	TargetFile     string
	TargetMode     fs.FileMode
}

func (*SyncCandidate) GetWriteMode

func (c *SyncCandidate) GetWriteMode(path string) error

func (*SyncCandidate) LoadContents

func (c *SyncCandidate) LoadContents(file string) ([]byte, error)

func (*SyncCandidate) RequiresSync

func (c *SyncCandidate) RequiresSync() (bool, error)

func (*SyncCandidate) Sync

func (c *SyncCandidate) Sync() error

func (*SyncCandidate) TargetExists

func (c *SyncCandidate) TargetExists() bool

Jump to

Keyboard shortcuts

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