db_lib

package
v0.2.54 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnsiblePlaybook

type AnsiblePlaybook struct {
	TemplateID int
	Repository db.Repository
	Logger     lib.Logger
}

func (AnsiblePlaybook) GetFullPath

func (p AnsiblePlaybook) GetFullPath() (path string)

func (AnsiblePlaybook) RunGalaxy

func (p AnsiblePlaybook) RunGalaxy(args []string) error

func (AnsiblePlaybook) RunPlaybook

func (p AnsiblePlaybook) RunPlaybook(args []string, environmentVars *[]string, cb func(*os.Process)) error

type CmdGitClient

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

func (CmdGitClient) CanBePulled

func (c CmdGitClient) CanBePulled(r GitRepository) bool

func (CmdGitClient) Checkout

func (c CmdGitClient) Checkout(r GitRepository, target string) error

func (CmdGitClient) Clone

func (c CmdGitClient) Clone(r GitRepository) error

func (CmdGitClient) GetLastCommitHash

func (c CmdGitClient) GetLastCommitHash(r GitRepository) (hash string, err error)

func (CmdGitClient) GetLastCommitMessage

func (c CmdGitClient) GetLastCommitMessage(r GitRepository) (msg string, err error)

func (CmdGitClient) GetLastRemoteCommitHash

func (c CmdGitClient) GetLastRemoteCommitHash(r GitRepository) (hash string, err error)

func (CmdGitClient) Pull

func (c CmdGitClient) Pull(r GitRepository) error

type GitClient

type GitClient interface {
	Clone(r GitRepository) error
	Pull(r GitRepository) error
	Checkout(r GitRepository, target string) error
	CanBePulled(r GitRepository) bool
	GetLastCommitMessage(r GitRepository) (msg string, err error)
	GetLastCommitHash(r GitRepository) (hash string, err error)
	GetLastRemoteCommitHash(r GitRepository) (hash string, err error)
}

func CreateCmdGitClient

func CreateCmdGitClient() GitClient

func CreateDefaultGitClient

func CreateDefaultGitClient() GitClient

func CreateGoGitClient

func CreateGoGitClient() GitClient

type GitRepository

type GitRepository struct {
	TemplateID int
	Repository db.Repository
	Logger     lib.Logger
	Client     GitClient
}

func (GitRepository) CanBePulled

func (r GitRepository) CanBePulled() bool

func (GitRepository) Checkout

func (r GitRepository) Checkout(target string) error

func (GitRepository) Clone

func (r GitRepository) Clone() error

func (GitRepository) GetFullPath

func (r GitRepository) GetFullPath() (path string)

func (GitRepository) GetLastCommitHash

func (r GitRepository) GetLastCommitHash() (hash string, err error)

func (GitRepository) GetLastCommitMessage

func (r GitRepository) GetLastCommitMessage() (msg string, err error)

func (GitRepository) GetLastRemoteCommitHash

func (r GitRepository) GetLastRemoteCommitHash() (hash string, err error)

func (GitRepository) Pull

func (r GitRepository) Pull() error

func (GitRepository) ValidateRepo

func (r GitRepository) ValidateRepo() error

type GitRepositoryDirType

type GitRepositoryDirType int
const (
	GitRepositoryTmpDir GitRepositoryDirType = iota
	GitRepositoryRepoDir
)

type GoGitClient

type GoGitClient struct{}

func (GoGitClient) CanBePulled

func (c GoGitClient) CanBePulled(r GitRepository) bool

func (GoGitClient) Checkout

func (c GoGitClient) Checkout(r GitRepository, target string) error

func (GoGitClient) Clone

func (c GoGitClient) Clone(r GitRepository) error

func (GoGitClient) GetLastCommitHash

func (c GoGitClient) GetLastCommitHash(r GitRepository) (hash string, err error)

func (GoGitClient) GetLastCommitMessage

func (c GoGitClient) GetLastCommitMessage(r GitRepository) (msg string, err error)

func (GoGitClient) GetLastRemoteCommitHash

func (c GoGitClient) GetLastRemoteCommitHash(r GitRepository) (hash string, err error)

func (GoGitClient) Pull

func (c GoGitClient) Pull(r GitRepository) error

type ProgressWrapper

type ProgressWrapper struct {
	Logger lib.Logger
}

func (ProgressWrapper) Write

func (t ProgressWrapper) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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