Documentation ¶
Index ¶
- type Git
- func (g *Git) Add(files ...string) error
- func (g *Git) Clone() error
- func (g *Git) Commit(commitMessage string) error
- func (g *Git) Fetch() error
- func (g *Git) GetHEADCommitHash() (string, error)
- func (g *Git) GetRemoteHEADCommitHash() (string, error)
- func (g *Git) GetRemoteURL() (string, error)
- func (g *Git) PullRebase() error
- func (g *Git) Push() error
- func (g *Git) Status() (string, error)
- type Options
- type RepositorySyncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct { *Options // contains filtered or unexported fields }
func (*Git) GetHEADCommitHash ¶
func (*Git) GetRemoteHEADCommitHash ¶ added in v0.0.3
func (*Git) GetRemoteURL ¶
type Options ¶
type Options struct { // AbsLocalPath is the path of the directory to clone to. AbsLocalPath, RemoteURL, BranchName, AuthorName, AuthorEmail, GithubToken string // Github SSH private key file GithubSSHPrivkeyFilename string // IsEnsureEmptyDirectory ensures the local directory is empty before cloning to it. IsEnsureEmptyDirectory bool // SyncPeriod is the period in which synchronization with the git repository is guaranteed. SyncPeriod time.Duration // Whether to write certificates into the Git repository (will be false when only pushing certs to other storages) PushCertificates bool // Do not push to remote repository (but still write to the local Git clone) DryRun bool }
type RepositorySyncer ¶
type RepositorySyncer struct {
// contains filtered or unexported fields
}
func (*RepositorySyncer) AddFilesAndCommit ¶
func (r *RepositorySyncer) AddFilesAndCommit(commitMessage string, files ...string) error
Click to show internal directories.
Click to hide internal directories.