Documentation
¶
Index ¶
- Constants
- func GetRepoOrNil(client *gitea.Client, owner, repoName string) (*gitea.Repository, error)
- func ListRepos(client *gitea.Client, owner string, skipPrivate bool, skipForks bool) ([]*gitea.Repository, error)
- type SourceRepository
- type SyncConfig
- type SyncOutput
- type SyncRepository
- func (sr SyncRepository) DiffDescription(teaRepo *gitea.Repository) bool
- func (sr SyncRepository) DiffMirrorInterval(teaRepo *gitea.Repository) bool
- func (sr SyncRepository) DiffTopics(teaTopics []string) bool
- func (sr SyncRepository) DiffVisibility(teaRepo *gitea.Repository) bool
- func (sr SyncRepository) StaleMirror(teaRepo *gitea.Repository) bool
Constants ¶
View Source
const ArchivedMirrorInterval = "0s"
Variables ¶
This section is empty.
Functions ¶
func GetRepoOrNil ¶
Types ¶
type SourceRepository ¶
type SourceRepository struct {
SyncRepository
Owner string
Name string
Fork bool
URLS []string
}
func Convert ¶
func Convert(r *gitea.Repository, topics []string) SourceRepository
func ConvertList ¶
func ConvertList(teaRepos []*gitea.Repository, getTopic func(r *gitea.Repository) ([]string, error)) ([]SourceRepository, error)
func (SourceRepository) GetFullName ¶
func (sr SourceRepository) GetFullName() string
func (SourceRepository) Is ¶
func (sr SourceRepository) Is(name string) bool
func (SourceRepository) IsMyMirror ¶
func (sr SourceRepository) IsMyMirror(teaRepo *gitea.Repository) bool
type SyncConfig ¶
type SyncOutput ¶
type SyncOutput struct {
UpdateDescription bool
UpdateTopics bool
UpdateVisibility bool
UpdateMirrorInterval bool
SyncMirror bool
}
func Sync ¶
func Sync(client *gitea.Client, teaRepo *gitea.Repository, sourceRepo *SyncRepository, config *SyncConfig) (SyncOutput, error)
type SyncRepository ¶
type SyncRepository struct {
Topics []string
Description string
Private bool
Archived bool
PushedAt time.Time
}
func (SyncRepository) DiffDescription ¶
func (sr SyncRepository) DiffDescription(teaRepo *gitea.Repository) bool
func (SyncRepository) DiffMirrorInterval ¶
func (sr SyncRepository) DiffMirrorInterval(teaRepo *gitea.Repository) bool
func (SyncRepository) DiffTopics ¶
func (sr SyncRepository) DiffTopics(teaTopics []string) bool
func (SyncRepository) DiffVisibility ¶
func (sr SyncRepository) DiffVisibility(teaRepo *gitea.Repository) bool
func (SyncRepository) StaleMirror ¶
func (sr SyncRepository) StaleMirror(teaRepo *gitea.Repository) bool
Click to show internal directories.
Click to hide internal directories.