gitup

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForkConfig

type ForkConfig struct {
	FromGroup *string   `yaml:"from-group"`
	FromRepos []*string `yaml:"from-repos"`
	ToGroup   *string   `yaml:"to-group"`
	ToRepos   []*string `yaml:"to-repos,omitempty"`
}

type Forker

type Forker struct {
	Api         RepoForker
	ForkConfigs []*ForkConfig
	TaskRunner  dd.TaskRunner
	Logger      dd.LevelLogger
}

Forker

func (*Forker) Go

func (f *Forker) Go()

Go Entrance of |Forker|

type Repo

type Repo struct {
	ID       int
	URL      string
	Name     string
	Group    string
	FullPath string
}

Repo represent a repository

type RepoForker

type RepoForker interface {
	RepoListor

	Fork(r *Repo, group *string) (*Repo, error)

	Rename(r *Repo, name *string) (*Repo, error)

	Transfer(r *Repo, group *string) (*Repo, error)
}

RepoForker represent a forker to fork any repositories

type RepoListor

type RepoListor interface {
	Projects() []*Repo

	// ProjectsByGroup: List project by group name prefix match
	ProjectsByGroup(group *string) ([]*Repo, error)

	// Project: Filter target project by specific group and name
	Project(group, name *string) (*Repo, error)
}

RepoListor represent a listor of all repositories

type SyncConfig

type SyncConfig struct {
	Bare   bool
	Groups []*string
}

type Syncer

type Syncer struct {
	Api        RepoListor
	SyncConfig *SyncConfig
	Cwd        *string
	TaskRunner dd.TaskRunner
	Logger     dd.LevelLogger
}

Syncer

func (*Syncer) Go

func (s *Syncer) Go()

Go Entrance of |Syncer|

Jump to

Keyboard shortcuts

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