config

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_BUG_COMPONENT string = "Security Block-lists, Allow-lists, and other State"
View Source
const DEFAULT_BUG_PRODUCT string = "Core"
View Source
const DEFAULT_BUG_VERSION string = "unspecified"
View Source
const DEFAULT_COLLECTION_URL string = "https://remote-settings.allizom.org/v1/buckets/ecurity-state-staging/collections/onecrl"
View Source
const DEFAULT_DEFAULT string = ""
View Source
const DEFAULT_DESCRIPTION string = "Here are some entries: Please ensure that the entries are correct."
View Source
const DEFAULT_ENFORCE_CRL_CHECKS string = "yes"
View Source
const DEFAULT_ONECRLBUCKET string = "security-state"
View Source
const DEFAULT_ONECRLCONFIG string = ".config.yml"
View Source
const DEFAULT_ONECRLENV string = "production"
View Source
const DEFAULT_ONECRLVERBOSE string = "no"
View Source
const DEFAULT_PREVIEW string = "no"
View Source
const PREFIX_BUGZILLA_PROD string = "https://bugzilla.mozilla.org"
View Source
const PREFIX_BUGZILLA_STAGE string = "https://bugzilla.allizom.org"
View Source
const ProductionPrefix string = "https://firefox.settings.services.mozilla.com"
View Source
const RecordsPathPrefix string = "/v1/buckets/"
View Source
const RecordsPathSuffix string = "/collections/onecrl/records"
View Source
const StagePrefix string = "https://firefox.settings.services.allizom.org"

Variables

This section is empty.

Functions

func DefineFlags

func DefineFlags()

DefineFlags defines the command line flags common to different OneCRL tools.

Types

type OneCRLConfig

type OneCRLConfig struct {
	OneCRLVerbose      string `mapstructure:"onecrlverbose"`
	BugzillaBase       string `mapstructure:"bugzilla"`
	BugzillaAPIKey     string `mapstructure:"bzapikey"`
	BugzillaReviewers  string `mapstructure:"reviewers"`
	BugProduct         string `mapstructure:"bugproduct"`
	BugComponent       string `mapstructure:"bugcomponent"`
	BugVersion         string `mapstructure:"bugversion"`
	BugzillaBlockee    string `mapstructure:"blockee"`
	BugDescription     string `mapstructure:"bugdescription"`
	Preview            string `mapstructure:"preview"`
	EnforceCRLChecks   string `mapstructure:"enforcecrlchecks"`
	KintoUser          string `mapstructure:"kintouser"`
	KintoPassword      string `mapstructure:"kintopass"`
	KintoToken         string `mapstructure:"kintotoken"`
	KintoCollectionURL string `mapstructure:"collectionurl"`
	SkipBugzilla       bool   // Must be set by CLI flags
	AdditionalConfig   map[string]string
	// contains filtered or unexported fields
}

func GetConfig

func GetConfig() *OneCRLConfig

GetConfig obtains the system-wide default config including entries loaded from configuration and the environment.

func (OneCRLConfig) GetRecordURL

func (config OneCRLConfig) GetRecordURL() (error, string)

func (OneCRLConfig) GetRecordURLForEnv

func (config OneCRLConfig) GetRecordURLForEnv(environment string) (error, string)

GetRecordURLForEnv returns the the URL (as a string) for a given OneCRL Environment ("stage" or "production")

Jump to

Keyboard shortcuts

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