di

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegistry added in v1.5.0

func GetRegistry() registry.Source

func SetConfig

func SetConfig(c Config)

SetConfig allows you to update the current config

func SetInitializer

func SetInitializer(i Initializer)

func SetLauncher

func SetLauncher(l Launcher)

func SetMapper

func SetMapper(m Mapper)

func SetOutput

func SetOutput(o Output)

func SetRegistry added in v1.5.0

func SetRegistry(source registry.Source)

Types

type Config

type Config interface {
	DevelopmentDirectory() string
	ScratchDirectory() string

	GetServices() []models.Service
	GetService(domain string) models.Service
	GetDefaultService() models.Service

	GetApps() []models.App
	GetApp(name string) models.App
	GetDefaultApp() models.App

	GetAliases() map[string]string
	GetAlias(name string) string

	GetFeatures() Features
	Update(entry registry.EntryConfig)
	Save(path string) error
}

The Config is used to configure the behavior of Git Tool

func GetConfig

func GetConfig() Config

GetConfig gets the current configuration

type Features

type Features interface {
	UseNativeClone() bool
	CreateRemoteRepo() bool
	UseHttpTransport() bool
}

Features are used to control the fine grained behaviour of Git Tool

type Initializer

type Initializer interface {
	CreateRepository(r models.Repo) error
	CloneRepository(r models.Repo) error
	CreateScratchpad(r models.Scratchpad) error
}

func GetInitializer

func GetInitializer() Initializer

type Launcher

type Launcher interface {
	Run(cmd *exec.Cmd) error
}

func DefaultLauncher

func DefaultLauncher() Launcher

func GetLauncher

func GetLauncher() Launcher

type Mapper

type Mapper interface {
	GetBestRepo(name string) (models.Repo, error)
	GetRepos() ([]models.Repo, error)
	GetScratchpads() ([]models.Scratchpad, error)
	GetScratchpad(name string) (models.Scratchpad, error)
	GetReposForService(service models.Service) ([]models.Repo, error)
	GetRepo(name string) (models.Repo, error)
	GetRepoForService(service models.Service, name string) (models.Repo, error)
	GetFullyQualifiedRepo(name string) (models.Repo, error)
	GetCurrentDirectoryRepo() (models.Repo, error)
	GetBranches(r models.Repo) ([]string, error)
}

A Mapper holds the information about a developer's source code folder which may contain multiple repositories.

func GetMapper

func GetMapper() Mapper

type Output

type Output interface {
	io.Writer
	io.StringWriter
}

func GetOutput

func GetOutput() Output

Jump to

Keyboard shortcuts

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