sync

package
v0.0.0-...-f4a3ab8 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceConfig

	HelperConfig
}

func (*Config) Validate

func (c *Config) Validate() error

type HelperConfig

type HelperConfig struct {
	LFSPath    string `json:"lfs_path"    required:"true"`
	RepoPath   string `json:"repo_path"   required:"true"`
	CommitFile string `json:"commit_file" required:"true"`
}

type RepoInfo

type RepoInfo struct {
	Owner    domain.Account
	RepoId   string
	RepoName string
}

type ServiceConfig

type ServiceConfig struct {
	WorkDir       string `json:"work_dir"        required:"true"`
	SyncFileShell string `json:"sync_file_shell" required:"true"`
}

type SyncService

type SyncService interface {
	SyncRepo(*RepoInfo) error
}

func NewSyncService

func NewSyncService(
	cfg *Config, log *logrus.Entry,
	s obs.OBS,
	p platform.Platform,
	l synclock.RepoSyncLock,
) (SyncService, error)

Jump to

Keyboard shortcuts

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