recording

package
v0.0.0-...-7377fae Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	/*ErrNoRepositories indicates that no repositories were specified in the config*/
	ErrNoRepositories = errors.New("empty repository url list")
)

Functions

func InitLogging

func InitLogging(logParams smartlogger.LogParams)

InitLogging initializes this package's logging

func NewDummyConfig

func NewDummyConfig(dummyConfig *viper.Viper)

NewDummyConfig creates a new dummy configuration file

Types

type Config

type Config struct {
	Repositories []string        `toml:"repositories"`
	Protocol     gitops.Protocol `toml:"protocol"`
	Skips        struct {
		MissingBranch bool `toml:"missing_branch"`
		BadURL        bool `toml:"bad_url"`
		BadProtocol   bool `toml:"bad_protocol"`
		All           bool `toml:"all"`
	} `toml:"skips"`
}

Config contains configurations for the recording process

type ErrBadProtocol

type ErrBadProtocol struct {
	Protocol gitops.Protocol
}

ErrBadProtocol describes a missing branch

func NewErrBadProtocol

func NewErrBadProtocol(protocol gitops.Protocol) *ErrBadProtocol

NewErrBadProtocol returns a new ErrBadProtocol

func (*ErrBadProtocol) Error

func (err *ErrBadProtocol) Error() string

type ErrBadURL

type ErrBadURL struct {
	URL string
}

ErrBadURL describes a missing branch

func NewErrBadURL

func NewErrBadURL(url string) *ErrBadURL

NewErrBadURL returns a new ErrBadURL

func (*ErrBadURL) Error

func (err *ErrBadURL) Error() string

type ErrMissingBranch

type ErrMissingBranch struct {
	Branch     string
	Repository string
}

ErrMissingBranch describes a missing branch

func NewErrMissingBranch

func NewErrMissingBranch(branch, repository string) *ErrMissingBranch

NewErrMissingBranch returns a new ErrMissingBranch

func (*ErrMissingBranch) Error

func (err *ErrMissingBranch) Error() string

type Recorder

type Recorder struct {
	Config *viper.Viper
}

Recorder is a struct that does the recording process.

func NewRecorder

func NewRecorder(config *viper.Viper) *Recorder

NewRecorder creates a new Recorder with the specified configuration.

func (*Recorder) Record

func (recorder *Recorder) Record() bool

Record starts the recording process.

func (*Recorder) ValidateConfig

func (recorder *Recorder) ValidateConfig() bool

ValidateConfig checks the configuration and validates its integrity

Jump to

Keyboard shortcuts

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