properties

package
v0.0.0-...-c85cc39 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToBool

func ConvertToBool(data interface{}) (bool, error)

ConvertToBool converts an interface to boolean

func ConvertToString

func ConvertToString(data interface{}) (string, error)

ConvertToString converts an interface to string

func GetConfigPath

func GetConfigPath(extensionName string) string

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

Jump to

Keyboard shortcuts

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