sync

package
v0.0.0-...-6f60689 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package sync provides functions for synchronizing to gopkgs head.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MirrorSourceTransform

func MirrorSourceTransform(mirror string) func(s *core.State)

MirrorSourceTransform maps all sources to a mirror prefix. The git source is formatted as (mirror + "/" + <repo name>).

func PrivateSourceTransform

func PrivateSourceTransform(org string) func(s *core.State)

PrivateSourceTransform maps repo soruces in a Bitbucket and GitHub org from https to git+ssh format.

func Sync

func Sync(env *goenv.ExecEnv, state *core.State, auto *AutoInstall) error

Sync syncs repos in GOPATH to the desired state.

Types

type AutoInstall

type AutoInstall struct {
	Repo string
	Pkg  string
}

AutoInstall is the packaget that will be auto installed on a sync operation.

type RemoteState

type RemoteState struct {
	Server    string
	Project   string
	Transform func(s *core.State)
}

RemoteState fetches a state from a remote /api/sync/proj URL.

func (*RemoteState) Fetch

func (s *RemoteState) Fetch() (*core.State, error)

Fetch fetches the state.

type Syncer

type Syncer struct {
	Env *goenv.ExecEnv

	KnownHostsFile string
}

Syncer is a syncrhonizer that syncs the repos in GOPATH.

func (*Syncer) Sync

func (s *Syncer) Sync(state *core.State, auto *AutoInstall) error

Sync syncs repos in GOPATH to the desired state.

Jump to

Keyboard shortcuts

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