Documentation ¶
Index ¶
- func ConvertToBool(data interface{}) (bool, error)
- func ConvertToString(data interface{}) (string, error)
- func GetConfigPath(extensionName string) string
- func GetValueAsBool(ps Properties, key string) (bool, error)
- func GetValueAsString(ps Properties, key string) (string, error)
- func RenderProperties(ps Properties) (string, error)
- func WriteProperties(extensionName string, ps Properties) error
- type Properties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToBool ¶
ConvertToBool converts an interface to boolean
func ConvertToString ¶
ConvertToString converts an interface to string
func GetConfigPath ¶
GetConfigPath gets the statesFile path
func GetValueAsBool ¶
func GetValueAsBool(ps Properties, key string) (bool, error)
GetValueAsBool gets a property value as boolean
func GetValueAsString ¶
func GetValueAsString(ps Properties, key string) (string, error)
GetValueAsString gets a property as string
func RenderProperties ¶
func RenderProperties(ps Properties) (string, error)
RenderProperties converts properties into string
func WriteProperties ¶
func WriteProperties(extensionName string, ps Properties) error
WriteProperties persists the properties
Types ¶
type Properties ¶
type Properties map[string]interface{}
Properties map of interfaces
func AddError ¶
func AddError(ps Properties, key string, msgType string, msg string) Properties
AddError adds an error in the properties
func ReadProperties ¶
func ReadProperties(extensionName string) (Properties, error)
ReadProperties reads the property file and populate the properties map If the file is not present or can not be read an error is raised
Click to show internal directories.
Click to hide internal directories.