tea

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ArchivedMirrorInterval = "0s"

Variables

This section is empty.

Functions

func GetRepoOrNil

func GetRepoOrNil(client *gitea.Client, owner, repoName string) (*gitea.Repository, error)

func ListRepos

func ListRepos(client *gitea.Client, owner string, skipPrivate bool, skipForks bool) ([]*gitea.Repository, error)

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 SyncConfig struct {
	SyncDescription    bool
	SyncVisibility     bool
	SyncTopics         bool
	SyncMirrorInterval bool
	DestMirrorInterval string
}

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

Jump to

Keyboard shortcuts

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