syncer

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterFunc

type FilterFunc func(*core.Repository) bool

FilterFunc can be used to filter which repositories are synchronized with the local datastore.

func NamespaceFilter

func NamespaceFilter(namespaces []string) FilterFunc

NamespaceFilter is a filter function that returns true if the repository namespace matches a provided namespace in the list.

type Synchronizer

type Synchronizer struct {
	// contains filtered or unexported fields
}

Synchronizer synchronizes user repositories and permissions between a remote source code management system and the local data store.

func New

func New(
	repoz core.RepositoryService,
	repos core.RepositoryStore,
	users core.UserStore,
	batch core.Batcher,
) *Synchronizer

New returns a new Synchronizer.

func (*Synchronizer) SetFilter

func (s *Synchronizer) SetFilter(fn FilterFunc)

SetFilter sets the filter function.

func (*Synchronizer) Sync

func (s *Synchronizer) Sync(ctx context.Context, user *core.User) (*core.Batch, error)

Sync synchronizes the user repository list in 6 easy steps.

Jump to

Keyboard shortcuts

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