scm

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package scm is the abstraction of all available SCM Manager allowing to fetch components.

Currently available SCM Manager are :

  • git
  • file (local files, only for test purpose)

The SCM Manager used to fetch a repository will depend on the github.com/ekara-platform/model.SCMType of the desired repository.

  • GitScm
  • SvnScm
  • UnknownScm

A repository with an UnknownScm but with an URL but with a file scheme will be intended to be fetched as a local files repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchedComponent

type FetchedComponent struct {
	ID            string
	LocalPath     string
	Descriptor    string
	DescriptorUrl model.EkURL
	LocalUrl      model.EkURL
}

FetchedComponent represents a component fetched locally

func (FetchedComponent) HasDescriptor

func (fc FetchedComponent) HasDescriptor() bool

HasDescriptor returns true if the fetched component contains a descriptor

func (FetchedComponent) String

func (fc FetchedComponent) String() string

type Handler

type Handler func() (FetchedComponent, error)

Handler allows to fetch a component.

If the component repository has already been fetched and if it matches then it will be updated, if not it will be fetched.

func GetHandler

func GetHandler(l *log.Logger, dir string, c model.Component) (Handler, error)

GetHandler returns an handler able to fetch a component

Directories

Path Synopsis
Package file implements the git connector used to fetch components from local repositories.
Package file implements the git connector used to fetch components from local repositories.
Package git implements the git connector used to fetch components repositories.
Package git implements the git connector used to fetch components repositories.

Jump to

Keyboard shortcuts

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