factory

package
v0.2.4-beta.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ERR_APPLICATION_NAME_BLANK = "sorry the application name must not be blank"
View Source
const ERR_FACTORY_INCONSISTENT_STATE = "the Factory is in an inconsistent state, please only use public methods to modify"
View Source
const ERR_FACTORY_NOT_INITIALIZED = "sorry the factory has not been initilalized please run f.Intialize() and try again"
View Source
const ERR_INVALID_OUTPUT_TYPE = "sorry the output type you have set is not valid and not supported"
View Source
const ERR_KEY_MUST_MATCH_REGEX = "sorry the key must only include letters and underscores [0-9A-Za-z_]"
View Source
const OUTPUT_TYPE_INI = "ini"
View Source
const OUTPUT_TYPE_INVALID = "nri"
View Source
const OUTPUT_TYPE_JSON = "json"
View Source
const REGEX_KEY_NAME = "(?m)^[0-9A-Za-z_]+$"

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	ApplicationName        string            `json:"application_name"`
	ConfigurationDirectory string            `json:"configuration_directory"`
	CredentialFile         string            `json:"credential_file"`
	UseEnvironment         bool              `json:"use_environment"`
	Initialized            bool              `json:"initialized"`
	OutputType             string            `json:"output_type"`
	Alternates             map[string]string `json:"alternates"`
}

func New

func New(applicationName string, useEnvironment bool) (*Factory, error)

func (*Factory) Initialize

func (factory *Factory) Initialize() error

func (*Factory) SetEnvironmentKeys

func (factory *Factory) SetEnvironmentKeys(usernameKey string, passwordKey string) error

func (*Factory) SetOutputType

func (factory *Factory) SetOutputType(outputType string) error

Jump to

Keyboard shortcuts

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