Documentation
¶
Index ¶
- type CloneProjects
- type Gitlab
- func (g *Gitlab) Clone(repository *GitlabRepository, hubDir string) error
- func (g *Gitlab) CloneGitlabHub(projects *CloneProjects) error
- func (g *Gitlab) CloneRepository(url, branch, directory string) error
- func (g *Gitlab) GetGitlabRepository(projects *GitlabProjects) ([]Repository, error)
- func (g *Gitlab) GetProjectLanguage(dir string) (string, error)
- func (g *Gitlab) PullRepository(repo *git.Repository, branch, name string) error
- func (g *Gitlab) ScanGitlabHub(projects *GitlabProjects) error
- func (g *Gitlab) UpdateRepositoryLanguage(id int, dir string) error
- type GitlabProjects
- type GitlabRepository
- type IRepository
- type Namespace
- type Repository
- type RepositoryService
- func (r *RepositoryService) ExixtsRepository(ids []string) ([]int, error)
- func (r *RepositoryService) FindRepositories(page, limit int, language string) ([]GitlabRepository, error)
- func (r *RepositoryService) GetRepositoryById(id int) (*GitlabRepository, error)
- func (r *RepositoryService) SaveRepository(repository Repository) error
- func (r *RepositoryService) UpdateRepository(language, dir string, id int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloneProjects ¶
type Gitlab ¶
func (*Gitlab) Clone ¶
func (g *Gitlab) Clone(repository *GitlabRepository, hubDir string) error
Clone clone gitlab repository
func (*Gitlab) CloneGitlabHub ¶
func (g *Gitlab) CloneGitlabHub(projects *CloneProjects) error
func (*Gitlab) CloneRepository ¶
func (*Gitlab) GetGitlabRepository ¶
func (g *Gitlab) GetGitlabRepository(projects *GitlabProjects) ([]Repository, error)
GetGitlabRepository select gitlab repository
func (*Gitlab) PullRepository ¶
func (g *Gitlab) PullRepository(repo *git.Repository, branch, name string) error
func (*Gitlab) ScanGitlabHub ¶
func (g *Gitlab) ScanGitlabHub(projects *GitlabProjects) error
ScanGitlabHub scan gitlab hub
type GitlabProjects ¶
type GitlabRepository ¶
type GitlabRepository struct {
// gorm.Model
Id int `gorm:"cloumn:id"`
Name string `gorm:"cloumn:name"` // name
Path string `gorm:"cloumn:path"` // path
PathWithNamespace string `gorm:"cloumn:path_with_namespace"` // path with namespace
DefaultBranch string `gorm:"cloumn:default_branch"` // default branch
Language string `gorm:"cloumn:language"` // programming language
Archived bool `gorm:"cloumn:archived"` // archived
HttpUrlToRepo string `gorm:"cloumn:http_url_to_repo"` // http url to repo
WebUrl string `gorm:"cloumn:web_url"` // web url
LastActivityAt string `gorm:"cloumn:last_activity_at"` // last activity at
CreateAt string `gorm:"cloumn:created_at"` // created at
Visibility string `gorm:"cloumn:visibility"` // visibility
Description string `gorm:"cloumn:description"` // description
CreatorId int `gorm:"cloumn:creator_id"` // creator id
NamespaceId int `gorm:"cloumn:namespace_id"` // namespace id
NamespaceName string `gorm:"cloumn:namespace_name"` // namespace name
NamespacePath string `gorm:"cloumn:namespace_path"` // namespace path
NamespaceKind string `gorm:"cloumn:namespace_kind"` // namespace kind
NamespaceFullPath string `gorm:"cloumn:namespace_full_path"` // namespace full path
NamespaceParentId int `gorm:"cloumn:namespace_parent_id"` // namespace parent id
WorkspaceDir string `gorm:"cloumn:workspace_dir"` // workspace dir
}
GitlabRepository gitlab repository
type IRepository ¶
type IRepository interface {
SaveRepository(repository Repository) error
UpdateRepository(language, dir string, id int) error
FindRepositories(page, limit int, language string) ([]GitlabRepository, error)
GetRepositoryById(id int) (*GitlabRepository, error)
ExixtsRepository(id []int) ([]int, error)
}
type Namespace ¶
type Namespace struct {
Id int `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Kind string `json:"kind"`
FullPath string `json:"full_path"` // 全路径
ParentId int `json:"parent_id"`
}
Namespace gitlab namespace
type Repository ¶
type Repository struct {
Id int `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
PathWithNamespace string `json:"path_with_namespace"`
DefaultBranch string `json:"default_branch"`
Namespace Namespace `json:"namespace"`
Archived bool `json:"archived"`
HttpUrlToRepo string `json:"http_url_to_repo"`
WebUrl string `json:"web_url"`
CreateAt string `json:"created_at"`
LastActivityAt string `json:"last_activity_at"`
Visibility string `json:"visibility"`
Description string `json:"description"`
CreatorId int `json:"creator_id"`
}
type RepositoryService ¶
func (*RepositoryService) ExixtsRepository ¶
func (r *RepositoryService) ExixtsRepository(ids []string) ([]int, error)
func (*RepositoryService) FindRepositories ¶
func (r *RepositoryService) FindRepositories(page, limit int, language string) ([]GitlabRepository, error)
func (*RepositoryService) GetRepositoryById ¶
func (r *RepositoryService) GetRepositoryById(id int) (*GitlabRepository, error)
func (*RepositoryService) SaveRepository ¶
func (r *RepositoryService) SaveRepository(repository Repository) error
func (*RepositoryService) UpdateRepository ¶
func (r *RepositoryService) UpdateRepository(language, dir string, id int) error
Click to show internal directories.
Click to hide internal directories.