Documentation ¶
Index ¶
Constants ¶
View Source
const ( // #nosec G101 -- This is just the env var name APIKeyEnvVar = "PREFAB_API_KEY" APIURLVar = "PREFAB_API_URL" )
Variables ¶
View Source
var DefaultOptions = Options{ APIKey: "", APIUrl: "https://api.prefab.cloud", Datasource: ALL, InitializationTimeoutSeconds: timeoutDefault, OnInitializationFailure: RAISE, EnvironmentNames: getDefaultEnvironmentNames(), ConfigDirectory: getHomeDir(), ConfigOverrideDirectory: StringPtr("."), GlobalContext: contexts.NewContextSet(), }
Functions ¶
Types ¶
type OnInitializationFailure ¶
type OnInitializationFailure int
const ( RAISE OnInitializationFailure = iota // RAISE = 0 UNLOCK // UNLOCK = 1 )
type Options ¶
type Options struct { ConfigDirectory *string ConfigOverrideDirectory *string GlobalContext *contexts.ContextSet APIKey string APIUrl string EnvironmentNames []string Datasource Datasource InitializationTimeoutSeconds float64 OnInitializationFailure OnInitializationFailure }
func NewOptions ¶
func (*Options) APIKeySettingOrEnvVar ¶
func (*Options) PrefabAPIURLEnvVarOrSetting ¶
Click to show internal directories.
Click to hide internal directories.