repositories

package
v0.0.0-...-5c5d71a Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const GitIgnore string = ".gitignore"

Variables

View Source
var Repositories = make([]*Repository, 0)

Functions

func IsLocal

func IsLocal(path string) bool

IsLocal return if path is a local path

func IsRemote

func IsRemote(path string) bool

IsRemote return if path is remote cloud provider

func IsValid

func IsValid(path string, isRemote bool) (string, error)

IsValid detect if remote repository is configured and valid

Types

type Repository

type Repository struct {
	Name        string   `mapstructure:"name"`
	Source      string   `mapstructure:"source"`
	Destination string   `mapstructure:"destination"`
	RTS         bool     `mapstructure:"rts"`
	Args        []string `mapstructure:"args"`
	// contains filtered or unexported fields
}

Repository is the structure of syncronized folder

func GetRepository

func GetRepository(repositoryName string) *Repository

GetRepository repository by name

func List

func List() []*Repository

List repositories in configuration file

func (*Repository) GetStatus

func (d *Repository) GetStatus() string

GetStatus is Getter for Status

func (*Repository) IsDestinationLocal

func (d *Repository) IsDestinationLocal() bool

IsDestinationLocal return if path is a local path

func (*Repository) IsDestinationRemote

func (d *Repository) IsDestinationRemote() bool

IsDestinationRemote return if path is a local path

func (*Repository) IsSourceLocal

func (d *Repository) IsSourceLocal() bool

IsSourceLocal return if path is a local path

func (*Repository) IsSourceRemote

func (d *Repository) IsSourceRemote() bool

IsSourceRemote return if path is a local path

func (*Repository) SetStatus

func (d *Repository) SetStatus(s string)

SetStatus is Setter for Status

func (*Repository) Start

func (d *Repository) Start()

Start synchronization for the current repository

func (*Repository) Stop

func (d *Repository) Stop()

Stop synchronization for the current repository

Jump to

Keyboard shortcuts

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