Documentation
¶
Index ¶
- func BranchHandler(c *fiber.Ctx) error
- func CheckoutHandler(c *fiber.Ctx) error
- func CloneHandler(c *fiber.Ctx) error
- func CommitHandler(c *fiber.Ctx) error
- func InitService()
- func LogHandler(c *fiber.Ctx) error
- func MergeHandler(c *fiber.Ctx) error
- func PullHandler(c *fiber.Ctx) error
- func PushHandler(c *fiber.Ctx) error
- func ResetHandler(c *fiber.Ctx) error
- func StashHandler(c *fiber.Ctx) error
- func StatusHandler(c *fiber.Ctx) error
- type GitRequest
- type GitService
- func (s *GitService) Branch(path string, create bool, name string) (string, error)
- func (s *GitService) Checkout(path, branch string, create bool) error
- func (s *GitService) Clone(url, path, branch string, username, password string) error
- func (s *GitService) Commit(path, message string) error
- func (s *GitService) Log(path string, limit int) (string, error)
- func (s *GitService) Merge(path, branch string) error
- func (s *GitService) Pull(path string) error
- func (s *GitService) Push(path string, branch string) error
- func (s *GitService) Reset(path string, hard bool) error
- func (s *GitService) Stash(path string, pop bool) error
- func (s *GitService) Status(path string) (string, error)
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 CommitHandler ¶
func CommitHandler(c *fiber.Ctx) error
CommitHandler handles Git commit requests
func InitService ¶
func InitService()
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) 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
Click to show internal directories.
Click to hide internal directories.