config

package
v1.4.1 Latest Latest
Warning

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

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

Documentation

Overview

Package config provides access to the comply.yml file.

Index

Constants

View Source
const (
	Jira      = "jira"
	GitHub    = "github"
	GitLab    = "gitlab"
	NoTickets = "none"
)
View Source
const (
	// UseDocker invokes pandoc within Docker
	UseDocker = "docker"
	// UsePandoc invokes pandoc directly
	UsePandoc = "pandoc"
)

Variables

This section is empty.

Functions

func Exists

func Exists() bool

Exists tests for the presence of a comply configuration file.

func ProjectRoot

func ProjectRoot() string

ProjectRoot is the fully-qualified path to the root directory.

func SetPandoc added in v1.1.27

func SetPandoc(pandoc bool, docker bool)

SetPandoc records pandoc availability during initialization

func SetProjectRoot

func SetProjectRoot(dir string)

SetProjectRoot is used by the test suite.

func WhichPandoc added in v1.1.27

func WhichPandoc() string

WhichPandoc indicates which pandoc invocation path should be used

func YAML

func YAML() map[interface{}]interface{}

YAML is the parsed contents of ProjectRoot()/config.yml.

Types

type Project

type Project struct {
	Name           string                 `yaml:"name"`
	Pandoc         string                 `yaml:"pandoc,omitempty"`
	FilePrefix     string                 `yaml:"filePrefix"`
	Tickets        map[string]interface{} `yaml:"tickets"`
	ApprovedBranch string                 `yaml:"approvedBranch"`
}

func Config

func Config() *Project

Config is the parsed contents of ProjectRoot()/config.yml.

func (*Project) TicketSystem added in v1.2.2

func (p *Project) TicketSystem() (string, error)

TicketSystem indicates the type of the configured ticket system

Jump to

Keyboard shortcuts

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