setting

package
v3.8.20+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: MIT Imports: 9 Imported by: 6

Documentation

Index

Constants

View Source
const (
	InternalDefaultService              = "github"
	InternalDefaultIntegrationBranch    = "master"
	InternalDefaultRemote               = "origin"
	InternalDefaultApi                  = "https://api.github.com"
	InternalDefaultWeb                  = "https://github.com"
	InternalDefaultDeliveryBranchPrefix = "ready"
	InternalDefaultScope                = "internal"
	InternalDefaultOrigin               = "none"
)

Default configuration

Variables

This section is empty.

Functions

func BootstrapPhlowConfig

func BootstrapPhlowConfig(local, integrationBranch string) error

BootstrapPhlowConfig ... Creates a new .phlow ini file on given location

func GetDefaultBranchFromInternalDefault

func GetDefaultBranchFromInternalDefault() (string, error)

GetDefaultBranchFromInternalDefault ... Trying to retrieve the default branch from github

func NewConfigError

func NewConfigError(field, block string) error

NewConfigError ... Create a new configuration error

func ValidateLoadedSetting

func ValidateLoadedSetting(setting *ProjectSetting) error

ValidateLoadedSetting ... checks if all required fields have been set

Types

type ConfigError

type ConfigError struct {
	// contains filtered or unexported fields
}

ConfigError ... Error type for settings

func (*ConfigError) Error

func (ce *ConfigError) Error() string

Error ... error message generated for config

type ProjectSetting

type ProjectSetting struct {
	Service              string `ini:"service"`
	IntegrationBranch    string `ini:"integration-branch"`
	Remote               string `ini:"remote"`
	IssueApi             string `ini:"issue-api"`
	IssueWeb             string `ini:"issue-web"`
	PipelineUrl          string `ini:"pipeline"`
	DeliveryBranchPrefix string `ini:"delivery-branch-prefix"`
	Scope                string
	INIBlock             string
}

ProjectSetting ...

func LoadSettings

func LoadSettings(INIBlock string, git githandler.Git) *ProjectSetting

LoadSettings ... Loads a new setting

func NewProjectStg

func NewProjectStg(INIBlock string) *ProjectSetting

NewProjectStg ... initializes project settings from .phlow INI files

func (*ProjectSetting) ToString

func (setting *ProjectSetting) ToString() string

ToString ... String representation of struct

Jump to

Keyboard shortcuts

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