gitup

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fork added in v1.4.0

type Fork struct {
	Api         RepoFork
	ForkConfigs []*ForkConfig
	TaskRunner  dd.TaskRunner
	Logger      dd.LevelLogger
}

Fork

func (*Fork) Go added in v1.4.0

func (f *Fork) Go()

Go Entrance of |fork|

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"`
	RmForkRelation *bool     `yaml:"rm-fork-relation,omitempty"`
}

type GitlabApi added in v1.4.3

type GitlabApi interface {
	// Api - Returen the |gitlab| api instance for gitlab api access
	Api() *gitlabapi.Client

	// Logger - Return the current logger for logging
	Logger() dd.LevelLogger
}

func NewGitlabApi added in v1.4.3

func NewGitlabApi(token, host *string, logger dd.LevelLogger) (GitlabApi, error)

type GitlabConfig added in v1.4.2

type GitlabConfig struct {
	Host           *string
	Token          *string
	FilterArchived bool
	Logger         dd.LevelLogger
}

type Repo

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

Repo represent a repository

type RepoFork added in v1.4.0

type RepoFork interface {
	RepoList

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

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

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

	DeleteForkRelationship(r *Repo) (bool, error)
}

RepoFork - represent a set of fork operations to fork any repositories

func NewGitlabFork added in v1.4.2

func NewGitlabFork(config *GitlabConfig) (RepoFork, error)

NewGitlabFork Helper function to create |RepoFork| gitlab implement

type RepoList added in v1.4.0

type RepoList 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)
}

RepoList - represent a set of list operations of all repositories

func NewGitlabList added in v1.4.2

func NewGitlabList(config *GitlabConfig) (RepoList, error)

NewGitlabList Helper function to create |RepoList| gitlab implement

type Sync added in v1.4.0

type Sync struct {
	Api        RepoList
	SyncConfig *SyncConfig
	Cwd        *string
	TaskRunner dd.TaskRunner
	Logger     dd.LevelLogger
}

Sync

func (*Sync) Go added in v1.4.0

func (s *Sync) Go()

Go Entrance of |sync|

type SyncConfig

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

Jump to

Keyboard shortcuts

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