Documentation ¶
Overview ¶
Package sdkutil provides internal utility functions for the SDK.
Index ¶
Constants ¶
const ( // DataServiceURI represents the URI for data service. DataServiceURI = "/" + serviceVersion + "/nosql/data" // SecurityServiceURI represents the URI for security service. // This is used for on-premise only. SecurityServiceURI = "/" + serviceVersion + "/nosql/security" )
Variables ¶
This section is empty.
Functions ¶
func ExpandPath ¶
ExpandPath cleans and expands the path if it contains a tilde, returns the expanded path or the input path as is if no expansion was performed.
Types ¶
type Properties ¶
type Properties struct {
// contains filtered or unexported fields
}
Properties is used to read and write properties files. The properties in the file must be written in the form:
name=value
func NewProperties ¶
func NewProperties(file string) (p *Properties, err error)
NewProperties creates a Properties with the specified properties file.
func (*Properties) Err ¶
func (p *Properties) Err() error
Err reports any error occurs during Load().
func (*Properties) Get ¶
func (p *Properties) Get(key string) (string, error)
Get reads the property associated with key.
func (*Properties) Load ¶
func (p *Properties) Load()
Load reads properties from the file. If any errors occur during read, the error is reported in the Err() method.
Empty lines and lines that start with the '#' mark are ignored.
func (*Properties) Put ¶
func (p *Properties) Put(key, value string)
Put writes the property value associated with key.
func (*Properties) Save ¶
func (p *Properties) Save() error
Save saves the properties to the file. The properties are sorted in lexical order according to property name when saved.