factory

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package factory provides the factory method pattern for different structs in the project reference: https://en.wikipedia.org/wiki/Factory_method_pattern

Index

Constants

View Source
const (
	// Github GitRepoProvider
	Github GitRepoProvider = "github"

	// Jira IssueTrackerProvider
	Jira IssueTrackerProvider = "jira"
)

Variables

This section is empty.

Functions

func GitRepo

func GitRepo(params GitRepoParams) (gitrepo.GitRepo, error)

GitRepo returns a struct that implements GitRepo interface

func IssueTracker

func IssueTracker(params IssueTrackerParams) (issuetracker.IssueTracker, error)

IssueTracker returns a struct that implements IssueTracker interface

Types

type GitRepoParams

type GitRepoParams struct {
	Provider GitRepoProvider
	Host     string
	Token    string
}

GitRepoParams struct to be used in the function GitRepo

type GitRepoProvider

type GitRepoProvider string

GitRepoProvider string type

type IssueTrackerParams

type IssueTrackerParams struct {
	Provider IssueTrackerProvider
	Host     string
	Username string
	Key      string
}

IssueTrackerParams struct to be used in the function IssueTracker

type IssueTrackerProvider

type IssueTrackerProvider string

IssueTrackerProvider string type

Jump to

Keyboard shortcuts

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