settings

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package settings is a single place to put all of the application settings.

Package settings is a single place to put all of the application settings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logging

type Logging struct {
	File   string        `json:"file,omitempty" yaml:"file"`
	Level  string        `json:"level,omitempty" yaml:"level"`
	Remote RemoteLogging `json:"remote" yaml:"remote"`
}

type Redis

type Redis struct {
	BaseURL    string `json:"baseUrl,omitempty" yaml:"baseUrl"`
	Password   string `json:"password,omitempty" yaml:"password"`
	Connection string `json:"connection,omitempty" yaml:"connection"`
}

type RemoteLogging

type RemoteLogging struct {
	Enabled    bool   `json:"enabled" yaml:"remote"`
	Endpoint   string `json:"endpoint" yaml:"endpoint"`
	CustomerID string `json:"customerId" yaml:"customerId"`
	Version    string `json:"version" yaml:"version"`
}

type RepoConfig

type RepoConfig struct {
	Provider string `json:"provider,omitempty" yaml:"provider"`
	Repo     string `json:"repo,omitempty" yaml:"repo"`
	Branch   string `json:"branch,omitempty" yaml:"branch"`
}

type Secrets

type Secrets struct {
	Vault secrets.VaultConfig `json:"vault" yaml:"vault"`
}

type Settings

type Settings struct {
	TemplateOrg       string       `json:"templateOrg,omitempty" yaml:"templateOrg"`
	TemplateRepo      string       `json:"templateRepo,omitempty" yaml:"templateRepo"`
	DinghyFilename    string       `json:"dinghyFilename,omitempty" yaml:"dinghyFilename"`
	AutoLockPipelines string       `json:"autoLockPipelines,omitempty" yaml:"autoLockPipelines"`
	SpinnakerUIURL    string       `json:"spinUIUrl,omitempty" yaml:"spinUIUrl"`
	GitHubCredsPath   string       `json:"githubCredsPath,omitempty" yaml:"githubCredsPath"`
	GitHubToken       string       `json:"githubToken,omitempty" yaml:"githubToken"`
	GithubEndpoint    string       `json:"githubEndpoint,omitempty" yaml:"githubEndpoint"`
	StashCredsPath    string       `json:"stashCredsPath,omitempty" yaml:"stashCredsPath"`
	StashUsername     string       `json:"stashUsername,omitempty" yaml:"stashUsername"`
	StashToken        string       `json:"stashToken,omitempty" yaml:"stashToken"`
	StashEndpoint     string       `json:"stashEndpoint,omitempty" yaml:"stashEndpoint"`
	FiatUser          string       `json:"fiatUser,omitempty" yaml:"fiatUser"`
	Logging           Logging      `json:"logging,omitempty" yaml:"logging"`
	Secrets           Secrets      `json:"secrets,omitempty" yaml:"secrets"`
	ParserFormat      string       `json:"parserFormat,omitempty" yaml:"parserFormat"`
	RepoConfig        []RepoConfig `json:"repoConfig,omitempty" yaml:"repoConfig"`
	// contains filtered or unexported fields
}

Settings contains all information needed to startup and run the dinghy service

func LoadSettings

func LoadSettings() (*Settings, error)

LoadSettings loads the Spring config from the default Spinnaker paths and merges default settings with the loaded settings

func NewDefaultSettings

func NewDefaultSettings() Settings

func (*Settings) GetRepoConfig

func (s *Settings) GetRepoConfig(provider, repo string) *RepoConfig

Jump to

Keyboard shortcuts

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