vcs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package vcs provides packages utilities to interact with version control systems.

See https://en.wikipedia.org/wiki/Version_control for more details about VCS.

Index

Constants

View Source
const (
	// KindNameGit is the Kind name for Git repositories.
	KindNameGit = "git"

	// KindNameNone is the Kind name for repositories that are not managed by any VCS.
	KindNameNone = "none"

	// KindNameUnknown is the name for a unknown repository Kind.
	KindNameUnknown = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind uint32

Kind defines the kind of a vcs.Repository.

const (
	// KindNone is the Kind for repositories that are not managed by any VCS.
	KindNone Kind = iota

	// KindGit is the Kind for Git repositories.
	//
	// See https://git-scm.com for more details.
	KindGit
)

func ParseKind

func ParseKind(name string) (Kind, error)

ParseKind takes a Kind name and returns the Kind constant.

func (Kind) MarshalText

func (k Kind) MarshalText() ([]byte, error)

MarshalText returns the textual representation of itself.

func (Kind) String

func (k Kind) String() string

func (*Kind) UnmarshalText

func (k *Kind) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler to unmarshal a textual representation of itself.

type Repository

type Repository interface {
	// Kind returns the repository Kind.
	Kind() Kind
	// DeriveVersion derives the repository version based on the Kind.
	DeriveVersion() error
	// Version returns the repository version.
	Version() interface{}
}

Repository is a VCS repository.

Directories

Path Synopsis
Package git provides VCS utility functions to interact with Git repositories.
Package git provides VCS utility functions to interact with Git repositories.
Package none provides a nonexistent repository.
Package none provides a nonexistent repository.

Jump to

Keyboard shortcuts

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