git

package
v0.2.36 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ActionStatus     = &Action{Key: "status", Title: "Status", Description: "Returns the status of the repository"}
	ActionCreateRepo = &Action{Key: "createrepo", Title: "Create Repo", Description: "Creates a git repo and makes an initial commit"}
	ActionMagic      = &Action{Key: "magic", Title: "Magic", Description: "Does everything it can to bring the repo up to date"}
	ActionFetch      = &Action{Key: "fetch", Title: "Fetch", Description: "Fetches the latest changes from the repository"}
	ActionCommit     = &Action{Key: "commit", Title: "Commit", Description: "Adds all files, commits with the provided message"}
	ActionBranch     = &Action{Key: "branch", Title: "Branch", Description: "Switch to a new branch"}
)

Functions

This section is empty.

Types

type Action

type Action struct {
	Key         string `json:"key"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

type Actions

type Actions []*Action

type Result

type Result struct {
	Project *project.Project `json:"-"`
	Status  string           `json:"status"`
	Data    util.ValueMap    `json:"data"`
	Error   string           `json:"error"`
}

func NewResult

func NewResult(prj *project.Project, status string, data util.ValueMap) *Result

func (*Result) Actions

func (s *Result) Actions() Actions

func (*Result) Branch

func (s *Result) Branch() string

type Results

type Results []*Result

func (Results) Get

func (s Results) Get(key string) *Result

type Service

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

func NewService

func NewService(logger util.Logger) *Service

func (Service) Commit

func (s Service) Commit(ctx context.Context, prj *project.Project, msg string, logger util.Logger) (*Result, error)

func (Service) CreateRepo

func (s Service) CreateRepo(prj *project.Project) (*Result, error)

func (Service) Fetch

func (s Service) Fetch(ctx context.Context, prj *project.Project, logger util.Logger) (*Result, error)

func (Service) Magic

func (s Service) Magic(prj *project.Project) (*Result, error)

func (Service) Status

func (s Service) Status(ctx context.Context, prj *project.Project, logger util.Logger) (*Result, error)

Jump to

Keyboard shortcuts

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