testconnector

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package testconnector provides a static connector for testing purposes. This connector always delivers the same data

Index

Constants

This section is empty.

Variables

View Source
var (
	// RetTestingTag controls whenether the testconnector should return the tag testingtag
	RetTestingTag = false
	// RepositoryExistsFail controls whenether the testconnector should
	// fail in the RepositoryExists() call
	RepositoryExistsFail = false
)

nolint: gochecknoglobals

Functions

func CLIFlags

func CLIFlags() []cli.Flag

CLIFlags describes the flags of connector

func New

func New(ctx *cli.Context) (connectors.Connector, error)

New creates a new Connector

Types

type Connector

type Connector struct {
}

Connector implements the test connector

func (*Connector) GetNewTagURL

func (*Connector) GetNewTagURL(TagName string) (string, error)

GetNewTagURL implements the connectors.Connector interface

func (*Connector) Issues

func (c *Connector) Issues(
	_ context.Context,
	cerr chan<- error,
) (
	<-chan data.Issue,
	<-chan bool,
	<-chan int,
)

Issues implements the connectors.Connector interface

func (*Connector) MRs

func (c *Connector) MRs(
	_ context.Context,
	cerr chan<- error,
) (
	<-chan data.MR,
	<-chan bool,
	<-chan int,
)

MRs implements the connectors.Connector interface

func (*Connector) RepositoryExists

func (c *Connector) RepositoryExists() (bool, error)

RepositoryExists checks if referenced repository is present

func (*Connector) Tags

func (c *Connector) Tags(
	_ context.Context,
	cerr chan<- error,
) (
	<-chan data.Tag,
	<-chan bool,
	<-chan int,
)

Tags implements the connectors.Connector interface

Jump to

Keyboard shortcuts

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