sdkutil

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: UPL-1.0 Imports: 11 Imported by: 0

Documentation

Overview

Package sdkutil provides internal utility functions for the SDK.

Index

Constants

View Source
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

func ExpandPath(filePath string) (string, error)

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.

func SDKVersion

func SDKVersion() string

SDKVersion returns the Oracle NoSQL Go SDK version.

func UserAgent

func UserAgent() string

UserAgent returns a descriptive string that can be set in the "User-Agent" header of HTTP requests.

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.

Jump to

Keyboard shortcuts

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