git

package
v0.0.0-...-118bb3a Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BranchHandler

func BranchHandler(c *fiber.Ctx) error

BranchHandler handles Git branch requests

func CheckoutHandler

func CheckoutHandler(c *fiber.Ctx) error

CheckoutHandler handles Git checkout requests

func CloneHandler

func CloneHandler(c *fiber.Ctx) error

CloneHandler handles Git clone requests

func CommitHandler

func CommitHandler(c *fiber.Ctx) error

CommitHandler handles Git commit requests

func InitService

func InitService()

func LogHandler

func LogHandler(c *fiber.Ctx) error

LogHandler handles Git log requests

func MergeHandler

func MergeHandler(c *fiber.Ctx) error

MergeHandler handles Git merge requests

func PullHandler

func PullHandler(c *fiber.Ctx) error

PullHandler handles Git pull requests

func PushHandler

func PushHandler(c *fiber.Ctx) error

PushHandler handles Git push requests

func ResetHandler

func ResetHandler(c *fiber.Ctx) error

ResetHandler handles Git reset requests

func StashHandler

func StashHandler(c *fiber.Ctx) error

StashHandler handles Git stash requests

func StatusHandler

func StatusHandler(c *fiber.Ctx) error

StatusHandler handles Git status requests

Types

type GitRequest

type GitRequest struct {
	URL      string `json:"url"`
	Path     string `json:"path"`
	Branch   string `json:"branch"`
	Username string `json:"username"`
	Password string `json:"password"`
	Message  string `json:"message"`
	Create   bool   `json:"create"`
	Hard     bool   `json:"hard"`
	Pop      bool   `json:"pop"`
	Limit    int    `json:"limit"`
}

type GitService

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

func GetService

func GetService() *GitService

func (*GitService) Branch

func (s *GitService) Branch(path string, create bool, name string) (string, error)

Branch performs Git branch operations

func (*GitService) Checkout

func (s *GitService) Checkout(path, branch string, create bool) error

Checkout performs Git checkout operation

func (*GitService) Clone

func (s *GitService) Clone(url, path, branch string, username, password string) error

Clone performs Git clone operation

func (*GitService) Commit

func (s *GitService) Commit(path, message string) error

Commit performs Git commit operation

func (*GitService) Log

func (s *GitService) Log(path string, limit int) (string, error)

Log gets Git commit history

func (*GitService) Merge

func (s *GitService) Merge(path, branch string) error

Merge performs Git merge operation

func (*GitService) Pull

func (s *GitService) Pull(path string) error

Pull performs Git pull operation

func (*GitService) Push

func (s *GitService) Push(path string, branch string) error

Push performs Git push operation

func (*GitService) Reset

func (s *GitService) Reset(path string, hard bool) error

Reset performs Git reset operation

func (*GitService) Stash

func (s *GitService) Stash(path string, pop bool) error

Stash performs Git stash operations

func (*GitService) Status

func (s *GitService) Status(path string) (string, error)

Status gets Git repository status

Jump to

Keyboard shortcuts

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