util

package module
v0.0.0-...-5f34eba Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: BSD-3-Clause Imports: 14 Imported by: 23

Documentation

Overview

* Copyright © 2020. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file.

* Copyright © 2020. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file.

Index

Constants

View Source
const (
	GRAPH_ID = "$GRAPH_ID"
)

Variables

View Source
var (
	SN int64
)

Functions

func ActivityId

func ActivityId(ctx activity.Context) string

func CastGenArray

func CastGenArray(arrayData interface{}) []interface{}

func CastGenMap

func CastGenMap(mapData interface{}) map[string]interface{}

func CastString

func CastString(stringData interface{}) string

func Contains

func Contains(arrays []interface{}, target interface{}) bool

func ConvertToBoolean

func ConvertToBoolean(data interface{}) (interface{}, error)

func ConvertToDate

func ConvertToDate(data interface{}, dateTimeSample string) (interface{}, error)

func ConvertToDouble

func ConvertToDouble(data interface{}) (interface{}, error)

func ConvertToInteger

func ConvertToInteger(data interface{}) (interface{}, error)

func ConvertToLong

func ConvertToLong(data interface{}) (interface{}, error)

func ConvertToString

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

func CopyArray

func CopyArray(orig []interface{}) []interface{}

func CopyMap

func CopyMap(orig map[interface{}]interface{}, target map[string]interface{})

func DeepCopy

func DeepCopy(a interface{}) interface{}

func Fork

func Fork(processStateListener ProcessStateListener, cmdName string, cmdArgs ...string)

Method to fork a process for given command and return ProcessMonitor

func GetPropertyElement

func GetPropertyElement(key string, property interface{}) interface{}

func GetPropertyElementAsString

func GetPropertyElementAsString(key string, property interface{}) string

func GetPropertyValue

func GetPropertyValue(iValue interface{}, iDtype interface{}) (interface{}, string, error)

func GetSN

func GetSN() int64

func GetValue

func GetValue(value string) string

func IsInteger

func IsInteger(data string) bool

func ReadFile

func ReadFile(filename string) (string, error)

func ReplaceCharacter

func ReplaceCharacter(str string, targetRegex string, replacement string, doReplace bool) string

func ReplaceParameter

func ReplaceParameter(origString string, parameter string, replacement string) string

func SliceContains

func SliceContains(slice []string, targetElement string) bool

func SplitFilename

func SplitFilename(filename string) (string, string)

func StringToTypes

func StringToTypes(data string, dataType string, dateTimeSample string) (interface{}, error)

func ToString

func ToString(data interface{}, dataType string, dateTimeSample string) (string, error)

func TypeConversion

func TypeConversion(data interface{}, dataType string, dateTimeSample string) (interface{}, error)

func TypeString

func TypeString(data interface{}) string

Types

type ProcessMonitor

type ProcessMonitor struct {
	CmdName *string
	CmdArgs *[]string
	Process *os.Process
	Cmd     *exec.Cmd
	Output  *[]byte
	Err     error
}

Process monitor

type ProcessStateListener

type ProcessStateListener interface {
	OnComplete(processMonitor *ProcessMonitor)
	OnError(processMonitor *ProcessMonitor, err error)
}

Process state listener interface

Jump to

Keyboard shortcuts

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