common

package
v0.0.0-...-701edb4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgsToDictionary

func ArgsToDictionary(args []string) map[string]string

func CStr

func CStr(s string) *C.char

func CleanString

func CleanString(a string) string

func DictionaryToJsonString

func DictionaryToJsonString(a map[string]interface{}) string

func DictionaryValue

func DictionaryValue(dict map[string]interface{}, key string, defaultValue interface{}) interface{}

func EnsureRestMethod

func EnsureRestMethod(a *http.Request, b string) (bool, string)

func GetTraceLevelName

func GetTraceLevelName(x TraceLevel) string

func InvokeGet

func InvokeGet(endpoint string, headers map[string]string) map[string]interface{}

func InvokePost

func InvokePost(endpoint string, jsonBody map[string]string, headers map[string]string) map[string]interface{}

func ListContains

func ListContains(haystack []string, needle string) (bool, int)

func LookupParameter

func LookupParameter(args map[string]interface{}, name string, defaultValue interface{}) interface{}

func LookupParameterValue

func LookupParameterValue(key string, parameters map[string]string, defaultValue string) string

func PadLeft

func PadLeft(str string, le int, pad string) string

func PadRight

func PadRight(str string, le int, pad string) string

func ParseExtendedParameters

func ParseExtendedParameters(raw string) map[string]interface{}

func ParseParameters

func ParseParameters(delim string) map[string]interface{}

func RunCmd

func RunCmd(cmd string) string

func SortStrDictionary

func SortStrDictionary(dict map[string]string) []string

func StrDictionaryToJsonString

func StrDictionaryToJsonString(a map[string]string) string

func StrToDictionary

func StrToDictionary(s []byte) map[string]interface{}

func ToConstStr

func ToConstStr(a string) *C.uchar

Types

type EmptyPropertyStore

type EmptyPropertyStore struct {
	// contains filtered or unexported fields
}

EmptyPropertyStore

func (*EmptyPropertyStore) GetKey

func (x *EmptyPropertyStore) GetKey(a string) interface{}

func (*EmptyPropertyStore) GetKeys

func (x *EmptyPropertyStore) GetKeys() map[string]interface{}

func (*EmptyPropertyStore) SetProperty

func (x *EmptyPropertyStore) SetProperty(a string, b interface{})

type JsonPropertyStore

type JsonPropertyStore struct {
	// contains filtered or unexported fields
}

JsonPropertyStore

func (*JsonPropertyStore) GetKey

func (x *JsonPropertyStore) GetKey(a string) interface{}

func (*JsonPropertyStore) GetKeys

func (x *JsonPropertyStore) GetKeys() map[string]interface{}

func (*JsonPropertyStore) SetProperty

func (x *JsonPropertyStore) SetProperty(a string, b interface{})

type PlainPropertyStore

type PlainPropertyStore struct {
	Delimiter string
	// contains filtered or unexported fields
}

PlainPropertyStore

func (*PlainPropertyStore) GetKey

func (x *PlainPropertyStore) GetKey(a string) interface{}

func (*PlainPropertyStore) GetKeys

func (x *PlainPropertyStore) GetKeys() map[string]interface{}

func (*PlainPropertyStore) SetProperty

func (x *PlainPropertyStore) SetProperty(a string, b interface{})

type PropertyStore

type PropertyStore interface {
	GetKeys() map[string]interface{}
	GetKey(a string) interface{}
	SetProperty(a string, b interface{})
	// contains filtered or unexported methods
}

PropertyStore interface

type PropertyStoreService

type PropertyStoreService struct{}

PropertyStoreService

func (*PropertyStoreService) LoadFromFile

func (x *PropertyStoreService) LoadFromFile(a string, b PropertyStore)

type SystemService

type SystemService struct {
	ModulePath string
}

func (*SystemService) BuildModuleContainerPath

func (x *SystemService) BuildModuleContainerPath() string

type TraceCategory

type TraceCategory int

TraceCategory

const (
	TC_NONE TraceCategory = iota
)

type TraceLevel

type TraceLevel int

TraceLevel

const (
	TL_NONE TraceLevel = iota
	TL_ERROR
	TL_WARNING
	TL_INFORMATIONAL
	TL_VERBOSE
	TL_DEBUG
)

type TraceService

type TraceService struct {
	FilePath   string
	TraceLevel int
}

TraceService

func (*TraceService) TraceDebug

func (x *TraceService) TraceDebug(message string, category int)

func (*TraceService) TraceError

func (x *TraceService) TraceError(message string, category int)

func (*TraceService) TraceInformational

func (x *TraceService) TraceInformational(message string, category int)

func (*TraceService) TraceVerbose

func (x *TraceService) TraceVerbose(message string, category int)

func (*TraceService) TraceWarning

func (x *TraceService) TraceWarning(message string, category int)

Jump to

Keyboard shortcuts

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